aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2010-09-29 01:46:19 +0200
committerAndrea Adami <andrea.adami@gmail.com>2010-09-29 01:51:43 +0200
commitda451d4d552488e6ce6dad0a7fa4815a9c29459d (patch)
tree3de0c7690e001a75eb505c525a0369168f8c6bf0 /recipes/linux
parentee4a70a8d3832f0c4bae3c002692136e9ff6587f (diff)
downloadopenembedded-da451d4d552488e6ce6dad0a7fa4815a9c29459d.tar.gz
linux-kexecboot: move recipes in /linux
* some old version might hopefully be pruned
Diffstat (limited to 'recipes/linux')
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/asus620/defconfig1354
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/asus730/defconfig1475
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/aximx50/defconfig1337
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/eteng500/defconfig1326
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/gcc4x-limits.patch10
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h1910/defconfig1407
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h2200/defconfig1803
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h3600/defconfig1324
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h3800/defconfig1322
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h3900/defconfig1443
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h4000/defconfig1569
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/h5000/defconfig1701
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcalpine/defconfig1347
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcapache/defconfig1437
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcbeetles/defconfig1354
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcblueangel/defconfig1590
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htchimalaya/defconfig1350
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcsable/defconfig1465
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcuniversal/defconfig1471
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/htcwallaby/defconfig1322
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/hx4700/defconfig1487
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch144
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/looxc550/defconfig1351
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/magician/defconfig1679
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/rx1950/defconfig1383
-rw-r--r--recipes/linux/linux-kexecboot-2.6.21-hh20/rx3000/defconfig1507
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch15
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/80-kexec-atags.patch111
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/akita/defconfig1239
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/binutils-buildid-arm.patch16
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/c7x0/defconfig1233
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/connectplus-prevent-oops-HACK.patch17
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/connectplus-remove-ide-HACK.patch12
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/hostap-monitor-mode.patch209
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/hrw-hostapcard.patch34
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/htcuni-acx.patch33527
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/htcuni.patch7920
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/mtd-module.patch13
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch10
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig903
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/poodle_buildfixes.patch54
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/poodle_serial_vcc.patch28
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/poodle_ts.patch22
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/pxa-resume.patch58
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/pxa-serial-hack.patch90
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/pxa27x-resume.patch41
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/pxa2xx_udc-clock.patch221
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/pxa_fb_overlay.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/pxafb.patch13
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch155
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r1.patch527
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r2.patch180
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/spitz/defconfig1239
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/spitz_h_rewrite.patch497
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/squashfs3.3.patch4234
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch201
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0001-pxa2xx-ac97-switch-AC-unit-to-correct-state-before.patch56
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch260
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0003-Core-MFD-support.patch243
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch907
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch249
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch653
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch81
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch608
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch1128
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch431
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch891
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0012-Tosa-keyboard-support.patch593
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch61
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch38
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0015-sharpsl-export-params.patch32
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch44
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch280
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch225
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch128
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch257
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch121
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch746
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch498
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch238
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch434
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch134
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch59
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch72
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch163
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch1083
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch383
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch492
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch490
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch329
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch122
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch41
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch57
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch446
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0040-Clocklib-debugfs-support.patch108
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch593
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch153
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0045-Update-tmio_ohci.patch416
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch66
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch412
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch225
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch373
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch99
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch86
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0052-tosa-platform-backlight-support.patch400
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch56
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch28
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch30
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch126
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch70
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch27
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch46
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch623
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0061-tosa-bat-unify.patch342
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0062-tosa-bat-fix-charging.patch78
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch84
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0064-Export-modes-via-sysfs.patch27
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0065-wm97xx-core-fixes.patch49
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0067-modeswitching.patch225
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch239
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/defconfig1137
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/tmiofb-fix-unaccel.patch33
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/tosa/tosa-bl-fixup.diff103
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/versatile-armv6.patch19
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/wm8750-treble.patch11
-rw-r--r--recipes/linux/linux-kexecboot-2.6.24/zylonite-boot.patch45
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/akita/defconfig1011
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/binutils-buildid-arm.patch16
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/bootcdx86/defconfig1994
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/c7x0/defconfig1010
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/collie.patch2601
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/collie/defconfig804
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/collie_keymap.patch420
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/connectplus-prevent-oops-HACK.patch17
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/connectplus-remove-ide-HACK.patch12
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/hostap-monitor-mode.patch209
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/hrw-hostapcard.patch34
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/htcuni-acx.patch33527
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/htcuni.patch7899
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/htcuniversal/defconfig1309
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/hx2000/defconfig1733
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig1751
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/poodle_pm-r7.patch481
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/poodle_serial_vcc-r1.patch30
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/poodle_ts.patch22
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/pxa-serial-hack.patch90
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/pxa_fb_overlay.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/pxafb.patch13
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/qemuarm/defconfig1582
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/qemumips/defconfig1582
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/qemux86/defconfig1993
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch155
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/sharpsl-rc-r1.patch558
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/spitz/defconfig1011
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/spitz_h_rewrite.patch497
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/versatile-armv6.patch17
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/zaurus-i2c-init.patch99
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/zylonite-boot.patch45
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/zylonite/defconfig1741
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/zylonite_keypad-r0.patch1187
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/zylonite_mtd-r0.patch4093
-rw-r--r--recipes/linux/linux-kexecboot-2.6.26/zylonite_touch-r0.patch1548
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/0001-ASoC-Add-support-for-OMAP3-EVM.patch206
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/0001-This-merges-Steve-Kipisz-USB-EHCI-support.-He-star.patch146
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch90
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch287
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/0124-leds-gpio-broken-with-current-git.patch79
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/ads7846-detection.patch41
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/beagleboard/beagle-asoc.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/beagleboard/defconfig2741
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/beagleboard/ehci.patch131
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/beagleboard/logo_linux_clut224.ppm73147
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/beagleboard/tincantools-puppy.diff66
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/cache-display-fix.patch238
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch39
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch1316
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch14450
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch3403
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch396
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch1079
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch5715
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch39
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch778
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch28
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch37
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch65
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch41
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch51
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch68
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch58
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch103
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch40
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch183
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch79
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch96
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch27
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch214
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch48
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch28
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch78
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch324
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch236
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch61
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch29
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch33
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch82
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch135
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch66
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch118
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch150
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch56
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch59
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch97
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch71
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch34
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch170
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch76
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch48
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch44
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch123
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch101
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch53
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch170
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch34
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch41
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch85
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch230
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch32
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch56
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch97
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch34
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch106
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch65
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch82
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch216
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch92
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch29
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch65
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch125
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0070-DSS2-fix-irq1.diff221
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/dss2/0071-DSS2-fix-irq2.diff35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/ehci.patch0
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/evm-mcspi-ts.diff132
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/fix-audio-capture.patch16
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/fix-install.patch23
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/fix-unaligned-access.diff41
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0001-omap-iommu-tlb-and-pagetable-primitives.patch1226
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0002-omap-iommu-omap2-architecture-specific-functions.patch453
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0003-omap-iommu-omap3-iommu-device-registration.patch124
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0004-omap-iommu-simple-virtual-address-space-management.patch1083
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0005-omap-iommu-entries-for-Kconfig-and-Makefile.patch45
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0006-omap-iommu-Don-t-try-BUG_ON-in_interrupt.patch26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0007-omap-iommu-We-support-chained-scatterlists-probabl.patch24
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0008-omap2-iommu-entries-for-Kconfig-and-Makefile.patch29
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0001-omap3isp-Add-ISP-main-driver-and-register-definitio.patch4625
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0002-omap3isp-Add-ISP-MMU-wrapper.patch209
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0003-omap3isp-Add-userspace-header.patch696
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0004-omap3isp-Add-ISP-frontend-CCDC.patch1875
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0005-omap3isp-Add-ISP-backend-PRV-and-RSZ.patch3413
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0006-omap3isp-Add-statistics-collection-modules-H3A-and.patch2741
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0007-omap3isp-Add-CSI2-interface-support.patch2384
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0008-omap3isp-Add-ISP-tables.patch4018
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0009-omap34xxcam-Add-camera-driver.patch2249
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0023-OMAP-Resizer-Basic-Resizer-refreshed-with-latest-gi.patch1890
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0024-OMAP3-Resizer-V4L2-buf-layer-issues-fixed.patch729
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0025-OMAP3-Resizer-Build-issues-fixed.patch36
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0001-V4L2-Add-COLORFX-user-control.patch44
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0002-V4L-Int-if-v4l2_int_device_try_attach_all-requires.patch50
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0003-V4L-Int-if-Dummy-slave.patch61
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0004-V4L-int-device-add-support-for-VIDIOC_QUERYMENU.patch33
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0005-V4L-Int-if-Add-vidioc_int_querycap.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/make-alignment-visible.diff26
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/mmctiming.patch16
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/modedb-hd720.patch13
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0001-USB-musb-only-turn-off-vbus-in-OTG-hosts.patch43
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0002-USB-composite-avoid-inconsistent-lock-state.patch76
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0003-USB-musb-NAK-timeout-scheme-on-bulk-RX-endpoint.patch218
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0004-USB-musb-rewrite-host-periodic-endpoint-allocation.patch106
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0005-USB-TWL-disable-VUSB-regulators-when-cable-unplugg.patch181
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0006-USB-gadget-composite-device-level-suspend-resume-h.patch84
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0007-usb-gadget-fix-ethernet-link-reports-to-ethtool.patch47
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0008-usb-musb_host-minor-enqueue-locking-fix-v2.patch60
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0009-usb-musb_host-fix-ep0-fifo-flushing.patch93
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0010-musb-sanitize-clearing-TXCSR-DMA-bits-take-2.patch361
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0011-musb-fix-isochronous-TXDMA-take-2.patch417
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch56
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0013-musb_host-refactor-musb_save_toggle-take-2.patch91
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0014-musb_gadget-suppress-parasitic-TX-interrupts-with.patch32
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0015-musb_gadget-fix-unhandled-endpoint-0-IRQs.patch202
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0016-musb_host-factor-out-musb_ep_-get-set-_qh.patch146
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0017-musb_host-refactor-URB-giveback.patch132
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0018-musb-split-out-CPPI-interrupt-handler.patch167
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0019-musb_host-simplify-check-for-active-URB.patch158
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0020-musb_host-streamline-musb_cleanup_urb-calls.patch58
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0021-twl4030-usb-fix-minor-reporting-goofage.patch70
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch38
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0023-musb-add-high-bandwidth-ISO-support.patch187
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0024-USB-otg-adding-nop-usb-transceiver.patch259
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch90
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0026-musb-proper-hookup-to-transceiver-drivers.patch1109
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0027-musb-otg-timer-cleanup.patch198
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0028-musb-make-initial-HNP-roleswitch-work-v2.patch133
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/musb/0029-musb-support-disconnect-after-HNP-roleswitch.patch145
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/no-cortex-deadlock.patch77
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/no-empty-flash-warnings.patch15
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/no-harry-potter.diff11
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap-2430-lcd.patch11
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap1710h3/defconfig1224
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap2420h4/defconfig1119
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap2430sdp/defconfig1303
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap3-pandora/defconfig2186
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap3evm/defconfig2126
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap3evm/omap3evm-dss2.diff443
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap3evm/omap3evm-lcd-redtint.diff66
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omap5912osk/defconfig1098
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/omapzoom/defconfig1951
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/overo/defconfig2248
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/overo/ehci.patch113
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/read_die_ids.patch23
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/timer-suppression.patch43
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/touchscreen.patch22
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/usbttyfix.patch29
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/vfp/01-vfp-pm.patch128
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/vfp/02-vfp-ptrace.patch231
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/vfp/03-vfp-corruption.patch136
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/vfp/04-vfp-threads.patch98
-rw-r--r--recipes/linux/linux-kexecboot-2.6.29/vfp/05-vfp-signal-handlers.patch148
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch110
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch25
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch29
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch53
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch135
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch24
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch27
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch25
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/ARM-Add-support-for-LZMA-compressed-kernel-images.patch51
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/akita/defconfig1250
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/beagleboard/defconfig2922
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/c7x0/defconfig1248
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/c7x0/fix-corgi-card-detection.patch17
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-OMAP-DSS2-add-Toppoly-TDO35S-panel.patch159
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-backlight-tdo24m-ensure-chip-select-changes-between-.patch30
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-omap3-cm-t35-add-mux-initialization.patch153
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0002-omap3-cm-t35-add-DSS2-display-support.patch307
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0003-omap3-cm-t35-update-defconfig-for-DSS2.patch145
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0004-omap3-cm-t35-add-cm-t35-mux-configs.patch427
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/0006-omap3-cm-t35-update-defconfig.patch87
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/cm-t35/defconfig1823
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch254
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch343
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch186
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/dss2/0016-video-add-timings-for-hd720.patch27
-rwxr-xr-xrecipes/linux/linux-kexecboot-2.6.32/dss2/beagle-dss2-support.diff308
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/madc/0009-drivers-mfd-add-twl4030-madc-driver.patch601
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch32
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch35
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/madc/0013-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch149
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/sctp-fix.patch47
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/spitz/defconfig1250
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/usb/ehci-omap.c-mach-to-plat.diff12
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/usb/ehci.patch46
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/v3-1-4-Add-support-for-LZO-compressed-kernels.patch321
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/v3-2-4-Add-support-for-LZO-compressed-kernels-for-ARM.patch298
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/v3-3-4-Add-support-for-LZO-compressed-kernels-on-x86.patch54
-rw-r--r--recipes/linux/linux-kexecboot-2.6.32/v3-4-4-Add-LZO-compression-support-for-initramfs-and-old-style-initrd.patch114
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/ARM-Add-support-for-LZMA-compressed-kernel-images.patch51
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/akita/defconfig1354
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/c7x0/defconfig1350
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/c7x0/fix-corgi-card-detection.patch17
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/collie/defconfig1248
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/poodle/defconfig1282
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/spitz/defconfig1354
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/tosa/defconfig1334
-rw-r--r--recipes/linux/linux-kexecboot-2.6.34/use-noclone-attribute-for-naked.patch139
-rw-r--r--recipes/linux/linux-kexecboot-2.6.35/fix.module.loading.16310.patch28
-rw-r--r--recipes/linux/linux-kexecboot-2.6.35/spitz/defconfig1426
-rw-r--r--recipes/linux/linux-kexecboot.inc94
-rw-r--r--recipes/linux/linux-kexecboot/angstrom/qvga/logo_linux_clut224.ppm.bz2bin0 -> 7355 bytes
-rw-r--r--recipes/linux/linux-kexecboot/angstrom/vga/logo_linux_clut224.ppm.bz2bin0 -> 8663 bytes
-rw-r--r--recipes/linux/linux-kexecboot/fix.module.loading.16310.patch28
-rw-r--r--recipes/linux/linux-kexecboot/qvga/logo_linux_clut224.ppm.bz2bin0 -> 5547 bytes
-rw-r--r--recipes/linux/linux-kexecboot/spitz/defconfig1429
-rw-r--r--recipes/linux/linux-kexecboot/vga/logo_linux_clut224.ppm.bz2bin0 -> 6436 bytes
-rw-r--r--recipes/linux/linux-kexecboot_2.6.21-hh20.bb27
-rw-r--r--recipes/linux/linux-kexecboot_2.6.24.bb198
-rw-r--r--recipes/linux/linux-kexecboot_2.6.26.bb100
-rw-r--r--recipes/linux/linux-kexecboot_2.6.29.bb173
-rw-r--r--recipes/linux/linux-kexecboot_2.6.32.bb56
-rw-r--r--recipes/linux/linux-kexecboot_2.6.34.bb18
-rw-r--r--recipes/linux/linux-kexecboot_2.6.35.bb18
-rw-r--r--recipes/linux/linux-kexecboot_git.bb14
400 files changed, 361281 insertions, 0 deletions
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/asus620/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/asus620/defconfig
new file mode 100644
index 0000000000..8a8222abad
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/asus620/defconfig
@@ -0,0 +1,1354 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:36 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+CONFIG_MACH_A620=y
+CONFIG_A620_LCD=y
+CONFIG_A620_BUTTONS=y
+CONFIG_A620_PCMCIA=y
+CONFIG_A620_TS=y
+# CONFIG_A620_FLASHFAKE is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+# CONFIG_PXA_SSP is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_DISKONCHIP=m
+# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
+CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
+# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_RS232_SERIAL=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_ADC_BATTERY=y
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_REED_SOLOMON=m
+CONFIG_REED_SOLOMON_DEC16=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/asus730/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/asus730/defconfig
new file mode 100644
index 0000000000..6e79c0a8c4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/asus730/defconfig
@@ -0,0 +1,1475 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:37 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+CONFIG_MACH_A730=y
+# CONFIG_ASUS730_WM9712 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+CONFIG_PCMCIA_DEBUG=y
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# 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_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_PXA27x 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_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=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_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+CONFIG_SENSORS_PCA9535=y
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+# CONFIG_SND_RECON is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/aximx50/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/aximx50/defconfig
new file mode 100644
index 0000000000..9252c73382
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/aximx50/defconfig
@@ -0,0 +1,1337 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:37 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+CONFIG_MACH_X50=y
+CONFIG_X50_VGA=y
+CONFIG_X50_BUTTONS=y
+CONFIG_X50_TS=y
+CONFIG_DRAM_BASE=0xa8000000
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_PXA27x=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/eteng500/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/eteng500/defconfig
new file mode 100644
index 0000000000..30484181aa
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/eteng500/defconfig
@@ -0,0 +1,1326 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:38 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_NO_IOPORT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_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"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_CPU_S3C244X=y
+CONFIG_S3C2410_BOOT_ERROR_RESET=y
+# CONFIG_S3C2410_PM_DEBUG is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+
+#
+# S3C2400 Machines
+#
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=y
+CONFIG_S3C2410_CLOCK=y
+
+#
+# S3C2410 Machines
+#
+# CONFIG_ARCH_SMDK2410 is not set
+# CONFIG_ARCH_H1940 is not set
+CONFIG_PM_H1940=y
+# CONFIG_MACH_N30 is not set
+# CONFIG_ARCH_BAST is not set
+# CONFIG_MACH_OTOM is not set
+# CONFIG_MACH_AML_M5900 is not set
+# CONFIG_MACH_VR1000 is not set
+# CONFIG_MACH_QT2410 is not set
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_SMDK2413 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_G500=y
+
+#
+# S3C2442 Machines
+#
+# CONFIG_MACH_RX1950 is not set
+# CONFIG_MACH_HTCHERMES is not set
+# CONFIG_MACH_HTC_TRINITY is not set
+
+#
+# S3C2443 Machines
+#
+# CONFIG_MACH_SMDK2443 is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=200
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_S3C2410=m
+# CONFIG_MTD_NAND_S3C2410_DEBUG is not set
+CONFIG_MTD_NAND_S3C2410_HWECC=y
+CONFIG_MTD_NAND_S3C2410_CLKSTOP=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_S3C2410=y
+# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set
+CONFIG_TOUCHSCREEN_S3C2410_ALT=y
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_S3C2410=y
+# CONFIG_SERIAL_S3C2410_CONSOLE is not set
+CONFIG_SERIAL_CORE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_BACKLIGHT_S3C2410=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON 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_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_S3C2440=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+CONFIG_RTC_DRV_S3C=y
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+# CONFIG_DEBUG_S3C2410_PORT is not set
+CONFIG_DEBUG_S3C2410_UART=0
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/gcc4x-limits.patch b/recipes/linux/linux-kexecboot-2.6.21-hh20/gcc4x-limits.patch
new file mode 100644
index 0000000000..02f3a5da09
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/gcc4x-limits.patch
@@ -0,0 +1,10 @@
+--- linux/scripts/mod/sumversion.c.orig 2008-11-15 12:22:04.000000000 +0000
++++ linux/scripts/mod/sumversion.c 2008-11-15 12:22:21.000000000 +0000
+@@ -7,6 +7,7 @@
+ #include <ctype.h>
+ #include <errno.h>
+ #include <string.h>
++#include <linux/limits.h>
+ #include "modpost.h"
+
+ /*
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h1910/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h1910/defconfig
new file mode 100644
index 0000000000..f77e63cb7e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h1910/defconfig
@@ -0,0 +1,1407 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:38 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+CONFIG_ARCH_H1900=y
+CONFIG_IPAQ_H1900_LCD=y
+CONFIG_IPAQ_H1900_BUTTONS=y
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+# CONFIG_PXA_SSP is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_ASIC3 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_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_ASIC3 is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_H1910=m
+CONFIG_SND_PXA2xx_I2SOUND=m
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+CONFIG_SND_UDA1380=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h2200/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h2200/defconfig
new file mode 100644
index 0000000000..22e9cb3c93
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h2200/defconfig
@@ -0,0 +1,1803 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Wed Jan 28 17:24:55 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+CONFIG_DMABOUNCE=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+CONFIG_ARCH_H2200=y
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXC550 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+CONFIG_PCMCIA_DEBUG=y
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+CONFIG_PCMCIA_H2200=y
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+# CONFIG_IRNET is not set
+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 is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIUSB is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIDTL1 is not set
+# CONFIG_BT_HCIBT3C is not set
+# CONFIG_BT_HCIBLUECARD is not set
+# CONFIG_BT_HCIBTUART is not set
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_HAMCOP=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# 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_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_PCMCIA_WAVELAN is not set
+# CONFIG_PCMCIA_NETWAVE is not set
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+# CONFIG_PCMCIA_RAYCS is not set
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_HERMES=m
+CONFIG_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_USB_ZD1201=m
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+# CONFIG_ACX is not set
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_H2200=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+CONFIG_ADC_SAMCOP=y
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+CONFIG_SOC_HAMCOP=y
+CONFIG_SOC_SAMCOP_DMA=y
+# CONFIG_SOC_SAMCOP_DMA_DEBUG is not set
+CONFIG_SOC_MQ11XX=y
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_HAMCOP=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_BACKLIGHT_H2200=y
+CONFIG_LCD_H2200=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_MQ1100=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_H2200=m
+CONFIG_SND_PXA2xx_I2SOUND=m
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+CONFIG_SND_UDA1380=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+# CONFIG_USB_LIBUSUAL 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_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+# CONFIG_USB_GTCO is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET_MII=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=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_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_AIRPRIME=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_FUNSOFT=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_DEBUG=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+CONFIG_USB_PXA2XX_GPIO=y
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+CONFIG_MMC_SAMCOP=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h3600/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h3600/defconfig
new file mode 100644
index 0000000000..5f6104dad5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h3600/defconfig
@@ -0,0 +1,1324 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:39 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+# CONFIG_SA1100_COLLIE is not set
+# CONFIG_SA1100_H3100 is not set
+CONFIG_SA1100_H3600=y
+# CONFIG_SA1100_H3800 is not set
+CONFIG_SA1100_H3XXX=y
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA56X is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_JORNADA820 is not set
+# CONFIG_SA1100_XDA is not set
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+# CONFIG_H3600_SLEEVE is not set
+CONFIG_SA1100_USB=m
+# CONFIG_SA1100_USB_NETLINK is not set
+# CONFIG_SA1100_USB_CHAR is not set
+CONFIG_IPAQ_H3600_LCD=y
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_SA1110=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_MICRO=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_IPAQ_MICRO=y
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_ADC_BATTERY is not set
+CONFIG_IPAQ_MICRO_BATTERY=y
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_IPAQ_MICRO=y
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP_SA11X0 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_SA1100=y
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h3800/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h3800/defconfig
new file mode 100644
index 0000000000..27ed4f4415
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h3800/defconfig
@@ -0,0 +1,1322 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:40 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+# CONFIG_SA1100_COLLIE is not set
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+CONFIG_SA1100_H3800=y
+CONFIG_SA1100_H3XXX=y
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA56X is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_JORNADA820 is not set
+# CONFIG_SA1100_XDA is not set
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+CONFIG_SA1100_USB=m
+# CONFIG_SA1100_USB_NETLINK is not set
+# CONFIG_SA1100_USB_CHAR is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_SA1110=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_ASIC2=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ASIC2=y
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+CONFIG_ADC_ASIC2=y
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_HTC_ASIC2=y
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP_SA11X0 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_SA1100=y
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+# CONFIG_MMC_ASIC1 is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h3900/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h3900/defconfig
new file mode 100644
index 0000000000..6aee3f7cbb
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h3900/defconfig
@@ -0,0 +1,1443 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:40 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+CONFIG_MACH_H3900=y
+CONFIG_IPAQ_H3900_LCD=y
+CONFIG_IPAQ_H3900_BACKLIGHT=y
+CONFIG_IPAQ_H3900_BATTERY=y
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+# CONFIG_PXA_SSP is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_ASIC2=y
+# CONFIG_KEYBOARD_ASIC3 is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ASIC2=y
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+CONFIG_ADC_ASIC2=y
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_HTC_ASIC2=y
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_ASIC3 is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+# CONFIG_MMC_ASIC1 is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h4000/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h4000/defconfig
new file mode 100644
index 0000000000..563dccf631
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h4000/defconfig
@@ -0,0 +1,1569 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:40 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+CONFIG_MACH_H4000=y
+CONFIG_MACH_H4300=y
+CONFIG_IPAQ_H4000_LCD=y
+CONFIG_IPAQ_H4000_PCMCIA=y
+CONFIG_IPAQ_H4000_BT=m
+CONFIG_IPAQ_H4300_KBD=y
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+CONFIG_PCMCIA_DEBUG=y
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+# CONFIG_IRNET is not set
+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 is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_PXA_FICP=m
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIDTL1 is not set
+# CONFIG_BT_HCIBT3C is not set
+# CONFIG_BT_HCIBLUECARD is not set
+# CONFIG_BT_HCIBTUART is not set
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_DISKONCHIP=y
+# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
+CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
+# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_PCMCIA_WAVELAN is not set
+# CONFIG_PCMCIA_NETWAVE is not set
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+# CONFIG_PCMCIA_RAYCS is not set
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+# CONFIG_HERMES is not set
+# CONFIG_ATMEL is not set
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+# CONFIG_AIRO_CS is not set
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ACX=m
+# CONFIG_ACX_MEM is not set
+CONFIG_ACX_CS=y
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_ASIC3 is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_RS232_SERIAL=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_ADC_BATTERY=y
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_ASIC3=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_H4000=m
+CONFIG_SND_PXA2xx_I2SOUND=m
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+CONFIG_SND_UDA1380=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+CONFIG_USB_PXA2XX_GPIO=y
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_REED_SOLOMON=y
+CONFIG_REED_SOLOMON_DEC16=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/h5000/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/h5000/defconfig
new file mode 100644
index 0000000000..f4dba6c720
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/h5000/defconfig
@@ -0,0 +1,1701 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:41 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+CONFIG_DMABOUNCE=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+CONFIG_ARCH_H5400=y
+CONFIG_IPAQ_H5400_LCD=y
+CONFIG_IPAQ_H5400_BL=y
+CONFIG_IPAQ_H5400_WIFI=m
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+# CONFIG_PXA_SSP is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+# CONFIG_IRNET is not set
+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 is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIUSB is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_ACX is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+CONFIG_GPIODEV_KEYS2=y
+# CONFIG_GPIODEV_DIAGONAL 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_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_H5400_BUZZER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+CONFIG_ADC_SAMCOP=y
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+# CONFIG_IPAQ_SAMCOP_FSI is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+CONFIG_SOC_SAMCOP=y
+# CONFIG_SOC_HAMCOP is not set
+CONFIG_SOC_SAMCOP_DMA=y
+# CONFIG_SOC_SAMCOP_DMA_DEBUG is not set
+CONFIG_SOC_MQ11XX=y
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SAMCOP=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_MQ1100=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+
+#
+# SoC audio support
+#
+CONFIG_SND_SOC=m
+
+#
+# SoC Platforms
+#
+
+#
+# SoC Audio for the Atmel AT91
+#
+
+#
+# SoC Audio for the Intel PXA2xx
+#
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+# CONFIG_SND_PXA2XX_SOC_MAGICIAN is not set
+# CONFIG_SND_PXA2XX_SOC_BLUEANGEL is not set
+CONFIG_SND_PXA2XX_SOC_H5000=m
+# CONFIG_SND_PXA2XX_SOC_MIOA701 is not set
+
+#
+# SoC Audio for the Freescale i.MX
+#
+
+#
+# SoC Audio for the Samsung S3C24XX
+#
+# CONFIG_SND_SOC_AC97_CODEC is not set
+# CONFIG_SND_SOC_WM8711 is not set
+# CONFIG_SND_SOC_WM8510 is not set
+# CONFIG_SND_SOC_WM8731 is not set
+# CONFIG_SND_SOC_WM8750 is not set
+# CONFIG_SND_SOC_WM8753 is not set
+# CONFIG_SND_SOC_WM8772 is not set
+# CONFIG_SND_SOC_WM8971 is not set
+# CONFIG_SND_SOC_WM8956 is not set
+# CONFIG_SND_SOC_WM8960 is not set
+# CONFIG_SND_SOC_WM8976 is not set
+# CONFIG_SND_SOC_WM8974 is not set
+# CONFIG_SND_SOC_WM8980 is not set
+# CONFIG_SND_SOC_WM9705 is not set
+# CONFIG_SND_SOC_WM9713 is not set
+# CONFIG_SND_SOC_WM9712 is not set
+# CONFIG_SND_SOC_UDA1380 is not set
+CONFIG_SND_SOC_AK4535=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_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
+
+#
+# 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 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_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+# CONFIG_USB_GTCO is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+CONFIG_MMC_SAMCOP=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcalpine/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcalpine/defconfig
new file mode 100644
index 0000000000..a0693f3a53
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcalpine/defconfig
@@ -0,0 +1,1347 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:42 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_MACH_HTCALPINE=y
+CONFIG_HTCALPINE_CPLD=y
+CONFIG_HTCALPINE_PHONE=m
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcapache/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcapache/defconfig
new file mode 100644
index 0000000000..86b275b5ef
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcapache/defconfig
@@ -0,0 +1,1437 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:43 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_BOARD_IRQ_MAP_SMALL=y
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+CONFIG_MACH_HTCAPACHE=y
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
+CONFIG_PXA27x_VOLTAGE=y
+CONFIG_PXA27x_VOLTAGE_MAX158xx=y
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ACX=m
+CONFIG_ACX_MEM=y
+# CONFIG_ACX_CS is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS=y
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_PXA27x=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+CONFIG_ADC_AD7877=y
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+CONFIG_HTC_EGPIO=y
+CONFIG_HTC_BBKEYS=y
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_GPIO=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_HTCAPACHE=m
+CONFIG_SND_PXA2xx_I2SOUND=m
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+CONFIG_SND_AK4641=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+CONFIG_RTC_DRV_PCF8563=m
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcbeetles/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcbeetles/defconfig
new file mode 100644
index 0000000000..0755cb2681
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcbeetles/defconfig
@@ -0,0 +1,1354 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:43 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+CONFIG_MACH_HTCBEETLES=y
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_HTCSABLE_LCD is not set
+# CONFIG_HTCSABLE_BACKLIGHT is not set
+# CONFIG_HTCSABLE_ROM is not set
+# CONFIG_HTCSABLE_BT is not set
+# CONFIG_HTCSABLE_PHONE is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_ASIC3 is not set
+CONFIG_KEYBOARD_PXA27x=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_ASIC3 is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+# CONFIG_MMC_ASIC3 is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcblueangel/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcblueangel/defconfig
new file mode 100644
index 0000000000..233a9665a4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcblueangel/defconfig
@@ -0,0 +1,1590 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:43 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+CONFIG_MACH_BLUEANGEL=y
+CONFIG_MACH_BLUEANGEL_LCD=y
+CONFIG_MACH_BLUEANGEL_BACKLIGHT=y
+CONFIG_MACH_BLUEANGEL_DS1WM=y
+CONFIG_MACH_BLUEANGEL_PCMCIA=y
+CONFIG_MACH_BLUEANGEL_SUSPEND=y
+CONFIG_MACH_BLUEANGEL_LEDS=y
+CONFIG_MACH_BLUEANGEL_ASIC3_LEDS=y
+CONFIG_MACH_BLUEANGEL_KEYPAD=y
+CONFIG_MACH_BLUEANGEL_POWER=y
+CONFIG_MACH_BLUEANGEL_ROM=y
+CONFIG_MACH_BLUEANGEL_DPRAM=y
+CONFIG_MACH_BLUEANGEL_PHONE=m
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+CONFIG_PXA26x=y
+CONFIG_PXA_SSP=y
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+CONFIG_PCMCIA_DEBUG=y
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIDTL1 is not set
+# CONFIG_BT_HCIBT3C is not set
+# CONFIG_BT_HCIBLUECARD is not set
+# CONFIG_BT_HCIBTUART is not set
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=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=m
+# CONFIG_MTD_CFI_AMDSTD is not set
+# 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
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_PCMCIA_WAVELAN is not set
+# CONFIG_PCMCIA_NETWAVE is not set
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+# CONFIG_PCMCIA_RAYCS is not set
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+# CONFIG_HERMES is not set
+# CONFIG_ATMEL is not set
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+# CONFIG_AIRO_CS is not set
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ACX=m
+# CONFIG_ACX_MEM is not set
+CONFIG_ACX_CS=y
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_ASIC3=y
+CONFIG_KEYBOARD_TSC2200=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_TSC2200=y
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+CONFIG_TIHTC=m
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+CONFIG_ADC_TSC2200_SSP=y
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+CONFIG_SOC_TSC2200=y
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_ASIC3=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# SoC audio support
+#
+CONFIG_SND_SOC=m
+
+#
+# SoC Platforms
+#
+
+#
+# SoC Audio for the Atmel AT91
+#
+
+#
+# SoC Audio for the Intel PXA2xx
+#
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_SSP=m
+# CONFIG_SND_PXA2XX_SOC_MAGICIAN is not set
+CONFIG_SND_PXA2XX_SOC_BLUEANGEL=m
+# CONFIG_SND_PXA2XX_SOC_H5000 is not set
+# CONFIG_SND_PXA2XX_SOC_MIOA701 is not set
+
+#
+# SoC Audio for the Freescale i.MX
+#
+
+#
+# SoC Audio for the Samsung S3C24XX
+#
+# CONFIG_SND_SOC_AC97_CODEC is not set
+# CONFIG_SND_SOC_WM8711 is not set
+# CONFIG_SND_SOC_WM8510 is not set
+# CONFIG_SND_SOC_WM8731 is not set
+# CONFIG_SND_SOC_WM8750 is not set
+# CONFIG_SND_SOC_WM8753 is not set
+# CONFIG_SND_SOC_WM8772 is not set
+# CONFIG_SND_SOC_WM8971 is not set
+# CONFIG_SND_SOC_WM8956 is not set
+# CONFIG_SND_SOC_WM8960 is not set
+# CONFIG_SND_SOC_WM8976 is not set
+# CONFIG_SND_SOC_WM8974 is not set
+# CONFIG_SND_SOC_WM8980 is not set
+# CONFIG_SND_SOC_WM9705 is not set
+# CONFIG_SND_SOC_WM9713 is not set
+# CONFIG_SND_SOC_WM9712 is not set
+CONFIG_SND_SOC_UDA1380=m
+# CONFIG_SND_SOC_AK4535 is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+CONFIG_USB_PXA2XX_GPIO=y
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=m
+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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htchimalaya/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htchimalaya/defconfig
new file mode 100644
index 0000000000..b2a461f026
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htchimalaya/defconfig
@@ -0,0 +1,1350 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:44 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+CONFIG_MACH_HIMALAYA=y
+# CONFIG_MACH_HIMALAYA_ASIC3 is not set
+# CONFIG_MACH_HIMALAYA_ROM is not set
+# CONFIG_HIMALAYA_LEDS is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+CONFIG_PXA26x=y
+# CONFIG_PXA_SSP is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_ASIC3 is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_ASIC3 is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+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_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_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+# CONFIG_MMC_ASIC3 is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcsable/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcsable/defconfig
new file mode 100644
index 0000000000..0eccbe2a67
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcsable/defconfig
@@ -0,0 +1,1465 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:44 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+CONFIG_MACH_HW6900=y
+CONFIG_HTCSABLE_LCD=y
+CONFIG_HTCSABLE_BACKLIGHT=y
+# CONFIG_HTCSABLE_ROM is not set
+# CONFIG_HTCSABLE_BT is not set
+# CONFIG_HTCSABLE_PHONE is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=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 is not set
+# CONFIG_MTD_CFI_STAA is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ACX=m
+CONFIG_ACX_MEM=y
+# CONFIG_ACX_CS is not set
+CONFIG_ACX_HTCSABLE=m
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_ASIC3 is not set
+CONFIG_KEYBOARD_PXA27x=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+# CONFIG_POWER_SUPPLY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_ASIC3 is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_HTCSABLE=m
+CONFIG_SND_PXA2xx_I2SOUND=m
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+CONFIG_SND_AK4641=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=m
+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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcuniversal/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcuniversal/defconfig
new file mode 100644
index 0000000000..8ceed2bcf9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcuniversal/defconfig
@@ -0,0 +1,1471 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:45 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+CONFIG_MACH_HTCUNIVERSAL=y
+CONFIG_HTCUNIVERSAL_CORE=y
+CONFIG_HTCUNIVERSAL_UDC=y
+CONFIG_HTCUNIVERSAL_POWER=y
+CONFIG_HTCUNIVERSAL_BACKLIGHT=y
+CONFIG_HTCUNIVERSAL_LCD=y
+CONFIG_HTCUNIVERSAL_TS2=m
+CONFIG_HTCUNIVERSAL_BUTTONS=y
+CONFIG_HTCUNIVERSAL_BLUETOOTH=m
+CONFIG_HTCUNIVERSAL_ASIC3_LEDS=y
+CONFIG_HTCUNIVERSAL_PHONE=m
+# CONFIG_HTCUNIVERSAL_MDOC_G3 is not set
+CONFIG_HTCUNIVERSAL_AK4641=m
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ACX=m
+CONFIG_ACX_MEM=y
+# CONFIG_ACX_CS is not set
+CONFIG_ACX_HTCUNIVERSAL=m
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_ASIC3=y
+CONFIG_KEYBOARD_PXA27x=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=m
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+CONFIG_HTC_ASIC3_DS1WM=y
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_ASIC3=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_HTCUNIVERSAL=m
+CONFIG_SND_PXA2xx_I2SOUND=m
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/htcwallaby/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcwallaby/defconfig
new file mode 100644
index 0000000000..bee3188c64
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/htcwallaby/defconfig
@@ -0,0 +1,1322 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:45 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+# CONFIG_SA1100_COLLIE is not set
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_H3800 is not set
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA56X is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_JORNADA820 is not set
+CONFIG_SA1100_XDA=y
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+CONFIG_SA1100_USB=m
+# CONFIG_SA1100_USB_NETLINK is not set
+# CONFIG_SA1100_USB_CHAR is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_SA1110=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=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 is not set
+# CONFIG_MTD_CFI_STAA is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP_SA11X0 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_SA1100=y
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=m
+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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/hx4700/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/hx4700/defconfig
new file mode 100644
index 0000000000..d573ed3ea0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/hx4700/defconfig
@@ -0,0 +1,1487 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Fri Jan 30 11:53:32 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_LSF=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+CONFIG_MACH_H4700=y
+CONFIG_HX4700_NAVPOINT=y
+CONFIG_HX4700_CORE=y
+# CONFIG_HX4700_BLUETOOTH is not set
+CONFIG_HX4700_PCMCIA=y
+CONFIG_HX4700_LCD=y
+CONFIG_HX4700_LEDS=y
+CONFIG_HX4700_POWER2=y
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X30 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXC550 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SUSPEND_SAVE_EXTRA_REGS=y
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+CONFIG_PCMCIA_DEBUG=y
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE 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_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES 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=y
+# 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_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF 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=y
+CONFIG_INET6_XFRM_MODE_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_BEET=y
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# 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_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_PCMCIA_WAVELAN is not set
+# CONFIG_PCMCIA_NETWAVE is not set
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+# CONFIG_PCMCIA_RAYCS is not set
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+# CONFIG_HERMES is not set
+# CONFIG_ATMEL is not set
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+# CONFIG_AIRO_CS is not set
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_ACX is not set
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+# CONFIG_PCMCIA_PCNET is not set
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV 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
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_ASIC3 is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+CONFIG_MOUSE_NAVPOINT=y
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_UINPUT 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=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_RS232_SERIAL=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS1WM is not set
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+CONFIG_ADC_BATTERY=y
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_HTC_PASIC3 is not set
+CONFIG_HTC_EGPIO=y
+# CONFIG_HTC_BBKEYS is not set
+CONFIG_HTC_ASIC3_DS1WM=y
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_ASIC3=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DYNAMIC_MINORS=y
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG 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=y
+CONFIG_USB_SL811_CS=y
+
+#
+# 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 Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+# CONFIG_USB_GTCO is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=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_CHAR is not set
+CONFIG_USB_PXA2XX_GPIO=y
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_PXA is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=y
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_SECURITY is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=y
+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_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=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+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 is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=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 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
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=y
+CONFIG_NLS_ISO8859_3=y
+CONFIG_NLS_ISO8859_4=y
+CONFIG_NLS_ISO8859_5=y
+CONFIG_NLS_ISO8859_6=y
+CONFIG_NLS_ISO8859_7=y
+CONFIG_NLS_ISO8859_9=y
+CONFIG_NLS_ISO8859_13=y
+CONFIG_NLS_ISO8859_14=y
+CONFIG_NLS_ISO8859_15=y
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_USER=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_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=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_LRW 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
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch b/recipes/linux/linux-kexecboot-2.6.21-hh20/linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch
new file mode 100644
index 0000000000..f3c27d33a8
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch
@@ -0,0 +1,144 @@
+From: Bill Gatliff <bgat@billgatliff.com>
+Date: Thu, 31 May 2007 21:02:22 +0000 (+0100)
+Subject: [ARM] 4423/1: add ATAGS support
+X-Git-Tag: v2.6.23-rc1~1101^2^7~5
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a
+
+[ARM] 4423/1: add ATAGS support
+
+Examines the ATAGS pointer (r2) at boot, and interprets
+a nonzero value as a reference to an ATAGS structure. A
+suitable ATAGS structure replaces the kernel's command line.
+
+Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+
+diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
+index a52da0d..024a9cf 100644
+--- a/arch/arm/kernel/head-common.S
++++ b/arch/arm/kernel/head-common.S
+@@ -20,7 +20,8 @@ __switch_data:
+ .long _end @ r7
+ .long processor_id @ r4
+ .long __machine_arch_type @ r5
+- .long cr_alignment @ r6
++ .long __atags_pointer @ r6
++ .long cr_alignment @ r7
+ .long init_thread_union + THREAD_START_SP @ sp
+
+ /*
+@@ -29,6 +30,7 @@ __switch_data:
+ *
+ * r0 = cp#15 control register
+ * r1 = machine ID
++ * r2 = atags pointer
+ * r9 = processor ID
+ */
+ .type __mmap_switched, %function
+@@ -47,11 +49,12 @@ __mmap_switched:
+ strcc fp, [r6],#4
+ bcc 1b
+
+- ldmia r3, {r4, r5, r6, sp}
++ ldmia r3, {r4, r5, r6, r7, sp}
+ str r9, [r4] @ Save processor ID
+ str r1, [r5] @ Save machine type
++ str r2, [r6] @ Save atags pointer
+ bic r4, r0, #CR_A @ Clear 'A' bit
+- stmia r6, {r0, r4} @ Save control register values
++ stmia r7, {r0, r4} @ Save control register values
+ b start_kernel
+
+ /*
+@@ -215,3 +218,34 @@ ENTRY(lookup_machine_type)
+ bl __lookup_machine_type
+ mov r0, r5
+ ldmfd sp!, {r4 - r6, pc}
++
++/* Determine validity of the r2 atags pointer. The heuristic requires
++ * that the pointer be aligned, in the first 16k of physical RAM and
++ * that the ATAG_CORE marker is first and present. Future revisions
++ * of this function may be more lenient with the physical address and
++ * may also be able to move the ATAGS block if necessary.
++ *
++ * r8 = machinfo
++ *
++ * Returns:
++ * r2 either valid atags pointer, or zero
++ * r5, r6 corrupted
++ */
++
++ .type __vet_atags, %function
++__vet_atags:
++ tst r2, #0x3 @ aligned?
++ bne 1f
++
++ ldr r5, [r2, #0] @ is first tag ATAG_CORE?
++ subs r5, r5, #ATAG_CORE_SIZE
++ bne 1f
++ ldr r5, [r2, #4]
++ ldr r6, =ATAG_CORE
++ cmp r5, r6
++ bne 1f
++
++ mov pc, lr @ atag pointer is ok
++
++1: mov r2, #0
++ mov pc, lr
+diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
+index 41f98b4..7898cbc 100644
+--- a/arch/arm/kernel/head.S
++++ b/arch/arm/kernel/head.S
+@@ -29,6 +29,10 @@
+ #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)
+ #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)
+
++#define ATAG_CORE 0x54410001
++#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
++
++
+ /*
+ * swapper_pg_dir is the virtual address of the initial page table.
+ * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must
+@@ -61,7 +65,7 @@
+ *
+ * This is normally called from the decompressor code. The requirements
+ * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
+- * r1 = machine nr.
++ * r1 = machine nr, r2 = atags pointer.
+ *
+ * This code is mostly position independent, so if you link the kernel at
+ * 0xc0008000, you call this at __pa(0xc0008000).
+@@ -85,6 +89,7 @@ ENTRY(stext)
+ bl __lookup_machine_type @ r5=machinfo
+ movs r8, r5 @ invalid machine (r5=0)?
+ beq __error_a @ yes, error 'a'
++ bl __vet_atags
+ bl __create_page_tables
+
+ /*
+diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
+index 650eac1..5be2e98 100644
+--- a/arch/arm/kernel/setup.c
++++ b/arch/arm/kernel/setup.c
+@@ -63,6 +63,8 @@ unsigned int processor_id;
+ unsigned int __machine_arch_type;
+ EXPORT_SYMBOL(__machine_arch_type);
+
++unsigned int __atags_pointer __initdata;
++
+ unsigned int system_rev;
+ EXPORT_SYMBOL(system_rev);
+
+@@ -780,7 +782,9 @@ void __init setup_arch(char **cmdline_p)
+ if (mdesc->soft_reboot)
+ reboot_setup("s");
+
+- if (mdesc->boot_params)
++ if (__atags_pointer)
++ tags = phys_to_virt(__atags_pointer);
++ else if (mdesc->boot_params)
+ tags = phys_to_virt(mdesc->boot_params);
+
+ /*
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/looxc550/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/looxc550/defconfig
new file mode 100644
index 0000000000..7b6cef9d9f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/looxc550/defconfig
@@ -0,0 +1,1351 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:46 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_LOOXN560_SOUND is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+CONFIG_MACH_LOOXN560=y
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+# CONFIG_PXA_SSP is not set
+# CONFIG_PXA27x_VOLTAGE is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=y
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_ADC_BATTERY=y
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=y
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+CONFIG_HTC_EGPIO=y
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/magician/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/magician/defconfig
new file mode 100644
index 0000000000..1f4467cfa0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/magician/defconfig
@@ -0,0 +1,1679 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:42 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_BOARD_IRQ_MAP_SMALL=y
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_TOSHIBA_TMIO_OHCI is not set
+# CONFIG_ARCH_ESERIES is not set
+# CONFIG_MACH_A620 is not set
+# CONFIG_MACH_A716 is not set
+# CONFIG_MACH_A730 is not set
+# CONFIG_ARCH_H1900 is not set
+# CONFIG_ARCH_H2200 is not set
+# CONFIG_MACH_H3900 is not set
+# CONFIG_MACH_H4000 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_ARCH_H5400 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_HTCALPINE is not set
+CONFIG_MACH_MAGICIAN=y
+CONFIG_MAGICIAN_PM=y
+CONFIG_MAGICIAN_TS=m
+CONFIG_MAGICIAN_LCD=y
+CONFIG_MAGICIAN_PHONE=m
+# CONFIG_MACH_HTCAPACHE is not set
+# CONFIG_MACH_BLUEANGEL is not set
+
+#
+# HTC_HW6X00
+#
+# CONFIG_MACH_HTCBEETLES is not set
+# CONFIG_MACH_HW6900 is not set
+# CONFIG_MACH_HTCATHENA is not set
+# CONFIG_ARCH_AXIMX3 is not set
+# CONFIG_ARCH_AXIMX5 is not set
+# CONFIG_MACH_X50 is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_ARCH_ROVERP1 is not set
+# CONFIG_ARCH_ROVERP5P is not set
+# CONFIG_MACH_XSCALE_PALMLD is not set
+# CONFIG_MACH_T3XSCALE is not set
+# CONFIG_MACH_RECON is not set
+# CONFIG_MACH_GHI270HG is not set
+# CONFIG_MACH_GHI270 is not set
+# CONFIG_MACH_LOOXN560 is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=m
+CONFIG_PXA_SUSPEND_SAVE_EXTRA_REGS=y
+CONFIG_PXA27x_VOLTAGE=m
+CONFIG_PXA27x_VOLTAGE_MAX158xx=m
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=m
+CONFIG_PXA25x_ALTERNATE_FREQS=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+# CONFIG_IRNET is not set
+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 is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=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
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IPAQ is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# 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 is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ADC=m
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+# CONFIG_SERIAL_PXA_CONSOLE is not set
+CONFIG_SERIAL_PXA_COUNT=4
+CONFIG_SERIAL_PXA_IR=y
+CONFIG_SERIAL_CORE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_SA1100_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+CONFIG_TIHTC=m
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+CONFIG_ADC_BATTERY=y
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+CONFIG_ADC_ADS7846_SSP=m
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+CONFIG_HTC_PASIC3=y
+CONFIG_HTC_EGPIO=y
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_T7L66XB is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TC6393XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_PASIC3=y
+CONFIG_LEDS_GPIO=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HWTIMER=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_RECON is not set
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+
+#
+# SoC audio support
+#
+CONFIG_SND_SOC=m
+
+#
+# SoC Platforms
+#
+
+#
+# SoC Audio for the Atmel AT91
+#
+
+#
+# SoC Audio for the Intel PXA2xx
+#
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_SSP=m
+CONFIG_SND_PXA2XX_SOC_MAGICIAN=m
+# CONFIG_SND_PXA2XX_SOC_BLUEANGEL is not set
+# CONFIG_SND_PXA2XX_SOC_H5000 is not set
+# CONFIG_SND_PXA2XX_SOC_MIOA701 is not set
+
+#
+# SoC Audio for the Freescale i.MX
+#
+
+#
+# SoC Audio for the Samsung S3C24XX
+#
+# CONFIG_SND_SOC_AC97_CODEC is not set
+# CONFIG_SND_SOC_WM8711 is not set
+# CONFIG_SND_SOC_WM8510 is not set
+# CONFIG_SND_SOC_WM8731 is not set
+# CONFIG_SND_SOC_WM8750 is not set
+# CONFIG_SND_SOC_WM8753 is not set
+# CONFIG_SND_SOC_WM8772 is not set
+# CONFIG_SND_SOC_WM8971 is not set
+# CONFIG_SND_SOC_WM8956 is not set
+# CONFIG_SND_SOC_WM8960 is not set
+# CONFIG_SND_SOC_WM8976 is not set
+# CONFIG_SND_SOC_WM8974 is not set
+# CONFIG_SND_SOC_WM8980 is not set
+# CONFIG_SND_SOC_WM9705 is not set
+# CONFIG_SND_SOC_WM9713 is not set
+# CONFIG_SND_SOC_WM9712 is not set
+CONFIG_SND_SOC_UDA1380=m
+# CONFIG_SND_SOC_AK4535 is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_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
+
+#
+# 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 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_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+# CONFIG_USB_GTCO is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA27X_DMA is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+# CONFIG_USB_PXA2XX_GPIO is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_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=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/rx1950/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/rx1950/defconfig
new file mode 100644
index 0000000000..fc4388ebed
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/rx1950/defconfig
@@ -0,0 +1,1383 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:46 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_NO_IOPORT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_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"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+# CONFIG_BOARD_IRQ_MAP_BIG is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_CPU_S3C244X=y
+# CONFIG_S3C2410_BOOT_ERROR_RESET is not set
+# CONFIG_S3C2410_PM_DEBUG is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+
+#
+# S3C2400 Machines
+#
+CONFIG_CPU_S3C2410_DMA=y
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=y
+CONFIG_S3C2410_CLOCK=y
+
+#
+# S3C2410 Machines
+#
+# CONFIG_ARCH_SMDK2410 is not set
+# CONFIG_ARCH_H1940 is not set
+CONFIG_PM_H1940=y
+# CONFIG_MACH_N30 is not set
+# CONFIG_ARCH_BAST is not set
+# CONFIG_MACH_OTOM is not set
+# CONFIG_MACH_AML_M5900 is not set
+# CONFIG_MACH_VR1000 is not set
+# CONFIG_MACH_QT2410 is not set
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_SMDK2413 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_G500 is not set
+CONFIG_CPU_S3C2442=y
+
+#
+# S3C2442 Machines
+#
+CONFIG_MACH_RX1950=y
+# CONFIG_MACH_HTCHERMES is not set
+# CONFIG_MACH_HTC_TRINITY is not set
+
+#
+# S3C2443 Machines
+#
+# CONFIG_MACH_SMDK2443 is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=200
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+# CONFIG_TXTOFFSET_DELTA is not set
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_PARTITIONS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=m
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND_IDS=m
+CONFIG_MTD_NAND_S3C2410=m
+# 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
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_TSDEV=y
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_S3C2410=y
+CONFIG_TOUCHSCREEN_S3C2410_DEBUG=y
+CONFIG_TOUCHSCREEN_S3C2410_ALT=y
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_S3C2410=y
+CONFIG_SERIAL_S3C2410_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_BACKLIGHT_S3C2410=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON 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_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_S3C2410 is not set
+
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_S3C2440=y
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+CONFIG_RTC_DRV_S3C=y
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+CONFIG_DEBUG_S3C2410_PORT=y
+CONFIG_DEBUG_S3C2410_UART=0
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
diff --git a/recipes/linux/linux-kexecboot-2.6.21-hh20/rx3000/defconfig b/recipes/linux/linux-kexecboot-2.6.21-hh20/rx3000/defconfig
new file mode 100644
index 0000000000..582be18242
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.21-hh20/rx3000/defconfig
@@ -0,0 +1,1507 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-hh20
+# Tue Dec 2 15:36:46 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_NO_IOPORT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_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"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+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=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_BOARD_IRQ_MAP_SMALL is not set
+CONFIG_BOARD_IRQ_MAP_BIG=y
+CONFIG_PLAT_S3C24XX=y
+CONFIG_CPU_S3C244X=y
+CONFIG_S3C2410_BOOT_ERROR_RESET=y
+# CONFIG_S3C2410_PM_DEBUG is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C2410_LOWLEVEL_UART_PORT=2
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+
+#
+# S3C2400 Machines
+#
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=y
+CONFIG_S3C2410_CLOCK=y
+
+#
+# S3C2410 Machines
+#
+# CONFIG_ARCH_SMDK2410 is not set
+# CONFIG_ARCH_H1940 is not set
+CONFIG_PM_H1940=y
+# CONFIG_MACH_N30 is not set
+# CONFIG_ARCH_BAST is not set
+# CONFIG_MACH_OTOM is not set
+# CONFIG_MACH_AML_M5900 is not set
+# CONFIG_MACH_VR1000 is not set
+# CONFIG_MACH_QT2410 is not set
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_SMDK2413 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=y
+CONFIG_RX3000_BACKLIGHT=y
+CONFIG_RX3000_LEDS=y
+CONFIG_RX3000_BATTERY=y
+CONFIG_RX3000_BLUETOOTH=m
+CONFIG_RX3000_BUTTONS=y
+CONFIG_RX3000_SERIAL=y
+CONFIG_RX3000_TS=y
+CONFIG_RX3000_UDC=m
+# CONFIG_ARCH_S3C2440 is not set
+# CONFIG_MACH_NEXCODER_2440 is not set
+# CONFIG_MACH_G500 is not set
+
+#
+# S3C2442 Machines
+#
+# CONFIG_MACH_RX1950 is not set
+# CONFIG_MACH_HTCHERMES is not set
+# CONFIG_MACH_HTC_TRINITY is not set
+
+#
+# S3C2443 Machines
+#
+# CONFIG_MACH_SMDK2443 is not set
+
+#
+# Linux As Bootloader
+#
+# CONFIG_LAB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=200
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="keepinitrd"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_TXTOFFSET_DELTA=y
+CONFIG_TXTOFFSET_DELTA_VALUE=0x00090000
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_DPM_DEBUG=y
+CONFIG_PM_SYSFS_DEPRECATED=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_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
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_TOS is not set
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+CONFIG_IP_NF_RAW=m
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+# CONFIG_IP6_NF_MATCH_RT is not set
+# CONFIG_IP6_NF_MATCH_OPTS is not set
+# CONFIG_IP6_NF_MATCH_FRAG is not set
+# CONFIG_IP6_NF_MATCH_HL is not set
+# CONFIG_IP6_NF_MATCH_OWNER is not set
+# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
+# CONFIG_IP6_NF_MATCH_AH is not set
+# CONFIG_IP6_NF_MATCH_MH is not set
+# CONFIG_IP6_NF_MATCH_EUI64 is not set
+# CONFIG_IP6_NF_FILTER is not set
+# CONFIG_IP6_NF_MANGLE is not set
+# CONFIG_IP6_NF_RAW is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=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_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+# CONFIG_IEEE80211_CRYPT_WEP is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=0
+CONFIG_MTDRAM_ERASE_SIZE=256
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC 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=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ACX=m
+CONFIG_ACX_MEM=y
+# CONFIG_ACX_CS is not set
+CONFIG_ACX_RX3000=m
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_LED_TRIGGER 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_GPIODEV_KEYS is not set
+# CONFIG_GPIODEV_KEYS2 is not set
+# CONFIG_GPIODEV_DIAGONAL is not set
+CONFIG_KEYBOARD_ASIC3=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_NAVPOINT is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_S3C2410=y
+# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set
+# CONFIG_TOUCHSCREEN_S3C2410_ALT is not set
+# CONFIG_TOUCHSCREEN_ADC is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_S3C2410=y
+CONFIG_SERIAL_S3C2410_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_RS232_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_TIHTC is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+# 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_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+CONFIG_I2C_S3C2410=m
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCA9535 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_ADC_BATTERY is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_ADC=y
+# CONFIG_ADC_ADS7846_SSP is not set
+# CONFIG_ADC_TSC2200_SSP is not set
+# CONFIG_ADC_AD7877 is not set
+
+#
+# Compaq/iPAQ Drivers
+#
+
+#
+# Compaq/HP iPAQ Drivers
+#
+# CONFIG_IPAQ_SLEEVE is not set
+# CONFIG_SLEEVE_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC2 is not set
+CONFIG_HTC_ASIC3=y
+# CONFIG_ATI_W228x is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_BBKEYS is not set
+CONFIG_HTC_ASIC3_DS1WM=y
+# CONFIG_SOC_SAMCOP is not set
+# CONFIG_SOC_HAMCOP is not set
+# CONFIG_SOC_MQ11XX is not set
+# CONFIG_SOC_TC6387XB is not set
+# CONFIG_SOC_TSC2101 is not set
+# CONFIG_SOC_TSC2200 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_S3C24XX is not set
+CONFIG_LEDS_ASIC3=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HWTIMER is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_LEDS_TRIGGER_SHARED=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+CONFIG_BACKLIGHT_S3C2410=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_IMAGEON 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_VSFB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_S3C2410 is not set
+
+#
+# SoC audio support
+#
+CONFIG_SND_SOC=m
+
+#
+# SoC Platforms
+#
+
+#
+# SoC Audio for the Atmel AT91
+#
+
+#
+# SoC Audio for the Intel PXA2xx
+#
+
+#
+# SoC Audio for the Freescale i.MX
+#
+
+#
+# SoC Audio for the Samsung S3C24XX
+#
+CONFIG_SND_S3C24XX_SOC=m
+CONFIG_SND_S3C24XX_SOC_I2S=m
+CONFIG_SND_S3C24XX_SOC_RX3000=m
+# CONFIG_SND_SOC_AC97_CODEC is not set
+# CONFIG_SND_SOC_WM8711 is not set
+# CONFIG_SND_SOC_WM8510 is not set
+# CONFIG_SND_SOC_WM8731 is not set
+# CONFIG_SND_SOC_WM8750 is not set
+# CONFIG_SND_SOC_WM8753 is not set
+# CONFIG_SND_SOC_WM8772 is not set
+# CONFIG_SND_SOC_WM8971 is not set
+# CONFIG_SND_SOC_WM8956 is not set
+# CONFIG_SND_SOC_WM8960 is not set
+# CONFIG_SND_SOC_WM8976 is not set
+# CONFIG_SND_SOC_WM8974 is not set
+# CONFIG_SND_SOC_WM8980 is not set
+# CONFIG_SND_SOC_WM9705 is not set
+# CONFIG_SND_SOC_WM9713 is not set
+# CONFIG_SND_SOC_WM9712 is not set
+CONFIG_SND_SOC_UDA1380=m
+# CONFIG_SND_SOC_AK4535 is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_MQ11XX is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=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_CHAR is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_S3C2440 is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MMC_SAMCOP is not set
+CONFIG_MMC_ASIC3=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+CONFIG_RTC_DRV_S3C=y
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 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_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+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_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# 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=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+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=m
+# 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=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_DETECT_SOFTLOCKUP=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_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+# CONFIG_DEBUG_S3C2410_PORT is not set
+CONFIG_DEBUG_S3C2410_UART=2
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
diff --git a/recipes/linux/linux-kexecboot-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/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/linux/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/linux/linux-kexecboot-2.6.24/80-kexec-atags.patch b/recipes/linux/linux-kexecboot-2.6.24/80-kexec-atags.patch
new file mode 100644
index 0000000000..bf97f2105b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/80-kexec-atags.patch
@@ -0,0 +1,111 @@
+--- linux-2.6.21.5/arch/arm/kernel/setup.c.orig 2007-06-30 16:39:38.000000000 -0500
++++ linux-2.6.21.5/arch/arm/kernel/setup.c 2007-06-30 19:02:51.000000000 -0500
+@@ -23,6 +23,7 @@
+ #include <linux/cpu.h>
+ #include <linux/interrupt.h>
+ #include <linux/smp.h>
++#include <linux/kexec.h>
+
+ #include <asm/cpu.h>
+ #include <asm/elf.h>
+@@ -767,6 +768,23 @@
+ }
+ arch_initcall(customize_machine);
+
++#ifdef CONFIG_KEXEC
++
++/* Physical addr of where the boot params should be for this machine */
++extern unsigned long kexec_boot_params_address;
++
++/* Physical addr of the buffer into which the boot params are copied */
++extern unsigned long kexec_boot_params_copy;
++
++/* Pointer to the boot params buffer, for manipulation and display */
++unsigned long kexec_boot_params;
++EXPORT_SYMBOL(kexec_boot_params);
++
++/* The buffer itself - make sure it is sized correctly */
++static unsigned long kexec_boot_params_buf[(KEXEC_BOOT_PARAMS_SIZE + 3) / 4];
++
++#endif
++
+ void __init setup_arch(char **cmdline_p)
+ {
+ struct tag *tags = (struct tag *)&init_tags;
+@@ -783,6 +801,13 @@
+ if (mdesc->boot_params)
+ tags = phys_to_virt(mdesc->boot_params);
+
++#ifdef CONFIG_KEXEC
++ kexec_boot_params_address = mdesc->boot_params;
++ kexec_boot_params_copy = virt_to_phys(kexec_boot_params_buf);
++ kexec_boot_params = (unsigned long)kexec_boot_params_buf;
++ if (mdesc->boot_params)
++ memcpy((void *)kexec_boot_params, tags, KEXEC_BOOT_PARAMS_SIZE);
++#endif
+ /*
+ * If we have the old style parameters, convert them to
+ * a tag list.
+--- linux-2.6.21.5/arch/arm/kernel/relocate_kernel.S.orig 2007-06-30 16:39:28.000000000 -0500
++++ linux-2.6.21.5/arch/arm/kernel/relocate_kernel.S 2007-06-30 19:10:32.000000000 -0500
+@@ -7,6 +7,23 @@
+ .globl relocate_new_kernel
+ relocate_new_kernel:
+
++ /* Move boot params back to where the kernel expects them */
++
++ ldr r0,kexec_boot_params_address
++ teq r0,#0
++ beq 8f
++
++ ldr r1,kexec_boot_params_copy
++ mov r6,#KEXEC_BOOT_PARAMS_SIZE/4
++7:
++ ldr r5,[r1],#4
++ str r5,[r0],#4
++ subs r6,r6,#1
++ bne 7b
++
++8:
++ /* Boot params moved, now go on with the kernel */
++
+ ldr r0,kexec_indirection_page
+ ldr r1,kexec_start_address
+
+@@ -50,7 +67,7 @@
+ mov lr,r1
+ mov r0,#0
+ ldr r1,kexec_mach_type
+- mov r2,#0
++ ldr r2,kexec_boot_params_address
+ mov pc,lr
+
+ .globl kexec_start_address
+@@ -65,6 +82,16 @@
+ kexec_mach_type:
+ .long 0x0
+
++ /* phy addr where new kernel will expect to find boot params */
++ .globl kexec_boot_params_address
++kexec_boot_params_address:
++ .long 0x0
++
++ /* phy addr where old kernel put a copy of orig boot params */
++ .globl kexec_boot_params_copy
++kexec_boot_params_copy:
++ .long 0x0
++
+ relocate_new_kernel_end:
+
+ .globl relocate_new_kernel_size
+--- linux-2.6.21.5/include/asm-arm/kexec.h.orig 2007-06-30 16:41:17.000000000 -0500
++++ linux-2.6.21.5/include/asm-arm/kexec.h 2007-06-30 19:11:22.000000000 -0500
+@@ -14,6 +14,8 @@
+
+ #define KEXEC_ARCH KEXEC_ARCH_ARM
+
++#define KEXEC_BOOT_PARAMS_SIZE 1536
++
+ #ifndef __ASSEMBLY__
+
+ #define MAX_NOTE_BYTES 1024
diff --git a/recipes/linux/linux-kexecboot-2.6.24/akita/defconfig b/recipes/linux/linux-kexecboot-2.6.24/akita/defconfig
new file mode 100644
index 0000000000..3b35eda5db
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/akita/defconfig
@@ -0,0 +1,1239 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Sun Feb 1 01:28:12 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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_PXA_SHARPSL_25x is not set
+CONFIG_PXA_SHARPSL_27x=y
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE 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
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+CONFIG_KEYBOARD_SPITZ=y
+CONFIG_SHARPSL_RC=y
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DAB 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=m
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+# CONFIG_USB_ETH is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SPITZ=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.24/binutils-buildid-arm.patch b/recipes/linux/linux-kexecboot-2.6.24/binutils-buildid-arm.patch
new file mode 100644
index 0000000000..68e35e89e1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/binutils-buildid-arm.patch
@@ -0,0 +1,16 @@
+---
+ arch/arm/kernel/vmlinux.lds.S | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: linux-2.6.22/arch/arm/kernel/vmlinux.lds.S
+===================================================================
+--- linux-2.6.22.orig/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:32:29.000000000 +0200
++++ linux-2.6.22/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:33:42.000000000 +0200
+@@ -94,6 +94,7 @@
+ TEXT_TEXT
+ SCHED_TEXT
+ LOCK_TEXT
++ *(.note.*)
+ #ifdef CONFIG_MMU
+ *(.fixup)
+ #endif
diff --git a/recipes/linux/linux-kexecboot-2.6.24/c7x0/defconfig b/recipes/linux/linux-kexecboot-2.6.24/c7x0/defconfig
new file mode 100644
index 0000000000..bc621636fa
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/c7x0/defconfig
@@ -0,0 +1,1233 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Sun Feb 1 01:19:01 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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_POODLE is not set
+CONFIG_MACH_CORGI=y
+CONFIG_MACH_SHEPHERD=y
+CONFIG_MACH_HUSKY=y
+# CONFIG_MACH_TOSA is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SHARP_C7xx=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE 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
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_CORGI=y
+# CONFIG_KEYBOARD_SPITZ is not set
+CONFIG_SHARPSL_RC=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_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DAB 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=y
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+CONFIG_USB_PXA2XX_SMALL=y
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+# CONFIG_USB_ETH is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_CORGI=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.24/connectplus-prevent-oops-HACK.patch b/recipes/linux/linux-kexecboot-2.6.24/connectplus-prevent-oops-HACK.patch
new file mode 100644
index 0000000000..b5439c62e7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/connectplus-prevent-oops-HACK.patch
@@ -0,0 +1,17 @@
+Index: linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c
+===================================================================
+--- linux-2.6.21.orig/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:45:39.000000000 +0100
++++ linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:47:30.000000000 +0100
+@@ -2666,6 +2666,12 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if(dev->base_addr == 0)
++ {
++ printk(KERN_DEBUG "%s: IRQ before base_addr set\n", dev->name);
++ return IRQ_HANDLED;
++ }
++
+ prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
+
+ if (local->func->card_present && !local->func->card_present(local)) {
diff --git a/recipes/linux/linux-kexecboot-2.6.24/connectplus-remove-ide-HACK.patch b/recipes/linux/linux-kexecboot-2.6.24/connectplus-remove-ide-HACK.patch
new file mode 100644
index 0000000000..4414b21191
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/connectplus-remove-ide-HACK.patch
@@ -0,0 +1,12 @@
+Index: linux-2.6.13/drivers/ide/legacy/ide-cs.c
+===================================================================
+--- linux-2.6.13.orig/drivers/ide/legacy/ide-cs.c 2005-09-01 22:43:46.000000000 +0100
++++ linux-2.6.13/drivers/ide/legacy/ide-cs.c 2005-09-01 22:45:46.000000000 +0100
+@@ -488,7 +488,6 @@
+ PCMCIA_DEVICE_PROD_ID123("KODAK Picture Card ", "KODAK ", "V100K", 0x94a0d8f3, 0xe4fc3ea0, 0xe5e7eed4),
+ PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
+ PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
+- PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
+ PCMCIA_DEVICE_NULL,
+ };
+ MODULE_DEVICE_TABLE(pcmcia, ide_ids);
diff --git a/recipes/linux/linux-kexecboot-2.6.24/hostap-monitor-mode.patch b/recipes/linux/linux-kexecboot-2.6.24/hostap-monitor-mode.patch
new file mode 100644
index 0000000000..641fd19e50
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/hostap-monitor-mode.patch
@@ -0,0 +1,209 @@
+This is a patch that I've been maintaining for a few years, and I'd
+really like to see it added to the mainstream zaurus kernel so I can
+finally stop distributing my own.
+
+This patch only effects the card while in monitor mode, and does not
+cause any known stability issues.
+
+http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
+
+Rick Farina (Zero_Chaos)
+
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:30:18.000000000 -0400
+@@ -69,6 +69,9 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ goto xmit;
++
+ if (skb->len < ETH_HLEN) {
+ printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb "
+ "(len=%d)\n", dev->name, skb->len);
+@@ -234,6 +237,7 @@
+ memcpy(skb_put(skb, ETH_ALEN), &hdr.addr4, ETH_ALEN);
+ }
+
++xmit:
+ iface->stats.tx_packets++;
+ iface->stats.tx_bytes += skb->len;
+
+@@ -404,8 +408,6 @@
+ }
+
+ if (skb->len < 24) {
+- printk(KERN_DEBUG "%s: hostap_master_start_xmit: short skb "
+- "(len=%d)\n", dev->name, skb->len);
+ ret = 0;
+ iface->stats.tx_dropped++;
+ goto fail;
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_cs.c.orig
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_cs.c.rej
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:30:18.000000000 -0400
+@@ -1005,6 +1005,35 @@
+ return fid;
+ }
+
++static int prism2_monitor_enable(struct net_device *dev)
++{
++ if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE, 5)) {
++ printk(KERN_DEBUG "Port type setting for monitor mode "
++ "failed\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hfa384x_cmd(dev, HFA384X_CMDCODE_TEST | (0x0a << 8),
++ 0, NULL, NULL)) {
++ printk(KERN_DEBUG "Could not enter testmode 0x0a\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
++ HFA384X_WEPFLAGS_PRIVACYINVOKED |
++ HFA384X_WEPFLAGS_HOSTENCRYPT |
++ HFA384X_WEPFLAGS_HOSTDECRYPT)) {
++ printk(KERN_DEBUG "WEP flags setting failed\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE, 1)) {
++ printk(KERN_DEBUG "Could not set promiscuous mode\n");
++ return -EOPNOTSUPP;
++ }
++
++ return 0;
++}
+
+ static int prism2_reset_port(struct net_device *dev)
+ {
+@@ -1031,6 +1060,10 @@
+ "port\n", dev->name);
+ }
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ /* force mode 0x0a after port 0 reset */
++ return prism2_monitor_enable(dev);
++
+ /* It looks like at least some STA firmware versions reset
+ * fragmentation threshold back to 2346 after enable command. Restore
+ * the configured value, if it differs from this default. */
+@@ -1466,6 +1499,10 @@
+ return 1;
+ }
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ /* force mode 0x0a after port 0 reset */
++ prism2_monitor_enable(dev);
++
+ local->hw_ready = 1;
+ local->hw_reset_tries = 0;
+ local->hw_resetting = 0;
+@@ -3156,6 +3193,7 @@
+ local->func->hw_config = prism2_hw_config;
+ local->func->hw_reset = prism2_hw_reset;
+ local->func->hw_shutdown = prism2_hw_shutdown;
++ local->func->monitor_enable = prism2_monitor_enable;
+ local->func->reset_port = prism2_reset_port;
+ local->func->schedule_reset = prism2_schedule_reset;
+ #ifdef PRISM2_DOWNLOAD_SUPPORT
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_hw.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:30:18.000000000 -0400
+@@ -1104,33 +1104,7 @@
+
+ printk(KERN_DEBUG "Enabling monitor mode\n");
+ hostap_monitor_set_type(local);
+-
+- if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
+- HFA384X_PORTTYPE_PSEUDO_IBSS)) {
+- printk(KERN_DEBUG "Port type setting for monitor mode "
+- "failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- /* Host decrypt is needed to get the IV and ICV fields;
+- * however, monitor mode seems to remove WEP flag from frame
+- * control field */
+- if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
+- HFA384X_WEPFLAGS_HOSTENCRYPT |
+- HFA384X_WEPFLAGS_HOSTDECRYPT)) {
+- printk(KERN_DEBUG "WEP flags setting failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- if (local->func->reset_port(dev) ||
+- local->func->cmd(dev, HFA384X_CMDCODE_TEST |
+- (HFA384X_TEST_MONITOR << 8),
+- 0, NULL, NULL)) {
+- printk(KERN_DEBUG "Setting monitor mode failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- return 0;
++ return local->func->reset_port(dev);
+ }
+
+
+@@ -1199,7 +1173,7 @@
+ local->iw_mode = *mode;
+
+ if (local->iw_mode == IW_MODE_MONITOR)
+- hostap_monitor_mode_enable(local);
++ return hostap_monitor_mode_enable(local);
+ else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt &&
+ !local->fw_encrypt_ok) {
+ printk(KERN_DEBUG "%s: defaulting to host-based encryption as "
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:30:18.000000000 -0400
+@@ -331,7 +331,7 @@
+ if (local->iw_mode == IW_MODE_REPEAT)
+ return HFA384X_PORTTYPE_WDS;
+ if (local->iw_mode == IW_MODE_MONITOR)
+- return HFA384X_PORTTYPE_PSEUDO_IBSS;
++ return 5; /*HFA384X_PORTTYPE_PSEUDO_IBSS;*/
+ return HFA384X_PORTTYPE_HOSTAP;
+ }
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_main.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:30:18.000000000 -0400
+@@ -48,6 +48,8 @@
+ { 0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID },
+ /* Samsung MagicLAN SWL-2210P */
+ { 0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID },
++ /* NETGEAR MA311 */
++ { 0x1385, 0x3872, PCI_ANY_ID, PCI_ANY_ID },
+ { 0 }
+ };
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_pci.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:30:18.000000000 -0400
+@@ -101,6 +101,7 @@
+ { 0xc250, 0x0002 } /* EMTAC A2424i */,
+ { 0xd601, 0x0002 } /* Z-Com XI300 */,
+ { 0xd601, 0x0005 } /* Zcomax XI-325H 200mW */,
++ { 0xd601, 0x0010 } /* Zcomax XI-325H 100mW */,
+ { 0, 0}
+ };
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_plx.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:30:18.000000000 -0400
+@@ -575,6 +575,7 @@
+ int (*hw_config)(struct net_device *dev, int initial);
+ void (*hw_reset)(struct net_device *dev);
+ void (*hw_shutdown)(struct net_device *dev, int no_disable);
++ int (*monitor_enable)(struct net_device *dev);
+ int (*reset_port)(struct net_device *dev);
+ void (*schedule_reset)(local_info_t *local);
+ int (*download)(local_info_t *local,
diff --git a/recipes/linux/linux-kexecboot-2.6.24/hrw-hostapcard.patch b/recipes/linux/linux-kexecboot-2.6.24/hrw-hostapcard.patch
new file mode 100644
index 0000000000..67fc5b7c70
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/hrw-hostapcard.patch
@@ -0,0 +1,34 @@
+
+From: Marcin Juszkiewicz <openembedded@haerwu.biz>
+
+Card reported by Ångström user:
+http://bugs.openembedded.net/show_bug.cgi?id=3236
+
+Socket 1:
+ product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", ""
+ manfid: 0x0156, 0x0002
+ function: 6 (network)
+
+Signed-off-by: Marcin Juszkiewicz <openembedded@haerwu.biz>
+Acked-by: Pavel Roskin <proski@gnu.org>
+
+---
+ drivers/net/wireless/hostap/hostap_cs.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.24.orig/drivers/net/wireless/hostap/hostap_cs.c
++++ linux-2.6.24/drivers/net/wireless/hostap/hostap_cs.c
+@@ -892,10 +892,13 @@ static struct pcmcia_device_id hostap_cs
+ 0xa21501a, 0x59868926, 0xc9049a39),
+ PCMCIA_DEVICE_PROD_ID1234(
+ "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
+ "RevA",
+ 0xa5f472c2, 0x9c05598d, 0xc9049a39, 0x57a66194),
++ PCMCIA_DEVICE_PROD_ID123(
++ "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
++ 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
+ PCMCIA_DEVICE_NULL
+ };
+ MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
+
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/htcuni-acx.patch b/recipes/linux/linux-kexecboot-2.6.24/htcuni-acx.patch
new file mode 100644
index 0000000000..1ccebddc8d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/htcuni-acx.patch
@@ -0,0 +1,33527 @@
+---
+ drivers/net/wireless/Kconfig | 31
+ drivers/net/wireless/Makefile | 2
+ drivers/net/wireless/acx/Kconfig | 113
+ drivers/net/wireless/acx/Makefile | 21
+ drivers/net/wireless/acx/acx.h | 14
+ drivers/net/wireless/acx/acx_config.h | 50
+ drivers/net/wireless/acx/acx_func.h | 710 ++
+ drivers/net/wireless/acx/acx_hw.h | 18
+ drivers/net/wireless/acx/acx_struct.h | 2114 ++++++++
+ drivers/net/wireless/acx/common.c | 7388 ++++++++++++++++++++++++++++
+ drivers/net/wireless/acx/conv.c | 504 +
+ drivers/net/wireless/acx/cs.c | 5703 +++++++++++++++++++++
+ drivers/net/wireless/acx/htcsable_acx.c | 118
+ drivers/net/wireless/acx/htcuniversal_acx.c | 108
+ drivers/net/wireless/acx/hx4700_acx.c | 108
+ drivers/net/wireless/acx/ioctl.c | 2748 ++++++++++
+ drivers/net/wireless/acx/mem.c | 5363 ++++++++++++++++++++
+ drivers/net/wireless/acx/pci.c | 4234 ++++++++++++++++
+ drivers/net/wireless/acx/rx3000_acx.c | 110
+ drivers/net/wireless/acx/setrate.c | 213
+ drivers/net/wireless/acx/usb.c | 1922 +++++++
+ drivers/net/wireless/acx/wlan.c | 424 +
+ drivers/net/wireless/acx/wlan_compat.h | 260
+ drivers/net/wireless/acx/wlan_hdr.h | 497 +
+ drivers/net/wireless/acx/wlan_mgmt.h | 582 ++
+ 25 files changed, 33355 insertions(+)
+
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_config.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_config.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,50 @@
++#define ACX_RELEASE "v0.3.36"
++
++/*
++ * Test out all the channels in reg domain 0x10
++ */
++#define ACX_ALLOW_ALLCHANNELS
++
++/* set to 0 if you don't want any debugging code to be compiled in */
++/* set to 1 if you want some debugging */
++/* set to 2 if you want extensive debug log */
++#define ACX_DEBUG 0
++
++/*
++ * Since we'll be changing channels a lot
++#define ACX_DEFAULT_MSG (L_ASSOC|L_INIT)
++*/
++#define ACX_DEFAULT_MSG (L_ASSOC|L_INIT)
++
++/* assume 32bit I/O width
++ * (16bit is also compatible with Compact Flash) */
++#define ACX_IO_WIDTH 32
++
++/* Set this to 1 if you want monitor mode to use
++ * phy header. Currently it is not useful anyway since we
++ * don't know what useful info (if any) is in phy header.
++ * If you want faster/smaller code, say 0 here */
++#define WANT_PHY_HDR 0
++
++/* whether to do Tx descriptor cleanup in softirq (i.e. not in IRQ
++ * handler) or not. Note that doing it later does slightly increase
++ * system load, so still do that stuff in the IRQ handler for now,
++ * even if that probably means worse latency */
++#define TX_CLEANUP_IN_SOFTIRQ 0
++
++/* if you want very experimental 802.11 power save mode features */
++#define POWER_SAVE_80211 0
++
++/* if you want very early packet fragmentation bits and pieces */
++#define ACX_FRAGMENTATION 0
++
++/* Locking: */
++/* very talkative */
++/* #define PARANOID_LOCKING 1 */
++/* normal (use when bug-free) */
++#define DO_LOCKING 1
++/* else locking is disabled! */
++
++/* 0 - normal mode */
++/* 1 - development/debug: probe for IEs on modprobe */
++#define CMD_DISCOVERY 0
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_func.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_func.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,710 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++
++/***********************************************************************
++** LOGGING
++**
++** - Avoid SHOUTING needlessly. Avoid excessive verbosity.
++** Gradually remove messages which are old debugging aids.
++**
++** - Use printk() for messages which are to be always logged.
++** Supply either 'acx:' or '<devname>:' prefix so that user
++** can figure out who's speaking among other kernel chatter.
++** acx: is for general issues (e.g. "acx: no firmware image!")
++** while <devname>: is related to a particular device
++** (think about multi-card setup). Double check that message
++** is not confusing to the average user.
++**
++** - use printk KERN_xxx level only if message is not a WARNING
++** but is INFO, ERR etc.
++**
++** - Use printk_ratelimited() for messages which may flood
++** (e.g. "rx DUP pkt!").
++**
++** - Use log() for messages which may be omitted (and they
++** _will_ be omitted in non-debug builds). Note that
++** message levels may be disabled at compile-time selectively,
++** thus select them wisely. Example: L_DEBUG is the lowest
++** (most likely to be compiled out) -> use for less important stuff.
++**
++** - Do not print important stuff with log(), or else people
++** will never build non-debug driver.
++**
++** Style:
++** hex: capital letters, zero filled (e.g. 0x02AC)
++** str: dont start from capitals, no trailing periods ("tx: queue is stopped")
++*/
++#if ACX_DEBUG > 1
++
++void log_fn_enter(const char *funcname);
++void log_fn_exit(const char *funcname);
++void log_fn_exit_v(const char *funcname, int v);
++
++#define FN_ENTER \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_enter(__func__); \
++ } \
++ } while (0)
++
++#define FN_EXIT1(v) \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_exit_v(__func__, v); \
++ } \
++ } while (0)
++#define FN_EXIT0 \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_exit(__func__); \
++ } \
++ } while (0)
++
++#else
++
++#define FN_ENTER
++#define FN_EXIT1(v)
++#define FN_EXIT0
++
++#endif /* ACX_DEBUG > 1 */
++
++
++#if ACX_DEBUG
++
++#define log(chan, args...) \
++ do { \
++ if (acx_debug & (chan)) \
++ printk(KERN_DEBUG args); \
++ } while (0)
++#define printk_ratelimited(args...) printk(args)
++
++#else /* Non-debug build: */
++
++#define log(chan, args...)
++/* Standard way of log flood prevention */
++#define printk_ratelimited(args...) \
++do { \
++ if (printk_ratelimit()) \
++ printk(args); \
++} while (0)
++
++#endif /* ACX_DEBUG */
++
++void acx_print_mac(const char *head, const u8 *mac, const char *tail);
++
++/* Optimized out to nothing in non-debug build */
++static inline void
++acxlog_mac(int level, const char *head, const u8 *mac, const char *tail)
++{
++ if (acx_debug & level) {
++ acx_print_mac(head, mac, tail);
++ }
++}
++
++
++/***********************************************************************
++** MAC address helpers
++*/
++static inline void
++MAC_COPY(u8 *mac, const u8 *src)
++{
++ *(u32*)mac = *(u32*)src;
++ ((u16*)mac)[2] = ((u16*)src)[2];
++ /* kernel's memcpy will do the same: memcpy(dst, src, ETH_ALEN); */
++}
++
++static inline void
++MAC_FILL(u8 *mac, u8 val)
++{
++ memset(mac, val, ETH_ALEN);
++}
++
++static inline void
++MAC_BCAST(u8 *mac)
++{
++ ((u16*)mac)[2] = *(u32*)mac = -1;
++}
++
++static inline void
++MAC_ZERO(u8 *mac)
++{
++ ((u16*)mac)[2] = *(u32*)mac = 0;
++}
++
++static inline int
++mac_is_equal(const u8 *a, const u8 *b)
++{
++ /* can't beat this */
++ return memcmp(a, b, ETH_ALEN) == 0;
++}
++
++static inline int
++mac_is_bcast(const u8 *mac)
++{
++ /* AND together 4 first bytes with sign-extended 2 last bytes
++ ** Only bcast address gives 0xffffffff. +1 gives 0 */
++ return ( *(s32*)mac & ((s16*)mac)[2] ) + 1 == 0;
++}
++
++static inline int
++mac_is_zero(const u8 *mac)
++{
++ return ( *(u32*)mac | ((u16*)mac)[2] ) == 0;
++}
++
++static inline int
++mac_is_directed(const u8 *mac)
++{
++ return (mac[0] & 1)==0;
++}
++
++static inline int
++mac_is_mcast(const u8 *mac)
++{
++ return (mac[0] & 1) && !mac_is_bcast(mac);
++}
++
++#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
++#define MAC(bytevector) \
++ ((unsigned char *)bytevector)[0], \
++ ((unsigned char *)bytevector)[1], \
++ ((unsigned char *)bytevector)[2], \
++ ((unsigned char *)bytevector)[3], \
++ ((unsigned char *)bytevector)[4], \
++ ((unsigned char *)bytevector)[5]
++
++
++/***********************************************************************
++** Random helpers
++*/
++#define TO_STRING(x) #x
++#define STRING(x) TO_STRING(x)
++
++#define CLEAR_BIT(val, mask) ((val) &= ~(mask))
++#define SET_BIT(val, mask) ((val) |= (mask))
++
++/* undefined if v==0 */
++static inline unsigned int
++lowest_bit(u16 v)
++{
++ unsigned int n = 0;
++ while (!(v & 0xf)) { v>>=4; n+=4; }
++ while (!(v & 1)) { v>>=1; n++; }
++ return n;
++}
++
++/* undefined if v==0 */
++static inline unsigned int
++highest_bit(u16 v)
++{
++ unsigned int n = 0;
++ while (v>0xf) { v>>=4; n+=4; }
++ while (v>1) { v>>=1; n++; }
++ return n;
++}
++
++/* undefined if v==0 */
++static inline int
++has_only_one_bit(u16 v)
++{
++ return ((v-1) ^ v) >= v;
++}
++
++
++static inline int
++is_hidden_essid(char *essid)
++{
++ return (('\0' == essid[0]) ||
++ ((' ' == essid[0]) && ('\0' == essid[1])));
++}
++
++/***********************************************************************
++** LOCKING
++** We have adev->sem and adev->lock.
++**
++** We employ following naming convention in order to get locking right:
++**
++** acx_e_xxxx - external entry points called from process context.
++** It is okay to sleep. adev->sem is to be taken on entry.
++** acx_i_xxxx - external entry points possibly called from atomic context.
++** Sleeping is not allowed (and thus down(sem) is not legal!)
++** acx_s_xxxx - potentially sleeping functions. Do not ever call under lock!
++** acx_l_xxxx - functions which expect lock to be already taken.
++** rest - non-sleeping functions which do not require locking
++** but may be run under lock
++**
++** A small number of local helpers do not have acx_[eisl]_ prefix.
++** They are always close to caller and are to be reviewed locally.
++**
++** Theory of operation:
++**
++** All process-context entry points (_e_ functions) take sem
++** immediately. IRQ handler and other 'atomic-context' entry points
++** (_i_ functions) take lock immediately on entry, but dont take sem
++** because that might sleep.
++**
++** Thus *all* code is either protected by sem or lock, or both.
++**
++** Code which must not run concurrently with IRQ takes lock.
++** Such code is marked with _l_.
++**
++** This results in the following rules of thumb useful in code review:
++**
++** + If a function calls _s_ fn, it must be an _s_ itself.
++** + You can call _l_ fn only (a) from another _l_ fn
++** or (b) from _s_, _e_ or _i_ fn by taking lock, calling _l_,
++** and dropping lock.
++** + All IRQ code runs under lock.
++** + Any _s_ fn is running under sem.
++** + Code under sem can race only with IRQ code.
++** + Code under sem+lock cannot race with anything.
++*/
++
++/* These functions *must* be inline or they will break horribly on SPARC, due
++ * to its weird semantics for save/restore flags */
++
++#if defined(PARANOID_LOCKING) /* Lock debugging */
++
++void acx_lock_debug(acx_device_t *adev, const char* where);
++void acx_unlock_debug(acx_device_t *adev, const char* where);
++void acx_down_debug(acx_device_t *adev, const char* where);
++void acx_up_debug(acx_device_t *adev, const char* where);
++void acx_lock_unhold(void);
++void acx_sem_unhold(void);
++
++static inline void
++acx_lock_helper(acx_device_t *adev, unsigned long *fp, const char* where)
++{
++ acx_lock_debug(adev, where);
++ spin_lock_irqsave(&adev->lock, *fp);
++}
++static inline void
++acx_unlock_helper(acx_device_t *adev, unsigned long *fp, const char* where)
++{
++ acx_unlock_debug(adev, where);
++ spin_unlock_irqrestore(&adev->lock, *fp);
++}
++static inline void
++acx_down_helper(acx_device_t *adev, const char* where)
++{
++ acx_down_debug(adev, where);
++}
++static inline void
++acx_up_helper(acx_device_t *adev, const char* where)
++{
++ acx_up_debug(adev, where);
++}
++#define acx_lock(adev, flags) acx_lock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
++#define acx_unlock(adev, flags) acx_unlock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
++#define acx_sem_lock(adev) acx_down_helper(adev, __FILE__ ":" STRING(__LINE__))
++#define acx_sem_unlock(adev) acx_up_helper(adev, __FILE__ ":" STRING(__LINE__))
++
++#elif defined(DO_LOCKING)
++
++#define acx_lock(adev, flags) spin_lock_irqsave(&adev->lock, flags)
++#define acx_unlock(adev, flags) spin_unlock_irqrestore(&adev->lock, flags)
++#define acx_sem_lock(adev) down(&adev->sem)
++#define acx_sem_unlock(adev) up(&adev->sem)
++#define acx_lock_unhold() ((void)0)
++#define acx_sem_unhold() ((void)0)
++
++#else /* no locking! :( */
++
++#define acx_lock(adev, flags) ((void)0)
++#define acx_unlock(adev, flags) ((void)0)
++#define acx_sem_lock(adev) ((void)0)
++#define acx_sem_unlock(adev) ((void)0)
++#define acx_lock_unhold() ((void)0)
++#define acx_sem_unhold() ((void)0)
++
++#endif
++
++
++/***********************************************************************
++*/
++
++/* Can race with rx path (which is not protected by sem):
++** rx -> process_[re]assocresp() -> set_status(ASSOCIATED) -> wake_queue()
++** Can race with tx_complete IRQ:
++** IRQ -> acxpci_l_clean_txdesc -> acx_wake_queue
++** Review carefully all callsites */
++static inline void
++acx_stop_queue(struct net_device *ndev, const char *msg)
++{
++ if (netif_queue_stopped(ndev))
++ return;
++
++ netif_stop_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: stop queue %s\n", msg);
++}
++
++static inline int
++acx_queue_stopped(struct net_device *ndev)
++{
++ return netif_queue_stopped(ndev);
++}
++
++/*
++static inline void
++acx_start_queue(struct net_device *ndev, const char *msg)
++{
++ netif_start_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: start queue %s\n", msg);
++}
++*/
++
++static inline void
++acx_wake_queue(struct net_device *ndev, const char *msg)
++{
++ netif_wake_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: wake queue %s\n", msg);
++}
++
++static inline void
++acx_carrier_off(struct net_device *ndev, const char *msg)
++{
++ netif_carrier_off(ndev);
++ if (msg)
++ log(L_BUFT, "tx: carrier off %s\n", msg);
++}
++
++static inline void
++acx_carrier_on(struct net_device *ndev, const char *msg)
++{
++ netif_carrier_on(ndev);
++ if (msg)
++ log(L_BUFT, "tx: carrier on %s\n", msg);
++}
++
++/* This function does not need locking UNLESS you call it
++** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
++** wake queue. This can race with stop_queue elsewhere. */
++void acx_set_status(acx_device_t *adev, u16 status);
++
++
++/***********************************************************************
++** Communication with firmware
++*/
++#define CMD_TIMEOUT_MS(n) (n)
++#define ACX_CMD_TIMEOUT_DEFAULT CMD_TIMEOUT_MS(50)
++
++#if ACX_DEBUG
++
++/* We want to log cmd names */
++int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++int acxmem_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++static inline int
++acx_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++ return acxusb_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++}
++#define acx_s_issue_cmd(adev,cmd,param,len) \
++ acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,ACX_CMD_TIMEOUT_DEFAULT,#cmd)
++#define acx_s_issue_cmd_timeo(adev,cmd,param,len,timeo) \
++ acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,timeo,#cmd)
++int acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* str);
++#define acx_s_configure(adev,pdr,type) \
++ acx_s_configure_debug(adev,pdr,type,#type)
++int acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type, const char* str);
++#define acx_s_interrogate(adev,pdr,type) \
++ acx_s_interrogate_debug(adev,pdr,type,#type)
++
++#else
++
++int acxpci_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++int acxmem_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++int acxusb_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++static inline int
++acx_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++ return acxusb_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++}
++static inline int
++acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++ return acxusb_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++}
++int acx_s_configure(acx_device_t *adev, void *pdr, int type);
++int acx_s_interrogate(acx_device_t *adev, void *pdr, int type);
++
++#endif
++
++void acx_s_cmd_start_scan(acx_device_t *adev);
++
++
++/***********************************************************************
++** Ioctls
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++int
++acx100pci_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++
++
++/***********************************************************************
++** /proc
++*/
++#ifdef CONFIG_PROC_FS
++int acx_proc_register_entries(const struct net_device *ndev);
++int acx_proc_unregister_entries(const struct net_device *ndev);
++#else
++static inline int
++acx_proc_register_entries(const struct net_device *ndev) { return OK; }
++static inline int
++acx_proc_unregister_entries(const struct net_device *ndev) { return OK; }
++#endif
++
++
++/***********************************************************************
++*/
++firmware_image_t *acx_s_read_fw(struct device *dev, const char *file, u32 *size);
++int acxpci_s_upload_radio(acx_device_t *adev);
++int acxmem_s_upload_radio(acx_device_t *adev);
++
++
++/***********************************************************************
++** Unsorted yet :)
++*/
++int acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++int acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++int acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++static inline int
++acx_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_read_phy_reg(adev, reg, charbuf);
++ if (IS_PCI(adev))
++ return acxpci_s_read_phy_reg(adev, reg, charbuf);
++ return acxusb_s_read_phy_reg(adev, reg, charbuf);
++}
++
++int acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++int acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++int acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++static inline int
++acx_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_write_phy_reg(adev, reg, value);
++ if (IS_PCI(adev))
++ return acxpci_s_write_phy_reg(adev, reg, value);
++ return acxusb_s_write_phy_reg(adev, reg, value);
++}
++
++tx_t* acxpci_l_alloc_tx(acx_device_t *adev);
++tx_t* acxmem_l_alloc_tx(acx_device_t *adev);
++tx_t* acxusb_l_alloc_tx(acx_device_t *adev);
++static inline tx_t*
++acx_l_alloc_tx(acx_device_t *adev)
++{
++ if (IS_MEM(adev))
++ return acxmem_l_alloc_tx(adev);
++ if (IS_PCI(adev))
++ return acxpci_l_alloc_tx(adev);
++ return acxusb_l_alloc_tx(adev);
++}
++
++void acxusb_l_dealloc_tx(tx_t *tx_opaque);
++void acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque);
++static inline void
++acx_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++#ifdef ACX_MEM
++ acxmem_l_dealloc_tx (adev, tx_opaque);
++#else
++ if (IS_USB(adev))
++ acxusb_l_dealloc_tx(tx_opaque);
++#endif
++}
++
++void* acxpci_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++void* acxmem_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++void* acxusb_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++static inline void*
++acx_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque)
++{
++#if defined (ACX_MEM)
++ return acxmem_l_get_txbuf(adev, tx_opaque);
++#else
++ if (IS_PCI(adev))
++ return acxpci_l_get_txbuf(adev, tx_opaque);
++ return acxusb_l_get_txbuf(adev, tx_opaque);
++#endif
++}
++
++void acxpci_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++void acxmem_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++void acxusb_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++static inline void
++acx_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len)
++{
++#if defined (ACX_MEM)
++ acxmem_l_tx_data(adev, tx_opaque, len);
++#else
++ if (IS_PCI(adev))
++ acxpci_l_tx_data(adev, tx_opaque, len);
++ else
++ acxusb_l_tx_data(adev, tx_opaque, len);
++#endif
++}
++
++static inline wlan_hdr_t*
++acx_get_wlan_hdr(acx_device_t *adev, const rxbuffer_t *rxbuf)
++{
++ return (wlan_hdr_t*)((u8*)&rxbuf->hdr_a3 + adev->phy_header_len);
++}
++
++void acxpci_l_power_led(acx_device_t *adev, int enable);
++int acxpci_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf);
++unsigned int acxpci_l_clean_txdesc(acx_device_t *adev);
++void acxpci_l_clean_txdesc_emergency(acx_device_t *adev);
++int acxpci_s_create_hostdesc_queues(acx_device_t *adev);
++void acxpci_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start);
++void acxpci_free_desc_queues(acx_device_t *adev);
++char* acxpci_s_proc_diag_output(char *p, acx_device_t *adev);
++int acxpci_proc_eeprom_output(char *p, acx_device_t *adev);
++void acxpci_set_interrupt_mask(acx_device_t *adev);
++int acx100pci_s_set_tx_level(acx_device_t *adev, u8 level_dbm);
++
++void acxmem_l_power_led(acx_device_t *adev, int enable);
++int acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf);
++unsigned int acxmem_l_clean_txdesc(acx_device_t *adev);
++void acxmem_l_clean_txdesc_emergency(acx_device_t *adev);
++int acxmem_s_create_hostdesc_queues(acx_device_t *adev);
++void acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start);
++void acxmem_free_desc_queues(acx_device_t *adev);
++char* acxmem_s_proc_diag_output(char *p, acx_device_t *adev);
++int acxmem_proc_eeprom_output(char *p, acx_device_t *adev);
++void acxmem_set_interrupt_mask(acx_device_t *adev);
++int acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm);
++
++void acx_s_msleep(int ms);
++int acx_s_init_mac(acx_device_t *adev);
++void acx_set_reg_domain(acx_device_t *adev, unsigned char reg_dom_id);
++void acx_set_timer(acx_device_t *adev, int timeout_us);
++void acx_update_capabilities(acx_device_t *adev);
++void acx_s_start(acx_device_t *adev);
++
++void acx_s_update_card_settings(acx_device_t *adev);
++void acx_s_parse_configoption(acx_device_t *adev, const acx111_ie_configoption_t *pcfg);
++void acx_l_update_ratevector(acx_device_t *adev);
++
++void acx_init_task_scheduler(acx_device_t *adev);
++void acx_schedule_task(acx_device_t *adev, unsigned int set_flag);
++
++int acx_e_ioctl_old(struct net_device *ndev, struct ifreq *ifr, int cmd);
++
++client_t *acx_l_sta_list_get(acx_device_t *adev, const u8 *address);
++void acx_l_sta_list_del(acx_device_t *adev, client_t *clt);
++
++int acx_l_transmit_disassoc(acx_device_t *adev, client_t *clt);
++void acx_i_timer(unsigned long a);
++int acx_s_complete_scan(acx_device_t *adev);
++
++struct sk_buff *acx_rxbuf_to_ether(acx_device_t *adev, rxbuffer_t *rxbuf);
++int acx_ether_to_txbuf(acx_device_t *adev, void *txbuf, const struct sk_buff *skb);
++
++u8 acx_signal_determine_quality(u8 signal, u8 noise);
++
++void acx_l_process_rxbuf(acx_device_t *adev, rxbuffer_t *rxbuf);
++void acx_l_handle_txrate_auto(acx_device_t *adev, struct client *txc,
++ u16 intended_rate, u8 rate100, u16 rate111, u8 error,
++ int pkts_to_ignore);
++
++void acx_dump_bytes(const void *, int);
++void acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr);
++
++u8 acx_rate111to100(u16);
++
++void acx_s_set_defaults(acx_device_t *adev);
++
++#if !ACX_DEBUG
++static inline const char* acx_get_packet_type_string(u16 fc) { return ""; }
++#else
++const char* acx_get_packet_type_string(u16 fc);
++#endif
++const char* acx_cmd_status_str(unsigned int state);
++
++int acx_i_start_xmit(struct sk_buff *skb, struct net_device *ndev);
++
++void great_inquisitor(acx_device_t *adev);
++
++void acx_s_get_firmware_version(acx_device_t *adev);
++void acx_display_hardware_details(acx_device_t *adev);
++
++int acx_e_change_mtu(struct net_device *ndev, int mtu);
++struct net_device_stats* acx_e_get_stats(struct net_device *ndev);
++struct iw_statistics* acx_e_get_wireless_stats(struct net_device *ndev);
++
++#ifdef ACX_MEM
++int __init acxmem_e_init_module(void);
++void __exit acxmem_e_cleanup_module(void);
++void acxmem_e_release(struct device *dev);
++#else
++int __init acxpci_e_init_module(void);
++int __init acxusb_e_init_module(void);
++void __exit acxpci_e_cleanup_module(void);
++void __exit acxusb_e_cleanup_module(void);
++#endif
++int __init acx_cs_init(void);
++void __exit acx_cs_cleanup(void);
+Index: linux-2.6.23/drivers/net/wireless/acx/acx.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,14 @@
++#if defined(CONFIG_ACX_MEM) && !defined(ACX_MEM)
++#define ACX_MEM
++#endif
++
++#if defined(CONFIG_ACX_CS) && !defined(ACX_MEM)
++#define ACX_MEM
++#endif
++
++#include "acx_config.h"
++#include "wlan_compat.h"
++#include "wlan_hdr.h"
++#include "wlan_mgmt.h"
++#include "acx_struct.h"
++#include "acx_func.h"
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_hw.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_hw.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,18 @@
++/*
++ * Interface for ACX slave memory driver
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * GPL
++ *
++ */
++
++#ifndef _ACX_HW_H
++#define _ACX_HW_H
++
++struct acx_hardware_data {
++ int (*start_hw)( void );
++ int (*stop_hw)( void );
++};
++
++#endif /* _ACX_HW_H */
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_struct.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_struct.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,2114 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** Forward declarations of types
++*/
++typedef struct tx tx_t;
++typedef struct acx_device acx_device_t;
++typedef struct client client_t;
++typedef struct rxdesc rxdesc_t;
++typedef struct txdesc txdesc_t;
++typedef struct rxhostdesc rxhostdesc_t;
++typedef struct txhostdesc txhostdesc_t;
++
++
++/***********************************************************************
++** Debug / log functionality
++*/
++enum {
++ L_LOCK = (ACX_DEBUG>1)*0x0001, /* locking debug log */
++ L_INIT = (ACX_DEBUG>0)*0x0002, /* special card initialization logging */
++ L_IRQ = (ACX_DEBUG>0)*0x0004, /* interrupt stuff */
++ L_ASSOC = (ACX_DEBUG>0)*0x0008, /* assocation (network join) and station log */
++ L_FUNC = (ACX_DEBUG>1)*0x0020, /* logging of function enter / leave */
++ L_XFER = (ACX_DEBUG>1)*0x0080, /* logging of transfers and mgmt */
++ L_DATA = (ACX_DEBUG>1)*0x0100, /* logging of transfer data */
++ L_DEBUG = (ACX_DEBUG>1)*0x0200, /* log of debug info */
++ L_IOCTL = (ACX_DEBUG>0)*0x0400, /* log ioctl calls */
++ L_CTL = (ACX_DEBUG>1)*0x0800, /* log of low-level ctl commands */
++ L_BUFR = (ACX_DEBUG>1)*0x1000, /* debug rx buffer mgmt (ring buffer etc.) */
++ L_XFER_BEACON = (ACX_DEBUG>1)*0x2000, /* also log beacon packets */
++ L_BUFT = (ACX_DEBUG>1)*0x4000, /* debug tx buffer mgmt (ring buffer etc.) */
++ L_USBRXTX = (ACX_DEBUG>0)*0x8000, /* debug USB rx/tx operations */
++ L_BUF = L_BUFR + L_BUFT,
++ L_ANY = 0xffff
++};
++
++#if ACX_DEBUG
++extern unsigned int acx_debug;
++#else
++enum { acx_debug = 0 };
++#endif
++
++
++/***********************************************************************
++** Random helpers
++*/
++#define ACX_PACKED __attribute__ ((packed))
++
++#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0]))
++
++/* Use worker_queues for 2.5/2.6 kernels and queue tasks for 2.4 kernels
++ (used for the 'bottom half' of the interrupt routine) */
++
++#include <linux/workqueue.h>
++#define USE_WORKER_TASKS
++#define WORK_STRUCT struct work_struct
++#define SCHEDULE_WORK schedule_work
++#define FLUSH_SCHEDULED_WORK flush_scheduled_work
++
++
++/***********************************************************************
++** Constants
++*/
++#define OK 0
++#define NOT_OK 1
++
++/* The supported chip models */
++#define CHIPTYPE_ACX100 1
++#define CHIPTYPE_ACX111 2
++
++#define IS_ACX100(adev) ((adev)->chip_type == CHIPTYPE_ACX100)
++#define IS_ACX111(adev) ((adev)->chip_type == CHIPTYPE_ACX111)
++
++/* Supported interfaces */
++#define DEVTYPE_PCI 0
++#define DEVTYPE_USB 1
++#define DEVTYPE_MEM 2
++
++#if !defined(CONFIG_ACX_PCI) && !defined(CONFIG_ACX_USB) && !defined(CONFIG_ACX_MEM) && !defined(CONFIG_ACX_CS)
++#error Driver must include PCI, USB, PCMCIA or memory mapped interface support. You selected none of them.
++#endif
++
++#if defined(CONFIG_ACX_PCI)
++ #if !defined(CONFIG_ACX_USB)
++ #define IS_PCI(adev) 1
++ #else
++ #define IS_PCI(adev) ((adev)->dev_type == DEVTYPE_PCI)
++ #endif
++#else
++ #define IS_PCI(adev) 0
++#endif
++
++#if defined(CONFIG_ACX_USB)
++ #if !defined(CONFIG_ACX_PCI)
++ #define IS_USB(adev) 1
++ #else
++ #define IS_USB(adev) ((adev)->dev_type == DEVTYPE_USB)
++ #endif
++#else
++ #define IS_USB(adev) 0
++#endif
++
++#if defined(CONFIG_ACX_MEM) || defined(CONFIG_ACX_CS)
++ #define IS_MEM(adev) 1
++#else
++ #define IS_MEM(adev) 0
++#endif
++
++/* Driver defaults */
++#define DEFAULT_DTIM_INTERVAL 10
++/* used to be 2048, but FreeBSD driver changed it to 4096 to work properly
++** in noisy wlans */
++#define DEFAULT_MSDU_LIFETIME 4096
++#define DEFAULT_RTS_THRESHOLD 2312 /* max. size: disable RTS mechanism */
++#define DEFAULT_BEACON_INTERVAL 100
++
++#define ACX100_BAP_DATALEN_MAX 4096
++#define ACX100_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
++#define ACX100_RIDDATA_MAXLEN ACX100_RID_GUESSING_MAXLEN
++
++/* Support Constants */
++/* Radio type names, found in Win98 driver's TIACXLN.INF */
++#define RADIO_MAXIM_0D 0x0d
++#define RADIO_RFMD_11 0x11
++#define RADIO_RALINK_15 0x15
++/* used in ACX111 cards (WG311v2, WL-121, ...): */
++#define RADIO_RADIA_16 0x16
++/* most likely *sometimes* used in ACX111 cards: */
++#define RADIO_UNKNOWN_17 0x17
++/* FwRad19.bin was found in a Safecom driver; must be an ACX111 radio: */
++#define RADIO_UNKNOWN_19 0x19
++#define RADIO_UNKNOWN_1B 0x1b /* radio in SafeCom SWLUT-54125 USB adapter; entirely unknown!! */
++
++/* Controller Commands */
++/* can be found in table cmdTable in firmware "Rev. 1.5.0" (FW150) */
++#define ACX1xx_CMD_RESET 0x00
++#define ACX1xx_CMD_INTERROGATE 0x01
++#define ACX1xx_CMD_CONFIGURE 0x02
++#define ACX1xx_CMD_ENABLE_RX 0x03
++#define ACX1xx_CMD_ENABLE_TX 0x04
++#define ACX1xx_CMD_DISABLE_RX 0x05
++#define ACX1xx_CMD_DISABLE_TX 0x06
++#define ACX1xx_CMD_FLUSH_QUEUE 0x07
++#define ACX1xx_CMD_SCAN 0x08
++#define ACX1xx_CMD_STOP_SCAN 0x09
++#define ACX1xx_CMD_CONFIG_TIM 0x0a
++#define ACX1xx_CMD_JOIN 0x0b
++#define ACX1xx_CMD_WEP_MGMT 0x0c
++#ifdef OLD_FIRMWARE_VERSIONS
++#define ACX100_CMD_HALT 0x0e /* mapped to unknownCMD in FW150 */
++#else
++#define ACX1xx_CMD_MEM_READ 0x0d
++#define ACX1xx_CMD_MEM_WRITE 0x0e
++#endif
++#define ACX1xx_CMD_SLEEP 0x0f
++#define ACX1xx_CMD_WAKE 0x10
++#define ACX1xx_CMD_UNKNOWN_11 0x11 /* mapped to unknownCMD in FW150 */
++#define ACX100_CMD_INIT_MEMORY 0x12
++#define ACX1FF_CMD_DISABLE_RADIO 0x12 /* new firmware? TNETW1450? */
++#define ACX1xx_CMD_CONFIG_BEACON 0x13
++#define ACX1xx_CMD_CONFIG_PROBE_RESPONSE 0x14
++#define ACX1xx_CMD_CONFIG_NULL_DATA 0x15
++#define ACX1xx_CMD_CONFIG_PROBE_REQUEST 0x16
++#define ACX1xx_CMD_FCC_TEST 0x17
++#define ACX1xx_CMD_RADIOINIT 0x18
++#define ACX111_CMD_RADIOCALIB 0x19
++#define ACX1FF_CMD_NOISE_HISTOGRAM 0x1c /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_RX_RESET 0x1d /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_LNA_CONTROL 0x20 /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_CONTROL_DBG_TRACE 0x21 /* new firmware? TNETW1450? */
++
++/* 'After Interrupt' Commands */
++#define ACX_AFTER_IRQ_CMD_STOP_SCAN 0x01
++#define ACX_AFTER_IRQ_CMD_ASSOCIATE 0x02
++#define ACX_AFTER_IRQ_CMD_RADIO_RECALIB 0x04
++#define ACX_AFTER_IRQ_UPDATE_CARD_CFG 0x08
++#define ACX_AFTER_IRQ_TX_CLEANUP 0x10
++#define ACX_AFTER_IRQ_COMPLETE_SCAN 0x20
++#define ACX_AFTER_IRQ_RESTART_SCAN 0x40
++
++/***********************************************************************
++** Tx/Rx buffer sizes and watermarks
++**
++** This will alloc and use DMAable buffers of
++** WLAN_A4FR_MAXLEN_WEP_FCS * (RX_CNT + TX_CNT) bytes
++** RX/TX_CNT=32 -> ~150k DMA buffers
++** RX/TX_CNT=16 -> ~75k DMA buffers
++**
++** 2005-10-10: reduced memory usage by lowering both to 16
++*/
++#define RX_CNT 16
++#define TX_CNT 16
++
++/* we clean up txdescs when we have N free txdesc: */
++#define TX_CLEAN_BACKLOG (TX_CNT/4)
++#define TX_START_CLEAN (TX_CNT - TX_CLEAN_BACKLOG)
++#define TX_EMERG_CLEAN 2
++/* we stop queue if we have < N free txbufs: */
++#define TX_STOP_QUEUE 3
++/* we start queue if we have >= N free txbufs: */
++#define TX_START_QUEUE 5
++
++/***********************************************************************
++** Interrogate/Configure cmd constants
++**
++** NB: length includes JUST the data part of the IE
++** (does not include size of the (type,len) pair)
++**
++** TODO: seems that acx100, acx100usb, acx111 have some differences,
++** fix code with regard to this!
++*/
++
++#define DEF_IE(name, val, len) enum { ACX##name=val, ACX##name##_LEN=len }
++
++/* Information Elements: Network Parameters, Static Configuration Entities */
++/* these are handled by real_cfgtable in firmware "Rev 1.5.0" (FW150) */
++DEF_IE(1xx_IE_UNKNOWN_00 ,0x0000, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(100_IE_ACX_TIMER ,0x0001, 0x10);
++DEF_IE(1xx_IE_POWER_MGMT ,0x0002, 0x06); /* TNETW1450: length 0x18!! */
++DEF_IE(1xx_IE_QUEUE_CONFIG ,0x0003, 0x1c);
++DEF_IE(100_IE_BLOCK_SIZE ,0x0004, 0x02);
++DEF_IE(1FF_IE_SLOT_TIME ,0x0004, 0x08); /* later firmware versions only? */
++DEF_IE(1xx_IE_MEMORY_CONFIG_OPTIONS ,0x0005, 0x14);
++DEF_IE(1FF_IE_QUEUE_HEAD ,0x0005, 0x14 /* FIXME: length? */);
++DEF_IE(1xx_IE_RATE_FALLBACK ,0x0006, 0x01); /* TNETW1450: length 2 */
++DEF_IE(100_IE_WEP_OPTIONS ,0x0007, 0x03);
++DEF_IE(111_IE_RADIO_BAND ,0x0007, -1);
++DEF_IE(1FF_IE_TIMING_CFG ,0x0007, -1); /* later firmware versions; TNETW1450 only? */
++DEF_IE(100_IE_SSID ,0x0008, 0x20); /* huh? */
++DEF_IE(1xx_IE_MEMORY_MAP ,0x0008, 0x28); /* huh? TNETW1450 has length 0x40!! */
++DEF_IE(1xx_IE_SCAN_STATUS ,0x0009, 0x04); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_ASSOC_ID ,0x000a, 0x02);
++DEF_IE(1xx_IE_UNKNOWN_0B ,0x000b, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_TX_POWER_LEVEL_TABLE ,0x000b, 0x18); /* later firmware versions; TNETW1450 only? */
++DEF_IE(100_IE_UNKNOWN_0C ,0x000c, -1); /* very small implementation in FW150! */
++/* ACX100 has an equivalent struct in the cmd mailbox directly after reset.
++ * 0x14c seems extremely large, will trash stack on failure (memset!)
++ * in case of small input struct --> OOPS! */
++DEF_IE(111_IE_CONFIG_OPTIONS ,0x000c, 0x14c);
++DEF_IE(1xx_IE_FWREV ,0x000d, 0x18);
++DEF_IE(1xx_IE_FCS_ERROR_COUNT ,0x000e, 0x04);
++DEF_IE(1xx_IE_MEDIUM_USAGE ,0x000f, 0x08);
++DEF_IE(1xx_IE_RXCONFIG ,0x0010, 0x04);
++DEF_IE(100_IE_UNKNOWN_11 ,0x0011, -1); /* NONBINARY: large implementation in FW150! link quality readings or so? */
++DEF_IE(111_IE_QUEUE_THRESH ,0x0011, -1);
++DEF_IE(100_IE_UNKNOWN_12 ,0x0012, -1); /* NONBINARY: VERY large implementation in FW150!! */
++DEF_IE(111_IE_BSS_POWER_SAVE ,0x0012, /* -1 */ 2);
++DEF_IE(1xx_IE_FIRMWARE_STATISTICS ,0x0013, 0x9c); /* TNETW1450: length 0x134!! */
++DEF_IE(1FF_IE_RX_INTR_CONFIG ,0x0014, 0x14); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1xx_IE_FEATURE_CONFIG ,0x0015, 0x08);
++DEF_IE(111_IE_KEY_CHOOSE ,0x0016, 0x04); /* for rekeying. really len=4?? */
++DEF_IE(1FF_IE_MISC_CONFIG_TABLE ,0x0017, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_WONE_CONFIG ,0x0018, -1); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_TID_CONFIG ,0x001a, 0x2c); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_CALIB_ASSESSMENT ,0x001e, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_BEACON_FILTER_OPTIONS ,0x001f, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_LOW_RSSI_THRESH_OPT ,0x0020, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_NOISE_HISTOGRAM_RESULTS ,0x0021, 0x30); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_PACKET_DETECT_THRESH ,0x0023, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_TX_CONFIG_OPTIONS ,0x0024, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_CCA_THRESHOLD ,0x0025, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_EVENT_MASK ,0x0026, 0x08); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_DTIM_PERIOD ,0x0027, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_ACI_CONFIG_SET ,0x0029, 0x06); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1FF_IE_EEPROM_VER ,0x0030, 0x04); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1xx_IE_DOT11_STATION_ID ,0x1001, 0x06);
++DEF_IE(100_IE_DOT11_UNKNOWN_1002 ,0x1002, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(111_IE_DOT11_FRAG_THRESH ,0x1002, -1); /* mapped to cfgInvalid in FW150; TNETW1450 has length 2!! */
++DEF_IE(100_IE_DOT11_BEACON_PERIOD ,0x1003, 0x02); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_DOT11_DTIM_PERIOD ,0x1004, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_DOT11_MAX_RX_LIFETIME ,0x1004, -1); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1xx_IE_DOT11_SHORT_RETRY_LIMIT ,0x1005, 0x01); /* TNETW1450: length 2 */
++DEF_IE(1xx_IE_DOT11_LONG_RETRY_LIMIT ,0x1006, 0x01); /* TNETW1450: length 2 */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_WRITE ,0x1007, 0x20); /* configure default keys; TNETW1450 has length 0x24!! */
++DEF_IE(1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME ,0x1008, 0x04);
++DEF_IE(1xx_IE_DOT11_GROUP_ADDR ,0x1009, -1);
++DEF_IE(1xx_IE_DOT11_CURRENT_REG_DOMAIN ,0x100a, 0x02);
++/* It's harmless to have larger struct. Use USB case always. */
++DEF_IE(1xx_IE_DOT11_CURRENT_ANTENNA ,0x100b, 0x02); /* in fact len=1 for PCI */
++DEF_IE(1xx_IE_DOT11_UNKNOWN_100C ,0x100c, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_DOT11_TX_POWER_LEVEL ,0x100d, 0x01); /* TNETW1450 has length 2!! */
++DEF_IE(1xx_IE_DOT11_CURRENT_CCA_MODE ,0x100e, 0x02); /* in fact len=1 for PCI */
++/* USB doesn't return anything - len==0?! */
++DEF_IE(100_IE_DOT11_ED_THRESHOLD ,0x100f, 0x04);
++DEF_IE(1xx_IE_DOT11_WEP_DEFAULT_KEY_SET ,0x1010, 0x01); /* set default key ID; TNETW1450: length 2 */
++DEF_IE(100_IE_DOT11_UNKNOWN_1011 ,0x1011, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_DOT11_CURR_5GHZ_REGDOM ,0x1011, -1); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(100_IE_DOT11_UNKNOWN_1012 ,0x1012, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(100_IE_DOT11_UNKNOWN_1013 ,0x1013, -1); /* mapped to cfgInvalid in FW150 */
++
++#if 0
++/* Experimentally obtained on acx100, fw 1.9.8.b
++** -1 means that fw returned 'invalid IE'
++** 0200 FC00 nnnn... are test read contents: u16 type, u16 len, data
++** (AA are poison bytes marking bytes not written by fw)
++**
++** Looks like acx100 fw does not update len field (thus len=256-4=FC here)
++** A number of IEs seem to trash type,len fields
++** IEs marked 'huge' return gobs of data (no poison bytes remain)
++*/
++DEF_IE(100_IE_INVAL_00, 0x0000, -1);
++DEF_IE(100_IE_INVAL_01, 0x0001, -1); /* IE_ACX_TIMER, len=16 on older fw */
++DEF_IE(100_IE_POWER_MGMT, 0x0002, 4); /* 0200FC00 00040000 AAAAAAAA */
++DEF_IE(100_IE_QUEUE_CONFIG, 0x0003, 28); /* 0300FC00 48060000 9CAD0000 0101AAAA DCB00000 E4B00000 9CAA0000 00AAAAAA */
++DEF_IE(100_IE_BLOCK_SIZE, 0x0004, 2); /* 0400FC00 0001AAAA AAAAAAAA AAAAAAAA */
++/* write only: */
++DEF_IE(100_IE_MEMORY_CONFIG_OPTIONS, 0x0005, 20);
++DEF_IE(100_IE_RATE_FALLBACK, 0x0006, 1); /* 0600FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++/* write only: */
++DEF_IE(100_IE_WEP_OPTIONS, 0x0007, 3);
++DEF_IE(100_IE_MEMORY_MAP, 0x0008, 40); /* huge: 0800FC00 30000000 6CA20000 70A20000... */
++/* gives INVAL on read: */
++DEF_IE(100_IE_SCAN_STATUS, 0x0009, -1);
++DEF_IE(100_IE_ASSOC_ID, 0x000a, 2); /* huge: 0A00FC00 00000000 01040800 00000000... */
++DEF_IE(100_IE_INVAL_0B, 0x000b, -1);
++/* 'command rejected': */
++DEF_IE(100_IE_CONFIG_OPTIONS, 0x000c, -3);
++DEF_IE(100_IE_FWREV, 0x000d, 24); /* 0D00FC00 52657620 312E392E 382E6200 AAAAAAAA AAAAAAAA 05050201 AAAAAAAA */
++DEF_IE(100_IE_FCS_ERROR_COUNT, 0x000e, 4);
++DEF_IE(100_IE_MEDIUM_USAGE, 0x000f, 8); /* E41F0000 2D780300 FCC91300 AAAAAAAA */
++DEF_IE(100_IE_RXCONFIG, 0x0010, 4); /* 1000FC00 00280000 AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_QUEUE_THRESH, 0x0011, 12); /* 1100FC00 AAAAAAAA 00000000 00000000 */
++DEF_IE(100_IE_BSS_POWER_SAVE, 0x0012, 1); /* 1200FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++/* read only, variable len */
++DEF_IE(100_IE_FIRMWARE_STATISTICS, 0x0013, 256); /* 0000AC00 00000000 ... */
++DEF_IE(100_IE_INT_CONFIG, 0x0014, 20); /* 00000000 00000000 00000000 00000000 5D74D105 00000000 AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_FEATURE_CONFIG, 0x0015, 8); /* 1500FC00 16000000 AAAAAAAA AAAAAAAA */
++/* returns 'invalid MAC': */
++DEF_IE(100_IE_KEY_CHOOSE, 0x0016, -4);
++DEF_IE(100_IE_INVAL_17, 0x0017, -1);
++DEF_IE(100_IE_UNKNOWN_18, 0x0018, 0); /* null len?! 1800FC00 AAAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_UNKNOWN_19, 0x0019, 256); /* huge: 1900FC00 9C1F00EA FEFFFFEA FEFFFFEA... */
++DEF_IE(100_IE_INVAL_1A, 0x001A, -1);
++
++DEF_IE(100_IE_DOT11_INVAL_1000, 0x1000, -1);
++DEF_IE(100_IE_DOT11_STATION_ID, 0x1001, 6); /* huge: 0110FC00 58B10E2F 03000000 00000000... */
++DEF_IE(100_IE_DOT11_INVAL_1002, 0x1002, -1);
++DEF_IE(100_IE_DOT11_INVAL_1003, 0x1003, -1);
++DEF_IE(100_IE_DOT11_INVAL_1004, 0x1004, -1);
++DEF_IE(100_IE_DOT11_SHORT_RETRY_LIMIT, 0x1005, 1);
++DEF_IE(100_IE_DOT11_LONG_RETRY_LIMIT, 0x1006, 1);
++/* write only: */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_WRITE, 0x1007, 32);
++DEF_IE(100_IE_DOT11_MAX_XMIT_MSDU_LIFETIME, 0x1008, 4); /* huge: 0810FC00 00020000 F4010000 00000000... */
++/* undoc but returns something */
++DEF_IE(100_IE_DOT11_GROUP_ADDR, 0x1009, 12); /* huge: 0910FC00 00000000 00000000 00000000... */
++DEF_IE(100_IE_DOT11_CURRENT_REG_DOMAIN, 0x100a, 1); /* 0A10FC00 30AAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_CURRENT_ANTENNA, 0x100b, 1); /* 0B10FC00 8FAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_INVAL_100C, 0x100c, -1);
++DEF_IE(100_IE_DOT11_TX_POWER_LEVEL, 0x100d, 2); /* 00000000 0100AAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_CURRENT_CCA_MODE, 0x100e, 1); /* 0E10FC00 0DAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_ED_THRESHOLD, 0x100f, 4); /* 0F10FC00 70000000 AAAAAAAA AAAAAAAA */
++/* set default key ID */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_SET, 0x1010, 1); /* 1010FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_INVAL_1011, 0x1011, -1);
++DEF_IE(100_IE_DOT11_INVAL_1012, 0x1012, -1);
++DEF_IE(100_IE_DOT11_INVAL_1013, 0x1013, -1);
++DEF_IE(100_IE_DOT11_UNKNOWN_1014, 0x1014, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1015, 0x1015, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1016, 0x1016, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1017, 0x1017, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1018, 0x1018, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1019, 0x1019, 256); /* huge */
++#endif
++
++#if 0
++/* Experimentally obtained on PCI acx111 Xterasys XN-2522g, fw 1.2.1.34
++** -1 means that fw returned 'invalid IE'
++** 0400 0800 nnnn... are test read contents: u16 type, u16 len, data
++** (AA are poison bytes marking bytes not written by fw)
++**
++** Looks like acx111 fw reports real len!
++*/
++DEF_IE(111_IE_INVAL_00, 0x0000, -1);
++DEF_IE(111_IE_INVAL_01, 0x0001, -1);
++DEF_IE(111_IE_POWER_MGMT, 0x0002, 12);
++/* write only, variable len: 12 + rxqueue_cnt*8 + txqueue_cnt*4: */
++DEF_IE(111_IE_MEMORY_CONFIG, 0x0003, 24);
++DEF_IE(111_IE_BLOCK_SIZE, 0x0004, 8); /* 04000800 AA00AAAA AAAAAAAA */
++/* variable len: 8 + rxqueue_cnt*8 + txqueue_cnt*8: */
++DEF_IE(111_IE_QUEUE_HEAD, 0x0005, 24);
++DEF_IE(111_IE_RATE_FALLBACK, 0x0006, 1);
++/* acx100 name:WEP_OPTIONS */
++/* said to have len:1 (not true, actually returns 12 bytes): */
++DEF_IE(111_IE_RADIO_BAND, 0x0007, 12); /* 07000C00 AAAA1F00 FF03AAAA AAAAAAAA */
++DEF_IE(111_IE_MEMORY_MAP, 0x0008, 48);
++/* said to have len:4, but gives INVAL on read: */
++DEF_IE(111_IE_SCAN_STATUS, 0x0009, -1);
++DEF_IE(111_IE_ASSOC_ID, 0x000a, 2);
++/* write only, len is not known: */
++DEF_IE(111_IE_UNKNOWN_0B, 0x000b, 0);
++/* read only, variable len. I see 67 byte reads: */
++DEF_IE(111_IE_CONFIG_OPTIONS, 0x000c, 67); /* 0C004300 01160500 ... */
++DEF_IE(111_IE_FWREV, 0x000d, 24);
++DEF_IE(111_IE_FCS_ERROR_COUNT, 0x000e, 4);
++DEF_IE(111_IE_MEDIUM_USAGE, 0x000f, 8);
++DEF_IE(111_IE_RXCONFIG, 0x0010, 4);
++DEF_IE(111_IE_QUEUE_THRESH, 0x0011, 12);
++DEF_IE(111_IE_BSS_POWER_SAVE, 0x0012, 1);
++/* read only, variable len. I see 240 byte reads: */
++DEF_IE(111_IE_FIRMWARE_STATISTICS, 0x0013, 240); /* 1300F000 00000000 ... */
++/* said to have len=17. looks like fw pads it to 20: */
++DEF_IE(111_IE_INT_CONFIG, 0x0014, 20); /* 14001400 00000000 00000000 00000000 00000000 00000000 */
++DEF_IE(111_IE_FEATURE_CONFIG, 0x0015, 8);
++/* said to be name:KEY_INDICATOR, len:4, but gives INVAL on read: */
++DEF_IE(111_IE_KEY_CHOOSE, 0x0016, -1);
++/* said to have len:4, but in fact returns 8: */
++DEF_IE(111_IE_MAX_USB_XFR, 0x0017, 8); /* 17000800 00014000 00000000 */
++DEF_IE(111_IE_INVAL_18, 0x0018, -1);
++DEF_IE(111_IE_INVAL_19, 0x0019, -1);
++/* undoc but returns something: */
++/* huh, fw indicates len=20 but uses 4 more bytes in buffer??? */
++DEF_IE(111_IE_UNKNOWN_1A, 0x001A, 20); /* 1A001400 AA00AAAA 0000020F FF030000 00020000 00000007 04000000 */
++
++DEF_IE(111_IE_DOT11_INVAL_1000, 0x1000, -1);
++DEF_IE(111_IE_DOT11_STATION_ID, 0x1001, 6);
++DEF_IE(111_IE_DOT11_FRAG_THRESH, 0x1002, 2);
++/* acx100 only? gives INVAL on read: */
++DEF_IE(111_IE_DOT11_BEACON_PERIOD, 0x1003, -1);
++/* said to be MAX_RECV_MSDU_LIFETIME: */
++DEF_IE(111_IE_DOT11_DTIM_PERIOD, 0x1004, 4);
++DEF_IE(111_IE_DOT11_SHORT_RETRY_LIMIT, 0x1005, 1);
++DEF_IE(111_IE_DOT11_LONG_RETRY_LIMIT, 0x1006, 1);
++/* acx100 only? gives INVAL on read: */
++DEF_IE(111_IE_DOT11_WEP_DEFAULT_KEY_WRITE, 0x1007, -1);
++DEF_IE(111_IE_DOT11_MAX_XMIT_MSDU_LIFETIME, 0x1008, 4);
++/* undoc but returns something. maybe it's 2 multicast MACs to listen to? */
++DEF_IE(111_IE_DOT11_GROUP_ADDR, 0x1009, 12); /* 09100C00 00000000 00000000 00000000 */
++DEF_IE(111_IE_DOT11_CURRENT_REG_DOMAIN, 0x100a, 1);
++DEF_IE(111_IE_DOT11_CURRENT_ANTENNA, 0x100b, 2);
++DEF_IE(111_IE_DOT11_INVAL_100C, 0x100c, -1);
++DEF_IE(111_IE_DOT11_TX_POWER_LEVEL, 0x100d, 1);
++/* said to have len=1 but gives INVAL on read: */
++DEF_IE(111_IE_DOT11_CURRENT_CCA_MODE, 0x100e, -1);
++/* said to have len=4 but gives INVAL on read: */
++DEF_IE(111_IE_DOT11_ED_THRESHOLD, 0x100f, -1);
++/* set default key ID. write only: */
++DEF_IE(111_IE_DOT11_WEP_DEFAULT_KEY_SET, 0x1010, 1);
++/* undoc but returns something: */
++DEF_IE(111_IE_DOT11_UNKNOWN_1011, 0x1011, 1); /* 11100100 20 */
++DEF_IE(111_IE_DOT11_INVAL_1012, 0x1012, -1);
++DEF_IE(111_IE_DOT11_INVAL_1013, 0x1013, -1);
++#endif
++
++
++/***********************************************************************
++**Information Frames Structures
++*/
++
++/* Used in beacon frames and the like */
++#define DOT11RATEBYTE_1 (1*2)
++#define DOT11RATEBYTE_2 (2*2)
++#define DOT11RATEBYTE_5_5 (5*2+1)
++#define DOT11RATEBYTE_11 (11*2)
++#define DOT11RATEBYTE_22 (22*2)
++#define DOT11RATEBYTE_6_G (6*2)
++#define DOT11RATEBYTE_9_G (9*2)
++#define DOT11RATEBYTE_12_G (12*2)
++#define DOT11RATEBYTE_18_G (18*2)
++#define DOT11RATEBYTE_24_G (24*2)
++#define DOT11RATEBYTE_36_G (36*2)
++#define DOT11RATEBYTE_48_G (48*2)
++#define DOT11RATEBYTE_54_G (54*2)
++#define DOT11RATEBYTE_BASIC 0x80 /* flags rates included in basic rate set */
++
++
++/***********************************************************************
++** rxbuffer_t
++**
++** This is the format of rx data returned by acx
++*/
++
++/* I've hoped it's a 802.11 PHY header, but no...
++ * so far, I've seen on acx111:
++ * 0000 3a00 0000 0000 IBSS Beacons
++ * 0000 3c00 0000 0000 ESS Beacons
++ * 0000 2700 0000 0000 Probe requests
++ * --vda
++ */
++typedef struct phy_hdr {
++ u8 unknown[4];
++ u8 acx111_unknown[4];
++} ACX_PACKED phy_hdr_t;
++
++/* seems to be a bit similar to hfa384x_rx_frame.
++ * These fields are still not quite obvious, though.
++ * Some seem to have different meanings... */
++
++#define RXBUF_HDRSIZE 12
++#define RXBUF_BYTES_RCVD(adev, rxbuf) \
++ ((le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0xfff) - (adev)->phy_header_len)
++#define RXBUF_BYTES_USED(rxbuf) \
++ ((le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0xfff) + RXBUF_HDRSIZE)
++/* USBism */
++#define RXBUF_IS_TXSTAT(rxbuf) (le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0x8000)
++/*
++mac_cnt_rcvd:
++ 12 bits: length of frame from control field to first byte of FCS
++ 3 bits: reserved
++ 1 bit: 1 = it's a tx status info, not a rx packet (USB only)
++
++mac_cnt_mblks:
++ 6 bits: number of memory block used to store frame in adapter memory
++ 1 bit: Traffic Indicator bit in TIM of received Beacon was set
++
++mac_status: 1 byte (bitmap):
++ 7 Matching BSSID
++ 6 Matching SSID
++ 5 BDCST Address 1 field is a broadcast
++ 4 VBM received beacon frame has more than one set bit (?!)
++ 3 TIM Set bit representing this station is set in TIM of received beacon
++ 2 GROUP Address 1 is a multicast
++ 1 ADDR1 Address 1 matches our MAC
++ 0 FCSGD FSC is good
++
++phy_stat_baseband: 1 byte (bitmap):
++ 7 Preamble frame had a long preamble
++ 6 PLCP Error CRC16 error in PLCP header
++ 5 Unsup_Mod unsupported modulation
++ 4 Selected Antenna antenna 1 was used to receive this frame
++ 3 PBCC/CCK frame used: 1=PBCC, 0=CCK modulation
++ 2 OFDM frame used OFDM modulation
++ 1 TI Protection protection frame was detected
++ 0 Reserved
++
++phy_plcp_signal: 1 byte:
++ Receive PLCP Signal field from the Baseband Processor
++
++phy_level: 1 byte:
++ receive AGC gain level (can be used to measure receive signal strength)
++
++phy_snr: 1 byte:
++ estimated noise power of equalized receive signal
++ at input of FEC decoder (can be used to measure receive signal quality)
++
++time: 4 bytes:
++ timestamp sampled from either the Access Manager TSF counter
++ or free-running microsecond counter when the MAC receives
++ first byte of PLCP header.
++*/
++
++typedef struct rxbuffer {
++ u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
++ u8 mac_cnt_mblks;
++ u8 mac_status;
++ u8 phy_stat_baseband; /* bit 0x80: used LNA (Low-Noise Amplifier) */
++ u8 phy_plcp_signal;
++ u8 phy_level; /* PHY stat */
++ u8 phy_snr; /* PHY stat */
++ u32 time; /* timestamp upon MAC rcv first byte */
++/* 4-byte (acx100) or 8-byte (acx111) phy header will be here
++** if RX_CFG1_INCLUDE_PHY_HDR is in effect:
++** phy_hdr_t phy */
++ wlan_hdr_a3_t hdr_a3;
++ /* maximally sized data part of wlan packet */
++ u8 data_a3[WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN];
++ /* can add hdr/data_a4 if needed */
++} ACX_PACKED rxbuffer_t;
++
++
++/*--- Firmware statistics ----------------------------------------------------*/
++
++/* define a random 100 bytes more to catch firmware versions which
++ * provide a bigger struct */
++#define FW_STATS_FUTURE_EXTENSION 100
++
++typedef struct fw_stats_tx {
++ u32 tx_desc_of;
++} ACX_PACKED fw_stats_tx_t;
++
++typedef struct fw_stats_rx {
++ u32 rx_oom;
++ u32 rx_hdr_of;
++ u32 rx_hw_stuck; /* old: u32 rx_hdr_use_next */
++ u32 rx_dropped_frame;
++ u32 rx_frame_ptr_err;
++ u32 rx_xfr_hint_trig;
++ u32 rx_aci_events; /* later versions only */
++ u32 rx_aci_resets; /* later versions only */
++} ACX_PACKED fw_stats_rx_t;
++
++typedef struct fw_stats_dma {
++ u32 rx_dma_req;
++ u32 rx_dma_err;
++ u32 tx_dma_req;
++ u32 tx_dma_err;
++} ACX_PACKED fw_stats_dma_t;
++
++typedef struct fw_stats_irq {
++ u32 cmd_cplt;
++ u32 fiq;
++ u32 rx_hdrs;
++ u32 rx_cmplt;
++ u32 rx_mem_of;
++ u32 rx_rdys;
++ u32 irqs;
++ u32 tx_procs;
++ u32 decrypt_done;
++ u32 dma_0_done;
++ u32 dma_1_done;
++ u32 tx_exch_complet;
++ u32 commands;
++ u32 rx_procs;
++ u32 hw_pm_mode_changes;
++ u32 host_acks;
++ u32 pci_pm;
++ u32 acm_wakeups;
++} ACX_PACKED fw_stats_irq_t;
++
++typedef struct fw_stats_wep {
++ u32 wep_key_count;
++ u32 wep_default_key_count;
++ u32 dot11_def_key_mib;
++ u32 wep_key_not_found;
++ u32 wep_decrypt_fail;
++ u32 wep_pkt_decrypt;
++ u32 wep_decrypt_irqs;
++} ACX_PACKED fw_stats_wep_t;
++
++typedef struct fw_stats_pwr {
++ u32 tx_start_ctr;
++ u32 no_ps_tx_too_short;
++ u32 rx_start_ctr;
++ u32 no_ps_rx_too_short;
++ u32 lppd_started;
++ u32 no_lppd_too_noisy;
++ u32 no_lppd_too_short;
++ u32 no_lppd_matching_frame;
++} ACX_PACKED fw_stats_pwr_t;
++
++typedef struct fw_stats_mic {
++ u32 mic_rx_pkts;
++ u32 mic_calc_fail;
++} ACX_PACKED fw_stats_mic_t;
++
++typedef struct fw_stats_aes {
++ u32 aes_enc_fail;
++ u32 aes_dec_fail;
++ u32 aes_enc_pkts;
++ u32 aes_dec_pkts;
++ u32 aes_enc_irq;
++ u32 aes_dec_irq;
++} ACX_PACKED fw_stats_aes_t;
++
++typedef struct fw_stats_event {
++ u32 heartbeat;
++ u32 calibration;
++ u32 rx_mismatch;
++ u32 rx_mem_empty;
++ u32 rx_pool;
++ u32 oom_late;
++ u32 phy_tx_err;
++ u32 tx_stuck;
++} ACX_PACKED fw_stats_event_t;
++
++/* mainly for size calculation only */
++typedef struct fw_stats {
++ u16 type;
++ u16 len;
++ fw_stats_tx_t tx;
++ fw_stats_rx_t rx;
++ fw_stats_dma_t dma;
++ fw_stats_irq_t irq;
++ fw_stats_wep_t wep;
++ fw_stats_pwr_t pwr;
++ fw_stats_mic_t mic;
++ fw_stats_aes_t aes;
++ fw_stats_event_t evt;
++ u8 _padding[FW_STATS_FUTURE_EXTENSION];
++} fw_stats_t;
++
++/* Firmware version struct */
++
++typedef struct fw_ver {
++ u16 cmd;
++ u16 size;
++ char fw_id[20];
++ u32 hw_id;
++} ACX_PACKED fw_ver_t;
++
++#define FW_ID_SIZE 20
++
++typedef struct shared_queueindicator {
++ u32 indicator;
++ u16 host_lock;
++ u16 fw_lock;
++} ACX_PACKED queueindicator_t;
++
++/*--- WEP stuff --------------------------------------------------------------*/
++#define DOT11_MAX_DEFAULT_WEP_KEYS 4
++
++/* non-firmware struct, no packing necessary */
++typedef struct wep_key {
++ size_t size; /* most often used member first */
++ u8 index;
++ u8 key[29];
++ u16 strange_filler;
++} wep_key_t; /* size = 264 bytes (33*8) */
++/* FIXME: We don't have size 264! Or is there 2 bytes beyond the key
++ * (strange_filler)? */
++
++/* non-firmware struct, no packing necessary */
++typedef struct key_struct {
++ u8 addr[ETH_ALEN]; /* 0x00 */
++ u16 filler1; /* 0x06 */
++ u32 filler2; /* 0x08 */
++ u32 index; /* 0x0c */
++ u16 len; /* 0x10 */
++ u8 key[29]; /* 0x12; is this long enough??? */
++} key_struct_t; /* size = 276. FIXME: where is the remaining space?? */
++
++
++/*--- Client (peer) info -----------------------------------------------------*/
++/* adev->sta_list[] is used for:
++** accumulating and processing of scan results
++** keeping client info in AP mode
++** keeping AP info in STA mode (AP is the only one 'client')
++** keeping peer info in ad-hoc mode
++** non-firmware struct --> no packing necessary */
++enum {
++ CLIENT_EMPTY_SLOT_0 = 0,
++ CLIENT_EXIST_1 = 1,
++ CLIENT_AUTHENTICATED_2 = 2,
++ CLIENT_ASSOCIATED_3 = 3,
++ CLIENT_JOIN_CANDIDATE = 4
++};
++struct client {
++ /* most frequent access first */
++ u8 used; /* misnamed, more like 'status' */
++ struct client* next;
++ unsigned long mtime; /* last time we heard it, in jiffies */
++ size_t essid_len; /* length of ESSID (without '\0') */
++ u32 sir; /* Standard IR */
++ u32 snr; /* Signal to Noise Ratio */
++ u16 aid; /* association ID */
++ u16 seq; /* from client's auth req */
++ u16 auth_alg; /* from client's auth req */
++ u16 cap_info; /* from client's assoc req */
++ u16 rate_cap; /* what client supports (all rates) */
++ u16 rate_bas; /* what client supports (basic rates) */
++ u16 rate_cfg; /* what is allowed (by iwconfig etc) */
++ u16 rate_cur; /* currently used rate mask */
++ u8 rate_100; /* currently used rate byte (acx100 only) */
++ u8 address[ETH_ALEN];
++ u8 bssid[ETH_ALEN]; /* ad-hoc hosts can have bssid != mac */
++ u8 channel;
++ u8 auth_step;
++ u8 ignore_count;
++ u8 fallback_count;
++ u8 stepup_count;
++ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID and trailing '\0' */
++/* FIXME: this one is too damn big */
++ char challenge_text[WLAN_CHALLENGE_LEN];
++};
++
++
++/***********************************************************************
++** Hardware structures
++*/
++
++/* An opaque typesafe helper type
++ *
++ * Some hardware fields are actually pointers,
++ * but they have to remain u32, since using ptr instead
++ * (8 bytes on 64bit systems!) would disrupt the fixed descriptor
++ * format the acx firmware expects in the non-user area.
++ * Since we cannot cram an 8 byte ptr into 4 bytes, we need to
++ * enforce that pointed to data remains in low memory
++ * (address value needs to fit in 4 bytes) on 64bit systems.
++ *
++ * This is easy to get wrong, thus we are using a small struct
++ * and special macros to access it. Macros will check for
++ * attempts to overflow an acx_ptr with value > 0xffffffff.
++ *
++ * Attempts to use acx_ptr without macros result in compile-time errors */
++
++typedef struct {
++ u32 v;
++} ACX_PACKED acx_ptr;
++
++#if ACX_DEBUG
++#define CHECK32(n) BUG_ON(sizeof(n)>4 && (long)(n)>0xffffff00)
++#else
++#define CHECK32(n) ((void)0)
++#endif
++
++/* acx_ptr <-> integer conversion */
++#define cpu2acx(n) ({ CHECK32(n); ((acx_ptr){ .v = cpu_to_le32(n) }); })
++#define acx2cpu(a) (le32_to_cpu(a.v))
++
++/* acx_ptr <-> pointer conversion */
++#define ptr2acx(p) ({ CHECK32(p); ((acx_ptr){ .v = cpu_to_le32((u32)(long)(p)) }); })
++#define acx2ptr(a) ((void*)le32_to_cpu(a.v))
++
++/* Values for rate field (acx100 only) */
++#define RATE100_1 10
++#define RATE100_2 20
++#define RATE100_5 55
++#define RATE100_11 110
++#define RATE100_22 220
++/* This bit denotes use of PBCC:
++** (PBCC encoding is usable with 11 and 22 Mbps speeds only) */
++#define RATE100_PBCC511 0x80
++
++/* Bit values for rate111 field */
++#define RATE111_1 0x0001 /* DBPSK */
++#define RATE111_2 0x0002 /* DQPSK */
++#define RATE111_5 0x0004 /* CCK or PBCC */
++#define RATE111_6 0x0008 /* CCK-OFDM or OFDM */
++#define RATE111_9 0x0010 /* CCK-OFDM or OFDM */
++#define RATE111_11 0x0020 /* CCK or PBCC */
++#define RATE111_12 0x0040 /* CCK-OFDM or OFDM */
++#define RATE111_18 0x0080 /* CCK-OFDM or OFDM */
++#define RATE111_22 0x0100 /* PBCC */
++#define RATE111_24 0x0200 /* CCK-OFDM or OFDM */
++#define RATE111_36 0x0400 /* CCK-OFDM or OFDM */
++#define RATE111_48 0x0800 /* CCK-OFDM or OFDM */
++#define RATE111_54 0x1000 /* CCK-OFDM or OFDM */
++#define RATE111_RESERVED 0x2000
++#define RATE111_PBCC511 0x4000 /* PBCC mod at 5.5 or 11Mbit (else CCK) */
++#define RATE111_SHORTPRE 0x8000 /* short preamble */
++/* Special 'try everything' value */
++#define RATE111_ALL 0x1fff
++/* These bits denote acx100 compatible settings */
++#define RATE111_ACX100_COMPAT 0x0127
++/* These bits denote 802.11b compatible settings */
++#define RATE111_80211B_COMPAT 0x0027
++
++/* Descriptor Ctl field bits
++ * init value is 0x8e, "idle" value is 0x82 (in idle tx descs)
++ */
++#define DESC_CTL_SHORT_PREAMBLE 0x01 /* preamble type: 0 = long; 1 = short */
++#define DESC_CTL_FIRSTFRAG 0x02 /* this is the 1st frag of the frame */
++#define DESC_CTL_AUTODMA 0x04
++#define DESC_CTL_RECLAIM 0x08 /* ready to reuse */
++#define DESC_CTL_HOSTDONE 0x20 /* host has finished processing */
++#define DESC_CTL_ACXDONE 0x40 /* acx has finished processing */
++/* host owns the desc [has to be released last, AFTER modifying all other desc fields!] */
++#define DESC_CTL_HOSTOWN 0x80
++#define DESC_CTL_ACXDONE_HOSTOWN (DESC_CTL_ACXDONE | DESC_CTL_HOSTOWN)
++
++/* Descriptor Status field
++ */
++#define DESC_STATUS_FULL (1 << 31)
++
++/* NB: some bits may be interesting for Monitor mode tx (aka Raw tx): */
++#define DESC_CTL2_SEQ 0x01 /* don't increase sequence field */
++#define DESC_CTL2_FCS 0x02 /* don't add the FCS */
++#define DESC_CTL2_MORE_FRAG 0x04
++#define DESC_CTL2_RETRY 0x08 /* don't increase retry field */
++#define DESC_CTL2_POWER 0x10 /* don't increase power mgmt. field */
++#define DESC_CTL2_RTS 0x20 /* do RTS/CTS magic before sending */
++#define DESC_CTL2_WEP 0x40 /* encrypt this frame */
++#define DESC_CTL2_DUR 0x80 /* don't increase duration field */
++
++/***********************************************************************
++** PCI structures
++*/
++/* IRQ Constants
++** (outside of "#ifdef PCI" because USB (mis)uses HOST_INT_SCAN_COMPLETE) */
++#define HOST_INT_RX_DATA 0x0001
++#define HOST_INT_TX_COMPLETE 0x0002
++#define HOST_INT_TX_XFER 0x0004
++#define HOST_INT_RX_COMPLETE 0x0008
++#define HOST_INT_DTIM 0x0010
++#define HOST_INT_BEACON 0x0020
++#define HOST_INT_TIMER 0x0040
++#define HOST_INT_KEY_NOT_FOUND 0x0080
++#define HOST_INT_IV_ICV_FAILURE 0x0100
++#define HOST_INT_CMD_COMPLETE 0x0200
++#define HOST_INT_INFO 0x0400
++#define HOST_INT_OVERFLOW 0x0800
++#define HOST_INT_PROCESS_ERROR 0x1000
++#define HOST_INT_SCAN_COMPLETE 0x2000
++#define HOST_INT_FCS_THRESHOLD 0x4000
++#define HOST_INT_UNKNOWN 0x8000
++
++/* Outside of "#ifdef PCI" because USB needs to know sizeof()
++** of txdesc and rxdesc: */
++struct txdesc {
++ acx_ptr pNextDesc; /* pointer to next txdesc */
++ acx_ptr HostMemPtr; /* 0x04 */
++ acx_ptr AcxMemPtr; /* 0x08 */
++ u32 tx_time; /* 0x0c */
++ u16 total_length; /* 0x10 */
++ u16 Reserved; /* 0x12 */
++
++/* The following 16 bytes do not change when acx100 owns the descriptor */
++/* BUG: fw clears last byte of this area which is supposedly reserved
++** for driver use. amd64 blew up. We dare not use it now */
++ u32 dummy[4];
++
++ u8 Ctl_8; /* 0x24, 8bit value */
++ u8 Ctl2_8; /* 0x25, 8bit value */
++ u8 error; /* 0x26 */
++ u8 ack_failures; /* 0x27 */
++
++ union {
++ /*
++ * Packing doesn't work correctly on ARM unless unions are on
++ * 4 byte boundaries.
++ */
++ struct {
++ u8 rts_failures; /* 0x28 */
++ u8 rts_ok; /* 0x29 */
++ u16 d1;
++ } ACX_PACKED rts;
++ struct {
++ u16 d1;
++ u8 rate; /* 0x2a */
++ u8 queue_ctrl; /* 0x2b */
++ } ACX_PACKED r1;
++ struct {
++ u16 d1;
++ u16 rate111; /* 0x2a */
++ } ACX_PACKED r2;
++ } ACX_PACKED u;
++ u32 queue_info; /* 0x2c (acx100, reserved on acx111) */
++} ACX_PACKED; /* size : 48 = 0x30 */
++/* NB: acx111 txdesc structure is 4 byte larger */
++/* All these 4 extra bytes are reserved. tx alloc code takes them into account */
++
++struct rxdesc {
++ acx_ptr pNextDesc; /* 0x00 */
++ acx_ptr HostMemPtr; /* 0x04 */
++ acx_ptr ACXMemPtr; /* 0x08 */
++ u32 rx_time; /* 0x0c */
++ u16 total_length; /* 0x10 */
++ u16 WEP_length; /* 0x12 */
++ u32 WEP_ofs; /* 0x14 */
++
++/* the following 16 bytes do not change when acx100 owns the descriptor */
++ u8 driverWorkspace[16]; /* 0x18 */
++
++ u8 Ctl_8;
++ u8 rate;
++ u8 error;
++ u8 SNR; /* Signal-to-Noise Ratio */
++ u8 RxLevel;
++ u8 queue_ctrl;
++ u16 unknown;
++ u32 unknown2;
++} ACX_PACKED; /* size 52 = 0x34 */
++
++#if defined(ACX_PCI) || defined(ACX_MEM)
++
++/* Register I/O offsets */
++#define ACX100_EEPROM_ID_OFFSET 0x380
++
++/* please add further ACX hardware register definitions only when
++ it turns out you need them in the driver, and please try to use
++ firmware functionality instead, since using direct I/O access instead
++ of letting the firmware do it might confuse the firmware's state
++ machine */
++
++/* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
++** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
++enum {
++ IO_ACX_SOFT_RESET = 0,
++
++ IO_ACX_SLV_MEM_ADDR,
++ IO_ACX_SLV_MEM_DATA,
++ IO_ACX_SLV_MEM_CTL,
++ IO_ACX_SLV_END_CTL,
++
++ IO_ACX_FEMR, /* Function Event Mask */
++
++ IO_ACX_INT_TRIG,
++ IO_ACX_IRQ_MASK,
++ IO_ACX_IRQ_STATUS_NON_DES,
++ IO_ACX_IRQ_STATUS_CLEAR, /* CLEAR = clear on read */
++ IO_ACX_IRQ_ACK,
++ IO_ACX_HINT_TRIG,
++
++ IO_ACX_ENABLE,
++
++ IO_ACX_EEPROM_CTL,
++ IO_ACX_EEPROM_ADDR,
++ IO_ACX_EEPROM_DATA,
++ IO_ACX_EEPROM_CFG,
++
++ IO_ACX_PHY_ADDR,
++ IO_ACX_PHY_DATA,
++ IO_ACX_PHY_CTL,
++
++ IO_ACX_GPIO_OE,
++
++ IO_ACX_GPIO_OUT,
++
++ IO_ACX_CMD_MAILBOX_OFFS,
++ IO_ACX_INFO_MAILBOX_OFFS,
++ IO_ACX_EEPROM_INFORMATION,
++
++ IO_ACX_EE_START,
++ IO_ACX_SOR_CFG,
++ IO_ACX_ECPU_CTRL
++};
++/* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
++** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
++
++/* Values for IO_ACX_INT_TRIG register: */
++/* inform hw that rxdesc in queue needs processing */
++#define INT_TRIG_RXPRC 0x08
++/* inform hw that txdesc in queue needs processing */
++#define INT_TRIG_TXPRC 0x04
++/* ack that we received info from info mailbox */
++#define INT_TRIG_INFOACK 0x02
++/* inform hw that we have filled command mailbox */
++#define INT_TRIG_CMD 0x01
++
++struct txhostdesc {
++ acx_ptr data_phy; /* 0x00 [u8 *] */
++ u16 data_offset; /* 0x04 */
++ u16 reserved; /* 0x06 */
++ u16 Ctl_16; /* 16bit value, endianness!! */
++ u16 length; /* 0x0a */
++ acx_ptr desc_phy_next; /* 0x0c [txhostdesc *] */
++ acx_ptr pNext; /* 0x10 [txhostdesc *] */
++ u32 Status; /* 0x14, unused on Tx */
++/* From here on you can use this area as you want (variable length, too!) */
++ u8 *data;
++} ACX_PACKED;
++
++struct rxhostdesc {
++ acx_ptr data_phy; /* 0x00 [rxbuffer_t *] */
++ u16 data_offset; /* 0x04 */
++ u16 reserved; /* 0x06 */
++ u16 Ctl_16; /* 0x08; 16bit value, endianness!! */
++ u16 length; /* 0x0a */
++ acx_ptr desc_phy_next; /* 0x0c [rxhostdesc_t *] */
++ acx_ptr pNext; /* 0x10 [rxhostdesc_t *] */
++ u32 Status; /* 0x14 */
++/* From here on you can use this area as you want (variable length, too!) */
++ rxbuffer_t *data;
++} ACX_PACKED;
++
++#endif /* ACX_PCI */
++
++/***********************************************************************
++** USB structures and constants
++*/
++#ifdef ACX_USB
++
++/* Used for usb_txbuffer.desc field */
++#define USB_TXBUF_TXDESC 0xA
++/* Size of header (everything up to data[]) */
++#define USB_TXBUF_HDRSIZE 14
++typedef struct usb_txbuffer {
++ u16 desc;
++ u16 mpdu_len;
++ u8 queue_index;
++ u8 rate;
++ u32 hostdata;
++ u8 ctrl1;
++ u8 ctrl2;
++ u16 data_len;
++ /* wlan packet content is placed here: */
++ u8 data[WLAN_A4FR_MAXLEN_WEP_FCS];
++} ACX_PACKED usb_txbuffer_t;
++
++/* USB returns either rx packets (see rxbuffer) or
++** these "tx status" structs: */
++typedef struct usb_txstatus {
++ u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
++ u8 queue_index;
++ u8 mac_status; /* seen 0x20 on tx failure */
++ u32 hostdata;
++ u8 rate;
++ u8 ack_failures;
++ u8 rts_failures;
++ u8 rts_ok;
++} ACX_PACKED usb_txstatus_t;
++
++typedef struct usb_tx {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ /* actual USB bulk output data block is here: */
++ usb_txbuffer_t bulkout;
++} usb_tx_t;
++
++struct usb_rx_plain {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ rxbuffer_t bulkin;
++};
++
++typedef struct usb_rx {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ rxbuffer_t bulkin;
++ /* Make entire structure 4k. Report if it breaks something. */
++ u8 padding[4*1024 - sizeof(struct usb_rx_plain)];
++} usb_rx_t;
++#endif /* ACX_USB */
++
++
++/* Config Option structs */
++
++typedef struct co_antennas {
++ u8 type;
++ u8 len;
++ u8 list[2];
++} ACX_PACKED co_antennas_t;
++
++typedef struct co_powerlevels {
++ u8 type;
++ u8 len;
++ u16 list[8];
++} ACX_PACKED co_powerlevels_t;
++
++typedef struct co_datarates {
++ u8 type;
++ u8 len;
++ u8 list[8];
++} ACX_PACKED co_datarates_t;
++
++typedef struct co_domains {
++ u8 type;
++ u8 len;
++ u8 list[6];
++} ACX_PACKED co_domains_t;
++
++typedef struct co_product_id {
++ u8 type;
++ u8 len;
++ u8 list[128];
++} ACX_PACKED co_product_id_t;
++
++typedef struct co_manuf_id {
++ u8 type;
++ u8 len;
++ u8 list[128];
++} ACX_PACKED co_manuf_t;
++
++typedef struct co_fixed {
++ char NVSv[8];
++/* u16 NVS_vendor_offs; ACX111-only */
++/* u16 unknown; ACX111-only */
++ u8 MAC[6]; /* ACX100-only */
++ u16 probe_delay; /* ACX100-only */
++ u32 eof_memory;
++ u8 dot11CCAModes;
++ u8 dot11Diversity;
++ u8 dot11ShortPreambleOption;
++ u8 dot11PBCCOption;
++ u8 dot11ChannelAgility;
++ u8 dot11PhyType; /* FIXME: does 802.11 call it "dot11PHYType"? */
++ u8 dot11TempType;
++ u8 table_count;
++} ACX_PACKED co_fixed_t;
++
++typedef struct acx111_ie_configoption {
++ u16 type;
++ u16 len;
++/* Do not access below members directly, they are in fact variable length */
++ co_fixed_t fixed;
++ co_antennas_t antennas;
++ co_powerlevels_t power_levels;
++ co_datarates_t data_rates;
++ co_domains_t domains;
++ co_product_id_t product_id;
++ co_manuf_t manufacturer;
++ u8 _padding[4];
++} ACX_PACKED acx111_ie_configoption_t;
++
++
++/***********************************************************************
++** Main acx per-device data structure
++*/
++#define ACX_STATE_FW_LOADED 0x01
++#define ACX_STATE_IFACE_UP 0x02
++
++/* MAC mode (BSS type) defines
++ * Note that they shouldn't be redefined, since they are also used
++ * during communication with firmware */
++#define ACX_MODE_0_ADHOC 0
++#define ACX_MODE_1_UNUSED 1
++#define ACX_MODE_2_STA 2
++#define ACX_MODE_3_AP 3
++/* These are our own inventions. Sending these to firmware
++** makes it stop emitting beacons, which is exactly what we want
++** for these modes */
++#define ACX_MODE_MONITOR 0xfe
++#define ACX_MODE_OFF 0xff
++/* 'Submode': identifies exact status of ADHOC/STA host */
++#define ACX_STATUS_0_STOPPED 0
++#define ACX_STATUS_1_SCANNING 1
++#define ACX_STATUS_2_WAIT_AUTH 2
++#define ACX_STATUS_3_AUTHENTICATED 3
++#define ACX_STATUS_4_ASSOCIATED 4
++
++/* FIXME: this should be named something like struct acx_priv (typedef'd to
++ * acx_priv_t) */
++
++/* non-firmware struct, no packing necessary */
++struct acx_device {
++ /* most frequent accesses first (dereferencing and cache line!) */
++
++ /*** Locking ***/
++ /* FIXME: try to convert semaphore to more efficient mutex according
++ to Ingo Molnar's docs (but not before driver is in mainline or
++ pre-mutex Linux 2.6.10 is very outdated). */
++ struct semaphore sem;
++ spinlock_t lock;
++#if defined(PARANOID_LOCKING) /* Lock debugging */
++ const char *last_sem;
++ const char *last_lock;
++ unsigned long sem_time;
++ unsigned long lock_time;
++#endif
++#ifdef ACX_MEM
++ spinlock_t txbuf_lock;
++#endif
++
++ /*** Linux network device ***/
++ struct net_device *ndev; /* pointer to linux netdevice */
++
++ /*** Device statistics ***/
++ struct net_device_stats stats; /* net device statistics */
++#ifdef WIRELESS_EXT
++ struct iw_statistics wstats; /* wireless statistics */
++#endif
++ /*** Power managment ***/
++ struct pm_dev *pm; /* PM crap */
++
++ /*** Management timer ***/
++ struct timer_list mgmt_timer;
++
++ /*** Hardware identification ***/
++ const char *chip_name;
++ u8 dev_type;
++ u8 chip_type;
++ u8 form_factor;
++ u8 radio_type;
++ u8 eeprom_version;
++
++ /*** Config retrieved from EEPROM ***/
++ char cfgopt_NVSv[8];
++ u16 cfgopt_NVS_vendor_offs;
++ u8 cfgopt_MAC[6];
++ u16 cfgopt_probe_delay;
++ u32 cfgopt_eof_memory;
++ u8 cfgopt_dot11CCAModes;
++ u8 cfgopt_dot11Diversity;
++ u8 cfgopt_dot11ShortPreambleOption;
++ u8 cfgopt_dot11PBCCOption;
++ u8 cfgopt_dot11ChannelAgility;
++ u8 cfgopt_dot11PhyType;
++ u8 cfgopt_dot11TempType;
++ co_antennas_t cfgopt_antennas;
++ co_powerlevels_t cfgopt_power_levels;
++ co_datarates_t cfgopt_data_rates;
++ co_domains_t cfgopt_domains;
++ co_product_id_t cfgopt_product_id;
++ co_manuf_t cfgopt_manufacturer;
++
++ /*** Firmware identification ***/
++ char firmware_version[FW_ID_SIZE+1];
++ u32 firmware_numver;
++ u32 firmware_id;
++ const u16 *ie_len;
++ const u16 *ie_len_dot11;
++
++ /*** Device state ***/
++ u16 dev_state_mask;
++ u8 led_power; /* power LED status */
++ u32 get_mask; /* mask of settings to fetch from the card */
++ u32 set_mask; /* mask of settings to write to the card */
++
++ /* Barely used in USB case */
++ u16 irq_status;
++
++ u8 after_interrupt_jobs; /* mini job list for doing actions after an interrupt occurred */
++ WORK_STRUCT after_interrupt_task; /* our task for after interrupt actions */
++
++ /*** scanning ***/
++ u16 scan_count; /* number of times to do channel scan */
++ u8 scan_mode; /* 0 == active, 1 == passive, 2 == background */
++ u8 scan_rate;
++ u16 scan_duration;
++ u16 scan_probe_delay;
++#if WIRELESS_EXT > 15
++ struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
++#endif
++
++ /*** Wireless network settings ***/
++ /* copy of the device address (ifconfig hw ether) that we actually use
++ ** for 802.11; copied over from the network device's MAC address
++ ** (ifconfig) when it makes sense only */
++ u8 dev_addr[MAX_ADDR_LEN];
++ u8 bssid[ETH_ALEN]; /* the BSSID after having joined */
++ u8 ap[ETH_ALEN]; /* The AP we want, FF:FF:FF:FF:FF:FF is any */
++ u16 aid; /* The Association ID sent from the AP / last used AID if we're an AP */
++ u16 mode; /* mode from iwconfig */
++ int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */
++ u16 status; /* 802.11 association status */
++ u8 essid_active; /* specific ESSID active, or select any? */
++ u8 essid_len; /* to avoid dozens of strlen() */
++ /* INCLUDES \0 termination for easy printf - but many places
++ ** simply want the string data memcpy'd plus a length indicator!
++ ** Keep that in mind... */
++ char essid[IW_ESSID_MAX_SIZE+1];
++ /* essid we are going to use for association, in case of "essid 'any'"
++ ** and in case of hidden ESSID (use configured ESSID then) */
++ char essid_for_assoc[IW_ESSID_MAX_SIZE+1];
++ char nick[IW_ESSID_MAX_SIZE+1]; /* see essid! */
++ u8 channel;
++ u8 reg_dom_id; /* reg domain setting */
++ u16 reg_dom_chanmask;
++ u16 auth_or_assoc_retries;
++ u16 scan_retries;
++ unsigned long scan_start; /* YES, jiffies is defined as "unsigned long" */
++
++ /* stations known to us (if we're an ap) */
++ client_t sta_list[32]; /* tab is larger than list, so that */
++ client_t *sta_hash_tab[64]; /* hash collisions are not likely */
++ client_t *ap_client; /* this one is our AP (STA mode only) */
++
++ int dup_count;
++ int nondup_count;
++ unsigned long dup_msg_expiry;
++ u16 last_seq_ctrl; /* duplicate packet detection */
++
++ /* 802.11 power save mode */
++ u8 ps_wakeup_cfg;
++ u8 ps_listen_interval;
++ u8 ps_options;
++ u8 ps_hangover_period;
++ u32 ps_enhanced_transition_time;
++ u32 ps_beacon_rx_time;
++
++ /*** PHY settings ***/
++ u8 fallback_threshold;
++ u8 stepup_threshold;
++ u16 rate_basic;
++ u16 rate_oper;
++ u16 rate_bcast;
++ u16 rate_bcast100;
++ u8 rate_auto; /* false if "iwconfig rate N" (WITHOUT 'auto'!) */
++ u8 preamble_mode; /* 0 == Long Preamble, 1 == Short, 2 == Auto */
++ u8 preamble_cur;
++
++ u8 tx_disabled;
++ u8 tx_level_dbm;
++ /* u8 tx_level_val; */
++ /* u8 tx_level_auto; whether to do automatic power adjustment */
++
++ unsigned long recalib_time_last_success;
++ unsigned long recalib_time_last_attempt;
++ int recalib_failure_count;
++ int recalib_msg_ratelimit;
++ int retry_errors_msg_ratelimit;
++
++ unsigned long brange_time_last_state_change; /* time the power LED was last changed */
++ u8 brange_last_state; /* last state of the LED */
++ u8 brange_max_quality; /* maximum quality that equates to full speed */
++
++ u8 sensitivity;
++ u8 antenna; /* antenna settings */
++ u8 ed_threshold; /* energy detect threshold */
++ u8 cca; /* clear channel assessment */
++
++ u16 rts_threshold;
++ u16 frag_threshold;
++ u32 short_retry;
++ u32 long_retry;
++ u16 msdu_lifetime;
++ u16 listen_interval; /* given in units of beacon interval */
++ u32 beacon_interval;
++
++ u16 capabilities;
++ u8 rate_supported_len;
++ u8 rate_supported[13];
++
++ /*** Encryption settings (WEP) ***/
++ u32 auth_alg; /* used in transmit_authen1 */
++ u8 wep_enabled;
++ u8 wep_restricted;
++ u8 wep_current_index;
++ wep_key_t wep_keys[DOT11_MAX_DEFAULT_WEP_KEYS]; /* the default WEP keys */
++ key_struct_t wep_key_struct[10];
++
++ /*** Unknown ***/
++ u8 dtim_interval;
++
++#ifdef ACX_MEM
++ u32 acx_txbuf_start;
++ int acx_txbuf_numblocks;
++ u32 acx_txbuf_free; /* addr of head of free list */
++ int acx_txbuf_blocks_free; /* how many are still open */
++ queueindicator_t *acx_queue_indicator;
++#endif
++
++ /*** Card Rx/Tx management ***/
++ u16 rx_config_1;
++ u16 rx_config_2;
++ u16 memblocksize;
++ unsigned int tx_free;
++ unsigned int tx_head; /* keep as close as possible to Tx stuff below (cache line) */
++ u16 phy_header_len;
++
++/*************************************************************************
++ *** PCI/USB/... must be last or else hw agnostic code breaks horribly ***
++ *************************************************************************/
++
++ /* hack to let common code compile. FIXME */
++ dma_addr_t rxhostdesc_startphy;
++
++ /*** PCI stuff ***/
++#if defined(ACX_PCI) || defined(ACX_MEM)
++ /* pointers to tx buffers, tx host descriptors (in host memory)
++ ** and tx descs in device memory */
++ unsigned int tx_tail;
++ u8 *txbuf_start;
++ txhostdesc_t *txhostdesc_start;
++ txdesc_t *txdesc_start; /* points to PCI-mapped memory */
++ dma_addr_t txbuf_startphy;
++ dma_addr_t txhostdesc_startphy;
++ /* sizes of above host memory areas */
++ unsigned int txbuf_area_size;
++ unsigned int txhostdesc_area_size;
++
++ unsigned int txdesc_size; /* size of txdesc; ACX111 = ACX100 + 4 */
++ client_t *txc[TX_CNT];
++ u16 txr[TX_CNT];
++
++ /* same for rx */
++ unsigned int rx_tail;
++ rxbuffer_t *rxbuf_start;
++ rxhostdesc_t *rxhostdesc_start;
++ rxdesc_t *rxdesc_start;
++ /* physical addresses of above host memory areas */
++ dma_addr_t rxbuf_startphy;
++ /* dma_addr_t rxhostdesc_startphy; */
++ unsigned int rxbuf_area_size;
++ unsigned int rxhostdesc_area_size;
++
++ u8 need_radio_fw;
++ u8 irqs_active; /* whether irq sending is activated */
++
++ const u16 *io; /* points to ACX100 or ACX111 PCI I/O register address set */
++
++#ifdef ACX_PCI
++ struct pci_dev *pdev;
++#endif
++#ifdef ACX_MEM
++ struct device *dev;
++#endif
++
++#ifdef ACX_PCI
++ unsigned long membase;
++#endif
++#ifdef ACX_MEM
++ volatile u32 *membase;
++#endif
++ unsigned long membase2;
++#ifdef ACX_PCI
++ void __iomem *iobase;
++#endif
++#ifdef ACX_MEM
++ volatile u32 *iobase;
++#endif
++ void __iomem *iobase2;
++ /* command interface */
++ u8 __iomem *cmd_area;
++ u8 __iomem *info_area;
++
++ u16 irq_mask; /* interrupt types to mask out (not wanted) with many IRQs activated */
++ u16 irq_mask_off; /* interrupt types to mask out (not wanted) with IRQs off */
++ unsigned int irq_loops_this_jiffy;
++ unsigned long irq_last_jiffies;
++#endif
++
++ /*** USB stuff ***/
++#ifdef ACX_USB
++ struct usb_device *usbdev;
++
++ rxbuffer_t rxtruncbuf;
++
++ usb_tx_t *usb_tx;
++ usb_rx_t *usb_rx;
++
++ int bulkinep; /* bulk-in endpoint */
++ int bulkoutep; /* bulk-out endpoint */
++ int rxtruncsize;
++#endif
++
++};
++
++static inline acx_device_t*
++ndev2adev(struct net_device *ndev)
++{
++ return netdev_priv(ndev);
++}
++
++
++/* For use with ACX1xx_IE_RXCONFIG */
++/* bit description
++ * 13 include additional header (length etc.) *required*
++ * struct is defined in 'struct rxbuffer'
++ * is this bit acx100 only? does acx111 always put the header,
++ * and bit setting is irrelevant? --vda
++ * 10 receive frames only with SSID used in last join cmd
++ * 9 discard broadcast
++ * 8 receive packets for multicast address 1
++ * 7 receive packets for multicast address 0
++ * 6 discard all multicast packets
++ * 5 discard frames from foreign BSSID
++ * 4 discard frames with foreign destination MAC address
++ * 3 promiscuous mode (receive ALL frames, disable filter)
++ * 2 include FCS
++ * 1 include phy header
++ * 0 ???
++ */
++#define RX_CFG1_INCLUDE_RXBUF_HDR 0x2000 /* ACX100 only */
++#define RX_CFG1_FILTER_SSID 0x0400
++#define RX_CFG1_FILTER_BCAST 0x0200
++#define RX_CFG1_RCV_MC_ADDR1 0x0100
++#define RX_CFG1_RCV_MC_ADDR0 0x0080
++#define RX_CFG1_FILTER_ALL_MULTI 0x0040
++#define RX_CFG1_FILTER_BSSID 0x0020
++#define RX_CFG1_FILTER_MAC 0x0010
++#define RX_CFG1_RCV_PROMISCUOUS 0x0008
++#define RX_CFG1_INCLUDE_FCS 0x0004
++#define RX_CFG1_INCLUDE_PHY_HDR (WANT_PHY_HDR ? 0x0002 : 0)
++/* bit description
++ * 11 receive association requests etc.
++ * 10 receive authentication frames
++ * 9 receive beacon frames
++ * 8 receive contention free packets
++ * 7 receive control frames
++ * 6 receive data frames
++ * 5 receive broken frames
++ * 4 receive management frames
++ * 3 receive probe requests
++ * 2 receive probe responses
++ * 1 receive RTS/CTS/ACK frames
++ * 0 receive other
++ */
++#define RX_CFG2_RCV_ASSOC_REQ 0x0800
++#define RX_CFG2_RCV_AUTH_FRAMES 0x0400
++#define RX_CFG2_RCV_BEACON_FRAMES 0x0200
++#define RX_CFG2_RCV_CONTENTION_FREE 0x0100
++#define RX_CFG2_RCV_CTRL_FRAMES 0x0080
++#define RX_CFG2_RCV_DATA_FRAMES 0x0040
++#define RX_CFG2_RCV_BROKEN_FRAMES 0x0020
++#define RX_CFG2_RCV_MGMT_FRAMES 0x0010
++#define RX_CFG2_RCV_PROBE_REQ 0x0008
++#define RX_CFG2_RCV_PROBE_RESP 0x0004
++#define RX_CFG2_RCV_ACK_FRAMES 0x0002
++#define RX_CFG2_RCV_OTHER 0x0001
++
++/* For use with ACX1xx_IE_FEATURE_CONFIG */
++#define FEATURE1_80MHZ_CLOCK 0x00000040L
++#define FEATURE1_4X 0x00000020L
++#define FEATURE1_LOW_RX 0x00000008L
++#define FEATURE1_EXTRA_LOW_RX 0x00000001L
++
++#define FEATURE2_SNIFFER 0x00000080L
++#define FEATURE2_NO_TXCRYPT 0x00000001L
++
++/*-- get and set mask values --*/
++#define GETSET_LED_POWER 0x00000001L
++#define GETSET_STATION_ID 0x00000002L
++#define SET_TEMPLATES 0x00000004L
++#define SET_STA_LIST 0x00000008L
++#define GETSET_TX 0x00000010L
++#define GETSET_RX 0x00000020L
++#define SET_RXCONFIG 0x00000040L
++#define GETSET_ANTENNA 0x00000080L
++#define GETSET_SENSITIVITY 0x00000100L
++#define GETSET_TXPOWER 0x00000200L
++#define GETSET_ED_THRESH 0x00000400L
++#define GETSET_CCA 0x00000800L
++#define GETSET_POWER_80211 0x00001000L
++#define GETSET_RETRY 0x00002000L
++#define GETSET_REG_DOMAIN 0x00004000L
++#define GETSET_CHANNEL 0x00008000L
++/* Used when ESSID changes etc and we need to scan for AP anew */
++#define GETSET_RESCAN 0x00010000L
++#define GETSET_MODE 0x00020000L
++#define GETSET_WEP 0x00040000L
++#define SET_WEP_OPTIONS 0x00080000L
++#define SET_MSDU_LIFETIME 0x00100000L
++#define SET_RATE_FALLBACK 0x00200000L
++
++/* keep in sync with the above */
++#define GETSET_ALL (0 \
++/* GETSET_LED_POWER */ | 0x00000001L \
++/* GETSET_STATION_ID */ | 0x00000002L \
++/* SET_TEMPLATES */ | 0x00000004L \
++/* SET_STA_LIST */ | 0x00000008L \
++/* GETSET_TX */ | 0x00000010L \
++/* GETSET_RX */ | 0x00000020L \
++/* SET_RXCONFIG */ | 0x00000040L \
++/* GETSET_ANTENNA */ | 0x00000080L \
++/* GETSET_SENSITIVITY */| 0x00000100L \
++/* GETSET_TXPOWER */ | 0x00000200L \
++/* GETSET_ED_THRESH */ | 0x00000400L \
++/* GETSET_CCA */ | 0x00000800L \
++/* GETSET_POWER_80211 */| 0x00001000L \
++/* GETSET_RETRY */ | 0x00002000L \
++/* GETSET_REG_DOMAIN */ | 0x00004000L \
++/* GETSET_CHANNEL */ | 0x00008000L \
++/* GETSET_RESCAN */ | 0x00010000L \
++/* GETSET_MODE */ | 0x00020000L \
++/* GETSET_WEP */ | 0x00040000L \
++/* SET_WEP_OPTIONS */ | 0x00080000L \
++/* SET_MSDU_LIFETIME */ | 0x00100000L \
++/* SET_RATE_FALLBACK */ | 0x00200000L \
++ )
++
++
++/***********************************************************************
++** Firmware loading
++*/
++#include <linux/firmware.h> /* request_firmware() */
++#include <linux/pci.h> /* struct pci_device */
++
++
++/***********************************************************************
++*/
++typedef struct acx100_ie_memblocksize {
++ u16 type;
++ u16 len;
++ u16 size;
++} ACX_PACKED acx100_ie_memblocksize_t;
++
++typedef struct acx100_ie_queueconfig {
++ u16 type;
++ u16 len;
++ u32 AreaSize;
++ u32 RxQueueStart;
++ u8 QueueOptions;
++ u8 NumTxQueues;
++ u8 NumRxDesc; /* for USB only */
++ u8 pad1;
++ u32 QueueEnd;
++ u32 HostQueueEnd; /* QueueEnd2 */
++ u32 TxQueueStart;
++ u8 TxQueuePri;
++ u8 NumTxDesc;
++ u16 pad2;
++} ACX_PACKED acx100_ie_queueconfig_t;
++
++typedef struct acx111_ie_queueconfig {
++ u16 type;
++ u16 len;
++ u32 tx_memory_block_address;
++ u32 rx_memory_block_address;
++ u32 rx1_queue_address;
++ u32 reserved1;
++ u32 tx1_queue_address;
++ u8 tx1_attributes;
++ u16 reserved2;
++ u8 reserved3;
++} ACX_PACKED acx111_ie_queueconfig_t;
++
++typedef struct acx100_ie_memconfigoption {
++ u16 type;
++ u16 len;
++ u32 DMA_config;
++ acx_ptr pRxHostDesc;
++ u32 rx_mem;
++ u32 tx_mem;
++ u16 RxBlockNum;
++ u16 TxBlockNum;
++} ACX_PACKED acx100_ie_memconfigoption_t;
++
++typedef struct acx111_ie_memoryconfig {
++ u16 type;
++ u16 len;
++ u16 no_of_stations;
++ u16 memory_block_size;
++ u8 tx_rx_memory_block_allocation;
++ u8 count_rx_queues;
++ u8 count_tx_queues;
++ u8 options;
++ u8 fragmentation;
++ u16 reserved1;
++ u8 reserved2;
++
++ /* start of rx1 block */
++ u8 rx_queue1_count_descs;
++ u8 rx_queue1_reserved1;
++ u8 rx_queue1_type; /* must be set to 7 */
++ u8 rx_queue1_prio; /* must be set to 0 */
++ acx_ptr rx_queue1_host_rx_start;
++ /* end of rx1 block */
++
++ /* start of tx1 block */
++ u8 tx_queue1_count_descs;
++ u8 tx_queue1_reserved1;
++ u8 tx_queue1_reserved2;
++ u8 tx_queue1_attributes;
++ /* end of tx1 block */
++} ACX_PACKED acx111_ie_memoryconfig_t;
++
++typedef struct acx_ie_memmap {
++ u16 type;
++ u16 len;
++ u32 CodeStart;
++ u32 CodeEnd;
++ u32 WEPCacheStart;
++ u32 WEPCacheEnd;
++ u32 PacketTemplateStart;
++ u32 PacketTemplateEnd;
++ u32 QueueStart;
++ u32 QueueEnd;
++ u32 PoolStart;
++ u32 PoolEnd;
++} ACX_PACKED acx_ie_memmap_t;
++
++typedef struct acx111_ie_feature_config {
++ u16 type;
++ u16 len;
++ u32 feature_options;
++ u32 data_flow_options;
++} ACX_PACKED acx111_ie_feature_config_t;
++
++typedef struct acx111_ie_tx_level {
++ u16 type;
++ u16 len;
++ u8 level;
++} ACX_PACKED acx111_ie_tx_level_t;
++
++#define PS_CFG_ENABLE 0x80
++#define PS_CFG_PENDING 0x40 /* status flag when entering PS */
++#define PS_CFG_WAKEUP_MODE_MASK 0x07
++#define PS_CFG_WAKEUP_BY_HOST 0x03
++#define PS_CFG_WAKEUP_EACH_ITVL 0x02
++#define PS_CFG_WAKEUP_ON_DTIM 0x01
++#define PS_CFG_WAKEUP_ALL_BEAC 0x00
++
++/* Enhanced PS mode: sleep until Rx Beacon w/ the STA's AID bit set
++** in the TIM; newer firmwares only(?) */
++#define PS_OPT_ENA_ENHANCED_PS 0x04
++#define PS_OPT_TX_PSPOLL 0x02 /* send PSPoll frame to fetch waiting frames from AP (on frame with matching AID) */
++#define PS_OPT_STILL_RCV_BCASTS 0x01
++
++typedef struct acx100_ie_powersave {
++ u16 type;
++ u16 len;
++ u8 wakeup_cfg;
++ u8 listen_interval; /* for EACH_ITVL: wake up every "beacon units" interval */
++ u8 options;
++ u8 hangover_period; /* remaining wake time after Tx MPDU w/ PS bit, in values of 1/1024 seconds */
++ u16 enhanced_ps_transition_time; /* rem. wake time for Enh. PS */
++} ACX_PACKED acx100_ie_powersave_t;
++
++typedef struct acx111_ie_powersave {
++ u16 type;
++ u16 len;
++ u8 wakeup_cfg;
++ u8 listen_interval; /* for EACH_ITVL: wake up every "beacon units" interval */
++ u8 options;
++ u8 hangover_period; /* remaining wake time after Tx MPDU w/ PS bit, in values of 1/1024 seconds */
++ u32 beacon_rx_time;
++ u32 enhanced_ps_transition_time; /* rem. wake time for Enh. PS */
++} ACX_PACKED acx111_ie_powersave_t;
++
++
++/***********************************************************************
++** Commands and template structures
++*/
++
++/*
++** SCAN command structure
++**
++** even though acx100 scan rates match RATE100 constants,
++** acx111 ones do not match! Therefore we do not use RATE100 #defines */
++#define ACX_SCAN_RATE_1 10
++#define ACX_SCAN_RATE_2 20
++#define ACX_SCAN_RATE_5 55
++#define ACX_SCAN_RATE_11 110
++#define ACX_SCAN_RATE_22 220
++#define ACX_SCAN_RATE_PBCC 0x80 /* OR with this if needed */
++#define ACX_SCAN_OPT_ACTIVE 0x00 /* a bit mask */
++#define ACX_SCAN_OPT_PASSIVE 0x01
++/* Background scan: we go into Power Save mode (by transmitting
++** NULL data frame to AP with the power mgmt bit set), do the scan,
++** and then exit Power Save mode. A plus is that AP buffers frames
++** for us while we do background scan. Thus we avoid frame losses.
++** Background scan can be active or passive, just like normal one */
++#define ACX_SCAN_OPT_BACKGROUND 0x02
++typedef struct acx100_scan {
++ u16 count; /* number of scans to do, 0xffff == continuous */
++ u16 start_chan;
++ u16 flags; /* channel list mask; 0x8000 == all channels? */
++ u8 max_rate; /* max. probe rate */
++ u8 options; /* bit mask, see defines above */
++ u16 chan_duration;
++ u16 max_probe_delay;
++} ACX_PACKED acx100_scan_t; /* length 0xc */
++
++#define ACX111_SCAN_RATE_6 0x0B
++#define ACX111_SCAN_RATE_9 0x0F
++#define ACX111_SCAN_RATE_12 0x0A
++#define ACX111_SCAN_RATE_18 0x0E
++#define ACX111_SCAN_RATE_24 0x09
++#define ACX111_SCAN_RATE_36 0x0D
++#define ACX111_SCAN_RATE_48 0x08
++#define ACX111_SCAN_RATE_54 0x0C
++#define ACX111_SCAN_OPT_5GHZ 0x04 /* else 2.4GHZ */
++#define ACX111_SCAN_MOD_SHORTPRE 0x01 /* you can combine SHORTPRE and PBCC */
++#define ACX111_SCAN_MOD_PBCC 0x80
++#define ACX111_SCAN_MOD_OFDM 0x40
++typedef struct acx111_scan {
++ u16 count; /* number of scans to do */
++ u8 channel_list_select; /* 0: scan all channels, 1: from chan_list only */
++ u16 reserved1;
++ u8 reserved2;
++ u8 rate; /* rate for probe requests (if active scan) */
++ u8 options; /* bit mask, see defines above */
++ u16 chan_duration; /* min time to wait for reply on one channel (in TU) */
++ /* (active scan only) (802.11 section 11.1.3.2.2) */
++ u16 max_probe_delay; /* max time to wait for reply on one channel (active scan) */
++ /* time to listen on a channel (passive scan) */
++ u8 modulation;
++ u8 channel_list[26]; /* bits 7:0 first byte: channels 8:1 */
++ /* bits 7:0 second byte: channels 16:9 */
++ /* 26 bytes is enough to cover 802.11a */
++} ACX_PACKED acx111_scan_t;
++
++
++/*
++** Radio calibration command structure
++*/
++typedef struct acx111_cmd_radiocalib {
++/* 0x80000000 == automatic calibration by firmware, according to interval;
++ * bits 0..3: select calibration methods to go through:
++ * calib based on DC, AfeDC, Tx mismatch, Tx equilization */
++ u32 methods;
++ u32 interval;
++} ACX_PACKED acx111_cmd_radiocalib_t;
++
++
++/*
++** Packet template structures
++**
++** Packet templates store contents of Beacon, Probe response, Probe request,
++** Null data frame, and TIM data frame. Firmware automatically transmits
++** contents of template at appropriate time:
++** - Beacon: when configured as AP or Ad-hoc
++** - Probe response: when configured as AP or Ad-hoc, whenever
++** a Probe request frame is received
++** - Probe request: when host issues SCAN command (active)
++** - Null data frame: when entering 802.11 power save mode
++** - TIM data: at the end of Beacon frames (if no TIM template
++** is configured, then transmits default TIM)
++** NB:
++** - size field must be set to size of actual template
++** (NOT sizeof(struct) - templates are variable in length),
++** size field is not itself counted.
++** - members flagged with an asterisk must be initialized with host,
++** rest must be zero filled.
++** - variable length fields shown only in comments */
++typedef struct acx_template_tim {
++ u16 size;
++ u8 tim_eid; /* 00 1 TIM IE ID * */
++ u8 len; /* 01 1 Length * */
++ u8 dtim_cnt; /* 02 1 DTIM Count */
++ u8 dtim_period; /* 03 1 DTIM Period */
++ u8 bitmap_ctrl; /* 04 1 Bitmap Control * (except bit0) */
++ /* 05 n Partial Virtual Bitmap * */
++ u8 variable[0x100 - 1-1-1-1-1];
++} ACX_PACKED acx_template_tim_t;
++
++typedef struct acx_template_probereq {
++ u16 size;
++ u16 fc; /* 00 2 fc * */
++ u16 dur; /* 02 2 Duration */
++ u8 da[6]; /* 04 6 Destination Address * */
++ u8 sa[6]; /* 0A 6 Source Address * */
++ u8 bssid[6]; /* 10 6 BSSID * */
++ u16 seq; /* 16 2 Sequence Control */
++ /* 18 n SSID * */
++ /* nn n Supported Rates * */
++ u8 variable[0x44 - 2-2-6-6-6-2];
++} ACX_PACKED acx_template_probereq_t;
++
++typedef struct acx_template_proberesp {
++ u16 size;
++ u16 fc; /* 00 2 fc * (bits [15:12] and [10:8] per 802.11 section 7.1.3.1) */
++ u16 dur; /* 02 2 Duration */
++ u8 da[6]; /* 04 6 Destination Address */
++ u8 sa[6]; /* 0A 6 Source Address */
++ u8 bssid[6]; /* 10 6 BSSID */
++ u16 seq; /* 16 2 Sequence Control */
++ u8 timestamp[8];/* 18 8 Timestamp */
++ u16 beacon_interval; /* 20 2 Beacon Interval * */
++ u16 cap; /* 22 2 Capability Information * */
++ /* 24 n SSID * */
++ /* nn n Supported Rates * */
++ /* nn 1 DS Parameter Set * */
++ u8 variable[0x54 - 2-2-6-6-6-2-8-2-2];
++} ACX_PACKED acx_template_proberesp_t;
++#define acx_template_beacon_t acx_template_proberesp_t
++#define acx_template_beacon acx_template_proberesp
++
++typedef struct acx_template_nullframe {
++ u16 size;
++ struct wlan_hdr_a3 hdr;
++} ACX_PACKED acx_template_nullframe_t;
++
++
++/*
++** JOIN command structure
++**
++** as opposed to acx100, acx111 dtim interval is AFTER rates_basic111.
++** NOTE: took me about an hour to get !@#$%^& packing right --> struct packing is eeeeevil... */
++typedef struct acx_joinbss {
++ u8 bssid[ETH_ALEN];
++ u16 beacon_interval;
++ union {
++ struct {
++ u8 dtim_interval;
++ u8 rates_basic;
++ u8 rates_supported;
++ /*
++ * ARM compiler doesn't pack correctly unless unions
++ * inside structures are multiples of 4 bytes. Ugh.
++ */
++ u8 genfrm_txrate; /* generated frame (bcn, proberesp, RTS, PSpoll) tx rate */
++ } ACX_PACKED acx100;
++ struct {
++ u16 rates_basic;
++ u8 dtim_interval;
++ u8 genfrm_txrate; /* generated frame (bcn, proberesp, RTS, PSpoll) tx rate */
++ } ACX_PACKED acx111;
++ /*
++ * ARM compiler doesn't pack correctly unles unions are aligned on
++ * 4 byte boundaries and are multiples of 4 bytes.
++ */
++ struct {
++ u8 d1;
++ u8 d2;
++ u8 d3;
++ u8 genfrm_txrate;
++ } ACX_PACKED txrate;
++ } ACX_PACKED u;
++ u8 genfrm_mod_pre; /* generated frame modulation/preamble:
++ ** bit7: PBCC, bit6: OFDM (else CCK/DQPSK/DBPSK)
++ ** bit5: short pre */
++ u8 macmode; /* BSS Type, must be one of ACX_MODE_xxx */
++ u8 channel;
++ u8 essid_len;
++ char essid[IW_ESSID_MAX_SIZE];
++} ACX_PACKED acx_joinbss_t;
++
++#define JOINBSS_RATES_1 0x01
++#define JOINBSS_RATES_2 0x02
++#define JOINBSS_RATES_5 0x04
++#define JOINBSS_RATES_11 0x08
++#define JOINBSS_RATES_22 0x10
++
++/* Looks like missing bits are used to indicate 11g rates!
++** (it follows from the fact that constants below match 1:1 to RATE111_nn)
++** This was actually seen! Look at that Assoc Request sent by acx111,
++** it _does_ contain 11g rates in basic set:
++01:30:20.070772 Beacon (xxx) [1.0* 2.0* 5.5* 11.0* 6.0* 9.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit] ESS CH: 1
++01:30:20.074425 Authentication (Open System)-1: Succesful
++01:30:20.076539 Authentication (Open System)-2:
++01:30:20.076620 Acknowledgment
++01:30:20.088546 Assoc Request (xxx) [1.0* 2.0* 5.5* 6.0* 9.0* 11.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit]
++01:30:20.122413 Assoc Response AID(1) :: Succesful
++01:30:20.122679 Acknowledgment
++01:30:20.173204 Beacon (xxx) [1.0* 2.0* 5.5* 11.0* 6.0* 9.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit] ESS CH: 1
++*/
++#define JOINBSS_RATES_BASIC111_1 0x0001
++#define JOINBSS_RATES_BASIC111_2 0x0002
++#define JOINBSS_RATES_BASIC111_5 0x0004
++#define JOINBSS_RATES_BASIC111_11 0x0020
++#define JOINBSS_RATES_BASIC111_22 0x0100
++
++
++/***********************************************************************
++*/
++typedef struct mem_read_write {
++ u16 addr;
++ u16 type; /* 0x0 int. RAM / 0xffff MAC reg. / 0x81 PHY RAM / 0x82 PHY reg.; or maybe it's actually 0x30 for MAC? Better verify it by writing and reading back and checking whether the value holds! */
++ u32 len;
++ u32 data;
++} ACX_PACKED mem_read_write_t;
++
++typedef struct firmware_image {
++ u32 chksum;
++ u32 size;
++ u8 data[1]; /* the byte array of the actual firmware... */
++} ACX_PACKED firmware_image_t;
++
++typedef struct acx_cmd_radioinit {
++ u32 offset;
++ u32 len;
++} ACX_PACKED acx_cmd_radioinit_t;
++
++typedef struct acx100_ie_wep_options {
++ u16 type;
++ u16 len;
++ u16 NumKeys; /* max # of keys */
++ u8 WEPOption; /* 0 == decrypt default key only, 1 == override decrypt */
++ u8 Pad; /* used only for acx111 */
++} ACX_PACKED acx100_ie_wep_options_t;
++
++typedef struct ie_dot11WEPDefaultKey {
++ u16 type;
++ u16 len;
++ u8 action;
++ u8 keySize;
++ u8 defaultKeyNum;
++ u8 key[29]; /* check this! was Key[19] */
++} ACX_PACKED ie_dot11WEPDefaultKey_t;
++
++typedef struct acx111WEPDefaultKey {
++ u8 MacAddr[ETH_ALEN];
++ u16 action; /* NOTE: this is a u16, NOT a u8!! */
++ u16 reserved;
++ u8 keySize;
++ u8 type;
++ u8 index;
++ u8 defaultKeyNum;
++ u8 counter[6];
++ u8 key[32]; /* up to 32 bytes (for TKIP!) */
++} ACX_PACKED acx111WEPDefaultKey_t;
++
++typedef struct ie_dot11WEPDefaultKeyID {
++ u16 type;
++ u16 len;
++ u8 KeyID;
++} ACX_PACKED ie_dot11WEPDefaultKeyID_t;
++
++typedef struct acx100_cmd_wep_mgmt {
++ u8 MacAddr[ETH_ALEN];
++ u16 Action;
++ u16 KeySize;
++ u8 Key[29]; /* 29*8 == 232bits == WEP256 */
++} ACX_PACKED acx100_cmd_wep_mgmt_t;
++
++typedef struct acx_ie_generic {
++ u16 type;
++ u16 len;
++ union {
++ /* Association ID IE: just a 16bit value: */
++ u16 aid;
++ /* generic member for quick implementation of commands */
++ u8 bytes[32];
++ } ACX_PACKED m;
++} ACX_PACKED acx_ie_generic_t;
++
++/***********************************************************************
++*/
++#define CHECK_SIZEOF(type,size) { \
++ extern void BUG_bad_size_for_##type(void); \
++ if (sizeof(type)!=(size)) BUG_bad_size_for_##type(); \
++}
++
++static inline void
++acx_struct_size_check(void)
++{
++ CHECK_SIZEOF(txdesc_t, 0x30);
++ CHECK_SIZEOF(acx100_ie_memconfigoption_t, 24);
++ CHECK_SIZEOF(acx100_ie_queueconfig_t, 0x20);
++ CHECK_SIZEOF(acx_joinbss_t, 0x30);
++ /* IEs need 4 bytes for (type,len) tuple */
++ CHECK_SIZEOF(acx111_ie_configoption_t, ACX111_IE_CONFIG_OPTIONS_LEN + 4);
++}
++
++
++/***********************************************************************
++** Global data
++*/
++extern const u8 acx_bitpos2ratebyte[];
++extern const u8 acx_bitpos2rate100[];
++
++extern const u8 acx_reg_domain_ids[];
++extern const char * const acx_reg_domain_strings[];
++enum {
++ acx_reg_domain_ids_len = 8
++};
++
++extern const struct iw_handler_def acx_ioctl_handler_def;
+Index: linux-2.6.23/drivers/net/wireless/acx/common.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/common.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,7388 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/proc_fs.h>
++#include <linux/if_arp.h>
++#include <linux/rtnetlink.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <net/iw_handler.h>
++
++#include "acx_hw.h"
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++static client_t *acx_l_sta_list_alloc(acx_device_t *adev);
++static client_t *acx_l_sta_list_get_from_hash(acx_device_t *adev, const u8 *address);
++
++static int acx_l_process_data_frame_master(acx_device_t *adev, rxbuffer_t *rxbuf);
++static int acx_l_process_data_frame_client(acx_device_t *adev, rxbuffer_t *rxbuf);
++/* static int acx_l_process_NULL_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala); */
++static int acx_l_process_mgmt_frame(acx_device_t *adev, rxbuffer_t *rxbuf);
++static void acx_l_process_disassoc_from_sta(acx_device_t *adev, const wlan_fr_disassoc_t *req);
++static void acx_l_process_disassoc_from_ap(acx_device_t *adev, const wlan_fr_disassoc_t *req);
++static void acx_l_process_deauth_from_sta(acx_device_t *adev, const wlan_fr_deauthen_t *req);
++static void acx_l_process_deauth_from_ap(acx_device_t *adev, const wlan_fr_deauthen_t *req);
++static int acx_l_process_probe_response(acx_device_t *adev, wlan_fr_proberesp_t *req, const rxbuffer_t *rxbuf);
++static int acx_l_process_assocresp(acx_device_t *adev, const wlan_fr_assocresp_t *req);
++static int acx_l_process_reassocresp(acx_device_t *adev, const wlan_fr_reassocresp_t *req);
++static int acx_l_process_authen(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_assocresp(acx_device_t *adev, const wlan_fr_assocreq_t *req);
++static int acx_l_transmit_reassocresp(acx_device_t *adev, const wlan_fr_reassocreq_t *req);
++static int acx_l_transmit_deauthen(acx_device_t *adev, const u8 *addr, u16 reason);
++static int acx_l_transmit_authen1(acx_device_t *adev);
++static int acx_l_transmit_authen2(acx_device_t *adev, const wlan_fr_authen_t *req, client_t *clt);
++static int acx_l_transmit_authen3(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_authen4(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_assoc_req(acx_device_t *adev);
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG
++unsigned int acx_debug /* will add __read_mostly later */ = ACX_DEFAULT_MSG;
++/* parameter is 'debug', corresponding var is acx_debug */
++module_param_named(debug, acx_debug, uint, 0);
++MODULE_PARM_DESC(debug, "Debug level mask (see L_xxx constants)");
++#endif
++
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("Dual MPL/GPL");
++#endif
++/* USB had this: MODULE_AUTHOR("Martin Wawro <martin.wawro AT uni-dortmund.de>"); */
++MODULE_AUTHOR("ACX100 Open Source Driver development team");
++MODULE_DESCRIPTION("Driver for TI ACX1xx based wireless cards (CardBus/PCI/USB)");
++
++
++/***********************************************************************
++*/
++/* Probably a number of acx's intermediate buffers for USB transfers,
++** not to be confused with number of descriptors in tx/rx rings
++** (which are not directly accessible to host in USB devices) */
++#define USB_RX_CNT 10
++#define USB_TX_CNT 10
++
++
++/***********************************************************************
++*/
++
++/* minutes to wait until next radio recalibration: */
++#define RECALIB_PAUSE 5
++
++/* Please keep acx_reg_domain_ids_len in sync... */
++const u8 acx_reg_domain_ids[acx_reg_domain_ids_len] =
++ { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40, 0x41, 0x51 };
++static const u16 reg_domain_channel_masks[acx_reg_domain_ids_len] =
++#ifdef ACX_ALLOW_ALLCHANNELS
++ { 0x3fff, 0x07ff, 0x1fff, 0x0600, 0x1e00, 0x2000, 0x3fff, 0x01fc };
++#else
++ { 0x07ff, 0x07ff, 0x1fff, 0x0600, 0x1e00, 0x2000, 0x3fff, 0x01fc };
++#endif
++const char * const
++acx_reg_domain_strings[] = {
++ /* 0 */ " 1-11 FCC (USA)",
++ /* 1 */ " 1-11 DOC/IC (Canada)",
++/* BTW: WLAN use in ETSI is regulated by ETSI standard EN 300 328-2 V1.1.2 */
++ /* 2 */ " 1-13 ETSI (Europe)",
++ /* 3 */ "10-11 Spain",
++ /* 4 */ "10-13 France",
++ /* 5 */ " 14 MKK (Japan)",
++ /* 6 */ " 1-14 MKK1",
++ /* 7 */ " 3-9 Israel (not all firmware versions)",
++ NULL /* needs to remain as last entry */
++};
++
++
++
++/***********************************************************************
++** Debugging support
++*/
++#ifdef PARANOID_LOCKING
++static unsigned max_lock_time;
++static unsigned max_sem_time;
++
++void
++acx_lock_unhold() { max_lock_time = 0; }
++void
++acx_sem_unhold() { max_sem_time = 0; }
++
++static inline const char*
++sanitize_str(const char *s)
++{
++ const char* t = strrchr(s, '/');
++ if (t) return t + 1;
++ return s;
++}
++
++void
++acx_lock_debug(acx_device_t *adev, const char* where)
++{
++ unsigned int count = 100*1000*1000;
++ where = sanitize_str(where);
++ while (--count) {
++ if (!spin_is_locked(&adev->lock)) break;
++ cpu_relax();
++ }
++ if (!count) {
++ printk(KERN_EMERG "LOCKUP: already taken at %s!\n", adev->last_lock);
++ BUG();
++ }
++ adev->last_lock = where;
++ rdtscl(adev->lock_time);
++}
++void
++acx_unlock_debug(acx_device_t *adev, const char* where)
++{
++#ifdef SMP
++ if (!spin_is_locked(&adev->lock)) {
++ where = sanitize_str(where);
++ printk(KERN_EMERG "STRAY UNLOCK at %s!\n", where);
++ BUG();
++ }
++#endif
++ if (acx_debug & L_LOCK) {
++ unsigned long diff;
++ rdtscl(diff);
++ diff -= adev->lock_time;
++ if (diff > max_lock_time) {
++ where = sanitize_str(where);
++ printk("max lock hold time %ld CPU ticks from %s "
++ "to %s\n", diff, adev->last_lock, where);
++ max_lock_time = diff;
++ }
++ }
++}
++void
++acx_down_debug(acx_device_t *adev, const char* where)
++{
++ int sem_count;
++ unsigned long timeout = jiffies + 5*HZ;
++
++ where = sanitize_str(where);
++
++ for (;;) {
++ sem_count = atomic_read(&adev->sem.count);
++ if (sem_count) break;
++ if (time_after(jiffies, timeout))
++ break;
++ msleep(5);
++ }
++ if (!sem_count) {
++ printk(KERN_EMERG "D STATE at %s! last sem at %s\n",
++ where, adev->last_sem);
++ dump_stack();
++ }
++ adev->last_sem = where;
++ adev->sem_time = jiffies;
++ down(&adev->sem);
++ if (acx_debug & L_LOCK) {
++ printk("%s: sem_down %d -> %d\n",
++ where, sem_count, atomic_read(&adev->sem.count));
++ }
++}
++void
++acx_up_debug(acx_device_t *adev, const char* where)
++{
++ int sem_count = atomic_read(&adev->sem.count);
++ if (sem_count) {
++ where = sanitize_str(where);
++ printk(KERN_EMERG "STRAY UP at %s! sem.count=%d\n", where, sem_count);
++ dump_stack();
++ }
++ if (acx_debug & L_LOCK) {
++ unsigned long diff = jiffies - adev->sem_time;
++ if (diff > max_sem_time) {
++ where = sanitize_str(where);
++ printk("max sem hold time %ld jiffies from %s "
++ "to %s\n", diff, adev->last_sem, where);
++ max_sem_time = diff;
++ }
++ }
++ up(&adev->sem);
++ if (acx_debug & L_LOCK) {
++ where = sanitize_str(where);
++ printk("%s: sem_up %d -> %d\n",
++ where, sem_count, atomic_read(&adev->sem.count));
++ }
++}
++#endif /* PARANOID_LOCKING */
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG > 1
++
++static int acx_debug_func_indent;
++#define DEBUG_TSC 0
++#define FUNC_INDENT_INCREMENT 2
++
++#if DEBUG_TSC
++#define TIMESTAMP(d) unsigned long d; rdtscl(d)
++#else
++#define TIMESTAMP(d) unsigned long d = jiffies
++#endif
++
++static const char
++spaces[] = " " " "; /* Nx10 spaces */
++
++void
++log_fn_enter(const char *funcname)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s==> %s\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname
++ );
++
++ acx_debug_func_indent += FUNC_INDENT_INCREMENT;
++}
++void
++log_fn_exit(const char *funcname)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ acx_debug_func_indent -= FUNC_INDENT_INCREMENT;
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s<== %s\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname
++ );
++}
++void
++log_fn_exit_v(const char *funcname, int v)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ acx_debug_func_indent -= FUNC_INDENT_INCREMENT;
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s<== %s: %08X\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname,
++ v
++ );
++}
++#endif /* ACX_DEBUG > 1 */
++
++
++/***********************************************************************
++** Basically a msleep with logging
++*/
++void
++acx_s_msleep(int ms)
++{
++ FN_ENTER;
++ msleep(ms);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** Not inlined: it's larger than it seems
++*/
++void
++acx_print_mac(const char *head, const u8 *mac, const char *tail)
++{
++ printk("%s"MACSTR"%s", head, MAC(mac), tail);
++}
++
++
++/***********************************************************************
++** acx_get_status_name
++*/
++static const char*
++acx_get_status_name(u16 status)
++{
++ static const char * const str[] = {
++ "STOPPED", "SCANNING", "WAIT_AUTH",
++ "AUTHENTICATED", "ASSOCIATED", "INVALID??"
++ };
++ if (status > VEC_SIZE(str)-1)
++ status = VEC_SIZE(str)-1;
++
++ return str[status];
++}
++
++
++/***********************************************************************
++** acx_get_packet_type_string
++*/
++#if ACX_DEBUG
++const char*
++acx_get_packet_type_string(u16 fc)
++{
++ static const char * const mgmt_arr[] = {
++ "MGMT/AssocReq", "MGMT/AssocResp", "MGMT/ReassocReq",
++ "MGMT/ReassocResp", "MGMT/ProbeReq", "MGMT/ProbeResp",
++ "MGMT/UNKNOWN", "MGMT/UNKNOWN", "MGMT/Beacon", "MGMT/ATIM",
++ "MGMT/Disassoc", "MGMT/Authen", "MGMT/Deauthen"
++ };
++ static const char * const ctl_arr[] = {
++ "CTL/PSPoll", "CTL/RTS", "CTL/CTS", "CTL/Ack", "CTL/CFEnd",
++ "CTL/CFEndCFAck"
++ };
++ static const char * const data_arr[] = {
++ "DATA/DataOnly", "DATA/Data CFAck", "DATA/Data CFPoll",
++ "DATA/Data CFAck/CFPoll", "DATA/Null", "DATA/CFAck",
++ "DATA/CFPoll", "DATA/CFAck/CFPoll"
++ };
++ const char *str;
++ u8 fstype = (WF_FC_FSTYPE & fc) >> 4;
++ u8 ctl;
++
++ switch (WF_FC_FTYPE & fc) {
++ case WF_FTYPE_MGMT:
++ if (fstype < VEC_SIZE(mgmt_arr))
++ str = mgmt_arr[fstype];
++ else
++ str = "MGMT/UNKNOWN";
++ break;
++ case WF_FTYPE_CTL:
++ ctl = fstype - 0x0a;
++ if (ctl < VEC_SIZE(ctl_arr))
++ str = ctl_arr[ctl];
++ else
++ str = "CTL/UNKNOWN";
++ break;
++ case WF_FTYPE_DATA:
++ if (fstype < VEC_SIZE(data_arr))
++ str = data_arr[fstype];
++ else
++ str = "DATA/UNKNOWN";
++ break;
++ default:
++ str = "UNKNOWN";
++ break;
++ }
++ return str;
++}
++#endif
++
++
++/***********************************************************************
++** acx_wlan_reason_str
++*/
++static inline const char*
++acx_wlan_reason_str(u16 reason)
++{
++ static const char* const reason_str[] = {
++ /* 0 */ "?",
++ /* 1 */ "unspecified",
++ /* 2 */ "prev auth is not valid",
++ /* 3 */ "leaving BBS",
++ /* 4 */ "due to inactivity",
++ /* 5 */ "AP is busy",
++ /* 6 */ "got class 2 frame from non-auth'ed STA",
++ /* 7 */ "got class 3 frame from non-assoc'ed STA",
++ /* 8 */ "STA has left BSS",
++ /* 9 */ "assoc without auth is not allowed",
++ /* 10 */ "bad power setting (802.11h)",
++ /* 11 */ "bad channel (802.11i)",
++ /* 12 */ "?",
++ /* 13 */ "invalid IE",
++ /* 14 */ "MIC failure",
++ /* 15 */ "four-way handshake timeout",
++ /* 16 */ "group key handshake timeout",
++ /* 17 */ "IE is different",
++ /* 18 */ "invalid group cipher",
++ /* 19 */ "invalid pairwise cipher",
++ /* 20 */ "invalid AKMP",
++ /* 21 */ "unsupported RSN version",
++ /* 22 */ "invalid RSN IE cap",
++ /* 23 */ "802.1x failed",
++ /* 24 */ "cipher suite rejected"
++ };
++ return reason < VEC_SIZE(reason_str) ? reason_str[reason] : "?";
++}
++
++
++/***********************************************************************
++** acx_cmd_status_str
++*/
++const char*
++acx_cmd_status_str(unsigned int state)
++{
++ static const char * const cmd_error_strings[] = {
++ "Idle",
++ "Success",
++ "Unknown Command",
++ "Invalid Information Element",
++ "Channel rejected",
++ "Channel invalid in current regulatory domain",
++ "MAC invalid",
++ "Command rejected (read-only information element)",
++ "Command rejected",
++ "Already asleep",
++ "TX in progress",
++ "Already awake",
++ "Write only",
++ "RX in progress",
++ "Invalid parameter",
++ "Scan in progress",
++ "Failed"
++ };
++ return state < VEC_SIZE(cmd_error_strings) ?
++ cmd_error_strings[state] : "?";
++}
++
++
++/***********************************************************************
++** get_status_string
++*/
++static inline const char*
++get_status_string(unsigned int status)
++{
++ /* A bit shortened, but hopefully still understandable */
++ static const char * const status_str[] = {
++ /* 0 */ "Successful",
++ /* 1 */ "Unspecified failure",
++ /* 2 */ "reserved",
++ /* 3 */ "reserved",
++ /* 4 */ "reserved",
++ /* 5 */ "reserved",
++ /* 6 */ "reserved",
++ /* 7 */ "reserved",
++ /* 8 */ "reserved",
++ /* 9 */ "reserved",
++ /*10 */ "Cannot support all requested capabilities in Capability Information field",
++ /*11 */ "Reassoc denied (reason outside of 802.11b scope)",
++ /*12 */ "Assoc denied (reason outside of 802.11b scope) -- maybe MAC filtering by peer?",
++ /*13 */ "Responding station doesnt support specified auth algorithm -- maybe WEP auth Open vs. Restricted?",
++ /*14 */ "Auth rejected: wrong transaction sequence number",
++ /*15 */ "Auth rejected: challenge failure",
++ /*16 */ "Auth rejected: timeout for next frame in sequence",
++ /*17 */ "Assoc denied: too many STAs on this AP",
++ /*18 */ "Assoc denied: requesting STA doesnt support all data rates in basic set",
++ /*19 */ "Assoc denied: requesting STA doesnt support Short Preamble",
++ /*20 */ "Assoc denied: requesting STA doesnt support PBCC Modulation",
++ /*21 */ "Assoc denied: requesting STA doesnt support Channel Agility"
++ /*22 */ "reserved",
++ /*23 */ "reserved",
++ /*24 */ "reserved",
++ /*25 */ "Assoc denied: requesting STA doesnt support Short Slot Time",
++ /*26 */ "Assoc denied: requesting STA doesnt support DSSS-OFDM"
++ };
++
++ return status_str[status < VEC_SIZE(status_str) ? status : 2];
++}
++
++
++/***********************************************************************
++*/
++void
++acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr)
++{
++ if (acx_debug & L_ASSOC) {
++ int offset = (u8*)ie_ptr - (u8*)hdr;
++ printk("acx: unknown EID %d in mgmt frame at offset %d. IE: ",
++ ie_ptr->eid, offset);
++ /* IE len can be bogus, IE can extend past packet end. Oh well... */
++ acx_dump_bytes(ie_ptr, ie_ptr->len + 2);
++ if (acx_debug & L_DATA) {
++ printk("frame (%s): ",
++ acx_get_packet_type_string(le16_to_cpu(hdr->fc)));
++ acx_dump_bytes(hdr, len);
++ }
++ }
++}
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG
++void
++acx_dump_bytes(const void *data, int num)
++{
++ const u8* ptr = (const u8*)data;
++
++ if (num <= 0) {
++ printk("\n");
++ return;
++ }
++
++ while (num >= 16) {
++ printk( "%02X %02X %02X %02X %02X %02X %02X %02X "
++ "%02X %02X %02X %02X %02X %02X %02X %02X\n",
++ ptr[0], ptr[1], ptr[2], ptr[3],
++ ptr[4], ptr[5], ptr[6], ptr[7],
++ ptr[8], ptr[9], ptr[10], ptr[11],
++ ptr[12], ptr[13], ptr[14], ptr[15]);
++ num -= 16;
++ ptr += 16;
++ }
++ if (num > 0) {
++ while (--num > 0)
++ printk("%02X ", *ptr++);
++ printk("%02X\n", *ptr);
++ }
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_get_firmware_version
++*/
++void
++acx_s_get_firmware_version(acx_device_t *adev)
++{
++ fw_ver_t fw;
++ u8 hexarr[4] = { 0, 0, 0, 0 };
++ int hexidx = 0, val = 0;
++ const char *num;
++ char c;
++
++ FN_ENTER;
++
++ memset(fw.fw_id, 'E', FW_ID_SIZE);
++ acx_s_interrogate(adev, &fw, ACX1xx_IE_FWREV);
++ memcpy(adev->firmware_version, fw.fw_id, FW_ID_SIZE);
++ adev->firmware_version[FW_ID_SIZE] = '\0';
++
++ log(L_DEBUG, "fw_ver: fw_id='%s' hw_id=%08X\n",
++ adev->firmware_version, fw.hw_id);
++
++ if (strncmp(fw.fw_id, "Rev ", 4) != 0) {
++ printk("acx: strange firmware version string "
++ "'%s', please report\n", adev->firmware_version);
++ adev->firmware_numver = 0x01090407; /* assume 1.9.4.7 */
++ } else {
++ num = &fw.fw_id[4];
++ while (1) {
++ c = *num++;
++ if ((c == '.') || (c == '\0')) {
++ hexarr[hexidx++] = val;
++ if ((hexidx > 3) || (c == '\0')) /* end? */
++ break;
++ val = 0;
++ continue;
++ }
++ if ((c >= '0') && (c <= '9'))
++ c -= '0';
++ else
++ c = c - 'a' + (char)10;
++ val = val*16 + c;
++ }
++
++ adev->firmware_numver = (u32)(
++ (hexarr[0] << 24) | (hexarr[1] << 16)
++ | (hexarr[2] << 8) | hexarr[3]);
++ log(L_DEBUG, "firmware_numver 0x%08X\n", adev->firmware_numver);
++ }
++ if (IS_ACX111(adev)) {
++ if (adev->firmware_numver == 0x00010011) {
++ /* This one does not survive floodpinging */
++ printk("acx: firmware '%s' is known to be buggy, "
++ "please upgrade\n", adev->firmware_version);
++ }
++ }
++
++ adev->firmware_id = le32_to_cpu(fw.hw_id);
++
++ /* we're able to find out more detailed chip names now */
++ switch (adev->firmware_id & 0xffff0000) {
++ case 0x01010000:
++ case 0x01020000:
++ adev->chip_name = "TNETW1100A";
++ break;
++ case 0x01030000:
++ adev->chip_name = "TNETW1100B";
++ break;
++ case 0x03000000:
++ case 0x03010000:
++ adev->chip_name = "TNETW1130";
++ break;
++ case 0x04030000: /* 0x04030101 is TNETW1450 */
++ adev->chip_name = "TNETW1450";
++ break;
++ default:
++ printk("acx: unknown chip ID 0x%08X, "
++ "please report\n", adev->firmware_id);
++ break;
++ }
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_display_hardware_details
++**
++** Displays hw/fw version, radio type etc...
++*/
++void
++acx_display_hardware_details(acx_device_t *adev)
++{
++ const char *radio_str, *form_str;
++
++ FN_ENTER;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ radio_str = "Maxim";
++ break;
++ case RADIO_RFMD_11:
++ radio_str = "RFMD";
++ break;
++ case RADIO_RALINK_15:
++ radio_str = "Ralink";
++ break;
++ case RADIO_RADIA_16:
++ radio_str = "Radia";
++ break;
++ case RADIO_UNKNOWN_17:
++ /* TI seems to have a radio which is
++ * additionally 802.11a capable, too */
++ radio_str = "802.11a/b/g radio?! Please report";
++ break;
++ case RADIO_UNKNOWN_19:
++ radio_str = "A radio used by Safecom cards?! Please report";
++ break;
++ case RADIO_UNKNOWN_1B:
++ radio_str = "An unknown radio used by TNETW1450 USB adapters";
++ break;
++ default:
++ radio_str = "UNKNOWN, please report radio type name!";
++ break;
++ }
++
++ switch (adev->form_factor) {
++ case 0x00:
++ form_str = "unspecified";
++ break;
++ case 0x01:
++ form_str = "(mini-)PCI / CardBus";
++ break;
++ case 0x02:
++ form_str = "USB";
++ break;
++ case 0x03:
++ form_str = "Compact Flash";
++ break;
++ default:
++ form_str = "UNKNOWN, please report";
++ break;
++ }
++
++ printk("acx: === chipset %s, radio type 0x%02X (%s), "
++ "form factor 0x%02X (%s), EEPROM version 0x%02X: "
++ "uploaded firmware '%s' ===\n",
++ adev->chip_name, adev->radio_type, radio_str,
++ adev->form_factor, form_str, adev->eeprom_version,
++ adev->firmware_version);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++*/
++int
++acx_e_change_mtu(struct net_device *ndev, int mtu)
++{
++ enum {
++ MIN_MTU = 256,
++ MAX_MTU = WLAN_DATA_MAXLEN - (ETH_HLEN)
++ };
++
++ if (mtu < MIN_MTU || mtu > MAX_MTU)
++ return -EINVAL;
++
++ ndev->mtu = mtu;
++ return 0;
++}
++
++
++/***********************************************************************
++** acx_e_get_stats, acx_e_get_wireless_stats
++*/
++struct net_device_stats*
++acx_e_get_stats(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ return &adev->stats;
++}
++
++struct iw_statistics*
++acx_e_get_wireless_stats(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ return &adev->wstats;
++}
++
++
++/***********************************************************************
++** maps acx111 tx descr rate field to acx100 one
++*/
++const u8
++acx_bitpos2rate100[] = {
++ RATE100_1 ,/* 0 */
++ RATE100_2 ,/* 1 */
++ RATE100_5 ,/* 2 */
++ RATE100_2 ,/* 3, should not happen */
++ RATE100_2 ,/* 4, should not happen */
++ RATE100_11 ,/* 5 */
++ RATE100_2 ,/* 6, should not happen */
++ RATE100_2 ,/* 7, should not happen */
++ RATE100_22 ,/* 8 */
++ RATE100_2 ,/* 9, should not happen */
++ RATE100_2 ,/* 10, should not happen */
++ RATE100_2 ,/* 11, should not happen */
++ RATE100_2 ,/* 12, should not happen */
++ RATE100_2 ,/* 13, should not happen */
++ RATE100_2 ,/* 14, should not happen */
++ RATE100_2 ,/* 15, should not happen */
++};
++
++u8
++acx_rate111to100(u16 r) {
++ return acx_bitpos2rate100[highest_bit(r)];
++}
++
++
++/***********************************************************************
++** Calculate level like the feb 2003 windows driver seems to do
++*/
++static u8
++acx_signal_to_winlevel(u8 rawlevel)
++{
++ /* u8 winlevel = (u8) (0.5 + 0.625 * rawlevel); */
++ u8 winlevel = ((4 + (rawlevel * 5)) / 8);
++
++ if (winlevel > 100)
++ winlevel = 100;
++ return winlevel;
++}
++
++u8
++acx_signal_determine_quality(u8 signal, u8 noise)
++{
++ int qual;
++
++ qual = (((signal - 30) * 100 / 70) + (100 - noise * 4)) / 2;
++
++ if (qual > 100)
++ return 100;
++ if (qual < 0)
++ return 0;
++ return qual;
++}
++
++
++/***********************************************************************
++** Interrogate/configure commands
++*/
++
++/* FIXME: the lengths given here probably aren't always correct.
++ * They should be gradually replaced by proper "sizeof(acx1XX_ie_XXXX)-4",
++ * unless the firmware actually expects a different length than the struct length */
++static const u16
++acx100_ie_len[] = {
++ 0,
++ ACX100_IE_ACX_TIMER_LEN,
++ sizeof(acx100_ie_powersave_t)-4, /* is that 6 or 8??? */
++ ACX1xx_IE_QUEUE_CONFIG_LEN,
++ ACX100_IE_BLOCK_SIZE_LEN,
++ ACX1xx_IE_MEMORY_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_RATE_FALLBACK_LEN,
++ ACX100_IE_WEP_OPTIONS_LEN,
++ ACX1xx_IE_MEMORY_MAP_LEN, /* ACX1xx_IE_SSID_LEN, */
++ 0,
++ ACX1xx_IE_ASSOC_ID_LEN,
++ 0,
++ ACX111_IE_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_FWREV_LEN,
++ ACX1xx_IE_FCS_ERROR_COUNT_LEN,
++ ACX1xx_IE_MEDIUM_USAGE_LEN,
++ ACX1xx_IE_RXCONFIG_LEN,
++ 0,
++ 0,
++ sizeof(fw_stats_t)-4,
++ 0,
++ ACX1xx_IE_FEATURE_CONFIG_LEN,
++ ACX111_IE_KEY_CHOOSE_LEN,
++ ACX1FF_IE_MISC_CONFIG_TABLE_LEN,
++ ACX1FF_IE_WONE_CONFIG_LEN,
++ 0,
++ ACX1FF_IE_TID_CONFIG_LEN,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_CALIB_ASSESSMENT_LEN,
++ ACX1FF_IE_BEACON_FILTER_OPTIONS_LEN,
++ ACX1FF_IE_LOW_RSSI_THRESH_OPT_LEN,
++ ACX1FF_IE_NOISE_HISTOGRAM_RESULTS_LEN,
++ 0,
++ ACX1FF_IE_PACKET_DETECT_THRESH_LEN,
++ ACX1FF_IE_TX_CONFIG_OPTIONS_LEN,
++ ACX1FF_IE_CCA_THRESHOLD_LEN,
++ ACX1FF_IE_EVENT_MASK_LEN,
++ ACX1FF_IE_DTIM_PERIOD_LEN,
++ 0,
++ ACX1FF_IE_ACI_CONFIG_SET_LEN,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_EEPROM_VER_LEN,
++};
++
++static const u16
++acx100_ie_len_dot11[] = {
++ 0,
++ ACX1xx_IE_DOT11_STATION_ID_LEN,
++ 0,
++ ACX100_IE_DOT11_BEACON_PERIOD_LEN,
++ ACX1xx_IE_DOT11_DTIM_PERIOD_LEN,
++ ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN,
++ ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN,
++ ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE_LEN,
++ ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN,
++ 0,
++ ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN_LEN,
++ ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN,
++ 0,
++ ACX1xx_IE_DOT11_TX_POWER_LEVEL_LEN,
++ ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN,
++ ACX100_IE_DOT11_ED_THRESHOLD_LEN,
++ ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET_LEN,
++ 0,
++ 0,
++ 0,
++};
++
++static const u16
++acx111_ie_len[] = {
++ 0,
++ ACX100_IE_ACX_TIMER_LEN,
++ sizeof(acx111_ie_powersave_t)-4,
++ ACX1xx_IE_QUEUE_CONFIG_LEN,
++ ACX100_IE_BLOCK_SIZE_LEN,
++ ACX1xx_IE_MEMORY_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_RATE_FALLBACK_LEN,
++ ACX100_IE_WEP_OPTIONS_LEN,
++ ACX1xx_IE_MEMORY_MAP_LEN, /* ACX1xx_IE_SSID_LEN, */
++ 0,
++ ACX1xx_IE_ASSOC_ID_LEN,
++ 0,
++ ACX111_IE_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_FWREV_LEN,
++ ACX1xx_IE_FCS_ERROR_COUNT_LEN,
++ ACX1xx_IE_MEDIUM_USAGE_LEN,
++ ACX1xx_IE_RXCONFIG_LEN,
++ 0,
++ 0,
++ sizeof(fw_stats_t)-4,
++ 0,
++ ACX1xx_IE_FEATURE_CONFIG_LEN,
++ ACX111_IE_KEY_CHOOSE_LEN,
++ ACX1FF_IE_MISC_CONFIG_TABLE_LEN,
++ ACX1FF_IE_WONE_CONFIG_LEN,
++ 0,
++ ACX1FF_IE_TID_CONFIG_LEN,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_CALIB_ASSESSMENT_LEN,
++ ACX1FF_IE_BEACON_FILTER_OPTIONS_LEN,
++ ACX1FF_IE_LOW_RSSI_THRESH_OPT_LEN,
++ ACX1FF_IE_NOISE_HISTOGRAM_RESULTS_LEN,
++ 0,
++ ACX1FF_IE_PACKET_DETECT_THRESH_LEN,
++ ACX1FF_IE_TX_CONFIG_OPTIONS_LEN,
++ ACX1FF_IE_CCA_THRESHOLD_LEN,
++ ACX1FF_IE_EVENT_MASK_LEN,
++ ACX1FF_IE_DTIM_PERIOD_LEN,
++ 0,
++ ACX1FF_IE_ACI_CONFIG_SET_LEN,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_EEPROM_VER_LEN,
++};
++
++static const u16
++acx111_ie_len_dot11[] = {
++ 0,
++ ACX1xx_IE_DOT11_STATION_ID_LEN,
++ 0,
++ ACX100_IE_DOT11_BEACON_PERIOD_LEN,
++ ACX1xx_IE_DOT11_DTIM_PERIOD_LEN,
++ ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN,
++ ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN,
++ ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE_LEN,
++ ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN,
++ 0,
++ ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN_LEN,
++ ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN,
++ 0,
++ ACX1xx_IE_DOT11_TX_POWER_LEVEL_LEN,
++ ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN,
++ ACX100_IE_DOT11_ED_THRESHOLD_LEN,
++ ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET_LEN,
++ 0,
++ 0,
++ 0,
++};
++
++
++#undef FUNC
++#define FUNC "configure"
++#if !ACX_DEBUG
++int
++acx_s_configure(acx_device_t *adev, void *pdr, int type)
++{
++#else
++int
++acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* typestr)
++{
++#endif
++ u16 len;
++ int res;
++
++ if (type < 0x1000)
++ len = adev->ie_len[type];
++ else
++ len = adev->ie_len_dot11[type - 0x1000];
++
++ log(L_CTL, FUNC"(type:%s,len:%u)\n", typestr, len);
++ if (unlikely(!len)) {
++ log(L_DEBUG, "zero-length type %s?!\n", typestr);
++ }
++
++ ((acx_ie_generic_t *)pdr)->type = cpu_to_le16(type);
++ ((acx_ie_generic_t *)pdr)->len = cpu_to_le16(len);
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIGURE, pdr, len + 4);
++ if (unlikely(OK != res)) {
++#if ACX_DEBUG
++ printk("%s: "FUNC"(type:%s) FAILED\n", adev->ndev->name, typestr);
++#else
++ printk("%s: "FUNC"(type:0x%X) FAILED\n", adev->ndev->name, type);
++#endif
++ /* dump_stack() is already done in issue_cmd() */
++ }
++ return res;
++}
++
++#undef FUNC
++#define FUNC "interrogate"
++#if !ACX_DEBUG
++int
++acx_s_interrogate(acx_device_t *adev, void *pdr, int type)
++{
++#else
++int
++acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type,
++ const char* typestr)
++{
++#endif
++ u16 len;
++ int res;
++
++ /* FIXME: no check whether this exceeds the array yet.
++ * We should probably remember the number of entries... */
++ if (type < 0x1000)
++ len = adev->ie_len[type];
++ else
++ len = adev->ie_len_dot11[type-0x1000];
++
++ log(L_CTL, FUNC"(type:%s,len:%u)\n", typestr, len);
++
++ ((acx_ie_generic_t *)pdr)->type = cpu_to_le16(type);
++ ((acx_ie_generic_t *)pdr)->len = cpu_to_le16(len);
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_INTERROGATE, pdr, len + 4);
++ if (unlikely(OK != res)) {
++#if ACX_DEBUG
++ printk("%s: "FUNC"(type:%s) FAILED\n", adev->ndev->name, typestr);
++#else
++ printk("%s: "FUNC"(type:0x%X) FAILED\n", adev->ndev->name, type);
++#endif
++ /* dump_stack() is already done in issue_cmd() */
++ }
++ return res;
++}
++
++#if CMD_DISCOVERY
++void
++great_inquisitor(acx_device_t *adev)
++{
++ static struct {
++ u16 type;
++ u16 len;
++ /* 0x200 was too large here: */
++ u8 data[0x100 - 4];
++ } ACX_PACKED ie;
++ u16 type;
++
++ FN_ENTER;
++
++ /* 0..0x20, 0x1000..0x1020 */
++ for (type = 0; type <= 0x1020; type++) {
++ if (type == 0x21)
++ type = 0x1000;
++ ie.type = cpu_to_le16(type);
++ ie.len = cpu_to_le16(sizeof(ie) - 4);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_INTERROGATE, &ie, sizeof(ie));
++ }
++ FN_EXIT0;
++}
++#endif
++
++
++#ifdef CONFIG_PROC_FS
++/***********************************************************************
++** /proc files
++*/
++/***********************************************************************
++** acx_l_proc_output
++** Generate content for our /proc entry
++**
++** Arguments:
++** buf is a pointer to write output to
++** adev is the usual pointer to our private struct acx_device
++** Returns:
++** number of bytes actually written to buf
++** Side effects:
++** none
++*/
++static int
++acx_l_proc_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ p += sprintf(p,
++ "acx driver version:\t\t" ACX_RELEASE "\n"
++ "Wireless extension version:\t" STRING(WIRELESS_EXT) "\n"
++ "chip name:\t\t\t%s (0x%08X)\n"
++ "radio type:\t\t\t0x%02X\n"
++ "form factor:\t\t\t0x%02X\n"
++ "EEPROM version:\t\t\t0x%02X\n"
++ "firmware version:\t\t%s (0x%08X)\n",
++ adev->chip_name, adev->firmware_id,
++ adev->radio_type,
++ adev->form_factor,
++ adev->eeprom_version,
++ adev->firmware_version, adev->firmware_numver);
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ p += sprintf(p, "BSS %u BSSID "MACSTR" ESSID %s channel %u "
++ "Cap 0x%X SIR %u SNR %u\n",
++ i, MAC(bss->bssid), (char*)bss->essid, bss->channel,
++ bss->cap_info, bss->sir, bss->snr);
++ }
++ p += sprintf(p, "status:\t\t\t%u (%s)\n",
++ adev->status, acx_get_status_name(adev->status));
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_proc_diag_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ unsigned long flags;
++ unsigned int len = 0, partlen;
++ u32 temp1, temp2;
++ u8 *st, *st_end;
++#ifdef __BIG_ENDIAN
++ u8 *st2;
++#endif
++ fw_stats_t *fw_stats;
++ char *part_str = NULL;
++ fw_stats_tx_t *tx = NULL;
++ fw_stats_rx_t *rx = NULL;
++ fw_stats_dma_t *dma = NULL;
++ fw_stats_irq_t *irq = NULL;
++ fw_stats_wep_t *wep = NULL;
++ fw_stats_pwr_t *pwr = NULL;
++ fw_stats_mic_t *mic = NULL;
++ fw_stats_aes_t *aes = NULL;
++ fw_stats_event_t *evt = NULL;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++#if defined (ACX_MEM)
++ p = acxmem_s_proc_diag_output(p, adev);
++#else
++ if (IS_PCI(adev))
++ p = acxpci_s_proc_diag_output(p, adev);
++#endif
++
++ p += sprintf(p,
++ "\n"
++ "** network status **\n"
++ "dev_state_mask 0x%04X\n"
++ "status %u (%s), "
++ "mode %u, channel %u, "
++ "reg_dom_id 0x%02X, reg_dom_chanmask 0x%04X, ",
++ adev->dev_state_mask,
++ adev->status, acx_get_status_name(adev->status),
++ adev->mode, adev->channel,
++ adev->reg_dom_id, adev->reg_dom_chanmask
++ );
++ p += sprintf(p,
++ "ESSID \"%s\", essid_active %d, essid_len %d, "
++ "essid_for_assoc \"%s\", nick \"%s\"\n"
++ "WEP ena %d, restricted %d, idx %d\n",
++ adev->essid, adev->essid_active, (int)adev->essid_len,
++ adev->essid_for_assoc, adev->nick,
++ adev->wep_enabled, adev->wep_restricted,
++ adev->wep_current_index);
++ p += sprintf(p, "dev_addr "MACSTR"\n", MAC(adev->dev_addr));
++ p += sprintf(p, "bssid "MACSTR"\n", MAC(adev->bssid));
++ p += sprintf(p, "ap_filter "MACSTR"\n", MAC(adev->ap));
++
++ p += sprintf(p,
++ "\n"
++ "** PHY status **\n"
++ "tx_disabled %d, tx_level_dbm %d\n" /* "tx_level_val %d, tx_level_auto %d\n" */
++ "sensitivity %d, antenna 0x%02X, ed_threshold %d, cca %d, preamble_mode %d\n"
++ "rate_basic 0x%04X, rate_oper 0x%04X\n"
++ "rts_threshold %d, frag_threshold %d, short_retry %d, long_retry %d\n"
++ "msdu_lifetime %d, listen_interval %d, beacon_interval %d\n",
++ adev->tx_disabled, adev->tx_level_dbm, /* adev->tx_level_val, adev->tx_level_auto, */
++ adev->sensitivity, adev->antenna, adev->ed_threshold, adev->cca, adev->preamble_mode,
++ adev->rate_basic, adev->rate_oper,
++ adev->rts_threshold, adev->frag_threshold, adev->short_retry, adev->long_retry,
++ adev->msdu_lifetime, adev->listen_interval, adev->beacon_interval);
++
++ acx_unlock(adev, flags);
++
++ p += sprintf(p,
++ "\n"
++ "** Firmware **\n"
++ "NOTE: version dependent statistics layout, "
++ "please report if you suspect wrong parsing!\n"
++ "\n"
++ "version \"%s\"\n", adev->firmware_version);
++
++ /* TODO: may replace kmalloc/memset with kzalloc once
++ * Linux 2.6.14 is widespread */
++ fw_stats = kmalloc(sizeof(*fw_stats), GFP_KERNEL);
++ if (!fw_stats) {
++ FN_EXIT1(0);
++ return 0;
++ }
++ memset(fw_stats, 0, sizeof(*fw_stats));
++
++ st = (u8 *)fw_stats;
++
++ part_str = "statistics query command";
++
++ if (OK != acx_s_interrogate(adev, st, ACX1xx_IE_FIRMWARE_STATISTICS))
++ goto fw_stats_end;
++
++ st += sizeof(u16);
++ len = *(u16 *)st;
++
++ if (len > sizeof(*fw_stats)) {
++ p += sprintf(p,
++ "firmware version with bigger fw_stats struct detected\n"
++ "(%u vs. %u), please report\n", len, sizeof(fw_stats_t));
++ if (len > sizeof(*fw_stats)) {
++ p += sprintf(p, "struct size exceeded allocation!\n");
++ len = sizeof(*fw_stats);
++ }
++ }
++ st += sizeof(u16);
++ st_end = st - 2*sizeof(u16) + len;
++
++#ifdef __BIG_ENDIAN
++ /* let's make one bold assumption here:
++ * (hopefully!) *all* statistics fields are u32 only,
++ * thus if we need to make endianness corrections
++ * we can simply do them in one go, in advance */
++ st2 = (u8 *)fw_stats;
++ for (temp1 = 0; temp1 < len; temp1 += 4, st2 += 4)
++ *(u32 *)st2 = le32_to_cpu(*(u32 *)st2);
++#endif
++
++ part_str = "Rx/Tx";
++
++ /* directly at end of a struct part? --> no error! */
++ if (st == st_end)
++ goto fw_stats_end;
++
++ tx = (fw_stats_tx_t *)st;
++ st += sizeof(fw_stats_tx_t);
++ rx = (fw_stats_rx_t *)st;
++ st += sizeof(fw_stats_rx_t);
++ partlen = sizeof(fw_stats_tx_t) + sizeof(fw_stats_rx_t);
++
++ if (IS_ACX100(adev)) {
++ /* at least ACX100 PCI F/W 1.9.8.b
++ * and ACX100 USB F/W 1.0.7-USB
++ * don't have those two fields... */
++ st -= 2*sizeof(u32);
++
++ /* our parsing doesn't quite match this firmware yet,
++ * log failure */
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = temp2 = 999999999;
++ } else {
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = rx->rx_aci_events;
++ temp2 = rx->rx_aci_resets;
++ }
++
++ p += sprintf(p,
++ "%s:\n"
++ " tx_desc_overfl %u\n"
++ " rx_OutOfMem %u, rx_hdr_overfl %u, rx_hw_stuck %u\n"
++ " rx_dropped_frame %u, rx_frame_ptr_err %u, rx_xfr_hint_trig %u\n"
++ " rx_aci_events %u, rx_aci_resets %u\n",
++ part_str,
++ tx->tx_desc_of,
++ rx->rx_oom,
++ rx->rx_hdr_of,
++ rx->rx_hw_stuck,
++ rx->rx_dropped_frame,
++ rx->rx_frame_ptr_err,
++ rx->rx_xfr_hint_trig,
++ temp1,
++ temp2);
++
++ part_str = "DMA";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ dma = (fw_stats_dma_t *)st;
++ partlen = sizeof(fw_stats_dma_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " rx_dma_req %u, rx_dma_err %u, tx_dma_req %u, tx_dma_err %u\n",
++ part_str,
++ dma->rx_dma_req,
++ dma->rx_dma_err,
++ dma->tx_dma_req,
++ dma->tx_dma_err);
++
++ part_str = "IRQ";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ irq = (fw_stats_irq_t *)st;
++ partlen = sizeof(fw_stats_irq_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " cmd_cplt %u, fiq %u\n"
++ " rx_hdrs %u, rx_cmplt %u, rx_mem_overfl %u, rx_rdys %u\n"
++ " irqs %u, tx_procs %u, decrypt_done %u\n"
++ " dma_0_done %u, dma_1_done %u, tx_exch_complet %u\n"
++ " commands %u, rx_procs %u, hw_pm_mode_changes %u\n"
++ " host_acks %u, pci_pm %u, acm_wakeups %u\n",
++ part_str,
++ irq->cmd_cplt,
++ irq->fiq,
++ irq->rx_hdrs,
++ irq->rx_cmplt,
++ irq->rx_mem_of,
++ irq->rx_rdys,
++ irq->irqs,
++ irq->tx_procs,
++ irq->decrypt_done,
++ irq->dma_0_done,
++ irq->dma_1_done,
++ irq->tx_exch_complet,
++ irq->commands,
++ irq->rx_procs,
++ irq->hw_pm_mode_changes,
++ irq->host_acks,
++ irq->pci_pm,
++ irq->acm_wakeups);
++
++ part_str = "WEP";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ wep = (fw_stats_wep_t *)st;
++ partlen = sizeof(fw_stats_wep_t);
++ st += partlen;
++
++ if (
++ (IS_PCI(adev) && IS_ACX100(adev))
++ || (IS_USB(adev) && IS_ACX100(adev))
++ || (IS_MEM(adev) && IS_ACX100(adev))
++ ) {
++ /* at least ACX100 PCI F/W 1.9.8.b,
++ * ACX100 USB F/W 1.0.7-USB
++ * and ACX100 Generic Slave F/W 1.10.7.K
++ * don't have those two fields...
++ */
++ st -= 2*sizeof(u32);
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = temp2 = 999999999;
++ } else {
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = wep->wep_pkt_decrypt;
++ temp2 = wep->wep_decrypt_irqs;
++ }
++
++ p += sprintf(p,
++ "%s:\n"
++ " wep_key_count %u, wep_default_key_count %u, dot11_def_key_mib %u\n"
++ " wep_key_not_found %u, wep_decrypt_fail %u\n"
++ " wep_pkt_decrypt %u, wep_decrypt_irqs %u\n",
++ part_str,
++ wep->wep_key_count,
++ wep->wep_default_key_count,
++ wep->dot11_def_key_mib,
++ wep->wep_key_not_found,
++ wep->wep_decrypt_fail,
++ temp1,
++ temp2);
++
++ part_str = "power";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ pwr = (fw_stats_pwr_t *)st;
++ partlen = sizeof(fw_stats_pwr_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " tx_start_ctr %u, no_ps_tx_too_short %u\n"
++ " rx_start_ctr %u, no_ps_rx_too_short %u\n"
++ " lppd_started %u\n"
++ " no_lppd_too_noisy %u, no_lppd_too_short %u, no_lppd_matching_frame %u\n",
++ part_str,
++ pwr->tx_start_ctr,
++ pwr->no_ps_tx_too_short,
++ pwr->rx_start_ctr,
++ pwr->no_ps_rx_too_short,
++ pwr->lppd_started,
++ pwr->no_lppd_too_noisy,
++ pwr->no_lppd_too_short,
++ pwr->no_lppd_matching_frame);
++
++ part_str = "MIC";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ mic = (fw_stats_mic_t *)st;
++ partlen = sizeof(fw_stats_mic_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " mic_rx_pkts %u, mic_calc_fail %u\n",
++ part_str,
++ mic->mic_rx_pkts,
++ mic->mic_calc_fail);
++
++ part_str = "AES";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ aes = (fw_stats_aes_t *)st;
++ partlen = sizeof(fw_stats_aes_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " aes_enc_fail %u, aes_dec_fail %u\n"
++ " aes_enc_pkts %u, aes_dec_pkts %u\n"
++ " aes_enc_irq %u, aes_dec_irq %u\n",
++ part_str,
++ aes->aes_enc_fail,
++ aes->aes_dec_fail,
++ aes->aes_enc_pkts,
++ aes->aes_dec_pkts,
++ aes->aes_enc_irq,
++ aes->aes_dec_irq);
++
++ part_str = "event";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ evt = (fw_stats_event_t *)st;
++ partlen = sizeof(fw_stats_event_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " heartbeat %u, calibration %u\n"
++ " rx_mismatch %u, rx_mem_empty %u, rx_pool %u\n"
++ " oom_late %u\n"
++ " phy_tx_err %u, tx_stuck %u\n",
++ part_str,
++ evt->heartbeat,
++ evt->calibration,
++ evt->rx_mismatch,
++ evt->rx_mem_empty,
++ evt->rx_pool,
++ evt->oom_late,
++ evt->phy_tx_err,
++ evt->tx_stuck);
++
++ if (st < st_end)
++ goto fw_stats_bigger;
++
++ goto fw_stats_end;
++
++fw_stats_fail:
++ st -= partlen;
++ p += sprintf(p,
++ "failed at %s part (size %u), offset %u (struct size %u), "
++ "please report\n", part_str, partlen,
++ (int)st - (int)fw_stats, len);
++
++fw_stats_bigger:
++ for (; st < st_end; st += 4)
++ p += sprintf(p,
++ "UNKN%3d: %u\n", (int)st - (int)fw_stats, *(u32 *)st);
++
++fw_stats_end:
++ kfree(fw_stats);
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_proc_phy_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ /*
++ if (RADIO_RFMD_11 != adev->radio_type) {
++ printk("sorry, not yet adapted for radio types "
++ "other than RFMD, please verify "
++ "PHY size etc. first!\n");
++ goto end;
++ }
++ */
++
++ /* The PHY area is only 0x80 bytes long; further pages after that
++ * only have some page number registers with altered value,
++ * all other registers remain the same. */
++ for (i = 0; i < 0x80; i++) {
++ acx_s_read_phy_reg(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++** acx_e_read_proc_XXXX
++** Handle our /proc entry
++**
++** Arguments:
++** standard kernel read_proc interface
++** Returns:
++** number of bytes written to buf
++** Side effects:
++** none
++*/
++static int
++acx_e_read_proc(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ unsigned long flags;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++ /* fill buf */
++ length = acx_l_proc_output(buf, adev);
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static char _buf[32768];
++static int
++acx_e_read_proc_diag(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ /* fill buf */
++ length = acx_s_proc_diag_output(_buf, adev);
++ acx_sem_unlock(adev);
++
++ memcpy(buf, _buf + offset, count);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = count;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static int
++acx_e_read_proc_eeprom(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ /* fill buf */
++ length = 0;
++#if defined (ACX_MEM)
++ acx_sem_lock(adev);
++ length = acxmem_proc_eeprom_output(buf, adev);
++ acx_sem_unlock(adev);
++#else
++ if (IS_PCI(adev)) {
++ acx_sem_lock(adev);
++ length = acxpci_proc_eeprom_output(buf, adev);
++ acx_sem_unlock(adev);
++ }
++#endif
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static int
++acx_e_read_proc_phy(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ /* fill buf */
++ length = acx_s_proc_phy_output(buf, adev);
++ acx_sem_unlock(adev);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++
++/***********************************************************************
++** /proc files registration
++*/
++static const char * const
++proc_files[] = { "", "_diag", "_eeprom", "_phy" };
++
++static read_proc_t * const
++proc_funcs[] = {
++ acx_e_read_proc,
++ acx_e_read_proc_diag,
++ acx_e_read_proc_eeprom,
++ acx_e_read_proc_phy
++};
++
++static int
++manage_proc_entries(const struct net_device *ndev, int remove)
++{
++ acx_device_t *adev = ndev2adev((struct net_device *)ndev);
++ char procbuf[80];
++ int i;
++
++ for (i = 0; i < VEC_SIZE(proc_files); i++) {
++ snprintf(procbuf, sizeof(procbuf),
++ "driver/acx_%s%s", ndev->name, proc_files[i]);
++ log(L_INIT, "%sing /proc entry %s\n",
++ remove ? "remov" : "creat", procbuf);
++ if (!remove) {
++ if (!create_proc_read_entry(procbuf, 0, 0, proc_funcs[i], adev)) {
++ printk("acx: cannot register /proc entry %s\n", procbuf);
++ return NOT_OK;
++ }
++ } else {
++ remove_proc_entry(procbuf, NULL);
++ }
++ }
++ return OK;
++}
++
++int
++acx_proc_register_entries(const struct net_device *ndev)
++{
++ return manage_proc_entries(ndev, 0);
++}
++
++int
++acx_proc_unregister_entries(const struct net_device *ndev)
++{
++ return manage_proc_entries(ndev, 1);
++}
++#endif /* CONFIG_PROC_FS */
++
++
++/***********************************************************************
++** acx_cmd_join_bssid
++**
++** Common code for both acx100 and acx111.
++*/
++/* NB: does NOT match RATE100_nn but matches ACX[111]_SCAN_RATE_n */
++static const u8
++bitpos2genframe_txrate[] = {
++ 10, /* 0. 1 Mbit/s */
++ 20, /* 1. 2 Mbit/s */
++ 55, /* 2. 5.5 Mbit/s */
++ 0x0B, /* 3. 6 Mbit/s */
++ 0x0F, /* 4. 9 Mbit/s */
++ 110, /* 5. 11 Mbit/s */
++ 0x0A, /* 6. 12 Mbit/s */
++ 0x0E, /* 7. 18 Mbit/s */
++ 220, /* 8. 22 Mbit/s */
++ 0x09, /* 9. 24 Mbit/s */
++ 0x0D, /* 10. 36 Mbit/s */
++ 0x08, /* 11. 48 Mbit/s */
++ 0x0C, /* 12. 54 Mbit/s */
++ 10, /* 13. 1 Mbit/s, should never happen */
++ 10, /* 14. 1 Mbit/s, should never happen */
++ 10, /* 15. 1 Mbit/s, should never happen */
++};
++
++/* Looks scary, eh?
++** Actually, each one compiled into one AND and one SHIFT,
++** 31 bytes in x86 asm (more if uints are replaced by u16/u8) */
++static inline unsigned int
++rate111to5bits(unsigned int rate)
++{
++ return (rate & 0x7)
++ | ( (rate & RATE111_11) / (RATE111_11/JOINBSS_RATES_11) )
++ | ( (rate & RATE111_22) / (RATE111_22/JOINBSS_RATES_22) )
++ ;
++}
++
++static void
++acx_s_cmd_join_bssid(acx_device_t *adev, const u8 *bssid)
++{
++ acx_joinbss_t tmp;
++ int dtim_interval;
++ int i;
++
++ if (mac_is_zero(bssid))
++ return;
++
++ FN_ENTER;
++
++ dtim_interval = (ACX_MODE_0_ADHOC == adev->mode) ?
++ 1 : adev->dtim_interval;
++
++ memset(&tmp, 0, sizeof(tmp));
++
++ for (i = 0; i < ETH_ALEN; i++) {
++ tmp.bssid[i] = bssid[ETH_ALEN-1 - i];
++ }
++
++ tmp.beacon_interval = cpu_to_le16(adev->beacon_interval);
++
++ /* Basic rate set. Control frame responses (such as ACK or CTS frames)
++ ** are sent with one of these rates */
++ if (IS_ACX111(adev)) {
++ /* It was experimentally determined that rates_basic
++ ** can take 11g rates as well, not only rates
++ ** defined with JOINBSS_RATES_BASIC111_nnn.
++ ** Just use RATE111_nnn constants... */
++ tmp.u.acx111.dtim_interval = dtim_interval;
++ tmp.u.acx111.rates_basic = cpu_to_le16(adev->rate_basic);
++ log(L_ASSOC, "rates_basic:%04X, rates_supported:%04X\n",
++ adev->rate_basic, adev->rate_oper);
++ } else {
++ tmp.u.acx100.dtim_interval = dtim_interval;
++ tmp.u.acx100.rates_basic = rate111to5bits(adev->rate_basic);
++ tmp.u.acx100.rates_supported = rate111to5bits(adev->rate_oper);
++ log(L_ASSOC, "rates_basic:%04X->%02X, "
++ "rates_supported:%04X->%02X\n",
++ adev->rate_basic, tmp.u.acx100.rates_basic,
++ adev->rate_oper, tmp.u.acx100.rates_supported);
++ }
++
++ /* Setting up how Beacon, Probe Response, RTS, and PS-Poll frames
++ ** will be sent (rate/modulation/preamble) */
++ tmp.u.txrate.genfrm_txrate = bitpos2genframe_txrate[lowest_bit(adev->rate_basic)];
++ tmp.genfrm_mod_pre = 0; /* FIXME: was = adev->capab_short (which was always 0); */
++ /* we can use short pre *if* all peers can understand it */
++ /* FIXME #2: we need to correctly set PBCC/OFDM bits here too */
++
++ /* we switch fw to STA mode in MONITOR mode, it seems to be
++ ** the only mode where fw does not emit beacons by itself
++ ** but allows us to send anything (we really want to retain
++ ** ability to tx arbitrary frames in MONITOR mode)
++ */
++ tmp.macmode = (adev->mode != ACX_MODE_MONITOR ? adev->mode : ACX_MODE_2_STA);
++ tmp.channel = adev->channel;
++ tmp.essid_len = adev->essid_len;
++ /* NOTE: the code memcpy'd essid_len + 1 before, which is WRONG! */
++ memcpy(tmp.essid, adev->essid, tmp.essid_len);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_JOIN, &tmp, tmp.essid_len + 0x11);
++
++ log(L_ASSOC|L_DEBUG, "BSS_Type = %u\n", tmp.macmode);
++ acxlog_mac(L_ASSOC|L_DEBUG, "JoinBSSID MAC:", adev->bssid, "\n");
++
++ acx_update_capabilities(adev);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_s_cmd_start_scan
++**
++** Issue scan command to the hardware
++**
++** unified function for both ACX111 and ACX100
++*/
++static void
++acx_s_scan_chan(acx_device_t *adev)
++{
++ union {
++ acx111_scan_t acx111;
++ acx100_scan_t acx100;
++ } s;
++
++ FN_ENTER;
++
++ memset(&s, 0, sizeof(s));
++
++ /* first common positions... */
++
++ s.acx111.count = cpu_to_le16(adev->scan_count);
++ s.acx111.rate = adev->scan_rate;
++ s.acx111.options = adev->scan_mode;
++ s.acx111.chan_duration = cpu_to_le16(adev->scan_duration);
++ s.acx111.max_probe_delay = cpu_to_le16(adev->scan_probe_delay);
++
++ /* ...then differences */
++
++ if (IS_ACX111(adev)) {
++ s.acx111.channel_list_select = 0; /* scan every allowed channel */
++ /*s.acx111.channel_list_select = 1;*/ /* scan given channels */
++ /*s.acx111.modulation = 0x40;*/ /* long preamble? OFDM? -> only for active scan */
++ s.acx111.modulation = 0;
++ /*s.acx111.channel_list[0] = 6;
++ s.acx111.channel_list[1] = 4;*/
++ } else {
++ s.acx100.start_chan = cpu_to_le16(1);
++ s.acx100.flags = cpu_to_le16(0x8000);
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SCAN, &s, sizeof(s));
++ FN_EXIT0;
++}
++
++
++void
++acx_s_cmd_start_scan(acx_device_t *adev)
++{
++ /* time_before check is 'just in case' thing */
++ if (!(adev->irq_status & HOST_INT_SCAN_COMPLETE)
++ && time_before(jiffies, adev->scan_start + 10*HZ)
++ ) {
++ log(L_INIT, "start_scan: seems like previous scan "
++ "is still running. Not starting anew. Please report\n");
++ return;
++ }
++
++ log(L_INIT, "starting radio scan\n");
++ /* remember that fw is commanded to do scan */
++ adev->scan_start = jiffies;
++ CLEAR_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ /* issue it */
++ acx_s_scan_chan(adev);
++}
++
++
++/***********************************************************************
++** acx111 feature config
++*/
++static int
++acx111_s_get_feature_config(acx_device_t *adev,
++ u32 *feature_options, u32 *data_flow_options)
++{
++ struct acx111_ie_feature_config feat;
++
++ if (!IS_ACX111(adev)) {
++ return NOT_OK;
++ }
++
++ memset(&feat, 0, sizeof(feat));
++
++ if (OK != acx_s_interrogate(adev, &feat, ACX1xx_IE_FEATURE_CONFIG)) {
++ return NOT_OK;
++ }
++ log(L_DEBUG,
++ "got Feature option:0x%X, DataFlow option: 0x%X\n",
++ feat.feature_options,
++ feat.data_flow_options);
++
++ if (feature_options)
++ *feature_options = le32_to_cpu(feat.feature_options);
++ if (data_flow_options)
++ *data_flow_options = le32_to_cpu(feat.data_flow_options);
++
++ return OK;
++}
++
++static int
++acx111_s_set_feature_config(acx_device_t *adev,
++ u32 feature_options, u32 data_flow_options,
++ unsigned int mode /* 0 == remove, 1 == add, 2 == set */)
++{
++ struct acx111_ie_feature_config feat;
++
++ if (!IS_ACX111(adev)) {
++ return NOT_OK;
++ }
++
++ if ((mode < 0) || (mode > 2))
++ return NOT_OK;
++
++ if (mode != 2)
++ /* need to modify old data */
++ acx111_s_get_feature_config(adev, &feat.feature_options, &feat.data_flow_options);
++ else {
++ /* need to set a completely new value */
++ feat.feature_options = 0;
++ feat.data_flow_options = 0;
++ }
++
++ if (mode == 0) { /* remove */
++ CLEAR_BIT(feat.feature_options, cpu_to_le32(feature_options));
++ CLEAR_BIT(feat.data_flow_options, cpu_to_le32(data_flow_options));
++ } else { /* add or set */
++ SET_BIT(feat.feature_options, cpu_to_le32(feature_options));
++ SET_BIT(feat.data_flow_options, cpu_to_le32(data_flow_options));
++ }
++
++ log(L_DEBUG,
++ "old: feature 0x%08X dataflow 0x%08X. mode: %u\n"
++ "new: feature 0x%08X dataflow 0x%08X\n",
++ feature_options, data_flow_options, mode,
++ le32_to_cpu(feat.feature_options),
++ le32_to_cpu(feat.data_flow_options));
++
++ if (OK != acx_s_configure(adev, &feat, ACX1xx_IE_FEATURE_CONFIG)) {
++ return NOT_OK;
++ }
++
++ return OK;
++}
++
++static inline int
++acx111_s_feature_off(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 0);
++}
++static inline int
++acx111_s_feature_on(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 1);
++}
++static inline int
++acx111_s_feature_set(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 2);
++}
++
++
++/***********************************************************************
++** acx100_s_init_memory_pools
++*/
++static int
++acx100_s_init_memory_pools(acx_device_t *adev, const acx_ie_memmap_t *mmt)
++{
++ acx100_ie_memblocksize_t MemoryBlockSize;
++ acx100_ie_memconfigoption_t MemoryConfigOption;
++ int TotalMemoryBlocks;
++ int RxBlockNum;
++ int TotalRxBlockSize;
++ int TxBlockNum;
++ int TotalTxBlockSize;
++
++ FN_ENTER;
++
++ /* Let's see if we can follow this:
++ first we select our memory block size (which I think is
++ completely arbitrary) */
++ MemoryBlockSize.size = cpu_to_le16(adev->memblocksize);
++
++ /* Then we alert the card to our decision of block size */
++ if (OK != acx_s_configure(adev, &MemoryBlockSize, ACX100_IE_BLOCK_SIZE)) {
++ goto bad;
++ }
++
++ /* We figure out how many total blocks we can create, using
++ the block size we chose, and the beginning and ending
++ memory pointers, i.e.: end-start/size */
++ TotalMemoryBlocks = (le32_to_cpu(mmt->PoolEnd) - le32_to_cpu(mmt->PoolStart)) / adev->memblocksize;
++
++ log(L_DEBUG, "TotalMemoryBlocks=%u (%u bytes)\n",
++ TotalMemoryBlocks, TotalMemoryBlocks*adev->memblocksize);
++
++ /* MemoryConfigOption.DMA_config bitmask:
++ access to ACX memory is to be done:
++ 0x00080000 using PCI conf space?!
++ 0x00040000 using IO instructions?
++ 0x00000000 using memory access instructions
++ 0x00020000 using local memory block linked list (else what?)
++ 0x00010000 using host indirect descriptors (else host must access ACX memory?)
++ */
++#if defined (ACX_MEM)
++ /*
++ * ACX ignores DMA_config for generic slave mode.
++ */
++ MemoryConfigOption.DMA_config = 0;
++ /* Declare start of the Rx host pool */
++ MemoryConfigOption.pRxHostDesc = cpu2acx(0);
++ log(L_DEBUG, "pRxHostDesc 0x%08X, rxhostdesc_startphy 0x%lX\n",
++ acx2cpu(MemoryConfigOption.pRxHostDesc),
++ (long)adev->rxhostdesc_startphy);
++#else
++ if (IS_PCI(adev)) {
++ MemoryConfigOption.DMA_config = cpu_to_le32(0x30000);
++ /* Declare start of the Rx host pool */
++ MemoryConfigOption.pRxHostDesc = cpu2acx(adev->rxhostdesc_startphy);
++ log(L_DEBUG, "pRxHostDesc 0x%08X, rxhostdesc_startphy 0x%lX\n",
++ acx2cpu(MemoryConfigOption.pRxHostDesc),
++ (long)adev->rxhostdesc_startphy);
++ } else {
++ MemoryConfigOption.DMA_config = cpu_to_le32(0x20000);
++ }
++#endif
++
++ /* 50% of the allotment of memory blocks go to tx descriptors */
++ TxBlockNum = TotalMemoryBlocks / 2;
++ MemoryConfigOption.TxBlockNum = cpu_to_le16(TxBlockNum);
++
++ /* and 50% go to the rx descriptors */
++ RxBlockNum = TotalMemoryBlocks - TxBlockNum;
++ MemoryConfigOption.RxBlockNum = cpu_to_le16(RxBlockNum);
++
++ /* size of the tx and rx descriptor queues */
++ TotalTxBlockSize = TxBlockNum * adev->memblocksize;
++ TotalRxBlockSize = RxBlockNum * adev->memblocksize;
++ log(L_DEBUG, "TxBlockNum %u RxBlockNum %u TotalTxBlockSize %u "
++ "TotalTxBlockSize %u\n", TxBlockNum, RxBlockNum,
++ TotalTxBlockSize, TotalRxBlockSize);
++
++
++ /* align the tx descriptor queue to an alignment of 0x20 (32 bytes) */
++ MemoryConfigOption.rx_mem =
++ cpu_to_le32((le32_to_cpu(mmt->PoolStart) + 0x1f) & ~0x1f);
++
++ /* align the rx descriptor queue to units of 0x20
++ * and offset it by the tx descriptor queue */
++ MemoryConfigOption.tx_mem =
++ cpu_to_le32((le32_to_cpu(mmt->PoolStart) + TotalRxBlockSize + 0x1f) & ~0x1f);
++ log(L_DEBUG, "rx_mem %08X rx_mem %08X\n",
++ MemoryConfigOption.tx_mem, MemoryConfigOption.rx_mem);
++
++ /* alert the device to our decision */
++ if (OK != acx_s_configure(adev, &MemoryConfigOption, ACX1xx_IE_MEMORY_CONFIG_OPTIONS)) {
++ goto bad;
++ }
++
++ /* and tell the device to kick it into gear */
++ if (OK != acx_s_issue_cmd(adev, ACX100_CMD_INIT_MEMORY, NULL, 0)) {
++ goto bad;
++ }
++#ifdef ACX_MEM
++ /*
++ * slave memory interface has to manage the transmit pools for the ACX,
++ * so it needs to know what we chose here.
++ */
++ adev->acx_txbuf_start = MemoryConfigOption.tx_mem;
++ adev->acx_txbuf_numblocks = MemoryConfigOption.TxBlockNum;
++#endif
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx100_s_create_dma_regions
++**
++** Note that this fn messes up heavily with hardware, but we cannot
++** lock it (we need to sleep). Not a problem since IRQs can't happen
++*/
++static int
++acx100_s_create_dma_regions(acx_device_t *adev)
++{
++ acx100_ie_queueconfig_t queueconf;
++ acx_ie_memmap_t memmap;
++ int res = NOT_OK;
++ u32 tx_queue_start, rx_queue_start;
++
++ FN_ENTER;
++
++ /* read out the acx100 physical start address for the queues */
++ if (OK != acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ tx_queue_start = le32_to_cpu(memmap.QueueStart);
++ rx_queue_start = tx_queue_start + TX_CNT * sizeof(txdesc_t);
++
++ log(L_DEBUG, "initializing Queue Indicator\n");
++
++ memset(&queueconf, 0, sizeof(queueconf));
++
++ /* Not needed for PCI or slave memory, so we can avoid setting them altogether */
++ if (IS_USB(adev)) {
++ queueconf.NumTxDesc = USB_TX_CNT;
++ queueconf.NumRxDesc = USB_RX_CNT;
++ }
++
++ /* calculate size of queues */
++ queueconf.AreaSize = cpu_to_le32(
++ TX_CNT * sizeof(txdesc_t) +
++ RX_CNT * sizeof(rxdesc_t) + 8
++ );
++ queueconf.NumTxQueues = 1; /* number of tx queues */
++ /* sets the beginning of the tx descriptor queue */
++ queueconf.TxQueueStart = memmap.QueueStart;
++ /* done by memset: queueconf.TxQueuePri = 0; */
++ queueconf.RxQueueStart = cpu_to_le32(rx_queue_start);
++ queueconf.QueueOptions = 1; /* auto reset descriptor */
++ /* sets the end of the rx descriptor queue */
++ queueconf.QueueEnd = cpu_to_le32(
++ rx_queue_start + RX_CNT * sizeof(rxdesc_t)
++ );
++ /* sets the beginning of the next queue */
++ queueconf.HostQueueEnd = cpu_to_le32(le32_to_cpu(queueconf.QueueEnd) + 8);
++ if (OK != acx_s_configure(adev, &queueconf, ACX1xx_IE_QUEUE_CONFIG)) {
++ goto fail;
++ }
++
++#if defined (ACX_MEM)
++ /* sets the beginning of the rx descriptor queue, after the tx descrs */
++ adev->acx_queue_indicator =
++ (queueindicator_t *) le32_to_cpu (queueconf.QueueEnd);
++ if (OK != acxmem_s_create_hostdesc_queues(adev))
++ goto fail;
++
++ acxmem_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#else
++ if (IS_PCI(adev)) {
++ /* sets the beginning of the rx descriptor queue, after the tx descrs */
++ if (OK != acxpci_s_create_hostdesc_queues(adev))
++ goto fail;
++ acxpci_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++ }
++#endif
++
++ if (OK != acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ /*
++ * Have to make sure we skip past the Queue Indicator (QueueEnd) and Host Queue Indicator
++ * maps, each of which are 8 bytes and follow immediately after the transmit and
++ * receive queues.
++ */
++ memmap.PoolStart = cpu_to_le32(
++ (le32_to_cpu(memmap.QueueEnd) + 4 + 0x1f) & ~0x1f
++ );
++
++ if (OK != acx_s_configure(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ if (OK != acx100_s_init_memory_pools(adev, &memmap)) {
++ goto fail;
++ }
++
++ res = OK;
++ goto end;
++
++fail:
++ acx_s_msleep(1000); /* ? */
++#if defined (ACX_MEM)
++ acxmem_free_desc_queues(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_free_desc_queues(adev);
++#endif
++end:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acx111_s_create_dma_regions
++**
++** Note that this fn messes heavily with hardware, but we cannot
++** lock it (we need to sleep). Not a problem since IRQs can't happen
++*/
++#define ACX111_PERCENT(percent) ((percent)/5)
++
++static int
++acx111_s_create_dma_regions(acx_device_t *adev)
++{
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ u32 tx_queue_start, rx_queue_start;
++
++ FN_ENTER;
++
++ /* Calculate memory positions and queue sizes */
++
++ /* Set up our host descriptor pool + data pool */
++#if defined (ACX_MEM)
++ if (OK != acxmem_s_create_hostdesc_queues(adev))
++ goto fail;
++#else
++ if (IS_PCI(adev)) {
++ if (OK != acxpci_s_create_hostdesc_queues(adev))
++ goto fail;
++ }
++#endif
++
++ memset(&memconf, 0, sizeof(memconf));
++ /* the number of STAs (STA contexts) to support
++ ** NB: was set to 1 and everything seemed to work nevertheless... */
++ memconf.no_of_stations = cpu_to_le16(VEC_SIZE(adev->sta_list));
++ /* specify the memory block size. Default is 256 */
++ memconf.memory_block_size = cpu_to_le16(adev->memblocksize);
++ /* let's use 50%/50% for tx/rx (specify percentage, units of 5%) */
++ memconf.tx_rx_memory_block_allocation = ACX111_PERCENT(50);
++ /* set the count of our queues
++ ** NB: struct acx111_ie_memoryconfig shall be modified
++ ** if we ever will switch to more than one rx and/or tx queue */
++ memconf.count_rx_queues = 1;
++ memconf.count_tx_queues = 1;
++ /* 0 == Busmaster Indirect Memory Organization, which is what we want
++ * (using linked host descs with their allocated mem).
++ * 2 == Generic Bus Slave */
++ /* done by memset: memconf.options = 0; */
++ /* let's use 25% for fragmentations and 75% for frame transfers
++ * (specified in units of 5%) */
++ memconf.fragmentation = ACX111_PERCENT(75);
++ /* Rx descriptor queue config */
++ memconf.rx_queue1_count_descs = RX_CNT;
++ memconf.rx_queue1_type = 7; /* must be set to 7 */
++ /* done by memset: memconf.rx_queue1_prio = 0; low prio */
++#if defined (ACX_MEM)
++ memconf.rx_queue1_host_rx_start = cpu2acx(adev->rxhostdesc_startphy);
++#else
++ if (IS_PCI(adev)) {
++ memconf.rx_queue1_host_rx_start = cpu2acx(adev->rxhostdesc_startphy);
++ }
++#endif
++ /* Tx descriptor queue config */
++ memconf.tx_queue1_count_descs = TX_CNT;
++ /* done by memset: memconf.tx_queue1_attributes = 0; lowest priority */
++
++ /* NB1: this looks wrong: (memconf,ACX1xx_IE_QUEUE_CONFIG),
++ ** (queueconf,ACX1xx_IE_MEMORY_CONFIG_OPTIONS) look swapped, eh?
++ ** But it is actually correct wrt IE numbers.
++ ** NB2: sizeof(memconf) == 28 == 0x1c but configure(ACX1xx_IE_QUEUE_CONFIG)
++ ** writes 0x20 bytes (because same IE for acx100 uses struct acx100_ie_queueconfig
++ ** which is 4 bytes larger. what a mess. TODO: clean it up) */
++ if (OK != acx_s_configure(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG)) {
++ goto fail;
++ }
++
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++
++ tx_queue_start = le32_to_cpu(queueconf.tx1_queue_address);
++ rx_queue_start = le32_to_cpu(queueconf.rx1_queue_address);
++
++ log(L_INIT, "dump queue head (from card):\n"
++ "len: %u\n"
++ "tx_memory_block_address: %X\n"
++ "rx_memory_block_address: %X\n"
++ "tx1_queue address: %X\n"
++ "rx1_queue address: %X\n",
++ le16_to_cpu(queueconf.len),
++ le32_to_cpu(queueconf.tx_memory_block_address),
++ le32_to_cpu(queueconf.rx_memory_block_address),
++ tx_queue_start,
++ rx_queue_start);
++
++#if defined (ACX_MEM)
++ acxmem_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#else
++ if (IS_PCI(adev))
++ acxpci_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#endif
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++#if defined (ACX_MEM)
++ acxmem_free_desc_queues(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_free_desc_queues(adev);
++#endif
++
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++static void
++acx_s_initialize_rx_config(acx_device_t *adev)
++{
++ struct {
++ u16 id;
++ u16 len;
++ u16 rx_cfg1;
++ u16 rx_cfg2;
++ } ACX_PACKED cfg;
++
++ switch (adev->mode) {
++ case ACX_MODE_OFF:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ /* | RX_CFG1_FILTER_MAC */
++ /* | RX_CFG1_RCV_PROMISCUOUS */
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ /*| RX_CFG2_RCV_ASSOC_REQ */
++ /*| RX_CFG2_RCV_AUTH_FRAMES */
++ /*| RX_CFG2_RCV_BEACON_FRAMES */
++ /*| RX_CFG2_RCV_CONTENTION_FREE */
++ /*| RX_CFG2_RCV_CTRL_FRAMES */
++ /*| RX_CFG2_RCV_DATA_FRAMES */
++ /*| RX_CFG2_RCV_BROKEN_FRAMES */
++ /*| RX_CFG2_RCV_MGMT_FRAMES */
++ /*| RX_CFG2_RCV_PROBE_REQ */
++ /*| RX_CFG2_RCV_PROBE_RESP */
++ /*| RX_CFG2_RCV_ACK_FRAMES */
++ /*| RX_CFG2_RCV_OTHER */
++ );
++ break;
++ case ACX_MODE_MONITOR:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ /* | RX_CFG1_FILTER_MAC */
++ | RX_CFG1_RCV_PROMISCUOUS
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ | RX_CFG2_RCV_ASSOC_REQ
++ | RX_CFG2_RCV_AUTH_FRAMES
++ | RX_CFG2_RCV_BEACON_FRAMES
++ | RX_CFG2_RCV_CONTENTION_FREE
++ | RX_CFG2_RCV_CTRL_FRAMES
++ | RX_CFG2_RCV_DATA_FRAMES
++ | RX_CFG2_RCV_BROKEN_FRAMES
++ | RX_CFG2_RCV_MGMT_FRAMES
++ | RX_CFG2_RCV_PROBE_REQ
++ | RX_CFG2_RCV_PROBE_RESP
++ | RX_CFG2_RCV_ACK_FRAMES
++ | RX_CFG2_RCV_OTHER
++ );
++ break;
++ default:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ | RX_CFG1_FILTER_MAC
++ /* | RX_CFG1_RCV_PROMISCUOUS */
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ | RX_CFG2_RCV_ASSOC_REQ
++ | RX_CFG2_RCV_AUTH_FRAMES
++ | RX_CFG2_RCV_BEACON_FRAMES
++ | RX_CFG2_RCV_CONTENTION_FREE
++ | RX_CFG2_RCV_CTRL_FRAMES
++ | RX_CFG2_RCV_DATA_FRAMES
++ /*| RX_CFG2_RCV_BROKEN_FRAMES */
++ | RX_CFG2_RCV_MGMT_FRAMES
++ | RX_CFG2_RCV_PROBE_REQ
++ | RX_CFG2_RCV_PROBE_RESP
++ /*| RX_CFG2_RCV_ACK_FRAMES */
++ | RX_CFG2_RCV_OTHER
++ );
++ break;
++ }
++ adev->rx_config_1 |= RX_CFG1_INCLUDE_RXBUF_HDR;
++
++ if ((adev->rx_config_1 & RX_CFG1_INCLUDE_PHY_HDR)
++ || (adev->firmware_numver >= 0x02000000))
++ adev->phy_header_len = IS_ACX111(adev) ? 8 : 4;
++ else
++ adev->phy_header_len = 0;
++
++ log(L_INIT, "setting RXconfig to %04X:%04X\n",
++ adev->rx_config_1, adev->rx_config_2);
++ cfg.rx_cfg1 = cpu_to_le16(adev->rx_config_1);
++ cfg.rx_cfg2 = cpu_to_le16(adev->rx_config_2);
++ acx_s_configure(adev, &cfg, ACX1xx_IE_RXCONFIG);
++}
++
++
++/***********************************************************************
++** acx_s_set_defaults
++*/
++void
++acx_s_set_defaults(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* do it before getting settings, prevent bogus channel 0 warning */
++ adev->channel = 1;
++
++ /* query some settings from the card.
++ * NOTE: for some settings, e.g. CCA and ED (ACX100!), an initial
++ * query is REQUIRED, otherwise the card won't work correctly! */
++ adev->get_mask = GETSET_ANTENNA|GETSET_SENSITIVITY|GETSET_STATION_ID|GETSET_REG_DOMAIN;
++ /* Only ACX100 supports ED and CCA */
++ if (IS_ACX100(adev))
++ adev->get_mask |= GETSET_CCA|GETSET_ED_THRESH;
++
++ acx_s_update_card_settings(adev);
++
++ acx_lock(adev, flags);
++
++ /* set our global interrupt mask */
++#if defined (ACX_MEM)
++ acxmem_set_interrupt_mask(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_set_interrupt_mask(adev);
++#endif
++
++ adev->led_power = 1; /* LED is active on startup */
++ adev->brange_max_quality = 60; /* LED blink max quality is 60 */
++ adev->brange_time_last_state_change = jiffies;
++
++ /* copy the MAC address we just got from the card
++ * into our MAC address used during current 802.11 session */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ MAC_BCAST(adev->ap);
++
++ adev->essid_len =
++ snprintf(adev->essid, sizeof(adev->essid), "STA%02X%02X%02X",
++ adev->dev_addr[3], adev->dev_addr[4], adev->dev_addr[5]);
++ adev->essid_active = 1;
++
++ /* we have a nick field to waste, so why not abuse it
++ * to announce the driver version? ;-) */
++ strncpy(adev->nick, "acx " ACX_RELEASE, IW_ESSID_MAX_SIZE);
++
++#if defined (ACX_MEM)
++ adev->reg_dom_id = adev->cfgopt_domains.list[0];
++#else
++ if (IS_PCI(adev)) { /* FIXME: this should be made to apply to USB, too! */
++ /* first regulatory domain entry in EEPROM == default reg. domain */
++ adev->reg_dom_id = adev->cfgopt_domains.list[0];
++ }
++#endif
++
++ /* 0xffff would be better, but then we won't get a "scan complete"
++ * interrupt, so our current infrastructure will fail: */
++ adev->scan_count = 1;
++ adev->scan_mode = ACX_SCAN_OPT_ACTIVE;
++ adev->scan_duration = 100;
++ adev->scan_probe_delay = 200;
++ /* reported to break scanning: adev->scan_probe_delay = adev->cfgopt_probe_delay; */
++ adev->scan_rate = ACX_SCAN_RATE_1;
++
++ adev->mode = ACX_MODE_2_STA;
++ adev->auth_alg = WLAN_AUTH_ALG_OPENSYSTEM;
++ adev->listen_interval = 100;
++ adev->beacon_interval = DEFAULT_BEACON_INTERVAL;
++ adev->dtim_interval = DEFAULT_DTIM_INTERVAL;
++
++ adev->msdu_lifetime = DEFAULT_MSDU_LIFETIME;
++
++ adev->rts_threshold = DEFAULT_RTS_THRESHOLD;
++ adev->frag_threshold = 2346;
++
++ /* use standard default values for retry limits */
++ adev->short_retry = 7; /* max. retries for (short) non-RTS packets */
++ adev->long_retry = 4; /* max. retries for long (RTS) packets */
++
++ adev->preamble_mode = 2; /* auto */
++ adev->fallback_threshold = 3;
++ adev->stepup_threshold = 10;
++ adev->rate_bcast = RATE111_1;
++ adev->rate_bcast100 = RATE100_1;
++ adev->rate_basic = RATE111_1 | RATE111_2;
++ adev->rate_auto = 1;
++ if (IS_ACX111(adev)) {
++ adev->rate_oper = RATE111_ALL;
++ } else {
++ adev->rate_oper = RATE111_ACX100_COMPAT;
++ }
++
++ /* Supported Rates element - the rates here are given in units of
++ * 500 kbit/s, plus 0x80 added. See 802.11-1999.pdf item 7.3.2.2 */
++ acx_l_update_ratevector(adev);
++
++ /* set some more defaults */
++ if (IS_ACX111(adev)) {
++ /* 30mW (15dBm) is default, at least in my acx111 card: */
++ adev->tx_level_dbm = 15;
++ } else {
++ /* don't use max. level, since it might be dangerous
++ * (e.g. WRT54G people experience
++ * excessive Tx power damage!) */
++ adev->tx_level_dbm = 18;
++ /*
++ * Lower power for the iPaq hx4700
++ */
++ if (IS_MEM(adev)) {
++ adev->tx_level_dbm = 14;
++ }
++ }
++ /* adev->tx_level_auto = 1; */
++ if (IS_ACX111(adev)) {
++ /* start with sensitivity level 1 out of 3: */
++ adev->sensitivity = 1;
++ }
++
++/* #define ENABLE_POWER_SAVE */
++#ifdef ENABLE_POWER_SAVE
++ adev->ps_wakeup_cfg = PS_CFG_ENABLE | PS_CFG_WAKEUP_ALL_BEAC;
++ adev->ps_listen_interval = 1;
++ adev->ps_options = PS_OPT_ENA_ENHANCED_PS | PS_OPT_TX_PSPOLL | PS_OPT_STILL_RCV_BCASTS;
++ adev->ps_hangover_period = 30;
++ adev->ps_enhanced_transition_time = 0;
++#else
++ adev->ps_wakeup_cfg = 0;
++ adev->ps_listen_interval = 0;
++ adev->ps_options = 0;
++ adev->ps_hangover_period = 0;
++ adev->ps_enhanced_transition_time = 0;
++#endif
++
++ /* These settings will be set in fw on ifup */
++ adev->set_mask = 0
++ | GETSET_RETRY
++ | SET_MSDU_LIFETIME
++ /* configure card to do rate fallback when in auto rate mode */
++ | SET_RATE_FALLBACK
++ | SET_RXCONFIG
++ | GETSET_TXPOWER
++ /* better re-init the antenna value we got above */
++ | GETSET_ANTENNA
++#if POWER_SAVE_80211
++ | GETSET_POWER_80211
++#endif
++ ;
++
++ acx_unlock(adev, flags);
++ acx_lock_unhold(); /* hold time 844814 CPU ticks @2GHz */
++
++ acx_s_initialize_rx_config(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** FIXME: this should be solved in a general way for all radio types
++** by decoding the radio firmware module,
++** since it probably has some standard structure describing how to
++** set the power level of the radio module which it controls.
++** Or maybe not, since the radio module probably has a function interface
++** instead which then manages Tx level programming :-\
++*/
++static int
++acx111_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* my acx111 card has two power levels in its configoptions (== EEPROM):
++ * 1 (30mW) [15dBm]
++ * 2 (10mW) [10dBm]
++ * For now, just assume all other acx111 cards have the same.
++ * FIXME: Ideally we would query it here, but we first need a
++ * standard way to query individual configoptions easily.
++ * Well, now we have proper cfgopt txpower variables, but this still
++ * hasn't been done yet, since it also requires dBm <-> mW conversion here... */
++ if (level_dbm <= 12) {
++ tx_level.level = 2; /* 10 dBm */
++ adev->tx_level_dbm = 10;
++ } else {
++ tx_level.level = 1; /* 15 dBm */
++ adev->tx_level_dbm = 15;
++ }
++ if (level_dbm != adev->tx_level_dbm)
++ log(L_INIT, "acx111 firmware has specific "
++ "power levels only: adjusted %d dBm to %d dBm!\n",
++ level_dbm, adev->tx_level_dbm);
++
++ return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++}
++
++static int
++acx_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ if (IS_ACX111(adev)) {
++ return acx111_s_set_tx_level(adev, level_dbm);
++ }
++#if defined (ACX_MEM)
++ return acx100mem_s_set_tx_level(adev, level_dbm);
++#else
++ if (IS_PCI(adev)) {
++ return acx100pci_s_set_tx_level(adev, level_dbm);
++ }
++#endif
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++#ifdef UNUSED
++/* Returns the current tx level (ACX111) */
++static u8
++acx111_s_get_tx_level(acx_device_t *adev)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ tx_level.level = 0;
++ acx_s_interrogate(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++ return tx_level.level;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_rxmonitor
++** Called from IRQ context only
++*/
++static void
++acx_l_rxmonitor(acx_device_t *adev, const rxbuffer_t *rxbuf)
++{
++ wlansniffrm_t *msg;
++ struct sk_buff *skb;
++ void *datap;
++ unsigned int skb_len;
++ int payload_offset;
++
++ FN_ENTER;
++
++ /* we are in big luck: the acx100 doesn't modify any of the fields */
++ /* in the 802.11 frame. just pass this packet into the PF_PACKET */
++ /* subsystem. yeah. */
++ payload_offset = ((u8*)acx_get_wlan_hdr(adev, rxbuf) - (u8*)rxbuf);
++ skb_len = RXBUF_BYTES_USED(rxbuf) - payload_offset;
++
++ /* sanity check */
++ if (unlikely(skb_len > WLAN_A4FR_MAXLEN_WEP)) {
++ printk("%s: monitor mode panic: oversized frame!\n",
++ adev->ndev->name);
++ goto end;
++ }
++
++ if (adev->ndev->type == ARPHRD_IEEE80211_PRISM)
++ skb_len += sizeof(*msg);
++
++ /* allocate skb */
++ skb = dev_alloc_skb(skb_len);
++ if (unlikely(!skb)) {
++ printk("%s: no memory for skb (%u bytes)\n",
++ adev->ndev->name, skb_len);
++ goto end;
++ }
++
++ skb_put(skb, skb_len);
++
++ if (adev->ndev->type == ARPHRD_IEEE80211) {
++ /* when in raw 802.11 mode, just copy frame as-is */
++ datap = skb->data;
++ } else if (adev->ndev->type == ARPHRD_IEEE80211_PRISM) {
++ /* emulate prism header */
++ msg = (wlansniffrm_t*)skb->data;
++ datap = msg + 1;
++
++ msg->msgcode = WLANSNIFFFRM;
++ msg->msglen = sizeof(*msg);
++ strncpy(msg->devname, adev->ndev->name, sizeof(msg->devname)-1);
++ msg->devname[sizeof(msg->devname)-1] = '\0';
++
++ msg->hosttime.did = WLANSNIFFFRM_hosttime;
++ msg->hosttime.status = WLANITEM_STATUS_data_ok;
++ msg->hosttime.len = 4;
++ msg->hosttime.data = jiffies;
++
++ msg->mactime.did = WLANSNIFFFRM_mactime;
++ msg->mactime.status = WLANITEM_STATUS_data_ok;
++ msg->mactime.len = 4;
++ msg->mactime.data = rxbuf->time;
++
++ msg->channel.did = WLANSNIFFFRM_channel;
++ msg->channel.status = WLANITEM_STATUS_data_ok;
++ msg->channel.len = 4;
++ msg->channel.data = adev->channel;
++
++ msg->rssi.did = WLANSNIFFFRM_rssi;
++ msg->rssi.status = WLANITEM_STATUS_no_value;
++ msg->rssi.len = 4;
++ msg->rssi.data = 0;
++
++ msg->sq.did = WLANSNIFFFRM_sq;
++ msg->sq.status = WLANITEM_STATUS_no_value;
++ msg->sq.len = 4;
++ msg->sq.data = 0;
++
++ msg->signal.did = WLANSNIFFFRM_signal;
++ msg->signal.status = WLANITEM_STATUS_data_ok;
++ msg->signal.len = 4;
++ msg->signal.data = rxbuf->phy_snr;
++
++ msg->noise.did = WLANSNIFFFRM_noise;
++ msg->noise.status = WLANITEM_STATUS_data_ok;
++ msg->noise.len = 4;
++ msg->noise.data = rxbuf->phy_level;
++
++ msg->rate.did = WLANSNIFFFRM_rate;
++ msg->rate.status = WLANITEM_STATUS_data_ok;
++ msg->rate.len = 4;
++ msg->rate.data = rxbuf->phy_plcp_signal / 5;
++
++ msg->istx.did = WLANSNIFFFRM_istx;
++ msg->istx.status = WLANITEM_STATUS_data_ok;
++ msg->istx.len = 4;
++ msg->istx.data = 0; /* tx=0: it's not a tx packet */
++
++ skb_len -= sizeof(*msg);
++
++ msg->frmlen.did = WLANSNIFFFRM_signal;
++ msg->frmlen.status = WLANITEM_STATUS_data_ok;
++ msg->frmlen.len = 4;
++ msg->frmlen.data = skb_len;
++ } else {
++ printk("acx: unsupported netdev type %d!\n", adev->ndev->type);
++ dev_kfree_skb(skb);
++ return;
++ }
++
++ /* sanity check (keep it here) */
++ if (unlikely((int)skb_len < 0)) {
++ printk("acx: skb_len=%d. Driver bug, please report\n", (int)skb_len);
++ dev_kfree_skb(skb);
++ return;
++ }
++ memcpy(datap, ((unsigned char*)rxbuf)+payload_offset, skb_len);
++
++ skb->dev = adev->ndev;
++ skb->dev->last_rx = jiffies;
++
++ skb_reset_mac_header(skb);
++ skb->ip_summed = CHECKSUM_NONE;
++ skb->pkt_type = PACKET_OTHERHOST;
++ skb->protocol = htons(ETH_P_80211_RAW);
++ netif_rx(skb);
++
++ adev->stats.rx_packets++;
++ adev->stats.rx_bytes += skb->len;
++
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_rx_ieee802_11_frame
++**
++** Called from IRQ context only
++*/
++
++/* All these contortions are for saner dup logging
++**
++** We want: (a) to know about excessive dups
++** (b) to not spam kernel log about occasional dups
++**
++** 1/64 threshold was chosen by running "ping -A"
++** It gave "rx: 59 DUPs in 2878 packets" only with 4 parallel
++** "ping -A" streams running. */
++/* 2005-10-11: bumped up to 1/8
++** subtract a $smallint from dup_count in order to
++** avoid "2 DUPs in 19 packets" messages */
++static inline int
++acx_l_handle_dup(acx_device_t *adev, u16 seq)
++{
++ if (adev->dup_count) {
++ adev->nondup_count++;
++ if (time_after(jiffies, adev->dup_msg_expiry)) {
++ /* Log only if more than 1 dup in 64 packets */
++ if (adev->nondup_count/8 < adev->dup_count-5) {
++ printk(KERN_INFO "%s: rx: %d DUPs in "
++ "%d packets received in 10 secs\n",
++ adev->ndev->name,
++ adev->dup_count,
++ adev->nondup_count);
++ }
++ adev->dup_count = 0;
++ adev->nondup_count = 0;
++ }
++ }
++ if (unlikely(seq == adev->last_seq_ctrl)) {
++ if (!adev->dup_count++)
++ adev->dup_msg_expiry = jiffies + 10*HZ;
++ adev->stats.rx_errors++;
++ return 1; /* a dup */
++ }
++ adev->last_seq_ctrl = seq;
++ return 0;
++}
++
++static int
++acx_l_rx_ieee802_11_frame(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ unsigned int ftype, fstype;
++ const wlan_hdr_t *hdr;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ /* see IEEE 802.11-1999.pdf chapter 7 "MAC frame formats" */
++ if (unlikely((hdr->fc & WF_FC_PVERi) != 0)) {
++ printk_ratelimited(KERN_INFO "rx: unsupported 802.11 protocol\n");
++ goto end;
++ }
++
++ ftype = hdr->fc & WF_FC_FTYPEi;
++ fstype = hdr->fc & WF_FC_FSTYPEi;
++
++ switch (ftype) {
++ /* check data frames first, for speed */
++ case WF_FTYPE_DATAi:
++ switch (fstype) {
++ case WF_FSTYPE_DATAONLYi:
++ if (acx_l_handle_dup(adev, hdr->seq))
++ break; /* a dup, simply discard it */
++
++ /* TODO:
++ if (WF_FC_FROMTODSi == (hdr->fc & WF_FC_FROMTODSi)) {
++ result = acx_l_process_data_frame_wds(adev, rxbuf);
++ break;
++ }
++ */
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++ result = acx_l_process_data_frame_master(adev, rxbuf);
++ break;
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ result = acx_l_process_data_frame_client(adev, rxbuf);
++ break;
++ }
++ case WF_FSTYPE_DATA_CFACKi:
++ case WF_FSTYPE_DATA_CFPOLLi:
++ case WF_FSTYPE_DATA_CFACK_CFPOLLi:
++ case WF_FSTYPE_CFPOLLi:
++ case WF_FSTYPE_CFACK_CFPOLLi:
++ /* see above.
++ acx_process_class_frame(adev, rxbuf, 3); */
++ break;
++ case WF_FSTYPE_NULLi:
++ /* acx_l_process_NULL_frame(adev, rxbuf, 3); */
++ break;
++ /* FIXME: same here, see above */
++ case WF_FSTYPE_CFACKi:
++ default:
++ break;
++ }
++ break;
++ case WF_FTYPE_MGMTi:
++ result = acx_l_process_mgmt_frame(adev, rxbuf);
++ break;
++ case WF_FTYPE_CTLi:
++ if (fstype == WF_FSTYPE_PSPOLLi)
++ result = OK;
++ /* this call is irrelevant, since
++ * acx_process_class_frame is a stub, so return
++ * immediately instead.
++ * return acx_process_class_frame(adev, rxbuf, 3); */
++ break;
++ default:
++ break;
++ }
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_rxbuf
++**
++** NB: used by USB code also
++*/
++void
++acx_l_process_rxbuf(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *hdr;
++ unsigned int qual;
++ int buf_len;
++ u16 fc;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++ fc = le16_to_cpu(hdr->fc);
++ /* length of frame from control field to first byte of FCS */
++ buf_len = RXBUF_BYTES_RCVD(adev, rxbuf);
++
++ if ( ((WF_FC_FSTYPE & fc) != WF_FSTYPE_BEACON)
++ || (acx_debug & L_XFER_BEACON)
++ ) {
++ log(L_XFER|L_DATA, "rx: %s "
++ "time:%u len:%u signal:%u SNR:%u macstat:%02X "
++ "phystat:%02X phyrate:%u status:%u\n",
++ acx_get_packet_type_string(fc),
++ le32_to_cpu(rxbuf->time),
++ buf_len,
++ acx_signal_to_winlevel(rxbuf->phy_level),
++ acx_signal_to_winlevel(rxbuf->phy_snr),
++ rxbuf->mac_status,
++ rxbuf->phy_stat_baseband,
++ rxbuf->phy_plcp_signal,
++ adev->status);
++ }
++
++ if (unlikely(acx_debug & L_DATA)) {
++ printk("rx: 802.11 buf[%u]: ", buf_len);
++ acx_dump_bytes(hdr, buf_len);
++ }
++
++ /* FIXME: should check for Rx errors (rxbuf->mac_status?
++ * discard broken packets - but NOT for monitor!)
++ * and update Rx packet statistics here */
++
++ if (unlikely(adev->mode == ACX_MODE_MONITOR)) {
++ acx_l_rxmonitor(adev, rxbuf);
++ } else if (likely(buf_len >= WLAN_HDR_A3_LEN)) {
++ acx_l_rx_ieee802_11_frame(adev, rxbuf);
++ } else {
++ log(L_DEBUG|L_XFER|L_DATA,
++ "rx: NOT receiving packet (%s): "
++ "size too small (%u)\n",
++ acx_get_packet_type_string(fc),
++ buf_len);
++ }
++
++ /* Now check Rx quality level, AFTER processing packet.
++ * I tried to figure out how to map these levels to dBm
++ * values, but for the life of me I really didn't
++ * manage to get it. Either these values are not meant to
++ * be expressed in dBm, or it's some pretty complicated
++ * calculation. */
++
++#ifdef FROM_SCAN_SOURCE_ONLY
++ /* only consider packets originating from the MAC
++ * address of the device that's managing our BSSID.
++ * Disable it for now, since it removes information (levels
++ * from different peers) and slows the Rx path. */
++ if (adev->ap_client
++ && mac_is_equal(hdr->a2, adev->ap_client->address)) {
++#endif
++ adev->wstats.qual.level = acx_signal_to_winlevel(rxbuf->phy_level);
++ adev->wstats.qual.noise = acx_signal_to_winlevel(rxbuf->phy_snr);
++#ifndef OLD_QUALITY
++ qual = acx_signal_determine_quality(adev->wstats.qual.level,
++ adev->wstats.qual.noise);
++#else
++ qual = (adev->wstats.qual.noise <= 100) ?
++ 100 - adev->wstats.qual.noise : 0;
++#endif
++ adev->wstats.qual.qual = qual;
++ adev->wstats.qual.updated = 7; /* all 3 indicators updated */
++#ifdef FROM_SCAN_SOURCE_ONLY
++ }
++#endif
++}
++
++
++/***********************************************************************
++** acx_l_handle_txrate_auto
++**
++** Theory of operation:
++** client->rate_cap is a bitmask of rates client is capable of.
++** client->rate_cfg is a bitmask of allowed (configured) rates.
++** It is set as a result of iwconfig rate N [auto]
++** or iwpriv set_rates "N,N,N N,N,N" commands.
++** It can be fixed (e.g. 0x0080 == 18Mbit only),
++** auto (0x00ff == 18Mbit or any lower value),
++** and code handles any bitmask (0x1081 == try 54Mbit,18Mbit,1Mbit _only_).
++**
++** client->rate_cur is a value for rate111 field in tx descriptor.
++** It is always set to txrate_cfg sans zero or more most significant
++** bits. This routine handles selection of new rate_cur value depending on
++** outcome of last tx event.
++**
++** client->rate_100 is a precalculated rate value for acx100
++** (we can do without it, but will need to calculate it on each tx).
++**
++** You cannot configure mixed usage of 5.5 and/or 11Mbit rate
++** with PBCC and CCK modulation. Either both at CCK or both at PBCC.
++** In theory you can implement it, but so far it is considered not worth doing.
++**
++** 22Mbit, of course, is PBCC always. */
++
++/* maps acx100 tx descr rate field to acx111 one */
++static u16
++rate100to111(u8 r)
++{
++ switch (r) {
++ case RATE100_1: return RATE111_1;
++ case RATE100_2: return RATE111_2;
++ case RATE100_5:
++ case (RATE100_5 | RATE100_PBCC511): return RATE111_5;
++ case RATE100_11:
++ case (RATE100_11 | RATE100_PBCC511): return RATE111_11;
++ case RATE100_22: return RATE111_22;
++ default:
++ printk("acx: unexpected acx100 txrate: %u! "
++ "Please report\n", r);
++ return RATE111_1;
++ }
++}
++
++
++void
++acx_l_handle_txrate_auto(acx_device_t *adev, struct client *txc,
++ u16 cur, u8 rate100, u16 rate111,
++ u8 error, int pkts_to_ignore)
++{
++ u16 sent_rate;
++ int slower_rate_was_used;
++
++ /* vda: hmm. current code will do this:
++ ** 1. send packets at 11 Mbit, stepup++
++ ** 2. will try to send at 22Mbit. hardware will see no ACK,
++ ** retries at 11Mbit, success. code notes that used rate
++ ** is lower. stepup = 0, fallback++
++ ** 3. repeat step 2 fallback_count times. Fall back to
++ ** 11Mbit. go to step 1.
++ ** If stepup_count is large (say, 16) and fallback_count
++ ** is small (3), this wouldn't be too bad wrt throughput */
++
++ if (unlikely(!cur)) {
++ printk("acx: BUG! ratemask is empty\n");
++ return; /* or else we may lock up the box */
++ }
++
++ /* do some preparations, i.e. calculate the one rate that was
++ * used to send this packet */
++ if (IS_ACX111(adev)) {
++ sent_rate = 1 << highest_bit(rate111 & RATE111_ALL);
++ } else {
++ sent_rate = rate100to111(rate100);
++ }
++ /* sent_rate has only one bit set now, corresponding to tx rate
++ * which was used by hardware to tx this particular packet */
++
++ /* now do the actual auto rate management */
++ log(L_XFER, "tx: %sclient=%p/"MACSTR" used=%04X cur=%04X cfg=%04X "
++ "__=%u/%u ^^=%u/%u\n",
++ (txc->ignore_count > 0) ? "[IGN] " : "",
++ txc, MAC(txc->address), sent_rate, cur, txc->rate_cfg,
++ txc->fallback_count, adev->fallback_threshold,
++ txc->stepup_count, adev->stepup_threshold
++ );
++
++ /* we need to ignore old packets already in the tx queue since
++ * they use older rate bytes configured before our last rate change,
++ * otherwise our mechanism will get confused by interpreting old data.
++ * Do it after logging above */
++ if (txc->ignore_count) {
++ txc->ignore_count--;
++ return;
++ }
++
++ /* true only if the only nonzero bit in sent_rate is
++ ** less significant than highest nonzero bit in cur */
++ slower_rate_was_used = ( cur > ((sent_rate<<1)-1) );
++
++ if (slower_rate_was_used || error) {
++ txc->stepup_count = 0;
++ if (++txc->fallback_count <= adev->fallback_threshold)
++ return;
++ txc->fallback_count = 0;
++
++ /* clear highest 1 bit in cur */
++ sent_rate = RATE111_54;
++ while (!(cur & sent_rate)) sent_rate >>= 1;
++ CLEAR_BIT(cur, sent_rate);
++ if (!cur) /* we can't disable all rates! */
++ cur = sent_rate;
++ log(L_XFER, "tx: falling back to ratemask %04X\n", cur);
++
++ } else { /* there was neither lower rate nor error */
++ txc->fallback_count = 0;
++ if (++txc->stepup_count <= adev->stepup_threshold)
++ return;
++ txc->stepup_count = 0;
++
++ /* Sanitize. Sort of not needed, but I dont trust hw that much...
++ ** what if it can report bogus tx rates sometimes? */
++ while (!(cur & sent_rate)) sent_rate >>= 1;
++
++ /* try to find a higher sent_rate that isn't yet in our
++ * current set, but is an allowed cfg */
++ while (1) {
++ sent_rate <<= 1;
++ if (sent_rate > txc->rate_cfg)
++ /* no higher rates allowed by config */
++ return;
++ if (!(cur & sent_rate) && (txc->rate_cfg & sent_rate))
++ /* found */
++ break;
++ /* not found, try higher one */
++ }
++ SET_BIT(cur, sent_rate);
++ log(L_XFER, "tx: stepping up to ratemask %04X\n", cur);
++ }
++
++ txc->rate_cur = cur;
++ txc->ignore_count = pkts_to_ignore;
++ /* calculate acx100 style rate byte if needed */
++ if (IS_ACX100(adev)) {
++ txc->rate_100 = acx_bitpos2rate100[highest_bit(cur)];
++ }
++}
++
++
++/***********************************************************************
++** acx_i_start_xmit
++**
++** Called by network core. Can be called outside of process context.
++*/
++int
++acx_i_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ tx_t *tx;
++ void *txbuf;
++ unsigned long flags;
++ int txresult = NOT_OK;
++ int len;
++
++ FN_ENTER;
++
++ if (unlikely(!skb)) {
++ /* indicate success */
++ txresult = OK;
++ goto end_no_unlock;
++ }
++ if (unlikely(!adev)) {
++ goto end_no_unlock;
++ }
++
++ acx_lock(adev, flags);
++
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ goto end;
++ }
++ if (unlikely(adev->mode == ACX_MODE_OFF)) {
++ goto end;
++ }
++ if (unlikely(acx_queue_stopped(ndev))) {
++ log(L_DEBUG, "%s: called when queue stopped\n", __func__);
++ goto end;
++ }
++ if (unlikely(ACX_STATUS_4_ASSOCIATED != adev->status)) {
++ log(L_XFER, "trying to xmit, but not associated yet: "
++ "aborting...\n");
++ /* silently drop the packet, since we're not connected yet */
++ txresult = OK;
++ /* ...but indicate an error nevertheless */
++ adev->stats.tx_errors++;
++ goto end;
++ }
++
++ tx = acx_l_alloc_tx(adev);
++ if (unlikely(!tx)) {
++#ifndef ACX_MEM
++ /*
++ * generic slave interface has to make do with the tiny amount, around
++ * 7k, of transmit buffer space on the ACX itself. It is likely this will
++ * frequently be full.
++ */
++ printk_ratelimited("%s: start_xmit: txdesc ring is full, "
++ "dropping tx\n", ndev->name);
++#endif
++ txresult = NOT_OK;
++ goto end;
++ }
++
++ txbuf = acx_l_get_txbuf(adev, tx);
++ if (unlikely(!txbuf)) {
++ /* Card was removed */
++ txresult = NOT_OK;
++ acx_l_dealloc_tx(adev, tx);
++ goto end;
++ }
++ len = acx_ether_to_txbuf(adev, txbuf, skb);
++ if (unlikely(len < 0)) {
++ /* Error in packet conversion */
++ txresult = NOT_OK;
++ acx_l_dealloc_tx(adev, tx);
++ goto end;
++ }
++ acx_l_tx_data(adev, tx, len);
++ ndev->trans_start = jiffies;
++
++ txresult = OK;
++ adev->stats.tx_packets++;
++ adev->stats.tx_bytes += skb->len;
++
++end:
++ acx_unlock(adev, flags);
++
++end_no_unlock:
++ if ((txresult == OK) && skb)
++ dev_kfree_skb_any(skb);
++
++ FN_EXIT1(txresult);
++ return txresult;
++}
++
++
++/***********************************************************************
++** acx_l_update_ratevector
++**
++** Updates adev->rate_supported[_len] according to rate_{basic,oper}
++*/
++const u8
++acx_bitpos2ratebyte[] = {
++ DOT11RATEBYTE_1,
++ DOT11RATEBYTE_2,
++ DOT11RATEBYTE_5_5,
++ DOT11RATEBYTE_6_G,
++ DOT11RATEBYTE_9_G,
++ DOT11RATEBYTE_11,
++ DOT11RATEBYTE_12_G,
++ DOT11RATEBYTE_18_G,
++ DOT11RATEBYTE_22,
++ DOT11RATEBYTE_24_G,
++ DOT11RATEBYTE_36_G,
++ DOT11RATEBYTE_48_G,
++ DOT11RATEBYTE_54_G,
++};
++
++void
++acx_l_update_ratevector(acx_device_t *adev)
++{
++ u16 bcfg = adev->rate_basic;
++ u16 ocfg = adev->rate_oper;
++ u8 *supp = adev->rate_supported;
++ const u8 *dot11 = acx_bitpos2ratebyte;
++
++ FN_ENTER;
++
++ while (ocfg) {
++ if (ocfg & 1) {
++ *supp = *dot11;
++ if (bcfg & 1) {
++ *supp |= 0x80;
++ }
++ supp++;
++ }
++ dot11++;
++ ocfg >>= 1;
++ bcfg >>= 1;
++ }
++ adev->rate_supported_len = supp - adev->rate_supported;
++ if (acx_debug & L_ASSOC) {
++ printk("new ratevector: ");
++ acx_dump_bytes(adev->rate_supported, adev->rate_supported_len);
++ }
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_init
++*/
++static void
++acx_l_sta_list_init(acx_device_t *adev)
++{
++ FN_ENTER;
++ memset(adev->sta_hash_tab, 0, sizeof(adev->sta_hash_tab));
++ memset(adev->sta_list, 0, sizeof(adev->sta_list));
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get_from_hash
++*/
++static inline client_t*
++acx_l_sta_list_get_from_hash(acx_device_t *adev, const u8 *address)
++{
++ return adev->sta_hash_tab[address[5] % VEC_SIZE(adev->sta_hash_tab)];
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get
++*/
++client_t*
++acx_l_sta_list_get(acx_device_t *adev, const u8 *address)
++{
++ client_t *client;
++ FN_ENTER;
++ client = acx_l_sta_list_get_from_hash(adev, address);
++ while (client) {
++ if (mac_is_equal(address, client->address)) {
++ client->mtime = jiffies;
++ break;
++ }
++ client = client->next;
++ }
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_del
++*/
++void
++acx_l_sta_list_del(acx_device_t *adev, client_t *victim)
++{
++ client_t *client, *next;
++
++ client = acx_l_sta_list_get_from_hash(adev, victim->address);
++ next = client;
++ /* tricky. next = client on first iteration only,
++ ** on all other iters next = client->next */
++ while (next) {
++ if (next == victim) {
++ client->next = victim->next;
++ /* Overkill */
++ memset(victim, 0, sizeof(*victim));
++ break;
++ }
++ client = next;
++ next = client->next;
++ }
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_alloc
++**
++** Never fails - will evict oldest client if needed
++*/
++static client_t*
++acx_l_sta_list_alloc(acx_device_t *adev)
++{
++ int i;
++ unsigned long age, oldest_age;
++ client_t *client, *oldest;
++
++ FN_ENTER;
++
++ oldest = &adev->sta_list[0];
++ oldest_age = 0;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client = &adev->sta_list[i];
++
++ if (!client->used) {
++ goto found;
++ } else {
++ age = jiffies - client->mtime;
++ if (oldest_age < age) {
++ oldest_age = age;
++ oldest = client;
++ }
++ }
++ }
++ acx_l_sta_list_del(adev, oldest);
++ client = oldest;
++found:
++ memset(client, 0, sizeof(*client));
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_add
++**
++** Never fails - will evict oldest client if needed
++*/
++/* In case we will reimplement it differently... */
++#define STA_LIST_ADD_CAN_FAIL 0
++
++static client_t*
++acx_l_sta_list_add(acx_device_t *adev, const u8 *address)
++{
++ client_t *client;
++ int index;
++
++ FN_ENTER;
++
++ client = acx_l_sta_list_alloc(adev);
++
++ client->mtime = jiffies;
++ MAC_COPY(client->address, address);
++ client->used = CLIENT_EXIST_1;
++ client->auth_alg = WLAN_AUTH_ALG_SHAREDKEY;
++ client->auth_step = 1;
++ /* give some tentative peer rate values
++ ** (needed because peer may do auth without probing us first,
++ ** thus we'll have no idea of peer's ratevector yet).
++ ** Will be overwritten by scanning or assoc code */
++ client->rate_cap = adev->rate_basic;
++ client->rate_cfg = adev->rate_basic;
++ client->rate_cur = 1 << lowest_bit(adev->rate_basic);
++
++ index = address[5] % VEC_SIZE(adev->sta_hash_tab);
++ client->next = adev->sta_hash_tab[index];
++ adev->sta_hash_tab[index] = client;
++
++ acxlog_mac(L_ASSOC, "sta_list_add: sta=", address, "\n");
++
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get_or_add
++**
++** Never fails - will evict oldest client if needed
++*/
++static client_t*
++acx_l_sta_list_get_or_add(acx_device_t *adev, const u8 *address)
++{
++ client_t *client = acx_l_sta_list_get(adev, address);
++ if (!client)
++ client = acx_l_sta_list_add(adev, address);
++ return client;
++}
++
++
++/***********************************************************************
++** acx_set_status
++**
++** This function is called in many atomic regions, must not sleep
++**
++** This function does not need locking UNLESS you call it
++** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
++** wake queue. This can race with stop_queue elsewhere.
++** See acx_stop_queue comment. */
++void
++acx_set_status(acx_device_t *adev, u16 new_status)
++{
++#define QUEUE_OPEN_AFTER_ASSOC 1 /* this really seems to be needed now */
++ u16 old_status = adev->status;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "%s(%d):%s\n",
++ __func__, new_status, acx_get_status_name(new_status));
++
++ /* wireless_send_event never sleeps */
++ if (ACX_STATUS_4_ASSOCIATED == new_status) {
++ union iwreq_data wrqu;
++
++ wrqu.data.length = 0;
++ wrqu.data.flags = 0;
++ wireless_send_event(adev->ndev, SIOCGIWSCAN, &wrqu, NULL);
++
++ wrqu.data.length = 0;
++ wrqu.data.flags = 0;
++ MAC_COPY(wrqu.ap_addr.sa_data, adev->bssid);
++ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
++ wireless_send_event(adev->ndev, SIOCGIWAP, &wrqu, NULL);
++ } else {
++ union iwreq_data wrqu;
++
++ /* send event with empty BSSID to indicate we're not associated */
++ MAC_ZERO(wrqu.ap_addr.sa_data);
++ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
++ wireless_send_event(adev->ndev, SIOCGIWAP, &wrqu, NULL);
++ }
++
++ adev->status = new_status;
++
++ switch (new_status) {
++ case ACX_STATUS_1_SCANNING:
++ adev->scan_retries = 0;
++ /* 1.0 s initial scan time */
++ acx_set_timer(adev, 1000000);
++ break;
++ case ACX_STATUS_2_WAIT_AUTH:
++ case ACX_STATUS_3_AUTHENTICATED:
++ adev->auth_or_assoc_retries = 0;
++ acx_set_timer(adev, 1500000); /* 1.5 s */
++ break;
++ }
++
++#if QUEUE_OPEN_AFTER_ASSOC
++ if (new_status == ACX_STATUS_4_ASSOCIATED) {
++ if (old_status < ACX_STATUS_4_ASSOCIATED) {
++ /* ah, we're newly associated now,
++ * so let's indicate carrier */
++ acx_carrier_on(adev->ndev, "after association");
++ acx_wake_queue(adev->ndev, "after association");
++ }
++ } else {
++ /* not associated any more, so let's kill carrier */
++ if (old_status >= ACX_STATUS_4_ASSOCIATED) {
++ acx_carrier_off(adev->ndev, "after losing association");
++ acx_stop_queue(adev->ndev, "after losing association");
++ }
++ }
++#endif
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_i_timer
++**
++** Fires up periodically. Used to kick scan/auth/assoc if something goes wrong
++*/
++void
++acx_i_timer(unsigned long address)
++{
++ unsigned long flags;
++ acx_device_t *adev = (acx_device_t*)address;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ log(L_DEBUG|L_ASSOC, "%s: adev->status=%d (%s)\n",
++ __func__, adev->status, acx_get_status_name(adev->status));
++
++ switch (adev->status) {
++ case ACX_STATUS_1_SCANNING:
++ /* was set to 0 by set_status() */
++ if (++adev->scan_retries < 7) {
++ acx_set_timer(adev, 1000000);
++ /* used to interrogate for scan status.
++ ** We rely on SCAN_COMPLETE IRQ instead */
++ log(L_ASSOC, "continuing scan (%d sec)\n",
++ adev->scan_retries);
++ } else {
++ log(L_ASSOC, "stopping scan\n");
++ /* send stop_scan cmd when we leave the interrupt context,
++ * and make a decision what to do next (COMPLETE_SCAN) */
++ acx_schedule_task(adev,
++ ACX_AFTER_IRQ_CMD_STOP_SCAN + ACX_AFTER_IRQ_COMPLETE_SCAN);
++ }
++ break;
++ case ACX_STATUS_2_WAIT_AUTH:
++ /* was set to 0 by set_status() */
++ if (++adev->auth_or_assoc_retries < 10) {
++ log(L_ASSOC, "resend authen1 request (attempt %d)\n",
++ adev->auth_or_assoc_retries + 1);
++ acx_l_transmit_authen1(adev);
++ } else {
++ /* time exceeded: fall back to scanning mode */
++ log(L_ASSOC,
++ "authen1 request reply timeout, giving up\n");
++ /* we are a STA, need to find AP anyhow */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ /* used to be 1500000, but some other driver uses 2.5s */
++ acx_set_timer(adev, 2500000);
++ break;
++ case ACX_STATUS_3_AUTHENTICATED:
++ /* was set to 0 by set_status() */
++ if (++adev->auth_or_assoc_retries < 10) {
++ log(L_ASSOC, "resend assoc request (attempt %d)\n",
++ adev->auth_or_assoc_retries + 1);
++ acx_l_transmit_assoc_req(adev);
++ } else {
++ /* time exceeded: give up */
++ log(L_ASSOC,
++ "association request reply timeout, giving up\n");
++ /* we are a STA, need to find AP anyhow */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ acx_set_timer(adev, 2500000); /* see above */
++ break;
++ case ACX_STATUS_4_ASSOCIATED:
++ default:
++ break;
++ }
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_set_timer
++**
++** Sets the 802.11 state management timer's timeout.
++*/
++void
++acx_set_timer(acx_device_t *adev, int timeout_us)
++{
++ FN_ENTER;
++
++ log(L_DEBUG|L_IRQ, "%s(%u ms)\n", __func__, timeout_us/1000);
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ printk("attempt to set the timer "
++ "when the card interface is not up!\n");
++ goto end;
++ }
++
++ /* first check if the timer was already initialized, THEN modify it */
++ if (adev->mgmt_timer.function) {
++ mod_timer(&adev->mgmt_timer,
++ jiffies + (timeout_us * HZ / 1000000));
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_assocresp
++**
++** We are an AP here
++*/
++static const u8
++dot11ratebyte[] = {
++ DOT11RATEBYTE_1,
++ DOT11RATEBYTE_2,
++ DOT11RATEBYTE_5_5,
++ DOT11RATEBYTE_6_G,
++ DOT11RATEBYTE_9_G,
++ DOT11RATEBYTE_11,
++ DOT11RATEBYTE_12_G,
++ DOT11RATEBYTE_18_G,
++ DOT11RATEBYTE_22,
++ DOT11RATEBYTE_24_G,
++ DOT11RATEBYTE_36_G,
++ DOT11RATEBYTE_48_G,
++ DOT11RATEBYTE_54_G,
++};
++
++static inline int
++find_pos(const u8 *p, int size, u8 v)
++{
++ int i;
++ for (i = 0; i < size; i++)
++ if (p[i] == v)
++ return i;
++ /* printk a message about strange byte? */
++ return 0;
++}
++
++static void
++add_bits_to_ratemasks(u8* ratevec, int len, u16* brate, u16* orate)
++{
++ while (len--) {
++ int n = 1 << find_pos(dot11ratebyte,
++ sizeof(dot11ratebyte), *ratevec & 0x7f);
++ if (*ratevec & 0x80)
++ *brate |= n;
++ *orate |= n;
++ ratevec++;
++ }
++}
++
++static int
++acx_l_transmit_assocresp(acx_device_t *adev, const wlan_fr_assocreq_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct assocresp_frame_body *body;
++ u8 *p;
++ const u8 *da;
++ /* const u8 *sa; */
++ const u8 *bssid;
++ client_t *clt;
++
++ FN_ENTER;
++
++ /* sa = req->hdr->a1; */
++ da = req->hdr->a2;
++ bssid = req->hdr->a3;
++
++ clt = acx_l_sta_list_get(adev, da);
++ if (!clt)
++ goto ok;
++
++ /* Assoc without auth is a big no-no */
++ /* Let's be liberal: if already assoc'ed STA sends assoc req again,
++ ** we won't be rude */
++ if (clt->used != CLIENT_AUTHENTICATED_2
++ && clt->used != CLIENT_ASSOCIATED_3) {
++ acx_l_transmit_deauthen(adev, da, WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ goto bad;
++ }
++
++ clt->used = CLIENT_ASSOCIATED_3;
++
++ if (clt->aid == 0)
++ clt->aid = ++adev->aid;
++ clt->cap_info = ieee2host16(*(req->cap_info));
++
++ /* We cheat here a bit. We don't really care which rates are flagged
++ ** as basic by the client, so we stuff them in single ratemask */
++ clt->rate_cap = 0;
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &clt->rate_cap, &clt->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &clt->rate_cap, &clt->rate_cap);
++ /* We can check that client supports all basic rates,
++ ** and deny assoc if not. But let's be liberal, right? ;) */
++ clt->rate_cfg = clt->rate_cap & adev->rate_oper;
++ if (!clt->rate_cfg) clt->rate_cfg = 1 << lowest_bit(adev->rate_oper);
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[lowest_bit(clt->rate_cfg)];
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_ASSOCRESPi;
++ head->dur = req->hdr->dur;
++ MAC_COPY(head->da, da);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, bssid);
++ head->seq = req->hdr->seq;
++
++ body->cap_info = host2ieee16(adev->capabilities);
++ body->status = host2ieee16(0);
++ body->aid = host2ieee16(clt->aid);
++ p = wlan_fill_ie_rates((u8*)&body->rates, adev->rate_supported_len,
++ adev->rate_supported);
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len,
++ adev->rate_supported);
++
++ acx_l_tx_data(adev, tx, p - (u8*)head);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++* acx_l_transmit_reassocresp
++
++You may be wondering, just like me, what the hell ReAuth is.
++In practice it was seen sent by STA when STA feels like losing connection.
++
++[802.11]
++
++5.4.2.3 Reassociation
++
++Association is sufficient for no-transition message delivery between
++IEEE 802.11 stations. Additional functionality is needed to support
++BSS-transition mobility. The additional required functionality
++is provided by the reassociation service. Reassociation is a DSS.
++The reassociation service is invoked to 'move' a current association
++from one AP to another. This keeps the DS informed of the current
++mapping between AP and STA as the station moves from BSS to BSS within
++an ESS. Reassociation also enables changing association attributes
++of an established association while the STA remains associated with
++the same AP. Reassociation is always initiated by the mobile STA.
++
++5.4.3.1 Authentication
++...
++A STA may be authenticated with many other STAs at any given instant.
++
++5.4.3.1.1 Preauthentication
++
++Because the authentication process could be time-consuming (depending
++on the authentication protocol in use), the authentication service can
++be invoked independently of the association service. Preauthentication
++is typically done by a STA while it is already associated with an AP
++(with which it previously authenticated). IEEE 802.11 does not require
++that STAs preauthenticate with APs. However, authentication is required
++before an association can be established. If the authentication is left
++until reassociation time, this may impact the speed with which a STA can
++reassociate between APs, limiting BSS-transition mobility performance.
++The use of preauthentication takes the authentication service overhead
++out of the time-critical reassociation process.
++
++5.7.3 Reassociation
++
++For a STA to reassociate, the reassociation service causes the following
++message to occur:
++
++ Reassociation request
++
++* Message type: Management
++* Message subtype: Reassociation request
++* Information items:
++ - IEEE address of the STA
++ - IEEE address of the AP with which the STA will reassociate
++ - IEEE address of the AP with which the STA is currently associated
++ - ESSID
++* Direction of message: From STA to 'new' AP
++
++The address of the current AP is included for efficiency. The inclusion
++of the current AP address facilitates MAC reassociation to be independent
++of the DS implementation.
++
++ Reassociation response
++* Message type: Management
++* Message subtype: Reassociation response
++* Information items:
++ - Result of the requested reassociation. (success/failure)
++ - If the reassociation is successful, the response shall include the AID.
++* Direction of message: From AP to STA
++
++7.2.3.6 Reassociation Request frame format
++
++The frame body of a management frame of subtype Reassociation Request
++contains the information shown in Table 9.
++
++Table 9 Reassociation Request frame body
++Order Information
++1 Capability information
++2 Listen interval
++3 Current AP address
++4 SSID
++5 Supported rates
++
++7.2.3.7 Reassociation Response frame format
++
++The frame body of a management frame of subtype Reassociation Response
++contains the information shown in Table 10.
++
++Table 10 Reassociation Response frame body
++Order Information
++1 Capability information
++2 Status code
++3 Association ID (AID)
++4 Supported rates
++
++*/
++static int
++acx_l_transmit_reassocresp(acx_device_t *adev, const wlan_fr_reassocreq_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct reassocresp_frame_body *body;
++ u8 *p;
++ const u8 *da;
++ /* const u8 *sa; */
++ const u8 *bssid;
++ client_t *clt;
++
++ FN_ENTER;
++
++ /* sa = req->hdr->a1; */
++ da = req->hdr->a2;
++ bssid = req->hdr->a3;
++
++ /* Must be already authenticated, so it must be in the list */
++ clt = acx_l_sta_list_get(adev, da);
++ if (!clt)
++ goto ok;
++
++ /* Assoc without auth is a big no-no */
++ /* Already assoc'ed STAs sending ReAssoc req are ok per 802.11 */
++ if (clt->used != CLIENT_AUTHENTICATED_2
++ && clt->used != CLIENT_ASSOCIATED_3) {
++ acx_l_transmit_deauthen(adev, da, WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ goto bad;
++ }
++
++ clt->used = CLIENT_ASSOCIATED_3;
++ if (clt->aid == 0) {
++ clt->aid = ++adev->aid;
++ }
++ if (req->cap_info)
++ clt->cap_info = ieee2host16(*(req->cap_info));
++
++ /* We cheat here a bit. We don't really care which rates are flagged
++ ** as basic by the client, so we stuff them in single ratemask */
++ clt->rate_cap = 0;
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &clt->rate_cap, &clt->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &clt->rate_cap, &clt->rate_cap);
++ /* We can check that client supports all basic rates,
++ ** and deny assoc if not. But let's be liberal, right? ;) */
++ clt->rate_cfg = clt->rate_cap & adev->rate_oper;
++ if (!clt->rate_cfg) clt->rate_cfg = 1 << lowest_bit(adev->rate_oper);
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[lowest_bit(clt->rate_cfg)];
++
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_REASSOCRESPi;
++ head->dur = req->hdr->dur;
++ MAC_COPY(head->da, da);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, bssid);
++ head->seq = req->hdr->seq;
++
++ /* IEs: 1. caps */
++ body->cap_info = host2ieee16(adev->capabilities);
++ /* 2. status code */
++ body->status = host2ieee16(0);
++ /* 3. AID */
++ body->aid = host2ieee16(clt->aid);
++ /* 4. supp rates */
++ p = wlan_fill_ie_rates((u8*)&body->rates, adev->rate_supported_len,
++ adev->rate_supported);
++ /* 5. ext supp rates */
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len,
++ adev->rate_supported);
++
++ acx_l_tx_data(adev, tx, p - (u8*)head);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_process_disassoc_from_sta
++*/
++static void
++acx_l_process_disassoc_from_sta(acx_device_t *adev, const wlan_fr_disassoc_t *req)
++{
++ const u8 *ta;
++ client_t *clt;
++
++ FN_ENTER;
++
++ ta = req->hdr->a2;
++ clt = acx_l_sta_list_get(adev, ta);
++ if (!clt)
++ goto end;
++
++ if (clt->used != CLIENT_ASSOCIATED_3
++ && clt->used != CLIENT_AUTHENTICATED_2) {
++ /* it's disassociating, but it's
++ ** not even authenticated! Let it know that */
++ acxlog_mac(L_ASSOC|L_XFER, "peer ", ta, "has sent disassoc "
++ "req but it is not even auth'ed! sending deauth\n");
++ acx_l_transmit_deauthen(adev, ta,
++ WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ clt->used = CLIENT_EXIST_1;
++ } else {
++ /* mark it as auth'ed only */
++ clt->used = CLIENT_AUTHENTICATED_2;
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_deauthen_from_sta
++*/
++static void
++acx_l_process_deauth_from_sta(acx_device_t *adev, const wlan_fr_deauthen_t *req)
++{
++ const wlan_hdr_t *hdr;
++ client_t *client;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (acx_debug & L_ASSOC) {
++ acx_print_mac("got deauth from sta:", hdr->a2, " ");
++ acx_print_mac("a1:", hdr->a1, " ");
++ acx_print_mac("a3:", hdr->a3, " ");
++ acx_print_mac("adev->addr:", adev->dev_addr, " ");
++ acx_print_mac("adev->bssid:", adev->bssid, "\n");
++ }
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)) {
++ goto end;
++ }
++
++ client = acx_l_sta_list_get(adev, hdr->a2);
++ if (!client) {
++ goto end;
++ }
++ client->used = CLIENT_EXIST_1;
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_disassoc_from_ap
++*/
++static void
++acx_l_process_disassoc_from_ap(acx_device_t *adev, const wlan_fr_disassoc_t *req)
++{
++ FN_ENTER;
++
++ if (!adev->ap_client) {
++ /* Hrm, we aren't assoc'ed yet anyhow... */
++ goto end;
++ }
++
++ printk("%s: got disassoc frame with reason %d (%s)\n",
++ adev->ndev->name, *req->reason,
++ acx_wlan_reason_str(*req->reason));
++
++ if (mac_is_equal(adev->dev_addr, req->hdr->a1)) {
++ acx_l_transmit_deauthen(adev, adev->bssid,
++ WLAN_MGMT_REASON_DEAUTH_LEAVING);
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_deauth_from_ap
++*/
++static void
++acx_l_process_deauth_from_ap(acx_device_t *adev, const wlan_fr_deauthen_t *req)
++{
++ FN_ENTER;
++
++ if (!adev->ap_client) {
++ /* Hrm, we aren't assoc'ed yet anyhow... */
++ goto end;
++ }
++
++ printk("%s: got deauth frame with reason %d (%s)\n",
++ adev->ndev->name, *req->reason,
++ acx_wlan_reason_str(*req->reason));
++
++ /* Chk: is ta verified to be from our AP? */
++ if (mac_is_equal(adev->dev_addr, req->hdr->a1)) {
++ log(L_DEBUG, "AP sent us deauth packet\n");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_rx
++**
++** The end of the Rx path. Pulls data from a rxhostdesc into a socket
++** buffer and feeds it to the network stack via netif_rx().
++*/
++static void
++acx_l_rx(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ FN_ENTER;
++ if (likely(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ struct sk_buff *skb;
++ skb = acx_rxbuf_to_ether(adev, rxbuf);
++ if (likely(skb)) {
++ netif_rx(skb);
++ adev->ndev->last_rx = jiffies;
++ adev->stats.rx_packets++;
++ adev->stats.rx_bytes += skb->len;
++ }
++ }
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_data_frame_master
++*/
++static int
++acx_l_process_data_frame_master(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *hdr;
++ struct tx *tx;
++ void *txbuf;
++ int len;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ case WF_FC_FROMDSi:
++ log(L_DEBUG, "ap->sta or adhoc->adhoc data frame ignored\n");
++ goto done;
++ case WF_FC_TODSi:
++ break;
++ default: /* WF_FC_FROMTODSi */
++ log(L_DEBUG, "wds data frame ignored (TODO)\n");
++ goto done;
++ }
++
++ /* check if it is our BSSID, if not, leave */
++ if (!mac_is_equal(adev->bssid, hdr->a1)) {
++ goto done;
++ }
++
++ if (mac_is_equal(adev->dev_addr, hdr->a3)) {
++ /* this one is for us */
++ acx_l_rx(adev, rxbuf);
++ } else {
++ if (mac_is_bcast(hdr->a3)) {
++ /* this one is bcast, rx it too */
++ acx_l_rx(adev, rxbuf);
++ }
++ tx = acx_l_alloc_tx(adev);
++ if (!tx) {
++ goto fail;
++ }
++ /* repackage, tx, and hope it someday reaches its destination */
++ /* order is important, we do it in-place */
++ MAC_COPY(hdr->a1, hdr->a3);
++ MAC_COPY(hdr->a3, hdr->a2);
++ MAC_COPY(hdr->a2, adev->bssid);
++ /* To_DS = 0, From_DS = 1 */
++ hdr->fc = WF_FC_FROMDSi + WF_FTYPE_DATAi;
++
++ txbuf = acx_l_get_txbuf(adev, tx);
++ if (txbuf) {
++ len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ memcpy(txbuf, hdr, len);
++ acx_l_tx_data(adev, tx, len);
++ } else {
++ acx_l_dealloc_tx(adev, tx);
++ }
++ }
++done:
++ result = OK;
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_data_frame_client
++*/
++static int
++acx_l_process_data_frame_client(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ const u8 *da, *bssid;
++ const wlan_hdr_t *hdr;
++ struct net_device *ndev = adev->ndev;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ if (ACX_STATUS_4_ASSOCIATED != adev->status)
++ goto drop;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ if (adev->mode != ACX_MODE_0_ADHOC) {
++ log(L_DEBUG, "adhoc->adhoc data frame ignored\n");
++ goto drop;
++ }
++ bssid = hdr->a3;
++ break;
++ case WF_FC_FROMDSi:
++ if (adev->mode != ACX_MODE_2_STA) {
++ log(L_DEBUG, "ap->sta data frame ignored\n");
++ goto drop;
++ }
++ bssid = hdr->a2;
++ break;
++ case WF_FC_TODSi:
++ log(L_DEBUG, "sta->ap data frame ignored\n");
++ goto drop;
++ default: /* WF_FC_FROMTODSi: wds->wds */
++ log(L_DEBUG, "wds data frame ignored (todo)\n");
++ goto drop;
++ }
++
++ da = hdr->a1;
++
++ if (unlikely(acx_debug & L_DEBUG)) {
++ acx_print_mac("rx: da=", da, "");
++ acx_print_mac(" bssid=", bssid, "");
++ acx_print_mac(" adev->bssid=", adev->bssid, "");
++ acx_print_mac(" adev->addr=", adev->dev_addr, "\n");
++ }
++
++ /* promiscuous mode --> receive all packets */
++ if (unlikely(ndev->flags & IFF_PROMISC))
++ goto process;
++
++ /* FIRST, check if it is our BSSID */
++ if (!mac_is_equal(adev->bssid, bssid)) {
++ /* is not our BSSID, so bail out */
++ goto drop;
++ }
++
++ /* then, check if it is our address */
++ if (mac_is_equal(adev->dev_addr, da)) {
++ goto process;
++ }
++
++ /* then, check if it is broadcast */
++ if (mac_is_bcast(da)) {
++ goto process;
++ }
++
++ if (mac_is_mcast(da)) {
++ /* unconditionally receive all multicasts */
++ if (ndev->flags & IFF_ALLMULTI)
++ goto process;
++
++ /* FIXME: need to check against the list of
++ * multicast addresses that are configured
++ * for the interface (ifconfig) */
++ log(L_XFER, "FIXME: multicast packet, need to check "
++ "against a list of multicast addresses "
++ "(to be created!); accepting packet for now\n");
++ /* for now, just accept it here */
++ goto process;
++ }
++
++ log(L_DEBUG, "rx: foreign packet, dropping\n");
++ goto drop;
++process:
++ /* receive packet */
++ acx_l_rx(adev, rxbuf);
++
++ result = OK;
++drop:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_mgmt_frame
++**
++** Theory of operation: mgmt packet gets parsed (to make it easy
++** to access variable-sized IEs), results stored in 'parsed'.
++** Then we react to the packet.
++*/
++typedef union parsed_mgmt_req {
++ wlan_fr_mgmt_t mgmt;
++ wlan_fr_assocreq_t assocreq;
++ wlan_fr_reassocreq_t reassocreq;
++ wlan_fr_assocresp_t assocresp;
++ wlan_fr_reassocresp_t reassocresp;
++ wlan_fr_beacon_t beacon;
++ wlan_fr_disassoc_t disassoc;
++ wlan_fr_authen_t authen;
++ wlan_fr_deauthen_t deauthen;
++ wlan_fr_proberesp_t proberesp;
++} parsed_mgmt_req_t;
++
++void BUG_excessive_stack_usage(void);
++
++static int
++acx_l_process_mgmt_frame(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ parsed_mgmt_req_t parsed; /* takes ~100 bytes of stack */
++ wlan_hdr_t *hdr;
++ int adhoc, sta_scan, sta, ap;
++ int len;
++
++ if (sizeof(parsed) > 256)
++ BUG_excessive_stack_usage();
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ /* Management frames never have these set */
++ if (WF_FC_FROMTODSi & hdr->fc) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ if (WF_FC_ISWEPi & hdr->fc)
++ len -= 0x10;
++
++ adhoc = (adev->mode == ACX_MODE_0_ADHOC);
++ sta_scan = ((adev->mode == ACX_MODE_2_STA)
++ && (adev->status != ACX_STATUS_4_ASSOCIATED));
++ sta = ((adev->mode == ACX_MODE_2_STA)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED));
++ ap = (adev->mode == ACX_MODE_3_AP);
++
++ switch (WF_FC_FSTYPEi & hdr->fc) {
++ /* beacons first, for speed */
++ case WF_FSTYPE_BEACONi:
++ memset(&parsed.beacon, 0, sizeof(parsed.beacon));
++ parsed.beacon.hdr = hdr;
++ parsed.beacon.len = len;
++ if (acx_debug & L_DATA) {
++ printk("beacon len:%d fc:%04X dur:%04X seq:%04X",
++ len, hdr->fc, hdr->dur, hdr->seq);
++ acx_print_mac(" a1:", hdr->a1, "");
++ acx_print_mac(" a2:", hdr->a2, "");
++ acx_print_mac(" a3:", hdr->a3, "\n");
++ }
++ wlan_mgmt_decode_beacon(&parsed.beacon);
++ /* beacon and probe response are very similar, so... */
++ acx_l_process_probe_response(adev, &parsed.beacon, rxbuf);
++ break;
++ case WF_FSTYPE_ASSOCREQi:
++ if (!ap)
++ break;
++ memset(&parsed.assocreq, 0, sizeof(parsed.assocreq));
++ parsed.assocreq.hdr = hdr;
++ parsed.assocreq.len = len;
++ wlan_mgmt_decode_assocreq(&parsed.assocreq);
++ if (mac_is_equal(hdr->a1, adev->bssid)
++ && mac_is_equal(hdr->a3, adev->bssid)) {
++ acx_l_transmit_assocresp(adev, &parsed.assocreq);
++ }
++ break;
++ case WF_FSTYPE_REASSOCREQi:
++ if (!ap)
++ break;
++ memset(&parsed.assocreq, 0, sizeof(parsed.assocreq));
++ parsed.assocreq.hdr = hdr;
++ parsed.assocreq.len = len;
++ wlan_mgmt_decode_assocreq(&parsed.assocreq);
++ /* reassocreq and assocreq are equivalent */
++ acx_l_transmit_reassocresp(adev, &parsed.reassocreq);
++ break;
++ case WF_FSTYPE_ASSOCRESPi:
++ if (!sta_scan)
++ break;
++ memset(&parsed.assocresp, 0, sizeof(parsed.assocresp));
++ parsed.assocresp.hdr = hdr;
++ parsed.assocresp.len = len;
++ wlan_mgmt_decode_assocresp(&parsed.assocresp);
++ acx_l_process_assocresp(adev, &parsed.assocresp);
++ break;
++ case WF_FSTYPE_REASSOCRESPi:
++ if (!sta_scan)
++ break;
++ memset(&parsed.assocresp, 0, sizeof(parsed.assocresp));
++ parsed.assocresp.hdr = hdr;
++ parsed.assocresp.len = len;
++ wlan_mgmt_decode_assocresp(&parsed.assocresp);
++ acx_l_process_reassocresp(adev, &parsed.reassocresp);
++ break;
++ case WF_FSTYPE_PROBEREQi:
++ if (ap || adhoc) {
++ /* FIXME: since we're supposed to be an AP,
++ ** we need to return a Probe Response packet.
++ ** Currently firmware is doing it for us,
++ ** but firmware is buggy! See comment elsewhere --vda */
++ }
++ break;
++ case WF_FSTYPE_PROBERESPi:
++ memset(&parsed.proberesp, 0, sizeof(parsed.proberesp));
++ parsed.proberesp.hdr = hdr;
++ parsed.proberesp.len = len;
++ wlan_mgmt_decode_proberesp(&parsed.proberesp);
++ acx_l_process_probe_response(adev, &parsed.proberesp, rxbuf);
++ break;
++ case 6:
++ case 7:
++ /* exit */
++ break;
++ case WF_FSTYPE_ATIMi:
++ /* exit */
++ break;
++ case WF_FSTYPE_DISASSOCi:
++ if (!sta && !ap)
++ break;
++ memset(&parsed.disassoc, 0, sizeof(parsed.disassoc));
++ parsed.disassoc.hdr = hdr;
++ parsed.disassoc.len = len;
++ wlan_mgmt_decode_disassoc(&parsed.disassoc);
++ if (sta)
++ acx_l_process_disassoc_from_ap(adev, &parsed.disassoc);
++ else
++ acx_l_process_disassoc_from_sta(adev, &parsed.disassoc);
++ break;
++ case WF_FSTYPE_AUTHENi:
++ if (!sta_scan && !ap)
++ break;
++ memset(&parsed.authen, 0, sizeof(parsed.authen));
++ parsed.authen.hdr = hdr;
++ parsed.authen.len = len;
++ wlan_mgmt_decode_authen(&parsed.authen);
++ acx_l_process_authen(adev, &parsed.authen);
++ break;
++ case WF_FSTYPE_DEAUTHENi:
++ if (!sta && !ap)
++ break;
++ memset(&parsed.deauthen, 0, sizeof(parsed.deauthen));
++ parsed.deauthen.hdr = hdr;
++ parsed.deauthen.len = len;
++ wlan_mgmt_decode_deauthen(&parsed.deauthen);
++ if (sta)
++ acx_l_process_deauth_from_ap(adev, &parsed.deauthen);
++ else
++ acx_l_process_deauth_from_sta(adev, &parsed.deauthen);
++ break;
++ }
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#ifdef UNUSED
++/***********************************************************************
++** acx_process_class_frame
++**
++** Called from IRQ context only
++*/
++static int
++acx_process_class_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala)
++{
++ return OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_process_NULL_frame
++*/
++#ifdef BOGUS_ITS_NOT_A_NULL_FRAME_HANDLER_AT_ALL
++static int
++acx_l_process_NULL_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala)
++{
++ const signed char *esi;
++ const u8 *ebx;
++ const wlan_hdr_t *hdr;
++ const client_t *client;
++ int result = NOT_OK;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ esi = hdr->a1;
++ ebx = hdr->a2;
++ break;
++ case WF_FC_FROMDSi:
++ esi = hdr->a1;
++ ebx = hdr->a3;
++ break;
++ case WF_FC_TODSi:
++ esi = hdr->a1;
++ ebx = hdr->a2;
++ break;
++ default: /* WF_FC_FROMTODSi */
++ esi = hdr->a1; /* added by me! --vda */
++ ebx = hdr->a2;
++ }
++
++ if (esi[0x0] < 0) {
++ result = OK;
++ goto done;
++ }
++
++ client = acx_l_sta_list_get(adev, ebx);
++ if (client)
++ result = NOT_OK;
++ else {
++#ifdef IS_IT_BROKEN
++ log(L_DEBUG|L_XFER, "<transmit_deauth 7>\n");
++ acx_l_transmit_deauthen(adev, ebx,
++ WLAN_MGMT_REASON_CLASS2_NONAUTH);
++#else
++ log(L_DEBUG, "received NULL frame from unknown client! "
++ "We really shouldn't send deauthen here, right?\n");
++#endif
++ result = OK;
++ }
++done:
++ return result;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_process_probe_response
++*/
++static int
++acx_l_process_probe_response(acx_device_t *adev, wlan_fr_proberesp_t *req,
++ const rxbuffer_t *rxbuf)
++{
++ struct client *bss;
++ wlan_hdr_t *hdr;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (mac_is_equal(hdr->a3, adev->dev_addr)) {
++ log(L_ASSOC, "huh, scan found our own MAC!?\n");
++ goto ok; /* just skip this one silently */
++ }
++
++ bss = acx_l_sta_list_get_or_add(adev, hdr->a2);
++
++ /* NB: be careful modifying bss data! It may be one
++ ** of the already known clients (like our AP if we are a STA)
++ ** Thus do not blindly modify e.g. current ratemask! */
++
++ if (STA_LIST_ADD_CAN_FAIL && !bss) {
++ /* uh oh, we found more sites/stations than we can handle with
++ * our current setup: pull the emergency brake and stop scanning! */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_STOP_SCAN);
++ /* TODO: a nice comment what below call achieves --vda */
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ goto ok;
++ }
++ /* NB: get_or_add already filled bss->address = hdr->a2 */
++ MAC_COPY(bss->bssid, hdr->a3);
++
++ /* copy the ESSID element */
++ if (req->ssid && req->ssid->len <= IW_ESSID_MAX_SIZE) {
++ bss->essid_len = req->ssid->len;
++ memcpy(bss->essid, req->ssid->ssid, req->ssid->len);
++ bss->essid[req->ssid->len] = '\0';
++ } else {
++ /* Either no ESSID IE or oversized one */
++ printk("%s: received packet has bogus ESSID\n",
++ adev->ndev->name);
++ }
++
++ if (req->ds_parms)
++ bss->channel = req->ds_parms->curr_ch;
++ if (req->cap_info)
++ bss->cap_info = ieee2host16(*req->cap_info);
++
++ bss->sir = acx_signal_to_winlevel(rxbuf->phy_level);
++ bss->snr = acx_signal_to_winlevel(rxbuf->phy_snr);
++
++ bss->rate_cap = 0; /* operational mask */
++ bss->rate_bas = 0; /* basic mask */
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &bss->rate_bas, &bss->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &bss->rate_bas, &bss->rate_cap);
++ /* Fix up any possible bogosity - code elsewhere
++ * is not expecting empty masks */
++ if (!bss->rate_cap)
++ bss->rate_cap = adev->rate_basic;
++ if (!bss->rate_bas)
++ bss->rate_bas = 1 << lowest_bit(bss->rate_cap);
++ if (!bss->rate_cur)
++ bss->rate_cur = 1 << lowest_bit(bss->rate_bas);
++
++ /* People moan about this being too noisy at L_ASSOC */
++ log(L_DEBUG,
++ "found %s: ESSID=\"%s\" ch=%d "
++ "BSSID="MACSTR" caps=0x%04X SIR=%d SNR=%d\n",
++ (bss->cap_info & WF_MGMT_CAP_IBSS) ? "Ad-Hoc peer" : "AP",
++ bss->essid, bss->channel, MAC(bss->bssid), bss->cap_info,
++ bss->sir, bss->snr);
++ok:
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_process_assocresp
++*/
++static int
++acx_l_process_assocresp(acx_device_t *adev, const wlan_fr_assocresp_t *req)
++{
++ const wlan_hdr_t *hdr;
++ int res = OK;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if ((ACX_MODE_2_STA == adev->mode)
++ && mac_is_equal(adev->dev_addr, hdr->a1)) {
++ u16 st = ieee2host16(*(req->status));
++ if (WLAN_MGMT_STATUS_SUCCESS == st) {
++ adev->aid = ieee2host16(*(req->aid));
++ /* tell the card we are associated when
++ ** we are out of interrupt context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_ASSOCIATE);
++ } else {
++
++ /* TODO: we shall delete peer from sta_list, and try
++ ** other candidates... */
++
++ printk("%s: association FAILED: peer sent "
++ "Status Code %d (%s)\n",
++ adev->ndev->name, st, get_status_string(st));
++ res = NOT_OK;
++ }
++ }
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acx_l_process_reassocresp
++*/
++static int
++acx_l_process_reassocresp(acx_device_t *adev, const wlan_fr_reassocresp_t *req)
++{
++ const wlan_hdr_t *hdr;
++ int result = NOT_OK;
++ u16 st;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)) {
++ goto end;
++ }
++ st = ieee2host16(*(req->status));
++ if (st == WLAN_MGMT_STATUS_SUCCESS) {
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ result = OK;
++ } else {
++ printk("%s: reassociation FAILED: peer sent "
++ "response code %d (%s)\n",
++ adev->ndev->name, st, get_status_string(st));
++ }
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_authen
++**
++** Called only in STA_SCAN or AP mode
++*/
++static int
++acx_l_process_authen(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ const wlan_hdr_t *hdr;
++ client_t *clt;
++ wlan_ie_challenge_t *chal;
++ u16 alg, seq, status;
++ int ap, result;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (acx_debug & L_ASSOC) {
++ acx_print_mac("AUTHEN adev->addr=", adev->dev_addr, " ");
++ acx_print_mac("a1=", hdr->a1, " ");
++ acx_print_mac("a2=", hdr->a2, " ");
++ acx_print_mac("a3=", hdr->a3, " ");
++ acx_print_mac("adev->bssid=", adev->bssid, "\n");
++ }
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)
++ || !mac_is_equal(adev->bssid, hdr->a3)) {
++ result = OK;
++ goto end;
++ }
++
++ alg = ieee2host16(*(req->auth_alg));
++ seq = ieee2host16(*(req->auth_seq));
++ status = ieee2host16(*(req->status));
++
++ log(L_ASSOC, "auth algorithm %d, auth sequence %d, status %d\n", alg, seq, status);
++
++ ap = (adev->mode == ACX_MODE_3_AP);
++
++ if (adev->auth_alg <= 1) {
++ if (adev->auth_alg != alg) {
++ log(L_ASSOC, "auth algorithm mismatch: "
++ "our:%d peer:%d\n", adev->auth_alg, alg);
++ result = NOT_OK;
++ goto end;
++ }
++ }
++ if (ap) {
++ clt = acx_l_sta_list_get_or_add(adev, hdr->a2);
++ if (STA_LIST_ADD_CAN_FAIL && !clt) {
++ log(L_ASSOC, "could not allocate room for client\n");
++ result = NOT_OK;
++ goto end;
++ }
++ } else {
++ clt = adev->ap_client;
++ if (!mac_is_equal(clt->address, hdr->a2)) {
++ printk("%s: malformed auth frame from AP?!\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto end;
++ }
++ }
++
++ /* now check which step in the authentication sequence we are
++ * currently in, and act accordingly */
++ switch (seq) {
++ case 1:
++ if (!ap)
++ break;
++ acx_l_transmit_authen2(adev, req, clt);
++ break;
++ case 2:
++ if (ap)
++ break;
++ if (status == WLAN_MGMT_STATUS_SUCCESS) {
++ if (alg == WLAN_AUTH_ALG_OPENSYSTEM) {
++ acx_set_status(adev, ACX_STATUS_3_AUTHENTICATED);
++ acx_l_transmit_assoc_req(adev);
++ } else
++ if (alg == WLAN_AUTH_ALG_SHAREDKEY) {
++ acx_l_transmit_authen3(adev, req);
++ }
++ } else {
++ printk("%s: auth FAILED: peer sent "
++ "response code %d (%s), "
++ "still waiting for authentication\n",
++ adev->ndev->name,
++ status, get_status_string(status));
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ }
++ break;
++ case 3:
++ if (!ap)
++ break;
++ if ((clt->auth_alg != WLAN_AUTH_ALG_SHAREDKEY)
++ || (alg != WLAN_AUTH_ALG_SHAREDKEY)
++ || (clt->auth_step != 2))
++ break;
++ chal = req->challenge;
++ if (!chal
++ || memcmp(chal->challenge, clt->challenge_text, WLAN_CHALLENGE_LEN)
++ || (chal->eid != WLAN_EID_CHALLENGE)
++ || (chal->len != WLAN_CHALLENGE_LEN)
++ )
++ break;
++ acx_l_transmit_authen4(adev, req);
++ MAC_COPY(clt->address, hdr->a2);
++ clt->used = CLIENT_AUTHENTICATED_2;
++ clt->auth_step = 4;
++ clt->seq = ieee2host16(hdr->seq);
++ break;
++ case 4:
++ if (ap)
++ break;
++ /* ok, we're through: we're authenticated. Woohoo!! */
++ acx_set_status(adev, ACX_STATUS_3_AUTHENTICATED);
++ log(L_ASSOC, "Authenticated!\n");
++ /* now that we're authenticated, request association */
++ acx_l_transmit_assoc_req(adev);
++ break;
++ }
++ result = OK;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_gen_challenge
++*/
++static inline void
++acx_gen_challenge(wlan_ie_challenge_t* d)
++{
++ FN_ENTER;
++ d->eid = WLAN_EID_CHALLENGE;
++ d->len = WLAN_CHALLENGE_LEN;
++ get_random_bytes(d->challenge, WLAN_CHALLENGE_LEN);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_deauthen
++*/
++static int
++acx_l_transmit_deauthen(acx_device_t *adev, const u8 *addr, u16 reason)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct deauthen_frame_body *body;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = (WF_FTYPE_MGMTi | WF_FSTYPE_DEAUTHENi);
++ head->dur = 0;
++ MAC_COPY(head->da, addr);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ log(L_DEBUG|L_ASSOC|L_XFER,
++ "sending deauthen to "MACSTR" for %d\n",
++ MAC(addr), reason);
++
++ body->reason = host2ieee16(reason);
++
++ /* body is fixed size here, but beware of cutting-and-pasting this -
++ ** do not use sizeof(*body) for variable sized mgmt packets! */
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + sizeof(*body));
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen1
++*/
++static int
++acx_l_transmit_authen1(acx_device_t *adev)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "sending authentication1 request (auth algo %d), "
++ "awaiting response\n", adev->auth_alg);
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi;
++ /* duration should be 0 instead of 0x8000 to have
++ * the firmware calculate the value, right? */
++ head->dur = 0;
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ body->auth_alg = host2ieee16(adev->auth_alg);
++ body->auth_seq = host2ieee16(1);
++ body->status = host2ieee16(0);
++
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + 2 + 2 + 2);
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen2
++*/
++static int
++acx_l_transmit_authen2(acx_device_t *adev, const wlan_fr_authen_t *req,
++ client_t *clt)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++ unsigned int packet_len;
++
++ FN_ENTER;
++
++ if (!clt)
++ goto ok;
++
++ MAC_COPY(clt->address, req->hdr->a2);
++#ifdef UNUSED
++ clt->ps = ((WF_FC_PWRMGTi & req->hdr->fc) != 0);
++#endif
++ clt->auth_alg = ieee2host16(*(req->auth_alg));
++ clt->auth_step = 2;
++ clt->seq = ieee2host16(req->hdr->seq);
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi;
++ head->dur = 0 /* req->hdr->dur */;
++ MAC_COPY(head->da, req->hdr->a2);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, req->hdr->a3);
++ head->seq = 0 /* req->hdr->seq */;
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(2);
++ body->status = host2ieee16(0);
++
++ packet_len = WLAN_HDR_A3_LEN + 2 + 2 + 2;
++ if (ieee2host16(*(req->auth_alg)) == WLAN_AUTH_ALG_OPENSYSTEM) {
++ clt->used = CLIENT_AUTHENTICATED_2;
++ } else { /* shared key */
++ acx_gen_challenge(&body->challenge);
++ memcpy(&clt->challenge_text, body->challenge.challenge, WLAN_CHALLENGE_LEN);
++ packet_len += 2 + 2 + 2 + 1+1+WLAN_CHALLENGE_LEN;
++ }
++
++ acxlog_mac(L_ASSOC|L_XFER,
++ "transmit_auth2: BSSID=", head->bssid, "\n");
++
++ acx_l_tx_data(adev, tx, packet_len);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen3
++*/
++static int
++acx_l_transmit_authen3(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++ unsigned int packet_len;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ /* add WF_FC_ISWEPi: auth step 3 needs to be encrypted */
++ head->fc = WF_FC_ISWEPi + WF_FSTYPE_AUTHENi;
++ /* FIXME: is this needed?? authen4 does it...
++ * I think it's even wrong since we shouldn't re-use old
++ * values but instead let the firmware calculate proper ones
++ head->dur = req->hdr->dur;
++ head->seq = req->hdr->seq;
++ */
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(3);
++ body->status = host2ieee16(0);
++ memcpy(&body->challenge, req->challenge, req->challenge->len + 2);
++ packet_len = WLAN_HDR_A3_LEN + 8 + req->challenge->len;
++
++ log(L_ASSOC|L_XFER, "transmit_authen3!\n");
++
++ acx_l_tx_data(adev, tx, packet_len);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen4
++*/
++static int
++acx_l_transmit_authen4(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi; /* 0xb0 */
++ head->dur = 0 /* req->hdr->dur */;
++ MAC_COPY(head->da, req->hdr->a2);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, req->hdr->a3);
++ head->seq = 0 /* req->hdr->seq */;
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(4);
++ body->status = host2ieee16(0);
++
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + 2 + 2 + 2);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_assoc_req
++**
++** adev->ap_client is a current candidate AP here
++*/
++static int
++acx_l_transmit_assoc_req(acx_device_t *adev)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ u8 *body, *p, *prate;
++ unsigned int packet_len;
++ u16 cap;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "sending association request, "
++ "awaiting response. NOT ASSOCIATED YET\n");
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_ASSOCREQi;
++ head->dur = host2ieee16(0x8000);
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ p = body;
++ /* now start filling the AssocReq frame body */
++
++ /* since this assoc request will most likely only get
++ * sent in the STA to AP case (and not when Ad-Hoc IBSS),
++ * the cap combination indicated here will thus be
++ * WF_MGMT_CAP_ESSi *always* (no IBSS ever)
++ * The specs are more than non-obvious on all that:
++ *
++ * 802.11 7.3.1.4 Capability Information field
++ ** APs set the ESS subfield to 1 and the IBSS subfield to 0 within
++ ** Beacon or Probe Response management frames. STAs within an IBSS
++ ** set the ESS subfield to 0 and the IBSS subfield to 1 in transmitted
++ ** Beacon or Probe Response management frames
++ **
++ ** APs set the Privacy subfield to 1 within transmitted Beacon,
++ ** Probe Response, Association Response, and Reassociation Response
++ ** if WEP is required for all data type frames within the BSS.
++ ** STAs within an IBSS set the Privacy subfield to 1 in Beacon
++ ** or Probe Response management frames if WEP is required
++ ** for all data type frames within the IBSS */
++
++ /* note that returning 0 will be refused by several APs...
++ * (so this indicates that you're probably supposed to
++ * "confirm" the ESS mode) */
++ cap = WF_MGMT_CAP_ESSi;
++
++ /* this one used to be a check on wep_restricted,
++ * but more likely it's wep_enabled instead */
++ if (adev->wep_enabled)
++ SET_BIT(cap, WF_MGMT_CAP_PRIVACYi);
++
++ /* Probably we can just set these always, because our hw is
++ ** capable of shortpre and PBCC --vda */
++ /* only ask for short preamble if the peer station supports it */
++ if (adev->ap_client->cap_info & WF_MGMT_CAP_SHORT)
++ SET_BIT(cap, WF_MGMT_CAP_SHORTi);
++ /* only ask for PBCC support if the peer station supports it */
++ if (adev->ap_client->cap_info & WF_MGMT_CAP_PBCC)
++ SET_BIT(cap, WF_MGMT_CAP_PBCCi);
++
++ /* IEs: 1. caps */
++ *(u16*)p = cap; p += 2;
++ /* 2. listen interval */
++ *(u16*)p = host2ieee16(adev->listen_interval); p += 2;
++ /* 3. ESSID */
++ p = wlan_fill_ie_ssid(p,
++ strlen(adev->essid_for_assoc), adev->essid_for_assoc);
++ /* 4. supp rates */
++ prate = p;
++ p = wlan_fill_ie_rates(p,
++ adev->rate_supported_len, adev->rate_supported);
++ /* 5. ext supp rates */
++ p = wlan_fill_ie_rates_ext(p,
++ adev->rate_supported_len, adev->rate_supported);
++
++ if (acx_debug & L_DEBUG) {
++ printk("association: rates element\n");
++ acx_dump_bytes(prate, p - prate);
++ }
++
++ /* calculate lengths */
++ packet_len = WLAN_HDR_A3_LEN + (p - body);
++
++ log(L_ASSOC, "association: requesting caps 0x%04X, ESSID \"%s\"\n",
++ cap, adev->essid_for_assoc);
++
++ acx_l_tx_data(adev, tx, packet_len);
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_disassoc
++**
++** FIXME: looks like incomplete implementation of a helper:
++** acx_l_transmit_disassoc(adev, clt) - kick this client (we're an AP)
++** acx_l_transmit_disassoc(adev, NULL) - leave BSSID (we're a STA)
++*/
++#ifdef BROKEN
++int
++acx_l_transmit_disassoc(acx_device_t *adev, client_t *clt)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct disassoc_frame_body *body;
++
++ FN_ENTER;
++/* if (clt != NULL) { */
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++/* clt->used = CLIENT_AUTHENTICATED_2; - not (yet?) associated */
++
++ head->fc = WF_FSTYPE_DISASSOCi;
++ head->dur = 0;
++ /* huh? It muchly depends on whether we're STA or AP...
++ ** sta->ap: da=bssid, sa=own, bssid=bssid
++ ** ap->sta: da=sta, sa=bssid, bssid=bssid. FIXME! */
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->dev_addr);
++ head->seq = 0;
++
++ /* "Class 3 frame received from nonassociated station." */
++ body->reason = host2ieee16(7);
++
++ /* fixed size struct, ok to sizeof */
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + sizeof(*body));
++/* } */
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_complete_scan
++**
++** Called either from after_interrupt_task() if:
++** 1) there was Scan_Complete IRQ, or
++** 2) scanning expired in timer()
++** We need to decide which ESS or IBSS to join.
++** Iterates thru adev->sta_list:
++** if adev->ap is not bcast, will join only specified
++** ESS or IBSS with this bssid
++** checks peers' caps for ESS/IBSS bit
++** checks peers' SSID, allows exact match or hidden SSID
++** If station to join is chosen:
++** points adev->ap_client to the chosen struct client
++** sets adev->essid_for_assoc for future assoc attempt
++** Auth/assoc is not yet performed
++** Returns OK if there is no need to restart scan
++*/
++int
++acx_s_complete_scan(acx_device_t *adev)
++{
++ struct client *bss;
++ unsigned long flags;
++ u16 needed_cap;
++ int i;
++ int idx_found = -1;
++ int result = OK;
++
++ FN_ENTER;
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ needed_cap = WF_MGMT_CAP_IBSS; /* 2, we require Ad-Hoc */
++ break;
++ case ACX_MODE_2_STA:
++ needed_cap = WF_MGMT_CAP_ESS; /* 1, we require Managed */
++ break;
++ default:
++ printk("acx: driver bug: mode=%d in complete_scan()\n", adev->mode);
++ dump_stack();
++ goto end;
++ }
++
++ acx_lock(adev, flags);
++
++ /* TODO: sta_iterator hiding implementation would be nice here... */
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++
++
++ log(L_ASSOC, "scan table: SSID=\"%s\" CH=%d SIR=%d SNR=%d\n",
++ bss->essid, bss->channel, bss->sir, bss->snr);
++
++ if (!mac_is_bcast(adev->ap))
++ if (!mac_is_equal(bss->bssid, adev->ap))
++ continue; /* keep looking */
++
++ /* broken peer with no mode flags set? */
++ if (unlikely(!(bss->cap_info & (WF_MGMT_CAP_ESS | WF_MGMT_CAP_IBSS)))) {
++ printk("%s: strange peer "MACSTR" found with "
++ "neither ESS (AP) nor IBSS (Ad-Hoc) "
++ "capability - skipped\n",
++ adev->ndev->name, MAC(bss->address));
++ continue;
++ }
++ log(L_ASSOC, "peer_cap 0x%04X, needed_cap 0x%04X\n",
++ bss->cap_info, needed_cap);
++
++ /* does peer station support what we need? */
++ if ((bss->cap_info & needed_cap) != needed_cap)
++ continue; /* keep looking */
++
++ /* strange peer with NO basic rates?! */
++ if (unlikely(!bss->rate_bas)) {
++ printk("%s: strange peer "MACSTR" with empty rate set "
++ "- skipped\n",
++ adev->ndev->name, MAC(bss->address));
++ continue;
++ }
++
++ /* do we support all basic rates of this peer? */
++ if ((bss->rate_bas & adev->rate_oper) != bss->rate_bas) {
++/* we probably need to have all rates as operational rates,
++ even in case of an 11M-only configuration */
++#ifdef THIS_IS_TROUBLESOME
++ printk("%s: peer "MACSTR": incompatible basic rates "
++ "(AP requests 0x%04X, we have 0x%04X) "
++ "- skipped\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->rate_bas, adev->rate_oper);
++ continue;
++#else
++ printk("%s: peer "MACSTR": incompatible basic rates "
++ "(AP requests 0x%04X, we have 0x%04X). "
++ "Considering anyway...\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->rate_bas, adev->rate_oper);
++#endif
++ }
++
++ if ( !(adev->reg_dom_chanmask & (1<<(bss->channel-1))) ) {
++ printk("%s: warning: peer "MACSTR" is on channel %d "
++ "outside of channel range of current "
++ "regulatory domain - couldn't join "
++ "even if other settings match. "
++ "You might want to adapt your config\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->channel);
++ continue; /* keep looking */
++ }
++
++ if (!adev->essid_active || !strcmp(bss->essid, adev->essid)) {
++ log(L_ASSOC,
++ "found station with matching ESSID! ('%s' "
++ "station, '%s' config)\n",
++ bss->essid,
++ (adev->essid_active) ? adev->essid : "[any]");
++ /* TODO: continue looking for peer with better SNR */
++ bss->used = CLIENT_JOIN_CANDIDATE;
++ idx_found = i;
++
++ /* stop searching if this station is
++ * on the current channel, otherwise
++ * keep looking for an even better match */
++ if (bss->channel == adev->channel)
++ break;
++ } else
++ if (is_hidden_essid(bss->essid)) {
++ /* hmm, station with empty or single-space SSID:
++ * using hidden SSID broadcast?
++ */
++ /* This behaviour is broken: which AP from zillion
++ ** of APs with hidden SSID you'd try?
++ ** We should use Probe requests to get Probe responses
++ ** and check for real SSID (are those never hidden?) */
++ bss->used = CLIENT_JOIN_CANDIDATE;
++ if (idx_found == -1)
++ idx_found = i;
++ log(L_ASSOC, "found station with empty or "
++ "single-space (hidden) SSID, considering "
++ "for assoc attempt\n");
++ /* ...and keep looking for better matches */
++ } else {
++ log(L_ASSOC, "ESSID doesn't match! ('%s' "
++ "station, '%s' config)\n",
++ bss->essid,
++ (adev->essid_active) ? adev->essid : "[any]");
++ }
++ }
++
++ /* TODO: iterate thru join candidates instead */
++ /* TODO: rescan if not associated within some timeout */
++ if (idx_found != -1) {
++ char *essid_src;
++ size_t essid_len;
++
++ bss = &adev->sta_list[idx_found];
++ adev->ap_client = bss;
++
++ if (is_hidden_essid(bss->essid)) {
++ /* if the ESSID of the station we found is empty
++ * (no broadcast), then use user-configured ESSID
++ * instead */
++ essid_src = adev->essid;
++ essid_len = adev->essid_len;
++ } else {
++ essid_src = bss->essid;
++ essid_len = strlen(bss->essid);
++ }
++
++ acx_update_capabilities(adev);
++
++ memcpy(adev->essid_for_assoc, essid_src, essid_len);
++ adev->essid_for_assoc[essid_len] = '\0';
++ adev->channel = bss->channel;
++ MAC_COPY(adev->bssid, bss->bssid);
++
++ bss->rate_cfg = (bss->rate_cap & adev->rate_oper);
++ bss->rate_cur = 1 << lowest_bit(bss->rate_cfg);
++ bss->rate_100 = acx_rate111to100(bss->rate_cur);
++
++ acxlog_mac(L_ASSOC,
++ "matching station found: ", adev->bssid, ", joining\n");
++
++ /* TODO: do we need to switch to the peer's channel first? */
++
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ } else {
++ acx_l_transmit_authen1(adev);
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ }
++ } else { /* idx_found == -1 */
++ /* uh oh, no station found in range */
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ printk("%s: no matching station found in range, "
++ "generating our own IBSS instead\n",
++ adev->ndev->name);
++ /* we do it the HostAP way: */
++ MAC_COPY(adev->bssid, adev->dev_addr);
++ adev->bssid[0] |= 0x02; /* 'local assigned addr' bit */
++ /* add IBSS bit to our caps... */
++ acx_update_capabilities(adev);
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ /* In order to cmd_join be called below */
++ idx_found = 0;
++ } else {
++ /* we shall scan again, AP can be
++ ** just temporarily powered off */
++ log(L_ASSOC,
++ "no matching station found in range yet\n");
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ result = NOT_OK;
++ }
++ }
++
++ acx_unlock(adev, flags);
++
++ if (idx_found != -1) {
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ /* need to update channel in beacon template */
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ }
++ /* Inform firmware on our decision to start or join BSS */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ }
++
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_read_fw
++**
++** Loads a firmware image
++**
++** Returns:
++** 0 unable to load file
++** pointer to firmware success
++*/
++firmware_image_t*
++acx_s_read_fw(struct device *dev, const char *file, u32 *size)
++{
++ firmware_image_t *res;
++ const struct firmware *fw_entry;
++
++ res = NULL;
++ log(L_INIT, "requesting firmware image '%s'\n", file);
++ if (!request_firmware(&fw_entry, file, dev)) {
++ *size = 8;
++ if (fw_entry->size >= 8)
++ *size = 8 + le32_to_cpu(*(u32 *)(fw_entry->data + 4));
++ if (fw_entry->size != *size) {
++ printk("acx: firmware size does not match "
++ "firmware header: %d != %d, "
++ "aborting fw upload\n",
++ (int) fw_entry->size, (int) *size);
++ goto release_ret;
++ }
++ res = vmalloc(*size);
++ if (!res) {
++ printk("acx: no memory for firmware "
++ "(%u bytes)\n", *size);
++ goto release_ret;
++ }
++ memcpy(res, fw_entry->data, fw_entry->size);
++release_ret:
++ release_firmware(fw_entry);
++ return res;
++ }
++ printk("acx: firmware image '%s' was not provided. "
++ "Check your hotplug scripts\n", file);
++
++ /* checksum will be verified in write_fw, so don't bother here */
++ return res;
++}
++
++
++/***********************************************************************
++** acx_s_set_wepkey
++*/
++static void
++acx100_s_set_wepkey(acx_device_t *adev)
++{
++ ie_dot11WEPDefaultKey_t dk;
++ int i;
++
++ for (i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++) {
++ if (adev->wep_keys[i].size != 0) {
++ log(L_INIT, "setting WEP key: %d with "
++ "total size: %d\n", i, (int) adev->wep_keys[i].size);
++ dk.action = 1;
++ dk.keySize = adev->wep_keys[i].size;
++ dk.defaultKeyNum = i;
++ memcpy(dk.key, adev->wep_keys[i].key, dk.keySize);
++ acx_s_configure(adev, &dk, ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE);
++ }
++ }
++}
++
++static void
++acx111_s_set_wepkey(acx_device_t *adev)
++{
++ acx111WEPDefaultKey_t dk;
++ int i;
++
++ for (i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++) {
++ if (adev->wep_keys[i].size != 0) {
++ log(L_INIT, "setting WEP key: %d with "
++ "total size: %d\n", i, (int) adev->wep_keys[i].size);
++ memset(&dk, 0, sizeof(dk));
++ dk.action = cpu_to_le16(1); /* "add key"; yes, that's a 16bit value */
++ dk.keySize = adev->wep_keys[i].size;
++
++ /* are these two lines necessary? */
++ dk.type = 0; /* default WEP key */
++ dk.index = 0; /* ignored when setting default key */
++
++ dk.defaultKeyNum = i;
++ memcpy(dk.key, adev->wep_keys[i].key, dk.keySize);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WEP_MGMT, &dk, sizeof(dk));
++ }
++ }
++}
++
++static void
++acx_s_set_wepkey(acx_device_t *adev)
++{
++ if (IS_ACX111(adev))
++ acx111_s_set_wepkey(adev);
++ else
++ acx100_s_set_wepkey(adev);
++}
++
++
++/***********************************************************************
++** acx100_s_init_wep
++**
++** FIXME: this should probably be moved into the new card settings
++** management, but since we're also modifying the memory map layout here
++** due to the WEP key space we want, we should take care...
++*/
++static int
++acx100_s_init_wep(acx_device_t *adev)
++{
++ acx100_ie_wep_options_t options;
++ ie_dot11WEPDefaultKeyID_t dk;
++ acx_ie_memmap_t pt;
++ int res = NOT_OK;
++
++ FN_ENTER;
++
++ if (OK != acx_s_interrogate(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ log(L_DEBUG, "CodeEnd:%X\n", pt.CodeEnd);
++
++ pt.WEPCacheStart = cpu_to_le32(le32_to_cpu(pt.CodeEnd) + 0x4);
++ pt.WEPCacheEnd = cpu_to_le32(le32_to_cpu(pt.CodeEnd) + 0x4);
++
++ if (OK != acx_s_configure(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ /* let's choose maximum setting: 4 default keys, plus 10 other keys: */
++ options.NumKeys = cpu_to_le16(DOT11_MAX_DEFAULT_WEP_KEYS + 10);
++ options.WEPOption = 0x00;
++
++ log(L_ASSOC, "%s: writing WEP options\n", __func__);
++ acx_s_configure(adev, &options, ACX100_IE_WEP_OPTIONS);
++
++ acx100_s_set_wepkey(adev);
++
++ if (adev->wep_keys[adev->wep_current_index].size != 0) {
++ log(L_ASSOC, "setting active default WEP key number: %d\n",
++ adev->wep_current_index);
++ dk.KeyID = adev->wep_current_index;
++ acx_s_configure(adev, &dk, ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET); /* 0x1010 */
++ }
++ /* FIXME!!! wep_key_struct is filled nowhere! But adev
++ * is initialized to 0, and we don't REALLY need those keys either */
++/* for (i = 0; i < 10; i++) {
++ if (adev->wep_key_struct[i].len != 0) {
++ MAC_COPY(wep_mgmt.MacAddr, adev->wep_key_struct[i].addr);
++ wep_mgmt.KeySize = cpu_to_le16(adev->wep_key_struct[i].len);
++ memcpy(&wep_mgmt.Key, adev->wep_key_struct[i].key, le16_to_cpu(wep_mgmt.KeySize));
++ wep_mgmt.Action = cpu_to_le16(1);
++ log(L_ASSOC, "writing WEP key %d (len %d)\n", i, le16_to_cpu(wep_mgmt.KeySize));
++ if (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_WEP_MGMT, &wep_mgmt, sizeof(wep_mgmt))) {
++ adev->wep_key_struct[i].index = i;
++ }
++ }
++ }
++*/
++
++ /* now retrieve the updated WEPCacheEnd pointer... */
++ if (OK != acx_s_interrogate(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ printk("%s: ACX1xx_IE_MEMORY_MAP read #2 FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ /* ...and tell it to start allocating templates at that location */
++ /* (no endianness conversion needed) */
++ pt.PacketTemplateStart = pt.WEPCacheEnd;
++
++ if (OK != acx_s_configure(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ printk("%s: ACX1xx_IE_MEMORY_MAP write #2 FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ res = OK;
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++static int
++acx_s_init_max_template_generic(acx_device_t *adev, unsigned int len, unsigned int cmd)
++{
++ int res;
++ union {
++ acx_template_nullframe_t null;
++ acx_template_beacon_t b;
++ acx_template_tim_t tim;
++ acx_template_probereq_t preq;
++ acx_template_proberesp_t presp;
++ } templ;
++
++ memset(&templ, 0, len);
++ templ.null.size = cpu_to_le16(len - 2);
++ res = acx_s_issue_cmd(adev, cmd, &templ, len);
++ return res;
++}
++
++static inline int
++acx_s_init_max_null_data_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_nullframe_t), ACX1xx_CMD_CONFIG_NULL_DATA
++ );
++}
++
++static inline int
++acx_s_init_max_beacon_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_beacon_t), ACX1xx_CMD_CONFIG_BEACON
++ );
++}
++
++static inline int
++acx_s_init_max_tim_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_tim_t), ACX1xx_CMD_CONFIG_TIM
++ );
++}
++
++static inline int
++acx_s_init_max_probe_response_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_proberesp_t), ACX1xx_CMD_CONFIG_PROBE_RESPONSE
++ );
++}
++
++static inline int
++acx_s_init_max_probe_request_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_probereq_t), ACX1xx_CMD_CONFIG_PROBE_REQUEST
++ );
++}
++
++/***********************************************************************
++** acx_s_set_tim_template
++**
++** FIXME: In full blown driver we will regularly update partial virtual bitmap
++** by calling this function
++** (it can be done by irq handler on each DTIM irq or by timer...)
++
++[802.11 7.3.2.6] TIM information element:
++- 1 EID
++- 1 Length
++1 1 DTIM Count
++ indicates how many beacons (including this) appear before next DTIM
++ (0=this one is a DTIM)
++2 1 DTIM Period
++ number of beacons between successive DTIMs
++ (0=reserved, 1=all TIMs are DTIMs, 2=every other, etc)
++3 1 Bitmap Control
++ bit0: Traffic Indicator bit associated with Assoc ID 0 (Bcast AID?)
++ set to 1 in TIM elements with a value of 0 in the DTIM Count field
++ when one or more broadcast or multicast frames are buffered at the AP.
++ bit1-7: Bitmap Offset (logically Bitmap_Offset = Bitmap_Control & 0xFE).
++4 n Partial Virtual Bitmap
++ Visible part of traffic-indication bitmap.
++ Full bitmap consists of 2008 bits (251 octets) such that bit number N
++ (0<=N<=2007) in the bitmap corresponds to bit number (N mod 8)
++ in octet number N/8 where the low-order bit of each octet is bit0,
++ and the high order bit is bit7.
++ Each set bit in virtual bitmap corresponds to traffic buffered by AP
++ for a specific station (with corresponding AID?).
++ Partial Virtual Bitmap shows a part of bitmap which has non-zero.
++ Bitmap Offset is a number of skipped zero octets (see above).
++ 'Missing' octets at the tail are also assumed to be zero.
++ Example: Length=6, Bitmap_Offset=2, Partial_Virtual_Bitmap=55 55 55
++ This means that traffic-indication bitmap is:
++ 00000000 00000000 01010101 01010101 01010101 00000000 00000000...
++ (is bit0 in the map is always 0 and real value is in Bitmap Control bit0?)
++*/
++static int
++acx_s_set_tim_template(acx_device_t *adev)
++{
++/* For now, configure smallish test bitmap, all zero ("no pending data") */
++ enum { bitmap_size = 5 };
++
++ acx_template_tim_t t;
++ int result;
++
++ FN_ENTER;
++
++ memset(&t, 0, sizeof(t));
++ t.size = 5 + bitmap_size; /* eid+len+count+period+bmap_ctrl + bmap */
++ t.tim_eid = WLAN_EID_TIM;
++ t.len = 3 + bitmap_size; /* count+period+bmap_ctrl + bmap */
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_TIM, &t, sizeof(t));
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_fill_beacon_or_proberesp_template
++**
++** For frame format info, please see 802.11-1999.pdf item 7.2.3.9 and below!!
++**
++** NB: we use the fact that
++** struct acx_template_proberesp and struct acx_template_beacon are the same
++** (well, almost...)
++**
++** [802.11] Beacon's body consist of these IEs:
++** 1 Timestamp
++** 2 Beacon interval
++** 3 Capability information
++** 4 SSID
++** 5 Supported rates (up to 8 rates)
++** 6 FH Parameter Set (frequency-hopping PHYs only)
++** 7 DS Parameter Set (direct sequence PHYs only)
++** 8 CF Parameter Set (only if PCF is supported)
++** 9 IBSS Parameter Set (ad-hoc only)
++**
++** Beacon only:
++** 10 TIM (AP only) (see 802.11 7.3.2.6)
++** 11 Country Information (802.11d)
++** 12 FH Parameters (802.11d)
++** 13 FH Pattern Table (802.11d)
++** ... (?!! did not yet find relevant PDF file... --vda)
++** 19 ERP Information (extended rate PHYs)
++** 20 Extended Supported Rates (if more than 8 rates)
++**
++** Proberesp only:
++** 10 Country information (802.11d)
++** 11 FH Parameters (802.11d)
++** 12 FH Pattern Table (802.11d)
++** 13-n Requested information elements (802.11d)
++** ????
++** 18 ERP Information (extended rate PHYs)
++** 19 Extended Supported Rates (if more than 8 rates)
++*/
++static int
++acx_fill_beacon_or_proberesp_template(acx_device_t *adev,
++ struct acx_template_beacon *templ,
++ u16 fc /* in host order! */)
++{
++ int len;
++ u8 *p;
++
++ FN_ENTER;
++
++ memset(templ, 0, sizeof(*templ));
++ MAC_BCAST(templ->da);
++ MAC_COPY(templ->sa, adev->dev_addr);
++ MAC_COPY(templ->bssid, adev->bssid);
++
++ templ->beacon_interval = cpu_to_le16(adev->beacon_interval);
++ acx_update_capabilities(adev);
++ templ->cap = cpu_to_le16(adev->capabilities);
++
++ p = templ->variable;
++ p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
++ p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
++ p = wlan_fill_ie_ds_parms(p, adev->channel);
++ /* NB: should go AFTER tim, but acx seem to keep tim last always */
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ /* ATIM window */
++ p = wlan_fill_ie_ibss_parms(p, 0); break;
++ case ACX_MODE_3_AP:
++ /* TIM IE is set up as separate template */
++ break;
++ }
++
++ len = p - (u8*)templ;
++ templ->fc = cpu_to_le16(WF_FTYPE_MGMT | fc);
++ /* - 2: do not count 'u16 size' field */
++ templ->size = cpu_to_le16(len - 2);
++
++ FN_EXIT1(len);
++ return len;
++}
++
++
++#if POWER_SAVE_80211
++/***********************************************************************
++** acx_s_set_null_data_template
++*/
++static int
++acx_s_set_null_data_template(acx_device_t *adev)
++{
++ struct acx_template_nullframe b;
++ int result;
++
++ FN_ENTER;
++
++ /* memset(&b, 0, sizeof(b)); not needed, setting all members */
++
++ b.size = cpu_to_le16(sizeof(b) - 2);
++ b.hdr.fc = WF_FTYPE_MGMTi | WF_FSTYPE_NULLi;
++ b.hdr.dur = 0;
++ MAC_BCAST(b.hdr.a1);
++ MAC_COPY(b.hdr.a2, adev->dev_addr);
++ MAC_COPY(b.hdr.a3, adev->bssid);
++ b.hdr.seq = 0;
++
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_NULL_DATA, &b, sizeof(b));
++
++ FN_EXIT1(result);
++ return result;
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_set_beacon_template
++*/
++static int
++acx_s_set_beacon_template(acx_device_t *adev)
++{
++ struct acx_template_beacon bcn;
++ int len, result;
++
++ FN_ENTER;
++
++ len = acx_fill_beacon_or_proberesp_template(adev, &bcn, WF_FSTYPE_BEACON);
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_BEACON, &bcn, len);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_set_probe_response_template
++*/
++static int
++acx_s_set_probe_response_template(acx_device_t *adev)
++{
++ struct acx_template_proberesp pr;
++ int len, result;
++
++ FN_ENTER;
++
++ len = acx_fill_beacon_or_proberesp_template(adev, &pr, WF_FSTYPE_PROBERESP);
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_PROBE_RESPONSE, &pr, len);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_init_packet_templates()
++**
++** NOTE: order is very important here, to have a correct memory layout!
++** init templates: max Probe Request (station mode), max NULL data,
++** max Beacon, max TIM, max Probe Response.
++*/
++static int
++acx_s_init_packet_templates(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm; /* ACX100 only */
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ log(L_DEBUG|L_INIT, "initializing max packet templates\n");
++
++ if (OK != acx_s_init_max_probe_request_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_null_data_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_beacon_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_tim_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_probe_response_template(adev))
++ goto failed;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 doesn't need the memory map magic below,
++ * and the other templates will be set later (acx_start) */
++ result = OK;
++ goto success;
++ }
++
++ /* ACX100 will have its TIM template set,
++ * and we also need to update the memory map */
++
++ if (OK != acx_s_set_tim_template(adev))
++ goto failed_acx100;
++
++ log(L_DEBUG, "sizeof(memmap)=%d bytes\n", (int)sizeof(mm));
++
++ if (OK != acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP))
++ goto failed_acx100;
++
++ mm.QueueStart = cpu_to_le32(le32_to_cpu(mm.PacketTemplateEnd) + 4);
++ if (OK != acx_s_configure(adev, &mm, ACX1xx_IE_MEMORY_MAP))
++ goto failed_acx100;
++
++ result = OK;
++ goto success;
++
++failed_acx100:
++ log(L_DEBUG|L_INIT,
++ /* "cb=0x%X\n" */
++ "ACXMemoryMap:\n"
++ ".CodeStart=0x%X\n"
++ ".CodeEnd=0x%X\n"
++ ".WEPCacheStart=0x%X\n"
++ ".WEPCacheEnd=0x%X\n"
++ ".PacketTemplateStart=0x%X\n"
++ ".PacketTemplateEnd=0x%X\n",
++ /* len, */
++ le32_to_cpu(mm.CodeStart),
++ le32_to_cpu(mm.CodeEnd),
++ le32_to_cpu(mm.WEPCacheStart),
++ le32_to_cpu(mm.WEPCacheEnd),
++ le32_to_cpu(mm.PacketTemplateStart),
++ le32_to_cpu(mm.PacketTemplateEnd));
++
++failed:
++ printk("%s: %s() FAILED\n", adev->ndev->name, __func__);
++
++success:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_set_probe_request_template(acx_device_t *adev)
++{
++ struct acx_template_probereq probereq;
++ char *p;
++ int res;
++ int frame_len;
++
++ FN_ENTER;
++
++ memset(&probereq, 0, sizeof(probereq));
++
++ probereq.fc = WF_FTYPE_MGMTi | WF_FSTYPE_PROBEREQi;
++ MAC_BCAST(probereq.da);
++ MAC_COPY(probereq.sa, adev->dev_addr);
++ MAC_BCAST(probereq.bssid);
++
++ p = probereq.variable;
++ p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
++ p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
++ frame_len = p - (char*)&probereq;
++ probereq.size = cpu_to_le16(frame_len - 2);
++
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_PROBE_REQUEST, &probereq, frame_len);
++ FN_EXIT0;
++ return res;
++}
++
++
++/***********************************************************************
++** acx_s_init_mac
++*/
++int
++acx_s_init_mac(acx_device_t *adev)
++{
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ if (IS_ACX111(adev)) {
++ adev->ie_len = acx111_ie_len;
++ adev->ie_len_dot11 = acx111_ie_len_dot11;
++ } else {
++ adev->ie_len = acx100_ie_len;
++ adev->ie_len_dot11 = acx100_ie_len_dot11;
++ }
++
++#if defined (ACX_MEM)
++ adev->memblocksize = 256; /* 256 is default */
++ /* try to load radio for both ACX100 and ACX111, since both
++ * chips have at least some firmware versions making use of an
++ * external radio module */
++ acxmem_s_upload_radio(adev);
++#else
++ if (IS_PCI(adev)) {
++ adev->memblocksize = 256; /* 256 is default */
++ /* try to load radio for both ACX100 and ACX111, since both
++ * chips have at least some firmware versions making use of an
++ * external radio module */
++ acxpci_s_upload_radio(adev);
++ } else {
++ adev->memblocksize = 128;
++ }
++#endif
++
++ if (IS_ACX111(adev)) {
++ /* for ACX111, the order is different from ACX100
++ 1. init packet templates
++ 2. create station context and create dma regions
++ 3. init wep default keys
++ */
++ if (OK != acx_s_init_packet_templates(adev))
++ goto fail;
++ if (OK != acx111_s_create_dma_regions(adev)) {
++ printk("%s: acx111_create_dma_regions FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ } else {
++ if (OK != acx100_s_init_wep(adev))
++ goto fail;
++ if (OK != acx_s_init_packet_templates(adev))
++ goto fail;
++ if (OK != acx100_s_create_dma_regions(adev)) {
++ printk("%s: acx100_create_dma_regions FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ }
++
++ MAC_COPY(adev->ndev->dev_addr, adev->dev_addr);
++ result = OK;
++
++fail:
++ if (result)
++ printk("acx: init_mac() FAILED\n");
++ FN_EXIT1(result);
++ return result;
++}
++
++
++void
++acx_s_set_sane_reg_domain(acx_device_t *adev, int do_set)
++{
++ unsigned mask;
++
++ unsigned int i;
++
++ for (i = 0; i < sizeof(acx_reg_domain_ids); i++)
++ if (acx_reg_domain_ids[i] == adev->reg_dom_id)
++ break;
++
++ if (sizeof(acx_reg_domain_ids) == i) {
++ log(L_INIT, "Invalid or unsupported regulatory domain"
++ " 0x%02X specified, falling back to FCC (USA)!"
++ " Please report if this sounds fishy!\n",
++ adev->reg_dom_id);
++ i = 0;
++ adev->reg_dom_id = acx_reg_domain_ids[i];
++
++ /* since there was a mismatch, we need to force updating */
++ do_set = 1;
++ }
++
++ if (do_set) {
++ acx_ie_generic_t dom;
++ dom.m.bytes[0] = adev->reg_dom_id;
++ acx_s_configure(adev, &dom, ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN);
++ }
++
++ adev->reg_dom_chanmask = reg_domain_channel_masks[i];
++
++ mask = (1 << (adev->channel - 1));
++ if (!(adev->reg_dom_chanmask & mask)) {
++ /* hmm, need to adjust our channel to reside within domain */
++ mask = 1;
++ for (i = 1; i <= 14; i++) {
++ if (adev->reg_dom_chanmask & mask) {
++ printk("%s: adjusting selected channel from %d "
++ "to %d due to new regulatory domain\n",
++ adev->ndev->name, adev->channel, i);
++ adev->channel = i;
++ break;
++ }
++ mask <<= 1;
++ }
++ }
++}
++
++
++#if POWER_SAVE_80211
++static void
++acx_s_update_80211_powersave_mode(acx_device_t *adev)
++{
++ /* merge both structs in a union to be able to have common code */
++ union {
++ acx111_ie_powersave_t acx111;
++ acx100_ie_powersave_t acx100;
++ } pm;
++
++ /* change 802.11 power save mode settings */
++ log(L_INIT, "updating 802.11 power save mode settings: "
++ "wakeup_cfg 0x%02X, listen interval %u, "
++ "options 0x%02X, hangover period %u, "
++ "enhanced_ps_transition_time %u\n",
++ adev->ps_wakeup_cfg, adev->ps_listen_interval,
++ adev->ps_options, adev->ps_hangover_period,
++ adev->ps_enhanced_transition_time);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "Previous PS mode settings: wakeup_cfg 0x%02X, "
++ "listen interval %u, options 0x%02X, "
++ "hangover period %u, "
++ "enhanced_ps_transition_time %u, beacon_rx_time %u\n",
++ pm.acx111.wakeup_cfg,
++ pm.acx111.listen_interval,
++ pm.acx111.options,
++ pm.acx111.hangover_period,
++ IS_ACX111(adev) ?
++ pm.acx111.enhanced_ps_transition_time
++ : pm.acx100.enhanced_ps_transition_time,
++ IS_ACX111(adev) ?
++ pm.acx111.beacon_rx_time
++ : (u32)-1
++ );
++ pm.acx111.wakeup_cfg = adev->ps_wakeup_cfg;
++ pm.acx111.listen_interval = adev->ps_listen_interval;
++ pm.acx111.options = adev->ps_options;
++ pm.acx111.hangover_period = adev->ps_hangover_period;
++ if (IS_ACX111(adev)) {
++ pm.acx111.beacon_rx_time = cpu_to_le32(adev->ps_beacon_rx_time);
++ pm.acx111.enhanced_ps_transition_time = cpu_to_le32(adev->ps_enhanced_transition_time);
++ } else {
++ pm.acx100.enhanced_ps_transition_time = cpu_to_le16(adev->ps_enhanced_transition_time);
++ }
++ acx_s_configure(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "wakeup_cfg: 0x%02X\n", pm.acx111.wakeup_cfg);
++ acx_s_msleep(40);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "wakeup_cfg: 0x%02X\n", pm.acx111.wakeup_cfg);
++ log(L_INIT, "power save mode change %s\n",
++ (pm.acx111.wakeup_cfg & PS_CFG_PENDING) ? "FAILED" : "was successful");
++ /* FIXME: maybe verify via PS_CFG_PENDING bit here
++ * that power save mode change was successful. */
++ /* FIXME: we shouldn't trigger a scan immediately after
++ * fiddling with power save mode (since the firmware is sending
++ * a NULL frame then). */
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_update_card_settings
++**
++** Applies accumulated changes in various adev->xxxx members
++** Called by ioctl commit handler, acx_start, acx_set_defaults,
++** acx_s_after_interrupt_task (if IRQ_CMD_UPDATE_CARD_CFG),
++*/
++static void
++acx111_s_sens_radio_16_17(acx_device_t *adev)
++{
++ u32 feature1, feature2;
++
++ if ((adev->sensitivity < 1) || (adev->sensitivity > 3)) {
++ printk("%s: invalid sensitivity setting (1..3), "
++ "setting to 1\n", adev->ndev->name);
++ adev->sensitivity = 1;
++ }
++ acx111_s_get_feature_config(adev, &feature1, &feature2);
++ CLEAR_BIT(feature1, FEATURE1_LOW_RX|FEATURE1_EXTRA_LOW_RX);
++ if (adev->sensitivity > 1)
++ SET_BIT(feature1, FEATURE1_LOW_RX);
++ if (adev->sensitivity > 2)
++ SET_BIT(feature1, FEATURE1_EXTRA_LOW_RX);
++ acx111_s_feature_set(adev, feature1, feature2);
++}
++
++
++void
++acx_s_update_card_settings(acx_device_t *adev)
++{
++ unsigned long flags;
++ unsigned int start_scan = 0;
++ int i;
++
++ FN_ENTER;
++
++ log(L_INIT, "get_mask 0x%08X, set_mask 0x%08X\n",
++ adev->get_mask, adev->set_mask);
++
++ /* Track dependencies betweed various settings */
++
++ if (adev->set_mask & (GETSET_MODE|GETSET_RESCAN|GETSET_WEP)) {
++ log(L_INIT, "important setting has been changed. "
++ "Need to update packet templates, too\n");
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ if (adev->set_mask & GETSET_CHANNEL) {
++ /* This will actually tune RX/TX to the channel */
++ SET_BIT(adev->set_mask, GETSET_RX|GETSET_TX);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ /* Beacons contain channel# - update them */
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ start_scan = 1;
++ }
++ }
++
++ /* Apply settings */
++
++#ifdef WHY_SHOULD_WE_BOTHER /* imagine we were just powered off */
++ /* send a disassoc request in case it's required */
++ if (adev->set_mask & (GETSET_MODE|GETSET_RESCAN|GETSET_CHANNEL|GETSET_WEP)) {
++ if (ACX_MODE_2_STA == adev->mode) {
++ if (ACX_STATUS_4_ASSOCIATED == adev->status) {
++ log(L_ASSOC, "we were ASSOCIATED - "
++ "sending disassoc request\n");
++ acx_lock(adev, flags);
++ acx_l_transmit_disassoc(adev, NULL);
++ /* FIXME: deauth? */
++ acx_unlock(adev, flags);
++ }
++ /* need to reset some other stuff as well */
++ log(L_DEBUG, "resetting bssid\n");
++ MAC_ZERO(adev->bssid);
++ SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST);
++ start_scan = 1;
++ }
++ }
++#endif
++
++ if (adev->get_mask & GETSET_STATION_ID) {
++ u8 stationID[4 + ACX1xx_IE_DOT11_STATION_ID_LEN];
++ const u8 *paddr;
++
++ acx_s_interrogate(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
++ paddr = &stationID[4];
++ for (i = 0; i < ETH_ALEN; i++) {
++ /* we copy the MAC address (reversed in
++ * the card) to the netdevice's MAC
++ * address, and on ifup it will be
++ * copied into iwadev->dev_addr */
++ adev->ndev->dev_addr[ETH_ALEN - 1 - i] = paddr[i];
++ }
++ CLEAR_BIT(adev->get_mask, GETSET_STATION_ID);
++ }
++
++ if (adev->get_mask & GETSET_SENSITIVITY) {
++ if ((RADIO_RFMD_11 == adev->radio_type)
++ || (RADIO_MAXIM_0D == adev->radio_type)
++ || (RADIO_RALINK_15 == adev->radio_type)) {
++ acx_s_read_phy_reg(adev, 0x30, &adev->sensitivity);
++ } else {
++ log(L_INIT, "don't know how to get sensitivity "
++ "for radio type 0x%02X\n", adev->radio_type);
++ adev->sensitivity = 0;
++ }
++ log(L_INIT, "got sensitivity value %u\n", adev->sensitivity);
++
++ CLEAR_BIT(adev->get_mask, GETSET_SENSITIVITY);
++ }
++
++ if (adev->get_mask & GETSET_ANTENNA) {
++ u8 antenna[4 + ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN];
++
++ memset(antenna, 0, sizeof(antenna));
++ acx_s_interrogate(adev, antenna, ACX1xx_IE_DOT11_CURRENT_ANTENNA);
++ adev->antenna = antenna[4];
++ log(L_INIT, "got antenna value 0x%02X\n", adev->antenna);
++ CLEAR_BIT(adev->get_mask, GETSET_ANTENNA);
++ }
++
++ if (adev->get_mask & GETSET_ED_THRESH) {
++ if (IS_ACX100(adev)) {
++ u8 ed_threshold[4 + ACX100_IE_DOT11_ED_THRESHOLD_LEN];
++
++ memset(ed_threshold, 0, sizeof(ed_threshold));
++ acx_s_interrogate(adev, ed_threshold, ACX100_IE_DOT11_ED_THRESHOLD);
++ adev->ed_threshold = ed_threshold[4];
++ } else {
++ log(L_INIT, "acx111 doesn't support ED\n");
++ adev->ed_threshold = 0;
++ }
++ log(L_INIT, "got Energy Detect (ED) threshold %u\n", adev->ed_threshold);
++ CLEAR_BIT(adev->get_mask, GETSET_ED_THRESH);
++ }
++
++ if (adev->get_mask & GETSET_CCA) {
++ if (IS_ACX100(adev)) {
++ u8 cca[4 + ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN];
++
++ memset(cca, 0, sizeof(adev->cca));
++ acx_s_interrogate(adev, cca, ACX1xx_IE_DOT11_CURRENT_CCA_MODE);
++ adev->cca = cca[4];
++ } else {
++ log(L_INIT, "acx111 doesn't support CCA\n");
++ adev->cca = 0;
++ }
++ log(L_INIT, "got Channel Clear Assessment (CCA) value %u\n", adev->cca);
++ CLEAR_BIT(adev->get_mask, GETSET_CCA);
++ }
++
++ if (adev->get_mask & GETSET_REG_DOMAIN) {
++ acx_ie_generic_t dom;
++
++ acx_s_interrogate(adev, &dom, ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN);
++ adev->reg_dom_id = dom.m.bytes[0];
++ acx_s_set_sane_reg_domain(adev, 0);
++ log(L_INIT, "got regulatory domain 0x%02X\n", adev->reg_dom_id);
++ CLEAR_BIT(adev->get_mask, GETSET_REG_DOMAIN);
++ }
++
++ if (adev->set_mask & GETSET_STATION_ID) {
++ u8 stationID[4 + ACX1xx_IE_DOT11_STATION_ID_LEN];
++ u8 *paddr;
++
++ paddr = &stationID[4];
++ memcpy(adev->dev_addr, adev->ndev->dev_addr, ETH_ALEN);
++ for (i = 0; i < ETH_ALEN; i++) {
++ /* copy the MAC address we obtained when we noticed
++ * that the ethernet iface's MAC changed
++ * to the card (reversed in
++ * the card!) */
++ paddr[i] = adev->dev_addr[ETH_ALEN - 1 - i];
++ }
++ acx_s_configure(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
++ CLEAR_BIT(adev->set_mask, GETSET_STATION_ID);
++ }
++
++ if (adev->set_mask & SET_TEMPLATES) {
++ log(L_INIT, "updating packet templates\n");
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ acx_s_set_probe_request_template(adev);
++#if POWER_SAVE_80211
++ acx_s_set_null_data_template(adev);
++#endif
++ break;
++ case ACX_MODE_0_ADHOC:
++ acx_s_set_probe_request_template(adev);
++#if POWER_SAVE_80211
++ /* maybe power save functionality is somehow possible
++ * for Ad-Hoc mode, too... FIXME: verify it somehow? firmware debug fields? */
++ acx_s_set_null_data_template(adev);
++#endif
++ /* fall through */
++ case ACX_MODE_3_AP:
++ acx_s_set_beacon_template(adev);
++ acx_s_set_tim_template(adev);
++ /* BTW acx111 firmware would not send probe responses
++ ** if probe request does not have all basic rates flagged
++ ** by 0x80! Thus firmware does not conform to 802.11,
++ ** it should ignore 0x80 bit in ratevector from STA.
++ ** We can 'fix' it by not using this template and
++ ** sending probe responses by hand. TODO --vda */
++ acx_s_set_probe_response_template(adev);
++ }
++ /* Needed if generated frames are to be emitted at different tx rate now */
++ log(L_IRQ, "redoing cmd_join_bssid() after template cfg\n");
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ CLEAR_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ if (adev->set_mask & SET_STA_LIST) {
++ acx_lock(adev, flags);
++ acx_l_sta_list_init(adev);
++ CLEAR_BIT(adev->set_mask, SET_STA_LIST);
++ acx_unlock(adev, flags);
++ }
++ if (adev->set_mask & SET_RATE_FALLBACK) {
++ u8 rate[4 + ACX1xx_IE_RATE_FALLBACK_LEN];
++
++ /* configure to not do fallbacks when not in auto rate mode */
++ rate[4] = (adev->rate_auto) ? /* adev->txrate_fallback_retries */ 1 : 0;
++ log(L_INIT, "updating Tx fallback to %u retries\n", rate[4]);
++ acx_s_configure(adev, &rate, ACX1xx_IE_RATE_FALLBACK);
++ CLEAR_BIT(adev->set_mask, SET_RATE_FALLBACK);
++ }
++ if (adev->set_mask & GETSET_TXPOWER) {
++ log(L_INIT, "updating transmit power: %u dBm\n",
++ adev->tx_level_dbm);
++ acx_s_set_tx_level(adev, adev->tx_level_dbm);
++ CLEAR_BIT(adev->set_mask, GETSET_TXPOWER);
++ }
++
++ if (adev->set_mask & GETSET_SENSITIVITY) {
++ log(L_INIT, "updating sensitivity value: %u\n",
++ adev->sensitivity);
++ switch (adev->radio_type) {
++ case RADIO_RFMD_11:
++ case RADIO_MAXIM_0D:
++ case RADIO_RALINK_15:
++ acx_s_write_phy_reg(adev, 0x30, adev->sensitivity);
++ break;
++ case RADIO_RADIA_16:
++ case RADIO_UNKNOWN_17:
++ acx111_s_sens_radio_16_17(adev);
++ break;
++ default:
++ log(L_INIT, "don't know how to modify sensitivity "
++ "for radio type 0x%02X\n", adev->radio_type);
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_SENSITIVITY);
++ }
++
++ if (adev->set_mask & GETSET_ANTENNA) {
++ /* antenna */
++ u8 antenna[4 + ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN];
++
++ memset(antenna, 0, sizeof(antenna));
++ antenna[4] = adev->antenna;
++ log(L_INIT, "updating antenna value: 0x%02X\n",
++ adev->antenna);
++ acx_s_configure(adev, &antenna, ACX1xx_IE_DOT11_CURRENT_ANTENNA);
++ CLEAR_BIT(adev->set_mask, GETSET_ANTENNA);
++ }
++
++ if (adev->set_mask & GETSET_ED_THRESH) {
++ /* ed_threshold */
++ log(L_INIT, "updating Energy Detect (ED) threshold: %u\n",
++ adev->ed_threshold);
++ if (IS_ACX100(adev)) {
++ u8 ed_threshold[4 + ACX100_IE_DOT11_ED_THRESHOLD_LEN];
++
++ memset(ed_threshold, 0, sizeof(ed_threshold));
++ ed_threshold[4] = adev->ed_threshold;
++ acx_s_configure(adev, &ed_threshold, ACX100_IE_DOT11_ED_THRESHOLD);
++ }
++ else
++ log(L_INIT, "acx111 doesn't support ED!\n");
++ CLEAR_BIT(adev->set_mask, GETSET_ED_THRESH);
++ }
++
++ if (adev->set_mask & GETSET_CCA) {
++ /* CCA value */
++ log(L_INIT, "updating Channel Clear Assessment "
++ "(CCA) value: 0x%02X\n", adev->cca);
++ if (IS_ACX100(adev)) {
++ u8 cca[4 + ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN];
++
++ memset(cca, 0, sizeof(cca));
++ cca[4] = adev->cca;
++ acx_s_configure(adev, &cca, ACX1xx_IE_DOT11_CURRENT_CCA_MODE);
++ }
++ else
++ log(L_INIT, "acx111 doesn't support CCA!\n");
++ CLEAR_BIT(adev->set_mask, GETSET_CCA);
++ }
++
++ if (adev->set_mask & GETSET_LED_POWER) {
++ /* Enable Tx */
++ log(L_INIT, "updating power LED status: %u\n", adev->led_power);
++
++ acx_lock(adev, flags);
++#if defined (ACX_MEM)
++ acxmem_l_power_led(adev, adev->led_power);
++#else
++ if (IS_PCI(adev))
++ acxpci_l_power_led(adev, adev->led_power);
++#endif
++ CLEAR_BIT(adev->set_mask, GETSET_LED_POWER);
++ acx_unlock(adev, flags);
++ }
++
++ if (adev->set_mask & GETSET_POWER_80211) {
++#if POWER_SAVE_80211
++ acx_s_update_80211_powersave_mode(adev);
++#endif
++ CLEAR_BIT(adev->set_mask, GETSET_POWER_80211);
++ }
++
++ if (adev->set_mask & GETSET_CHANNEL) {
++ /* channel */
++ log(L_INIT, "updating channel to: %u\n", adev->channel);
++ CLEAR_BIT(adev->set_mask, GETSET_CHANNEL);
++ }
++
++ if (adev->set_mask & GETSET_TX) {
++ /* set Tx */
++ log(L_INIT, "updating: %s Tx\n",
++ adev->tx_disabled ? "disable" : "enable");
++ if (adev->tx_disabled)
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ else
++ acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_TX, &adev->channel, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_TX);
++ }
++
++ if (adev->set_mask & GETSET_RX) {
++ /* Enable Rx */
++ log(L_INIT, "updating: enable Rx on channel: %u\n",
++ adev->channel);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_RX, &adev->channel, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_RX);
++ }
++
++ if (adev->set_mask & GETSET_RETRY) {
++ u8 short_retry[4 + ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN];
++ u8 long_retry[4 + ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN];
++
++ log(L_INIT, "updating short retry limit: %u, long retry limit: %u\n",
++ adev->short_retry, adev->long_retry);
++ short_retry[0x4] = adev->short_retry;
++ long_retry[0x4] = adev->long_retry;
++ acx_s_configure(adev, &short_retry, ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT);
++ acx_s_configure(adev, &long_retry, ACX1xx_IE_DOT11_LONG_RETRY_LIMIT);
++ CLEAR_BIT(adev->set_mask, GETSET_RETRY);
++ }
++
++ if (adev->set_mask & SET_MSDU_LIFETIME) {
++ u8 xmt_msdu_lifetime[4 + ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN];
++
++ log(L_INIT, "updating tx MSDU lifetime: %u\n",
++ adev->msdu_lifetime);
++ *(u32 *)&xmt_msdu_lifetime[4] = cpu_to_le32((u32)adev->msdu_lifetime);
++ acx_s_configure(adev, &xmt_msdu_lifetime, ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME);
++ CLEAR_BIT(adev->set_mask, SET_MSDU_LIFETIME);
++ }
++
++ if (adev->set_mask & GETSET_REG_DOMAIN) {
++ log(L_INIT, "updating regulatory domain: 0x%02X\n",
++ adev->reg_dom_id);
++ acx_s_set_sane_reg_domain(adev, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_REG_DOMAIN);
++ }
++
++ if (adev->set_mask & GETSET_MODE) {
++ adev->ndev->type = (adev->mode == ACX_MODE_MONITOR) ?
++ adev->monitor_type : ARPHRD_ETHER;
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++
++ acx_lock(adev, flags);
++ acx_l_sta_list_init(adev);
++ adev->aid = 0;
++ adev->ap_client = NULL;
++ MAC_COPY(adev->bssid, adev->dev_addr);
++ /* this basically says "we're connected" */
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ acx_unlock(adev, flags);
++
++ acx111_s_feature_off(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++ /* start sending beacons */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ break;
++ case ACX_MODE_MONITOR:
++ acx111_s_feature_on(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++ /* this stops beacons */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ /* this basically says "we're connected" */
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ SET_BIT(adev->set_mask, SET_RXCONFIG|SET_WEP_OPTIONS);
++ break;
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ acx111_s_feature_off(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++
++ acx_lock(adev, flags);
++ adev->aid = 0;
++ adev->ap_client = NULL;
++ acx_unlock(adev, flags);
++
++ /* we want to start looking for peer or AP */
++ start_scan = 1;
++ break;
++ case ACX_MODE_OFF:
++ /* TODO: disable RX/TX, stop any scanning activity etc: */
++ /* adev->tx_disabled = 1; */
++ /* SET_BIT(adev->set_mask, GETSET_RX|GETSET_TX); */
++
++ /* This stops beacons (invalid macmode...) */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ break;
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_MODE);
++ }
++
++ if (adev->set_mask & SET_RXCONFIG) {
++ acx_s_initialize_rx_config(adev);
++ CLEAR_BIT(adev->set_mask, SET_RXCONFIG);
++ }
++
++ if (adev->set_mask & GETSET_RESCAN) {
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ start_scan = 1;
++ break;
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++
++ if (adev->set_mask & GETSET_WEP) {
++ /* encode */
++
++ ie_dot11WEPDefaultKeyID_t dkey;
++#ifdef DEBUG_WEP
++ struct {
++ u16 type;
++ u16 len;
++ u8 val;
++ } ACX_PACKED keyindic;
++#endif
++ log(L_INIT, "updating WEP key settings\n");
++
++ acx_s_set_wepkey(adev);
++
++ dkey.KeyID = adev->wep_current_index;
++ log(L_INIT, "setting WEP key %u as default\n", dkey.KeyID);
++ acx_s_configure(adev, &dkey, ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET);
++#ifdef DEBUG_WEP
++ keyindic.val = 3;
++ acx_s_configure(adev, &keyindic, ACX111_IE_KEY_CHOOSE);
++#endif
++ start_scan = 1;
++ CLEAR_BIT(adev->set_mask, GETSET_WEP);
++ }
++
++ if (adev->set_mask & SET_WEP_OPTIONS) {
++ acx100_ie_wep_options_t options;
++ if (IS_ACX111(adev)) {
++ log(L_DEBUG, "setting WEP Options for acx111 is not supported\n");
++ } else {
++ log(L_INIT, "setting WEP Options\n");
++ acx100_s_init_wep(adev);
++#if 0
++ /* let's choose maximum setting: 4 default keys,
++ * plus 10 other keys: */
++ options.NumKeys = cpu_to_le16(DOT11_MAX_DEFAULT_WEP_KEYS + 10);
++ /* don't decrypt default key only,
++ * don't override decryption: */
++ options.WEPOption = 0;
++ if (adev->mode == ACX_MODE_MONITOR) {
++ /* don't decrypt default key only,
++ * override decryption mechanism: */
++ options.WEPOption = 2;
++ }
++
++ acx_s_configure(adev, &options, ACX100_IE_WEP_OPTIONS);
++#endif
++ }
++ CLEAR_BIT(adev->set_mask, SET_WEP_OPTIONS);
++ }
++
++ /* Rescan was requested */
++ if (start_scan) {
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* We can avoid clearing list if join code
++ ** will be a bit more clever about not picking
++ ** 'bad' AP over and over again */
++ acx_lock(adev, flags);
++ adev->ap_client = NULL;
++ acx_l_sta_list_init(adev);
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_unlock(adev, flags);
++
++ acx_s_cmd_start_scan(adev);
++ }
++ }
++
++ /* debug, rate, and nick don't need any handling */
++ /* what about sniffing mode?? */
++
++ log(L_INIT, "get_mask 0x%08X, set_mask 0x%08X - after update\n",
++ adev->get_mask, adev->set_mask);
++
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_e_after_interrupt_task
++*/
++static int
++acx_s_recalib_radio(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ acx111_cmd_radiocalib_t cal;
++
++ printk("%s: recalibrating radio\n", adev->ndev->name);
++ /* automatic recalibration, choose all methods: */
++ cal.methods = cpu_to_le32(0x8000000f);
++ /* automatic recalibration every 60 seconds (value in TUs)
++ * I wonder what the firmware default here is? */
++ cal.interval = cpu_to_le32(58594);
++ return acx_s_issue_cmd_timeo(adev, ACX111_CMD_RADIOCALIB,
++ &cal, sizeof(cal), CMD_TIMEOUT_MS(100));
++ } else {
++ /* On ACX100, we need to recalibrate the radio
++ * by issuing a GETSET_TX|GETSET_RX */
++ if (/* (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0)) &&
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0)) && */
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_TX, &adev->channel, 1)) &&
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_RX, &adev->channel, 1)) )
++ return OK;
++ return NOT_OK;
++ }
++}
++
++static void
++acx_s_after_interrupt_recalib(acx_device_t *adev)
++{
++ int res;
++
++ /* this helps with ACX100 at least;
++ * hopefully ACX111 also does a
++ * recalibration here */
++
++ /* clear flag beforehand, since we want to make sure
++ * it's cleared; then only set it again on specific circumstances */
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* better wait a bit between recalibrations to
++ * prevent overheating due to torturing the card
++ * into working too long despite high temperature
++ * (just a safety measure) */
++ if (adev->recalib_time_last_success
++ && time_before(jiffies, adev->recalib_time_last_success
++ + RECALIB_PAUSE * 60 * HZ)) {
++ if (adev->recalib_msg_ratelimit <= 4) {
++ printk("%s: less than " STRING(RECALIB_PAUSE)
++ " minutes since last radio recalibration, "
++ "not recalibrating (maybe card is too hot?)\n",
++ adev->ndev->name);
++ adev->recalib_msg_ratelimit++;
++ if (adev->recalib_msg_ratelimit == 5)
++ printk("disabling above message until next recalib\n");
++ }
++ return;
++ }
++
++ adev->recalib_msg_ratelimit = 0;
++
++ /* note that commands sometimes fail (card busy),
++ * so only clear flag if we were fully successful */
++ res = acx_s_recalib_radio(adev);
++ if (res == OK) {
++ printk("%s: successfully recalibrated radio\n",
++ adev->ndev->name);
++ adev->recalib_time_last_success = jiffies;
++ adev->recalib_failure_count = 0;
++ } else {
++ /* failed: resubmit, but only limited
++ * amount of times within some time range
++ * to prevent endless loop */
++
++ adev->recalib_time_last_success = 0; /* we failed */
++
++ /* if some time passed between last
++ * attempts, then reset failure retry counter
++ * to be able to do next recalib attempt */
++ if (time_after(jiffies, adev->recalib_time_last_attempt + 5*HZ))
++ adev->recalib_failure_count = 0;
++
++ if (adev->recalib_failure_count < 5) {
++ /* increment inside only, for speedup of outside path */
++ adev->recalib_failure_count++;
++ adev->recalib_time_last_attempt = jiffies;
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ }
++}
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
++static void
++acx_e_after_interrupt_task(struct work_struct *work)
++{
++ acx_device_t *adev = container_of(work, acx_device_t, after_interrupt_task);
++#else
++ static void
++ acx_e_after_interrupt_task(void *data)
++ {
++ struct net_device *ndev = (struct net_device*)data;
++ acx_device_t *adev = ndev2adev(ndev);
++#endif
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ if (!adev->after_interrupt_jobs)
++ goto end; /* no jobs to do */
++
++#if TX_CLEANUP_IN_SOFTIRQ
++ /* can happen only on PCI */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_TX_CLEANUP) {
++ acx_lock(adev, flags);
++ acxpci_l_clean_txdesc(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_TX_CLEANUP);
++ acx_unlock(adev, flags);
++ }
++#endif
++ /* we see lotsa tx errors */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_RADIO_RECALIB) {
++ acx_s_after_interrupt_recalib(adev);
++ }
++
++ /* a poor interrupt code wanted to do update_card_settings() */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_UPDATE_CARD_CFG) {
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++
++ /* 1) we detected that no Scan_Complete IRQ came from fw, or
++ ** 2) we found too many STAs */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_STOP_SCAN) {
++ log(L_IRQ, "sending a stop scan cmd...\n");
++ acx_s_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0);
++ /* HACK: set the IRQ bit, since we won't get a
++ * scan complete IRQ any more on ACX111 (works on ACX100!),
++ * since _we_, not a fw, have stopped the scan */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_STOP_SCAN);
++ }
++
++ /* either fw sent Scan_Complete or we detected that
++ ** no Scan_Complete IRQ came from fw. Finish scanning,
++ ** pick join partner if any */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_COMPLETE_SCAN) {
++ if (adev->status == ACX_STATUS_1_SCANNING) {
++ if (OK != acx_s_complete_scan(adev)) {
++ SET_BIT(adev->after_interrupt_jobs,
++ ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ } else {
++ /* + scan kills current join status - restore it
++ ** (do we need it for STA?) */
++ /* + does it happen only with active scans?
++ ** active and passive scans? ALL scans including
++ ** background one? */
++ /* + was not verified that everything is restored
++ ** (but at least we start to emit beacons again) */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ log(L_IRQ, "redoing cmd_join_bssid() after scan\n");
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ }
++ }
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ }
++
++ /* STA auth or assoc timed out, start over again */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_RESTART_SCAN) {
++ log(L_IRQ, "sending a start_scan cmd...\n");
++ acx_s_cmd_start_scan(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++
++ /* whee, we got positive assoc response! 8) */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_ASSOCIATE) {
++ acx_ie_generic_t pdr;
++ /* tiny race window exists, checking that we still a STA */
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ pdr.m.aid = cpu_to_le16(adev->aid);
++ acx_s_configure(adev, &pdr, ACX1xx_IE_ASSOC_ID);
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ log(L_ASSOC|L_DEBUG, "ASSOCIATED!\n");
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_ASSOCIATE);
++ }
++ }
++end:
++ acx_sem_unlock(adev);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_schedule_task
++**
++** Schedule the call of the after_interrupt method after leaving
++** the interrupt context.
++*/
++void
++acx_schedule_task(acx_device_t *adev, unsigned int set_flag)
++{
++ SET_BIT(adev->after_interrupt_jobs, set_flag);
++ SCHEDULE_WORK(&adev->after_interrupt_task);
++}
++
++
++/***********************************************************************
++*/
++void
++acx_init_task_scheduler(acx_device_t *adev)
++{
++ /* configure task scheduler */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
++ INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task);
++#else
++ INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task,
++ adev->ndev);
++#endif
++}
++
++
++/***********************************************************************
++** acx_s_start
++*/
++void
++acx_s_start(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /*
++ * Ok, now we do everything that can possibly be done with ioctl
++ * calls to make sure that when it was called before the card
++ * was up we get the changes asked for
++ */
++
++ SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST|GETSET_WEP
++ |GETSET_TXPOWER|GETSET_ANTENNA|GETSET_ED_THRESH|GETSET_CCA
++ |GETSET_REG_DOMAIN|GETSET_MODE|GETSET_CHANNEL
++ |GETSET_TX|GETSET_RX|GETSET_STATION_ID);
++
++ log(L_INIT, "updating initial settings on iface activation\n");
++ acx_s_update_card_settings(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_update_capabilities
++*/
++void
++acx_update_capabilities(acx_device_t *adev)
++{
++ u16 cap = 0;
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++ SET_BIT(cap, WF_MGMT_CAP_ESS); break;
++ case ACX_MODE_0_ADHOC:
++ SET_BIT(cap, WF_MGMT_CAP_IBSS); break;
++ /* other types of stations do not emit beacons */
++ }
++
++ if (adev->wep_restricted) {
++ SET_BIT(cap, WF_MGMT_CAP_PRIVACY);
++ }
++ if (adev->cfgopt_dot11ShortPreambleOption) {
++ SET_BIT(cap, WF_MGMT_CAP_SHORT);
++ }
++ if (adev->cfgopt_dot11PBCCOption) {
++ SET_BIT(cap, WF_MGMT_CAP_PBCC);
++ }
++ if (adev->cfgopt_dot11ChannelAgility) {
++ SET_BIT(cap, WF_MGMT_CAP_AGILITY);
++ }
++ log(L_DEBUG, "caps updated from 0x%04X to 0x%04X\n",
++ adev->capabilities, cap);
++ adev->capabilities = cap;
++}
++
++/***********************************************************************
++** Common function to parse ALL configoption struct formats
++** (ACX100 and ACX111; FIXME: how to make it work with ACX100 USB!?!?).
++** FIXME: logging should be removed here and added to a /proc file instead
++*/
++void
++acx_s_parse_configoption(acx_device_t *adev, const acx111_ie_configoption_t *pcfg)
++{
++ const u8 *pEle;
++ int i;
++ int is_acx111 = IS_ACX111(adev);
++
++ if (acx_debug & L_DEBUG) {
++ printk("configoption struct content:\n");
++ acx_dump_bytes(pcfg, sizeof(*pcfg));
++ }
++
++ if (( is_acx111 && (adev->eeprom_version == 5))
++ || (!is_acx111 && (adev->eeprom_version == 4))
++ || (!is_acx111 && (adev->eeprom_version == 5))) {
++ /* these versions are known to be supported */
++ } else {
++ printk("unknown chip and EEPROM version combination (%s, v%d), "
++ "don't know how to parse config options yet. "
++ "Please report\n", is_acx111 ? "ACX111" : "ACX100",
++ adev->eeprom_version);
++ return;
++ }
++
++ /* first custom-parse the first part which has chip-specific layout */
++
++ pEle = (const u8 *) pcfg;
++
++ pEle += 4; /* skip (type,len) header */
++
++ memcpy(adev->cfgopt_NVSv, pEle, sizeof(adev->cfgopt_NVSv));
++ pEle += sizeof(adev->cfgopt_NVSv);
++
++ if (is_acx111) {
++ adev->cfgopt_NVS_vendor_offs = le16_to_cpu(*(u16 *)pEle);
++ pEle += sizeof(adev->cfgopt_NVS_vendor_offs);
++
++ adev->cfgopt_probe_delay = 200; /* good default value? */
++ pEle += 2; /* FIXME: unknown, value 0x0001 */
++ } else {
++ memcpy(adev->cfgopt_MAC, pEle, sizeof(adev->cfgopt_MAC));
++ pEle += sizeof(adev->cfgopt_MAC);
++
++ adev->cfgopt_probe_delay = le16_to_cpu(*(u16 *)pEle);
++ pEle += sizeof(adev->cfgopt_probe_delay);
++ if ((adev->cfgopt_probe_delay < 100) || (adev->cfgopt_probe_delay > 500)) {
++ printk("strange probe_delay value %d, "
++ "tweaking to 200\n", adev->cfgopt_probe_delay);
++ adev->cfgopt_probe_delay = 200;
++ }
++ }
++
++ adev->cfgopt_eof_memory = le32_to_cpu(*(u32 *)pEle);
++ pEle += sizeof(adev->cfgopt_eof_memory);
++
++ printk("NVS_vendor_offs:%04X probe_delay:%d eof_memory:%d\n",
++ adev->cfgopt_NVS_vendor_offs,
++ adev->cfgopt_probe_delay,
++ adev->cfgopt_eof_memory);
++
++ adev->cfgopt_dot11CCAModes = *pEle++;
++ adev->cfgopt_dot11Diversity = *pEle++;
++ adev->cfgopt_dot11ShortPreambleOption = *pEle++;
++ adev->cfgopt_dot11PBCCOption = *pEle++;
++ adev->cfgopt_dot11ChannelAgility = *pEle++;
++ adev->cfgopt_dot11PhyType = *pEle++;
++ adev->cfgopt_dot11TempType = *pEle++;
++ printk("CCAModes:%02X Diversity:%02X ShortPreOpt:%02X "
++ "PBCC:%02X ChanAgil:%02X PHY:%02X Temp:%02X\n",
++ adev->cfgopt_dot11CCAModes,
++ adev->cfgopt_dot11Diversity,
++ adev->cfgopt_dot11ShortPreambleOption,
++ adev->cfgopt_dot11PBCCOption,
++ adev->cfgopt_dot11ChannelAgility,
++ adev->cfgopt_dot11PhyType,
++ adev->cfgopt_dot11TempType);
++
++ /* then use common parsing for next part which has common layout */
++
++ pEle++; /* skip table_count (6) */
++
++ if (IS_MEM(adev) && IS_ACX100(adev))
++ {
++ /*
++ * For iPaq hx4700 Generic Slave F/W 1.10.7.K. I'm not sure if these
++ * 4 extra bytes are before the dot11 things above or after, so I'm just
++ * going to guess after. If someone sees these aren't reasonable numbers,
++ * please fix this.
++ * The area from which the dot11 values above are read contains:
++ * 04 01 01 01 00 05 01 06 00 02 01 02
++ * the 8 dot11 reads above take care of 8 of them, but which 8...
++ */
++ pEle += 4;
++ }
++
++ adev->cfgopt_antennas.type = pEle[0];
++ adev->cfgopt_antennas.len = pEle[1];
++ printk("AntennaID:%02X Len:%02X Data:",
++ adev->cfgopt_antennas.type, adev->cfgopt_antennas.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_antennas.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_power_levels.type = pEle[0];
++ adev->cfgopt_power_levels.len = pEle[1];
++ printk("PowerLevelID:%02X Len:%02X Data:",
++ adev->cfgopt_power_levels.type, adev->cfgopt_power_levels.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_power_levels.list[i] = le16_to_cpu(*(u16 *)&pEle[i*2+2]);
++ printk("%04X ", adev->cfgopt_power_levels.list[i]);
++ }
++ printk("\n");
++
++ pEle += pEle[1]*2 + 2;
++ adev->cfgopt_data_rates.type = pEle[0];
++ adev->cfgopt_data_rates.len = pEle[1];
++ printk("DataRatesID:%02X Len:%02X Data:",
++ adev->cfgopt_data_rates.type, adev->cfgopt_data_rates.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_data_rates.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_domains.type = pEle[0];
++ adev->cfgopt_domains.len = pEle[1];
++ if (IS_MEM(adev) && IS_ACX100(adev))
++ {
++ /*
++ * For iPaq hx4700 Generic Slave F/W 1.10.7.K.
++ * There's an extra byte between this structure and the next
++ * that is not accounted for with this structure's length. It's
++ * most likely a bug in the firmware, but we can fix it here
++ * by bumping the length of this field by 1.
++ */
++ adev->cfgopt_domains.len++;
++ }
++ printk("DomainID:%02X Len:%02X Data:",
++ adev->cfgopt_domains.type, adev->cfgopt_domains.len);
++ for (i = 0; i < adev->cfgopt_domains.len; i++) {
++ adev->cfgopt_domains.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += adev->cfgopt_domains.len + 2;
++
++ adev->cfgopt_product_id.type = pEle[0];
++ adev->cfgopt_product_id.len = pEle[1];
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_product_id.list[i] = pEle[i+2];
++ }
++ printk("ProductID:%02X Len:%02X Data:%.*s\n",
++ adev->cfgopt_product_id.type, adev->cfgopt_product_id.len,
++ adev->cfgopt_product_id.len, (char *)adev->cfgopt_product_id.list);
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_manufacturer.type = pEle[0];
++ adev->cfgopt_manufacturer.len = pEle[1];
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_manufacturer.list[i] = pEle[i+2];
++ }
++ printk("ManufacturerID:%02X Len:%02X Data:%.*s\n",
++ adev->cfgopt_manufacturer.type, adev->cfgopt_manufacturer.len,
++ adev->cfgopt_manufacturer.len, (char *)adev->cfgopt_manufacturer.list);
++/*
++ printk("EEPROM part:\n");
++ for (i=0; i<58; i++) {
++ printk("%02X =======> 0x%02X\n",
++ i, (u8 *)adev->cfgopt_NVSv[i-2]);
++ }
++*/
++}
++
++
++/***********************************************************************
++*/
++static int __init
++acx_e_init_module(void)
++{
++ int r1,r2,r3,r4;
++
++ acx_struct_size_check();
++
++ printk("acx: this driver is still EXPERIMENTAL\n"
++ "acx: reading README file and/or Craig's HOWTO is "
++ "recommended, visit http://acx100.sf.net in case "
++ "of further questions/discussion\n");
++
++#if defined(CONFIG_ACX_PCI)
++ r1 = acxpci_e_init_module();
++#else
++ r1 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_MEM)
++ r2 = acxmem_e_init_module();
++#else
++ r2 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_USB)
++ r3 = acxusb_e_init_module();
++#else
++ r3 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_CS)
++ r4 = acx_cs_init();
++#else
++ r4 = -EINVAL;
++#endif
++ if (r2 && r1 && r3 && r4) { /* all failed! */
++ if (r3 || r1)
++ return r3 ? r3 : r1;
++ else
++ return r2;
++ }
++ /* return success if at least one succeeded */
++ return 0;
++
++}
++
++static void __exit
++acx_e_cleanup_module(void)
++{
++#if defined(CONFIG_ACX_PCI)
++ acxpci_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_MEM)
++ acxmem_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_USB)
++ acxusb_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_CS)
++ acx_cs_cleanup();
++#endif
++}
++
++module_init(acx_e_init_module)
++module_exit(acx_e_cleanup_module)
+Index: linux-2.6.23/drivers/net/wireless/acx/conv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/conv.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,504 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/skbuff.h>
++#include <linux/if_arp.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++** proto_is_stt
++**
++** Searches the 802.1h Selective Translation Table for a given
++** protocol.
++**
++** prottype - protocol number (in host order) to search for.
++**
++** Returns:
++** 1 - if the table is empty or a match is found.
++** 0 - if the table is non-empty and a match is not found.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++static inline int
++proto_is_stt(unsigned int proto)
++{
++ /* Always return found for now. This is the behavior used by the */
++ /* Zoom Win95 driver when 802.1h mode is selected */
++ /* TODO: If necessary, add an actual search we'll probably
++ need this to match the CMAC's way of doing things.
++ Need to do some testing to confirm.
++ */
++
++ if (proto == 0x80f3) /* APPLETALK */
++ return 1;
++
++ return 0;
++/* return ((prottype == ETH_P_AARP) || (prottype == ETH_P_IPX)); */
++}
++
++/* Helpers */
++
++static inline void
++store_llc_snap(struct wlan_llc *llc)
++{
++ llc->dsap = 0xaa; /* SNAP, see IEEE 802 */
++ llc->ssap = 0xaa;
++ llc->ctl = 0x03;
++}
++static inline int
++llc_is_snap(const struct wlan_llc *llc)
++{
++ return (llc->dsap == 0xaa)
++ && (llc->ssap == 0xaa)
++ && (llc->ctl == 0x03);
++}
++static inline void
++store_oui_rfc1042(struct wlan_snap *snap)
++{
++ snap->oui[0] = 0;
++ snap->oui[1] = 0;
++ snap->oui[2] = 0;
++}
++static inline int
++oui_is_rfc1042(const struct wlan_snap *snap)
++{
++ return (snap->oui[0] == 0)
++ && (snap->oui[1] == 0)
++ && (snap->oui[2] == 0);
++}
++static inline void
++store_oui_8021h(struct wlan_snap *snap)
++{
++ snap->oui[0] = 0;
++ snap->oui[1] = 0;
++ snap->oui[2] = 0xf8;
++}
++static inline int
++oui_is_8021h(const struct wlan_snap *snap)
++{
++ return (snap->oui[0] == 0)
++ && (snap->oui[1] == 0)
++ && (snap->oui[2] == 0xf8);
++}
++
++
++/***********************************************************************
++** acx_ether_to_txbuf
++**
++** Uses the contents of the ether frame to build the elements of
++** the 802.11 frame.
++**
++** We don't actually set up the frame header here. That's the
++** MAC's job. We're only handling conversion of DIXII or 802.3+LLC
++** frames to something that works with 802.11.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++int
++acx_ether_to_txbuf(acx_device_t *adev, void *txbuf, const struct sk_buff *skb)
++{
++ struct wlan_hdr_a3 *w_hdr;
++ struct wlan_ethhdr *e_hdr;
++ struct wlan_llc *e_llc;
++ struct wlan_snap *e_snap;
++ const u8 *a1, *a3;
++ int header_len, payload_len = -1;
++ /* protocol type or data length, depending on whether
++ * DIX or 802.3 ethernet format */
++ u16 proto;
++ u16 fc;
++
++ FN_ENTER;
++
++ if (unlikely(!skb->len)) {
++ log(L_DEBUG, "zero-length skb!\n");
++ goto end;
++ }
++
++ w_hdr = (struct wlan_hdr_a3*)txbuf;
++
++ switch (adev->mode) {
++ case ACX_MODE_MONITOR:
++ /* NB: one day we might want to play with DESC_CTL2_FCS
++ ** Will need to stop doing "- WLAN_FCS_LEN" here then */
++ if (unlikely(skb->len >= WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_FCS_LEN)) {
++ printk("%s: can't tx oversized frame (%d bytes)\n",
++ adev->ndev->name, skb->len);
++ goto end;
++ }
++ memcpy(w_hdr, skb->data, skb->len);
++ payload_len = skb->len;
++ goto end;
++ }
++
++ /* step 1: classify ether frame, DIX or 802.3? */
++ e_hdr = (wlan_ethhdr_t *)skb->data;
++ proto = ntohs(e_hdr->type);
++ if (proto <= 1500) {
++ log(L_DEBUG, "tx: 802.3 len: %d\n", skb->len);
++ /* codes <= 1500 reserved for 802.3 lengths */
++ /* it's 802.3, pass ether payload unchanged, */
++ /* trim off ethernet header and copy payload to txdesc */
++ header_len = WLAN_HDR_A3_LEN;
++ } else {
++ /* it's DIXII, time for some conversion */
++ /* Create 802.11 packet. Header also contains llc and snap. */
++
++ log(L_DEBUG, "tx: DIXII len: %d\n", skb->len);
++
++ /* size of header is 802.11 header + llc + snap */
++ header_len = WLAN_HDR_A3_LEN + sizeof(wlan_llc_t) + sizeof(wlan_snap_t);
++ /* llc is located behind the 802.11 header */
++ e_llc = (wlan_llc_t*)(w_hdr + 1);
++ /* snap is located behind the llc */
++ e_snap = (wlan_snap_t*)(e_llc + 1);
++
++ /* setup the LLC header */
++ store_llc_snap(e_llc);
++
++ /* setup the SNAP header */
++ e_snap->type = htons(proto);
++ if (proto_is_stt(proto)) {
++ store_oui_8021h(e_snap);
++ } else {
++ store_oui_rfc1042(e_snap);
++ }
++ }
++ /* trim off ethernet header and copy payload to txbuf */
++ payload_len = skb->len - sizeof(wlan_ethhdr_t);
++ /* TODO: can we just let acx DMA payload from skb instead? */
++ memcpy((u8*)txbuf + header_len, skb->data + sizeof(wlan_ethhdr_t), payload_len);
++ payload_len += header_len;
++
++ /* Set up the 802.11 header */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi);
++ a1 = e_hdr->daddr;
++ a3 = adev->bssid;
++ break;
++ case ACX_MODE_2_STA:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi | WF_FC_TODSi);
++ a1 = adev->bssid;
++ a3 = e_hdr->daddr;
++ break;
++ case ACX_MODE_3_AP:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi | WF_FC_FROMDSi);
++ a1 = e_hdr->daddr;
++ a3 = e_hdr->saddr;
++ break;
++ default:
++ printk("%s: error - converting eth to wlan in unknown mode\n",
++ adev->ndev->name);
++ payload_len = -1;
++ goto end;
++ }
++ if (adev->wep_enabled)
++ SET_BIT(fc, WF_FC_ISWEPi);
++
++ w_hdr->fc = fc;
++ w_hdr->dur = 0;
++ MAC_COPY(w_hdr->a1, a1);
++ MAC_COPY(w_hdr->a2, adev->dev_addr);
++ MAC_COPY(w_hdr->a3, a3);
++ w_hdr->seq = 0;
++
++#ifdef DEBUG_CONVERT
++ if (acx_debug & L_DATA) {
++ printk("original eth frame [%d]: ", skb->len);
++ acx_dump_bytes(skb->data, skb->len);
++ printk("802.11 frame [%d]: ", payload_len);
++ acx_dump_bytes(w_hdr, payload_len);
++ }
++#endif
++
++end:
++ FN_EXIT1(payload_len);
++ return payload_len;
++}
++
++
++/***********************************************************************
++** acx_rxbuf_to_ether
++**
++** Uses the contents of a received 802.11 frame to build an ether
++** frame.
++**
++** This function extracts the src and dest address from the 802.11
++** frame to use in the construction of the eth frame.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++struct sk_buff*
++acx_rxbuf_to_ether(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *w_hdr;
++ struct wlan_ethhdr *e_hdr;
++ struct wlan_llc *e_llc;
++ struct wlan_snap *e_snap;
++ struct sk_buff *skb;
++ const u8 *daddr;
++ const u8 *saddr;
++ const u8 *e_payload;
++ int buflen, payload_length;
++ unsigned int payload_offset, mtu;
++ u16 fc;
++
++ FN_ENTER;
++
++ /* This looks complex because it must handle possible
++ ** phy header in rxbuff */
++ w_hdr = acx_get_wlan_hdr(adev, rxbuf);
++ payload_offset = WLAN_HDR_A3_LEN; /* it is relative to w_hdr */
++ payload_length = RXBUF_BYTES_USED(rxbuf) /* entire rxbuff... */
++ - ((u8*)w_hdr - (u8*)rxbuf) /* minus space before 802.11 frame */
++ - WLAN_HDR_A3_LEN; /* minus 802.11 header */
++
++ /* setup some vars for convenience */
++ fc = w_hdr->fc;
++ switch (WF_FC_FROMTODSi & fc) {
++ case 0:
++ daddr = w_hdr->a1;
++ saddr = w_hdr->a2;
++ break;
++ case WF_FC_FROMDSi:
++ daddr = w_hdr->a1;
++ saddr = w_hdr->a3;
++ break;
++ case WF_FC_TODSi:
++ daddr = w_hdr->a3;
++ saddr = w_hdr->a2;
++ break;
++ default: /* WF_FC_FROMTODSi */
++ payload_offset += (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
++ payload_length -= (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
++ daddr = w_hdr->a3;
++ saddr = w_hdr->a4;
++ }
++
++ if ((WF_FC_ISWEPi & fc) && IS_ACX100(adev)) {
++ /* chop off the IV+ICV WEP header and footer */
++ log(L_DATA|L_DEBUG, "rx: WEP packet, "
++ "chopping off IV and ICV\n");
++ payload_offset += WLAN_WEP_IV_LEN;
++ payload_length -= WLAN_WEP_IV_LEN + WLAN_WEP_ICV_LEN;
++ }
++
++ if (unlikely(payload_length < 0)) {
++ printk("%s: rx frame too short, ignored\n", adev->ndev->name);
++ goto ret_null;
++ }
++
++ e_hdr = (wlan_ethhdr_t*) ((u8*) w_hdr + payload_offset);
++ e_llc = (wlan_llc_t*) e_hdr;
++ e_snap = (wlan_snap_t*) (e_llc + 1);
++ mtu = adev->ndev->mtu;
++ e_payload = (u8*) (e_snap + 1);
++
++ log(L_DATA, "rx: payload_offset %d, payload_length %d\n",
++ payload_offset, payload_length);
++ log(L_XFER|L_DATA,
++ "rx: frame info: llc=%02X%02X%02X "
++ "snap.oui=%02X%02X%02X snap.type=%04X\n",
++ e_llc->dsap, e_llc->ssap, e_llc->ctl,
++ e_snap->oui[0], e_snap->oui[1], e_snap->oui[2],
++ ntohs(e_snap->type));
++
++ /* Test for the various encodings */
++ if ((payload_length >= sizeof(wlan_ethhdr_t))
++ && ((e_llc->dsap != 0xaa) || (e_llc->ssap != 0xaa))
++ && ( (mac_is_equal(daddr, e_hdr->daddr))
++ || (mac_is_equal(saddr, e_hdr->saddr))
++ )
++ ) {
++ /* 802.3 Encapsulated: */
++ /* wlan frame body contains complete eth frame (header+body) */
++ log(L_DEBUG|L_DATA, "rx: 802.3 ENCAP len=%d\n", payload_length);
++
++ if (unlikely(payload_length > (mtu + ETH_HLEN))) {
++ printk("%s: rx: ENCAP frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu + ETH_HLEN);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length;
++ /* Attempt to align IP header (14 bytes eth header + 2 = 16) */
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* now copy the data from the 80211 frame */
++ memcpy(skb->data, e_hdr, payload_length);
++
++ } else if ( (payload_length >= sizeof(wlan_llc_t)+sizeof(wlan_snap_t))
++ && llc_is_snap(e_llc) ) {
++ /* wlan frame body contains: AA AA 03 ... (it's a SNAP) */
++
++ if ( !oui_is_rfc1042(e_snap)
++ || (proto_is_stt(ieee2host16(e_snap->type)) /* && (ethconv == WLAN_ETHCONV_8021h) */)) {
++ log(L_DEBUG|L_DATA, "rx: SNAP+RFC1042 len=%d\n", payload_length);
++ /* wlan frame body contains: AA AA 03 !(00 00 00) ... -or- */
++ /* wlan frame body contains: AA AA 03 00 00 00 0x80f3 ... */
++ /* build eth hdr, type = len, copy AA AA 03... as eth body */
++ /* it's a SNAP + RFC1042 frame && protocol is in STT */
++
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: SNAP frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* create 802.3 header */
++ e_hdr = (wlan_ethhdr_t*) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = htons(payload_length);
++
++ /* Now copy the data from the 80211 frame.
++ Make room in front for the eth header, and keep the
++ llc and snap from the 802.11 payload */
++ memcpy(skb->data + ETH_HLEN,
++ e_llc, payload_length);
++
++ } else {
++ /* wlan frame body contains: AA AA 03 00 00 00 [type] [tail] */
++ /* build eth hdr, type=[type], copy [tail] as eth body */
++ log(L_DEBUG|L_DATA, "rx: 802.1h/RFC1042 len=%d\n",
++ payload_length);
++ /* it's an 802.1h frame (an RFC1042 && protocol is not in STT) */
++ /* build a DIXII + RFC894 */
++
++ payload_length -= sizeof(wlan_llc_t) + sizeof(wlan_snap_t);
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: DIXII frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* create 802.3 header */
++ e_hdr = (wlan_ethhdr_t *) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = e_snap->type;
++
++ /* Now copy the data from the 80211 frame.
++ Make room in front for the eth header, and cut off the
++ llc and snap from the 802.11 payload */
++ memcpy(skb->data + ETH_HLEN,
++ e_payload, payload_length);
++ }
++
++ } else {
++ log(L_DEBUG|L_DATA, "rx: NON-ENCAP len=%d\n", payload_length);
++ /* build eth hdr, type=len, copy wlan body as eth body */
++ /* any NON-ENCAP */
++ /* it's a generic 80211+LLC or IPX 'Raw 802.3' */
++ /* build an 802.3 frame */
++
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: OTHER frame too large (%d > %d)\n",
++ adev->ndev->name, payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* set up the 802.3 header */
++ e_hdr = (wlan_ethhdr_t *) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = htons(payload_length);
++
++ /* now copy the data from the 80211 frame */
++ memcpy(skb->data + ETH_HLEN, e_llc, payload_length);
++ }
++
++ skb->dev = adev->ndev;
++ skb->protocol = eth_type_trans(skb, adev->ndev);
++
++#ifdef DEBUG_CONVERT
++ if (acx_debug & L_DATA) {
++ int len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ printk("p802.11 frame [%d]: ", len);
++ acx_dump_bytes(w_hdr, len);
++ printk("eth frame [%d]: ", skb->len);
++ acx_dump_bytes(skb->data, skb->len);
++ }
++#endif
++
++ FN_EXIT0;
++ return skb;
++
++no_skb:
++ printk("%s: rx: no memory for skb (%d bytes)\n",
++ adev->ndev->name, buflen + 2);
++ret_null:
++ FN_EXIT1((int)NULL);
++ return NULL;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/cs.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/cs.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,5703 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++**
++** Slave memory interface support:
++**
++** Todd Blumer - SDG Systems
++** Bill Reese - HP
++** Eric McCorkle - Shadowsun
++**
++** CF support, (c) Fabrice Crohas, Paul Sokolovsky
++*/
++#define ACX_MEM 1
++
++/*
++ * non-zero makes it dump the ACX memory to the console then
++ * panic when you cat /proc/driver/acx_wlan0_diag
++ */
++#define DUMP_MEM_DEFINED 1
++
++#define DUMP_MEM_DURING_DIAG 0
++#define DUMP_IF_SLOW 0
++
++#define PATCH_AROUND_BAD_SPOTS 1
++#define HX4700_FIRMWARE_CHECKSUM 0x0036862e
++#define HX4700_ALTERNATE_FIRMWARE_CHECKSUM 0x00368a75
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/irq.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/inetdevice.h>
++
++#define PCMCIA_DEBUG 1
++
++/*
++ All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
++ you do not define PCMCIA_DEBUG at all, all the debug code will be
++ left out. If you compile with PCMCIA_DEBUG=0, the debug code will
++ be present but disabled -- but it can then be enabled for specific
++ modules at load time with a 'pc_debug=#' option to insmod.
++
++*/
++#include <pcmcia/cs_types.h>
++#include <pcmcia/cs.h>
++#include <pcmcia/cistpl.h>
++#include <pcmcia/cisreg.h>
++#include <pcmcia/ds.h>
++#include "acx.h"
++#include "acx_hw.h"
++
++#ifdef PCMCIA_DEBUG
++static int pc_debug = PCMCIA_DEBUG;
++module_param(pc_debug, int, 0);
++static char *version = "$Revision: 1.10 $";
++#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
++#else
++#define DEBUG(n, args...)
++#endif
++
++
++static win_req_t memwin;
++
++typedef struct local_info_t {
++ dev_node_t node;
++ struct net_device *ndev;
++} local_info_t;
++
++static struct net_device *resume_ndev;
++
++
++/***********************************************************************
++*/
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#include <asm/io.h>
++
++#define REG_ACX_VENDOR_ID 0x900
++/*
++ * This is the vendor id on the HX4700, anyway
++ */
++#define ACX_VENDOR_ID 0x8400104c
++
++typedef enum {
++ ACX_SOFT_RESET = 0,
++
++ ACX_SLV_REG_ADDR,
++ ACX_SLV_REG_DATA,
++ ACX_SLV_REG_ADATA,
++
++ ACX_SLV_MEM_CP,
++ ACX_SLV_MEM_ADDR,
++ ACX_SLV_MEM_DATA,
++ ACX_SLV_MEM_CTL,
++} acxreg_t;
++
++/***********************************************************************
++*/
++static void acxmem_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxmem_i_set_multicast_list(struct net_device *ndev);
++
++static int acxmem_e_open(struct net_device *ndev);
++static int acxmem_e_close(struct net_device *ndev);
++static void acxmem_s_up(struct net_device *ndev);
++static void acxmem_s_down(struct net_device *ndev);
++
++static void dump_acxmem (acx_device_t *adev, u32 start, int length);
++static int acxmem_complete_hw_reset (acx_device_t *adev);
++static void acxmem_s_delete_dma_regions(acx_device_t *adev);
++
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend( struct net_device *ndev, pm_message_t state);
++#else
++acxmem_e_suspend( struct net_device *ndev, u32 state);
++#endif
++static void
++fw_resumer(struct work_struct *notused);
++//fw_resumer( void *data );
++
++static int acx_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++ struct net_device *ndev = ptr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /*
++ * Upper level ioctl() handlers send a NETDEV_CHANGEADDR if the MAC address changes.
++ */
++
++ if (NETDEV_CHANGEADDR == event) {
++ /*
++ * the upper layers put the new MAC address in ndev->dev_addr; we just copy
++ * it over and update the ACX with it.
++ */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ adev->set_mask |= GETSET_STATION_ID;
++ acx_s_update_card_settings (adev);
++ }
++
++ return 0;
++}
++
++static struct notifier_block acx_netdev_notifier = {
++ .notifier_call = acx_netdev_event,
++};
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_id_register (acx_device_t *adev)
++{
++ writel (0x24, &adev->iobase[ACX_SLV_REG_ADDR]);
++ return readl (&adev->iobase[ACX_SLV_REG_DATA]);
++}
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++ u32 val;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readl(((u8*)adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ val = readl( &adev->iobase[ACX_SLV_REG_DATA] );
++
++ return val;
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ u16 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readw(((u8 *) adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u16 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return lo;
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ u8 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20)
++ return readb(((u8 *)adev->iobase) + addr);
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return (u8)lo;
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writel(val, ((u8*)adev->iobase) + addr);
++ return;
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writel( val, &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writew(val, ((u8 *)adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writew( val, (u16 *) &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writeb(val, ((u8 *) adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writeb( val, (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ (void) readl(adev->iobase);
++}
++
++INLINE_IO void
++set_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp | bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++INLINE_IO void
++clear_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp & ~bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++/*
++ * Copy from PXA memory to the ACX memory. This assumes both the PXA and ACX
++ * addresses are 32 bit aligned. Count is in bytes.
++ */
++INLINE_IO void
++write_slavemem32 (acx_device_t *adev, u32 slave_address, u32 val)
++{
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, val);
++}
++
++INLINE_IO u32
++read_slavemem32 (acx_device_t *adev, u32 slave_address)
++{
++ u32 val;
++
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ val = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++
++ return val;
++}
++
++INLINE_IO void
++write_slavemem8 (acx_device_t *adev, u32 slave_address, u8 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++INLINE_IO u8
++read_slavemem8 (acx_device_t *adev, u32 slave_address)
++{
++ u8 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xff;
++
++ return val;
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO void
++write_slavemem16 (acx_device_t *adev, u32 slave_address, u16 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xffff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO u16
++read_slavemem16 (acx_device_t *adev, u32 slave_address)
++{
++ u16 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xffff;
++
++ return val;
++}
++
++/*
++ * Copy from slave memory
++ *
++ * TODO - rewrite using address autoincrement, handle partial words
++ */
++void
++copy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count) {
++ u32 tmp = 0;
++ u8 *ptmp = (u8 *) &tmp;
++
++ /*
++ * Right now I'm making the assumption that the destination is aligned, but
++ * I'd better check.
++ */
++ if ((u32) destination & 3) {
++ printk ("acx copy_from_slavemem: warning! destination not word-aligned!\n");
++ }
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ *((u32 *) destination) = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If the word reads above didn't satisfy the count, read one more word
++ * and transfer a byte at a time until the request is satisfied.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *destination++ = *ptmp++;
++ }
++ }
++}
++
++/*
++ * Copy to slave memory
++ *
++ * TODO - rewrite using autoincrement, handle partial words
++ */
++void
++copy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 tmp = 0;
++ u8* ptmp = (u8 *) &tmp;
++ static u8 src[512]; /* make static to avoid huge stack objects */
++
++ /*
++ * For now, make sure the source is word-aligned by copying it to a word-aligned
++ * buffer. Someday rewrite to avoid the extra copy.
++ */
++ if (count > sizeof (src)) {
++ printk ("acx copy_to_slavemem: Warning! buffer overflow!\n");
++ count = sizeof (src);
++ }
++ memcpy (src, source, count);
++ source = src;
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, *((u32 *) source));
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If there are leftovers read the next word from the acx and merge in
++ * what they want to write.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *ptmp++ = *source++;
++ }
++ /*
++ * reset address in case we're currently in auto-increment mode
++ */
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, tmp);
++ udelay (10);
++ }
++
++}
++
++/*
++ * Block copy to slave buffers using memory block chain mode. Copies to the ACX
++ * transmit buffer structure with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) source;
++ static u8 aligned_source[WLAN_A4FR_MAXLEN_WEP_FCS];
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * This should never happen since we're in control of both, but I want to know about
++ * it if it does.
++ */
++ if ((destination & 0x00ffffe0) != destination) {
++ printk ("acx chaincopy: destination block 0x%04x not aligned!\n", destination);
++ }
++ if (count > sizeof aligned_source) {
++ printk( KERN_ERR "chaincopy_to_slavemem overflow!\n" );
++ count = sizeof aligned_source;
++ }
++ if ((u32) source & 3) {
++ memcpy (aligned_source, source, count);
++ data = (u32 *) aligned_source;
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = 2 << 16 | 1 << 2;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = destination & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (destination & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Write the data to the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ writel (*data++, &adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++}
++
++
++/*
++ * Block copy from slave buffers using memory block chain mode. Copies from the ACX
++ * receive buffer structures with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) destination;
++ static u8 aligned_destination[WLAN_A4FR_MAXLEN_WEP_FCS];
++ int saved_count = count;
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * Turns out the network stack sends unaligned things, so fix them before
++ * copying to the ACX.
++ */
++ if ((source & 0x00ffffe0) != source) {
++ printk ("acx chaincopy: source block 0x%04x not aligned!\n", source);
++ dump_acxmem (adev, 0, 0x10000);
++ }
++ if ((u32) destination & 3) {
++ //printk ("acx chaincopy: data destination not word aligned!\n");
++ data = (u32 *) aligned_destination;
++ if (count > sizeof aligned_destination) {
++ printk( KERN_ERR "chaincopy_from_slavemem overflow!\n" );
++ count = sizeof aligned_destination;
++ }
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = (2 << 16) | (1 << 2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = source & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (source & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Read the data from the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ *data++ = readl (&adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++
++ /*
++ * If the destination wasn't aligned, we would have saved it in
++ * the aligned buffer, so copy it where it should go.
++ */
++ if ((u32) destination & 3) {
++ memcpy (destination, aligned_destination, saved_count);
++ }
++}
++
++char
++printable (char c)
++{
++ return ((c >= 20) && (c < 127)) ? c : '.';
++}
++
++#if DUMP_MEM_DEFINED > 0
++static void
++dump_acxmem (acx_device_t *adev, u32 start, int length)
++{
++ int i;
++ u8 buf[16];
++
++ while (length > 0) {
++ printk ("%04x ", start);
++ copy_from_slavemem (adev, buf, start, 16);
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%02x ", buf[i]);
++ }
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%c", printable (buf[i]));
++ }
++ printk ("\n");
++ start += 16;
++ length -= 16;
++ }
++}
++#endif
++
++static void
++enable_acx_irq(acx_device_t *adev);
++static void
++disable_acx_irq(acx_device_t *adev);
++
++/*
++ * Return an acx pointer to the next transmit data block.
++ */
++u32
++allocate_acx_txbuf_space (acx_device_t *adev, int count) {
++ u32 block, next, last_block;
++ int blocks_needed;
++ unsigned long flags;
++
++ spin_lock_irqsave(&adev->txbuf_lock, flags);
++ /*
++ * Take 4 off the memory block size to account for the reserved word at the start of
++ * the block.
++ */
++ blocks_needed = count / (adev->memblocksize - 4);
++ if (count % (adev->memblocksize - 4))
++ blocks_needed++;
++
++ if (blocks_needed <= adev->acx_txbuf_blocks_free) {
++ /*
++ * Take blocks at the head of the free list.
++ */
++ last_block = block = adev->acx_txbuf_free;
++
++ /*
++ * Follow block pointers through the requested number of blocks both to
++ * find the new head of the free list and to set the flags for the blocks
++ * appropriately.
++ */
++ while (blocks_needed--) {
++ /*
++ * Keep track of the last block of the allocation
++ */
++ last_block = adev->acx_txbuf_free;
++
++ /*
++ * Make sure the end control flag is not set.
++ */
++ next = read_slavemem32 (adev, adev->acx_txbuf_free) & 0x7ffff;
++ write_slavemem32 (adev, adev->acx_txbuf_free, next);
++
++ /*
++ * Update the new head of the free list
++ */
++ adev->acx_txbuf_free = next << 5;
++ adev->acx_txbuf_blocks_free--;
++
++ }
++
++ /*
++ * Flag the last block both by clearing out the next pointer
++ * and marking the control field.
++ */
++ write_slavemem32 (adev, last_block, 0x02000000);
++
++ /*
++ * If we're out of buffers make sure the free list pointer is NULL
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ adev->acx_txbuf_free = 0;
++ }
++ }
++ else {
++ block = 0;
++ }
++ spin_unlock_irqrestore (&adev->txbuf_lock, flags);
++ return block;
++}
++
++/*
++ * Return buffer space back to the pool by following the next pointers until we find
++ * the block marked as the end. Point the last block to the head of the free list,
++ * then update the head of the free list to point to the newly freed memory.
++ * This routine gets called in interrupt context, so it shouldn't block to protect
++ * the integrity of the linked list. The ISR already holds the lock.
++ */
++void
++reclaim_acx_txbuf_space (acx_device_t *adev, u32 blockptr) {
++ u32 cur, last, next;
++ unsigned long flags;
++
++ spin_lock_irqsave (&adev->txbuf_lock, flags);
++ if ((blockptr >= adev->acx_txbuf_start) &&
++ (blockptr <= adev->acx_txbuf_start +
++ (adev->acx_txbuf_numblocks - 1) * adev->memblocksize)) {
++ cur = blockptr;
++ do {
++ last = cur;
++ next = read_slavemem32 (adev, cur);
++
++ /*
++ * Advance to the next block in this allocation
++ */
++ cur = (next & 0x7ffff) << 5;
++
++ /*
++ * This block now counts as free.
++ */
++ adev->acx_txbuf_blocks_free++;
++ } while (!(next & 0x02000000));
++
++ /*
++ * last now points to the last block of that allocation. Update the pointer
++ * in that block to point to the free list and reset the free list to the
++ * first block of the free call. If there were no free blocks, make sure
++ * the new end of the list marks itself as truly the end.
++ */
++ if (adev->acx_txbuf_free) {
++ write_slavemem32 (adev, last, adev->acx_txbuf_free >> 5);
++ }
++ else {
++ write_slavemem32 (adev, last, 0x02000000);
++ }
++ adev->acx_txbuf_free = blockptr;
++ }
++ spin_unlock_irqrestore(&adev->txbuf_lock, flags);
++}
++
++/*
++ * Initialize the pieces managing the transmit buffer pool on the ACX. The transmit
++ * buffer is a circular queue with one 32 bit word reserved at the beginning of each
++ * block. The upper 13 bits are a control field, of which only 0x02000000 has any
++ * meaning. The lower 19 bits are the address of the next block divided by 32.
++ */
++void
++init_acx_txbuf (acx_device_t *adev) {
++
++ /*
++ * acx100_s_init_memory_pools set up txbuf_start and txbuf_numblocks for us.
++ * All we need to do is reset the rest of the bookeeping.
++ */
++
++ adev->acx_txbuf_free = adev->acx_txbuf_start;
++ adev->acx_txbuf_blocks_free = adev->acx_txbuf_numblocks;
++
++ /*
++ * Initialization leaves the last transmit pool block without a pointer back to
++ * the head of the list, but marked as the end of the list. That's how we want
++ * to see it, too, so leave it alone. This is only ever called after a firmware
++ * reset, so the ACX memory is in the state we want.
++ */
++
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxmem_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxmem_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxmem_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxmem_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ int count;
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++ fail:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxmem_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxmem_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size, checkMismatch = -1;
++ u32 sum, v32, tmp, id;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++#endif
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ write_flush(adev);
++#endif
++ write_slavemem32 (adev, offset + len - 4, v32);
++
++ id = read_id_register (adev);
++
++ /*
++ * check the data written
++ */
++ tmp = read_slavemem32 (adev, offset + len - 4);
++ if (checkMismatch && (tmp != v32)) {
++ printk ("first data mismatch at 0x%08x good 0x%08x bad 0x%08x id 0x%08x\n",
++ offset + len - 4, v32, tmp, id);
++ checkMismatch = 0;
++ }
++ }
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxmem_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxmem_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ udelay(10);
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++#endif
++ w32 = read_slavemem32 (adev, offset + len - 4);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match\n(0x%08X vs. 0x%08X)!\n"
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxmem_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char *filename = "WLANGEN.BIN";
++#ifdef PATCH_AROUND_BAD_SPOTS
++ u32 offset;
++ int i;
++ /*
++ * arm-linux-objdump -d patch.bin, or
++ * od -Ax -t x4 patch.bin after finding the bounds
++ * of the .text section with arm-linux-objdump -s patch.bin
++ */
++ u32 patch[] = {
++ 0xe584c030, 0xe59fc008,
++ 0xe92d1000, 0xe59fc004, 0xe8bd8000, 0x0000080c,
++ 0x0000aa68, 0x605a2200, 0x2c0a689c, 0x2414d80a,
++ 0x2f00689f, 0x1c27d007, 0x06241e7c, 0x2f000e24,
++ 0xe000d1f6, 0x602e6018, 0x23036468, 0x480203db,
++ 0x60ca6003, 0xbdf0750a, 0xffff0808
++ };
++#endif
++
++ FN_ENTER;
++ /* No combined image; tell common we need the radio firmware, too */
++ adev->need_radio_fw = 1;
++
++ fw_image = acx_s_read_fw(adev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++#ifdef PATCH_AROUND_BAD_SPOTS
++ /*
++ * Only want to do this if the firmware is exactly what we expect for an
++ * iPaq 4700; otherwise, bad things would ensue.
++ */
++ if ((HX4700_FIRMWARE_CHECKSUM == fw_image->chksum) ||
++ (HX4700_ALTERNATE_FIRMWARE_CHECKSUM == fw_image->chksum)) {
++ /*
++ * Put the patch after the main firmware image. 0x950c contains
++ * the ACX's idea of the end of the firmware. Use that location to
++ * load ours (which depends on that location being 0xab58) then
++ * update that location to point to after ours.
++ */
++
++ offset = read_slavemem32 (adev, 0x950c);
++
++ log (L_DEBUG, "acx: patching in at 0x%04x\n", offset);
++
++ for (i = 0; i < sizeof(patch) / sizeof(patch[0]); i++) {
++ write_slavemem32 (adev, offset, patch[i]);
++ offset += sizeof(u32);
++ }
++
++ /*
++ * Patch the instruction at 0x0804 to branch to our ARM patch at 0xab58
++ */
++ write_slavemem32 (adev, 0x0804, 0xea000000 + (0xab58-0x0804-8)/4);
++
++ /*
++ * Patch the instructions at 0x1f40 to branch to our Thumb patch at 0xab74
++ *
++ * 4a00 ldr r2, [pc, #0]
++ * 4710 bx r2
++ * .data 0xab74+1
++ */
++ write_slavemem32 (adev, 0x1f40, 0x47104a00);
++ write_slavemem32 (adev, 0x1f44, 0x0000ab74+1);
++
++ /*
++ * Bump the end of the firmware up to beyond our patch.
++ */
++ write_slavemem32 (adev, 0x950c, offset);
++
++ }
++#endif
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxmem_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("RADIONN.BIN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "RADIO%02x.BIN",
++ adev->radio_type);
++ radio_image = acx_s_read_fw(adev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++/***********************************************************************
++** acxmem_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxmem_l_reset_mac(acx_device_t *adev)
++{
++ int count;
++ FN_ENTER;
++
++ /* halt eCPU */
++ set_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++
++ /* now do soft reset of eCPU, set bit */
++ set_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++
++ /* Windows driver sleeps here for a while with this sequence */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ clear_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++
++ /* now start a burst read from initial EEPROM */
++ set_regbits (adev, IO_ACX_EE_START, 0x1);
++
++ /*
++ * Windows driver sleeps here for a while with this sequence
++ */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* Windows driver writes 0x10000 to register 0x808 here */
++
++ write_reg32 (adev, 0x808, 0x10000);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_verify_init
++*/
++static int
++acxmem_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u32 irqstat = read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if ((irqstat != 0xFFFFFFFF) && (irqstat & HOST_INT_FCS_THRESHOLD)) {
++ result = OK;
++ write_reg32(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxmem_write_cmd_type_status
++*/
++
++static inline void
++acxmem_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ write_slavemem32 (adev, (u32) adev->cmd_area, type | (status << 16));
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxmem_read_cmd_type_status
++*/
++static u32
++acxmem_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = read_slavemem32 (adev, (u32) adev->cmd_area);
++
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxmem_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxmem_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8*) cmd_offs;
++ adev->info_area = (u8*) info_offs;
++ /*
++ log(L_DEBUG, "iobase2=%p\n"
++ */
++ log( L_DEBUG, "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxmem_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++static int
++acxmem_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++ u32 tmp;
++
++ FN_ENTER;
++ /*
++ write_reg32 (adev, IO_ACX_SLV_MEM_CP, 0);
++ */
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ /* Windows driver does some funny things here */
++ /*
++ * clear bit 0x200 in register 0x2A0
++ */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /*
++ * Set bit 0x200 in ACX_GPIO_OUT
++ */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++
++ /*
++ * read register 0x900 until its value is 0x8400104C, sleeping
++ * in between reads if it's not immediate
++ */
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ count = 500;
++ while (count-- && (tmp != ACX_VENDOR_ID)) {
++ mdelay (10);
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ }
++
++ /* end what Windows driver does */
++
++ acxmem_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg32(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++ printk("ACX radio type 0x%02x\n", (hardware_info >> 8) & 0xff);
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxmem_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ clear_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* Windows driver clears bit 0x200 in register 0x2A0 here */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /* Windows driver sets bit 0x200 in ACX_GPIO_OUT here */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++ /* wait for eCPU bootup */
++ if (OK != acxmem_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++ init_mboxes(adev);
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxmem_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxmem_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ int i, j;
++ u8 *p;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxmem_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++#if DUMP_IF_SLOW > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("not idle");
++#endif
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /*
++ * slave memory version
++ */
++ copy_to_slavemem (adev, (u32) (adev->cmd_area + 4), buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxmem_write_cmd_type_status(adev, cmd, 0);
++
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxmem_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ printk("%s: "FUNC"(): device irq status 0x%04x\n",
++ devname, read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES));
++ printk("%s: "FUNC"(): IO_ACX_IRQ_MASK 0x%04x IO_ACX_FEMR 0x%04x\n",
++ devname,
++ read_reg16 (adev, IO_ACX_IRQ_MASK),
++ read_reg16 (adev, IO_ACX_FEMR));
++ if (read_reg16 (adev, IO_ACX_IRQ_MASK) == 0xffff) {
++ printk ("acxmem: firmware probably hosed - reloading\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ {
++ pm_message_t state;
++ /* acxmem_e_suspend (resume_pdev, state); */
++ acxmem_e_suspend (adev->ndev , state);
++ }
++#else
++ acxmem_e_suspend (adev, 0);
++#endif
++ {
++ resume_ndev = adev->ndev;
++ fw_resumer (NULL);
++ }
++ }
++
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buflen > 388) {
++ /*
++ * 388 is maximum command length
++ */
++ printk ("invalid length 0x%08x\n", buflen);
++ buflen = 388;
++ }
++ p = (u8 *) buffer;
++ for (i = 0; i < buflen; i+= 16) {
++ printk ("%04x:", i);
++ for (j = 0; (j < 16) && (i+j < buflen); j++) {
++ printk (" %02x", *p++);
++ }
++ printk ("\n");
++ }
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ copy_from_slavemem (adev, buffer, (u32) (adev->cmd_area + 4), buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#if defined(NONESSENTIAL_FEATURES)
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxmem_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++/***********************************************************************
++** acxmem_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++void
++acxmem_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ kfree(ptr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_delete_dma_regions
++*/
++static void
++acxmem_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ /*
++ * slave memory interface really doesn't like this.
++ */
++ /*
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++ */
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxmem_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_MEM_CP */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++/*
++ * Most of the acx specific pieces of hardware reset.
++ */
++static int
++acxmem_complete_hw_reset (acx_device_t *adev)
++{
++ acx111_ie_configoption_t co;
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxmem_s_reset_dev (adev))
++ return -1;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ copy_from_slavemem (adev, (u8*) &co, (u32) adev->cmd_area, sizeof (co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ return -3;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++ /*
++ * Set up transmit buffer administration
++ */
++ init_acx_txbuf (adev);
++
++ /*
++ * Windows driver writes 0x01000000 to register 0x288, RADIO_CTL, if the form factor
++ * is 3. It also write protects the EEPROM by writing 1<<9 to GPIO_OUT
++ */
++ if (adev->form_factor == 3) {
++ set_regbits (adev, 0x288, 0x01000000);
++ set_regbits (adev, 0x298, 1<<9);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxmem_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ return -2;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ return 0;
++}
++
++static int acx_init_netdev(struct net_device *ndev, struct device *dev, int base_addr, int addr_size, int irq)
++{
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ u8 chip_type;
++ acx_device_t *adev = NULL;
++
++ FN_ENTER;
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = CHIPTYPE_ACX100;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ printk("acx: found %s-based wireless network card\n", chip_name);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++
++ dev_set_drvdata(dev, ndev);
++
++ ether_setup(ndev);
++
++ ndev->irq = irq;
++
++ ndev->base_addr = base_addr;
++printk (KERN_INFO "memwinbase=%lx memwinsize=%u\n",memwin.Base,memwin.Size);
++ if (addr_size == 0 || ndev->irq == 0)
++ goto fail_hw_params;
++ ndev->open = &acxmem_e_open;
++ ndev->stop = &acxmem_e_close;
++ //pdev->dev.release = &acxmem_e_release;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxmem_i_set_multicast_list;
++ ndev->tx_timeout = &acxmem_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ spin_lock_init(&adev->txbuf_lock);
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->dev = dev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_MEM;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = (volatile u32 *) ndev->base_addr;
++ adev->iobase = (volatile u32 *) ioremap_nocache (ndev->base_addr, addr_size);
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#if defined(NONESSENTIAL_FEATURES)
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ // need to fix that @@
++ SET_NETDEV_DEV(ndev, dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", ndev->irq);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ if (OK != acxmem_complete_hw_reset (adev))
++ goto fail_reset;
++
++ /*
++ * Set up default things for most of the card settings.
++ */
++ acx_s_set_defaults(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /*
++ * Set up a default monitor type so that poor combinations of initialization
++ * sequences in monitor mode don't end up destroying the hardware type.
++ */
++ adev->monitor_type = ARPHRD_ETHER;
++
++ /*
++ * Register to receive inetaddr notifier changes. This will allow us to
++ * catch if the user changes the MAC address of the interface.
++ */
++ register_netdevice_notifier(&acx_netdev_notifier);
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxmem_s_delete_dma_regions(adev);
++
++fail_reset:
++fail_hw_params:
++ free_netdev(ndev);
++fail_unknown_chiptype:
++
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static int __devexit
++acxmem_e_remove(struct pcmcia_device *link)
++{
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = ((local_info_t*)link->priv)->ndev;
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxmem_l_power_led(adev, 0);
++
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxmem_l_reset_mac(adev);
++ } else {
++ u16 temp;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++
++ /*
++ * Unregister the notifier chain
++ */
++ unregister_netdevice_notifier(&acx_netdev_notifier);
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxmem_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxmem_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ acxmem_s_delete_dma_regions(adev);
++
++ /* finally, clean up PCI bus state */
++ if (adev->iobase) iounmap((void *)adev->iobase);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ printk ("e_remove done\n");
++end:
++ FN_EXIT0;
++
++ return 0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend( struct net_device *ndev, pm_message_t state)
++#else
++acxmem_e_suspend( struct net_device *ndev, u32 state)
++#endif
++{
++ FN_ENTER;
++ acx_device_t *adev;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++ // @@ need to get it from link or something like that
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(adev->ndev); /* this one cannot sleep */
++ acxmem_s_down(adev->ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxmem_s_delete_dma_regions(adev);
++
++ /*
++ * Turn the ACX chip off.
++ */
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++static void
++fw_resumer(struct work_struct *notused)
++{
++ acx_device_t *adev;
++ struct net_device *ndev = resume_ndev;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ return;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ /*
++ * Turn on the ACX.
++ */
++
++ acxmem_complete_hw_reset (adev);
++
++ /*
++ * done by acx_s_set_defaults for initial startup
++ */
++ acxmem_set_interrupt_mask(adev);
++
++ printk ("rsm: bringing up interface\n");
++ SET_BIT (adev->set_mask, GETSET_ALL);
++ acxmem_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-)
++ */
++ /* - most settings updated in acxmem_s_up()
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ */
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++ acx_sem_unlock(adev);
++}
++
++DECLARE_WORK( fw_resume_work, fw_resumer );
++
++static int
++acxmem_e_resume(struct pcmcia_device *link)
++{
++ FN_ENTER;
++
++ //resume_pdev = pdev;
++ schedule_work( &fw_resume_work );
++
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxmem_s_up
++**
++** This function is called by acxmem_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_down
++**
++** This disables the netdevice
++**
++** Side effects:
++** - disables on-card interrupt request
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++#if 0
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxmem_i_interrupt, SA_INTERRUPT, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ set_irq_type (ndev->irq, IRQT_FALLING);
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++#endif
++
++ /* ifup device */
++ acxmem_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxmem_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxmem_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxmem_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxmem_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxmem_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxmem_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxmem_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ register rxdesc_t *rxdesc;
++ unsigned count, tail;
++ u32 addr;
++ u8 Ctl_8;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ /*
++ * Unlike the PCI interface, where the ACX can write directly to
++ * the host descriptors, on the slave memory interface we have to
++ * pull these. All we really need to do is check the Ctl_8 field
++ * in the rx descriptor on the ACX, which should be 0x11000000 if
++ * we should process it.
++ */
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_HOSTOWN) &&
++ (Ctl_8 & DESC_CTL_ACXDONE))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_8=%02X\n", tail, Ctl_8);
++ /*
++ * If the ACX has CTL_RECLAIM set on this descriptor there
++ * is no buffer associated; it just wants us to tell it to
++ * reclaim the memory.
++ */
++ if (!(Ctl_8 & DESC_CTL_RECLAIM)) {
++
++ /*
++ * slave interface - pull data now
++ */
++ hostdesc->length = read_slavemem16 (adev, (u32) &(rxdesc->total_length));
++
++ /*
++ * hostdesc->data is an rxbuffer_t, which includes header information,
++ * but the length in the data packet doesn't. The header information
++ * takes up an additional 12 bytes, so add that to the length we copy.
++ */
++ addr = read_slavemem32 (adev, (u32) &(rxdesc->ACXMemPtr));
++ if (addr) {
++ /*
++ * How can &(rxdesc->ACXMemPtr) above ever be zero? Looks like we
++ * get that now and then - try to trap it for debug.
++ */
++ if (addr & 0xffff0000) {
++ printk("rxdesc 0x%08x\n", (u32) rxdesc);
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("Bad access!");
++ }
++ chaincopy_from_slavemem (adev, (u8 *) hostdesc->data, addr,
++ hostdesc->length +
++ (u32) &((rxbuffer_t *)0)->hdr_a3);
++ acx_l_process_rxbuf(adev, hostdesc->data);
++ }
++ }
++ else {
++ printk ("rx reclaim only!\n");
++ }
++
++ hostdesc->Status = 0;
++
++ /*
++ * Let the ACX know we're done.
++ */
++ CLEAR_BIT (Ctl_8, DESC_CTL_HOSTOWN);
++ SET_BIT (Ctl_8, DESC_CTL_HOSTDONE);
++ SET_BIT (Ctl_8, DESC_CTL_RECLAIM);
++ write_slavemem8 (adev, (u32) &rxdesc->Ctl_8, Ctl_8);
++
++ /*
++ * Now tell the ACX we've finished with the receive buffer so
++ * it can finish the reclaim.
++ */
++ write_reg16 (adev, IO_ACX_INT_TRIG, INT_TRIG_RXPRC);
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++
++ /* if next descriptor is empty, then bail out */
++ if (!(Ctl_8 & DESC_CTL_HOSTOWN) || !(Ctl_8 & DESC_CTL_ACXDONE))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = read_slavemem32 (adev, (u32) adev->info_area);
++
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ write_slavemem32(adev, (u32) adev->info_area, info_type | 0x00010000);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ printk(" Rx_Complete");
++ }
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxmem_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxmem_i_interrupt(int irq, void *dev_id)
++#else
++acxmwm_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_DATA) {
++ log(L_IRQ, "got Rx_Data IRQ\n");
++ acxmem_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxmem_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxmem_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ /* | HOST_INT_RX_DATA */
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ | HOST_INT_RX_COMPLETE
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxmem_l_power_led
++*/
++void
++acxmem_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ printk ("Interrogating queue config\n");
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++ printk ("done with queue config\n");
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ printk ("Interrogating mem config options\n");
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++ printk ("done with mem config options\n");
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ printk ("Interrogating mem map\n");
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++ printk ("done with mem map\n");
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ printk ("Interrogating rxconfig\n");
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++ printk ("done with queue rxconfig\n");
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ printk ("Interrogating fcs err count\n");
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++ printk ("done with err count\n");
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ printk ("Interrogating rate fallback\n");
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++ printk ("done with rate fallback\n");
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++/***************************************************************
++** acxmem_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxmem_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++ static int txattempts = 0;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ /*
++ * Probably the ACX ignored a transmit attempt and now there's a packet
++ * sitting in the queue we think should be transmitting but the ACX doesn't
++ * know about.
++ * On the first pass, send the ACX a TxProc interrupt to try moving
++ * things along, and if that doesn't work (ie, we get called again) completely
++ * flush the transmit queue.
++ */
++ if (txattempts < 10) {
++ txattempts++;
++ printk ("acx: trying to wake up ACX\n");
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev); }
++ else {
++ txattempts = 0;
++ printk ("acx: flushing transmit queue.\n");
++ acxmem_l_clean_txdesc_emergency (adev);
++ }
++ txdesc = NULL;
++ goto end;
++ }
++
++ /*
++ * Make a quick check to see if there is transmit buffer space on
++ * the ACX. This can't guarantee there is enough space for the packet
++ * since we don't yet know how big it is, but it will prevent at least some
++ * annoyances.
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ /*
++ * txdesc points to ACX memory
++ */
++ txdesc = get_txdesc(adev, head);
++ ctl8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++
++ /*
++ * If we don't own the buffer (HOSTOWN) it is certainly not free; however,
++ * we may have previously thought we had enough memory to send
++ * a packet, allocated the buffer then gave up when we found not enough
++ * transmit buffer space on the ACX. In that case, HOSTOWN and
++ * ACXDONE will both be set.
++ */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_ACXDONE_HOSTOWN);
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***************************************************************
++** acxmem_l_dealloc_tx
++** Clears out a previously allocatedvoid acxmem_l_dealloc_tx(tx_t *tx_opaque);
++ transmit descriptor. The ACX
++** can get confused if we skip transmit descriptors in the queue,
++** so when we don't need a descriptor return it to its original
++** state and move the queue head pointer back.
++**
++*/
++void
++acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++ /*
++ * txdesc is the address of the descriptor on the ACX.
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txdesc_t tmptxdesc;
++ int index;
++
++ memset (&tmptxdesc, 0, sizeof(tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ /*
++ * Clear out all of the transmit descriptor except for the next pointer
++ */
++ copy_to_slavemem (adev, (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc));
++
++ /*
++ * This is only called immediately after we've allocated, so we should
++ * be able to set the head back to this descriptor.
++ */
++ index = ((u8*) txdesc - (u8*)adev->txdesc_start) / adev->txdesc_size;
++ printk ("acx_dealloc: moving head from %d to %d\n", adev->tx_head, index);
++ adev->tx_head = index;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxmem_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxmem_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxmem_update_queue_indicator (acx_device_t *adev, int txqueue)
++{
++#ifdef USING_MORE_THAN_ONE_TRANSMIT_QUEUE
++ u32 indicator;
++ unsigned long flags;
++ int count;
++
++ /*
++ * Can't handle an interrupt while we're fiddling with the ACX's lock,
++ * according to TI. The ACX is supposed to hold fw_lock for at most
++ * 500ns.
++ */
++ local_irq_save (flags);
++
++ /*
++ * Wait for ACX to release the lock (at most 500ns).
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++ if (count < 50) {
++
++ /*
++ * Take out the host lock - anything non-zero will work, so don't worry about
++ * be/le
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 1);
++
++ /*
++ * Avoid a race condition
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++
++ if (count < 50) {
++ /*
++ * Mark the queue active
++ */
++ indicator = read_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator));
++ indicator |= cpu_to_le32 (1 << txqueue);
++ write_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator), indicator);
++ }
++
++ /*
++ * Release the host lock
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 0);
++
++ }
++
++ /*
++ * Restore interrupts
++ */
++ local_irq_restore (flags);
++#endif
++}
++
++void
++acxmem_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ /*
++ * txdesc is the address on the ACX
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++ u32 addr;
++
++ FN_ENTER;
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), cpu_to_le16(len));
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ write_slavemem8 (adev, (u32) &(txdesc->u.r1.rate), rate_100);
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_FIRSTFRAG);
++
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++
++ /*
++ * Since we're not using autodma copy the packet data to the acx now.
++ * Even host descriptors point to the packet header, and the odd indexed
++ * descriptor following points to the packet data.
++ *
++ * The first step is to find free memory in the ACX transmit buffers.
++ * They don't necessarily map one to one with the transmit queue entries,
++ * so search through them starting just after the last one used.
++ */
++ addr = allocate_acx_txbuf_space (adev, len);
++ if (addr) {
++ chaincopy_to_slavemem (adev, addr, hostdesc1->data, len);
++ }
++ else {
++ /*
++ * Bummer. We thought we might have enough room in the transmit
++ * buffers to send this packet, but it turns out we don't. alloc_tx
++ * has already marked this transmit descriptor as HOSTOWN and ACXDONE,
++ * which means the ACX will hang when it gets to this descriptor unless
++ * we do something about it. Having a bubble in the transmit queue just
++ * doesn't seem to work, so we have to reset this transmit queue entry's
++ * state to its original value and back up our head pointer to point
++ * back to this entry.
++ */
++ hostdesc1->length = 0;
++ hostdesc2->length = 0;
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG);
++ adev->tx_head = ((u8*) txdesc - (u8*) adev->txdesc_start) / adev->txdesc_size;
++ goto end;
++ }
++ /*
++ * Tell the ACX where the packet is.
++ */
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), addr);
++
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ //wmb();
++
++ /* write back modified flags */
++ /*
++ * At this point Ctl_8 should just be FIRSTFRAG
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl2_8),Ctl2_8);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), Ctl_8);
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /*
++ * Update the queue indicator to say there's data on the first queue.
++ */
++ acxmem_update_queue_indicator (adev, 0);
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate)),
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u8 Ctl_8;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ printk(" %02X", Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxmem_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100, Ctl_8;
++ u32 acxmem;
++ txdesc_t tmptxdesc;
++
++ FN_ENTER;
++
++ /*
++ * Set up a template descriptor for re-initialization. The only
++ * things that get set are Ctl_8 and the rate, and the rate defaults
++ * to 1Mbps.
++ */
++ memset (&tmptxdesc, 0, sizeof (tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = read_slavemem8 (adev, (u32) &(txdesc->error));
++ ack_failures = read_slavemem8 (adev, (u32) &(txdesc->ack_failures));
++ rts_failures = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures));
++ rts_ok = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok));
++ r100 = read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate));
++ r111 = le16_to_cpu(read_slavemem16 (adev, (u32) &(txdesc->u.r2.rate111)));
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /*
++ * Free up the transmit data buffers
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ /* ...and free the desc by clearing all the fields
++ except the next pointer */
++ copy_to_slavemem (adev,
++ (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc)
++ );
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxmem_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u32 acxmem;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ write_slavemem8 (adev, (u32) &(txdesc->ack_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->error), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN);
++
++ /*
++ * Clean up the memory allocated on the ACX for this transmit descriptor.
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), 0);
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++ ptr = kmalloc (size, GFP_KERNEL);
++ /*
++ * The ACX can't use the physical address, so we'll have to fake it
++ * later and it might be handy to have the virtual address.
++ */
++ *phy = (dma_addr_t) NULL;
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++/*
++ * In the generic slave memory access mode, most of the stuff in
++ * the txhostdesc_t is unused. It's only here because the rest of
++ * the ACX driver expects it to be since the PCI version uses indirect
++ * host memory organization with DMA. Since we're not using DMA the
++ * only use we have for the host descriptors is to store the packets
++ * on the way out.
++ */
++static int
++acxmem_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ txbuf = adev->txbuf_start;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxmem_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ hostdesc = adev->rxhostdesc_start;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ rxbuf++;
++ hostdesc++;
++ }
++ hostdesc--;
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_hostdesc_queues
++*/
++int
++acxmem_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxmem_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxmem_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxmem_create_tx_desc_queue
++*/
++static void
++acxmem_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ u32 clr;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ /*
++ * This refers to an ACX address, not one of ours
++ */
++ adev->txdesc_start = (txdesc_t *) tx_queue_start;
++
++ log(L_DEBUG, "adev->txdesc_start=%p\n",
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++
++ /*
++ * adev->txdesc_start refers to device memory, so we can't write
++ * directly to it.
++ */
++ clr = (u32) adev->txdesc_start;
++ while (clr < (u32) adev->txdesc_start + (TX_CNT * sizeof(*txdesc))) {
++ write_slavemem32 (adev, clr, 0);
++ clr += 4;
++ }
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* initialise ctl */
++ /*
++ * No auto DMA here
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8),
++ (u8) (DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG));
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++
++ /* point to next txdesc */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) txdesc + adev->txdesc_size));
++
++ /* go to the next one */
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 (tx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_rx_desc_queue
++*/
++static void
++acxmem_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) rx_queue_start;
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ acx2cpu(rxdesc->pNextDesc);
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ mem_offs = (u32) adev->rxdesc_start;
++ while (mem_offs < (u32) adev->rxdesc_start + (RX_CNT * sizeof (*rxdesc))) {
++ write_slavemem32 (adev, mem_offs, 0);
++ mem_offs += 4;
++ }
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ /* point to next rxdesc */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) rxdesc + sizeof(*rxdesc)));
++ /* go to the next one */
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 (rx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_desc_queues
++*/
++void
++acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ u32 *p;
++ int i;
++
++ acxmem_create_tx_desc_queue(adev, tx_queue_start);
++ acxmem_create_rx_desc_queue(adev, rx_queue_start);
++ p = (u32 *) adev->acx_queue_indicator;
++ for (i = 0; i < 4; i++) {
++ write_slavemem32 (adev, (u32) p, 0);
++ p++;
++ }
++}
++
++
++/***************************************************************
++** acxmem_s_proc_diag_output
++*/
++char*
++acxmem_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ txdesc_t *txdesc;
++ u8 Ctl_8;
++ rxdesc_t *rxdesc;
++ int i;
++ u32 tmp;
++ txdesc_t txd;
++ u8 buf[0x200];
++ int j, k;
++
++ FN_ENTER;
++
++#if DUMP_MEM_DURING_DIAG > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("dump finished");
++#endif
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxdesc = adev->rxdesc_start;
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ Ctl_8 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u (%02x) FULL%s\n", i, Ctl_8, rtl);
++ else
++ p += sprintf(p, "%02u (%02x) empty%s\n", i, Ctl_8, rtl);
++ rxdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++
++ p += sprintf(p, "** Tx buf %d blocks total, %d available, free list head %04x\n",
++ adev->acx_txbuf_numblocks, adev->acx_txbuf_blocks_free, adev->acx_txbuf_free);
++ txdesc = adev->txdesc_start;
++ if (txdesc) {
++ for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ copy_from_slavemem (adev, (u8 *) &txd, (u32) txdesc, sizeof (txd));
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u ready to free (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u available (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u busy (%02X)%s%s", i, Ctl_8, thd, ttl);
++ tmp = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (tmp) {
++ p += sprintf (p, " %04x", tmp);
++ while ((tmp = read_slavemem32 (adev, (u32) tmp)) != 0x02000000) {
++ tmp <<= 5;
++ p += sprintf (p, " %04x", tmp);
++ }
++ }
++ p += sprintf (p, "\n");
++ p += sprintf (p, " %04x: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x\n"
++ "%02x %02x %02x %02x %04x\n",
++ (u32) txdesc,
++ txd.pNextDesc.v, txd.HostMemPtr.v, txd.AcxMemPtr.v, txd.tx_time,
++ txd.total_length, txd.Reserved,
++ txd.dummy[0], txd.dummy[1], txd.dummy[2], txd.dummy[3],
++ txd.Ctl_8, txd.Ctl2_8, txd.error, txd.ack_failures,
++ txd.u.rts.rts_failures, txd.u.rts.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl,
++ txd.queue_info
++ );
++ if (txd.AcxMemPtr.v) {
++ copy_from_slavemem (adev, buf, txd.AcxMemPtr.v, sizeof (buf));
++ for (j = 0; (j < txd.total_length) && (j<(sizeof(buf)-4)); j+=16) {
++ p += sprintf (p, " ");
++ for (k = 0; (k < 16) && (j+k < txd.total_length); k++) {
++ p += sprintf (p, " %02x", buf[j+k+4]);
++ }
++ p += sprintf (p, "\n");
++ }
++ }
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ }
++
++ p += sprintf(p,
++ "\n"
++ "** Generic slave data **\n"
++ "irq_mask 0x%04x irq_status 0x%04x irq on acx 0x%04x\n"
++ "txbuf_start 0x%p, txbuf_area_size %u\n"
++ "txdesc_size %u, txdesc_start 0x%p\n"
++ "txhostdesc_start 0x%p, txhostdesc_area_size %u\n"
++ "txbuf start 0x%04x, txbuf size %d\n"
++ "rxdesc_start 0x%p\n"
++ "rxhostdesc_start 0x%p, rxhostdesc_area_size %u\n"
++ "rxbuf_start 0x%p, rxbuf_area_size %u\n",
++ adev->irq_mask, adev->irq_status, read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES),
++ adev->txbuf_start, adev->txbuf_area_size,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ adev->acx_txbuf_start, adev->acx_txbuf_numblocks * adev->memblocksize,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ adev->rxbuf_start, adev->rxbuf_area_size);
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxmem_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxmem_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_OVERFLOW
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_BEACON_MISSED */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ /*
++ * The hx4700 EEPROM, at least, only supports 1 power setting. The configure
++ * routine matches the PA bias with the gain, so just use its default value.
++ * The values are: 0x2b for the gain and 0x03 for the PA bias. The firmware
++ * writes the gain level to the Tx gain control DAC and the PA bias to the Maxim
++ * radio's PA bias register. The firmware limits itself to 0 - 64 when writing to the
++ * gain control DAC.
++ *
++ * Physically between the ACX and the radio, higher Tx gain control DAC values result
++ * in less power output; 0 volts to the Maxim radio results in the highest output power
++ * level, which I'm assuming matches up with 0 in the Tx Gain DAC register.
++ *
++ * Although there is only the 1 power setting, one of the radio firmware functions adjusts
++ * the transmit power level up and down. That function is called by the ACX FIQ handler
++ * under certain conditions.
++ */
++ tx_level.level = 1;
++ //return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxmem_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++
++ return 0;
++}
++
++void acxmem_e_release(struct device *dev) {
++}
++
++/***********************************************************************
++** acx_cs part
++**
++** called by pcmcia card service
++*/
++
++/*
++ The event() function is this driver's Card Services event handler.
++ It will be called by Card Services when an appropriate card status
++ event is received. The config() and release() entry points are
++ used to configure or release a socket, in response to card
++ insertion and ejection events. They are invoked from the acx_cs
++ event handler.
++*/
++
++static int acx_cs_config(struct pcmcia_device *link);
++static void acx_cs_release(struct pcmcia_device *link);
++
++/*
++ The attach() and detach() entry points are used to create and destroy
++ "instances" of the driver, where each instance represents everything
++ needed to manage one actual PCMCIA card.
++*/
++
++static void acx_cs_detach(struct pcmcia_device *p_dev);
++
++/*
++ You'll also need to prototype all the functions that will actually
++ be used to talk to your device. See 'pcmem_cs' for a good example
++ of a fully self-sufficient driver; the other drivers rely more or
++ less on other parts of the kernel.
++*/
++
++/*
++ A linked list of "instances" of the acxnet device. Each actual
++ PCMCIA card corresponds to one device instance, and is described
++ by one struct pcmcia_device structure (defined in ds.h).
++
++ You may not want to use a linked list for this -- for example, the
++ memory card driver uses an array of struct pcmcia_device pointers, where minor
++ device numbers are used to derive the corresponding array index.
++*/
++
++/*
++ A driver needs to provide a dev_node_t structure for each device
++ on a card. In some cases, there is only one device per card (for
++ example, ethernet cards, modems). In other cases, there may be
++ many actual or logical devices (SCSI adapters, memory cards with
++ multiple partitions). The dev_node_t structures need to be kept
++ in a linked list starting at the 'dev' field of a struct pcmcia_device
++ structure. We allocate them in the card's private data structure,
++ because they generally shouldn't be allocated dynamically.
++
++ In this case, we also provide a flag to indicate if a device is
++ "stopped" due to a power management event, or card ejection. The
++ device IO routines can use a flag like this to throttle IO to a
++ card that is not ready to accept it.
++*/
++
++
++/*======================================================================
++
++ acx_attach() creates an "instance" of the driver, allocating
++ local data structures for one device. The device is registered
++ with Card Services.
++
++ The dev_link structure is initialized, but we don't actually
++ configure the card at this point -- we wait until we receive a
++ card insertion event.
++
++ ======================================================================*/
++
++static int acx_cs_probe(struct pcmcia_device *link)
++{
++ local_info_t *local;
++ struct net_device *ndev;
++
++ DEBUG(0, "acx_attach()\n");
++
++ ndev = alloc_netdev(sizeof(acx_device_t), "wlan%d", dummy_netdev_init);
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ return -ENOMEM;
++ }
++
++ /* Interrupt setup */
++ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
++ link->irq.IRQInfo1 = IRQ_LEVEL_ID;
++ link->irq.Handler = acxmem_i_interrupt;
++ link->irq.Instance = ndev;
++
++ /*
++ General socket configuration defaults can go here. In this
++ client, we assume very little, and rely on the CIS for almost
++ everything. In most clients, many details (i.e., number, sizes,
++ and attributes of IO windows) are fixed by the nature of the
++ device, and can be hard-wired here.
++ */
++ link->conf.Attributes = CONF_ENABLE_IRQ;
++ link->conf.IntType = INT_MEMORY_AND_IO;
++ link->conf.Present = PRESENT_OPTION | PRESENT_COPY;
++
++ /* Allocate space for private device-specific data */
++ local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
++ if (!local) {
++ printk(KERN_ERR "acx_cs: no memory for new device\n");
++ return -ENOMEM;
++ }
++ local->ndev = ndev;
++
++ link->priv = local;
++
++ return acx_cs_config(link);
++} /* acx_attach */
++
++/*======================================================================
++
++ This deletes a driver "instance". The device is de-registered
++ with Card Services. If it has been released, all local data
++ structures are freed. Otherwise, the structures will be freed
++ when the device is released.
++
++ ======================================================================*/
++
++static void acx_cs_detach(struct pcmcia_device *link)
++{
++ DEBUG(0, "acx_detach(0x%p)\n", link);
++
++
++ if ( ((local_info_t*)link->priv)->ndev ) {
++ acxmem_e_close( ((local_info_t*)link->priv)->ndev );
++ }
++
++ acx_cs_release(link);
++
++ ((local_info_t*)link->priv)->ndev = NULL;
++
++ kfree(link->priv);
++} /* acx_detach */
++
++/*======================================================================
++
++ acx_config() is scheduled to run after a CARD_INSERTION event
++ is received, to configure the PCMCIA socket, and to make the
++ device available to the system.
++
++ ======================================================================*/
++
++#define CS_CHECK(fn, ret) \
++do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
++
++static int acx_cs_config(struct pcmcia_device *link)
++{
++ tuple_t tuple;
++ cisparse_t parse;
++ local_info_t *local = link->priv;
++ int last_fn, last_ret;
++ u_char buf[64];
++ win_req_t req;
++ memreq_t map;
++// int i;
++// acx_device_t *adev;
++
++// adev = (acx_device_t *)link->priv;
++
++ DEBUG(0, "acx_cs_config(0x%p)\n", link);
++
++ /*
++ In this loop, we scan the CIS for configuration table entries,
++ each of which describes a valid card configuration, including
++ voltage, IO window, memory window, and interrupt settings.
++
++ We make no assumptions about the card to be configured: we use
++ just the information available in the CIS. In an ideal world,
++ this would work for any PCMCIA card, but it requires a complete
++ and accurate CIS. In practice, a driver usually "knows" most of
++ these things without consulting the CIS, and most client drivers
++ will only use the CIS to fill in implementation-defined details.
++ */
++ tuple.Attributes = 0;
++ tuple.TupleData = (cisdata_t *)buf;
++ tuple.TupleDataMax = sizeof(buf);
++ tuple.TupleOffset = 0;
++ tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
++
++ /* don't trust the CIS on this; Linksys got it wrong */
++ //link->conf.Present = 0x63;
++
++ CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
++ while (1) {
++ cistpl_cftable_entry_t dflt = { 0 };
++ cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
++ if (pcmcia_get_tuple_data(link, &tuple) != 0 ||
++ pcmcia_parse_tuple(link, &tuple, &parse) != 0)
++ goto next_entry;
++
++ if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
++ if (cfg->index == 0) goto next_entry;
++ link->conf.ConfigIndex = cfg->index;
++
++ /* Does this card need audio output? */
++ if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
++ link->conf.Attributes |= CONF_ENABLE_SPKR;
++ link->conf.Status = CCSR_AUDIO_ENA;
++ }
++
++ /* Use power settings for Vcc and Vpp if present */
++ /* Note that the CIS values need to be rescaled */
++ if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
++ link->conf.Vpp =
++ cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
++ else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
++ link->conf.Vpp =
++ dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
++
++ /* Do we need to allocate an interrupt? */
++ if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1)
++ link->conf.Attributes |= CONF_ENABLE_IRQ;
++ if ((cfg->mem.nwin > 0) || (dflt.mem.nwin > 0)) {
++ cistpl_mem_t *mem =
++ (cfg->mem.nwin) ? &cfg->mem : &dflt.mem;
++// req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_AM|WIN_ENABLE|WIN_USE_WAIT;
++ req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM|WIN_ENABLE|WIN_USE_WAIT;
++ req.Base = mem->win[0].host_addr;
++ req.Size = mem->win[0].len;
++ req.Size=0x1000;
++ req.AccessSpeed = 0;
++ if (pcmcia_request_window(&link, &req, &link->win) != 0)
++ goto next_entry;
++ map.Page = 0; map.CardOffset = mem->win[0].card_addr;
++ if (pcmcia_map_mem_page(link->win, &map) != 0)
++ goto next_entry;
++ else
++ printk(KERN_INFO "MEMORY WINDOW FOUND!!!\n");
++ }
++ /* If we got this far, we're cool! */
++ break;
++
++ next_entry:
++ CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(link, &tuple));
++ }
++
++ if (link->conf.Attributes & CONF_ENABLE_IRQ) {
++ printk(KERN_INFO "requesting Irq...\n");
++ CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
++ }
++
++ /*
++ This actually configures the PCMCIA socket -- setting up
++ the I/O windows and the interrupt mapping, and putting the
++ card and host interface into "Memory and IO" mode.
++ */
++ CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
++ DEBUG(0,"RequestConfiguration OK\n");
++
++
++ memwin.Base=req.Base;
++ memwin.Size=req.Size;
++
++ acx_init_netdev(local->ndev, &link->dev, memwin.Base, memwin.Size, link->irq.AssignedIRQ);
++
++#if 1
++ /*
++ At this point, the dev_node_t structure(s) need to be
++ initialized and arranged in a linked list at link->dev_node.
++ */
++ strcpy(local->node.dev_name, local->ndev->name );
++ local->node.major = local->node.minor = 0;
++ link->dev_node = &local->node;
++
++ /* Finally, report what we've done */
++ printk(KERN_INFO "%s: index 0x%02x: ",
++ local->ndev->name, link->conf.ConfigIndex);
++#endif
++ if (link->conf.Attributes & CONF_ENABLE_IRQ)
++ printk("irq %d", link->irq.AssignedIRQ);
++ if (link->io.NumPorts1)
++ printk(", io 0x%04x-0x%04x", link->io.BasePort1,
++ link->io.BasePort1+link->io.NumPorts1-1);
++ if (link->io.NumPorts2)
++ printk(" & 0x%04x-0x%04x", link->io.BasePort2,
++ link->io.BasePort2+link->io.NumPorts2-1);
++ if (link->win)
++ printk(", mem 0x%06lx-0x%06lx\n", req.Base,
++ req.Base+req.Size-1);
++ return 0;
++
++ cs_failed:
++ cs_error(link, last_fn, last_ret);
++ acx_cs_release(link);
++ return -ENODEV;
++} /* acx_config */
++
++/*======================================================================
++
++ After a card is removed, acx_release() will unregister the
++ device, and release the PCMCIA configuration. If the device is
++ still open, this will be postponed until it is closed.
++
++ ======================================================================*/
++
++static void acx_cs_release(struct pcmcia_device *link)
++{
++ DEBUG(0, "acx_release(0x%p)\n", link);
++ acxmem_e_remove(link);
++ pcmcia_disable_device(link);
++}
++
++static int acx_cs_suspend(struct pcmcia_device *link)
++{
++ local_info_t *local = link->priv;
++
++ pm_message_t state;
++ acxmem_e_suspend ( local->ndev, state);
++ /* Already done in suspend
++ * netif_device_detach(local->ndev); */
++
++ return 0;
++}
++
++static int acx_cs_resume(struct pcmcia_device *link)
++{
++ local_info_t *local = link->priv;
++
++ FN_ENTER;
++ resume_ndev = local->ndev;
++
++ schedule_work( &fw_resume_work );
++
++ /* Already done in suspend
++ if (link->open) {
++ // do we need reset for ACX, if so what function nane is ?
++ //reset_acx_card(local->eth_dev);
++ netif_device_attach(local->ndev);
++ } */
++
++ FN_EXIT0;
++ return 0;
++}
++
++static struct pcmcia_device_id acx_ids[] = {
++ PCMCIA_DEVICE_MANF_CARD(0x0097, 0x8402),
++ PCMCIA_DEVICE_MANF_CARD(0x0250, 0xb001),
++ PCMCIA_DEVICE_NULL,
++};
++MODULE_DEVICE_TABLE(pcmcia, acx_ids);
++
++static struct pcmcia_driver acx_driver = {
++ .owner = THIS_MODULE,
++ .drv = {
++ .name = "acx_cs",
++ },
++ .probe = acx_cs_probe,
++ .remove = acx_cs_detach,
++ .id_table = acx_ids,
++ .suspend = acx_cs_suspend,
++ .resume = acx_cs_resume,
++};
++
++int acx_cs_init(void)
++{
++ /* return success if at least one succeeded */
++ DEBUG(0, "acxcs_init()\n");
++ return pcmcia_register_driver(&acx_driver);
++}
++
++void acx_cs_cleanup(void)
++{
++ pcmcia_unregister_driver(&acx_driver);
++}
++
++/*
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License
++ as published by the Free Software Foundation; either version 2
++ of the License, or (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ In addition:
++
++ Redistribution and use in source and binary forms, with or without
++ modification, are permitted provided that the following conditions
++ are met:
++
++ 1. Redistributions of source code must retain the above copyright
++ notice, this list of conditions and the following disclaimer.
++ 2. Redistributions in binary form must reproduce the above copyright
++ notice, this list of conditions and the following disclaimer in the
++ documentation and/or other materials provided with the distribution.
++ 3. The name of the author may not be used to endorse or promote
++ products derived from this software without specific prior written
++ permission.
++
++ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ POSSIBILITY OF SUCH DAMAGE.
++*/
++
++MODULE_DESCRIPTION( "ACX Cardbus Driver" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/htcsable_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/htcsable_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,118 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HTC Sable
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <linux/mfd/asic3_base.h>
++#include <asm/arch/htcsable-gpio.h>
++#include <asm/arch/htcsable-asic.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_BASE PXA_CS2_PHYS
++
++/*
++off: b15 c8 d3
++on: d3 c8 b5 b5-
++*/
++
++#define GPIO_NR_HTCSABLE_ACX111 111
++
++static int
++htcsable_wlan_stop( void );
++
++static int
++htcsable_wlan_start( void )
++{
++ printk( "htcsable_wlan_start\n" );
++
++ /*asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 0);*/
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_PWR_3, 1<<GPIOC_ACX_PWR_3); /* related to acx */
++ SET_HTCSABLE_GPIO(ACX111, 1);
++ asic3_set_gpio_out_b(&htcsable_asic3.dev, 1<<GPIOB_ACX_PWR_1, 1<<GPIOB_ACX_PWR_1);
++ asic3_set_gpio_out_d(&htcsable_asic3.dev, 1<<GPIOD_ACX_PWR_2, 1<<GPIOD_ACX_PWR_2);
++ mdelay(260);
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 1<<GPIOC_ACX_RESET);
++
++ return 0;
++}
++
++static int
++htcsable_wlan_stop( void )
++{
++ printk( "htcsable_wlan_stop\n" );
++ asic3_set_gpio_out_b(&htcsable_asic3.dev, 1<<GPIOB_ACX_PWR_1, 0);
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 0);
++ asic3_set_gpio_out_d(&htcsable_asic3.dev, 1<<GPIOD_ACX_PWR_2, 0);
++ SET_HTCSABLE_GPIO(ACX111, 0); /* not necessary to power down this one? */
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_PWR_3, 0); /* not necessary to power down this one? */
++
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++// .start = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++// .end = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = htcsable_wlan_start,
++ .stop_hw = htcsable_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++htcsable_wlan_init( void )
++{
++ printk( "htcsable_wlan_init: acx-mem platform_device_register\n" );
++ acx_device.resource[1].start = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOB_IRQ_BASE+GPIOB_ACX_IRQ_N;
++ acx_device.resource[1].end = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOB_IRQ_BASE+GPIOB_ACX_IRQ_N;
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++htcsable_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( htcsable_wlan_init );
++module_exit( htcsable_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for HTC Sable" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/htcuniversal_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/htcuniversal_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,108 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HTC Universal
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_BASE PXA_CS2_PHYS
++
++
++static int
++htcuniversal_wlan_start( void )
++{
++ htcuniversal_egpio_enable(1<<EGPIO6_WIFI_ON);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_PWR1_ON, 1<<GPIOC_WIFI_PWR1_ON);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR3_ON, 1<<GPIOD_WIFI_PWR3_ON);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR2_ON, 1<<GPIOD_WIFI_PWR2_ON);
++ mdelay(100);
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 0);
++ mdelay(100);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 1<<GPIOC_WIFI_RESET);
++ mdelay(100);
++ return 0;
++}
++
++static int
++htcuniversal_wlan_stop( void )
++{
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 0);
++
++ htcuniversal_egpio_disable(1<<EGPIO6_WIFI_ON);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_PWR1_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR2_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR3_ON, 0);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++// .start = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++// .end = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = htcuniversal_wlan_start,
++ .stop_hw = htcuniversal_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++htcuniversal_wlan_init( void )
++{
++ printk( "htcuniversal_wlan_init: acx-mem platform_device_register\n" );
++ acx_device.resource[1].start = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N;
++ acx_device.resource[1].end = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N;
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++htcuniversal_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( htcuniversal_wlan_init );
++module_exit( htcuniversal_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for HTC Universal" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/hx4700_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/hx4700_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,108 @@
++/*
++ * WLAN (TI TNETW1100B) support in the hx470x.
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/leds.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/hx4700-gpio.h>
++#include <asm/arch/hx4700-core.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_OFFSET 0x1000000
++#define WLAN_BASE (PXA_CS5_PHYS+WLAN_OFFSET)
++
++
++static int
++hx4700_wlan_start( void )
++{
++ SET_HX4700_GPIO( WLAN_RESET_N, 0 );
++ mdelay(5);
++ hx4700_egpio_enable( EGPIO0_VCC_3V3_EN );
++ mdelay(100);
++ hx4700_egpio_enable( EGPIO7_VCC_3V3_WL_EN );
++ mdelay(150);
++ hx4700_egpio_enable( EGPIO1_WL_VREG_EN | EGPIO2_VCC_2V1_WL_EN |
++ EGPIO6_WL1V8_EN );
++ mdelay(10);
++ SET_HX4700_GPIO( WLAN_RESET_N, 1 );
++ mdelay(50);
++ led_trigger_event_shared(hx4700_radio_trig, LED_FULL);
++ return 0;
++}
++
++static int
++hx4700_wlan_stop( void )
++{
++ hx4700_egpio_disable( EGPIO0_VCC_3V3_EN | EGPIO1_WL_VREG_EN |
++ EGPIO7_VCC_3V3_WL_EN | EGPIO2_VCC_2V1_WL_EN |
++ EGPIO6_WL1V8_EN );
++ SET_HX4700_GPIO( WLAN_RESET_N, 0 );
++ led_trigger_event_shared(hx4700_radio_trig, LED_OFF);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = HX4700_IRQ(WLAN_IRQ_N),
++ .end = HX4700_IRQ(WLAN_IRQ_N),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = hx4700_wlan_start,
++ .stop_hw = hx4700_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++hx4700_wlan_init( void )
++{
++ printk( "hx4700_wlan_init: acx-mem platform_device_register\n" );
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++hx4700_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( hx4700_wlan_init );
++module_exit( hx4700_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for iPAQ hx4700" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/ioctl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/ioctl.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,2748 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/kernel.h>
++#include <linux/types.h>
++#include <asm/io.h>
++/* #include <asm/uaccess.h> */ /* required for 2.4.x kernels; verify_write() */
++#include <linux/if_arp.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++
++/* channel frequencies
++ * TODO: Currently, every other 802.11 driver keeps its own copy of this. In
++ * the long run this should be integrated into ieee802_11.h or wireless.h or
++ * whatever IEEE802.11x framework evolves */
++static const u16 acx_channel_freq[] = {
++ 2412, 2417, 2422, 2427, 2432, 2437, 2442,
++ 2447, 2452, 2457, 2462, 2467, 2472, 2484,
++};
++
++
++/***********************************************************************
++** acx_ioctl_commit
++*/
++static int
++acx_ioctl_commit(struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_name(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ static const char * const names[] = { "IEEE 802.11b+/g+", "IEEE 802.11b+" };
++
++ strcpy(wrqu->name, names[IS_ACX111(adev) ? 0 : 1]);
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_freq
++*/
++static int
++acx_ioctl_set_freq(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int channel = -1;
++ unsigned int mult = 1;
++ int result;
++
++ FN_ENTER;
++
++ if (wrqu->freq.e == 0 && wrqu->freq.m <= 1000) {
++ /* Setting by channel number */
++ channel = wrqu->freq.m;
++ } else {
++ /* If setting by frequency, convert to a channel */
++ int i;
++
++ for (i = 0; i < (6 - wrqu->freq.e); i++)
++ mult *= 10;
++
++ for (i = 1; i <= 14; i++)
++ if (wrqu->freq.m == acx_channel_freq[i - 1] * mult)
++ channel = i;
++ }
++
++ if (channel > 14) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->channel = channel;
++ /* hmm, the following code part is strange, but this is how
++ * it was being done before... */
++ log(L_IOCTL, "Changing to channel %d\n", channel);
++ SET_BIT(adev->set_mask, GETSET_CHANNEL);
++
++ result = -EINPROGRESS; /* need to call commit handler */
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static inline int
++acx_ioctl_get_freq(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ wrqu->freq.e = 0;
++ wrqu->freq.m = adev->channel;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_mode
++*/
++static int
++acx_ioctl_set_mode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ switch (wrqu->mode) {
++ case IW_MODE_AUTO:
++ adev->mode = ACX_MODE_OFF;
++ break;
++ case IW_MODE_MONITOR:
++ adev->mode = ACX_MODE_MONITOR;
++ break;
++ case IW_MODE_ADHOC:
++ adev->mode = ACX_MODE_0_ADHOC;
++ break;
++ case IW_MODE_INFRA:
++ adev->mode = ACX_MODE_2_STA;
++ break;
++ case IW_MODE_MASTER:
++ printk("acx: master mode (HostAP) is very, very "
++ "experimental! It might work partially, but "
++ "better get prepared for nasty surprises "
++ "at any time\n");
++ adev->mode = ACX_MODE_3_AP;
++ break;
++ case IW_MODE_REPEAT:
++ case IW_MODE_SECOND:
++ default:
++ result = -EOPNOTSUPP;
++ goto end_unlock;
++ }
++
++ log(L_ASSOC, "new adev->mode=%d\n", adev->mode);
++ SET_BIT(adev->set_mask, GETSET_MODE);
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_mode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = 0;
++
++ switch (adev->mode) {
++ case ACX_MODE_OFF:
++ wrqu->mode = IW_MODE_AUTO; break;
++ case ACX_MODE_MONITOR:
++ wrqu->mode = IW_MODE_MONITOR; break;
++ case ACX_MODE_0_ADHOC:
++ wrqu->mode = IW_MODE_ADHOC; break;
++ case ACX_MODE_2_STA:
++ wrqu->mode = IW_MODE_INFRA; break;
++ case ACX_MODE_3_AP:
++ wrqu->mode = IW_MODE_MASTER; break;
++ default:
++ result = -EOPNOTSUPP;
++ }
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_sens(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->sens;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ adev->sensitivity = (1 == vwrq->disabled) ? 0 : vwrq->value;
++ SET_BIT(adev->set_mask, GETSET_SENSITIVITY);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_sens(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->sens;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ if (IS_USB(adev))
++ /* setting the PHY reg via fw cmd doesn't work yet */
++ return -EOPNOTSUPP;
++
++ /* acx_sem_lock(adev); */
++
++ vwrq->value = adev->sensitivity;
++ vwrq->disabled = (vwrq->value == 0);
++ vwrq->fixed = 1;
++
++ /* acx_sem_unlock(adev); */
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_ap
++**
++** Sets the MAC address of the AP to associate with
++*/
++static int
++acx_ioctl_set_ap(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct sockaddr *awrq = &wrqu->ap_addr;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = 0;
++ const u8 *ap;
++
++ FN_ENTER;
++ if (NULL == awrq) {
++ result = -EFAULT;
++ goto end;
++ }
++ if (ARPHRD_ETHER != awrq->sa_family) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ ap = awrq->sa_data;
++ acxlog_mac(L_IOCTL, "set AP=", ap, "\n");
++
++ MAC_COPY(adev->ap, ap);
++
++ /* We want to start rescan in managed or ad-hoc mode,
++ ** otherwise just set adev->ap.
++ ** "iwconfig <if> ap <mac> mode managed": we must be able
++ ** to set ap _first_ and _then_ set mode */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* FIXME: if there is a convention on what zero AP means,
++ ** please add a comment about that. I don't know of any --vda */
++ if (mac_is_zero(ap)) {
++ /* "off" == 00:00:00:00:00:00 */
++ MAC_BCAST(adev->ap);
++ log(L_IOCTL, "Not reassociating\n");
++ } else {
++ log(L_IOCTL, "Forcing reassociation\n");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ break;
++ }
++ result = -EINPROGRESS;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_ap(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct sockaddr *awrq = &wrqu->ap_addr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ if (ACX_STATUS_4_ASSOCIATED == adev->status) {
++ /* as seen in Aironet driver, airo.c */
++ MAC_COPY(awrq->sa_data, adev->bssid);
++ } else {
++ MAC_ZERO(awrq->sa_data);
++ }
++ awrq->sa_family = ARPHRD_ETHER;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_aplist
++**
++** Deprecated in favor of iwscan.
++** We simply return the list of currently available stations in range,
++** don't do a new scan.
++*/
++static int
++acx_ioctl_get_aplist(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ struct sockaddr *address = (struct sockaddr *) extra;
++ struct iw_quality qual[IW_MAX_AP];
++ int i, cur;
++ int result = OK;
++
++ FN_ENTER;
++
++ /* we have AP list only in STA mode */
++ if (ACX_MODE_2_STA != adev->mode) {
++ result = -EOPNOTSUPP;
++ goto end;
++ }
++
++ cur = 0;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ MAC_COPY(address[cur].sa_data, bss->bssid);
++ address[cur].sa_family = ARPHRD_ETHER;
++ qual[cur].level = bss->sir;
++ qual[cur].noise = bss->snr;
++#ifndef OLD_QUALITY
++ qual[cur].qual = acx_signal_determine_quality(qual[cur].level,
++ qual[cur].noise);
++#else
++ qual[cur].qual = (qual[cur].noise <= 100) ?
++ 100 - qual[cur].noise : 0;
++#endif
++ /* no scan: level/noise/qual not updated: */
++ qual[cur].updated = 0;
++ cur++;
++ }
++ if (cur) {
++ dwrq->flags = 1;
++ memcpy(extra + sizeof(struct sockaddr)*cur, &qual,
++ sizeof(struct iw_quality)*cur);
++ }
++ dwrq->length = cur;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_scan(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* don't start scan if device is not up yet */
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ result = -EAGAIN;
++ goto end_unlock;
++ }
++
++ /* This is NOT a rescan for new AP!
++ ** Do not use SET_BIT(GETSET_RESCAN); */
++ acx_s_cmd_start_scan(adev);
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++/* end: */
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_scan_add_station
++*/
++/* helper. not sure whether it's really a _s_leeping fn */
++static char*
++acx_s_scan_add_station(
++ acx_device_t *adev,
++ char *ptr,
++ char *end_buf,
++ struct client *bss)
++{
++ struct iw_event iwe;
++ char *ptr_rate;
++
++ FN_ENTER;
++
++ /* MAC address has to be added first */
++ iwe.cmd = SIOCGIWAP;
++ iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
++ MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
++ acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
++
++ /* Add ESSID */
++ iwe.cmd = SIOCGIWESSID;
++ iwe.u.data.length = bss->essid_len;
++ iwe.u.data.flags = 1;
++ log(L_IOCTL, "scan, essid: %s\n", bss->essid);
++ ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
++
++ /* Add mode */
++ iwe.cmd = SIOCGIWMODE;
++ if (bss->cap_info & (WF_MGMT_CAP_ESS | WF_MGMT_CAP_IBSS)) {
++ if (bss->cap_info & WF_MGMT_CAP_ESS)
++ iwe.u.mode = IW_MODE_MASTER;
++ else
++ iwe.u.mode = IW_MODE_ADHOC;
++ log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
++ }
++
++ /* Add frequency */
++ iwe.cmd = SIOCGIWFREQ;
++ iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
++ iwe.u.freq.e = 1;
++ log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
++
++ /* Add link quality */
++ iwe.cmd = IWEVQUAL;
++ /* FIXME: these values should be expressed in dBm, but we don't know
++ * how to calibrate it yet */
++ iwe.u.qual.level = bss->sir;
++ iwe.u.qual.noise = bss->snr;
++#ifndef OLD_QUALITY
++ iwe.u.qual.qual = acx_signal_determine_quality(iwe.u.qual.level,
++ iwe.u.qual.noise);
++#else
++ iwe.u.qual.qual = (iwe.u.qual.noise <= 100) ?
++ 100 - iwe.u.qual.noise : 0;
++#endif
++ iwe.u.qual.updated = 7;
++ log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
++ iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
++
++ /* Add encryption */
++ iwe.cmd = SIOCGIWENCODE;
++ if (bss->cap_info & WF_MGMT_CAP_PRIVACY)
++ iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
++ else
++ iwe.u.data.flags = IW_ENCODE_DISABLED;
++ iwe.u.data.length = 0;
++ log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
++ ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
++
++ /* add rates */
++ iwe.cmd = SIOCGIWRATE;
++ iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
++ ptr_rate = ptr + IW_EV_LCP_LEN;
++
++ {
++ u16 rate = bss->rate_cap;
++ const u8* p = acx_bitpos2ratebyte;
++ while (rate) {
++ if (rate & 1) {
++ iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
++ log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
++ ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
++ &iwe, IW_EV_PARAM_LEN);
++ }
++ rate >>= 1;
++ p++;
++ }}
++
++ if ((ptr_rate - ptr) > (ptrdiff_t)IW_EV_LCP_LEN)
++ ptr = ptr_rate;
++
++ /* drop remaining station data items for now */
++
++ FN_EXIT0;
++ return ptr;
++}
++
++
++/***********************************************************************
++ * acx_ioctl_get_scan
++ */
++static int
++acx_ioctl_get_scan(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ char *ptr = extra;
++ int i;
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* no scan available if device is not up yet */
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ log(L_IOCTL, "iface not up yet\n");
++ result = -EAGAIN;
++ goto end_unlock;
++ }
++
++#ifdef ENODATA_TO_BE_USED_AFTER_SCAN_ERROR_ONLY
++ if (adev->bss_table_count == 0) {
++ /* no stations found */
++ result = -ENODATA;
++ goto end_unlock;
++ }
++#endif
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ ptr = acx_s_scan_add_station(adev, ptr,
++ extra + IW_SCAN_MAX_DATA, bss);
++ }
++ dwrq->length = ptr - extra;
++ dwrq->flags = 0;
++
++end_unlock:
++ acx_sem_unlock(adev);
++/* end: */
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_essid
++*/
++static int
++acx_ioctl_set_essid(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->essid;
++ acx_device_t *adev = ndev2adev(ndev);
++ int len = dwrq->length;
++ int result;
++
++ FN_ENTER;
++
++ if (len < 0) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ log(L_IOCTL, "set ESSID '%*s', length %d, flags 0x%04X\n",
++ len, extra, len, dwrq->flags);
++
++#if WIRELESS_EXT >= 21
++ /* WE 21 gives real ESSID strlen, not +1 (trailing zero):
++ * see LKML "[patch] drivers/net/wireless: correct reported ssid lengths" */
++ len += 1;
++#endif
++
++ acx_sem_lock(adev);
++
++ /* ESSID disabled? */
++ if (0 == dwrq->flags) {
++ adev->essid_active = 0;
++
++ } else {
++ if (len > IW_ESSID_MAX_SIZE) {
++ result = -E2BIG;
++ goto end_unlock;
++ }
++
++ if (len >= sizeof(adev->essid))
++ len = sizeof(adev->essid) - 1;
++ memcpy(adev->essid, extra, len);
++ adev->essid[len] = '\0';
++ /* Paranoia: just in case there is a '\0'... */
++ adev->essid_len = strlen(adev->essid);
++ adev->essid_active = 1;
++ }
++
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_essid(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->essid;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ dwrq->flags = adev->essid_active;
++ if (adev->essid_active) {
++ memcpy(extra, adev->essid, adev->essid_len);
++ extra[adev->essid_len] = '\0';
++ dwrq->length = adev->essid_len + 1;
++ dwrq->flags = 1;
++ }
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_update_client_rates
++*/
++static void
++acx_l_update_client_rates(acx_device_t *adev, u16 rate)
++{
++ int i;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ clt->rate_cfg = (clt->rate_cap & rate);
++ if (!clt->rate_cfg) {
++ /* no compatible rates left: kick client */
++ acxlog_mac(L_ASSOC, "client ",clt->address," kicked: "
++ "rates are not compatible anymore\n");
++ acx_l_sta_list_del(adev, clt);
++ continue;
++ }
++ clt->rate_cur &= clt->rate_cfg;
++ if (!clt->rate_cur) {
++ /* current rate become invalid, choose a valid one */
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ }
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[highest_bit(clt->rate_cur)];
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++ }
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ if (adev->ap_client && !adev->ap_client->used) {
++ /* Owwww... we kicked our AP!! :) */
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ }
++}
++
++
++/***********************************************************************
++*/
++/* maps bits from acx111 rate to rate in Mbits */
++static const unsigned int
++acx111_rate_tbl[] = {
++ 1000000, /* 0 */
++ 2000000, /* 1 */
++ 5500000, /* 2 */
++ 6000000, /* 3 */
++ 9000000, /* 4 */
++ 11000000, /* 5 */
++ 12000000, /* 6 */
++ 18000000, /* 7 */
++ 22000000, /* 8 */
++ 24000000, /* 9 */
++ 36000000, /* 10 */
++ 48000000, /* 11 */
++ 54000000, /* 12 */
++ 500000, /* 13, should not happen */
++ 500000, /* 14, should not happen */
++ 500000, /* 15, should not happen */
++};
++
++/***********************************************************************
++ * acx_ioctl_set_rate
++ */
++static int
++acx_ioctl_set_rate(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ u16 txrate_cfg = 1;
++ unsigned long flags;
++ int autorate;
++ int result = -EINVAL;
++
++ FN_ENTER;
++ log(L_IOCTL, "rate %d fixed 0x%X disabled 0x%X flags 0x%X\n",
++ vwrq->value, vwrq->fixed, vwrq->disabled, vwrq->flags);
++
++ if ((0 == vwrq->fixed) || (1 == vwrq->fixed)) {
++ int i = VEC_SIZE(acx111_rate_tbl)-1;
++ if (vwrq->value == -1)
++ /* "iwconfig rate auto" --> choose highest */
++ vwrq->value = IS_ACX100(adev) ? 22000000 : 54000000;
++ while (i >= 0) {
++ if (vwrq->value == acx111_rate_tbl[i]) {
++ txrate_cfg <<= i;
++ i = 0;
++ break;
++ }
++ i--;
++ }
++ if (i == -1) { /* no matching rate */
++ result = -EINVAL;
++ goto end;
++ }
++ } else { /* rate N, N<1000 (driver specific): we don't use this */
++ result = -EOPNOTSUPP;
++ goto end;
++ }
++ /* now: only one bit is set in txrate_cfg, corresponding to
++ ** indicated rate */
++
++ autorate = (vwrq->fixed == 0) && (RATE111_1 != txrate_cfg);
++ if (autorate) {
++ /* convert 00100000 -> 00111111 */
++ txrate_cfg = (txrate_cfg<<1)-1;
++ }
++
++ if (IS_ACX100(adev)) {
++ txrate_cfg &= RATE111_ACX100_COMPAT;
++ if (!txrate_cfg) {
++ result = -ENOTSUPP; /* rate is not supported by acx100 */
++ goto end;
++ }
++ }
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ adev->rate_auto = autorate;
++ adev->rate_oper = txrate_cfg;
++ adev->rate_basic = txrate_cfg;
++ /* only do that in auto mode, non-auto will be able to use
++ * one specific Tx rate only anyway */
++ if (autorate) {
++ /* only use 802.11b base rates, for standard 802.11b H/W
++ * compatibility */
++ adev->rate_basic &= RATE111_80211B_COMPAT;
++ }
++ adev->rate_bcast = 1 << lowest_bit(txrate_cfg);
++ if (IS_ACX100(adev))
++ adev->rate_bcast100 = acx_rate111to100(adev->rate_bcast);
++ acx_l_update_ratevector(adev);
++ acx_l_update_client_rates(adev, txrate_cfg);
++
++ /* Do/don't do tx rate fallback; beacon contents and rate */
++ SET_BIT(adev->set_mask, SET_RATE_FALLBACK|SET_TEMPLATES);
++ result = -EINPROGRESS;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_rate
++*/
++static int
++acx_ioctl_get_rate(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 rate;
++
++ acx_lock(adev, flags);
++ rate = adev->rate_oper;
++ if (adev->ap_client)
++ rate = adev->ap_client->rate_cur;
++ vwrq->value = acx111_rate_tbl[highest_bit(rate)];
++ vwrq->fixed = !adev->rate_auto;
++ vwrq->disabled = 0;
++ acx_unlock(adev, flags);
++
++ return OK;
++}
++
++static int
++acx_ioctl_set_rts(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->rts;
++ acx_device_t *adev = ndev2adev(ndev);
++ int val = vwrq->value;
++
++ if (vwrq->disabled)
++ val = 2312;
++ if ((val < 0) || (val > 2312))
++ return -EINVAL;
++
++ adev->rts_threshold = val;
++ return OK;
++}
++
++static inline int
++acx_ioctl_get_rts(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->rts;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ vwrq->value = adev->rts_threshold;
++ vwrq->disabled = (vwrq->value >= 2312);
++ vwrq->fixed = 1;
++ return OK;
++}
++
++
++#if ACX_FRAGMENTATION
++static int
++acx_ioctl_set_frag(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int val = vwrq->value;
++
++ if (vwrq->disabled)
++ val = 32767;
++ else
++ if ((val < 256) || (val > 2347))
++ return -EINVAL;
++
++ adev->frag_threshold = val;
++ return OK;
++}
++
++static inline int
++acx_ioctl_get_frag(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->frag;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ vwrq->value = adev->frag_threshold;
++ vwrq->disabled = (vwrq->value >= 2347);
++ vwrq->fixed = 1;
++ return OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_ioctl_set_encode
++*/
++static int
++acx_ioctl_set_encode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->encoding;
++ acx_device_t *adev = ndev2adev(ndev);
++ int index;
++ int result;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set encoding flags=0x%04X, size=%d, key: %s\n",
++ dwrq->flags, dwrq->length, extra ? "set" : "No key");
++
++ acx_sem_lock(adev);
++
++ index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
++
++ if (dwrq->length > 0) {
++ /* if index is 0 or invalid, use default key */
++ if ((index < 0) || (index > 3))
++ index = (int)adev->wep_current_index;
++
++ if (0 == (dwrq->flags & IW_ENCODE_NOKEY)) {
++ if (dwrq->length > 29)
++ dwrq->length = 29; /* restrict it */
++
++ if (dwrq->length > 13) {
++ /* 29*8 == 232, WEP256 */
++ adev->wep_keys[index].size = 29;
++ } else if (dwrq->length > 5) {
++ /* 13*8 == 104bit, WEP128 */
++ adev->wep_keys[index].size = 13;
++ } else if (dwrq->length > 0) {
++ /* 5*8 == 40bit, WEP64 */
++ adev->wep_keys[index].size = 5;
++ } else {
++ /* disable key */
++ adev->wep_keys[index].size = 0;
++ }
++
++ memset(adev->wep_keys[index].key, 0,
++ sizeof(adev->wep_keys[index].key));
++ memcpy(adev->wep_keys[index].key, extra, dwrq->length);
++ }
++ } else {
++ /* set transmit key */
++ if ((index >= 0) && (index <= 3))
++ adev->wep_current_index = index;
++ else if (0 == (dwrq->flags & IW_ENCODE_MODE)) {
++ /* complain if we were not just setting
++ * the key mode */
++ result = -EINVAL;
++ goto end_unlock;
++ }
++ }
++
++ adev->wep_enabled = !(dwrq->flags & IW_ENCODE_DISABLED);
++
++ if (dwrq->flags & IW_ENCODE_OPEN) {
++ adev->auth_alg = WLAN_AUTH_ALG_OPENSYSTEM;
++ adev->wep_restricted = 0;
++
++ } else if (dwrq->flags & IW_ENCODE_RESTRICTED) {
++ adev->auth_alg = WLAN_AUTH_ALG_SHAREDKEY;
++ adev->wep_restricted = 1;
++ }
++
++ /* set flag to make sure the card WEP settings get updated */
++ SET_BIT(adev->set_mask, GETSET_WEP);
++
++ log(L_IOCTL, "len=%d, key at 0x%p, flags=0x%X\n",
++ dwrq->length, extra, dwrq->flags);
++
++ for (index = 0; index <= 3; index++) {
++ if (adev->wep_keys[index].size) {
++ log(L_IOCTL, "index=%d, size=%d, key at 0x%p\n",
++ adev->wep_keys[index].index,
++ (int) adev->wep_keys[index].size,
++ adev->wep_keys[index].key);
++ }
++ }
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_encode
++*/
++static int
++acx_ioctl_get_encode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->encoding;
++ acx_device_t *adev = ndev2adev(ndev);
++ int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
++
++ FN_ENTER;
++
++ if (adev->wep_enabled == 0) {
++ dwrq->flags = IW_ENCODE_DISABLED;
++ } else {
++ if ((index < 0) || (index > 3))
++ index = (int)adev->wep_current_index;
++
++ dwrq->flags = (adev->wep_restricted == 1) ?
++ IW_ENCODE_RESTRICTED : IW_ENCODE_OPEN;
++ dwrq->length = adev->wep_keys[index].size;
++
++ memcpy(extra, adev->wep_keys[index].key,
++ adev->wep_keys[index].size);
++ }
++
++ /* set the current index */
++ SET_BIT(dwrq->flags, index + 1);
++
++ log(L_IOCTL, "len=%d, key=%p, flags=0x%X\n",
++ dwrq->length, dwrq->pointer,
++ dwrq->flags);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = -EINPROGRESS;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set 802.11 powersave flags=0x%04X\n", vwrq->flags);
++
++ acx_sem_lock(adev);
++
++ if (vwrq->disabled) {
++ CLEAR_BIT(adev->ps_wakeup_cfg, PS_CFG_ENABLE);
++ SET_BIT(adev->set_mask, GETSET_POWER_80211);
++ goto end;
++ }
++ if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
++ u16 ps_timeout = (vwrq->value * 1024) / 1000;
++
++ if (ps_timeout > 255)
++ ps_timeout = 255;
++ log(L_IOCTL, "setting PS timeout value to %d time units "
++ "due to %dus\n", ps_timeout, vwrq->value);
++ adev->ps_hangover_period = ps_timeout;
++ } else if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
++ u16 ps_periods = vwrq->value / 1000000;
++
++ if (ps_periods > 255)
++ ps_periods = 255;
++ log(L_IOCTL, "setting PS period value to %d periods "
++ "due to %dus\n", ps_periods, vwrq->value);
++ adev->ps_listen_interval = ps_periods;
++ CLEAR_BIT(adev->ps_wakeup_cfg, PS_CFG_WAKEUP_MODE_MASK);
++ SET_BIT(adev->ps_wakeup_cfg, PS_CFG_WAKEUP_EACH_ITVL);
++ }
++
++ switch (vwrq->flags & IW_POWER_MODE) {
++ /* FIXME: are we doing the right thing here? */
++ case IW_POWER_UNICAST_R:
++ CLEAR_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_MULTICAST_R:
++ SET_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_ALL_R:
++ SET_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_ON:
++ break;
++ default:
++ log(L_IOCTL, "unknown PS mode\n");
++ result = -EINVAL;
++ goto end;
++ }
++
++ SET_BIT(adev->ps_wakeup_cfg, PS_CFG_ENABLE);
++ SET_BIT(adev->set_mask, GETSET_POWER_80211);
++end:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ log(L_IOCTL, "Get 802.11 Power Save flags = 0x%04X\n", vwrq->flags);
++ vwrq->disabled = ((adev->ps_wakeup_cfg & PS_CFG_ENABLE) == 0);
++ if (vwrq->disabled)
++ goto end;
++
++ if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
++ vwrq->value = adev->ps_hangover_period * 1000 / 1024;
++ vwrq->flags = IW_POWER_TIMEOUT;
++ } else {
++ vwrq->value = adev->ps_listen_interval * 1000000;
++ vwrq->flags = IW_POWER_PERIOD|IW_POWER_RELATIVE;
++ }
++ if (adev->ps_options & PS_OPT_STILL_RCV_BCASTS)
++ SET_BIT(vwrq->flags, IW_POWER_ALL_R);
++ else
++ SET_BIT(vwrq->flags, IW_POWER_UNICAST_R);
++end:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_txpow
++*/
++static inline int
++acx_ioctl_get_txpow(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ vwrq->flags = IW_TXPOW_DBM;
++ vwrq->disabled = 0;
++ vwrq->fixed = 1;
++ vwrq->value = adev->tx_level_dbm;
++
++ log(L_IOCTL, "get txpower:%d dBm\n", adev->tx_level_dbm);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_txpow
++*/
++static int
++acx_ioctl_set_txpow(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set txpower:%d, disabled:%d, flags:0x%04X\n",
++ vwrq->value, vwrq->disabled, vwrq->flags);
++
++ acx_sem_lock(adev);
++
++ if (vwrq->disabled != adev->tx_disabled) {
++ SET_BIT(adev->set_mask, GETSET_TX);
++ }
++
++ adev->tx_disabled = vwrq->disabled;
++ if (vwrq->value == -1) {
++ if (vwrq->disabled) {
++ adev->tx_level_dbm = 0;
++ log(L_IOCTL, "disable radio tx\n");
++ } else {
++ /* adev->tx_level_auto = 1; */
++ log(L_IOCTL, "set tx power auto (NIY)\n");
++ }
++ } else {
++ adev->tx_level_dbm = vwrq->value <= 20 ? vwrq->value : 20;
++ /* adev->tx_level_auto = 0; */
++ log(L_IOCTL, "set txpower=%d dBm\n", adev->tx_level_dbm);
++ }
++ SET_BIT(adev->set_mask, GETSET_TXPOWER);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_range
++*/
++static int
++acx_ioctl_get_range(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ struct iw_range *range = (struct iw_range *)extra;
++ acx_device_t *adev = ndev2adev(ndev);
++ int i,n;
++
++ FN_ENTER;
++
++ if (!dwrq->pointer)
++ goto end;
++
++ dwrq->length = sizeof(struct iw_range);
++ memset(range, 0, sizeof(struct iw_range));
++ n = 0;
++ for (i = 1; i <= 14; i++) {
++ if (adev->reg_dom_chanmask & (1 << (i - 1))) {
++ range->freq[n].i = i;
++ range->freq[n].m = acx_channel_freq[i - 1] * 100000;
++ range->freq[n].e = 1; /* units are MHz */
++ n++;
++ }
++ }
++ range->num_channels = n;
++ range->num_frequency = n;
++
++ range->min_rts = 0;
++ range->max_rts = 2312;
++
++#if ACX_FRAGMENTATION
++ range->min_frag = 256;
++ range->max_frag = 2312;
++#endif
++
++ range->encoding_size[0] = 5;
++ range->encoding_size[1] = 13;
++ range->encoding_size[2] = 29;
++ range->num_encoding_sizes = 3;
++ range->max_encoding_tokens = 4;
++
++ range->min_pmp = 0;
++ range->max_pmp = 5000000;
++ range->min_pmt = 0;
++ range->max_pmt = 65535 * 1000;
++ range->pmp_flags = IW_POWER_PERIOD;
++ range->pmt_flags = IW_POWER_TIMEOUT;
++ range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R;
++
++ if (IS_ACX100(adev)) { /* ACX100 has direct radio programming - arbitrary levels, so offer a lot */
++ for (i = 0; i <= IW_MAX_TXPOWER - 1; i++)
++ range->txpower[i] = 20 * i / (IW_MAX_TXPOWER - 1);
++ range->num_txpower = IW_MAX_TXPOWER;
++ range->txpower_capa = IW_TXPOW_DBM;
++ }
++ else {
++ int count = min(IW_MAX_TXPOWER, (int)adev->cfgopt_power_levels.len);
++ for (i = 0; i <= count; i++)
++ range->txpower[i] = adev->cfgopt_power_levels.list[i];
++ range->num_txpower = count;
++ /* this list is given in mW */
++ range->txpower_capa = IW_TXPOW_MWATT;
++ }
++
++ range->we_version_compiled = WIRELESS_EXT;
++ range->we_version_source = 0x9;
++
++ range->retry_capa = IW_RETRY_LIMIT;
++ range->retry_flags = IW_RETRY_LIMIT;
++ range->min_retry = 1;
++ range->max_retry = 255;
++
++ range->r_time_flags = IW_RETRY_LIFETIME;
++ range->min_r_time = 0;
++ /* FIXME: lifetime ranges and orders of magnitude are strange?? */
++ range->max_r_time = 65535;
++
++ if (IS_USB(adev))
++ range->sensitivity = 0;
++ else if (IS_ACX111(adev))
++ range->sensitivity = 3;
++ else
++ range->sensitivity = 255;
++
++ for (i=0; i < adev->rate_supported_len; i++) {
++ range->bitrate[i] = (adev->rate_supported[i] & ~0x80) * 500000;
++ /* never happens, but keep it, to be safe: */
++ if (range->bitrate[i] == 0)
++ break;
++ }
++ range->num_bitrates = i;
++
++ range->max_qual.qual = 100;
++ range->max_qual.level = 100;
++ range->max_qual.noise = 100;
++ /* TODO: better values */
++ range->avg_qual.qual = 90;
++ range->avg_qual.level = 80;
++ range->avg_qual.noise = 2;
++
++end:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** Private functions
++*/
++
++/***********************************************************************
++** acx_ioctl_get_nick
++*/
++static inline int
++acx_ioctl_get_nick(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ strcpy(extra, adev->nick);
++ dwrq->length = strlen(extra) + 1;
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_nick
++*/
++static int
++acx_ioctl_set_nick(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ if (dwrq->length > IW_ESSID_MAX_SIZE + 1) {
++ result = -E2BIG;
++ goto end_unlock;
++ }
++
++ /* extra includes trailing \0, so it's ok */
++ strcpy(adev->nick, extra);
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_retry
++*/
++static int
++acx_ioctl_get_retry(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->retry;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned int type = vwrq->flags & IW_RETRY_TYPE;
++ unsigned int modifier = vwrq->flags & IW_RETRY_MODIFIER;
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* return the short retry number by default */
++ if (type == IW_RETRY_LIFETIME) {
++ vwrq->flags = IW_RETRY_LIFETIME;
++ vwrq->value = adev->msdu_lifetime;
++ } else if (modifier == IW_RETRY_MAX) {
++ vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
++ vwrq->value = adev->long_retry;
++ } else {
++ vwrq->flags = IW_RETRY_LIMIT;
++ if (adev->long_retry != adev->short_retry)
++ SET_BIT(vwrq->flags, IW_RETRY_MIN);
++ vwrq->value = adev->short_retry;
++ }
++
++ /* can't be disabled */
++ vwrq->disabled = (u8)0;
++ result = OK;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_retry
++*/
++static int
++acx_ioctl_set_retry(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->retry;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (!vwrq) {
++ result = -EFAULT;
++ goto end;
++ }
++ if (vwrq->disabled) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ result = -EINVAL;
++ if (IW_RETRY_LIMIT == (vwrq->flags & IW_RETRY_TYPE)) {
++ printk("old retry limits: short %d long %d\n",
++ adev->short_retry, adev->long_retry);
++ if (vwrq->flags & IW_RETRY_MAX) {
++ adev->long_retry = vwrq->value;
++ } else if (vwrq->flags & IW_RETRY_MIN) {
++ adev->short_retry = vwrq->value;
++ } else {
++ /* no modifier: set both */
++ adev->long_retry = vwrq->value;
++ adev->short_retry = vwrq->value;
++ }
++ printk("new retry limits: short %d long %d\n",
++ adev->short_retry, adev->long_retry);
++ SET_BIT(adev->set_mask, GETSET_RETRY);
++ result = -EINPROGRESS;
++ }
++ else if (vwrq->flags & IW_RETRY_LIFETIME) {
++ adev->msdu_lifetime = vwrq->value;
++ printk("new MSDU lifetime: %d\n", adev->msdu_lifetime);
++ SET_BIT(adev->set_mask, SET_MSDU_LIFETIME);
++ result = -EINPROGRESS;
++ }
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/************************ private ioctls ******************************/
++
++
++/***********************************************************************
++** acx_ioctl_set_debug
++*/
++#if ACX_DEBUG
++static int
++acx_ioctl_set_debug(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ unsigned int debug_new = *((unsigned int *)extra);
++ int result = -EINVAL;
++
++ log(L_ANY, "setting debug from %04X to %04X\n", acx_debug, debug_new);
++ acx_debug = debug_new;
++
++ result = OK;
++ return result;
++
++}
++#endif
++
++
++/***********************************************************************
++** acx_ioctl_list_reg_domain
++*/
++static int
++acx_ioctl_list_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ int i = 1;
++ const char * const *entry = acx_reg_domain_strings;
++
++ printk("dom# chan# domain/country\n");
++ while (*entry)
++ printk("%4d %s\n", i++, *entry++);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_reg_domain
++*/
++static int
++acx_ioctl_set_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if ((*extra < 1) || ((size_t)*extra > acx_reg_domain_ids_len)) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->reg_dom_id = acx_reg_domain_ids[*extra - 1];
++ SET_BIT(adev->set_mask, GETSET_REG_DOMAIN);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_reg_domain
++*/
++static int
++acx_ioctl_get_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int dom,i;
++
++ /* no locking */
++ dom = adev->reg_dom_id;
++
++ for (i = 1; i <= acx_reg_domain_ids_len; i++) {
++ if (acx_reg_domain_ids[i-1] == dom) {
++ log(L_IOCTL, "regulatory domain is currently set "
++ "to %d (0x%X): %s\n", i, dom,
++ acx_reg_domain_strings[i-1]);
++ *extra = i;
++ break;
++ }
++ }
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_short_preamble
++*/
++static const char * const
++preamble_modes[] = {
++ "off",
++ "on",
++ "auto (peer capability dependent)",
++ "unknown mode, error"
++};
++
++static int
++acx_ioctl_set_short_preamble(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int i;
++ int result;
++
++ FN_ENTER;
++
++ if ((unsigned char)*extra > 2) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->preamble_mode = (u8)*extra;
++ switch (adev->preamble_mode) {
++ case 0: /* long */
++ adev->preamble_cur = 0;
++ break;
++ case 1:
++ /* short, kick incapable peers */
++ adev->preamble_cur = 1;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ if (!(clt->cap_info & WF_MGMT_CAP_SHORT)) {
++ clt->used = CLIENT_EMPTY_SLOT_0;
++ }
++ }
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ if (adev->ap_client && !adev->ap_client->used) {
++ /* We kicked our AP :) */
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ }
++ break;
++ case 2: /* auto. short only if all peers are short-capable */
++ adev->preamble_cur = 1;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ if (!(clt->cap_info & WF_MGMT_CAP_SHORT)) {
++ adev->preamble_cur = 0;
++ break;
++ }
++ }
++ break;
++ }
++ printk("new short preamble setting: configured %s, active %s\n",
++ preamble_modes[adev->preamble_mode],
++ preamble_modes[adev->preamble_cur]);
++ result = OK;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_short_preamble
++*/
++static int
++acx_ioctl_get_short_preamble(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("current short preamble setting: configured %s, active %s\n",
++ preamble_modes[adev->preamble_mode],
++ preamble_modes[adev->preamble_cur]);
++
++ *extra = (char)adev->preamble_mode;
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_antenna
++**
++** TX and RX antenna can be set separately but this function good
++** for testing 0-4 bits
++*/
++static int
++acx_ioctl_set_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("old antenna value: 0x%02X (COMBINED bit mask)\n"
++ "Rx antenna selection:\n"
++ "0x00 ant. 1\n"
++ "0x40 ant. 2\n"
++ "0x80 full diversity\n"
++ "0xc0 partial diversity\n"
++ "0x0f dwell time mask (in units of us)\n"
++ "Tx antenna selection:\n"
++ "0x00 ant. 2\n" /* yep, those ARE reversed! */
++ "0x20 ant. 1\n"
++ "new antenna value: 0x%02X\n",
++ adev->antenna, (u8)*extra);
++
++ adev->antenna = (u8)*extra;
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_antenna
++*/
++static int
++acx_ioctl_get_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /* no locking. it's pointless to lock a single load */
++ printk("current antenna value: 0x%02X (COMBINED bit mask)\n"
++ "Rx antenna selection:\n"
++ "0x00 ant. 1\n"
++ "0x40 ant. 2\n"
++ "0x80 full diversity\n"
++ "0xc0 partial diversity\n"
++ "Tx antenna selection:\n"
++ "0x00 ant. 2\n" /* yep, those ARE reversed! */
++ "0x20 ant. 1\n", adev->antenna);
++
++ return 0;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_rx_antenna
++**
++** 0 = antenna1; 1 = antenna2; 2 = full diversity; 3 = partial diversity
++** Could anybody test which antenna is the external one?
++*/
++static int
++acx_ioctl_set_rx_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (*extra > 3) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ printk("old antenna value: 0x%02X\n", adev->antenna);
++
++ acx_sem_lock(adev);
++
++ adev->antenna &= 0x3f;
++ SET_BIT(adev->antenna, (*extra << 6));
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++ printk("new antenna value: 0x%02X\n", adev->antenna);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_tx_antenna
++**
++** Arguments: 0 == antenna2; 1 == antenna1;
++** Could anybody test which antenna is the external one?
++*/
++static int
++acx_ioctl_set_tx_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (*extra > 1) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ printk("old antenna value: 0x%02X\n", adev->antenna);
++
++ acx_sem_lock(adev);
++
++ adev->antenna &= ~0x30;
++ SET_BIT(adev->antenna, ((*extra & 0x01) << 5));
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++ printk("new antenna value: 0x%02X\n", adev->antenna);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_wlansniff
++**
++** can we just remove this in favor of monitor mode? --vda
++*/
++static int
++acx_ioctl_wlansniff(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned int *params = (unsigned int*)extra;
++ unsigned int enable = (unsigned int)(params[0] > 0);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* not using printk() here, since it distorts kismet display
++ * when printk messages activated */
++ log(L_IOCTL, "setting monitor to: 0x%02X\n", params[0]);
++
++ switch (params[0]) {
++ case 0:
++ /* no monitor mode. hmm, should we simply ignore it
++ * or go back to enabling adev->netdev->type ARPHRD_ETHER? */
++ break;
++ case 1:
++ adev->monitor_type = ARPHRD_IEEE80211_PRISM;
++ break;
++ case 2:
++ adev->monitor_type = ARPHRD_IEEE80211;
++ break;
++ }
++
++ if (params[0]) {
++ adev->mode = ACX_MODE_MONITOR;
++ SET_BIT(adev->set_mask, GETSET_MODE);
++ }
++
++ if (enable) {
++ adev->channel = params[1];
++ SET_BIT(adev->set_mask, GETSET_RX);
++ }
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_unknown11
++** FIXME: looks like some sort of "iwpriv kick_sta MAC" but it's broken
++*/
++static int
++acx_ioctl_unknown11(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++#ifdef BROKEN
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ client_t client;
++ int result;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ acx_l_transmit_disassoc(adev, &client);
++ result = OK;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ return result;
++#endif
++ return -EINVAL;
++}
++
++
++/***********************************************************************
++** debug helper function to be able to debug various issues relatively easily
++*/
++static int
++acx_ioctl_dbg_set_masks(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ const unsigned int *params = (unsigned int*)extra;
++ int result;
++
++ acx_sem_lock(adev);
++
++ log(L_IOCTL, "setting flags in settings mask: "
++ "get_mask %08X set_mask %08X\n"
++ "before: get_mask %08X set_mask %08X\n",
++ params[0], params[1],
++ adev->get_mask, adev->set_mask);
++ SET_BIT(adev->get_mask, params[0]);
++ SET_BIT(adev->set_mask, params[1]);
++ log(L_IOCTL, "after: get_mask %08X set_mask %08X\n",
++ adev->get_mask, adev->set_mask);
++ result = -EINPROGRESS; /* immediately call commit handler */
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++* acx_ioctl_set_rates
++*
++* This ioctl takes string parameter. Examples:
++* iwpriv wlan0 SetRates "1,2"
++* use 1 and 2 Mbit rates, both are in basic rate set
++* iwpriv wlan0 SetRates "1,2 5,11"
++* use 1,2,5.5,11 Mbit rates. 1 and 2 are basic
++* iwpriv wlan0 SetRates "1,2 5c,11c"
++* same ('c' means 'CCK modulation' and it is a default for 5 and 11)
++* iwpriv wlan0 SetRates "1,2 5p,11p"
++* use 1,2,5.5,11 Mbit, 1,2 are basic. 5 and 11 are using PBCC
++* iwpriv wlan0 SetRates "1,2,5,11 22p"
++* use 1,2,5.5,11,22 Mbit. 1,2,5.5 and 11 are basic. 22 is using PBCC
++* (this is the maximum acx100 can do (modulo x4 mode))
++* iwpriv wlan0 SetRates "1,2,5,11 22"
++* same. 802.11 defines only PBCC modulation
++* for 22 and 33 Mbit rates, so there is no ambiguity
++* iwpriv wlan0 SetRates "1,2,5,11 6o,9o,12o,18o,24o,36o,48o,54o"
++* 1,2,5.5 and 11 are basic. 11g OFDM rates are enabled but
++* they are not in basic rate set. 22 Mbit is disabled.
++* iwpriv wlan0 SetRates "1,2,5,11 6,9,12,18,24,36,48,54"
++* same. OFDM is default for 11g rates except 22 and 33 Mbit,
++* thus 'o' is optional
++* iwpriv wlan0 SetRates "1,2,5,11 6d,9d,12d,18d,24d,36d,48d,54d"
++* 1,2,5.5 and 11 are basic. 11g CCK-OFDM rates are enabled
++* (acx111 does not support CCK-OFDM, driver will reject this cmd)
++* iwpriv wlan0 SetRates "6,9,12 18,24,36,48,54"
++* 6,9,12 are basic, rest of 11g rates is enabled. Using OFDM
++*/
++#include "setrate.c"
++
++/* disallow: 33Mbit (unsupported by hw) */
++/* disallow: CCKOFDM (unsupported by hw) */
++static int
++acx111_supported(int mbit, int modulation, void *opaque)
++{
++ if (mbit==33) return -ENOTSUPP;
++ if (modulation==DOT11_MOD_CCKOFDM) return -ENOTSUPP;
++ return OK;
++}
++
++static const u16
++acx111mask[] = {
++ [DOT11_RATE_1 ] = RATE111_1 ,
++ [DOT11_RATE_2 ] = RATE111_2 ,
++ [DOT11_RATE_5 ] = RATE111_5 ,
++ [DOT11_RATE_11] = RATE111_11,
++ [DOT11_RATE_22] = RATE111_22,
++ /* [DOT11_RATE_33] = */
++ [DOT11_RATE_6 ] = RATE111_6 ,
++ [DOT11_RATE_9 ] = RATE111_9 ,
++ [DOT11_RATE_12] = RATE111_12,
++ [DOT11_RATE_18] = RATE111_18,
++ [DOT11_RATE_24] = RATE111_24,
++ [DOT11_RATE_36] = RATE111_36,
++ [DOT11_RATE_48] = RATE111_48,
++ [DOT11_RATE_54] = RATE111_54,
++};
++
++static u32
++acx111_gen_mask(int mbit, int modulation, void *opaque)
++{
++ /* lower 16 bits show selected 1, 2, CCK and OFDM rates */
++ /* upper 16 bits show selected PBCC rates */
++ u32 m = acx111mask[rate_mbit2enum(mbit)];
++ if (modulation==DOT11_MOD_PBCC)
++ return m<<16;
++ return m;
++}
++
++static int
++verify_rate(u32 rate, int chip_type)
++{
++ /* never happens. be paranoid */
++ if (!rate) return -EINVAL;
++
++ /* disallow: mixing PBCC and CCK at 5 and 11Mbit
++ ** (can be supported, but needs complicated handling in tx code) */
++ if (( rate & ((RATE111_11+RATE111_5)<<16) )
++ && ( rate & (RATE111_11+RATE111_5) )
++ ) {
++ return -ENOTSUPP;
++ }
++ if (CHIPTYPE_ACX100 == chip_type) {
++ if ( rate & ~(RATE111_ACX100_COMPAT+(RATE111_ACX100_COMPAT<<16)) )
++ return -ENOTSUPP;
++ }
++ return 0;
++}
++
++static int
++acx_ioctl_set_rates(struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int result;
++ u32 brate = 0, orate = 0; /* basic, operational rate set */
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set_rates %s\n", extra);
++ result = fill_ratemasks(extra, &brate, &orate,
++ acx111_supported, acx111_gen_mask, 0);
++ if (result) goto end;
++ SET_BIT(orate, brate);
++ log(L_IOCTL, "brate %08X orate %08X\n", brate, orate);
++
++ result = verify_rate(brate, adev->chip_type);
++ if (result) goto end;
++ result = verify_rate(orate, adev->chip_type);
++ if (result) goto end;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ adev->rate_basic = brate;
++ adev->rate_oper = orate;
++ /* TODO: ideally, we shall monitor highest basic rate
++ ** which was successfully sent to every peer
++ ** (say, last we checked, everybody could hear 5.5 Mbits)
++ ** and use that for bcasts when we want to reach all peers.
++ ** For beacons, we probably shall use lowest basic rate
++ ** because we want to reach all *potential* new peers too */
++ adev->rate_bcast = 1 << lowest_bit(brate);
++ if (IS_ACX100(adev))
++ adev->rate_bcast100 = acx_rate111to100(adev->rate_bcast);
++ adev->rate_auto = !has_only_one_bit(orate);
++ acx_l_update_client_rates(adev, orate);
++ /* TODO: get rid of ratevector, build it only when needed */
++ acx_l_update_ratevector(adev);
++
++ /* Do/don't do tx rate fallback; beacon contents and rate */
++ SET_BIT(adev->set_mask, SET_RATE_FALLBACK|SET_TEMPLATES);
++ result = -EINPROGRESS;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_phy_chan_busy_percentage
++*/
++static int
++acx_ioctl_get_phy_chan_busy_percentage(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ struct {
++ u16 type;
++ u16 len;
++ u32 busytime;
++ u32 totaltime;
++ } ACX_PACKED usage;
++ int result;
++
++ acx_sem_lock(adev);
++
++ if (OK != acx_s_interrogate(adev, &usage, ACX1xx_IE_MEDIUM_USAGE)) {
++ result = NOT_OK;
++ goto end_unlock;
++ }
++
++ usage.busytime = le32_to_cpu(usage.busytime);
++ usage.totaltime = le32_to_cpu(usage.totaltime);
++
++ /* yes, this is supposed to be "Medium" (singular of media),
++ not "average"! OK, reword the message to make it obvious... */
++ printk("%s: busy percentage of medium (since last invocation): %d%% "
++ "(%u of %u microseconds)\n",
++ ndev->name,
++ usage.busytime / ((usage.totaltime / 100) + 1),
++ usage.busytime, usage.totaltime);
++
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_ed_threshold
++*/
++static inline int
++acx_ioctl_set_ed_threshold(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("old ED threshold value: %d\n", adev->ed_threshold);
++ adev->ed_threshold = (unsigned char)*extra;
++ printk("new ED threshold value: %d\n", (unsigned char)*extra);
++ SET_BIT(adev->set_mask, GETSET_ED_THRESH);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_cca
++*/
++static inline int
++acx_ioctl_set_cca(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ acx_sem_lock(adev);
++
++ printk("old CCA value: 0x%02X\n", adev->cca);
++ adev->cca = (unsigned char)*extra;
++ printk("new CCA value: 0x%02X\n", (unsigned char)*extra);
++ SET_BIT(adev->set_mask, GETSET_CCA);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static const char * const
++scan_modes[] = { "active", "passive", "background" };
++
++static void
++acx_print_scan_params(acx_device_t *adev, const char* head)
++{
++ printk("%s: %smode %d (%s), min chan time %dTU, "
++ "max chan time %dTU, max scan rate byte: %d\n",
++ adev->ndev->name, head,
++ adev->scan_mode, scan_modes[adev->scan_mode],
++ adev->scan_probe_delay, adev->scan_duration, adev->scan_rate);
++}
++
++static int
++acx_ioctl_set_scan_params(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++ const int *params = (int *)extra;
++
++ acx_sem_lock(adev);
++
++ acx_print_scan_params(adev, "old scan parameters: ");
++ if ((params[0] != -1) && (params[0] >= 0) && (params[0] <= 2))
++ adev->scan_mode = params[0];
++ if (params[1] != -1)
++ adev->scan_probe_delay = params[1];
++ if (params[2] != -1)
++ adev->scan_duration = params[2];
++ if ((params[3] != -1) && (params[3] <= 255))
++ adev->scan_rate = params[3];
++ acx_print_scan_params(adev, "new scan parameters: ");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++static int
++acx_ioctl_get_scan_params(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++ int *params = (int *)extra;
++
++ acx_sem_lock(adev);
++
++ acx_print_scan_params(adev, "current scan parameters: ");
++ params[0] = adev->scan_mode;
++ params[1] = adev->scan_probe_delay;
++ params[2] = adev->scan_duration;
++ params[3] = adev->scan_rate;
++ result = OK;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx100_ioctl_set_led_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ static const char * const led_modes[] = { "off", "on", "LinkQuality" };
++
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ acx_sem_lock(adev);
++
++ printk("%s: power LED status: old %d (%s), ",
++ ndev->name,
++ adev->led_power,
++ led_modes[adev->led_power]);
++ adev->led_power = extra[0];
++ if (adev->led_power > 2) adev->led_power = 2;
++ printk("new %d (%s)\n",
++ adev->led_power,
++ led_modes[adev->led_power]);
++
++ if (adev->led_power == 2) {
++ printk("%s: max link quality setting: old %d, ",
++ ndev->name, adev->brange_max_quality);
++ if (extra[1])
++ adev->brange_max_quality = extra[1];
++ printk("new %d\n", adev->brange_max_quality);
++ }
++
++ SET_BIT(adev->set_mask, GETSET_LED_POWER);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static inline int
++acx100_ioctl_get_led_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ extra[0] = adev->led_power;
++ if (adev->led_power == 2)
++ extra[1] = adev->brange_max_quality;
++ else
++ extra[1] = -1;
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx111_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ if (!IS_PCI(ndev2adev(ndev)))
++ return OK;
++ return acx111pci_ioctl_info(ndev, info, vwrq, extra);
++}
++
++
++/***********************************************************************
++*/
++static int
++acx100_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ if (IS_USB(ndev2adev(ndev))) {
++ printk("acx: set_phy_amp_bias() is not supported on USB\n");
++ return OK;
++ }
++#ifdef ACX_MEM
++ return acx100mem_ioctl_set_phy_amp_bias(ndev, info, vwrq, extra);
++#else
++ return acx100pci_ioctl_set_phy_amp_bias(ndev, info, vwrq, extra);
++#endif
++}
++
++
++/***********************************************************************
++*/
++static const iw_handler acx_ioctl_handler[] =
++{
++ acx_ioctl_commit, /* SIOCSIWCOMMIT */
++ acx_ioctl_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ acx_ioctl_set_freq, /* SIOCSIWFREQ */
++ acx_ioctl_get_freq, /* SIOCGIWFREQ */
++ acx_ioctl_set_mode, /* SIOCSIWMODE */
++ acx_ioctl_get_mode, /* SIOCGIWMODE */
++ acx_ioctl_set_sens, /* SIOCSIWSENS */
++ acx_ioctl_get_sens, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ acx_ioctl_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
++#if IW_HANDLER_VERSION > 4
++ iw_handler_set_spy, /* SIOCSIWSPY */
++ iw_handler_get_spy, /* SIOCGIWSPY */
++ iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
++ iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
++#else /* IW_HANDLER_VERSION > 4 */
++#ifdef WIRELESS_SPY
++ NULL /* acx_ioctl_set_spy FIXME */, /* SIOCSIWSPY */
++ NULL /* acx_ioctl_get_spy */, /* SIOCGIWSPY */
++#else /* WSPY */
++ NULL, /* SIOCSIWSPY */
++ NULL, /* SIOCGIWSPY */
++#endif /* WSPY */
++ NULL, /* [nothing] */
++ NULL, /* [nothing] */
++#endif /* IW_HANDLER_VERSION > 4 */
++ acx_ioctl_set_ap, /* SIOCSIWAP */
++ acx_ioctl_get_ap, /* SIOCGIWAP */
++ NULL, /* [nothing] */
++ acx_ioctl_get_aplist, /* SIOCGIWAPLIST */
++ acx_ioctl_set_scan, /* SIOCSIWSCAN */
++ acx_ioctl_get_scan, /* SIOCGIWSCAN */
++ acx_ioctl_set_essid, /* SIOCSIWESSID */
++ acx_ioctl_get_essid, /* SIOCGIWESSID */
++ acx_ioctl_set_nick, /* SIOCSIWNICKN */
++ acx_ioctl_get_nick, /* SIOCGIWNICKN */
++ NULL, /* [nothing] */
++ NULL, /* [nothing] */
++ acx_ioctl_set_rate, /* SIOCSIWRATE */
++ acx_ioctl_get_rate, /* SIOCGIWRATE */
++ acx_ioctl_set_rts, /* SIOCSIWRTS */
++ acx_ioctl_get_rts, /* SIOCGIWRTS */
++#if ACX_FRAGMENTATION
++ acx_ioctl_set_frag, /* SIOCSIWFRAG */
++ acx_ioctl_get_frag, /* SIOCGIWFRAG */
++#else
++ NULL, /* SIOCSIWFRAG */
++ NULL, /* SIOCGIWFRAG */
++#endif
++ acx_ioctl_set_txpow, /* SIOCSIWTXPOW */
++ acx_ioctl_get_txpow, /* SIOCGIWTXPOW */
++ acx_ioctl_set_retry, /* SIOCSIWRETRY */
++ acx_ioctl_get_retry, /* SIOCGIWRETRY */
++ acx_ioctl_set_encode, /* SIOCSIWENCODE */
++ acx_ioctl_get_encode, /* SIOCGIWENCODE */
++ acx_ioctl_set_power, /* SIOCSIWPOWER */
++ acx_ioctl_get_power, /* SIOCGIWPOWER */
++};
++
++
++/***********************************************************************
++*/
++
++/* if you plan to reorder something, make sure to reorder all other places
++ * accordingly! */
++/* SET/GET convention: SETs must have even position, GETs odd */
++#define ACX100_IOCTL SIOCIWFIRSTPRIV
++enum {
++ ACX100_IOCTL_DEBUG = ACX100_IOCTL,
++ ACX100_IOCTL_GET__________UNUSED1,
++ ACX100_IOCTL_SET_PLED,
++ ACX100_IOCTL_GET_PLED,
++ ACX100_IOCTL_SET_RATES,
++ ACX100_IOCTL_LIST_DOM,
++ ACX100_IOCTL_SET_DOM,
++ ACX100_IOCTL_GET_DOM,
++ ACX100_IOCTL_SET_SCAN_PARAMS,
++ ACX100_IOCTL_GET_SCAN_PARAMS,
++ ACX100_IOCTL_SET_PREAMB,
++ ACX100_IOCTL_GET_PREAMB,
++ ACX100_IOCTL_SET_ANT,
++ ACX100_IOCTL_GET_ANT,
++ ACX100_IOCTL_RX_ANT,
++ ACX100_IOCTL_TX_ANT,
++ ACX100_IOCTL_SET_PHY_AMP_BIAS,
++ ACX100_IOCTL_GET_PHY_CHAN_BUSY,
++ ACX100_IOCTL_SET_ED,
++ ACX100_IOCTL_GET__________UNUSED3,
++ ACX100_IOCTL_SET_CCA,
++ ACX100_IOCTL_GET__________UNUSED4,
++ ACX100_IOCTL_MONITOR,
++ ACX100_IOCTL_TEST,
++ ACX100_IOCTL_DBG_SET_MASKS,
++ ACX111_IOCTL_INFO,
++ ACX100_IOCTL_DBG_SET_IO,
++ ACX100_IOCTL_DBG_GET_IO
++};
++
++
++static const iw_handler acx_ioctl_private_handler[] =
++{
++#if ACX_DEBUG
++[ACX100_IOCTL_DEBUG - ACX100_IOCTL] = acx_ioctl_set_debug,
++#endif
++[ACX100_IOCTL_SET_PLED - ACX100_IOCTL] = acx100_ioctl_set_led_power,
++[ACX100_IOCTL_GET_PLED - ACX100_IOCTL] = acx100_ioctl_get_led_power,
++[ACX100_IOCTL_SET_RATES - ACX100_IOCTL] = acx_ioctl_set_rates,
++[ACX100_IOCTL_LIST_DOM - ACX100_IOCTL] = acx_ioctl_list_reg_domain,
++[ACX100_IOCTL_SET_DOM - ACX100_IOCTL] = acx_ioctl_set_reg_domain,
++[ACX100_IOCTL_GET_DOM - ACX100_IOCTL] = acx_ioctl_get_reg_domain,
++[ACX100_IOCTL_SET_SCAN_PARAMS - ACX100_IOCTL] = acx_ioctl_set_scan_params,
++[ACX100_IOCTL_GET_SCAN_PARAMS - ACX100_IOCTL] = acx_ioctl_get_scan_params,
++[ACX100_IOCTL_SET_PREAMB - ACX100_IOCTL] = acx_ioctl_set_short_preamble,
++[ACX100_IOCTL_GET_PREAMB - ACX100_IOCTL] = acx_ioctl_get_short_preamble,
++[ACX100_IOCTL_SET_ANT - ACX100_IOCTL] = acx_ioctl_set_antenna,
++[ACX100_IOCTL_GET_ANT - ACX100_IOCTL] = acx_ioctl_get_antenna,
++[ACX100_IOCTL_RX_ANT - ACX100_IOCTL] = acx_ioctl_set_rx_antenna,
++[ACX100_IOCTL_TX_ANT - ACX100_IOCTL] = acx_ioctl_set_tx_antenna,
++[ACX100_IOCTL_SET_PHY_AMP_BIAS - ACX100_IOCTL] = acx100_ioctl_set_phy_amp_bias,
++[ACX100_IOCTL_GET_PHY_CHAN_BUSY - ACX100_IOCTL] = acx_ioctl_get_phy_chan_busy_percentage,
++[ACX100_IOCTL_SET_ED - ACX100_IOCTL] = acx_ioctl_set_ed_threshold,
++[ACX100_IOCTL_SET_CCA - ACX100_IOCTL] = acx_ioctl_set_cca,
++[ACX100_IOCTL_MONITOR - ACX100_IOCTL] = acx_ioctl_wlansniff,
++[ACX100_IOCTL_TEST - ACX100_IOCTL] = acx_ioctl_unknown11,
++[ACX100_IOCTL_DBG_SET_MASKS - ACX100_IOCTL] = acx_ioctl_dbg_set_masks,
++[ACX111_IOCTL_INFO - ACX100_IOCTL] = acx111_ioctl_info,
++};
++
++
++static const struct iw_priv_args acx_ioctl_private_args[] = {
++#if ACX_DEBUG
++{ cmd : ACX100_IOCTL_DEBUG,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetDebug" },
++#endif
++{ cmd : ACX100_IOCTL_SET_PLED,
++ set_args : IW_PRIV_TYPE_BYTE | 2,
++ get_args : 0,
++ name : "SetLEDPower" },
++{ cmd : ACX100_IOCTL_GET_PLED,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 2,
++ name : "GetLEDPower" },
++{ cmd : ACX100_IOCTL_SET_RATES,
++ set_args : IW_PRIV_TYPE_CHAR | 256,
++ get_args : 0,
++ name : "SetRates" },
++{ cmd : ACX100_IOCTL_LIST_DOM,
++ set_args : 0,
++ get_args : 0,
++ name : "ListRegDomain" },
++{ cmd : ACX100_IOCTL_SET_DOM,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetRegDomain" },
++{ cmd : ACX100_IOCTL_GET_DOM,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ name : "GetRegDomain" },
++{ cmd : ACX100_IOCTL_SET_SCAN_PARAMS,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ get_args : 0,
++ name : "SetScanParams" },
++{ cmd : ACX100_IOCTL_GET_SCAN_PARAMS,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ name : "GetScanParams" },
++{ cmd : ACX100_IOCTL_SET_PREAMB,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetSPreamble" },
++{ cmd : ACX100_IOCTL_GET_PREAMB,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ name : "GetSPreamble" },
++{ cmd : ACX100_IOCTL_SET_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetAntenna" },
++{ cmd : ACX100_IOCTL_GET_ANT,
++ set_args : 0,
++ get_args : 0,
++ name : "GetAntenna" },
++{ cmd : ACX100_IOCTL_RX_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetRxAnt" },
++{ cmd : ACX100_IOCTL_TX_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetTxAnt" },
++{ cmd : ACX100_IOCTL_SET_PHY_AMP_BIAS,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetPhyAmpBias"},
++{ cmd : ACX100_IOCTL_GET_PHY_CHAN_BUSY,
++ set_args : 0,
++ get_args : 0,
++ name : "GetPhyChanBusy" },
++{ cmd : ACX100_IOCTL_SET_ED,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetED" },
++{ cmd : ACX100_IOCTL_SET_CCA,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetCCA" },
++{ cmd : ACX100_IOCTL_MONITOR,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
++ get_args : 0,
++ name : "monitor" },
++{ cmd : ACX100_IOCTL_TEST,
++ set_args : 0,
++ get_args : 0,
++ name : "Test" },
++{ cmd : ACX100_IOCTL_DBG_SET_MASKS,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
++ get_args : 0,
++ name : "DbgSetMasks" },
++{ cmd : ACX111_IOCTL_INFO,
++ set_args : 0,
++ get_args : 0,
++ name : "GetAcx111Info" },
++{ cmd : ACX100_IOCTL_DBG_SET_IO,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ get_args : 0,
++ name : "DbgSetIO" },
++{ cmd : ACX100_IOCTL_DBG_GET_IO,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3,
++ get_args : 0,
++ name : "DbgGetIO" },
++};
++
++
++const struct iw_handler_def acx_ioctl_handler_def =
++{
++ .num_standard = VEC_SIZE(acx_ioctl_handler),
++ .num_private = VEC_SIZE(acx_ioctl_private_handler),
++ .num_private_args = VEC_SIZE(acx_ioctl_private_args),
++ .standard = (iw_handler *) acx_ioctl_handler,
++ .private = (iw_handler *) acx_ioctl_private_handler,
++ .private_args = (struct iw_priv_args *) acx_ioctl_private_args,
++#if IW_HANDLER_VERSION > 5
++ .get_wireless_stats = acx_e_get_wireless_stats
++#endif /* IW > 5 */
++};
+Index: linux-2.6.23/drivers/net/wireless/acx/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/Kconfig 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,113 @@
++config ACX
++ tristate "TI acx100/acx111 802.11b/g wireless chipsets"
++ depends on NET_RADIO && EXPERIMENTAL
++ select FW_LOADER
++ ---help---
++ A driver for 802.11b/g wireless cards based on
++ Texas Instruments acx100 and acx111 chipsets.
++
++ This driver supports Host AP mode that allows
++ your computer to act as an IEEE 802.11 access point.
++ This driver is new and experimental.
++
++ Texas Instruments did not take part in development of this driver
++ in any way, shape or form.
++
++ The driver can be compiled as a module and will be named "acx".
++
++config ACX_PCI
++ bool "TI acx100/acx111 802.11b/g PCI"
++ depends on ACX && PCI
++ ---help---
++ Include PCI and CardBus support in acx.
++
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware may be in a form of single image 40-100kb in size
++ (a 'combined' firmware) or two images - main image
++ (again 40-100kb) and radio image (~10kb or less).
++
++ Firmware images are requested from hotplug using following names:
++
++ tiacx100 - main firmware image for acx100 chipset
++ tiacx100rNN - radio acx100 firmware for radio type NN
++ tiacx100cNN - combined acx100 firmware for radio type NN
++ tiacx111 - main acx111 firmware
++ tiacx111rNN - radio acx111 firmware for radio type NN
++ tiacx111cNN - combined acx111 firmware for radio type NN
++
++ Driver will attempt to load combined image first.
++ If no such image is found, it will try to load main image
++ and radio image instead.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_USB
++ bool "TI acx100/acx111 802.11b/g USB"
++ depends on ACX && (USB=y || USB=ACX)
++ ---help---
++ Include USB support in acx.
++
++ There is only one currently known device in this category,
++ D-Link DWL-120+, but newer devices seem to be on the horizon.
++
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware for USB device is requested from hotplug
++ by the 'tiacx100usb' name.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_MEM
++ bool "TI acx100/acx111 802.11b/g memory mapped slave 16 interface"
++ depends on ACX
++ ---help---
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware for USB device is requested from hotplug
++ by the 'tiacx100usb' name.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_CS
++ bool "TI acx100/acx111 802.11b/g cardbus interface"
++ depends on ACX
++ ---help---
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ This driver is based on memory mapped driver.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_HX4700
++ tristate "ACX support for the iPAQ hx4700 using ACX_MEM"
++ depends on HX4700_CORE && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the iPAQ hx4700.
++
++config ACX_HTCUNIVERSAL
++ tristate "ACX support for the HTC Universal using ACX_MEM"
++ depends on HTCUNIVERSAL_CORE && HTC_ASIC3 && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the HTC Universal.
++
++config ACX_HTCSABLE
++ tristate "ACX support for the HTC Sable (IPAQ hw6915) using ACX_MEM"
++ depends on MACH_HW6900 && HTC_ASIC3 && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the HTC Sable (IPAQ hw6915).
++
++config ACX_RX3000
++ tristate "ACX support for the iPAQ RX3000 using ACX_MEM"
++ depends on MACH_RX3715 && ACX_MEM && LEDS_ASIC3
++ ---help---
++ Include memory interface support in acx for the IPAQ RX3000.
++
+Index: linux-2.6.23/drivers/net/wireless/acx/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/Makefile 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,21 @@
++#obj-m += acx.o
++
++#acx-obj-y += pci.o
++#acx-obj-y += usb.o
++
++#acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
++
++# Use this if you have proper Kconfig integration:
++
++obj-$(CONFIG_ACX) += acx.o
++obj-$(CONFIG_ACX_HX4700) += hx4700_acx.o
++obj-$(CONFIG_ACX_HTCUNIVERSAL) += htcuniversal_acx.o
++obj-$(CONFIG_ACX_HTCSABLE) += htcsable_acx.o
++obj-$(CONFIG_ACX_RX3000) += rx3000_acx.o
++#
++acx-obj-$(CONFIG_ACX_PCI) += pci.o
++acx-obj-$(CONFIG_ACX_USB) += usb.o
++acx-obj-$(CONFIG_ACX_MEM) += mem.o
++acx-obj-$(CONFIG_ACX_CS) += cs.o
++#
++acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
+Index: linux-2.6.23/drivers/net/wireless/acx/mem.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/mem.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,5363 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++**
++** Slave memory interface support:
++**
++** Todd Blumer - SDG Systems
++** Bill Reese - HP
++** Eric McCorkle - Shadowsun
++*/
++#define ACX_MEM 1
++
++/*
++ * non-zero makes it dump the ACX memory to the console then
++ * panic when you cat /proc/driver/acx_wlan0_diag
++ */
++#define DUMP_MEM_DEFINED 1
++
++#define DUMP_MEM_DURING_DIAG 0
++#define DUMP_IF_SLOW 0
++
++#define PATCH_AROUND_BAD_SPOTS 1
++#define HX4700_FIRMWARE_CHECKSUM 0x0036862e
++#define HX4700_ALTERNATE_FIRMWARE_CHECKSUM 0x00368a75
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/irq.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/inetdevice.h>
++
++#include "acx.h"
++#include "acx_hw.h"
++
++/***********************************************************************
++*/
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#include <asm/io.h>
++
++#define REG_ACX_VENDOR_ID 0x900
++/*
++ * This is the vendor id on the HX4700, anyway
++ */
++#define ACX_VENDOR_ID 0x8400104c
++
++typedef enum {
++ ACX_SOFT_RESET = 0,
++
++ ACX_SLV_REG_ADDR,
++ ACX_SLV_REG_DATA,
++ ACX_SLV_REG_ADATA,
++
++ ACX_SLV_MEM_CP,
++ ACX_SLV_MEM_ADDR,
++ ACX_SLV_MEM_DATA,
++ ACX_SLV_MEM_CTL,
++} acxreg_t;
++
++/***********************************************************************
++*/
++static void acxmem_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxmem_i_set_multicast_list(struct net_device *ndev);
++
++static int acxmem_e_open(struct net_device *ndev);
++static int acxmem_e_close(struct net_device *ndev);
++static void acxmem_s_up(struct net_device *ndev);
++static void acxmem_s_down(struct net_device *ndev);
++
++static void dump_acxmem (acx_device_t *adev, u32 start, int length);
++static int acxmem_complete_hw_reset (acx_device_t *adev);
++static void acxmem_s_delete_dma_regions(acx_device_t *adev);
++
++static struct platform_device *resume_pdev;
++
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend(struct platform_device *pdev, pm_message_t state);
++#else
++acxmem_e_suspend(struct device *pdev, u32 state);
++#endif
++static void
++fw_resumer(struct work_struct *notused);
++//fw_resumer( void *data );
++
++static int acx_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++ struct net_device *ndev = ptr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /*
++ * Upper level ioctl() handlers send a NETDEV_CHANGEADDR if the MAC address changes.
++ */
++
++ if (NETDEV_CHANGEADDR == event) {
++ /*
++ * the upper layers put the new MAC address in ndev->dev_addr; we just copy
++ * it over and update the ACX with it.
++ */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ adev->set_mask |= GETSET_STATION_ID;
++ acx_s_update_card_settings (adev);
++ }
++
++ return 0;
++}
++
++static struct notifier_block acx_netdev_notifier = {
++ .notifier_call = acx_netdev_event,
++};
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_id_register (acx_device_t *adev)
++{
++ writel (0x24, &adev->iobase[ACX_SLV_REG_ADDR]);
++ return readl (&adev->iobase[ACX_SLV_REG_DATA]);
++}
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++ u32 val;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readl(((u8*)adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ val = readl( &adev->iobase[ACX_SLV_REG_DATA] );
++
++ return val;
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ u16 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readw(((u8 *) adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u16 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return lo;
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ u8 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20)
++ return readb(((u8 *)adev->iobase) + addr);
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return (u8)lo;
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writel(val, ((u8*)adev->iobase) + addr);
++ return;
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writel( val, &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writew(val, ((u8 *)adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writew( val, (u16 *) &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writeb(val, ((u8 *) adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writeb( val, (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ (void) readl(adev->iobase);
++}
++
++INLINE_IO void
++set_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp | bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++INLINE_IO void
++clear_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp & ~bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++/*
++ * Copy from PXA memory to the ACX memory. This assumes both the PXA and ACX
++ * addresses are 32 bit aligned. Count is in bytes.
++ */
++INLINE_IO void
++write_slavemem32 (acx_device_t *adev, u32 slave_address, u32 val)
++{
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, val);
++}
++
++INLINE_IO u32
++read_slavemem32 (acx_device_t *adev, u32 slave_address)
++{
++ u32 val;
++
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ val = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++
++ return val;
++}
++
++INLINE_IO void
++write_slavemem8 (acx_device_t *adev, u32 slave_address, u8 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++INLINE_IO u8
++read_slavemem8 (acx_device_t *adev, u32 slave_address)
++{
++ u8 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xff;
++
++ return val;
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO void
++write_slavemem16 (acx_device_t *adev, u32 slave_address, u16 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xffff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO u16
++read_slavemem16 (acx_device_t *adev, u32 slave_address)
++{
++ u16 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xffff;
++
++ return val;
++}
++
++/*
++ * Copy from slave memory
++ *
++ * TODO - rewrite using address autoincrement, handle partial words
++ */
++void
++copy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count) {
++ u32 tmp = 0;
++ u8 *ptmp = (u8 *) &tmp;
++
++ /*
++ * Right now I'm making the assumption that the destination is aligned, but
++ * I'd better check.
++ */
++ if ((u32) destination & 3) {
++ printk ("acx copy_from_slavemem: warning! destination not word-aligned!\n");
++ }
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ *((u32 *) destination) = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If the word reads above didn't satisfy the count, read one more word
++ * and transfer a byte at a time until the request is satisfied.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *destination++ = *ptmp++;
++ }
++ }
++}
++
++/*
++ * Copy to slave memory
++ *
++ * TODO - rewrite using autoincrement, handle partial words
++ */
++void
++copy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 tmp = 0;
++ u8* ptmp = (u8 *) &tmp;
++ static u8 src[512]; /* make static to avoid huge stack objects */
++
++ /*
++ * For now, make sure the source is word-aligned by copying it to a word-aligned
++ * buffer. Someday rewrite to avoid the extra copy.
++ */
++ if (count > sizeof (src)) {
++ printk ("acx copy_to_slavemem: Warning! buffer overflow!\n");
++ count = sizeof (src);
++ }
++ memcpy (src, source, count);
++ source = src;
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, *((u32 *) source));
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If there are leftovers read the next word from the acx and merge in
++ * what they want to write.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *ptmp++ = *source++;
++ }
++ /*
++ * reset address in case we're currently in auto-increment mode
++ */
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, tmp);
++ udelay (10);
++ }
++
++}
++
++/*
++ * Block copy to slave buffers using memory block chain mode. Copies to the ACX
++ * transmit buffer structure with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) source;
++ static u8 aligned_source[WLAN_A4FR_MAXLEN_WEP_FCS];
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * This should never happen since we're in control of both, but I want to know about
++ * it if it does.
++ */
++ if ((destination & 0x00ffffe0) != destination) {
++ printk ("acx chaincopy: destination block 0x%04x not aligned!\n", destination);
++ }
++ if (count > sizeof aligned_source) {
++ printk( KERN_ERR "chaincopy_to_slavemem overflow!\n" );
++ count = sizeof aligned_source;
++ }
++ if ((u32) source & 3) {
++ memcpy (aligned_source, source, count);
++ data = (u32 *) aligned_source;
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = 2 << 16 | 1 << 2;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = destination & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (destination & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Write the data to the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ writel (*data++, &adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++}
++
++
++/*
++ * Block copy from slave buffers using memory block chain mode. Copies from the ACX
++ * receive buffer structures with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) destination;
++ static u8 aligned_destination[WLAN_A4FR_MAXLEN_WEP_FCS];
++ int saved_count = count;
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * Turns out the network stack sends unaligned things, so fix them before
++ * copying to the ACX.
++ */
++ if ((source & 0x00ffffe0) != source) {
++ printk ("acx chaincopy: source block 0x%04x not aligned!\n", source);
++ dump_acxmem (adev, 0, 0x10000);
++ }
++ if ((u32) destination & 3) {
++ //printk ("acx chaincopy: data destination not word aligned!\n");
++ data = (u32 *) aligned_destination;
++ if (count > sizeof aligned_destination) {
++ printk( KERN_ERR "chaincopy_from_slavemem overflow!\n" );
++ count = sizeof aligned_destination;
++ }
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = (2 << 16) | (1 << 2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = source & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (source & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Read the data from the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ *data++ = readl (&adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++
++ /*
++ * If the destination wasn't aligned, we would have saved it in
++ * the aligned buffer, so copy it where it should go.
++ */
++ if ((u32) destination & 3) {
++ memcpy (destination, aligned_destination, saved_count);
++ }
++}
++
++char
++printable (char c)
++{
++ return ((c >= 20) && (c < 127)) ? c : '.';
++}
++
++#if DUMP_MEM_DEFINED > 0
++static void
++dump_acxmem (acx_device_t *adev, u32 start, int length)
++{
++ int i;
++ u8 buf[16];
++
++ while (length > 0) {
++ printk ("%04x ", start);
++ copy_from_slavemem (adev, buf, start, 16);
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%02x ", buf[i]);
++ }
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%c", printable (buf[i]));
++ }
++ printk ("\n");
++ start += 16;
++ length -= 16;
++ }
++}
++#endif
++
++static void
++enable_acx_irq(acx_device_t *adev);
++static void
++disable_acx_irq(acx_device_t *adev);
++
++/*
++ * Return an acx pointer to the next transmit data block.
++ */
++u32
++allocate_acx_txbuf_space (acx_device_t *adev, int count) {
++ u32 block, next, last_block;
++ int blocks_needed;
++ unsigned long flags;
++
++ spin_lock_irqsave(&adev->txbuf_lock, flags);
++ /*
++ * Take 4 off the memory block size to account for the reserved word at the start of
++ * the block.
++ */
++ blocks_needed = count / (adev->memblocksize - 4);
++ if (count % (adev->memblocksize - 4))
++ blocks_needed++;
++
++ if (blocks_needed <= adev->acx_txbuf_blocks_free) {
++ /*
++ * Take blocks at the head of the free list.
++ */
++ last_block = block = adev->acx_txbuf_free;
++
++ /*
++ * Follow block pointers through the requested number of blocks both to
++ * find the new head of the free list and to set the flags for the blocks
++ * appropriately.
++ */
++ while (blocks_needed--) {
++ /*
++ * Keep track of the last block of the allocation
++ */
++ last_block = adev->acx_txbuf_free;
++
++ /*
++ * Make sure the end control flag is not set.
++ */
++ next = read_slavemem32 (adev, adev->acx_txbuf_free) & 0x7ffff;
++ write_slavemem32 (adev, adev->acx_txbuf_free, next);
++
++ /*
++ * Update the new head of the free list
++ */
++ adev->acx_txbuf_free = next << 5;
++ adev->acx_txbuf_blocks_free--;
++
++ }
++
++ /*
++ * Flag the last block both by clearing out the next pointer
++ * and marking the control field.
++ */
++ write_slavemem32 (adev, last_block, 0x02000000);
++
++ /*
++ * If we're out of buffers make sure the free list pointer is NULL
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ adev->acx_txbuf_free = 0;
++ }
++ }
++ else {
++ block = 0;
++ }
++ spin_unlock_irqrestore (&adev->txbuf_lock, flags);
++ return block;
++}
++
++/*
++ * Return buffer space back to the pool by following the next pointers until we find
++ * the block marked as the end. Point the last block to the head of the free list,
++ * then update the head of the free list to point to the newly freed memory.
++ * This routine gets called in interrupt context, so it shouldn't block to protect
++ * the integrity of the linked list. The ISR already holds the lock.
++ */
++void
++reclaim_acx_txbuf_space (acx_device_t *adev, u32 blockptr) {
++ u32 cur, last, next;
++ unsigned long flags;
++
++ spin_lock_irqsave (&adev->txbuf_lock, flags);
++ if ((blockptr >= adev->acx_txbuf_start) &&
++ (blockptr <= adev->acx_txbuf_start +
++ (adev->acx_txbuf_numblocks - 1) * adev->memblocksize)) {
++ cur = blockptr;
++ do {
++ last = cur;
++ next = read_slavemem32 (adev, cur);
++
++ /*
++ * Advance to the next block in this allocation
++ */
++ cur = (next & 0x7ffff) << 5;
++
++ /*
++ * This block now counts as free.
++ */
++ adev->acx_txbuf_blocks_free++;
++ } while (!(next & 0x02000000));
++
++ /*
++ * last now points to the last block of that allocation. Update the pointer
++ * in that block to point to the free list and reset the free list to the
++ * first block of the free call. If there were no free blocks, make sure
++ * the new end of the list marks itself as truly the end.
++ */
++ if (adev->acx_txbuf_free) {
++ write_slavemem32 (adev, last, adev->acx_txbuf_free >> 5);
++ }
++ else {
++ write_slavemem32 (adev, last, 0x02000000);
++ }
++ adev->acx_txbuf_free = blockptr;
++ }
++ spin_unlock_irqrestore(&adev->txbuf_lock, flags);
++}
++
++/*
++ * Initialize the pieces managing the transmit buffer pool on the ACX. The transmit
++ * buffer is a circular queue with one 32 bit word reserved at the beginning of each
++ * block. The upper 13 bits are a control field, of which only 0x02000000 has any
++ * meaning. The lower 19 bits are the address of the next block divided by 32.
++ */
++void
++init_acx_txbuf (acx_device_t *adev) {
++
++ /*
++ * acx100_s_init_memory_pools set up txbuf_start and txbuf_numblocks for us.
++ * All we need to do is reset the rest of the bookeeping.
++ */
++
++ adev->acx_txbuf_free = adev->acx_txbuf_start;
++ adev->acx_txbuf_blocks_free = adev->acx_txbuf_numblocks;
++
++ /*
++ * Initialization leaves the last transmit pool block without a pointer back to
++ * the head of the list, but marked as the end of the list. That's how we want
++ * to see it, too, so leave it alone. This is only ever called after a firmware
++ * reset, so the ACX memory is in the state we want.
++ */
++
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxmem_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxmem_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxmem_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxmem_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ int count;
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++ fail:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxmem_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxmem_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size, checkMismatch = -1;
++ u32 sum, v32, tmp, id;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++#endif
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ write_flush(adev);
++#endif
++ write_slavemem32 (adev, offset + len - 4, v32);
++
++ id = read_id_register (adev);
++
++ /*
++ * check the data written
++ */
++ tmp = read_slavemem32 (adev, offset + len - 4);
++ if (checkMismatch && (tmp != v32)) {
++ printk ("first data mismatch at 0x%08x good 0x%08x bad 0x%08x id 0x%08x\n",
++ offset + len - 4, v32, tmp, id);
++ checkMismatch = 0;
++ }
++ }
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxmem_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxmem_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ udelay(10);
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++#endif
++ w32 = read_slavemem32 (adev, offset + len - 4);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match\n(0x%08X vs. 0x%08X)!\n"
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxmem_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char *filename = "WLANGEN.BIN";
++#ifdef PATCH_AROUND_BAD_SPOTS
++ u32 offset;
++ int i;
++ /*
++ * arm-linux-objdump -d patch.bin, or
++ * od -Ax -t x4 patch.bin after finding the bounds
++ * of the .text section with arm-linux-objdump -s patch.bin
++ */
++ u32 patch[] = {
++ 0xe584c030, 0xe59fc008,
++ 0xe92d1000, 0xe59fc004, 0xe8bd8000, 0x0000080c,
++ 0x0000aa68, 0x605a2200, 0x2c0a689c, 0x2414d80a,
++ 0x2f00689f, 0x1c27d007, 0x06241e7c, 0x2f000e24,
++ 0xe000d1f6, 0x602e6018, 0x23036468, 0x480203db,
++ 0x60ca6003, 0xbdf0750a, 0xffff0808
++ };
++#endif
++
++ FN_ENTER;
++ /* No combined image; tell common we need the radio firmware, too */
++ adev->need_radio_fw = 1;
++
++ fw_image = acx_s_read_fw(adev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++#ifdef PATCH_AROUND_BAD_SPOTS
++ /*
++ * Only want to do this if the firmware is exactly what we expect for an
++ * iPaq 4700; otherwise, bad things would ensue.
++ */
++ if ((HX4700_FIRMWARE_CHECKSUM == fw_image->chksum) ||
++ (HX4700_ALTERNATE_FIRMWARE_CHECKSUM == fw_image->chksum)) {
++ /*
++ * Put the patch after the main firmware image. 0x950c contains
++ * the ACX's idea of the end of the firmware. Use that location to
++ * load ours (which depends on that location being 0xab58) then
++ * update that location to point to after ours.
++ */
++
++ offset = read_slavemem32 (adev, 0x950c);
++
++ log (L_DEBUG, "acx: patching in at 0x%04x\n", offset);
++
++ for (i = 0; i < sizeof(patch) / sizeof(patch[0]); i++) {
++ write_slavemem32 (adev, offset, patch[i]);
++ offset += sizeof(u32);
++ }
++
++ /*
++ * Patch the instruction at 0x0804 to branch to our ARM patch at 0xab58
++ */
++ write_slavemem32 (adev, 0x0804, 0xea000000 + (0xab58-0x0804-8)/4);
++
++ /*
++ * Patch the instructions at 0x1f40 to branch to our Thumb patch at 0xab74
++ *
++ * 4a00 ldr r2, [pc, #0]
++ * 4710 bx r2
++ * .data 0xab74+1
++ */
++ write_slavemem32 (adev, 0x1f40, 0x47104a00);
++ write_slavemem32 (adev, 0x1f44, 0x0000ab74+1);
++
++ /*
++ * Bump the end of the firmware up to beyond our patch.
++ */
++ write_slavemem32 (adev, 0x950c, offset);
++
++ }
++#endif
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxmem_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("RADIONN.BIN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "RADIO%02x.BIN",
++ adev->radio_type);
++ radio_image = acx_s_read_fw(adev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++/***********************************************************************
++** acxmem_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxmem_l_reset_mac(acx_device_t *adev)
++{
++ int count;
++ FN_ENTER;
++
++ /* halt eCPU */
++ set_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++
++ /* now do soft reset of eCPU, set bit */
++ set_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++
++ /* Windows driver sleeps here for a while with this sequence */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ clear_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++
++ /* now start a burst read from initial EEPROM */
++ set_regbits (adev, IO_ACX_EE_START, 0x1);
++
++ /*
++ * Windows driver sleeps here for a while with this sequence
++ */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* Windows driver writes 0x10000 to register 0x808 here */
++
++ write_reg32 (adev, 0x808, 0x10000);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_verify_init
++*/
++static int
++acxmem_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u32 irqstat = read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if ((irqstat != 0xFFFFFFFF) && (irqstat & HOST_INT_FCS_THRESHOLD)) {
++ result = OK;
++ write_reg32(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxmem_write_cmd_type_status
++*/
++
++static inline void
++acxmem_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ write_slavemem32 (adev, (u32) adev->cmd_area, type | (status << 16));
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxmem_read_cmd_type_status
++*/
++static u32
++acxmem_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = read_slavemem32 (adev, (u32) adev->cmd_area);
++
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxmem_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxmem_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8*) cmd_offs;
++ adev->info_area = (u8*) info_offs;
++ /*
++ log(L_DEBUG, "iobase2=%p\n"
++ */
++ log( L_DEBUG, "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxmem_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++static int
++acxmem_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++ u32 tmp;
++
++ FN_ENTER;
++ /*
++ write_reg32 (adev, IO_ACX_SLV_MEM_CP, 0);
++ */
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ /* Windows driver does some funny things here */
++ /*
++ * clear bit 0x200 in register 0x2A0
++ */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /*
++ * Set bit 0x200 in ACX_GPIO_OUT
++ */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++
++ /*
++ * read register 0x900 until its value is 0x8400104C, sleeping
++ * in between reads if it's not immediate
++ */
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ count = 500;
++ while (count-- && (tmp != ACX_VENDOR_ID)) {
++ mdelay (10);
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ }
++
++ /* end what Windows driver does */
++
++ acxmem_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg32(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++ printk("ACX radio type 0x%02x\n", (hardware_info >> 8) & 0xff);
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxmem_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ clear_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* Windows driver clears bit 0x200 in register 0x2A0 here */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /* Windows driver sets bit 0x200 in ACX_GPIO_OUT here */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++ /* wait for eCPU bootup */
++ if (OK != acxmem_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++ init_mboxes(adev);
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxmem_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxmem_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ int i, j;
++ u8 *p;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxmem_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++#if DUMP_IF_SLOW > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("not idle");
++#endif
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /*
++ * slave memory version
++ */
++ copy_to_slavemem (adev, (u32) (adev->cmd_area + 4), buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxmem_write_cmd_type_status(adev, cmd, 0);
++
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxmem_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ printk("%s: "FUNC"(): device irq status 0x%04x\n",
++ devname, read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES));
++ printk("%s: "FUNC"(): IO_ACX_IRQ_MASK 0x%04x IO_ACX_FEMR 0x%04x\n",
++ devname,
++ read_reg16 (adev, IO_ACX_IRQ_MASK),
++ read_reg16 (adev, IO_ACX_FEMR));
++ if (read_reg16 (adev, IO_ACX_IRQ_MASK) == 0xffff) {
++ printk ("acxmem: firmware probably hosed - reloading\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ {
++ pm_message_t state;
++ acxmem_e_suspend (resume_pdev, state);
++ }
++#else
++ acxmem_e_suspend (adev->dev, 0);
++#endif
++ {
++ struct work_struct *notused;
++ fw_resumer (notused);
++ }
++ }
++
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buflen > 388) {
++ /*
++ * 388 is maximum command length
++ */
++ printk ("invalid length 0x%08x\n", buflen);
++ buflen = 388;
++ }
++ p = (u8 *) buffer;
++ for (i = 0; i < buflen; i+= 16) {
++ printk ("%04x:", i);
++ for (j = 0; (j < 16) && (i+j < buflen); j++) {
++ printk (" %02x", *p++);
++ }
++ printk ("\n");
++ }
++
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ copy_from_slavemem (adev, buffer, (u32) (adev->cmd_area + 4), buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#if defined(NONESSENTIAL_FEATURES)
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxmem_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++/***********************************************************************
++** acxmem_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++void
++acxmem_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ kfree(ptr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_delete_dma_regions
++*/
++static void
++acxmem_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ /*
++ * slave memory interface really doesn't like this.
++ */
++ /*
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++ */
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxmem_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_MEM_CP */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++/*
++ * Most of the acx specific pieces of hardware reset.
++ */
++static int
++acxmem_complete_hw_reset (acx_device_t *adev)
++{
++ acx111_ie_configoption_t co;
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxmem_s_reset_dev (adev))
++ return -1;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ copy_from_slavemem (adev, (u8*) &co, (u32) adev->cmd_area, sizeof (co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ return -3;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++ /*
++ * Set up transmit buffer administration
++ */
++ init_acx_txbuf (adev);
++
++ /*
++ * Windows driver writes 0x01000000 to register 0x288, RADIO_CTL, if the form factor
++ * is 3. It also write protects the EEPROM by writing 1<<9 to GPIO_OUT
++ */
++ if (adev->form_factor == 3) {
++ set_regbits (adev, 0x288, 0x01000000);
++ set_regbits (adev, 0x298, 1<<9);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxmem_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ return -2;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ return 0;
++}
++
++static int __devinit
++acxmem_e_probe(struct platform_device *pdev)
++{
++ struct acx_hardware_data *hwdata = pdev->dev.platform_data;
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ int i;
++ unsigned long addr_size=0;
++ u8 chip_type;
++
++ FN_ENTER;
++ (void) hwdata->start_hw();
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = CHIPTYPE_ACX100;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ printk("acx: found %s-based wireless network card\n", chip_name);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ goto fail_alloc_netdev;
++ }
++
++ platform_set_drvdata (pdev, ndev);
++
++ ether_setup(ndev);
++
++ /*
++ * use platform_data resources that were provided
++ */
++ ndev->irq = 0;
++ for (i=0; i<pdev->num_resources; i++) {
++ if (pdev->resource[i].flags == IORESOURCE_IRQ) {
++ ndev->irq = pdev->resource[i].start;
++ }
++ else if (pdev->resource[i].flags == IORESOURCE_MEM) {
++ ndev->base_addr = pdev->resource[i].start;
++ addr_size = pdev->resource[i].end - pdev->resource[i].start;
++ }
++ }
++ if (addr_size == 0 || ndev->irq == 0)
++ goto fail_hw_params;
++ ndev->open = &acxmem_e_open;
++ ndev->stop = &acxmem_e_close;
++ pdev->dev.release = &acxmem_e_release;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxmem_i_set_multicast_list;
++ ndev->tx_timeout = &acxmem_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ spin_lock_init(&adev->txbuf_lock);
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->dev = &pdev->dev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_MEM;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = (volatile u32 *) ndev->base_addr;
++ adev->iobase = (volatile u32 *) ioremap_nocache (ndev->base_addr, addr_size);
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#if defined(NONESSENTIAL_FEATURES)
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ SET_NETDEV_DEV(ndev, &pdev->dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", ndev->irq);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ if (OK != acxmem_complete_hw_reset (adev))
++ goto fail_reset;
++
++ /*
++ * Set up default things for most of the card settings.
++ */
++ acx_s_set_defaults(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /*
++ * Set up a default monitor type so that poor combinations of initialization
++ * sequences in monitor mode don't end up destroying the hardware type.
++ */
++ adev->monitor_type = ARPHRD_ETHER;
++
++ /*
++ * Register to receive inetaddr notifier changes. This will allow us to
++ * catch if the user changes the MAC address of the interface.
++ */
++ register_netdevice_notifier(&acx_netdev_notifier);
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxmem_s_delete_dma_regions(adev);
++
++fail_reset:
++fail_hw_params:
++ free_netdev(ndev);
++fail_alloc_netdev:
++fail_unknown_chiptype:
++
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static int __devexit
++acxmem_e_remove(struct platform_device *pdev)
++{
++ struct acx_hardware_data *hwdata = pdev->dev.platform_data;
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = (struct net_device*) platform_get_drvdata(pdev);
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxmem_l_power_led(adev, 0);
++
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxmem_l_reset_mac(adev);
++ } else {
++ u16 temp;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++
++ /*
++ * Unregister the notifier chain
++ */
++ unregister_netdevice_notifier(&acx_netdev_notifier);
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxmem_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxmem_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ acxmem_s_delete_dma_regions(adev);
++
++ /* finally, clean up PCI bus state */
++ if (adev->iobase) iounmap((void *)adev->iobase);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ (void) hwdata->stop_hw();
++
++ printk ("e_remove done\n");
++end:
++ FN_EXIT0;
++
++ return 0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend(struct platform_device *pdev, pm_message_t state)
++#else
++acxmem_e_suspend(struct device *pdev, u32 state)
++#endif
++{
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ acx_device_t *adev;
++ struct acx_hardware_data *hwdata;
++
++ FN_ENTER;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ hwdata = adev->dev->platform_data;
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(ndev); /* this one cannot sleep */
++ acxmem_s_down(ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxmem_s_delete_dma_regions(adev);
++
++ /*
++ * Turn the ACX chip off.
++ */
++ hwdata->stop_hw();
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++
++static void
++fw_resumer(struct work_struct *notused)
++{
++ struct platform_device *pdev = resume_pdev;
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ acx_device_t *adev;
++ struct acx_hardware_data *hwdata;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ return;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ hwdata = adev->dev->platform_data;
++
++ /*
++ * Turn on the ACX.
++ */
++ hwdata->start_hw();
++
++ acxmem_complete_hw_reset (adev);
++
++ /*
++ * done by acx_s_set_defaults for initial startup
++ */
++ acxmem_set_interrupt_mask(adev);
++
++ printk ("rsm: bringing up interface\n");
++ SET_BIT (adev->set_mask, GETSET_ALL);
++ acxmem_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-)
++ */
++ /* - most settings updated in acxmem_s_up()
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ */
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++ acx_sem_unlock(adev);
++}
++
++DECLARE_WORK( fw_resume_work, fw_resumer );
++
++static int
++acxmem_e_resume(struct platform_device *pdev)
++{
++ FN_ENTER;
++
++ resume_pdev = pdev;
++ schedule_work( &fw_resume_work );
++
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxmem_s_up
++**
++** This function is called by acxmem_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_down
++**
++** This disables the netdevice
++**
++** Side effects:
++** - disables on-card interrupt request
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxmem_i_interrupt, SA_INTERRUPT, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ set_irq_type (ndev->irq, IRQT_FALLING);
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++
++ /* ifup device */
++ acxmem_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxmem_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxmem_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxmem_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxmem_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxmem_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxmem_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxmem_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ register rxdesc_t *rxdesc;
++ unsigned count, tail;
++ u32 addr;
++ u8 Ctl_8;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ /*
++ * Unlike the PCI interface, where the ACX can write directly to
++ * the host descriptors, on the slave memory interface we have to
++ * pull these. All we really need to do is check the Ctl_8 field
++ * in the rx descriptor on the ACX, which should be 0x11000000 if
++ * we should process it.
++ */
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_HOSTOWN) &&
++ (Ctl_8 & DESC_CTL_ACXDONE))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_8=%02X\n", tail, Ctl_8);
++ /*
++ * If the ACX has CTL_RECLAIM set on this descriptor there
++ * is no buffer associated; it just wants us to tell it to
++ * reclaim the memory.
++ */
++ if (!(Ctl_8 & DESC_CTL_RECLAIM)) {
++
++ /*
++ * slave interface - pull data now
++ */
++ hostdesc->length = read_slavemem16 (adev, (u32) &(rxdesc->total_length));
++
++ /*
++ * hostdesc->data is an rxbuffer_t, which includes header information,
++ * but the length in the data packet doesn't. The header information
++ * takes up an additional 12 bytes, so add that to the length we copy.
++ */
++ addr = read_slavemem32 (adev, (u32) &(rxdesc->ACXMemPtr));
++ if (addr) {
++ /*
++ * How can &(rxdesc->ACXMemPtr) above ever be zero? Looks like we
++ * get that now and then - try to trap it for debug.
++ */
++ if (addr & 0xffff0000) {
++ printk("rxdesc 0x%08x\n", (u32) rxdesc);
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("Bad access!");
++ }
++ chaincopy_from_slavemem (adev, (u8 *) hostdesc->data, addr,
++ hostdesc->length +
++ (u32) &((rxbuffer_t *)0)->hdr_a3);
++ acx_l_process_rxbuf(adev, hostdesc->data);
++ }
++ }
++ else {
++ printk ("rx reclaim only!\n");
++ }
++
++ hostdesc->Status = 0;
++
++ /*
++ * Let the ACX know we're done.
++ */
++ CLEAR_BIT (Ctl_8, DESC_CTL_HOSTOWN);
++ SET_BIT (Ctl_8, DESC_CTL_HOSTDONE);
++ SET_BIT (Ctl_8, DESC_CTL_RECLAIM);
++ write_slavemem8 (adev, (u32) &rxdesc->Ctl_8, Ctl_8);
++
++ /*
++ * Now tell the ACX we've finished with the receive buffer so
++ * it can finish the reclaim.
++ */
++ write_reg16 (adev, IO_ACX_INT_TRIG, INT_TRIG_RXPRC);
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++
++ /* if next descriptor is empty, then bail out */
++ if (!(Ctl_8 & DESC_CTL_HOSTOWN) || !(Ctl_8 & DESC_CTL_ACXDONE))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = read_slavemem32 (adev, (u32) adev->info_area);
++
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ write_slavemem32(adev, (u32) adev->info_area, info_type | 0x00010000);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ printk(" Rx_Complete");
++ }
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxmem_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxmem_i_interrupt(int irq, void *dev_id)
++#else
++acxmwm_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_DATA) {
++ log(L_IRQ, "got Rx_Data IRQ\n");
++ acxmem_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxmem_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxmem_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ /* | HOST_INT_RX_DATA */
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ | HOST_INT_RX_COMPLETE
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxmem_l_power_led
++*/
++void
++acxmem_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ printk ("Interrogating queue config\n");
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++ printk ("done with queue config\n");
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ printk ("Interrogating mem config options\n");
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++ printk ("done with mem config options\n");
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ printk ("Interrogating mem map\n");
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++ printk ("done with mem map\n");
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ printk ("Interrogating rxconfig\n");
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++ printk ("done with queue rxconfig\n");
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ printk ("Interrogating fcs err count\n");
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++ printk ("done with err count\n");
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ printk ("Interrogating rate fallback\n");
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++ printk ("done with rate fallback\n");
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++/***************************************************************
++** acxmem_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxmem_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++ static int txattempts = 0;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ /*
++ * Probably the ACX ignored a transmit attempt and now there's a packet
++ * sitting in the queue we think should be transmitting but the ACX doesn't
++ * know about.
++ * On the first pass, send the ACX a TxProc interrupt to try moving
++ * things along, and if that doesn't work (ie, we get called again) completely
++ * flush the transmit queue.
++ */
++ if (txattempts < 10) {
++ txattempts++;
++ printk ("acx: trying to wake up ACX\n");
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev); }
++ else {
++ txattempts = 0;
++ printk ("acx: flushing transmit queue.\n");
++ acxmem_l_clean_txdesc_emergency (adev);
++ }
++ txdesc = NULL;
++ goto end;
++ }
++
++ /*
++ * Make a quick check to see if there is transmit buffer space on
++ * the ACX. This can't guarantee there is enough space for the packet
++ * since we don't yet know how big it is, but it will prevent at least some
++ * annoyances.
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ /*
++ * txdesc points to ACX memory
++ */
++ txdesc = get_txdesc(adev, head);
++ ctl8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++
++ /*
++ * If we don't own the buffer (HOSTOWN) it is certainly not free; however,
++ * we may have previously thought we had enough memory to send
++ * a packet, allocated the buffer then gave up when we found not enough
++ * transmit buffer space on the ACX. In that case, HOSTOWN and
++ * ACXDONE will both be set.
++ */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_ACXDONE_HOSTOWN);
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***************************************************************
++** acxmem_l_dealloc_tx
++** Clears out a previously allocatedvoid acxmem_l_dealloc_tx(tx_t *tx_opaque);
++ transmit descriptor. The ACX
++** can get confused if we skip transmit descriptors in the queue,
++** so when we don't need a descriptor return it to its original
++** state and move the queue head pointer back.
++**
++*/
++void
++acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++ /*
++ * txdesc is the address of the descriptor on the ACX.
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txdesc_t tmptxdesc;
++ int index;
++
++ memset (&tmptxdesc, 0, sizeof(tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ /*
++ * Clear out all of the transmit descriptor except for the next pointer
++ */
++ copy_to_slavemem (adev, (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc));
++
++ /*
++ * This is only called immediately after we've allocated, so we should
++ * be able to set the head back to this descriptor.
++ */
++ index = ((u8*) txdesc - (u8*)adev->txdesc_start) / adev->txdesc_size;
++ printk ("acx_dealloc: moving head from %d to %d\n", adev->tx_head, index);
++ adev->tx_head = index;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxmem_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxmem_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxmem_update_queue_indicator (acx_device_t *adev, int txqueue)
++{
++#ifdef USING_MORE_THAN_ONE_TRANSMIT_QUEUE
++ u32 indicator;
++ unsigned long flags;
++ int count;
++
++ /*
++ * Can't handle an interrupt while we're fiddling with the ACX's lock,
++ * according to TI. The ACX is supposed to hold fw_lock for at most
++ * 500ns.
++ */
++ local_irq_save (flags);
++
++ /*
++ * Wait for ACX to release the lock (at most 500ns).
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++ if (count < 50) {
++
++ /*
++ * Take out the host lock - anything non-zero will work, so don't worry about
++ * be/le
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 1);
++
++ /*
++ * Avoid a race condition
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++
++ if (count < 50) {
++ /*
++ * Mark the queue active
++ */
++ indicator = read_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator));
++ indicator |= cpu_to_le32 (1 << txqueue);
++ write_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator), indicator);
++ }
++
++ /*
++ * Release the host lock
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 0);
++
++ }
++
++ /*
++ * Restore interrupts
++ */
++ local_irq_restore (flags);
++#endif
++}
++
++void
++acxmem_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ /*
++ * txdesc is the address on the ACX
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++ u32 addr;
++
++ FN_ENTER;
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), cpu_to_le16(len));
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ write_slavemem8 (adev, (u32) &(txdesc->u.r1.rate), rate_100);
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_FIRSTFRAG);
++
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++
++ /*
++ * Since we're not using autodma copy the packet data to the acx now.
++ * Even host descriptors point to the packet header, and the odd indexed
++ * descriptor following points to the packet data.
++ *
++ * The first step is to find free memory in the ACX transmit buffers.
++ * They don't necessarily map one to one with the transmit queue entries,
++ * so search through them starting just after the last one used.
++ */
++ addr = allocate_acx_txbuf_space (adev, len);
++ if (addr) {
++ chaincopy_to_slavemem (adev, addr, hostdesc1->data, len);
++ }
++ else {
++ /*
++ * Bummer. We thought we might have enough room in the transmit
++ * buffers to send this packet, but it turns out we don't. alloc_tx
++ * has already marked this transmit descriptor as HOSTOWN and ACXDONE,
++ * which means the ACX will hang when it gets to this descriptor unless
++ * we do something about it. Having a bubble in the transmit queue just
++ * doesn't seem to work, so we have to reset this transmit queue entry's
++ * state to its original value and back up our head pointer to point
++ * back to this entry.
++ */
++ hostdesc1->length = 0;
++ hostdesc2->length = 0;
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG);
++ adev->tx_head = ((u8*) txdesc - (u8*) adev->txdesc_start) / adev->txdesc_size;
++ goto end;
++ }
++ /*
++ * Tell the ACX where the packet is.
++ */
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), addr);
++
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ //wmb();
++
++ /* write back modified flags */
++ /*
++ * At this point Ctl_8 should just be FIRSTFRAG
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl2_8),Ctl2_8);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), Ctl_8);
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /*
++ * Update the queue indicator to say there's data on the first queue.
++ */
++ acxmem_update_queue_indicator (adev, 0);
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate)),
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u8 Ctl_8;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ printk(" %02X", Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxmem_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100, Ctl_8;
++ u32 acxmem;
++ txdesc_t tmptxdesc;
++
++ FN_ENTER;
++
++ /*
++ * Set up a template descriptor for re-initialization. The only
++ * things that get set are Ctl_8 and the rate, and the rate defaults
++ * to 1Mbps.
++ */
++ memset (&tmptxdesc, 0, sizeof (tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = read_slavemem8 (adev, (u32) &(txdesc->error));
++ ack_failures = read_slavemem8 (adev, (u32) &(txdesc->ack_failures));
++ rts_failures = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures));
++ rts_ok = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok));
++ r100 = read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate));
++ r111 = le16_to_cpu(read_slavemem16 (adev, (u32) &(txdesc->u.r2.rate111)));
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /*
++ * Free up the transmit data buffers
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ /* ...and free the desc by clearing all the fields
++ except the next pointer */
++ copy_to_slavemem (adev,
++ (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc)
++ );
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxmem_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u32 acxmem;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ write_slavemem8 (adev, (u32) &(txdesc->ack_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->error), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN);
++
++ /*
++ * Clean up the memory allocated on the ACX for this transmit descriptor.
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), 0);
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++ ptr = kmalloc (size, GFP_KERNEL);
++ /*
++ * The ACX can't use the physical address, so we'll have to fake it
++ * later and it might be handy to have the virtual address.
++ */
++ *phy = (dma_addr_t) NULL;
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++/*
++ * In the generic slave memory access mode, most of the stuff in
++ * the txhostdesc_t is unused. It's only here because the rest of
++ * the ACX driver expects it to be since the PCI version uses indirect
++ * host memory organization with DMA. Since we're not using DMA the
++ * only use we have for the host descriptors is to store the packets
++ * on the way out.
++ */
++static int
++acxmem_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ txbuf = adev->txbuf_start;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxmem_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ hostdesc = adev->rxhostdesc_start;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ rxbuf++;
++ hostdesc++;
++ }
++ hostdesc--;
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_hostdesc_queues
++*/
++int
++acxmem_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxmem_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxmem_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxmem_create_tx_desc_queue
++*/
++static void
++acxmem_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ u32 clr;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ /*
++ * This refers to an ACX address, not one of ours
++ */
++ adev->txdesc_start = (txdesc_t *) tx_queue_start;
++
++ log(L_DEBUG, "adev->txdesc_start=%p\n",
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++
++ /*
++ * adev->txdesc_start refers to device memory, so we can't write
++ * directly to it.
++ */
++ clr = (u32) adev->txdesc_start;
++ while (clr < (u32) adev->txdesc_start + (TX_CNT * sizeof(*txdesc))) {
++ write_slavemem32 (adev, clr, 0);
++ clr += 4;
++ }
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* initialise ctl */
++ /*
++ * No auto DMA here
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8),
++ (u8) (DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG));
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++
++ /* point to next txdesc */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) txdesc + adev->txdesc_size));
++
++ /* go to the next one */
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 (tx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_rx_desc_queue
++*/
++static void
++acxmem_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) rx_queue_start;
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ acx2cpu(rxdesc->pNextDesc);
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ mem_offs = (u32) adev->rxdesc_start;
++ while (mem_offs < (u32) adev->rxdesc_start + (RX_CNT * sizeof (*rxdesc))) {
++ write_slavemem32 (adev, mem_offs, 0);
++ mem_offs += 4;
++ }
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ /* point to next rxdesc */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) rxdesc + sizeof(*rxdesc)));
++ /* go to the next one */
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 (rx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_desc_queues
++*/
++void
++acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ u32 *p;
++ int i;
++
++ acxmem_create_tx_desc_queue(adev, tx_queue_start);
++ acxmem_create_rx_desc_queue(adev, rx_queue_start);
++ p = (u32 *) adev->acx_queue_indicator;
++ for (i = 0; i < 4; i++) {
++ write_slavemem32 (adev, (u32) p, 0);
++ p++;
++ }
++}
++
++
++/***************************************************************
++** acxmem_s_proc_diag_output
++*/
++char*
++acxmem_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ txdesc_t *txdesc;
++ u8 Ctl_8;
++ rxdesc_t *rxdesc;
++ int i;
++ u32 tmp;
++ txdesc_t txd;
++ u8 buf[0x200];
++ int j, k;
++
++ FN_ENTER;
++
++#if DUMP_MEM_DURING_DIAG > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("dump finished");
++#endif
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxdesc = adev->rxdesc_start;
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ Ctl_8 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u (%02x) FULL%s\n", i, Ctl_8, rtl);
++ else
++ p += sprintf(p, "%02u (%02x) empty%s\n", i, Ctl_8, rtl);
++ rxdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++
++ p += sprintf(p, "** Tx buf %d blocks total, %d available, free list head %04x\n",
++ adev->acx_txbuf_numblocks, adev->acx_txbuf_blocks_free, adev->acx_txbuf_free);
++ txdesc = adev->txdesc_start;
++ if (txdesc) {
++ for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ copy_from_slavemem (adev, (u8 *) &txd, (u32) txdesc, sizeof (txd));
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u ready to free (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u available (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u busy (%02X)%s%s", i, Ctl_8, thd, ttl);
++ tmp = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (tmp) {
++ p += sprintf (p, " %04x", tmp);
++ while ((tmp = read_slavemem32 (adev, (u32) tmp)) != 0x02000000) {
++ tmp <<= 5;
++ p += sprintf (p, " %04x", tmp);
++ }
++ }
++ p += sprintf (p, "\n");
++ p += sprintf (p, " %04x: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x\n"
++ "%02x %02x %02x %02x %04x\n",
++ (u32) txdesc,
++ txd.pNextDesc.v, txd.HostMemPtr.v, txd.AcxMemPtr.v, txd.tx_time,
++ txd.total_length, txd.Reserved,
++ txd.dummy[0], txd.dummy[1], txd.dummy[2], txd.dummy[3],
++ txd.Ctl_8, txd.Ctl2_8, txd.error, txd.ack_failures,
++ txd.u.rts.rts_failures, txd.u.rts.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl,
++ txd.queue_info
++ );
++ if (txd.AcxMemPtr.v) {
++ copy_from_slavemem (adev, buf, txd.AcxMemPtr.v, sizeof (buf));
++ for (j = 0; (j < txd.total_length) && (j<(sizeof(buf)-4)); j+=16) {
++ p += sprintf (p, " ");
++ for (k = 0; (k < 16) && (j+k < txd.total_length); k++) {
++ p += sprintf (p, " %02x", buf[j+k+4]);
++ }
++ p += sprintf (p, "\n");
++ }
++ }
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ }
++
++ p += sprintf(p,
++ "\n"
++ "** Generic slave data **\n"
++ "irq_mask 0x%04x irq_status 0x%04x irq on acx 0x%04x\n"
++ "txbuf_start 0x%p, txbuf_area_size %u\n"
++ "txdesc_size %u, txdesc_start 0x%p\n"
++ "txhostdesc_start 0x%p, txhostdesc_area_size %u\n"
++ "txbuf start 0x%04x, txbuf size %d\n"
++ "rxdesc_start 0x%p\n"
++ "rxhostdesc_start 0x%p, rxhostdesc_area_size %u\n"
++ "rxbuf_start 0x%p, rxbuf_area_size %u\n",
++ adev->irq_mask, adev->irq_status, read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES),
++ adev->txbuf_start, adev->txbuf_area_size,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ adev->acx_txbuf_start, adev->acx_txbuf_numblocks * adev->memblocksize,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ adev->rxbuf_start, adev->rxbuf_area_size);
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxmem_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxmem_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_OVERFLOW
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_BEACON_MISSED */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ /*
++ * The hx4700 EEPROM, at least, only supports 1 power setting. The configure
++ * routine matches the PA bias with the gain, so just use its default value.
++ * The values are: 0x2b for the gain and 0x03 for the PA bias. The firmware
++ * writes the gain level to the Tx gain control DAC and the PA bias to the Maxim
++ * radio's PA bias register. The firmware limits itself to 0 - 64 when writing to the
++ * gain control DAC.
++ *
++ * Physically between the ACX and the radio, higher Tx gain control DAC values result
++ * in less power output; 0 volts to the Maxim radio results in the highest output power
++ * level, which I'm assuming matches up with 0 in the Tx Gain DAC register.
++ *
++ * Although there is only the 1 power setting, one of the radio firmware functions adjusts
++ * the transmit power level up and down. That function is called by the ACX FIQ handler
++ * under certain conditions.
++ */
++ tx_level.level = 1;
++ //return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxmem_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++
++ return 0;
++}
++
++
++static struct platform_driver
++acxmem_drv_id = {
++ .driver = {
++ .name = "acx-mem",
++ },
++ .probe = acxmem_e_probe,
++ .remove = __devexit_p(acxmem_e_remove),
++#ifdef CONFIG_PM
++ .suspend = acxmem_e_suspend,
++ .resume = acxmem_e_resume
++#endif /* CONFIG_PM */
++};
++
++
++/***********************************************************************
++** acxmem_e_init_module
++**
++** Module initialization routine, called once at module load time
++*/
++int __init
++acxmem_e_init_module(void)
++{
++ int res;
++
++ FN_ENTER;
++
++#if (ACX_IO_WIDTH==32)
++ printk("acx: compiled to use 32bit I/O access. "
++ "I/O timing issues might occur, such as "
++ "non-working firmware upload. Report them\n");
++#else
++ printk("acx: compiled to use 16bit I/O access only "
++ "(compatibility mode)\n");
++#endif
++
++#ifdef __LITTLE_ENDIAN
++#define ENDIANNESS_STRING "running on a little-endian CPU\n"
++#else
++#define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
++#endif
++ log(L_INIT,
++ ENDIANNESS_STRING
++ "PCI module " ACX_RELEASE " initialized, "
++ "waiting for cards to probe...\n"
++ );
++
++ res = platform_driver_register (&acxmem_drv_id);
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_e_cleanup_module
++**
++** Called at module unload time. This is our last chance to
++** clean up after ourselves.
++*/
++void __exit
++acxmem_e_cleanup_module(void)
++{
++ FN_ENTER;
++
++ printk ("cleanup_module\n");
++ platform_driver_unregister( &acxmem_drv_id );
++
++ FN_EXIT0;
++}
++
++void acxmem_e_release(struct device *dev) {
++}
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "ACX Slave Memory Driver" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/pci.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/pci.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,4234 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++#define ACX_PCI 1
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/dma-mapping.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++#define PCI_TYPE (PCI_USES_MEM | PCI_ADDR0 | PCI_NO_ACPI_WAKE)
++#define PCI_ACX100_REGION1 0x01
++#define PCI_ACX100_REGION1_SIZE 0x1000 /* Memory size - 4K bytes */
++#define PCI_ACX100_REGION2 0x02
++#define PCI_ACX100_REGION2_SIZE 0x10000 /* Memory size - 64K bytes */
++
++#define PCI_ACX111_REGION1 0x00
++#define PCI_ACX111_REGION1_SIZE 0x2000 /* Memory size - 8K bytes */
++#define PCI_ACX111_REGION2 0x01
++#define PCI_ACX111_REGION2_SIZE 0x20000 /* Memory size - 128K bytes */
++
++/* Texas Instruments Vendor ID */
++#define PCI_VENDOR_ID_TI 0x104c
++
++/* ACX100 22Mb/s WLAN controller */
++#define PCI_DEVICE_ID_TI_TNETW1100A 0x8400
++#define PCI_DEVICE_ID_TI_TNETW1100B 0x8401
++
++/* ACX111 54Mb/s WLAN controller */
++#define PCI_DEVICE_ID_TI_TNETW1130 0x9066
++
++/* PCI Class & Sub-Class code, Network-'Other controller' */
++#define PCI_CLASS_NETWORK_OTHERS 0x0280
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#ifndef PCI_D0
++/* From include/linux/pci.h */
++#define PCI_D0 0
++#define PCI_D1 1
++#define PCI_D2 2
++#define PCI_D3hot 3
++#define PCI_D3cold 4
++#define PCI_UNKNOWN 5
++#define PCI_POWER_ERROR -1
++#endif
++
++
++/***********************************************************************
++*/
++static void acxpci_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxpci_i_set_multicast_list(struct net_device *ndev);
++
++static int acxpci_e_open(struct net_device *ndev);
++static int acxpci_e_close(struct net_device *ndev);
++static void acxpci_s_up(struct net_device *ndev);
++static void acxpci_s_down(struct net_device *ndev);
++
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++#if ACX_IO_WIDTH == 32
++ return readl((u8 *)adev->iobase + adev->io[offset]);
++#else
++ return readw((u8 *)adev->iobase + adev->io[offset])
++ + (readw((u8 *)adev->iobase + adev->io[offset] + 2) << 16);
++#endif
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ return readw((u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ return readb((u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++#if ACX_IO_WIDTH == 32
++ writel(val, (u8 *)adev->iobase + adev->io[offset]);
++#else
++ writew(val & 0xffff, (u8 *)adev->iobase + adev->io[offset]);
++ writew(val >> 16, (u8 *)adev->iobase + adev->io[offset] + 2);
++#endif
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ writew(val, (u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ writeb(val, (u8 *)adev->iobase + adev->io[offset]);
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ readb(adev->iobase);
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxpci_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxpci_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxpci_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxpci_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxpci_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxpci_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxpci_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size;
++ u32 sum, v32;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ }
++
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxpci_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxpci_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match (0x%08X vs. 0x%08X)! "
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxpci_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char filename[sizeof("tiacx1NNcNN")];
++
++ FN_ENTER;
++
++ /* print exact chipset and radio ID to make sure people really get a clue on which files exactly they are supposed to provide,
++ * since firmware loading is the biggest enduser PITA with these chipsets.
++ * Not printing radio ID in 0xHEX in order to not confuse them into wrong file naming */
++ printk( "acx: need to load firmware for acx1%02d chipset with radio ID %02x, please provide via firmware hotplug:\n"
++ "acx: either one file only (<c>ombined firmware image file, radio-specific) or two files (radio-less base image file *plus* separate <r>adio-specific extension file)\n",
++ IS_ACX111(adev)*11, adev->radio_type);
++
++ /* Try combined, then main image */
++ adev->need_radio_fw = 0;
++ snprintf(filename, sizeof(filename), "tiacx1%02dc%02X",
++ IS_ACX111(adev)*11, adev->radio_type);
++
++ fw_image = acx_s_read_fw(&adev->pdev->dev, filename, &file_size);
++ if (!fw_image) {
++ adev->need_radio_fw = 1;
++ filename[sizeof("tiacx1NN")-1] = '\0';
++ fw_image = acx_s_read_fw(&adev->pdev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxpci_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main/combined): %d\n", res);
++ if (OK == res) {
++ res = acxpci_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main/combined): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxpci_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("tiacx1NNrNN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "tiacx1%02dr%02X",
++ IS_ACX111(adev)*11,
++ adev->radio_type);
++ radio_image = acx_s_read_fw(&adev->pdev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxpci_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxpci_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxpci_l_reset_mac(acx_device_t *adev)
++{
++ u16 temp;
++
++ FN_ENTER;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++
++ /* now do soft reset of eCPU, set bit */
++ temp = read_reg16(adev, IO_ACX_SOFT_RESET) | 0x1;
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++ write_reg16(adev, IO_ACX_SOFT_RESET, temp);
++ write_flush(adev);
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ write_reg16(adev, IO_ACX_SOFT_RESET, temp & ~0x1);
++
++ /* now start a burst read from initial EEPROM */
++ temp = read_reg16(adev, IO_ACX_EE_START) | 0x1;
++ write_reg16(adev, IO_ACX_EE_START, temp);
++ write_flush(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_verify_init
++*/
++static int
++acxpci_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u16 irqstat = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqstat & HOST_INT_FCS_THRESHOLD) {
++ result = OK;
++ write_reg16(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxpci_write_cmd_type_status
++*/
++
++static inline void
++acxpci_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ writel(type | (status << 16), adev->cmd_area);
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxpci_read_cmd_type_status
++*/
++static u32
++acxpci_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = readl(adev->cmd_area);
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxpci_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxpci_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8 *)adev->iobase2 + cmd_offs;
++ adev->info_area = (u8 *)adev->iobase2 + info_offs;
++ log(L_DEBUG, "iobase2=%p\n"
++ "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ adev->iobase2,
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxpci_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++
++static int
++acxpci_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++
++ FN_ENTER;
++
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ acxpci_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg16(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxpci_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ write_reg16(adev, IO_ACX_ECPU_CTRL, ecpu_ctrl & ~0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* wait for eCPU bootup */
++ if (OK != acxpci_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++
++ init_mboxes(adev);
++ acxpci_write_cmd_type_status(adev, 0, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxpci_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxpci_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxpci_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /* adev->cmd_area points to PCI device's memory, not to RAM! */
++ memcpy_toio(adev->cmd_area + 4, buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxpci_write_cmd_type_status(adev, cmd, 0);
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxpci_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxpci_write_cmd_type_status(adev, 0, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ /* adev->cmd_area points to PCI device's memory, not to RAM! */
++ memcpy_fromio(buffer, adev->cmd_area + 4, buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#ifdef NONESSENTIAL_FEATURES
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxpci_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++
++/***********************************************************************
++** acxpci_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++static inline void
++free_coherent(struct pci_dev *hwdev, size_t size,
++ void *vaddr, dma_addr_t dma_handle)
++{
++ dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev,
++ size, vaddr, dma_handle);
++}
++
++void
++acxpci_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ free_coherent(0, size, ptr, phyaddr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_delete_dma_regions
++*/
++static void
++acxpci_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxpci_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++static int __devinit
++acxpci_e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
++{
++ acx111_ie_configoption_t co;
++ unsigned long mem_region1 = 0;
++ unsigned long mem_region2 = 0;
++ unsigned long mem_region1_size;
++ unsigned long mem_region2_size;
++ unsigned long phymem1;
++ unsigned long phymem2;
++ void *mem1 = NULL;
++ void *mem2 = NULL;
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ u8 chip_type;
++
++ FN_ENTER;
++
++ /* Enable the PCI device */
++ if (pci_enable_device(pdev)) {
++ printk("acx: pci_enable_device() FAILED\n");
++ result = -ENODEV;
++ goto fail_pci_enable_device;
++ }
++
++ /* enable busmastering (required for CardBus) */
++ pci_set_master(pdev);
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = (u8)id->driver_data;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ mem_region1 = PCI_ACX100_REGION1;
++ mem_region1_size = PCI_ACX100_REGION1_SIZE;
++
++ mem_region2 = PCI_ACX100_REGION2;
++ mem_region2_size = PCI_ACX100_REGION2_SIZE;
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ mem_region1 = PCI_ACX111_REGION1;
++ mem_region1_size = PCI_ACX111_REGION1_SIZE;
++
++ mem_region2 = PCI_ACX111_REGION2;
++ mem_region2_size = PCI_ACX111_REGION2_SIZE;
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ /* Figure out our resources */
++ phymem1 = pci_resource_start(pdev, mem_region1);
++ phymem2 = pci_resource_start(pdev, mem_region2);
++ if (!request_mem_region(phymem1, pci_resource_len(pdev, mem_region1), "acx_1")) {
++ printk("acx: cannot reserve PCI memory region 1 (are you sure "
++ "you have CardBus support in kernel?)\n");
++ goto fail_request_mem_region1;
++ }
++ if (!request_mem_region(phymem2, pci_resource_len(pdev, mem_region2), "acx_2")) {
++ printk("acx: cannot reserve PCI memory region 2\n");
++ goto fail_request_mem_region2;
++ }
++
++ /* this used to be ioremap(), but ioremap_nocache()
++ * is much less risky, right? (and slower?)
++ * FIXME: we may want to go back to cached variant if it's
++ * certain that our code really properly handles
++ * cached operation (memory barriers, volatile?, ...)
++ * (but always keep this comment here regardless!)
++ * Possibly make this a driver config setting? */
++
++ mem1 = ioremap_nocache(phymem1, mem_region1_size);
++ if (!mem1) {
++ printk("acx: ioremap() FAILED\n");
++ goto fail_ioremap1;
++ }
++ mem2 = ioremap_nocache(phymem2, mem_region2_size);
++ if (!mem2) {
++ printk("acx: ioremap() #2 FAILED\n");
++ goto fail_ioremap2;
++ }
++
++ printk("acx: found %s-based wireless network card at %s, irq:%d, "
++ "phymem1:0x%lX, phymem2:0x%lX, mem1:0x%p, mem1_size:%ld, "
++ "mem2:0x%p, mem2_size:%ld\n",
++ chip_name, pci_name(pdev), pdev->irq, phymem1, phymem2,
++ mem1, mem_region1_size,
++ mem2, mem_region2_size);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++ if (0 == pdev->irq) {
++ printk("acx: can't use IRQ 0\n");
++ goto fail_irq;
++ }
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ goto fail_alloc_netdev;
++ }
++
++ ether_setup(ndev);
++ ndev->open = &acxpci_e_open;
++ ndev->stop = &acxpci_e_close;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
++ ndev->tx_timeout = &acxpci_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++ ndev->irq = pdev->irq;
++ ndev->base_addr = pci_resource_start(pdev, 0);
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->pdev = pdev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_PCI;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = phymem1;
++ adev->iobase = mem1;
++ adev->membase2 = phymem2;
++ adev->iobase2 = mem2;
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#ifdef NONESSENTIAL_FEATURES
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ SET_NETDEV_DEV(ndev, &pdev->dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", pdev->irq);
++
++ /* need to be able to restore PCI state after a suspend */
++ pci_save_state(pdev);
++ pci_set_drvdata(pdev, ndev);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxpci_s_reset_dev(adev))
++ goto fail_reset;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ memcpy_fromio(&co, adev->cmd_area, sizeof(co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ goto fail_init_mac;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxpci_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ goto fail_read_eeprom_version;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_set_defaults(adev);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxpci_s_delete_dma_regions(adev);
++ pci_set_drvdata(pdev, NULL);
++
++fail_init_mac:
++fail_read_eeprom_version:
++fail_reset:
++
++ free_netdev(ndev);
++fail_alloc_netdev:
++fail_irq:
++
++ iounmap(mem2);
++fail_ioremap2:
++
++ iounmap(mem1);
++fail_ioremap1:
++
++ release_mem_region(pci_resource_start(pdev, mem_region2),
++ pci_resource_len(pdev, mem_region2));
++fail_request_mem_region2:
++
++ release_mem_region(pci_resource_start(pdev, mem_region1),
++ pci_resource_len(pdev, mem_region1));
++fail_request_mem_region1:
++fail_unknown_chiptype:
++
++ pci_disable_device(pdev);
++fail_pci_enable_device:
++
++ pci_set_power_state(pdev, PCI_D3hot);
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static void __devexit
++acxpci_e_remove(struct pci_dev *pdev)
++{
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long mem_region1, mem_region2;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = (struct net_device*) pci_get_drvdata(pdev);
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxpci_l_power_led(adev, 0);
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxpci_l_reset_mac(adev);
++ } else {
++ u16 temp;
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxpci_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxpci_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ if (IS_ACX100(adev)) {
++ mem_region1 = PCI_ACX100_REGION1;
++ mem_region2 = PCI_ACX100_REGION2;
++ } else {
++ mem_region1 = PCI_ACX111_REGION1;
++ mem_region2 = PCI_ACX111_REGION2;
++ }
++
++ /* finally, clean up PCI bus state */
++ acxpci_s_delete_dma_regions(adev);
++ if (adev->iobase) iounmap(adev->iobase);
++ if (adev->iobase2) iounmap(adev->iobase2);
++ release_mem_region(pci_resource_start(pdev, mem_region1),
++ pci_resource_len(pdev, mem_region1));
++ release_mem_region(pci_resource_start(pdev, mem_region2),
++ pci_resource_len(pdev, mem_region2));
++ pci_disable_device(pdev);
++
++ /* remove dev registration */
++ pci_set_drvdata(pdev, NULL);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ /* put device into ACPI D3 mode (shutdown) */
++ pci_set_power_state(pdev, PCI_D3hot);
++
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxpci_e_suspend(struct pci_dev *pdev, pm_message_t state)
++#else
++acxpci_e_suspend(struct pci_dev *pdev, u32 state)
++#endif
++{
++ struct net_device *ndev = pci_get_drvdata(pdev);
++ acx_device_t *adev;
++
++ FN_ENTER;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(ndev); /* this one cannot sleep */
++ acxpci_s_down(ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxpci_s_delete_dma_regions(adev);
++ pci_save_state(pdev);
++ pci_set_power_state(pdev, PCI_D3hot);
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++static int
++acxpci_e_resume(struct pci_dev *pdev)
++{
++ struct net_device *ndev = pci_get_drvdata(pdev);
++ acx_device_t *adev;
++
++ FN_ENTER;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ pci_set_power_state(pdev, PCI_D0);
++ printk("rsm: power state PCI_D0 set\n");
++ pci_restore_state(pdev);
++ printk("rsm: PCI state restored\n");
++
++ if (OK != acxpci_s_reset_dev(adev))
++ goto end_unlock;
++ printk("rsm: device reset done\n");
++ if (OK != acx_s_init_mac(adev))
++ goto end_unlock;
++ printk("rsm: init MAC done\n");
++
++ acxpci_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-) */
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++end_unlock:
++ acx_sem_unlock(adev);
++end:
++ /* we need to return OK here anyway, right? */
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxpci_s_up
++**
++** This function is called by acxpci_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxpci_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_down
++**
++** NB: device may be already hot unplugged if called from acxpci_e_remove()
++**
++** Disables on-card interrupt request, stops softirq and timer, stops queue,
++** sets status == STOPPED
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxpci_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxpci_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxpci_i_interrupt, SA_SHIRQ, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++
++ /* ifup device */
++ acxpci_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxpci_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxpci_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxpci_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxpci_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxpci_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxpci_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxpci_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxpci_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ unsigned count, tail;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ if ((hostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (hostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_16=%04X Status=%08X\n",
++ tail, hostdesc->Ctl_16, hostdesc->Status);
++
++ acx_l_process_rxbuf(adev, hostdesc->data);
++
++ hostdesc->Status = 0;
++ /* flush all writes before adapter sees CTL_HOSTOWN change */
++ wmb();
++ /* Host no longer owns this, needs to be LAST */
++ CLEAR_BIT(hostdesc->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++
++ /* if next descriptor is empty, then bail out */
++ if (!(hostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ || !(hostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = readl(adev->info_area);
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ writel(info_type | 0x00010000, adev->info_area);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_RX_DATA) {
++ printk(" Rx_Data");
++ }
++ /* HOST_INT_TX_COMPLETE */
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ /* HOST_INT_RX_COMPLETE */
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxpci_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxpci_i_interrupt(int irq, void *dev_id)
++#else
++acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ log(L_IRQ, "got Rx_Complete IRQ\n");
++ acxpci_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxpci_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxpci_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ | HOST_INT_RX_DATA
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ /* | HOST_INT_RX_COMPLETE */
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxpci_l_power_led
++*/
++void
++acxpci_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100pci_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***************************************************************
++** acxpci_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxpci_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ txdesc = get_txdesc(adev, head);
++ ctl8 = txdesc->Ctl_8;
++
++ /* 2005-10-11: there were several bug reports on this happening
++ ** but now cause seems to be understood & fixed */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_ACXDONE_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ txdesc->Ctl_8 = DESC_CTL_ACXDONE_HOSTOWN;
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxpci_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxpci_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxpci_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++
++ FN_ENTER;
++
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = txdesc->Ctl_8;
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ txdesc->total_length = cpu_to_le16(len);
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ txdesc->u.r1.rate = rate_100;
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_AUTODMA | DESC_CTL_RECLAIM | DESC_CTL_FIRSTFRAG);
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ wmb();
++ CLEAR_BIT(hostdesc1->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++ CLEAR_BIT(hostdesc2->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++
++ /* write back modified flags */
++ txdesc->Ctl2_8 = Ctl2_8;
++ txdesc->Ctl_8 = Ctl_8;
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ txdesc->u.r1.rate,
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ printk(" %02X", txdesc->Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ /* possibly ACPI C-state powersaving related!!!
++ * (DMA timeout due to excessively high wakeup
++ * latency after C-state activation!?)
++ * Disable C-State powersaving and try again,
++ * then PLEASE REPORT, I'm VERY interested in
++ * whether my theory is correct that this is
++ * actually the problem here.
++ * In that case, use new Linux idle wakeup latency
++ * requirements kernel API to prevent this issue. */
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxpci_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ if ((txdesc->Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = txdesc->error;
++ ack_failures = txdesc->ack_failures;
++ rts_failures = txdesc->rts_failures;
++ rts_ok = txdesc->rts_ok;
++ r100 = txdesc->u.r1.rate;
++ r111 = le16_to_cpu(txdesc->u.r2.rate111);
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /* ...and free the desc */
++ txdesc->error = 0;
++ txdesc->ack_failures = 0;
++ txdesc->rts_failures = 0;
++ txdesc->rts_ok = 0;
++ /* signal host owning it LAST, since ACX already knows that this
++ ** descriptor is finished since it set Ctl_8 accordingly. */
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxpci_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ txdesc->ack_failures = 0;
++ txdesc->rts_failures = 0;
++ txdesc->rts_ok = 0;
++ txdesc->error = 0;
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++
++ ptr = dma_alloc_coherent(adev->pdev ? &adev->pdev->dev : NULL,
++ size, phy, GFP_KERNEL);
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++static int
++acxpci_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ dma_addr_t hostdesc_phy;
++ dma_addr_t txbuf_phy;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ hostdesc_phy = adev->txhostdesc_startphy;
++ txbuf = adev->txbuf_start;
++ txbuf_phy = adev->txbuf_startphy;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* done by memset(0): hostdesc->data_offset = 0; */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ /* done by memset(0): hostdesc->pNext = ptr2acx(NULL); */
++ /* hostdesc->Status = ... */
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ txbuf_phy += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++ hostdesc->desc_phy_next = cpu2acx(adev->txhostdesc_startphy);
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxpci_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxpci_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ dma_addr_t hostdesc_phy;
++ dma_addr_t rxbuf_phy;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ rxbuf_phy = adev->rxbuf_startphy;
++ hostdesc = adev->rxhostdesc_start;
++ hostdesc_phy = adev->rxhostdesc_startphy;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->data_phy = cpu2acx(rxbuf_phy);
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ CLEAR_BIT(hostdesc->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++ rxbuf++;
++ rxbuf_phy += sizeof(*rxbuf);
++ hostdesc_phy += sizeof(*hostdesc);
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc++;
++ }
++ hostdesc--;
++ hostdesc->desc_phy_next = cpu2acx(adev->rxhostdesc_startphy);
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxpci_s_create_hostdesc_queues
++*/
++int
++acxpci_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxpci_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxpci_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxpci_create_tx_desc_queue
++*/
++static void
++acxpci_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ txhostdesc_t *hostdesc;
++ dma_addr_t hostmemptr;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ adev->txdesc_start = (txdesc_t *) (adev->iobase2 + tx_queue_start);
++
++ log(L_DEBUG, "adev->iobase2=%p\n"
++ "tx_queue_start=%08X\n"
++ "adev->txdesc_start=%p\n",
++ adev->iobase2,
++ tx_queue_start,
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++ mem_offs = tx_queue_start;
++ hostmemptr = adev->txhostdesc_startphy;
++ hostdesc = adev->txhostdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->HostMemPtr = ptr2acx(hostmemptr);
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ hostdesc += 2;
++ hostmemptr += 2 * sizeof(*hostdesc);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++ memset(adev->txdesc_start, 0, TX_CNT * sizeof(*txdesc));
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* pointer to hostdesc memory */
++ txdesc->HostMemPtr = ptr2acx(hostmemptr);
++ /* initialise ctl */
++ txdesc->Ctl_8 = ( DESC_CTL_HOSTOWN | DESC_CTL_RECLAIM
++ | DESC_CTL_AUTODMA | DESC_CTL_FIRSTFRAG);
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++ /* point to next txdesc */
++ txdesc->pNextDesc = cpu2acx(mem_offs + adev->txdesc_size);
++ /* reserve two (hdr desc and payload desc) */
++ hostdesc += 2;
++ hostmemptr += 2 * sizeof(*hostdesc);
++ /* go to the next one */
++ mem_offs += adev->txdesc_size;
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ txdesc->pNextDesc = cpu2acx(tx_queue_start);
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_create_rx_desc_queue
++*/
++static void
++acxpci_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) ((u8 *)adev->iobase2 + rx_queue_start);
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ (adev->iobase2 + acx2cpu(rxdesc->pNextDesc));
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ memset(adev->rxdesc_start, 0, RX_CNT * sizeof(*rxdesc));
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ mem_offs = rx_queue_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ rxdesc->Ctl_8 = DESC_CTL_RECLAIM | DESC_CTL_AUTODMA;
++ /* point to next rxdesc */
++ rxdesc->pNextDesc = cpu2acx(mem_offs + sizeof(*rxdesc));
++ /* go to the next one */
++ mem_offs += sizeof(*rxdesc);
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ rxdesc->pNextDesc = cpu2acx(rx_queue_start);
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_create_desc_queues
++*/
++void
++acxpci_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ acxpci_create_tx_desc_queue(adev, tx_queue_start);
++ acxpci_create_rx_desc_queue(adev, rx_queue_start);
++}
++
++
++/***************************************************************
++** acxpci_s_proc_diag_output
++*/
++char*
++acxpci_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ rxhostdesc_t *rxhostdesc;
++ txdesc_t *txdesc;
++ int i;
++
++ FN_ENTER;
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxhostdesc = adev->rxhostdesc_start;
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)) )
++ p += sprintf(p, "%02u FULL%s\n", i, rtl);
++ else
++ p += sprintf(p, "%02u empty%s\n", i, rtl);
++ rxhostdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++ txdesc = adev->txdesc_start;
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ if (txdesc->Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u free (%02X)%s%s\n", i, txdesc->Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u tx (%02X)%s%s\n", i, txdesc->Ctl_8, thd, ttl);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ p += sprintf(p,
++ "\n"
++ "** PCI data **\n"
++ "txbuf_start %p, txbuf_area_size %u, txbuf_startphy %08llx\n"
++ "txdesc_size %u, txdesc_start %p\n"
++ "txhostdesc_start %p, txhostdesc_area_size %u, txhostdesc_startphy %08llx\n"
++ "rxdesc_start %p\n"
++ "rxhostdesc_start %p, rxhostdesc_area_size %u, rxhostdesc_startphy %08llx\n"
++ "rxbuf_start %p, rxbuf_area_size %u, rxbuf_startphy %08llx\n",
++ adev->txbuf_start, adev->txbuf_area_size,
++ (unsigned long long)adev->txbuf_startphy,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ (unsigned long long)adev->txhostdesc_startphy,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ (unsigned long long)adev->rxhostdesc_startphy,
++ adev->rxbuf_start, adev->rxbuf_area_size,
++ (unsigned long long)adev->rxbuf_startphy);
++
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxpci_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxpci_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxpci_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ /* | HOST_INT_RX_DATA */
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ | HOST_INT_RX_COMPLETE
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ /* | HOST_INT_UNKNOWN */
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ /* | HOST_INT_RX_DATA */
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ | HOST_INT_RX_COMPLETE
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_UNKNOWN */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100pci_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxpci_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++ return OK;
++}
++
++
++/***********************************************************************
++** Data for init_module/cleanup_module
++*/
++static const struct pci_device_id
++acxpci_id_tbl[] __devinitdata = {
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1100A,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX100,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1100B,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX100,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1130,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX111,
++ },
++ {
++ .vendor = 0,
++ .device = 0,
++ .subvendor = 0,
++ .subdevice = 0,
++ .driver_data = 0,
++ }
++};
++
++MODULE_DEVICE_TABLE(pci, acxpci_id_tbl);
++
++/* FIXME: checks should be removed once driver is included in the kernel */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
++/* pci_name() got introduced at start of 2.6.x,
++ * got mandatory (slot_name member removed) in 2.6.11-bk1 */
++#define pci_name(x) x->slot_name
++#endif
++
++static struct pci_driver
++acxpci_drv_id = {
++ .name = "acx_pci",
++ .id_table = acxpci_id_tbl,
++ .probe = acxpci_e_probe,
++ .remove = __devexit_p(acxpci_e_remove),
++#ifdef CONFIG_PM
++ .suspend = acxpci_e_suspend,
++ .resume = acxpci_e_resume
++#endif /* CONFIG_PM */
++};
++
++
++/***********************************************************************
++** acxpci_e_init_module
++**
++** Module initialization routine, called once at module load time
++*/
++int __init
++acxpci_e_init_module(void)
++{
++ int res;
++
++ FN_ENTER;
++
++#if (ACX_IO_WIDTH==32)
++ printk("acx: compiled to use 32bit I/O access. "
++ "I/O timing issues might occur, such as "
++ "non-working firmware upload. Report them\n");
++#else
++ printk("acx: compiled to use 16bit I/O access only "
++ "(compatibility mode)\n");
++#endif
++
++#ifdef __LITTLE_ENDIAN
++#define ENDIANNESS_STRING "running on a little-endian CPU\n"
++#else
++#define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
++#endif
++ log(L_INIT,
++ ENDIANNESS_STRING
++ "PCI module " ACX_RELEASE " initialized, "
++ "waiting for cards to probe...\n"
++ );
++
++ res = pci_register_driver(&acxpci_drv_id);
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_e_cleanup_module
++**
++** Called at module unload time. This is our last chance to
++** clean up after ourselves.
++*/
++void __exit
++acxpci_e_cleanup_module(void)
++{
++ FN_ENTER;
++
++ pci_unregister_driver(&acxpci_drv_id);
++
++ FN_EXIT0;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/rx3000_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/rx3000_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,110 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HP iPAQ RX3000
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ * Copyright (c) 2006 Roman Moravcik
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * Based on hx4700_acx.c
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/dpm.h>
++#include <linux/leds.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/regs-gpio.h>
++#include <linux/mfd/asic3_base.h>
++#include <asm/arch/rx3000.h>
++#include <asm/arch/rx3000-asic3.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++extern struct platform_device s3c_device_asic3;
++
++static int rx3000_wlan_start(void)
++{
++ DPM_DEBUG("rx3000_acx: Turning on\n");
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, ASIC3_GPB3);
++ mdelay(20);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC13, ASIC3_GPC13);
++ mdelay(20);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC11, ASIC3_GPC11);
++ mdelay(100);
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, ASIC3_GPB3);
++ mdelay(20);
++ s3c2410_gpio_cfgpin(S3C2410_GPA15, S3C2410_GPA15_nGCS4);
++ mdelay(100);
++ s3c2410_gpio_setpin(S3C2410_GPA11, 0);
++ mdelay(50);
++ s3c2410_gpio_setpin(S3C2410_GPA11, 1);
++ led_trigger_event_shared(rx3000_radio_trig, LED_FULL);
++ return 0;
++}
++
++static int rx3000_wlan_stop(void)
++{
++ DPM_DEBUG("rx3000_acx: Turning off\n");
++ s3c2410_gpio_setpin(S3C2410_GPA15, 1);
++ s3c2410_gpio_cfgpin(S3C2410_GPA15, S3C2410_GPA15_OUT);
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, 0);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC13, 0);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC11, 0);
++ led_trigger_event_shared(rx3000_radio_trig, LED_OFF);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = RX3000_PA_WLAN,
++ .end = RX3000_PA_WLAN + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_EINT16,
++ .end = IRQ_EINT16,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = rx3000_wlan_start,
++ .stop_hw = rx3000_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE(acx_resources),
++ .resource = acx_resources,
++};
++
++static int __init rx3000_wlan_init(void)
++{
++ printk("rx3000_wlan_init: acx-mem platform_device_register\n");
++ return platform_device_register(&acx_device);
++}
++
++
++static void __exit rx3000_wlan_exit(void)
++{
++ platform_device_unregister(&acx_device);
++}
++
++module_init(rx3000_wlan_init);
++module_exit(rx3000_wlan_exit);
++
++MODULE_AUTHOR("Todd Blumer <todd@sdgsystems.com>, Roman Moravcik <roman.moravcik@gmail.com>");
++MODULE_DESCRIPTION("WLAN driver for HP iPAQ RX3000");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.23/drivers/net/wireless/acx/setrate.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/setrate.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,213 @@
++/* TODO: stop #including, move into wireless.c
++ * until then, keep in sync copies in prism54/ and acx/ dirs
++ * code+data size: less than 1k */
++
++enum {
++ DOT11_RATE_1,
++ DOT11_RATE_2,
++ DOT11_RATE_5,
++ DOT11_RATE_11,
++ DOT11_RATE_22,
++ DOT11_RATE_33,
++ DOT11_RATE_6,
++ DOT11_RATE_9,
++ DOT11_RATE_12,
++ DOT11_RATE_18,
++ DOT11_RATE_24,
++ DOT11_RATE_36,
++ DOT11_RATE_48,
++ DOT11_RATE_54
++};
++enum {
++ DOT11_MOD_DBPSK,
++ DOT11_MOD_DQPSK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_CCKOFDM,
++ DOT11_MOD_PBCC
++};
++static const u8 ratelist[] = { 1,2,5,11,22,33,6,9,12,18,24,36,48,54 };
++static const u8 dot11ratebyte[] = { 1*2,2*2,11,11*2,22*2,33*2,6*2,9*2,12*2,18*2,24*2,36*2,48*2,54*2 };
++static const u8 default_modulation[] = {
++ DOT11_MOD_DBPSK,
++ DOT11_MOD_DQPSK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_PBCC,
++ DOT11_MOD_PBCC,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM
++};
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++rate_mbit2enum(int n) {
++ int i=0;
++ while(i<sizeof(ratelist)) {
++ if(n==ratelist[i]) return i;
++ i++;
++ }
++ return -EINVAL;
++}
++
++static int
++get_modulation(int r_enum, char suffix) {
++ if(suffix==',' || suffix==' ' || suffix=='\0') {
++ /* could shorten default_mod by 8 bytes:
++ if(r_enum>=DOT11_RATE_6) return DOT11_MOD_OFDM; */
++ return default_modulation[r_enum];
++ }
++ if(suffix=='c') {
++ if(r_enum<DOT11_RATE_5 || r_enum>DOT11_RATE_11) return -EINVAL;
++ return DOT11_MOD_CCK;
++ }
++ if(suffix=='p') {
++ if(r_enum<DOT11_RATE_5 || r_enum>DOT11_RATE_33) return -EINVAL;
++ return DOT11_MOD_PBCC;
++ }
++ if(suffix=='o') {
++ if(r_enum<DOT11_RATE_6) return -EINVAL;
++ return DOT11_MOD_OFDM;
++ }
++ if(suffix=='d') {
++ if(r_enum<DOT11_RATE_6) return -EINVAL;
++ return DOT11_MOD_CCKOFDM;
++ }
++ return -EINVAL;
++}
++
++#ifdef UNUSED
++static int
++fill_ratevector(const char **pstr, u8 *vector, int size,
++ int (*supported)(int mbit, int mod, void *opaque), void *opaque, int or_mask)
++{
++ unsigned long rate_mbit;
++ int rate_enum,mod;
++ const char *str = *pstr;
++ char c;
++
++ do {
++ rate_mbit = simple_strtoul(str, (char**)&str, 10);
++ if(rate_mbit>INT_MAX) return -EINVAL;
++
++ rate_enum = rate_mbit2enum(rate_mbit);
++ if(rate_enum<0) return rate_enum;
++
++ c = *str;
++ mod = get_modulation(rate_enum, c);
++ if(mod<0) return mod;
++
++ if(c>='a' && c<='z') c = *++str;
++ if(c!=',' && c!=' ' && c!='\0') return -EINVAL;
++
++ if(supported) {
++ int r = supported(rate_mbit, mod, opaque);
++ if(r) return r;
++ }
++
++ *vector++ = dot11ratebyte[rate_enum] | or_mask;
++
++ size--;
++ str++;
++ } while(size>0 && c==',');
++
++ if(size<1) return -E2BIG;
++ *vector=0; /* TODO: sort, remove dups? */
++
++ *pstr = str-1;
++ return 0;
++}
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++fill_ratevectors(const char *str, u8 *brate, u8 *orate, int size,
++ int (*supported)(int mbit, int mod, void *opaque), void *opaque)
++{
++ int r;
++
++ r = fill_ratevector(&str, brate, size, supported, opaque, 0x80);
++ if(r) return r;
++
++ orate[0] = 0;
++ if(*str==' ') {
++ str++;
++ r = fill_ratevector(&str, orate, size, supported, opaque, 0);
++ if(r) return r;
++ /* TODO: sanitize, e.g. remove/error on rates already in basic rate set? */
++ }
++ if(*str)
++ return -EINVAL;
++
++ return 0;
++}
++#endif
++
++/* TODO: use u64 masks? */
++
++static int
++fill_ratemask(const char **pstr, u32* mask,
++ int (*supported)(int mbit, int mod,void *opaque),
++ u32 (*gen_mask)(int mbit, int mod,void *opaque),
++ void *opaque)
++{
++ unsigned long rate_mbit;
++ int rate_enum,mod;
++ u32 m = 0;
++ const char *str = *pstr;
++ char c;
++
++ do {
++ rate_mbit = simple_strtoul(str, (char**)&str, 10);
++ if(rate_mbit>INT_MAX) return -EINVAL;
++
++ rate_enum = rate_mbit2enum(rate_mbit);
++ if(rate_enum<0) return rate_enum;
++
++ c = *str;
++ mod = get_modulation(rate_enum, c);
++ if(mod<0) return mod;
++
++ if(c>='a' && c<='z') c = *++str;
++ if(c!=',' && c!=' ' && c!='\0') return -EINVAL;
++
++ if(supported) {
++ int r = supported(rate_mbit, mod, opaque);
++ if(r) return r;
++ }
++
++ m |= gen_mask(rate_mbit, mod, opaque);
++ str++;
++ } while(c==',');
++
++ *pstr = str-1;
++ *mask |= m;
++ return 0;
++}
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++fill_ratemasks(const char *str, u32 *bmask, u32 *omask,
++ int (*supported)(int mbit, int mod,void *opaque),
++ u32 (*gen_mask)(int mbit, int mod,void *opaque),
++ void *opaque)
++{
++ int r;
++
++ r = fill_ratemask(&str, bmask, supported, gen_mask, opaque);
++ if(r) return r;
++
++ if(*str==' ') {
++ str++;
++ r = fill_ratemask(&str, omask, supported, gen_mask, opaque);
++ if(r) return r;
++ }
++ if(*str)
++ return -EINVAL;
++ return 0;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/usb.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/usb.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,1922 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** USB support for TI ACX100 based devices. Many parts are taken from
++** the PCI driver.
++**
++** Authors:
++** Martin Wawro <martin.wawro AT uni-dortmund.de>
++** Andreas Mohr <andi AT lisas.de>
++**
++** LOCKING
++** callback functions called by USB core are running in interrupt context
++** and thus have names with _i_.
++*/
++#define ACX_USB 1
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/types.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/kernel.h>
++#include <linux/usb.h>
++#include <linux/netdevice.h>
++#include <linux/rtnetlink.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/vmalloc.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++/* number of endpoints of an interface */
++#define NUM_EP(intf) (intf)->altsetting[0].desc.bNumEndpoints
++#define EP(intf, nr) (intf)->altsetting[0].endpoint[(nr)].desc
++#define GET_DEV(udev) usb_get_dev((udev))
++#define PUT_DEV(udev) usb_put_dev((udev))
++#define SET_NETDEV_OWNER(ndev, owner) /* not needed anymore ??? */
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
++/* removed in 2.6.14. We will use fake value for now */
++#define URB_ASYNC_UNLINK 0
++#endif
++
++
++/***********************************************************************
++*/
++/* ACX100 (TNETW1100) USB device: D-Link DWL-120+ */
++#define ACX100_VENDOR_ID 0x2001
++#define ACX100_PRODUCT_ID_UNBOOTED 0x3B01
++#define ACX100_PRODUCT_ID_BOOTED 0x3B00
++
++/* TNETW1450 USB devices */
++#define VENDOR_ID_DLINK 0x07b8 /* D-Link Corp. */
++#define PRODUCT_ID_WUG2400 0xb21a /* AboCom WUG2400 or SafeCom SWLUT-54125 */
++#define VENDOR_ID_AVM_GMBH 0x057c
++#define PRODUCT_ID_AVM_WLAN_USB 0x5601
++#define PRODUCT_ID_AVM_WLAN_USB_si 0x6201 /* "self install" named Version: driver kills kernel on inbound scans from fritz box ??? */
++#define VENDOR_ID_ZCOM 0x0cde
++#define PRODUCT_ID_ZCOM_XG750 0x0017 /* not tested yet */
++#define VENDOR_ID_TI 0x0451
++#define PRODUCT_ID_TI_UNKNOWN 0x60c5 /* not tested yet */
++
++#define ACX_USB_CTRL_TIMEOUT 5500 /* steps in ms */
++
++/* Buffer size for fw upload, same for both ACX100 USB and TNETW1450 */
++#define USB_RWMEM_MAXLEN 2048
++
++/* The number of bulk URBs to use */
++#define ACX_TX_URB_CNT 8
++#define ACX_RX_URB_CNT 2
++
++/* Should be sent to the bulkout endpoint */
++#define ACX_USB_REQ_UPLOAD_FW 0x10
++#define ACX_USB_REQ_ACK_CS 0x11
++#define ACX_USB_REQ_CMD 0x12
++
++/***********************************************************************
++** Prototypes
++*/
++static int acxusb_e_probe(struct usb_interface *, const struct usb_device_id *);
++static void acxusb_e_disconnect(struct usb_interface *);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static void acxusb_i_complete_tx(struct urb *);
++static void acxusb_i_complete_rx(struct urb *);
++#else
++static void acxusb_i_complete_tx(struct urb *, struct pt_regs *);
++static void acxusb_i_complete_rx(struct urb *, struct pt_regs *);
++#endif
++static int acxusb_e_open(struct net_device *);
++static int acxusb_e_close(struct net_device *);
++static void acxusb_i_set_rx_mode(struct net_device *);
++static int acxusb_boot(struct usb_device *, int is_tnetw1450, int *radio_type);
++
++static void acxusb_l_poll_rx(acx_device_t *adev, usb_rx_t* rx);
++
++static void acxusb_i_tx_timeout(struct net_device *);
++
++/* static void dump_device(struct usb_device *); */
++/* static void dump_device_descriptor(struct usb_device_descriptor *); */
++/* static void dump_config_descriptor(struct usb_config_descriptor *); */
++
++/***********************************************************************
++** Module Data
++*/
++#define TXBUFSIZE sizeof(usb_txbuffer_t)
++/*
++ * Now, this is just plain lying, but the device insists in giving us
++ * huge packets. We supply extra space after rxbuffer. Need to understand
++ * it better...
++ */
++#define RXBUFSIZE (sizeof(rxbuffer_t) + \
++ (sizeof(usb_rx_t) - sizeof(struct usb_rx_plain)))
++
++static const struct usb_device_id
++acxusb_ids[] = {
++ { USB_DEVICE(ACX100_VENDOR_ID, ACX100_PRODUCT_ID_BOOTED) },
++ { USB_DEVICE(ACX100_VENDOR_ID, ACX100_PRODUCT_ID_UNBOOTED) },
++ { USB_DEVICE(VENDOR_ID_DLINK, PRODUCT_ID_WUG2400) },
++ { USB_DEVICE(VENDOR_ID_AVM_GMBH, PRODUCT_ID_AVM_WLAN_USB) },
++ { USB_DEVICE(VENDOR_ID_AVM_GMBH, PRODUCT_ID_AVM_WLAN_USB_si) },
++ { USB_DEVICE(VENDOR_ID_ZCOM, PRODUCT_ID_ZCOM_XG750) },
++ { USB_DEVICE(VENDOR_ID_TI, PRODUCT_ID_TI_UNKNOWN) },
++ {}
++};
++
++MODULE_DEVICE_TABLE(usb, acxusb_ids);
++
++/* USB driver data structure as required by the kernel's USB core */
++static struct usb_driver
++acxusb_driver = {
++ .name = "acx_usb",
++ .probe = acxusb_e_probe,
++ .disconnect = acxusb_e_disconnect,
++ .id_table = acxusb_ids
++};
++
++
++/***********************************************************************
++** USB helper
++**
++** ldd3 ch13 says:
++** When the function is usb_kill_urb, the urb lifecycle is stopped. This
++** function is usually used when the device is disconnected from the system,
++** in the disconnect callback. For some drivers, the usb_unlink_urb function
++** should be used to tell the USB core to stop an urb. This function does not
++** wait for the urb to be fully stopped before returning to the caller.
++** This is useful for stoppingthe urb while in an interrupt handler or when
++** a spinlock is held, as waiting for a urb to fully stop requires the ability
++** for the USB core to put the calling process to sleep. This function requires
++** that the URB_ASYNC_UNLINK flag value be set in the urb that is being asked
++** to be stopped in order to work properly.
++**
++** (URB_ASYNC_UNLINK is obsolete, usb_unlink_urb will always be
++** asynchronous while usb_kill_urb is synchronous and should be called
++** directly (drivers/usb/core/urb.c))
++**
++** In light of this, timeout is just for paranoid reasons...
++*
++* Actually, it's useful for debugging. If we reach timeout, we're doing
++* something wrong with the urbs.
++*/
++static void
++acxusb_unlink_urb(struct urb* urb)
++{
++ if (!urb)
++ return;
++
++ if (urb->status == -EINPROGRESS) {
++ int timeout = 10;
++
++ usb_unlink_urb(urb);
++ while (--timeout && urb->status == -EINPROGRESS) {
++ mdelay(1);
++ }
++ if (!timeout) {
++ printk("acx_usb: urb unlink timeout!\n");
++ }
++ }
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxusb_s_read_phy_reg
++*/
++int
++acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ /* mem_read_write_t mem; */
++
++ FN_ENTER;
++
++ printk("%s doesn't seem to work yet, disabled.\n", __func__);
++
++ /*
++ mem.addr = cpu_to_le16(reg);
++ mem.type = cpu_to_le16(0x82);
++ mem.len = cpu_to_le32(4);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_MEM_READ, &mem, sizeof(mem));
++ *charbuf = mem.data;
++ log(L_DEBUG, "read radio PHY[0x%04X]=0x%02X\n", reg, *charbuf);
++ */
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ mem_read_write_t mem;
++
++ FN_ENTER;
++
++ mem.addr = cpu_to_le16(reg);
++ mem.type = cpu_to_le16(0x82);
++ mem.len = cpu_to_le32(4);
++ mem.data = value;
++ acx_s_issue_cmd(adev, ACX1xx_CMD_MEM_WRITE, &mem, sizeof(mem));
++ log(L_DEBUG, "write radio PHY[0x%04X]=0x%02X\n", reg, value);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acxusb_s_issue_cmd_timeo
++** Excecutes a command in the command mailbox
++**
++** buffer = a pointer to the data.
++** The data must not include 4 byte command header
++*/
++
++/* TODO: ideally we shall always know how much we need
++** and this shall be 0 */
++#define BOGUS_SAFETY_PADDING 0x40
++
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxusb_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned timeout)
++{
++#else
++int
++acxusb_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned timeout,
++ const char* cmdstr)
++{
++#endif
++ /* USB ignores timeout param */
++
++ struct usb_device *usbdev;
++ struct {
++ u16 cmd;
++ u16 status;
++ u8 data[1];
++ } ACX_PACKED *loc;
++ const char *devname;
++ int acklen, blocklen, inpipe, outpipe;
++ int cmd_status;
++ int result;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ /* no "wlan%%d: ..." please */
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,type:0x%04X)\n",
++ cmdstr, buflen,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ loc = kmalloc(buflen + 4 + BOGUS_SAFETY_PADDING, GFP_KERNEL);
++ if (!loc) {
++ printk("%s: "FUNC"(): no memory for data buffer\n", devname);
++ goto bad;
++ }
++
++ /* get context from acx_device */
++ usbdev = adev->usbdev;
++
++ /* check which kind of command was issued */
++ loc->cmd = cpu_to_le16(cmd);
++ loc->status = 0;
++
++/* NB: buflen == frmlen + 4
++**
++** Interrogate: write 8 bytes: (cmd,status,rid,frmlen), then
++** read (cmd,status,rid,frmlen,data[frmlen]) back
++**
++** Configure: write (cmd,status,rid,frmlen,data[frmlen])
++**
++** Possibly bogus special handling of ACX1xx_IE_SCAN_STATUS removed
++*/
++
++ /* now write the parameters of the command if needed */
++ acklen = buflen + 4 + BOGUS_SAFETY_PADDING;
++ blocklen = buflen;
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++ if (cmd == ACX1xx_CMD_INTERROGATE) {
++ blocklen = 4;
++ acklen = buflen + 4;
++ }
++ memcpy(loc->data, buffer, blocklen);
++ }
++ blocklen += 4; /* account for cmd,status */
++
++ /* obtain the I/O pipes */
++ outpipe = usb_sndctrlpipe(usbdev, 0);
++ inpipe = usb_rcvctrlpipe(usbdev, 0);
++ log(L_CTL, "ctrl inpipe=0x%X outpipe=0x%X\n", inpipe, outpipe);
++ log(L_CTL, "sending USB control msg (out) (blocklen=%d)\n", blocklen);
++ if (acx_debug & L_DATA)
++ acx_dump_bytes(loc, blocklen);
++
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_CMD, /* request */
++ USB_TYPE_VENDOR|USB_DIR_OUT, /* requesttype */
++ 0, /* value */
++ 0, /* index */
++ loc, /* dataptr */
++ blocklen, /* size */
++ ACX_USB_CTRL_TIMEOUT /* timeout in ms */
++ );
++
++ if (result == -ENODEV) {
++ log(L_CTL, "no device present (unplug?)\n");
++ goto good;
++ }
++
++ log(L_CTL, "wrote %d bytes\n", result);
++ if (result < 0) {
++ goto bad;
++ }
++
++ /* check for device acknowledge */
++ log(L_CTL, "sending USB control msg (in) (acklen=%d)\n", acklen);
++ loc->status = 0; /* delete old status flag -> set to IDLE */
++ /* shall we zero out the rest? */
++ result = usb_control_msg(usbdev, inpipe,
++ ACX_USB_REQ_CMD, /* request */
++ USB_TYPE_VENDOR|USB_DIR_IN, /* requesttype */
++ 0, /* value */
++ 0, /* index */
++ loc, /* dataptr */
++ acklen, /* size */
++ ACX_USB_CTRL_TIMEOUT /* timeout in ms */
++ );
++ if (result < 0) {
++ printk("%s: "FUNC"(): USB read error %d\n", devname, result);
++ goto bad;
++ }
++ if (acx_debug & L_CTL) {
++ printk("read %d bytes: ", result);
++ acx_dump_bytes(loc, result);
++ }
++
++/*
++ check for result==buflen+4? Was seen:
++
++interrogate(type:ACX100_IE_DOT11_ED_THRESHOLD,len:4)
++issue_cmd(cmd:ACX1xx_CMD_INTERROGATE,buflen:8,type:4111)
++ctrl inpipe=0x80000280 outpipe=0x80000200
++sending USB control msg (out) (blocklen=8)
++01 00 00 00 0F 10 04 00
++wrote 8 bytes
++sending USB control msg (in) (acklen=12) sizeof(loc->data
++read 4 bytes <==== MUST BE 12!!
++*/
++
++ cmd_status = le16_to_cpu(loc->status);
++ if (cmd_status != 1) {
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s)\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status));
++ /* TODO: goto bad; ? */
++ }
++ if ((cmd == ACX1xx_CMD_INTERROGATE) && buffer && buflen) {
++ memcpy(buffer, loc->data, buflen);
++ log(L_CTL, "response frame: cmd=0x%04X status=%d\n",
++ le16_to_cpu(loc->cmd),
++ cmd_status);
++ }
++good:
++ kfree(loc);
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ kfree(loc);
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acxusb_boot()
++** Inputs:
++** usbdev -> Pointer to kernel's usb_device structure
++**
++** Returns:
++** (int) Errorcode or 0 on success
++**
++** This function triggers the loading of the firmware image from harddisk
++** and then uploads the firmware to the USB device. After uploading the
++** firmware and transmitting the checksum, the device resets and appears
++** as a new device on the USB bus (the device we can finally deal with)
++*/
++static inline int
++acxusb_fw_needs_padding(firmware_image_t *fw_image, unsigned int usb_maxlen)
++{
++ unsigned int num_xfers = ((fw_image->size - 1) / usb_maxlen) + 1;
++
++ return ((num_xfers % 2) == 0);
++}
++
++static int
++acxusb_boot(struct usb_device *usbdev, int is_tnetw1450, int *radio_type)
++{
++ char filename[sizeof("tiacx1NNusbcRR")];
++
++ firmware_image_t *fw_image = NULL;
++ char *usbbuf;
++ unsigned int offset;
++ unsigned int blk_len, inpipe, outpipe;
++ u32 num_processed;
++ u32 img_checksum, sum;
++ u32 file_size;
++ int result = -EIO;
++ int i;
++
++ FN_ENTER;
++
++ /* dump_device(usbdev); */
++
++ usbbuf = kmalloc(USB_RWMEM_MAXLEN, GFP_KERNEL);
++ if (!usbbuf) {
++ printk(KERN_ERR "acx: no memory for USB transfer buffer (%d bytes)\n", USB_RWMEM_MAXLEN);
++ result = -ENOMEM;
++ goto end;
++ }
++ if (is_tnetw1450) {
++ /* Obtain the I/O pipes */
++ outpipe = usb_sndbulkpipe(usbdev, 1);
++ inpipe = usb_rcvbulkpipe(usbdev, 2);
++
++ printk(KERN_DEBUG "wait for device ready\n");
++ for (i = 0; i <= 2; i++) {
++ result = usb_bulk_msg(usbdev, inpipe,
++ usbbuf,
++ USB_RWMEM_MAXLEN,
++ &num_processed,
++ 2000
++ );
++
++ if ((*(u32 *)&usbbuf[4] == 0x40000001)
++ && (*(u16 *)&usbbuf[2] == 0x1)
++ && ((*(u16 *)usbbuf & 0x3fff) == 0)
++ && ((*(u16 *)usbbuf & 0xc000) == 0xc000))
++ break;
++ msleep(10);
++ }
++ if (i == 2)
++ goto fw_end;
++
++ *radio_type = usbbuf[8];
++ } else {
++ /* Obtain the I/O pipes */
++ outpipe = usb_sndctrlpipe(usbdev, 0);
++ inpipe = usb_rcvctrlpipe(usbdev, 0);
++
++ /* FIXME: shouldn't be hardcoded */
++ *radio_type = RADIO_MAXIM_0D;
++ }
++
++ snprintf(filename, sizeof(filename), "tiacx1%02dusbc%02X",
++ is_tnetw1450 * 11, *radio_type);
++
++ fw_image = acx_s_read_fw(&usbdev->dev, filename, &file_size);
++ if (!fw_image) {
++ result = -EIO;
++ goto end;
++ }
++ log(L_INIT, "firmware size: %d bytes\n", file_size);
++
++ img_checksum = le32_to_cpu(fw_image->chksum);
++
++ if (is_tnetw1450) {
++ u8 cmdbuf[20];
++ const u8 *p;
++ u8 need_padding;
++ u32 tmplen, val;
++
++ memset(cmdbuf, 0, 16);
++
++ need_padding = acxusb_fw_needs_padding(fw_image, USB_RWMEM_MAXLEN);
++ tmplen = need_padding ? file_size-4 : file_size-8;
++ *(u16 *)&cmdbuf[0] = 0xc000;
++ *(u16 *)&cmdbuf[2] = 0x000b;
++ *(u32 *)&cmdbuf[4] = tmplen;
++ *(u32 *)&cmdbuf[8] = file_size-8;
++ *(u32 *)&cmdbuf[12] = img_checksum;
++
++ result = usb_bulk_msg(usbdev, outpipe, cmdbuf, 16, &num_processed, HZ);
++ if (result < 0)
++ goto fw_end;
++
++ p = (const u8 *)&fw_image->size;
++
++ /* first calculate checksum for image size part */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ /* now continue checksum for firmware data part */
++ tmplen = le32_to_cpu(fw_image->size);
++ for (i = 0; i < tmplen /* image size */; i++) {
++ sum += *p++;
++ }
++
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match! "
++ "(0x%08x vs. 0x%08x)\n",
++ sum, fw_image->chksum);
++ goto fw_end;
++ }
++
++ offset = 8;
++ while (offset < file_size) {
++ blk_len = file_size - offset;
++ if (blk_len > USB_RWMEM_MAXLEN) {
++ blk_len = USB_RWMEM_MAXLEN;
++ }
++
++ log(L_INIT, "uploading firmware (%d bytes, offset=%d)\n",
++ blk_len, offset);
++ memcpy(usbbuf, ((u8 *)fw_image) + offset, blk_len);
++
++ p = usbbuf;
++ for (i = 0; i < blk_len; i += 4) {
++ *(u32 *)p = be32_to_cpu(*(u32 *)p);
++ p += 4;
++ }
++
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, blk_len, &num_processed, HZ);
++ if ((result < 0) || (num_processed != blk_len))
++ goto fw_end;
++ offset += blk_len;
++ }
++ if (need_padding) {
++ printk(KERN_DEBUG "send padding\n");
++ memset(usbbuf, 0, 4);
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, 4, &num_processed, HZ);
++ if ((result < 0) || (num_processed != 4))
++ goto fw_end;
++ }
++ printk(KERN_DEBUG "read firmware upload result\n");
++ memset(cmdbuf, 0, 20); /* additional memset */
++ result = usb_bulk_msg(usbdev, inpipe, cmdbuf, 20, &num_processed, 2000);
++ if (result < 0)
++ goto fw_end;
++ if (*(u32 *)&cmdbuf[4] == 0x40000003)
++ goto fw_end;
++ if (*(u32 *)&cmdbuf[4])
++ goto fw_end;
++ if (*(u16 *)&cmdbuf[16] != 1)
++ goto fw_end;
++
++ val = *(u32 *)&cmdbuf[0];
++ if ((val & 0x3fff)
++ || ((val & 0xc000) != 0xc000))
++ goto fw_end;
++
++ val = *(u32 *)&cmdbuf[8];
++ if (val & 2) {
++ result = usb_bulk_msg(usbdev, inpipe, cmdbuf, 20, &num_processed, 2000);
++ if (result < 0)
++ goto fw_end;
++ val = *(u32 *)&cmdbuf[8];
++ }
++ /* yup, no "else" here! */
++ if (val & 1) {
++ memset(usbbuf, 0, 4);
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, 4, &num_processed, HZ);
++ if ((result < 0) || (!num_processed))
++ goto fw_end;
++ }
++
++ printk("TNETW1450 firmware upload successful!\n");
++ result = 0;
++ goto end;
++fw_end:
++ result = -EIO;
++ goto end;
++ } else {
++ /* ACX100 USB */
++
++ /* now upload the firmware, slice the data into blocks */
++ offset = 8;
++ while (offset < file_size) {
++ blk_len = file_size - offset;
++ if (blk_len > USB_RWMEM_MAXLEN) {
++ blk_len = USB_RWMEM_MAXLEN;
++ }
++ log(L_INIT, "uploading firmware (%d bytes, offset=%d)\n",
++ blk_len, offset);
++ memcpy(usbbuf, ((u8 *)fw_image) + offset, blk_len);
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_UPLOAD_FW,
++ USB_TYPE_VENDOR|USB_DIR_OUT,
++ (file_size - 8) & 0xffff, /* value */
++ (file_size - 8) >> 16, /* index */
++ usbbuf, /* dataptr */
++ blk_len, /* size */
++ 3000 /* timeout in ms */
++ );
++ offset += blk_len;
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during upload "
++ "of firmware, aborting\n", result);
++ goto end;
++ }
++ }
++
++ /* finally, send the checksum and reboot the device */
++ /* does this trigger the reboot? */
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_UPLOAD_FW,
++ USB_TYPE_VENDOR|USB_DIR_OUT,
++ img_checksum & 0xffff, /* value */
++ img_checksum >> 16, /* index */
++ NULL, /* dataptr */
++ 0, /* size */
++ 3000 /* timeout in ms */
++ );
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during tx of checksum, "
++ "aborting\n", result);
++ goto end;
++ }
++ result = usb_control_msg(usbdev, inpipe,
++ ACX_USB_REQ_ACK_CS,
++ USB_TYPE_VENDOR|USB_DIR_IN,
++ img_checksum & 0xffff, /* value */
++ img_checksum >> 16, /* index */
++ usbbuf, /* dataptr */
++ 8, /* size */
++ 3000 /* timeout in ms */
++ );
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during ACK of checksum, "
++ "aborting\n", result);
++ goto end;
++ }
++ if (*usbbuf != 0x10) {
++ printk(KERN_ERR "acx: invalid checksum?\n");
++ result = -EINVAL;
++ goto end;
++ }
++ result = 0;
++ }
++
++end:
++ vfree(fw_image);
++ kfree(usbbuf);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/* FIXME: maybe merge it with usual eeprom reading, into common code? */
++static void
++acxusb_s_read_eeprom_version(acx_device_t *adev)
++{
++ u8 eeprom_ver[0x8];
++
++ memset(eeprom_ver, 0, sizeof(eeprom_ver));
++ acx_s_interrogate(adev, &eeprom_ver, ACX1FF_IE_EEPROM_VER);
++
++ /* FIXME: which one of those values to take? */
++ adev->eeprom_version = eeprom_ver[5];
++}
++
++
++/*
++ * temporary helper function to at least fill important cfgopt members with
++ * useful replacement values until we figure out how one manages to fetch
++ * the configoption struct in the USB device case...
++ */
++static int
++acxusb_s_fill_configoption(acx_device_t *adev)
++{
++ adev->cfgopt_probe_delay = 200;
++ adev->cfgopt_dot11CCAModes = 4;
++ adev->cfgopt_dot11Diversity = 1;
++ adev->cfgopt_dot11ShortPreambleOption = 1;
++ adev->cfgopt_dot11PBCCOption = 1;
++ adev->cfgopt_dot11ChannelAgility = 0;
++ adev->cfgopt_dot11PhyType = 5;
++ adev->cfgopt_dot11TempType = 1;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxusb_e_probe()
++**
++** This function is invoked by the kernel's USB core whenever a new device is
++** attached to the system or the module is loaded. It is presented a usb_device
++** structure from which information regarding the device is obtained and evaluated.
++** In case this driver is able to handle one of the offered devices, it returns
++** a non-null pointer to a driver context and thereby claims the device.
++*/
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++static int
++acxusb_e_probe(struct usb_interface *intf, const struct usb_device_id *devID)
++{
++ struct usb_device *usbdev = interface_to_usbdev(intf);
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ struct usb_config_descriptor *config;
++ struct usb_endpoint_descriptor *epdesc;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ struct usb_host_endpoint *ep;
++#endif
++ struct usb_interface_descriptor *ifdesc;
++ const char* msg;
++ int numconfigs, numfaces, numep;
++ int result = OK;
++ int i;
++ int radio_type;
++ /* this one needs to be more precise in case there appears a TNETW1450 from the same vendor */
++ int is_tnetw1450 = (usbdev->descriptor.idVendor != ACX100_VENDOR_ID);
++
++ FN_ENTER;
++
++ if (is_tnetw1450) {
++ /* Boot the device (i.e. upload the firmware) */
++ acxusb_boot(usbdev, is_tnetw1450, &radio_type);
++
++ /* TNETW1450-based cards will continue right away with
++ * the same USB ID after booting */
++ } else {
++ /* First check if this is the "unbooted" hardware */
++ if (usbdev->descriptor.idProduct == ACX100_PRODUCT_ID_UNBOOTED) {
++
++ /* Boot the device (i.e. upload the firmware) */
++ acxusb_boot(usbdev, is_tnetw1450, &radio_type);
++
++ /* DWL-120+ will first boot the firmware,
++ * then later have a *separate* probe() run
++ * since its USB ID will have changed after
++ * firmware boot!
++ * Since the first probe() run has no
++ * other purpose than booting the firmware,
++ * simply return immediately.
++ */
++ log(L_INIT, "finished booting, returning from probe()\n");
++ result = OK; /* success */
++ goto end;
++ }
++ else
++ /* device not unbooted, but invalid USB ID!? */
++ if (usbdev->descriptor.idProduct != ACX100_PRODUCT_ID_BOOTED)
++ goto end_nodev;
++ }
++
++/* Ok, so it's our device and it has already booted */
++
++ /* Allocate memory for a network device */
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ msg = "acx: no memory for netdev\n";
++ goto end_nomem;
++ }
++
++ /* Register the callbacks for the network device functions */
++
++ ether_setup(ndev);
++ ndev->open = &acxusb_e_open;
++ ndev->stop = &acxusb_e_close;
++ ndev->hard_start_xmit = (void *)&acx_i_start_xmit;
++ ndev->get_stats = (void *)&acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
++#ifdef HAVE_TX_TIMEOUT
++ ndev->tx_timeout = &acxusb_i_tx_timeout;
++ ndev->watchdog_timeo = 4 * HZ;
++#endif
++ ndev->change_mtu = &acx_e_change_mtu;
++ SET_MODULE_OWNER(ndev);
++
++ /* Setup private driver context */
++
++ adev = ndev2adev(ndev);
++ adev->ndev = ndev;
++
++ adev->dev_type = DEVTYPE_USB;
++ adev->radio_type = radio_type;
++ if (is_tnetw1450) {
++ /* well, actually it's a TNETW1450, but since it
++ * seems to be sufficiently similar to TNETW1130,
++ * I don't want to change large amounts of code now */
++ adev->chip_type = CHIPTYPE_ACX111;
++ } else {
++ adev->chip_type = CHIPTYPE_ACX100;
++ }
++
++ adev->usbdev = usbdev;
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++
++ /* Check that this is really the hardware we know about.
++ ** If not sure, at least notify the user that he
++ ** may be in trouble...
++ */
++ numconfigs = (int)usbdev->descriptor.bNumConfigurations;
++ if (numconfigs != 1)
++ printk("acx: number of configurations is %d, "
++ "this driver only knows how to handle 1, "
++ "be prepared for surprises\n", numconfigs);
++
++ config = &usbdev->config->desc;
++ numfaces = config->bNumInterfaces;
++ if (numfaces != 1)
++ printk("acx: number of interfaces is %d, "
++ "this driver only knows how to handle 1, "
++ "be prepared for surprises\n", numfaces);
++
++ ifdesc = &intf->altsetting->desc;
++ numep = ifdesc->bNumEndpoints;
++ log(L_DEBUG, "# of endpoints: %d\n", numep);
++
++ if (is_tnetw1450) {
++ adev->bulkoutep = 1;
++ adev->bulkinep = 2;
++ } else {
++ /* obtain information about the endpoint
++ ** addresses, begin with some default values
++ */
++ adev->bulkoutep = 1;
++ adev->bulkinep = 1;
++ for (i = 0; i < numep; i++) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ ep = usbdev->ep_in[i];
++ if (!ep)
++ continue;
++ epdesc = &ep->desc;
++#else
++ epdesc = usb_epnum_to_ep_desc(usbdev, i);
++ if (!epdesc)
++ continue;
++#endif
++ if (epdesc->bmAttributes & USB_ENDPOINT_XFER_BULK) {
++ if (epdesc->bEndpointAddress & 0x80)
++ adev->bulkinep = epdesc->bEndpointAddress & 0xF;
++ else
++ adev->bulkoutep = epdesc->bEndpointAddress & 0xF;
++ }
++ }
++ }
++ log(L_DEBUG, "bulkout ep: 0x%X\n", adev->bulkoutep);
++ log(L_DEBUG, "bulkin ep: 0x%X\n", adev->bulkinep);
++
++ /* already done by memset: adev->rxtruncsize = 0; */
++ log(L_DEBUG, "TXBUFSIZE=%d RXBUFSIZE=%d\n",
++ (int) TXBUFSIZE, (int) RXBUFSIZE);
++
++ /* Allocate the RX/TX containers. */
++ adev->usb_tx = kmalloc(sizeof(usb_tx_t) * ACX_TX_URB_CNT, GFP_KERNEL);
++ if (!adev->usb_tx) {
++ msg = "acx: no memory for tx container";
++ goto end_nomem;
++ }
++ adev->usb_rx = kmalloc(sizeof(usb_rx_t) * ACX_RX_URB_CNT, GFP_KERNEL);
++ if (!adev->usb_rx) {
++ msg = "acx: no memory for rx container";
++ goto end_nomem;
++ }
++
++ /* Setup URBs for bulk-in/out messages */
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ adev->usb_rx[i].urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!adev->usb_rx[i].urb) {
++ msg = "acx: no memory for input URB\n";
++ goto end_nomem;
++ }
++ adev->usb_rx[i].urb->status = 0;
++ adev->usb_rx[i].adev = adev;
++ adev->usb_rx[i].busy = 0;
++ }
++
++ for (i = 0; i< ACX_TX_URB_CNT; i++) {
++ adev->usb_tx[i].urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!adev->usb_tx[i].urb) {
++ msg = "acx: no memory for output URB\n";
++ goto end_nomem;
++ }
++ adev->usb_tx[i].urb->status = 0;
++ adev->usb_tx[i].adev = adev;
++ adev->usb_tx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++
++ usb_set_intfdata(intf, adev);
++ SET_NETDEV_DEV(ndev, &intf->dev);
++
++ /* TODO: move all of fw cmds to open()? But then we won't know our MAC addr
++ until ifup (it's available via reading ACX1xx_IE_DOT11_STATION_ID)... */
++
++ /* put acx out of sleep mode and initialize it */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++
++ result = acx_s_init_mac(adev);
++ if (result)
++ goto end;
++
++ /* TODO: see similar code in pci.c */
++ acxusb_s_read_eeprom_version(adev);
++ acxusb_s_fill_configoption(adev);
++ acx_s_set_defaults(adev);
++ acx_s_get_firmware_version(adev);
++ acx_display_hardware_details(adev);
++
++ /* Register the network device */
++ log(L_INIT, "registering network device\n");
++ result = register_netdev(ndev);
++ if (result) {
++ msg = "acx: failed to register USB network device "
++ "(error %d)\n";
++ goto end_nomem;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ printk("acx: USB module " ACX_RELEASE " loaded successfully\n");
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ /* Everything went OK, we are happy now */
++ result = OK;
++ goto end;
++
++end_nomem:
++ printk(msg, result);
++
++ if (ndev) {
++ if (adev->usb_rx) {
++ for (i = 0; i < ACX_RX_URB_CNT; i++)
++ usb_free_urb(adev->usb_rx[i].urb);
++ kfree(adev->usb_rx);
++ }
++ if (adev->usb_tx) {
++ for (i = 0; i < ACX_TX_URB_CNT; i++)
++ usb_free_urb(adev->usb_tx[i].urb);
++ kfree(adev->usb_tx);
++ }
++ free_netdev(ndev);
++ }
++
++ result = -ENOMEM;
++ goto end;
++
++end_nodev:
++ /* no device we could handle, return error. */
++ result = -EIO;
++
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxusb_e_disconnect()
++**
++** This function is invoked whenever the user pulls the plug from the USB
++** device or the module is removed from the kernel. In these cases, the
++** network devices have to be taken down and all allocated memory has
++** to be freed.
++*/
++static void
++acxusb_e_disconnect(struct usb_interface *intf)
++{
++ acx_device_t *adev = usb_get_intfdata(intf);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ /* No WLAN device... no sense */
++ if (!adev)
++ goto end;
++
++ /* Unregister network device
++ *
++ * If the interface is up, unregister_netdev() will take
++ * care of calling our close() function, which takes
++ * care of unlinking the urbs, sending the device to
++ * sleep, etc...
++ * This can't be called with sem or lock held because
++ * _close() will try to grab it as well if it's called,
++ * deadlocking the machine.
++ */
++ unregister_netdev(adev->ndev);
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++ /* This device exists no more */
++ usb_set_intfdata(intf, NULL);
++ acx_proc_unregister_entries(adev->ndev);
++
++ /*
++ * Here we only free them. _close() took care of
++ * unlinking them.
++ */
++ for (i = 0; i < ACX_RX_URB_CNT; ++i) {
++ usb_free_urb(adev->usb_rx[i].urb);
++ }
++ for (i = 0; i< ACX_TX_URB_CNT; ++i) {
++ usb_free_urb(adev->usb_tx[i].urb);
++ }
++
++ /* Freeing containers */
++ kfree(adev->usb_rx);
++ kfree(adev->usb_tx);
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ free_netdev(adev->ndev);
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_e_open()
++** This function is called when the user sets up the network interface.
++** It initializes a management timer, sets up the USB card and starts
++** the network tx queue and USB receive.
++*/
++static int
++acxusb_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* put the ACX100 out of sleep mode */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++
++ acx_init_task_scheduler(adev);
++
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* acx_s_start needs it */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ acx_s_start(adev);
++
++ /* don't acx_start_queue() here, we need to associate first */
++
++ acx_lock(adev, flags);
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ adev->usb_rx[i].urb->status = 0;
++ }
++
++ acxusb_l_poll_rx(adev, &adev->usb_rx[0]);
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return 0;
++}
++
++
++/***********************************************************************
++** acxusb_e_close()
++**
++** This function stops the network functionality of the interface (invoked
++** when the user calls ifconfig <wlan> down). The tx queue is halted and
++** the device is marked as down. In case there were any pending USB bulk
++** transfers, these are unlinked (asynchronously). The module in-use count
++** is also decreased in this function.
++*/
++static int
++acxusb_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++#ifdef WE_STILL_DONT_CARE_ABOUT_IT
++ /* Transmit a disassociate frame */
++ lock
++ acx_l_transmit_disassoc(adev, &client);
++ unlock
++#endif
++
++ acx_sem_lock(adev);
++
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++
++/* Code below is remarkably similar to acxpci_s_down(). Maybe we can merge them? */
++
++ /* Make sure we don't get any more rx requests */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++
++ /*
++ * We must do FLUSH *without* holding sem to avoid a deadlock.
++ * See pci.c:acxpci_s_down() for deails.
++ */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* Power down the device */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ /* Stop the transmit queue, mark the device as DOWN */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ /* stop pending rx/tx urb transfers */
++ for (i = 0; i < ACX_TX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_tx[i].urb);
++ adev->usb_tx[i].busy = 0;
++ }
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_rx[i].urb);
++ adev->usb_rx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++ acx_unlock(adev, flags);
++
++ /* Must do this outside of lock */
++ del_timer_sync(&adev->mgmt_timer);
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return 0;
++}
++
++
++/***********************************************************************
++** acxusb_l_poll_rx
++** This function (re)initiates a bulk-in USB transfer on a given urb
++*/
++static void
++acxusb_l_poll_rx(acx_device_t *adev, usb_rx_t* rx)
++{
++ struct usb_device *usbdev;
++ struct urb *rxurb;
++ int errcode, rxnum;
++ unsigned int inpipe;
++
++ FN_ENTER;
++
++ rxurb = rx->urb;
++ usbdev = adev->usbdev;
++
++ rxnum = rx - adev->usb_rx;
++
++ inpipe = usb_rcvbulkpipe(usbdev, adev->bulkinep);
++ if (unlikely(rxurb->status == -EINPROGRESS)) {
++ printk(KERN_ERR "acx: error, rx triggered while rx urb in progress\n");
++ /* FIXME: this is nasty, receive is being cancelled by this code
++ * on the other hand, this should not happen anyway...
++ */
++ usb_unlink_urb(rxurb);
++ } else
++ if (unlikely(rxurb->status == -ECONNRESET)) {
++ log(L_USBRXTX, "acx_usb: _poll_rx: connection reset\n");
++ goto end;
++ }
++ rxurb->actual_length = 0;
++ usb_fill_bulk_urb(rxurb, usbdev, inpipe,
++ &rx->bulkin, /* dataptr */
++ RXBUFSIZE, /* size */
++ acxusb_i_complete_rx, /* handler */
++ rx /* handler param */
++ );
++ rxurb->transfer_flags = URB_ASYNC_UNLINK;
++
++ /* ATOMIC: we may be called from complete_rx() usb callback */
++ errcode = usb_submit_urb(rxurb, GFP_ATOMIC);
++ /* FIXME: evaluate the error code! */
++ log(L_USBRXTX, "SUBMIT RX (%d) inpipe=0x%X size=%d errcode=%d\n",
++ rxnum, inpipe, (int) RXBUFSIZE, errcode);
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_i_complete_rx()
++** Inputs:
++** urb -> pointer to USB request block
++** regs -> pointer to register-buffer for syscalls (see asm/ptrace.h)
++**
++** This function is invoked by USB subsystem whenever a bulk receive
++** request returns.
++** The received data is then committed to the network stack and the next
++** USB receive is triggered.
++*/
++static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxusb_i_complete_rx(struct urb *urb)
++#else
++acxusb_i_complete_rx(struct urb *urb, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ rxbuffer_t *ptr;
++ rxbuffer_t *inbuf;
++ usb_rx_t *rx;
++ unsigned long flags;
++ int size, remsize, packetsize, rxnum;
++
++ FN_ENTER;
++
++ BUG_ON(!urb->context);
++
++ rx = (usb_rx_t *)urb->context;
++ adev = rx->adev;
++
++ acx_lock(adev, flags);
++
++ /*
++ * Happens on disconnect or close. Don't play with the urb.
++ * Don't resubmit it. It will get unlinked by close()
++ */
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ log(L_USBRXTX, "rx: device is down, not doing anything\n");
++ goto end_unlock;
++ }
++
++ inbuf = &rx->bulkin;
++ size = urb->actual_length;
++ remsize = size;
++ rxnum = rx - adev->usb_rx;
++
++ log(L_USBRXTX, "RETURN RX (%d) status=%d size=%d\n",
++ rxnum, urb->status, size);
++
++ /* Send the URB that's waiting. */
++ log(L_USBRXTX, "rxnum=%d, sending=%d\n", rxnum, rxnum^1);
++ acxusb_l_poll_rx(adev, &adev->usb_rx[rxnum^1]);
++
++ if (unlikely(size > sizeof(rxbuffer_t)))
++ printk("acx_usb: rx too large: %d, please report\n", size);
++
++ /* check if the transfer was aborted */
++ switch (urb->status) {
++ case 0: /* No error */
++ break;
++ case -EOVERFLOW:
++ printk(KERN_ERR "acx: rx data overrun\n");
++ adev->rxtruncsize = 0; /* Not valid anymore. */
++ goto end_unlock;
++ case -ECONNRESET:
++ adev->rxtruncsize = 0;
++ goto end_unlock;
++ case -ESHUTDOWN: /* rmmod */
++ adev->rxtruncsize = 0;
++ goto end_unlock;
++ default:
++ adev->rxtruncsize = 0;
++ adev->stats.rx_errors++;
++ printk("acx: rx error (urb status=%d)\n", urb->status);
++ goto end_unlock;
++ }
++
++ if (unlikely(!size))
++ printk("acx: warning, encountered zerolength rx packet\n");
++
++ if (urb->transfer_buffer != inbuf)
++ goto end_unlock;
++
++ /* check if previous frame was truncated
++ ** FIXME: this code can only handle truncation
++ ** of consecutive packets!
++ */
++ ptr = inbuf;
++ if (adev->rxtruncsize) {
++ int tail_size;
++
++ ptr = &adev->rxtruncbuf;
++ packetsize = RXBUF_BYTES_USED(ptr);
++ if (acx_debug & L_USBRXTX) {
++ printk("handling truncated frame (truncsize=%d size=%d "
++ "packetsize(from trunc)=%d)\n",
++ adev->rxtruncsize, size, packetsize);
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ acx_dump_bytes(inbuf, RXBUF_HDRSIZE);
++ }
++
++ /* bytes needed for rxtruncbuf completion: */
++ tail_size = packetsize - adev->rxtruncsize;
++
++ if (size < tail_size) {
++ /* there is not enough data to complete this packet,
++ ** simply append the stuff to the truncation buffer
++ */
++ memcpy(((char *)ptr) + adev->rxtruncsize, inbuf, size);
++ adev->rxtruncsize += size;
++ remsize = 0;
++ } else {
++ /* ok, this data completes the previously
++ ** truncated packet. copy it into a descriptor
++ ** and give it to the rest of the stack */
++
++ /* append tail to previously truncated part
++ ** NB: adev->rxtruncbuf (pointed to by ptr) can't
++ ** overflow because this is already checked before
++ ** truncation buffer was filled. See below,
++ ** "if (packetsize > sizeof(rxbuffer_t))..." code */
++ memcpy(((char *)ptr) + adev->rxtruncsize, inbuf, tail_size);
++
++ if (acx_debug & L_USBRXTX) {
++ printk("full trailing packet + 12 bytes:\n");
++ acx_dump_bytes(inbuf, tail_size + RXBUF_HDRSIZE);
++ }
++ acx_l_process_rxbuf(adev, ptr);
++ adev->rxtruncsize = 0;
++ ptr = (rxbuffer_t *) (((char *)inbuf) + tail_size);
++ remsize -= tail_size;
++ }
++ log(L_USBRXTX, "post-merge size=%d remsize=%d\n",
++ size, remsize);
++ }
++
++ /* size = USB data block size
++ ** remsize = unprocessed USB bytes left
++ ** ptr = current pos in USB data block
++ */
++ while (remsize) {
++ if (remsize < RXBUF_HDRSIZE) {
++ printk("acx: truncated rx header (%d bytes)!\n",
++ remsize);
++ if (ACX_DEBUG)
++ acx_dump_bytes(ptr, remsize);
++ break;
++ }
++
++ packetsize = RXBUF_BYTES_USED(ptr);
++ log(L_USBRXTX, "packet with packetsize=%d\n", packetsize);
++
++ if (RXBUF_IS_TXSTAT(ptr)) {
++ /* do rate handling */
++ usb_txstatus_t *stat = (void*)ptr;
++ u16 client_no = (u16)stat->hostdata;
++
++ log(L_USBRXTX, "tx: stat: mac_cnt_rcvd:%04X "
++ "queue_index:%02X mac_status:%02X hostdata:%08X "
++ "rate:%u ack_failures:%02X rts_failures:%02X "
++ "rts_ok:%02X\n",
++ stat->mac_cnt_rcvd,
++ stat->queue_index, stat->mac_status, stat->hostdata,
++ stat->rate, stat->ack_failures, stat->rts_failures,
++ stat->rts_ok);
++
++ if (adev->rate_auto && client_no < VEC_SIZE(adev->sta_list)) {
++ client_t *clt = &adev->sta_list[client_no];
++ u16 cur = stat->hostdata >> 16;
++
++ if (clt && clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ stat->rate, 0, /* actually used rate */
++ stat->mac_status, /* error? */
++ ACX_TX_URB_CNT - adev->tx_free);
++ }
++ }
++ goto next;
++ }
++
++ if (packetsize > sizeof(rxbuffer_t)) {
++ printk("acx: packet exceeds max wlan "
++ "frame size (%d > %d). size=%d\n",
++ packetsize, (int) sizeof(rxbuffer_t), size);
++ if (ACX_DEBUG)
++ acx_dump_bytes(ptr, 16);
++ /* FIXME: put some real error-handling in here! */
++ break;
++ }
++
++ if (packetsize > remsize) {
++ /* frame truncation handling */
++ if (acx_debug & L_USBRXTX) {
++ printk("need to truncate packet, "
++ "packetsize=%d remsize=%d "
++ "size=%d bytes:",
++ packetsize, remsize, size);
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ }
++ memcpy(&adev->rxtruncbuf, ptr, remsize);
++ adev->rxtruncsize = remsize;
++ break;
++ }
++
++ /* packetsize <= remsize */
++ /* now handle the received data */
++ acx_l_process_rxbuf(adev, ptr);
++next:
++ ptr = (rxbuffer_t *)(((char *)ptr) + packetsize);
++ remsize -= packetsize;
++ if ((acx_debug & L_USBRXTX) && remsize) {
++ printk("more than one packet in buffer, "
++ "second packet hdr:");
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ }
++ }
++
++end_unlock:
++ acx_unlock(adev, flags);
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_i_complete_tx()
++** Inputs:
++** urb -> pointer to USB request block
++** regs -> pointer to register-buffer for syscalls (see asm/ptrace.h)
++**
++** This function is invoked upon termination of a USB transfer.
++*/
++static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxusb_i_complete_tx(struct urb *urb)
++#else
++acxusb_i_complete_tx(struct urb *urb, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ usb_tx_t *tx;
++ unsigned long flags;
++ int txnum;
++
++ FN_ENTER;
++
++ BUG_ON(!urb->context);
++
++ tx = (usb_tx_t *)urb->context;
++ adev = tx->adev;
++
++ txnum = tx - adev->usb_tx;
++
++ acx_lock(adev, flags);
++
++ /*
++ * If the iface isn't up, we don't have any right
++ * to play with them. The urb may get unlinked.
++ */
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ log(L_USBRXTX, "tx: device is down, not doing anything\n");
++ goto end_unlock;
++ }
++
++ log(L_USBRXTX, "RETURN TX (%d): status=%d size=%d\n",
++ txnum, urb->status, urb->actual_length);
++
++ /* handle USB transfer errors */
++ switch (urb->status) {
++ case 0: /* No error */
++ break;
++ case -ESHUTDOWN:
++ goto end_unlock;
++ break;
++ case -ECONNRESET:
++ goto end_unlock;
++ break;
++ /* FIXME: real error-handling code here please */
++ default:
++ printk(KERN_ERR "acx: tx error, urb status=%d\n", urb->status);
++ /* FIXME: real error-handling code here please */
++ }
++
++ /* free the URB and check for more data */
++ tx->busy = 0;
++ adev->tx_free++;
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (%u free txbufs)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++end_unlock:
++ acx_unlock(adev, flags);
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxusb_l_alloc_tx
++** Actually returns a usb_tx_t* ptr
++*/
++tx_t*
++acxusb_l_alloc_tx(acx_device_t *adev)
++{
++ usb_tx_t *tx;
++ unsigned head;
++
++ FN_ENTER;
++
++ head = adev->tx_head;
++ do {
++ head = (head + 1) % ACX_TX_URB_CNT;
++ if (!adev->usb_tx[head].busy) {
++ log(L_USBRXTX, "allocated tx %d\n", head);
++ tx = &adev->usb_tx[head];
++ tx->busy = 1;
++ adev->tx_free--;
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "tx: stop queue "
++ "(%u free txbufs)\n", adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++ goto end;
++ }
++ } while (likely(head!=adev->tx_head));
++ tx = NULL;
++ printk_ratelimited("acx: tx buffers full\n");
++end:
++ adev->tx_head = head;
++ FN_EXIT0;
++ return (tx_t*)tx;
++}
++
++
++/***************************************************************
++** Used if alloc_tx()'ed buffer needs to be cancelled without doing tx
++*/
++void
++acxusb_l_dealloc_tx(tx_t *tx_opaque)
++{
++ usb_tx_t* tx = (usb_tx_t*)tx_opaque;
++ tx->busy = 0;
++}
++
++
++/***************************************************************
++*/
++void*
++acxusb_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ usb_tx_t* tx = (usb_tx_t*)tx_opaque;
++ return &tx->bulkout.data;
++}
++
++
++/***************************************************************
++** acxusb_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++*/
++void
++acxusb_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int wlanpkt_len)
++{
++ struct usb_device *usbdev;
++ struct urb* txurb;
++ usb_tx_t* tx;
++ usb_txbuffer_t* txbuf;
++ client_t *clt;
++ wlan_hdr_t* whdr;
++ unsigned int outpipe;
++ int ucode, txnum;
++
++ FN_ENTER;
++
++ tx = ((usb_tx_t *)tx_opaque);
++ txurb = tx->urb;
++ txbuf = &tx->bulkout;
++ whdr = (wlan_hdr_t *)txbuf->data;
++ txnum = tx - adev->usb_tx;
++
++ log(L_DEBUG, "using buf#%d free=%d len=%d\n",
++ txnum, adev->tx_free, wlanpkt_len);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, whdr->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ if (unlikely(clt && !clt->rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* fill the USB transfer header */
++ txbuf->desc = cpu_to_le16(USB_TXBUF_TXDESC);
++ txbuf->mpdu_len = cpu_to_le16(wlanpkt_len);
++ txbuf->queue_index = 1;
++ if (clt) {
++ txbuf->rate = clt->rate_100;
++ txbuf->hostdata = (clt - adev->sta_list) | (clt->rate_cur << 16);
++ } else {
++ txbuf->rate = adev->rate_bcast100;
++ txbuf->hostdata = ((u16)-1) | (adev->rate_bcast << 16);
++ }
++ txbuf->ctrl1 = DESC_CTL_FIRSTFRAG;
++ if (1 == adev->preamble_cur)
++ SET_BIT(txbuf->ctrl1, DESC_CTL_SHORT_PREAMBLE);
++ txbuf->ctrl2 = 0;
++ txbuf->data_len = cpu_to_le16(wlanpkt_len);
++
++ if (unlikely(acx_debug & L_DATA)) {
++ printk("dump of bulk out urb:\n");
++ acx_dump_bytes(txbuf, wlanpkt_len + USB_TXBUF_HDRSIZE);
++ }
++
++ if (unlikely(txurb->status == -EINPROGRESS)) {
++ printk("acx: trying to submit tx urb while already in progress\n");
++ }
++
++ /* now schedule the USB transfer */
++ usbdev = adev->usbdev;
++ outpipe = usb_sndbulkpipe(usbdev, adev->bulkoutep);
++
++ usb_fill_bulk_urb(txurb, usbdev, outpipe,
++ txbuf, /* dataptr */
++ wlanpkt_len + USB_TXBUF_HDRSIZE, /* size */
++ acxusb_i_complete_tx, /* handler */
++ tx /* handler param */
++ );
++
++ txurb->transfer_flags = URB_ASYNC_UNLINK|URB_ZERO_PACKET;
++ ucode = usb_submit_urb(txurb, GFP_ATOMIC);
++ log(L_USBRXTX, "SUBMIT TX (%d): outpipe=0x%X buf=%p txsize=%d "
++ "rate=%u errcode=%d\n", txnum, outpipe, txbuf,
++ wlanpkt_len + USB_TXBUF_HDRSIZE, txbuf->rate, ucode);
++
++ if (unlikely(ucode)) {
++ printk(KERN_ERR "acx: submit_urb() error=%d txsize=%d\n",
++ ucode, wlanpkt_len + USB_TXBUF_HDRSIZE);
++
++ /* on error, just mark the frame as done and update
++ ** the statistics
++ */
++ adev->stats.tx_errors++;
++ tx->busy = 0;
++ adev->tx_free++;
++ /* needed? if (adev->tx_free > TX_START_QUEUE) acx_wake_queue(...) */
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++*/
++static void
++acxusb_i_set_rx_mode(struct net_device *ndev)
++{
++}
++
++
++/***********************************************************************
++*/
++#ifdef HAVE_TX_TIMEOUT
++static void
++acxusb_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ /* unlink the URBs */
++ for (i = 0; i < ACX_TX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_tx[i].urb);
++ adev->usb_tx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++ /* TODO: stats update */
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++#endif
++
++
++/***********************************************************************
++** init_module()
++**
++** This function is invoked upon loading of the kernel module.
++** It registers itself at the kernel's USB subsystem.
++**
++** Returns: Errorcode on failure, 0 on success
++*/
++int __init
++acxusb_e_init_module(void)
++{
++ log(L_INIT, "USB module " ACX_RELEASE " initialized, "
++ "probing for devices...\n");
++ return usb_register(&acxusb_driver);
++}
++
++
++
++/***********************************************************************
++** cleanup_module()
++**
++** This function is invoked as last step of the module unloading. It simply
++** deregisters this module at the kernel's USB subsystem.
++*/
++void __exit
++acxusb_e_cleanup_module()
++{
++ usb_deregister(&acxusb_driver);
++}
++
++
++/***********************************************************************
++** DEBUG STUFF
++*/
++#if ACX_DEBUG
++
++#ifdef UNUSED
++static void
++dump_device(struct usb_device *usbdev)
++{
++ int i;
++ struct usb_config_descriptor *cd;
++
++ printk("acx device dump:\n");
++ printk(" devnum: %d\n", usbdev->devnum);
++ printk(" speed: %d\n", usbdev->speed);
++ printk(" tt: 0x%X\n", (unsigned int)(usbdev->tt));
++ printk(" ttport: %d\n", (unsigned int)(usbdev->ttport));
++ printk(" toggle[0]: 0x%X toggle[1]: 0x%X\n", (unsigned int)(usbdev->toggle[0]), (unsigned int)(usbdev->toggle[1]));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ /* This saw a change after 2.6.10 */
++ printk(" ep_in wMaxPacketSize: ");
++ for (i = 0; i < 16; ++i)
++ if (usbdev->ep_in[i] != NULL)
++ printk("%d:%d ", i, usbdev->ep_in[i]->desc.wMaxPacketSize);
++ printk("\n");
++ printk(" ep_out wMaxPacketSize: ");
++ for (i = 0; i < VEC_SIZE(usbdev->ep_out); ++i)
++ if (usbdev->ep_out[i] != NULL)
++ printk("%d:%d ", i, usbdev->ep_out[i]->desc.wMaxPacketSize);
++ printk("\n");
++#else
++ printk(" epmaxpacketin: ");
++ for (i = 0; i < 16; i++)
++ printk("%d ", usbdev->epmaxpacketin[i]);
++ printk("\n");
++ printk(" epmaxpacketout: ");
++ for (i = 0; i < 16; i++)
++ printk("%d ", usbdev->epmaxpacketout[i]);
++ printk("\n");
++#endif
++ printk(" parent: 0x%X\n", (unsigned int)usbdev->parent);
++ printk(" bus: 0x%X\n", (unsigned int)usbdev->bus);
++#ifdef NO_DATATYPE
++ printk(" configs: ");
++ for (i = 0; i < usbdev->descriptor.bNumConfigurations; i++)
++ printk("0x%X ", usbdev->config[i]);
++ printk("\n");
++#endif
++ printk(" actconfig: %p\n", usbdev->actconfig);
++ dump_device_descriptor(&usbdev->descriptor);
++
++ cd = &usbdev->config->desc;
++ dump_config_descriptor(cd);
++}
++
++
++/***********************************************************************
++*/
++static void
++dump_config_descriptor(struct usb_config_descriptor *cd)
++{
++ printk("Configuration Descriptor:\n");
++ if (!cd) {
++ printk("NULL\n");
++ return;
++ }
++ printk(" bLength: %d (0x%X)\n", cd->bLength, cd->bLength);
++ printk(" bDescriptorType: %d (0x%X)\n", cd->bDescriptorType, cd->bDescriptorType);
++ printk(" bNumInterfaces: %d (0x%X)\n", cd->bNumInterfaces, cd->bNumInterfaces);
++ printk(" bConfigurationValue: %d (0x%X)\n", cd->bConfigurationValue, cd->bConfigurationValue);
++ printk(" iConfiguration: %d (0x%X)\n", cd->iConfiguration, cd->iConfiguration);
++ printk(" bmAttributes: %d (0x%X)\n", cd->bmAttributes, cd->bmAttributes);
++ /* printk(" MaxPower: %d (0x%X)\n", cd->bMaxPower, cd->bMaxPower); */
++}
++
++
++static void
++dump_device_descriptor(struct usb_device_descriptor *dd)
++{
++ printk("Device Descriptor:\n");
++ if (!dd) {
++ printk("NULL\n");
++ return;
++ }
++ printk(" bLength: %d (0x%X)\n", dd->bLength, dd->bLength);
++ printk(" bDescriptortype: %d (0x%X)\n", dd->bDescriptorType, dd->bDescriptorType);
++ printk(" bcdUSB: %d (0x%X)\n", dd->bcdUSB, dd->bcdUSB);
++ printk(" bDeviceClass: %d (0x%X)\n", dd->bDeviceClass, dd->bDeviceClass);
++ printk(" bDeviceSubClass: %d (0x%X)\n", dd->bDeviceSubClass, dd->bDeviceSubClass);
++ printk(" bDeviceProtocol: %d (0x%X)\n", dd->bDeviceProtocol, dd->bDeviceProtocol);
++ printk(" bMaxPacketSize0: %d (0x%X)\n", dd->bMaxPacketSize0, dd->bMaxPacketSize0);
++ printk(" idVendor: %d (0x%X)\n", dd->idVendor, dd->idVendor);
++ printk(" idProduct: %d (0x%X)\n", dd->idProduct, dd->idProduct);
++ printk(" bcdDevice: %d (0x%X)\n", dd->bcdDevice, dd->bcdDevice);
++ printk(" iManufacturer: %d (0x%X)\n", dd->iManufacturer, dd->iManufacturer);
++ printk(" iProduct: %d (0x%X)\n", dd->iProduct, dd->iProduct);
++ printk(" iSerialNumber: %d (0x%X)\n", dd->iSerialNumber, dd->iSerialNumber);
++ printk(" bNumConfigurations: %d (0x%X)\n", dd->bNumConfigurations, dd->bNumConfigurations);
++}
++#endif /* UNUSED */
++
++#endif /* ACX_DEBUG */
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,424 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/types.h>
++#include <linux/if_arp.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++#define LOG_BAD_EID(hdr,len,ie_ptr) acx_log_bad_eid(hdr, len, ((wlan_ie_t*)ie_ptr))
++
++#define IE_EID(ie_ptr) (((wlan_ie_t*)(ie_ptr))->eid)
++#define IE_LEN(ie_ptr) (((wlan_ie_t*)(ie_ptr))->len)
++#define OFFSET(hdr,off) (WLAN_HDR_A3_DATAP(hdr) + (off))
++
++
++/***********************************************************************
++** wlan_mgmt_decode_XXX
++**
++** Given a complete frame in f->hdr, sets the pointers in f to
++** the areas that correspond to the parts of the frame.
++**
++** Assumptions:
++** 1) f->len and f->hdr are already set
++** 2) f->len is the length of the MAC header + data, the FCS
++** is NOT included
++** 3) all members except len and hdr are zero
++** Arguments:
++** f frame structure
++**
++** Returns:
++** nothing
++**
++** Side effects:
++** frame structure members are pointing at their
++** respective portions of the frame buffer.
++*/
++void
++wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_BEACON;
++
++ /*-- Fixed Fields ----*/
++ f->ts = (u64 *) OFFSET(f->hdr, WLAN_BEACON_OFF_TS);
++ f->bcn_int = (u16 *) OFFSET(f->hdr, WLAN_BEACON_OFF_BCN_INT);
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_BEACON_OFF_CAPINFO);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_BEACON_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_FH_PARMS:
++ f->fh_parms = (wlan_ie_fh_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_DS_PARMS:
++ f->ds_parms = (wlan_ie_ds_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_CF_PARMS:
++ f->cf_parms = (wlan_ie_cf_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_IBSS_PARMS:
++ f->ibss_parms = (wlan_ie_ibss_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_TIM:
++ f->tim = (wlan_ie_tim_t *) ie_ptr;
++ break;
++ case WLAN_EID_ERP_INFO:
++ f->erp = (wlan_ie_erp_t *) ie_ptr;
++ break;
++
++ case WLAN_EID_COUNTRY:
++ /* was seen: 07 06 47 42 20 01 0D 14 */
++ case WLAN_EID_PWR_CONSTRAINT:
++ /* was seen by Ashwin Mansinghka <ashwin_man@yahoo.com> from
++ Atheros-based PCI card in AP mode using madwifi drivers: */
++ /* 20 01 00 */
++ case WLAN_EID_NONERP:
++ /* was seen from WRT54GS with OpenWrt: 2F 01 07 */
++ case WLAN_EID_UNKNOWN128:
++ /* was seen by Jacek Jablonski <conexion2000@gmail.com> from Orinoco AP */
++ /* 80 06 00 60 1D 2C 3B 00 */
++ case WLAN_EID_UNKNOWN133:
++ /* was seen by David Bronaugh <dbronaugh@linuxboxen.org> from ???? */
++ /* 85 1E 00 00 84 12 07 00 FF 00 11 00 61 70 63 31 */
++ /* 63 73 72 30 34 32 00 00 00 00 00 00 00 00 00 25 */
++ case WLAN_EID_UNKNOWN223:
++ /* was seen by Carlos Martin <carlosmn@gmail.com> from ???? */
++ /* DF 20 01 1E 04 00 00 00 06 63 09 02 FF 0F 30 30 */
++ /* 30 42 36 42 33 34 30 39 46 31 00 00 00 00 00 00 00 00 */
++ case WLAN_EID_GENERIC:
++ /* WPA: hostap code:
++ if (pos[1] >= 4 &&
++ pos[2] == 0x00 && pos[3] == 0x50 &&
++ pos[4] == 0xf2 && pos[5] == 1) {
++ wpa = pos;
++ wpa_len = pos[1] + 2;
++ }
++ TI x4 mode: seen DD 04 08 00 28 00
++ (08 00 28 is TI's OUI)
++ last byte is probably 0/1 - disabled/enabled
++ */
++ case WLAN_EID_RSN:
++ /* hostap does something with it:
++ rsn = pos;
++ rsn_len = pos[1] + 2;
++ */
++ break;
++
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++#ifdef UNUSED
++void wlan_mgmt_decode_ibssatim(wlan_fr_ibssatim_t * f)
++{
++ f->type = WLAN_FSTYPE_ATIM;
++ /*-- Fixed Fields ----*/
++ /*-- Information elements */
++}
++#endif /* UNUSED */
++
++void
++wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f)
++{
++ f->type = WLAN_FSTYPE_DISASSOC;
++
++ /*-- Fixed Fields ----*/
++ f->reason = (u16 *) OFFSET(f->hdr, WLAN_DISASSOC_OFF_REASON);
++
++ /*-- Information elements */
++}
++
++
++void
++wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++
++ f->type = WLAN_FSTYPE_ASSOCREQ;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_CAP_INFO);
++ f->listen_int = (u16 *) OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_LISTEN_INT);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f)
++{
++ f->type = WLAN_FSTYPE_ASSOCRESP;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_CAP_INFO);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_STATUS);
++ f->aid = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_AID);
++
++ /*-- Information elements */
++ f->supp_rates = (wlan_ie_supp_rates_t *)
++ OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_SUPP_RATES);
++}
++
++
++#ifdef UNUSED
++void
++wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_REASSOCREQ;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_CAP_INFO);
++ f->listen_int = (u16 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_LISTEN_INT);
++ f->curr_ap = (u8 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_CURR_AP);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f)
++{
++ f->type = WLAN_FSTYPE_REASSOCRESP;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_CAP_INFO);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_STATUS);
++ f->aid = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_AID);
++
++ /*-- Information elements */
++ f->supp_rates = (wlan_ie_supp_rates_t *)
++ OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_SUPP_RATES);
++}
++
++
++void
++wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_PROBEREQ;
++
++ /*-- Fixed Fields ----*/
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_PROBEREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++#endif /* UNUSED */
++
++
++/* TODO: decoding of beacon and proberesp can be merged (similar structure) */
++void
++wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_PROBERESP;
++
++ /*-- Fixed Fields ----*/
++ f->ts = (u64 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_TS);
++ f->bcn_int = (u16 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_BCN_INT);
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_CAP_INFO);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_PROBERESP_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_FH_PARMS:
++ f->fh_parms = (wlan_ie_fh_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_DS_PARMS:
++ f->ds_parms = (wlan_ie_ds_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_CF_PARMS:
++ f->cf_parms = (wlan_ie_cf_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_IBSS_PARMS:
++ f->ibss_parms = (wlan_ie_ibss_parms_t *) ie_ptr;
++ break;
++#ifdef DONT_DO_IT_ADD_REAL_HANDLING_INSTEAD
++ case WLAN_EID_COUNTRY:
++ break;
++ ...
++#endif
++#ifdef SENT_HERE_BY_OPENWRT
++ /* should those be trapped or handled?? */
++ case WLAN_EID_ERP_INFO:
++ break;
++ case WLAN_EID_NONERP:
++ break;
++ case WLAN_EID_GENERIC:
++ break;
++#endif
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_authen(wlan_fr_authen_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_AUTHEN;
++
++ /*-- Fixed Fields ----*/
++ f->auth_alg = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_AUTH_ALG);
++ f->auth_seq = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_AUTH_SEQ);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_STATUS);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_AUTHEN_OFF_CHALLENGE);
++ if ((ie_ptr < end) && (IE_EID(ie_ptr) == WLAN_EID_CHALLENGE)) {
++ f->challenge = (wlan_ie_challenge_t *) ie_ptr;
++ }
++}
++
++
++void
++wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f)
++{
++ f->type = WLAN_FSTYPE_DEAUTHEN;
++
++ /*-- Fixed Fields ----*/
++ f->reason = (u16 *) OFFSET(f->hdr, WLAN_DEAUTHEN_OFF_REASON);
++
++ /*-- Information elements */
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_compat.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_compat.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,260 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/*=============================================================*/
++/*------ Establish Platform Identity --------------------------*/
++/*=============================================================*/
++/* Key macros: */
++/* WLAN_CPU_FAMILY */
++#define WLAN_Ix86 1
++#define WLAN_PPC 2
++#define WLAN_Ix96 3
++#define WLAN_ARM 4
++#define WLAN_ALPHA 5
++#define WLAN_MIPS 6
++#define WLAN_HPPA 7
++#define WLAN_SPARC 8
++#define WLAN_SH 9
++#define WLAN_x86_64 10
++/* WLAN_CPU_CORE */
++#define WLAN_I386CORE 1
++#define WLAN_PPCCORE 2
++#define WLAN_I296 3
++#define WLAN_ARMCORE 4
++#define WLAN_ALPHACORE 5
++#define WLAN_MIPSCORE 6
++#define WLAN_HPPACORE 7
++/* WLAN_CPU_PART */
++#define WLAN_I386PART 1
++#define WLAN_MPC860 2
++#define WLAN_MPC823 3
++#define WLAN_I296SA 4
++#define WLAN_PPCPART 5
++#define WLAN_ARMPART 6
++#define WLAN_ALPHAPART 7
++#define WLAN_MIPSPART 8
++#define WLAN_HPPAPART 9
++/* WLAN_SYSARCH */
++#define WLAN_PCAT 1
++#define WLAN_MBX 2
++#define WLAN_RPX 3
++#define WLAN_LWARCH 4
++#define WLAN_PMAC 5
++#define WLAN_SKIFF 6
++#define WLAN_BITSY 7
++#define WLAN_ALPHAARCH 7
++#define WLAN_MIPSARCH 9
++#define WLAN_HPPAARCH 10
++/* WLAN_HOSTIF (generally set on the command line, not detected) */
++#define WLAN_PCMCIA 1
++#define WLAN_ISA 2
++#define WLAN_PCI 3
++#define WLAN_USB 4
++#define WLAN_PLX 5
++
++/* Note: the PLX HOSTIF above refers to some vendors implementations for */
++/* PCI. It's a PLX chip that is a PCI to PCMCIA adapter, but it */
++/* isn't a real PCMCIA host interface adapter providing all the */
++/* card&socket services. */
++
++#ifdef __powerpc__
++#ifndef __ppc__
++#define __ppc__
++#endif
++#endif
++
++#if (defined(CONFIG_PPC) || defined(CONFIG_8xx))
++#ifndef __ppc__
++#define __ppc__
++#endif
++#endif
++
++#if defined(__x86_64__)
++ #define WLAN_CPU_FAMILY WLAN_x86_64
++ #define WLAN_SYSARCH WLAN_PCAT
++#elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
++ #define WLAN_CPU_FAMILY WLAN_Ix86
++ #define WLAN_CPU_CORE WLAN_I386CORE
++ #define WLAN_CPU_PART WLAN_I386PART
++ #define WLAN_SYSARCH WLAN_PCAT
++#elif defined(__ppc__)
++ #define WLAN_CPU_FAMILY WLAN_PPC
++ #define WLAN_CPU_CORE WLAN_PPCCORE
++ #if defined(CONFIG_MBX)
++ #define WLAN_CPU_PART WLAN_MPC860
++ #define WLAN_SYSARCH WLAN_MBX
++ #elif defined(CONFIG_RPXLITE)
++ #define WLAN_CPU_PART WLAN_MPC823
++ #define WLAN_SYSARCH WLAN_RPX
++ #elif defined(CONFIG_RPXCLASSIC)
++ #define WLAN_CPU_PART WLAN_MPC860
++ #define WLAN_SYSARCH WLAN_RPX
++ #else
++ #define WLAN_CPU_PART WLAN_PPCPART
++ #define WLAN_SYSARCH WLAN_PMAC
++ #endif
++#elif defined(__arm__)
++ #define WLAN_CPU_FAMILY WLAN_ARM
++ #define WLAN_CPU_CORE WLAN_ARMCORE
++ #define WLAN_CPU_PART WLAN_ARM_PART
++ #define WLAN_SYSARCH WLAN_SKIFF
++#elif defined(__alpha__)
++ #define WLAN_CPU_FAMILY WLAN_ALPHA
++ #define WLAN_CPU_CORE WLAN_ALPHACORE
++ #define WLAN_CPU_PART WLAN_ALPHAPART
++ #define WLAN_SYSARCH WLAN_ALPHAARCH
++#elif defined(__mips__)
++ #define WLAN_CPU_FAMILY WLAN_MIPS
++ #define WLAN_CPU_CORE WLAN_MIPSCORE
++ #define WLAN_CPU_PART WLAN_MIPSPART
++ #define WLAN_SYSARCH WLAN_MIPSARCH
++#elif defined(__hppa__)
++ #define WLAN_CPU_FAMILY WLAN_HPPA
++ #define WLAN_CPU_CORE WLAN_HPPACORE
++ #define WLAN_CPU_PART WLAN_HPPAPART
++ #define WLAN_SYSARCH WLAN_HPPAARCH
++#elif defined(__sparc__)
++ #define WLAN_CPU_FAMILY WLAN_SPARC
++ #define WLAN_SYSARCH WLAN_SPARC
++#elif defined(__sh__)
++ #define WLAN_CPU_FAMILY WLAN_SH
++ #define WLAN_SYSARCH WLAN_SHARCH
++ #ifndef __LITTLE_ENDIAN__
++ #define __LITTLE_ENDIAN__
++ #endif
++#else
++ #error "No CPU identified!"
++#endif
++
++/*
++ Some big endian machines implicitly do all I/O in little endian mode.
++
++ In particular:
++ Linux/PPC on PowerMacs (PCI)
++ Arm/Intel Xscale (PCI)
++
++ This may also affect PLX boards and other BE &| PPC platforms;
++ as new ones are discovered, add them below.
++*/
++
++#if ((WLAN_SYSARCH == WLAN_SKIFF) || (WLAN_SYSARCH == WLAN_PMAC))
++#define REVERSE_ENDIAN
++#endif
++
++/*=============================================================*/
++/*------ Hardware Portability Macros --------------------------*/
++/*=============================================================*/
++#if (WLAN_CPU_FAMILY == WLAN_PPC)
++#define wlan_inw(a) in_be16((unsigned short *)((a)+_IO_BASE))
++#define wlan_inw_le16_to_cpu(a) inw((a))
++#define wlan_outw(v,a) out_be16((unsigned short *)((a)+_IO_BASE), (v))
++#define wlan_outw_cpu_to_le16(v,a) outw((v),(a))
++#else
++#define wlan_inw(a) inw((a))
++#define wlan_inw_le16_to_cpu(a) __cpu_to_le16(inw((a)))
++#define wlan_outw(v,a) outw((v),(a))
++#define wlan_outw_cpu_to_le16(v,a) outw(__cpu_to_le16((v)),(a))
++#endif
++
++/*=============================================================*/
++/*------ Bit settings -----------------------------------------*/
++/*=============================================================*/
++#define ieee2host16(n) __le16_to_cpu(n)
++#define ieee2host32(n) __le32_to_cpu(n)
++#define host2ieee16(n) __cpu_to_le16(n)
++#define host2ieee32(n) __cpu_to_le32(n)
++
++/* for constants */
++#ifdef __LITTLE_ENDIAN
++ #define IEEE16(a,n) a = n, a##i = n,
++#else
++ #ifdef __BIG_ENDIAN
++ /* shifts would produce gcc warnings. Oh well... */
++ #define IEEE16(a,n) a = n, a##i = ((n&0xff)*256 + ((n&0xff00)/256)),
++ #else
++ #error give me endianness or give me death
++ #endif
++#endif
++
++/*=============================================================*/
++/*------ Compiler Portability Macros --------------------------*/
++/*=============================================================*/
++#define WLAN_PACKED __attribute__ ((packed))
++
++/* Interrupt handler backwards compatibility stuff */
++#ifndef IRQ_NONE
++#define IRQ_NONE
++#define IRQ_HANDLED
++typedef void irqreturn_t;
++#endif
++
++#ifndef ARPHRD_IEEE80211_PRISM
++#define ARPHRD_IEEE80211_PRISM 802
++#endif
++
++#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
++
++/*============================================================================*
++ * Constants *
++ *============================================================================*/
++#define WLAN_IEEE_OUI_LEN 3
++
++/*============================================================================*
++ * Types *
++ *============================================================================*/
++
++/* local ether header type */
++typedef struct wlan_ethhdr {
++ u8 daddr[ETH_ALEN];
++ u8 saddr[ETH_ALEN];
++ u16 type;
++} WLAN_PACKED wlan_ethhdr_t;
++
++/* local llc header type */
++typedef struct wlan_llc {
++ u8 dsap;
++ u8 ssap;
++ u8 ctl;
++} WLAN_PACKED wlan_llc_t;
++
++/* local snap header type */
++typedef struct wlan_snap {
++ u8 oui[WLAN_IEEE_OUI_LEN];
++ u16 type;
++} WLAN_PACKED wlan_snap_t;
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_hdr.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_hdr.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,497 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/* mini-doc
++
++Here are all 11b/11g/11a rates and modulations:
++
++ 11b 11g 11a
++ --- --- ---
++ 1 |B |B |
++ 2 |Q |Q |
++ 5.5|Cp |C p|
++ 6 | |Od |O
++ 9 | |od |o
++11 |Cp |C p|
++12 | |Od |O
++18 | |od |o
++22 | | p|
++24 | |Od |O
++33 | | p|
++36 | |od |o
++48 | |od |o
++54 | |od |o
++
++Mandatory:
++ B - DBPSK (Differential Binary Phase Shift Keying)
++ Q - DQPSK (Differential Quaternary Phase Shift Keying)
++ C - CCK (Complementary Code Keying, a form of DSSS
++ (Direct Sequence Spread Spectrum) modulation)
++ O - OFDM (Orthogonal Frequency Division Multiplexing)
++Optional:
++ o - OFDM
++ d - CCK-OFDM (also known as DSSS-OFDM)
++ p - PBCC (Packet Binary Convolutional Coding)
++
++The term CCK-OFDM may be used interchangeably with DSSS-OFDM
++(the IEEE 802.11g-2003 standard uses the latter terminology).
++In the CCK-OFDM, the PLCP header of the frame uses the CCK form of DSSS,
++while the PLCP payload (the MAC frame) is modulated using OFDM.
++
++Basically, you must use CCK-OFDM if you have mixed 11b/11g environment,
++or else (pure OFDM) 11b equipment may not realize that AP
++is sending a packet and start sending its own one.
++Sadly, looks like acx111 does not support CCK-OFDM, only pure OFDM.
++
++Re PBCC: avoid using it. It makes sense only if you have
++TI "11b+" hardware. You _must_ use PBCC in order to reach 22Mbps on it.
++
++Preambles:
++
++Long preamble (at 1Mbit rate, takes 144 us):
++ 16 bytes ones
++ 2 bytes 0xF3A0 (lsb sent first)
++PLCP header follows (at 1Mbit also):
++ 1 byte Signal: speed, in 0.1Mbit units, except for:
++ 33Mbit: 33 (instead of 330 - doesn't fit in octet)
++ all CCK-OFDM rates: 30
++ 1 byte Service
++ 0,1,4: reserved
++ 2: 1=locked clock
++ 3: 1=PBCC
++ 5: Length Extension (PBCC 22,33Mbit (11g only)) <-
++ 6: Length Extension (PBCC 22,33Mbit (11g only)) <- BLACK MAGIC HERE
++ 7: Length Extension <-
++ 2 bytes Length (time needed to tx this frame)
++ a) 5.5 Mbit/s CCK
++ Length = octets*8/5.5, rounded up to integer
++ b) 11 Mbit/s CCK
++ Length = octets*8/11, rounded up to integer
++ Service bit 7:
++ 0 = rounding took less than 8/11
++ 1 = rounding took more than or equal to 8/11
++ c) 5.5 Mbit/s PBCC
++ Length = (octets+1)*8/5.5, rounded up to integer
++ d) 11 Mbit/s PBCC
++ Length = (octets+1)*8/11, rounded up to integer
++ Service bit 7:
++ 0 = rounding took less than 8/11
++ 1 = rounding took more than or equal to 8/11
++ e) 22 Mbit/s PBCC
++ Length = (octets+1)*8/22, rounded up to integer
++ Service bits 6,7:
++ 00 = rounding took less than 8/22ths
++ 01 = rounding took 8/22...15/22ths
++ 10 = rounding took 16/22ths or more.
++ f) 33 Mbit/s PBCC
++ Length = (octets+1)*8/33, rounded up to integer
++ Service bits 5,6,7:
++ 000 rounding took less than 8/33
++ 001 rounding took 8/33...15/33
++ 010 rounding took 16/33...23/33
++ 011 rounding took 24/33...31/33
++ 100 rounding took 32/33 or more
++ 2 bytes CRC
++
++PSDU follows (up to 2346 bytes at selected rate)
++
++While Signal value alone is not enough to determine rate and modulation,
++Signal+Service is always sufficient.
++
++Short preamble (at 1Mbit rate, takes 72 us):
++ 7 bytes zeroes
++ 2 bytes 0x05CF (lsb sent first)
++PLCP header follows *at 2Mbit/s*. Format is the same as in long preamble.
++PSDU follows (up to 2346 bytes at selected rate)
++
++OFDM preamble is completely different, uses OFDM
++modulation from the start and thus easily identifiable.
++Not shown here.
++*/
++
++
++/***********************************************************************
++** Constants
++*/
++
++#define WLAN_HDR_A3_LEN 24
++#define WLAN_HDR_A4_LEN 30
++/* IV structure:
++** 3 bytes: Initialization Vector (24 bits)
++** 1 byte: 0..5: padding, must be 0; 6..7: key selector (0-3)
++*/
++#define WLAN_WEP_IV_LEN 4
++/* 802.11 says 2312 but looks like 2312 is a max size of _WEPed data_ */
++#define WLAN_DATA_MAXLEN 2304
++#define WLAN_WEP_ICV_LEN 4
++#define WLAN_FCS_LEN 4
++#define WLAN_A3FR_MAXLEN (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN)
++#define WLAN_A4FR_MAXLEN (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN)
++#define WLAN_A3FR_MAXLEN_FCS (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + 4)
++#define WLAN_A4FR_MAXLEN_FCS (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + 4)
++#define WLAN_A3FR_MAXLEN_WEP (WLAN_A3FR_MAXLEN + 8)
++#define WLAN_A4FR_MAXLEN_WEP (WLAN_A4FR_MAXLEN + 8)
++#define WLAN_A3FR_MAXLEN_WEP_FCS (WLAN_A3FR_MAXLEN_FCS + 8)
++#define WLAN_A4FR_MAXLEN_WEP_FCS (WLAN_A4FR_MAXLEN_FCS + 8)
++
++#define WLAN_BSS_TS_LEN 8
++#define WLAN_SSID_MAXLEN 32
++#define WLAN_BEACON_FR_MAXLEN (WLAN_HDR_A3_LEN + 334)
++#define WLAN_ATIM_FR_MAXLEN (WLAN_HDR_A3_LEN + 0)
++#define WLAN_DISASSOC_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
++#define WLAN_ASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 48)
++#define WLAN_ASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
++#define WLAN_REASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 54)
++#define WLAN_REASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
++#define WLAN_PROBEREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 44)
++#define WLAN_PROBERESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 78)
++#define WLAN_AUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 261)
++#define WLAN_DEAUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
++#define WLAN_CHALLENGE_IE_LEN 130
++#define WLAN_CHALLENGE_LEN 128
++#define WLAN_WEP_MAXKEYLEN 13
++#define WLAN_WEP_NKEYS 4
++
++/*--- Frame Control Field -------------------------------------*/
++/* Frame Types */
++#define WLAN_FTYPE_MGMT 0x00
++#define WLAN_FTYPE_CTL 0x01
++#define WLAN_FTYPE_DATA 0x02
++
++/* Frame subtypes */
++/* Management */
++#define WLAN_FSTYPE_ASSOCREQ 0x00
++#define WLAN_FSTYPE_ASSOCRESP 0x01
++#define WLAN_FSTYPE_REASSOCREQ 0x02
++#define WLAN_FSTYPE_REASSOCRESP 0x03
++#define WLAN_FSTYPE_PROBEREQ 0x04
++#define WLAN_FSTYPE_PROBERESP 0x05
++#define WLAN_FSTYPE_BEACON 0x08
++#define WLAN_FSTYPE_ATIM 0x09
++#define WLAN_FSTYPE_DISASSOC 0x0a
++#define WLAN_FSTYPE_AUTHEN 0x0b
++#define WLAN_FSTYPE_DEAUTHEN 0x0c
++
++/* Control */
++#define WLAN_FSTYPE_PSPOLL 0x0a
++#define WLAN_FSTYPE_RTS 0x0b
++#define WLAN_FSTYPE_CTS 0x0c
++#define WLAN_FSTYPE_ACK 0x0d
++#define WLAN_FSTYPE_CFEND 0x0e
++#define WLAN_FSTYPE_CFENDCFACK 0x0f
++
++/* Data */
++#define WLAN_FSTYPE_DATAONLY 0x00
++#define WLAN_FSTYPE_DATA_CFACK 0x01
++#define WLAN_FSTYPE_DATA_CFPOLL 0x02
++#define WLAN_FSTYPE_DATA_CFACK_CFPOLL 0x03
++#define WLAN_FSTYPE_NULL 0x04
++#define WLAN_FSTYPE_CFACK 0x05
++#define WLAN_FSTYPE_CFPOLL 0x06
++#define WLAN_FSTYPE_CFACK_CFPOLL 0x07
++
++/*--- FC Constants v. 2.0 ------------------------------------*/
++/* Each constant is defined twice: WF_CONST is in host */
++/* byteorder, WF_CONSTi is in ieee byteorder. */
++/* Usage: */
++/* printf("the frame subtype is %X", WF_FC_FTYPEi & rx.fc); */
++/* tx.fc = WF_FTYPE_CTLi | WF_FSTYPE_RTSi; */
++/*------------------------------------------------------------*/
++
++enum {
++/*--- Frame Control Field -------------------------------------*/
++/* Protocol version: always 0 for current 802.11 standards */
++IEEE16(WF_FC_PVER, 0x0003)
++IEEE16(WF_FC_FTYPE, 0x000c)
++IEEE16(WF_FC_FSTYPE, 0x00f0)
++IEEE16(WF_FC_TODS, 0x0100)
++IEEE16(WF_FC_FROMDS, 0x0200)
++IEEE16(WF_FC_FROMTODS, 0x0300)
++IEEE16(WF_FC_MOREFRAG, 0x0400)
++IEEE16(WF_FC_RETRY, 0x0800)
++/* Indicates PS mode in which STA will be after successful completion
++** of current frame exchange sequence. Always 0 for AP frames */
++IEEE16(WF_FC_PWRMGT, 0x1000)
++/* What MoreData=1 means:
++** From AP to STA in PS mode: don't sleep yet, I have more frames for you
++** From Contention-Free (CF) Pollable STA in response to a CF-Poll:
++** STA has buffered frames for transmission in response to next CF-Poll
++** Bcast/mcast frames transmitted from AP:
++** when additional bcast/mcast frames remain to be transmitted by AP
++** during this beacon interval
++** In all other cases MoreData=0 */
++IEEE16(WF_FC_MOREDATA, 0x2000)
++IEEE16(WF_FC_ISWEP, 0x4000)
++IEEE16(WF_FC_ORDER, 0x8000)
++
++/* Frame Types */
++IEEE16(WF_FTYPE_MGMT, 0x00)
++IEEE16(WF_FTYPE_CTL, 0x04)
++IEEE16(WF_FTYPE_DATA, 0x08)
++
++/* Frame subtypes */
++/* Management */
++IEEE16(WF_FSTYPE_ASSOCREQ, 0x00)
++IEEE16(WF_FSTYPE_ASSOCRESP, 0x10)
++IEEE16(WF_FSTYPE_REASSOCREQ, 0x20)
++IEEE16(WF_FSTYPE_REASSOCRESP, 0x30)
++IEEE16(WF_FSTYPE_PROBEREQ, 0x40)
++IEEE16(WF_FSTYPE_PROBERESP, 0x50)
++IEEE16(WF_FSTYPE_BEACON, 0x80)
++IEEE16(WF_FSTYPE_ATIM, 0x90)
++IEEE16(WF_FSTYPE_DISASSOC, 0xa0)
++IEEE16(WF_FSTYPE_AUTHEN, 0xb0)
++IEEE16(WF_FSTYPE_DEAUTHEN, 0xc0)
++
++/* Control */
++IEEE16(WF_FSTYPE_PSPOLL, 0xa0)
++IEEE16(WF_FSTYPE_RTS, 0xb0)
++IEEE16(WF_FSTYPE_CTS, 0xc0)
++IEEE16(WF_FSTYPE_ACK, 0xd0)
++IEEE16(WF_FSTYPE_CFEND, 0xe0)
++IEEE16(WF_FSTYPE_CFENDCFACK, 0xf0)
++
++/* Data */
++IEEE16(WF_FSTYPE_DATAONLY, 0x00)
++IEEE16(WF_FSTYPE_DATA_CFACK, 0x10)
++IEEE16(WF_FSTYPE_DATA_CFPOLL, 0x20)
++IEEE16(WF_FSTYPE_DATA_CFACK_CFPOLL, 0x30)
++IEEE16(WF_FSTYPE_NULL, 0x40)
++IEEE16(WF_FSTYPE_CFACK, 0x50)
++IEEE16(WF_FSTYPE_CFPOLL, 0x60)
++IEEE16(WF_FSTYPE_CFACK_CFPOLL, 0x70)
++};
++
++
++/***********************************************************************
++** Macros
++*/
++
++/*--- Duration Macros ----------------------------------------*/
++/* Macros to get/set the bitfields of the Duration Field */
++/* - the duration value is only valid when bit15 is zero */
++/* - the firmware handles these values, so I'm not going */
++/* to use these macros right now. */
++/*------------------------------------------------------------*/
++
++/*--- Sequence Control Macros -------------------------------*/
++/* Macros to get/set the bitfields of the Sequence Control */
++/* Field. */
++/*------------------------------------------------------------*/
++#define WLAN_GET_SEQ_FRGNUM(n) ((u16)(n) & 0x000f)
++#define WLAN_GET_SEQ_SEQNUM(n) (((u16)(n) & 0xfff0) >> 4)
++
++/*--- Data ptr macro -----------------------------------------*/
++/* Creates a u8* to the data portion of a frame */
++/* Assumes you're passing in a ptr to the beginning of the hdr*/
++/*------------------------------------------------------------*/
++#define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN)
++#define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN)
++
++
++/***********************************************************************
++** Types
++*/
++
++/* 802.11 header type
++**
++** Note the following:
++** a1 *always* is receiver's mac or bcast/mcast
++** a2 *always* is transmitter's mac, if a2 exists
++** seq: [0:3] frag#, [4:15] seq# - used for dup detection
++** (dups from retries have same seq#) */
++typedef struct wlan_hdr {
++ u16 fc;
++ u16 dur;
++ u8 a1[ETH_ALEN];
++ u8 a2[ETH_ALEN];
++ u8 a3[ETH_ALEN];
++ u16 seq;
++ u8 a4[ETH_ALEN];
++} WLAN_PACKED wlan_hdr_t;
++
++/* Separate structs for use if frame type is known */
++typedef struct wlan_hdr_a3 {
++ u16 fc;
++ u16 dur;
++ u8 a1[ETH_ALEN];
++ u8 a2[ETH_ALEN];
++ u8 a3[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED wlan_hdr_a3_t;
++
++typedef struct wlan_hdr_mgmt {
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED wlan_hdr_mgmt_t;
++
++#ifdef NOT_NEEDED_YET
++typedef struct { /* ad-hoc peer->peer (to/from DS = 0/0) */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED ibss;
++typedef struct { /* ap->sta (to/from DS = 0/1) */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED fromap;
++typedef struct { /* sta->ap (to/from DS = 1/0) */
++ u16 fc;
++ u16 dur;
++ u8 bssid[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 da[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED toap;
++typedef struct { /* wds->wds (to/from DS = 1/1), the only 4addr pkt */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++ u8 da[ETH_ALEN];
++ u16 seq;
++ u8 sa[ETH_ALEN];
++} WLAN_PACKED wds;
++typedef struct { /* all management packets */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED mgmt;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++} WLAN_PACKED rts;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++} WLAN_PACKED cts;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++} WLAN_PACKED ack;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ /* NB: this one holds Assoc ID in dur field: */
++ u16 aid;
++ u8 bssid[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++} WLAN_PACKED pspoll;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++} WLAN_PACKED cfend;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++} WLAN_PACKED cfendcfack;
++#endif
++
++/* Prism header emulation (monitor mode) */
++typedef struct wlanitem_u32 {
++ u32 did;
++ u16 status;
++ u16 len;
++ u32 data;
++} WLAN_PACKED wlanitem_u32_t;
++#define WLANITEM_STATUS_data_ok 0
++#define WLANITEM_STATUS_no_value 1
++#define WLANITEM_STATUS_invalid_itemname 2
++#define WLANITEM_STATUS_invalid_itemdata 3
++#define WLANITEM_STATUS_missing_itemdata 4
++#define WLANITEM_STATUS_incomplete_itemdata 5
++#define WLANITEM_STATUS_invalid_msg_did 6
++#define WLANITEM_STATUS_invalid_mib_did 7
++#define WLANITEM_STATUS_missing_conv_func 8
++#define WLANITEM_STATUS_string_too_long 9
++#define WLANITEM_STATUS_data_out_of_range 10
++#define WLANITEM_STATUS_string_too_short 11
++#define WLANITEM_STATUS_missing_valid_func 12
++#define WLANITEM_STATUS_unknown 13
++#define WLANITEM_STATUS_invalid_did 14
++#define WLANITEM_STATUS_missing_print_func 15
++
++#define WLAN_DEVNAMELEN_MAX 16
++typedef struct wlansniffrm {
++ u32 msgcode;
++ u32 msglen;
++ u8 devname[WLAN_DEVNAMELEN_MAX];
++ wlanitem_u32_t hosttime;
++ wlanitem_u32_t mactime;
++ wlanitem_u32_t channel;
++ wlanitem_u32_t rssi;
++ wlanitem_u32_t sq;
++ wlanitem_u32_t signal;
++ wlanitem_u32_t noise;
++ wlanitem_u32_t rate;
++ wlanitem_u32_t istx; /* tx? 0:no 1:yes */
++ wlanitem_u32_t frmlen;
++} WLAN_PACKED wlansniffrm_t;
++#define WLANSNIFFFRM 0x0041
++#define WLANSNIFFFRM_hosttime 0x1041
++#define WLANSNIFFFRM_mactime 0x2041
++#define WLANSNIFFFRM_channel 0x3041
++#define WLANSNIFFFRM_rssi 0x4041
++#define WLANSNIFFFRM_sq 0x5041
++#define WLANSNIFFFRM_signal 0x6041
++#define WLANSNIFFFRM_noise 0x7041
++#define WLANSNIFFFRM_rate 0x8041
++#define WLANSNIFFFRM_istx 0x9041
++#define WLANSNIFFFRM_frmlen 0xA041
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_mgmt.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_mgmt.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,582 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/***********************************************************************
++** Constants
++*/
++
++/*-- Information Element IDs --------------------*/
++#define WLAN_EID_SSID 0
++#define WLAN_EID_SUPP_RATES 1
++#define WLAN_EID_FH_PARMS 2
++#define WLAN_EID_DS_PARMS 3
++#define WLAN_EID_CF_PARMS 4
++#define WLAN_EID_TIM 5
++#define WLAN_EID_IBSS_PARMS 6
++#define WLAN_EID_COUNTRY 7 /* 802.11d */
++#define WLAN_EID_FH_HOP_PARMS 8 /* 802.11d */
++#define WLAN_EID_FH_TABLE 9 /* 802.11d */
++#define WLAN_EID_REQUEST 10 /* 802.11d */
++/*-- values 11-15 reserved --*/
++#define WLAN_EID_CHALLENGE 16
++/*-- values 17-31 reserved for challenge text extension --*/
++#define WLAN_EID_PWR_CONSTRAINT 32 /* 11h PowerConstraint */
++#define WLAN_EID_ERP_INFO 42 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_NONERP 47 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_RSN 48
++#define WLAN_EID_EXT_RATES 50
++#define WLAN_EID_UNKNOWN128 128
++#define WLAN_EID_UNKNOWN133 133
++#define WLAN_EID_GENERIC 221 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_UNKNOWN223 223
++
++#if 0
++#define WLAN_EID_PWR_CAP 33 /* 11h PowerCapability */
++#define WLAN_EID_TPC_REQUEST 34 /* 11h TPC Request */
++#define WLAN_EID_TPC_REPORT 35 /* 11h TPC Report */
++#define WLAN_EID_SUPP_CHANNELS 36 /* 11h Supported Channels */
++#define WLAN_EID_CHANNEL_SWITCH 37 /* 11h ChannelSwitch */
++#define WLAN_EID_MEASURE_REQUEST 38 /* 11h MeasurementRequest */
++#define WLAN_EID_MEASURE_REPORT 39 /* 11h MeasurementReport */
++#define WLAN_EID_QUIET_ID 40 /* 11h Quiet */
++#define WLAN_EID_IBSS_DFS_ID 41 /* 11h IBSS_DFS */
++#endif
++
++/*-- Reason Codes -------------------------------*/
++#define WLAN_MGMT_REASON_RSVD 0
++#define WLAN_MGMT_REASON_UNSPEC 1
++#define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2
++#define WLAN_MGMT_REASON_DEAUTH_LEAVING 3
++#define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4
++#define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5
++#define WLAN_MGMT_REASON_CLASS2_NONAUTH 6
++#define WLAN_MGMT_REASON_CLASS3_NONASSOC 7
++#define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8
++#define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9
++
++/*-- Status Codes -------------------------------*/
++#define WLAN_MGMT_STATUS_SUCCESS 0
++#define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1
++#define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10
++#define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12
++#define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13
++#define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14
++#define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15
++#define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18
++/* p80211b additions */
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOSHORT 19
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOPBCC 20
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOAGILITY 21
++
++/*-- Auth Algorithm Field ---------------------------*/
++#define WLAN_AUTH_ALG_OPENSYSTEM 0
++#define WLAN_AUTH_ALG_SHAREDKEY 1
++
++/*-- Management Frame Field Offsets -------------*/
++/* Note: Not all fields are listed because of variable lengths */
++/* Note: These offsets are from the start of the frame data */
++
++#define WLAN_BEACON_OFF_TS 0
++#define WLAN_BEACON_OFF_BCN_INT 8
++#define WLAN_BEACON_OFF_CAPINFO 10
++#define WLAN_BEACON_OFF_SSID 12
++
++#define WLAN_DISASSOC_OFF_REASON 0
++
++#define WLAN_ASSOCREQ_OFF_CAP_INFO 0
++#define WLAN_ASSOCREQ_OFF_LISTEN_INT 2
++#define WLAN_ASSOCREQ_OFF_SSID 4
++
++#define WLAN_ASSOCRESP_OFF_CAP_INFO 0
++#define WLAN_ASSOCRESP_OFF_STATUS 2
++#define WLAN_ASSOCRESP_OFF_AID 4
++#define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
++
++#define WLAN_REASSOCREQ_OFF_CAP_INFO 0
++#define WLAN_REASSOCREQ_OFF_LISTEN_INT 2
++#define WLAN_REASSOCREQ_OFF_CURR_AP 4
++#define WLAN_REASSOCREQ_OFF_SSID 10
++
++#define WLAN_REASSOCRESP_OFF_CAP_INFO 0
++#define WLAN_REASSOCRESP_OFF_STATUS 2
++#define WLAN_REASSOCRESP_OFF_AID 4
++#define WLAN_REASSOCRESP_OFF_SUPP_RATES 6
++
++#define WLAN_PROBEREQ_OFF_SSID 0
++
++#define WLAN_PROBERESP_OFF_TS 0
++#define WLAN_PROBERESP_OFF_BCN_INT 8
++#define WLAN_PROBERESP_OFF_CAP_INFO 10
++#define WLAN_PROBERESP_OFF_SSID 12
++
++#define WLAN_AUTHEN_OFF_AUTH_ALG 0
++#define WLAN_AUTHEN_OFF_AUTH_SEQ 2
++#define WLAN_AUTHEN_OFF_STATUS 4
++#define WLAN_AUTHEN_OFF_CHALLENGE 6
++
++#define WLAN_DEAUTHEN_OFF_REASON 0
++
++enum {
++IEEE16(WF_MGMT_CAP_ESS, 0x0001)
++IEEE16(WF_MGMT_CAP_IBSS, 0x0002)
++/* In (re)assoc request frames by STA:
++** Pollable=0, PollReq=0: STA is not CF-Pollable
++** 0 1: STA is CF-Pollable, not requesting to be placed on the CF-Polling list
++** 1 0: STA is CF-Pollable, requesting to be placed on the CF-Polling list
++** 1 1: STA is CF-Pollable, requesting never to be polled
++** In beacon, proberesp, (re)assoc resp frames by AP:
++** 0 0: No point coordinator at AP
++** 0 1: Point coordinator at AP for delivery only (no polling)
++** 1 0: Point coordinator at AP for delivery and polling
++** 1 1: Reserved */
++IEEE16(WF_MGMT_CAP_CFPOLLABLE, 0x0004)
++IEEE16(WF_MGMT_CAP_CFPOLLREQ, 0x0008)
++/* 1=non-WEP data frames are disallowed */
++IEEE16(WF_MGMT_CAP_PRIVACY, 0x0010)
++/* In beacon, proberesp, (re)assocresp by AP/AdHoc:
++** 1=use of shortpre is allowed ("I can receive shortpre") */
++IEEE16(WF_MGMT_CAP_SHORT, 0x0020)
++IEEE16(WF_MGMT_CAP_PBCC, 0x0040)
++IEEE16(WF_MGMT_CAP_AGILITY, 0x0080)
++/* In (re)assoc request frames by STA:
++** 1=short slot time implemented and enabled
++** NB: AP shall use long slot time beginning at the next Beacon after assoc
++** of STA with this bit set to 0
++** In beacon, proberesp, (re)assoc resp frames by AP:
++** currently used slot time value: 0/1 - long/short */
++IEEE16(WF_MGMT_CAP_SHORTSLOT, 0x0400)
++/* In (re)assoc request frames by STA: 1=CCK-OFDM is implemented and enabled
++** In beacon, proberesp, (re)assoc resp frames by AP/AdHoc:
++** 1=CCK-OFDM is allowed */
++IEEE16(WF_MGMT_CAP_CCKOFDM, 0x2000)
++};
++
++
++/***********************************************************************
++** Types
++*/
++
++/* Information Element types */
++
++/* prototype structure, all IEs start with these members */
++typedef struct wlan_ie {
++ u8 eid;
++ u8 len;
++} WLAN_PACKED wlan_ie_t;
++
++/*-- Service Set Identity (SSID) -----------------*/
++typedef struct wlan_ie_ssid {
++ u8 eid;
++ u8 len;
++ u8 ssid[1]; /* may be zero */
++} WLAN_PACKED wlan_ie_ssid_t;
++
++/*-- Supported Rates -----------------------------*/
++typedef struct wlan_ie_supp_rates {
++ u8 eid;
++ u8 len;
++ u8 rates[1]; /* had better be at LEAST one! */
++} WLAN_PACKED wlan_ie_supp_rates_t;
++
++/*-- FH Parameter Set ----------------------------*/
++typedef struct wlan_ie_fh_parms {
++ u8 eid;
++ u8 len;
++ u16 dwell;
++ u8 hopset;
++ u8 hoppattern;
++ u8 hopindex;
++} WLAN_PACKED wlan_ie_fh_parms_t;
++
++/*-- DS Parameter Set ----------------------------*/
++typedef struct wlan_ie_ds_parms {
++ u8 eid;
++ u8 len;
++ u8 curr_ch;
++} WLAN_PACKED wlan_ie_ds_parms_t;
++
++/*-- CF Parameter Set ----------------------------*/
++typedef struct wlan_ie_cf_parms {
++ u8 eid;
++ u8 len;
++ u8 cfp_cnt;
++ u8 cfp_period;
++ u16 cfp_maxdur;
++ u16 cfp_durremaining;
++} WLAN_PACKED wlan_ie_cf_parms_t;
++
++/*-- TIM ------------------------------------------*/
++typedef struct wlan_ie_tim {
++ u8 eid;
++ u8 len;
++ u8 dtim_cnt;
++ u8 dtim_period;
++ u8 bitmap_ctl;
++ u8 virt_bm[1];
++} WLAN_PACKED wlan_ie_tim_t;
++
++/*-- IBSS Parameter Set ---------------------------*/
++typedef struct wlan_ie_ibss_parms {
++ u8 eid;
++ u8 len;
++ u16 atim_win;
++} WLAN_PACKED wlan_ie_ibss_parms_t;
++
++/*-- Challenge Text ------------------------------*/
++typedef struct wlan_ie_challenge {
++ u8 eid;
++ u8 len;
++ u8 challenge[1];
++} WLAN_PACKED wlan_ie_challenge_t;
++
++/*-- ERP (42) -------------------------------------*/
++typedef struct wlan_ie_erp {
++ u8 eid;
++ u8 len;
++ /* bit 0:Non ERP present
++ ** 1:Use Protection
++ ** 2:Barker Preamble mode
++ ** 3-7:reserved */
++ u8 erp;
++} WLAN_PACKED wlan_ie_erp_t;
++
++/* Types for parsing mgmt frames */
++
++/* prototype structure, all mgmt frame types will start with these members */
++typedef struct wlan_fr_mgmt {
++ u16 type;
++ u16 len; /* DOES NOT include FCS */
++ wlan_hdr_t *hdr;
++ /* used for target specific data, skb in Linux */
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++} WLAN_PACKED wlan_fr_mgmt_t;
++
++/*-- Beacon ---------------------------------------*/
++typedef struct wlan_fr_beacon {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u64 *ts;
++ u16 *bcn_int;
++ u16 *cap_info;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++ wlan_ie_fh_parms_t *fh_parms;
++ wlan_ie_ds_parms_t *ds_parms;
++ wlan_ie_cf_parms_t *cf_parms;
++ wlan_ie_ibss_parms_t *ibss_parms;
++ wlan_ie_tim_t *tim; /* in beacon only, not proberesp */
++ wlan_ie_erp_t *erp; /* in beacon only, not proberesp */
++} wlan_fr_beacon_t;
++#define wlan_fr_proberesp wlan_fr_beacon
++#define wlan_fr_proberesp_t wlan_fr_beacon_t
++
++/*-- IBSS ATIM ------------------------------------*/
++typedef struct wlan_fr_ibssatim {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++ /* this frame type has a null body */
++} wlan_fr_ibssatim_t;
++
++/*-- Disassociation -------------------------------*/
++typedef struct wlan_fr_disassoc {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *reason;
++ /*-- info elements ----------*/
++} wlan_fr_disassoc_t;
++
++/*-- Association Request --------------------------*/
++typedef struct wlan_fr_assocreq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *listen_int;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_assocreq_t;
++
++/*-- Association Response -------------------------*/
++typedef struct wlan_fr_assocresp {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *status;
++ u16 *aid;
++ /*-- info elements ----------*/
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_assocresp_t;
++
++/*-- Reassociation Request ------------------------*/
++typedef struct wlan_fr_reassocreq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *listen_int;
++ u8 *curr_ap;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_reassocreq_t;
++
++/*-- Reassociation Response -----------------------*/
++typedef struct wlan_fr_reassocresp {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *status;
++ u16 *aid;
++ /*-- info elements ----------*/
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_reassocresp_t;
++
++/*-- Probe Request --------------------------------*/
++typedef struct wlan_fr_probereq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_probereq_t;
++
++/*-- Authentication -------------------------------*/
++typedef struct wlan_fr_authen {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *auth_alg;
++ u16 *auth_seq;
++ u16 *status;
++ /*-- info elements ----------*/
++ wlan_ie_challenge_t *challenge;
++} wlan_fr_authen_t;
++
++/*-- Deauthenication -----------------------------*/
++typedef struct wlan_fr_deauthen {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *reason;
++ /*-- info elements ----------*/
++} wlan_fr_deauthen_t;
++
++/* Types for building mgmt frames */
++
++/* Warning. Several types used in below structs are
++** in fact variable length. Use structs with such fields with caution */
++typedef struct auth_frame_body {
++ u16 auth_alg;
++ u16 auth_seq;
++ u16 status;
++ wlan_ie_challenge_t challenge;
++} WLAN_PACKED auth_frame_body_t;
++
++typedef struct assocresp_frame_body {
++ u16 cap_info;
++ u16 status;
++ u16 aid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED assocresp_frame_body_t;
++
++typedef struct reassocreq_frame_body {
++ u16 cap_info;
++ u16 listen_int;
++ u8 current_ap[ETH_ALEN];
++ wlan_ie_ssid_t ssid;
++/* access to this one is disabled since ssid_t is variable length: */
++ /* wlan_ie_supp_rates_t rates; */
++} WLAN_PACKED reassocreq_frame_body_t;
++
++typedef struct reassocresp_frame_body {
++ u16 cap_info;
++ u16 status;
++ u16 aid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED reassocresp_frame_body_t;
++
++typedef struct deauthen_frame_body {
++ u16 reason;
++} WLAN_PACKED deauthen_frame_body_t;
++
++typedef struct disassoc_frame_body {
++ u16 reason;
++} WLAN_PACKED disassoc_frame_body_t;
++
++typedef struct probereq_frame_body {
++ wlan_ie_ssid_t ssid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED probereq_frame_body_t;
++
++typedef struct proberesp_frame_body {
++ u8 timestamp[8];
++ u16 beacon_int;
++ u16 cap_info;
++ wlan_ie_ssid_t ssid;
++/* access to these is disabled since ssid_t is variable length: */
++ /* wlan_ie_supp_rates_t rates; */
++ /* fhps_t fhps; */
++ /* dsps_t dsps; */
++ /* cfps_t cfps; */
++} WLAN_PACKED proberesp_frame_body_t;
++
++
++/***********************************************************************
++** Functions
++*/
++
++/* Helpers for parsing mgmt frames */
++void wlan_mgmt_decode_ibssatim(wlan_fr_ibssatim_t *f);
++void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
++void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
++void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
++void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
++void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
++void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
++void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
++void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
++void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
++void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
++
++/* Helpers for building mgmt frames */
++static inline u8*
++wlan_fill_ie_ssid(u8 *p, int len, const char *ssid)
++{
++ struct wlan_ie_ssid *ie = (void*)p;
++ ie->eid = WLAN_EID_SSID;
++ ie->len = len;
++ memcpy(ie->ssid, ssid, len);
++ return p + len + 2;
++}
++/* This controls whether we create 802.11g 'ext supported rates' IEs
++** or just create overlong 'supported rates' IEs instead
++** (non-11g compliant) */
++#define WE_OBEY_802_11G 1
++static inline u8*
++wlan_fill_ie_rates(u8 *p, int len, const u8 *rates)
++{
++ struct wlan_ie_supp_rates *ie = (void*)p;
++#if WE_OBEY_802_11G
++ if (len > 8 ) len = 8;
++#endif
++ /* supported rates (1 to 8 octets) */
++ ie->eid = WLAN_EID_SUPP_RATES;
++ ie->len = len;
++ memcpy(ie->rates, rates, len);
++ return p + len + 2;
++}
++/* This one wouldn't create an IE at all if not needed */
++static inline u8*
++wlan_fill_ie_rates_ext(u8 *p, int len, const u8 *rates)
++{
++ struct wlan_ie_supp_rates *ie = (void*)p;
++#if !WE_OBEY_802_11G
++ return p;
++#endif
++ len -= 8;
++ if (len <= 0) return p;
++ /* ext supported rates */
++ ie->eid = WLAN_EID_EXT_RATES;
++ ie->len = len;
++ memcpy(ie->rates, rates+8, len);
++ return p + len + 2;
++}
++static inline u8*
++wlan_fill_ie_ds_parms(u8 *p, int channel)
++{
++ struct wlan_ie_ds_parms *ie = (void*)p;
++ ie->eid = WLAN_EID_DS_PARMS;
++ ie->len = 1;
++ ie->curr_ch = channel;
++ return p + sizeof(*ie);
++}
++static inline u8*
++wlan_fill_ie_ibss_parms(u8 *p, int atim_win)
++{
++ struct wlan_ie_ibss_parms *ie = (void*)p;
++ ie->eid = WLAN_EID_IBSS_PARMS;
++ ie->len = 2;
++ ie->atim_win = atim_win;
++ return p + sizeof(*ie);
++}
++static inline u8*
++wlan_fill_ie_tim(u8 *p, int rem, int period, int bcast,
++ int ofs, int len, const u8 *vbm)
++{
++ struct wlan_ie_tim *ie = (void*)p;
++ ie->eid = WLAN_EID_TIM;
++ ie->len = len + 3;
++ ie->dtim_cnt = rem;
++ ie->dtim_period = period;
++ ie->bitmap_ctl = ofs | (bcast!=0);
++ if (vbm)
++ memcpy(ie->virt_bm, vbm, len); /* min 1 byte */
++ else
++ ie->virt_bm[0] = 0;
++ return p + len + 3 + 2;
++}
+Index: linux-2.6.23/drivers/net/wireless/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/net/wireless/Kconfig 2008-01-20 21:13:17.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/Kconfig 2008-01-20 21:15:12.000000000 +0000
+@@ -5,6 +5,36 @@
+ menu "Wireless LAN"
+ depends on !S390
+
++config NET_RADIO
++ bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
++ select WIRELESS_EXT
++ ---help---
++ Support for wireless LANs and everything having to do with radio,
++ but not with amateur radio or FM broadcasting.
++
++ Saying Y here also enables the Wireless Extensions (creates
++ /proc/net/wireless and enables iwconfig access). The Wireless
++ Extension is a generic API allowing a driver to expose to the user
++ space configuration and statistics specific to common Wireless LANs.
++ The beauty of it is that a single set of tool can support all the
++ variations of Wireless LANs, regardless of their type (as long as
++ the driver supports Wireless Extension). Another advantage is that
++ these parameters may be changed on the fly without restarting the
++ driver (or Linux). If you wish to use Wireless Extensions with
++ wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch
++ the tools from
++ <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
++
++config NET_WIRELESS_RTNETLINK
++ bool "Wireless Extension API over RtNetlink"
++ depends on NET_RADIO
++ ---help---
++ Support the Wireless Extension API over the RtNetlink socket
++ in addition to the traditional ioctl interface (selected above).
++
++ For now, few tools use this facility, but it might grow in the
++ future. The only downside is that it adds 4.5 kB to your kernel.
++
+ config WLAN_PRE80211
+ bool "Wireless LAN (pre-802.11)"
+ depends on NETDEVICES
+@@ -650,6 +680,7 @@ config P54_PCI
+
+ source "drivers/net/wireless/iwlwifi/Kconfig"
+ source "drivers/net/wireless/hostap/Kconfig"
++source "drivers/net/wireless/acx/Kconfig"
+ source "drivers/net/wireless/bcm43xx/Kconfig"
+ source "drivers/net/wireless/b43/Kconfig"
+ source "drivers/net/wireless/b43legacy/Kconfig"
+Index: linux-2.6.23/drivers/net/wireless/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/net/wireless/Makefile 2008-01-20 21:13:17.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/Makefile 2008-01-20 21:13:40.000000000 +0000
+@@ -34,6 +34,8 @@ obj-$(CONFIG_PCMCIA_ATMEL) += atmel
+
+ obj-$(CONFIG_PRISM54) += prism54/
+
++obj-$(CONFIG_ACX) += acx/
++
+ obj-$(CONFIG_HOSTAP) += hostap/
+ obj-$(CONFIG_BCM43XX) += bcm43xx/
+ obj-$(CONFIG_B43) += b43/
diff --git a/recipes/linux/linux-kexecboot-2.6.24/htcuni.patch b/recipes/linux/linux-kexecboot-2.6.24/htcuni.patch
new file mode 100644
index 0000000000..8448c4ec06
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/htcuni.patch
@@ -0,0 +1,7920 @@
+---
+ arch/arm/Kconfig | 2
+ arch/arm/mach-pxa/Kconfig | 89 +
+ arch/arm/mach-pxa/Makefile | 1
+ arch/arm/mach-pxa/generic.c | 13
+ arch/arm/mach-pxa/htcuniversal/Makefile | 19
+ arch/arm/mach-pxa/htcuniversal/htcuniversal.c | 468 +++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c | 917 +++++++++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h | 65
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c | 143 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c | 61
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c | 135 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h | 17
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c | 87 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c | 226 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c | 212 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c | 167 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h | 16
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c | 69
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c | 97 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c | 490 ++++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c | 71
+ arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h | 20
+ drivers/input/keyboard/Kconfig | 7
+ drivers/input/keyboard/Makefile | 1
+ drivers/input/keyboard/asic3_keys.c | 131 +
+ drivers/leds/Kconfig | 7
+ drivers/leds/Makefile | 1
+ drivers/leds/leds-asic3.c | 189 ++
+ drivers/mfd/Kconfig | 10
+ drivers/mfd/Makefile | 2
+ drivers/mfd/asic3_base.c | 1208 +++++++++++++++
+ drivers/mfd/soc-core.c | 106 +
+ drivers/mfd/soc-core.h | 30
+ drivers/mmc/host/Kconfig | 6
+ drivers/mmc/host/Makefile | 1
+ drivers/mmc/host/asic3_mmc.c | 900 +++++++++++
+ drivers/mmc/host/asic3_mmc.h | 25
+ drivers/serial/pxa.c | 22
+ include/asm-arm/arch-pxa/clock.h | 27
+ include/asm-arm/arch-pxa/htcuniversal-asic.h | 213 ++
+ include/asm-arm/arch-pxa/htcuniversal-gpio.h | 220 ++
+ include/asm-arm/arch-pxa/htcuniversal-init.h | 14
+ include/asm-arm/arch-pxa/htcuniversal.h | 3
+ include/asm-arm/arch-pxa/irqs.h | 2
+ include/asm-arm/arch-pxa/pxa-pm_ll.h | 6
+ include/asm-arm/arch-pxa/pxa-regs.h | 2
+ include/asm-arm/arch-pxa/serial.h | 78
+ include/asm-arm/hardware/asic3_keys.h | 18
+ include/asm-arm/hardware/asic3_leds.h | 34
+ include/asm-arm/hardware/ipaq-asic3.h | 602 +++++++
+ include/linux/backlight.h | 7
+ include/linux/gpiodev.h | 44
+ include/linux/input_pda.h | 47
+ include/linux/ioport.h | 1
+ include/linux/soc/asic3_base.h | 104 +
+ include/linux/soc/tmio_mmc.h | 17
+ 56 files changed, 7469 insertions(+), 1 deletion(-)
+
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,19 @@
++#
++# Makefile for HTC Universal
++#
++
++snd-htcuniversal-ak4641-objs := htcuniversal_ak4641.o
++
++obj-$(CONFIG_MACH_HTCUNIVERSAL) += htcuniversal.o
++obj-$(CONFIG_HTCUNIVERSAL_CORE) += htcuniversal_core.o
++obj-$(CONFIG_HTCUNIVERSAL_POWER) += htcuniversal_power2.o
++obj-$(CONFIG_HTCUNIVERSAL_LCD) += htcuniversal_lcd.o
++obj-$(CONFIG_HTCUNIVERSAL_BACKLIGHT) += htcuniversal_bl.o
++obj-$(CONFIG_HTCUNIVERSAL_TS2) += htcuniversal_ts2.o
++obj-$(CONFIG_HTCUNIVERSAL_BUTTONS) += htcuniversal_buttons.o
++obj-$(CONFIG_HTCUNIVERSAL_BLUETOOTH) += htcuniversal_bt.o
++obj-$(CONFIG_HTCUNIVERSAL_PHONE) += htcuniversal_phone.o
++obj-$(CONFIG_HTCUNIVERSAL_ASIC3_LEDS) += htcuniversal_asic3_leds.o
++obj-$(CONFIG_HTCUNIVERSAL_UDC) += htcuniversal_udc.o
++
++obj-$(CONFIG_HTCUNIVERSAL_AK4641) += htcuniversal_ak4641.o
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,468 @@
++/*
++ * Hardware definitions for HTC Universal
++ *
++ * Copyright (c) 2006 Oleg Gusev
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/input.h>
++#include <linux/gpio_keys.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/setup.h>
++
++#include <asm/mach/irq.h>
++#include <asm/mach/arch.h>
++
++#include <asm/arch/bitfield.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/serial.h>
++#include <asm/arch/pxa27x_keyboard.h>
++#include <asm/arch/pxafb.h>
++#include <asm/arch/irda.h>
++#include <asm/arch/ohci.h>
++
++#include <asm/arch/htcuniversal.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-init.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++
++#include "../generic.h"
++
++#include "htcuniversal_bt.h"
++#include "htcuniversal_phone.h"
++#include "tsc2046_ts.h"
++
++/*
++ * IRDA
++ */
++
++static void htcuniversal_irda_transceiver_mode(struct device *dev, int mode)
++{
++ /* */
++}
++
++static struct pxaficp_platform_data htcuniversal_ficp_platform_data = {
++ .transceiver_cap = IR_SIRMODE | IR_FIRMODE,
++ .transceiver_mode = htcuniversal_irda_transceiver_mode,
++};
++
++/*
++ * Bluetooth - Relies on other loadable modules, like ASIC3 and Core,
++ * so make the calls indirectly through pointers. Requires that the
++ * htcuniversal_bt module be loaded before any attempt to use
++ * bluetooth (obviously).
++ */
++
++static struct htcuniversal_bt_funcs bt_funcs;
++
++static void
++htcuniversal_bt_configure( int state )
++{
++ if (bt_funcs.configure != NULL)
++ bt_funcs.configure( state );
++}
++
++static struct htcuniversal_phone_funcs phone_funcs;
++
++static void
++htcuniversal_phone_configure( int state )
++{
++ if (phone_funcs.configure != NULL)
++ phone_funcs.configure( state );
++}
++
++//void htcuniversal_ll_pm_init(void);
++
++extern struct platform_device htcuniversal_bl;
++static struct platform_device htcuniversal_lcd = { .name = "htcuniversal_lcd", };
++//static struct platform_device htcuniversal_kbd = { .name = "htcuniversal_kbd", };
++static struct platform_device htcuniversal_buttons = { .name = "htcuniversal_buttons", };
++//static struct platform_device htcuniversal_ts = { .name = "htcuniversal_ts", };
++//static struct platform_device htcuniversal_bt = { .name = "htcuniversal_bt", };
++//static struct platform_device htcuniversal_phone = { .name = "htcuniversal_phone", };
++static struct platform_device htcuniversal_power = { .name = "htcuniversal_power", };
++static struct platform_device htcuniversal_udc = { .name = "htcuniversal_udc", };
++
++static struct tsc2046_mach_info htcuniversal_ts_platform_data = {
++ .port = 1,
++ .clock = CKEN_SSP1,
++ .pwrbit_X = 1,
++ .pwrbit_Y = 1,
++ .irq = 0 /* asic3 irq */
++};
++
++static struct platform_device htcuniversal_ts = {
++ .name = "htcuniversal_ts",
++ .dev = {
++ .platform_data = &htcuniversal_ts_platform_data,
++ },
++};
++
++
++/* Bluetooth */
++
++static struct platform_device htcuniversal_bt = {
++ .name = "htcuniversal_bt",
++ .id = -1,
++ .dev = {
++ .platform_data = &bt_funcs,
++ },
++};
++
++static struct platform_device htcuniversal_phone = {
++ .name = "htcuniversal_phone",
++ .id = -1,
++ .dev = {
++ .platform_data = &phone_funcs,
++ },
++};
++
++/* PXA2xx Keys */
++
++static struct gpio_keys_button htcuniversal_button_table[] = {
++ { KEY_POWER, GPIO_NR_HTCUNIVERSAL_KEY_ON_N, 1 },
++};
++
++static struct gpio_keys_platform_data htcuniversal_pxa_keys_data = {
++ .buttons = htcuniversal_button_table,
++ .nbuttons = ARRAY_SIZE(htcuniversal_button_table),
++};
++
++static struct platform_device htcuniversal_pxa_keys = {
++ .name = "gpio-keys",
++ .dev = {
++ .platform_data = &htcuniversal_pxa_keys_data,
++ },
++ .id = -1,
++};
++
++/****************************************************************
++ * Keyboard
++ ****************************************************************/
++
++static struct pxa27x_keyboard_platform_data htcuniversal_kbd = {
++ .nr_rows = 8,
++ .nr_cols = 8,
++ .keycodes = {
++ {
++ /* row 0 */
++ KEY_ENTER,
++ KEY_MINUS,
++ KEY_ESC,
++ KEY_1,
++ KEY_TAB,
++ KEY_CAPSLOCK,
++ KEY_LEFTSHIFT,
++ KEY_RIGHTALT, /* Fn */
++ }, { /* row 1 */
++ KEY_COMMA,
++ KEY_EQUAL,
++ KEY_F1,
++ KEY_2,
++ KEY_Q,
++ KEY_A,
++ KEY_Z,
++ KEY_LEFTCTRL,
++ }, { /* row 2 */
++ KEY_UP,
++ KEY_I,
++ KEY_F2,
++ KEY_3,
++ KEY_W,
++ KEY_S,
++ KEY_X,
++ KEY_F6,
++ }, { /* row 3 */
++ KEY_DOT,
++ KEY_O,
++ KEY_F3,
++ KEY_4,
++ KEY_E,
++ KEY_D,
++ KEY_C,
++ KEY_LEFTALT,
++ }, { /* row 4 */
++ KEY_F9,
++ KEY_P,
++ KEY_F4,
++ KEY_5,
++ KEY_R,
++ KEY_F,
++ KEY_V,
++ KEY_SPACE,
++ }, { /* row 5 */
++ KEY_RIGHT,
++ KEY_BACKSPACE,
++ KEY_F5,
++ KEY_6,
++ KEY_T,
++ KEY_G,
++ KEY_B,
++ KEY_F7,
++ }, { /* row 6 */
++ KEY_F9,
++ KEY_K,
++ KEY_9,
++ KEY_7,
++ KEY_Y,
++ KEY_H,
++ KEY_N,
++ KEY_LEFT,
++ }, { /* row 7 */
++ KEY_F10,
++ KEY_L,
++ KEY_0,
++ KEY_8,
++ KEY_U,
++ KEY_J,
++ KEY_M,
++ KEY_DOWN,
++ },
++ },
++ .gpio_modes = {
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN0_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN1_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN2_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN3_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN4_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN5_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN6_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN7_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT0_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT1_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT2_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT3_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT4_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT5_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT6_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT7_MD,
++ },
++};
++
++static struct platform_device htcuniversal_pxa_keyboard = {
++ .name = "pxa27x-keyboard",
++ .id = -1,
++ .dev = {
++ .platform_data = &htcuniversal_kbd,
++ },
++};
++/* Core Hardware Functions */
++
++struct platform_device htcuniversal_core = {
++ .name = "htcuniversal_core",
++ .id = 0,
++ .dev = {
++ .platform_data = NULL,
++ },
++};
++
++static struct platform_device *devices[] __initdata = {
++ &htcuniversal_core,
++// &htcuniversal_flash,
++ &htcuniversal_pxa_keyboard,
++ &htcuniversal_pxa_keys,
++};
++
++static struct platform_device *htcuniversal_asic3_devices[] __initdata = {
++ &htcuniversal_lcd,
++#ifdef CONFIG_HTCUNIVERSAL_BACKLIGHT
++ &htcuniversal_bl,
++#endif
++ &htcuniversal_buttons,
++ &htcuniversal_ts,
++ &htcuniversal_bt,
++ &htcuniversal_phone,
++ &htcuniversal_power,
++ &htcuniversal_udc,
++};
++
++static struct asic3_platform_data htcuniversal_asic3_platform_data = {
++
++ /* Setting ASIC3 GPIO registers to the below initialization states
++ * HTC Universal asic3 information:
++ * http://wiki.xda-developers.com/index.php?pagename=UniversalASIC3
++ * http://wiki.xda-developers.com/index.php?pagename=ASIC3
++ *
++ * dir: Direction of the GPIO pin. 0: input, 1: output.
++ * If unknown, set as output to avoid power consuming floating input nodes
++ * init: Initial state of the GPIO bits
++ *
++ * These registers are configured as they are on Wince.
++ */
++ .gpio_a = {
++ .dir = (1<<GPIOA_LCD_PWR5_ON) |
++ (1<<GPIOA_FLASHLIGHT) |
++ (1<<GPIOA_UNKNOWN9) |
++ (1<<GPIOA_SPK_PWR2_ON) |
++ (1<<GPIOA_UNKNOWN4) |
++ (1<<GPIOA_EARPHONE_PWR_ON)|
++ (1<<GPIOA_AUDIO_PWR_ON) |
++ (1<<GPIOA_SPK_PWR1_ON) |
++ (1<<GPIOA_I2C_EN),
++ .init = (1<<GPIOA_LCD_PWR5_ON) |
++ (1<<GPIOA_I2C_EN),
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x000c,
++ },
++ .gpio_b = {
++ .dir = 0xc142,
++ .init = 0x8842, // TODO: 0x0900
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x000c,
++ },
++ .gpio_c = {
++ .dir = 0xc7e7,
++ .init = 0xc6e0, // TODO: 0x8000
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0007, // GPIOC_LED_RED | GPIOC_LED_GREEN | GPIOC_LED_BLUE
++ .sleep_conf = 0x000c,
++ },
++ .gpio_d = {
++ .dir = 0xffc0,
++ .init = 0x7840, // TODO: 0x0000
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x0008,
++ },
++ .bus_shift = 1,
++ .irq_base = HTCUNIVERSAL_ASIC3_IRQ_BASE,
++
++ .child_platform_devs = htcuniversal_asic3_devices,
++ .num_child_platform_devs = ARRAY_SIZE(htcuniversal_asic3_devices),
++};
++
++static struct resource htcuniversal_asic3_resources[] = {
++ [0] = {
++ .start = HTCUNIVERSAL_ASIC3_GPIO_PHYS,
++ .end = HTCUNIVERSAL_ASIC3_GPIO_PHYS + IPAQ_ASIC3_MAP_SIZE,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = HTCUNIVERSAL_IRQ(ASIC3_EXT_INT),
++ .end = HTCUNIVERSAL_IRQ(ASIC3_EXT_INT),
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = HTCUNIVERSAL_ASIC3_MMC_PHYS,
++ .end = HTCUNIVERSAL_ASIC3_MMC_PHYS + IPAQ_ASIC3_MAP_SIZE,
++ .flags = IORESOURCE_MEM,
++ },
++ [3] = {
++ .start = HTCUNIVERSAL_IRQ(ASIC3_SDIO_INT_N),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device htcuniversal_asic3 = {
++ .name = "asic3",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(htcuniversal_asic3_resources),
++ .resource = htcuniversal_asic3_resources,
++ .dev = { .platform_data = &htcuniversal_asic3_platform_data, },
++};
++EXPORT_SYMBOL(htcuniversal_asic3);
++
++static struct pxafb_mode_info htcuniversal_lcd_modes[] = {
++{
++ .pixclock = 96153,
++ .xres = 480,
++ .yres = 640,
++ .bpp = 16,
++ .hsync_len = 4,
++ .vsync_len = 1,
++ .left_margin = 20,
++ .right_margin = 8,
++ .upper_margin = 7,
++ .lower_margin = 8,
++
++// .sync = FB_SYNC_HOR_LOW_ACT|FB_SYNC_VERT_LOW_ACT,
++
++},
++};
++
++static struct pxafb_mach_info sony_acx526akm = {
++ .modes = htcuniversal_lcd_modes,
++ .num_modes = ARRAY_SIZE(htcuniversal_lcd_modes),
++
++ /* fixme: use constants defined in pxafb.h */
++ .lccr0 = 0x00000080,
++ .lccr3 = 0x00400000,
++// .lccr4 = 0x80000000,
++};
++
++static void __init htcuniversal_init_irq(void)
++{
++ pxa27x_init_irq();
++}
++
++static struct platform_pxa_serial_funcs htcuniversal_pxa_bt_funcs = {
++ .configure = htcuniversal_bt_configure,
++};
++static struct platform_pxa_serial_funcs htcuniversal_pxa_phone_funcs = {
++ .configure = htcuniversal_phone_configure,
++};
++
++/* USB OHCI */
++
++static int htcuniversal_ohci_init(struct device *dev)
++{
++ /* missing GPIO setup here */
++
++ /* got the value from wince */
++ UHCHR=UHCHR_CGR;
++
++ return 0;
++}
++
++static struct pxaohci_platform_data htcuniversal_ohci_platform_data = {
++ .port_mode = PMM_PERPORT_MODE,
++ .init = htcuniversal_ohci_init,
++};
++
++static void __init htcuniversal_map_io(void)
++{
++ pxa_map_io();
++
++ pxa_set_btuart_info(&htcuniversal_pxa_bt_funcs);
++ pxa_set_ffuart_info(&htcuniversal_pxa_phone_funcs);
++}
++
++static void __init htcuniversal_init(void)
++{
++ set_pxa_fb_info(&sony_acx526akm);
++
++ platform_device_register(&htcuniversal_asic3);
++ platform_add_devices(devices, ARRAY_SIZE(devices) );
++ pxa_set_ficp_info(&htcuniversal_ficp_platform_data);
++ pxa_set_ohci_info(&htcuniversal_ohci_platform_data);
++}
++
++MACHINE_START(HTCUNIVERSAL, "HTC Universal")
++ /* Maintainer xanadux.org */
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .boot_params = 0xa0000100,
++ .map_io = htcuniversal_map_io,
++ .init_irq = htcuniversal_init_irq,
++ .init_machine = htcuniversal_init,
++ .timer = &pxa_timer,
++MACHINE_END
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,917 @@
++/*
++ * Audio support for codec Asahi Kasei AK4641
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Copyright (c) 2006 Giorgio Padrin <giorgio@mandarinlogiq.org>
++ *
++ * History:
++ *
++ * 2006-03 Written -- Giorgio Padrin
++ * 2006-09 Test and debug on machine (HP hx4700) -- Elshin Roman <roxmail@list.ru>
++ *
++ * AK4641 codec device driver
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * Based on code:
++ * Copyright (c) 2002 Hewlett-Packard Company
++ * Copyright (c) 2000 Nicolas Pitre <nico@cam.org>
++ * Copyright (c) 2000 Lernout & Hauspie Speech Products, N.V.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License.
++ */
++
++#include <sound/driver.h>
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/string.h>
++#include <linux/slab.h>
++#include <linux/errno.h>
++#include <linux/ioctl.h>
++#include <linux/delay.h>
++#include <linux/i2c.h>
++
++#include <sound/core.h>
++#include <sound/control.h>
++#include <sound/initval.h>
++#include <sound/info.h>
++
++#include "htcuniversal_ak4641.h"
++
++/* Registers */
++#define R_PM1 0x00
++#define R_PM2 0x01
++#define R_SEL1 0x02
++#define R_SEL2 0x03
++#define R_MODE1 0x04
++#define R_MODE2 0x05
++#define R_DAC 0x06
++#define R_MIC 0x07
++#define REG_TIMER 0x08
++#define REG_ALC1 0x09
++#define REG_ALC2 0x0a
++#define R_PGA 0x0b
++#define R_ATTL 0x0c
++#define R_ATTR 0x0d
++#define REG_VOL 0x0e
++#define R_STATUS 0x0f
++#define REG_EQLO 0x10
++#define REG_EQMID 0x11
++#define REG_EQHI 0x12
++#define REG_BTIF 0x13
++
++/* Register flags */
++/* REG_PWR1 */
++#define R_PM1_PMADC 0x01
++#define R_PM1_PMMIC 0x02
++#define REG_PWR1_PMAUX 0x04
++#define REG_PWR1_PMMO 0x08
++#define R_PM1_PMLO 0x10
++/* unused 0x20 */
++/* unused 0x40 */
++#define R_PM1_PMVCM 0x80
++
++/* REG_PWR2 */
++#define R_PM2_PMDAC 0x01
++/* unused 0x02 */
++/* unused 0x04 */
++#define R_PM2_PMMO2 0x08
++#define REG_PWR2_MCKAC 0x10
++/* unused 0x20 */
++/* unused 0x40 */
++#define R_PM2_MCKPD 0x80
++
++/* REG_SEL1 */
++#define R_SEL1_PSMO2 0x01
++/* unused 0x02 */
++/* unused 0x04 */
++/* unused 0x08 */
++#define REG_SEL1_MICM 0x10
++#define REG_SEL1_DACM 0x20
++#define REG_SEL1_PSMO 0x40
++#define REG_SEL1_MOGN 0x80
++
++/* REG_SEL2 */
++#define R_SEL2_PSLOR 0x01
++#define R_SEL2_PSLOL 0x02
++#define REG_SEL2_AUXSI 0x04
++/* unused 0x08 */
++#define REG_SEL2_MICL 0x10
++#define REG_SEL2_AUXL 0x20
++/* unused 0x40 */
++#define R_SEL2_DACL 0x80
++
++/* REG_MODE1 */
++#define REG_MODE1_DIF0 0x01
++#define REG_MODE1_DIF1 0x02
++/* unused 0x04 */
++/* unused 0x08 */
++/* unused 0x10 */
++/* unused 0x20 */
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_MODE2 */
++/* unused 0x01 */
++#define REG_MODE2_LOOP 0x02
++#define REG_MODE2_HPM 0x04
++/* unused 0x08 */
++/* unused 0x10 */
++#define REG_MODE2_MCK0 0x20
++#define REG_MODE2_MCK1 0x40
++/* unused 0x80 */
++
++/* REG_DAC */
++#define REG_DAC_DEM0 0x01
++#define REG_DAC_DEM1 0x02
++#define REG_DAC_EQ 0x04
++/* unused 0x08 */
++#define R_DAC_DATTC 0x10
++#define R_DAC_SMUTE 0x20
++#define REG_DAC_TM 0x40
++/* unused 0x80 */
++
++/* REG_MIC */
++#define R_MIC_MGAIN 0x01
++#define R_MIC_MSEL 0x02
++#define R_MIC_MICAD 0x04
++#define R_MIC_MPWRI 0x08
++#define R_MIC_MPWRE 0x10
++#define REG_MIC_AUXAD 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_TIMER */
++
++#define REG_TIMER_LTM0 0x01
++#define REG_TIMER_LTM1 0x02
++#define REG_TIMER_WTM0 0x04
++#define REG_TIMER_WTM1 0x08
++#define REG_TIMER_ZTM0 0x10
++#define REG_TIMER_ZTM1 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++#define REG_ALC1_LMTH 0x01
++#define REG_ALC1_RATT 0x02
++#define REG_ALC1_LMAT0 0x04
++#define REG_ALC1_LMAT1 0x08
++#define REG_ALC1_ZELM 0x10
++#define REG_ALC1_ALC1 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_ALC2 */
++
++/* REG_PGA */
++
++/* REG_ATTL */
++
++/* REG_ATTR */
++
++/* REG_VOL */
++#define REG_VOL_ATTM 0x80
++
++/* REG_STATUS */
++#define R_STATUS_DTMIC 0x01
++
++/* REG_EQ controls use 4 bits for each of 5 EQ levels */
++
++/* Bluetooth not yet implemented */
++#define REG_BTIF_PMAD2 0x01
++#define REG_BTIF_PMDA2 0x02
++#define REG_BTIF_PMBIF 0x04
++#define REG_BTIF_ADC2 0x08
++#define REG_BTIF_DAC2 0x10
++#define REG_BTIF_BTFMT0 0x20
++#define REG_BTIF_BTFMT1 0x40
++/* unused 0x80 */
++
++/* begin {{ I2C }} */
++
++static struct i2c_driver snd_ak4641_i2c_driver = {
++ .driver = {
++ .name = "ak4641-i2c"
++ },
++};
++
++static int snd_ak4641_i2c_init(void)
++{
++ return i2c_add_driver(&snd_ak4641_i2c_driver);
++}
++
++static void snd_ak4641_i2c_free(void)
++{
++ i2c_del_driver(&snd_ak4641_i2c_driver);
++}
++
++static inline int snd_ak4641_i2c_probe(struct snd_ak4641 *ak)
++{
++ if (ak->i2c_client.adapter == NULL) return -EINVAL;
++ ak->i2c_client.addr = 0x12;
++ if (i2c_smbus_xfer(ak->i2c_client.adapter, ak->i2c_client.addr,
++ 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0)
++ return -ENODEV;
++ else return 0;
++}
++
++static int snd_ak4641_i2c_attach(struct snd_ak4641 *ak)
++{
++ int ret = 0;
++ if ((ret = snd_ak4641_i2c_probe(ak)) < 0) return ret;
++ snprintf(ak->i2c_client.name, sizeof(ak->i2c_client.name),
++ "ak4641-i2c at %d-%04x",
++ i2c_adapter_id(ak->i2c_client.adapter), ak->i2c_client.addr);
++ return i2c_attach_client(&ak->i2c_client);
++}
++
++static void snd_ak4641_i2c_detach(struct snd_ak4641 *ak)
++{
++ i2c_detach_client(&ak->i2c_client);
++}
++
++/* end {{ I2C }} */
++
++
++/* begin {{ Registers & Cache Ops }} */
++
++static int snd_ak4641_hwsync(struct snd_ak4641 *ak, int read, u8 reg)
++{
++ struct i2c_msg msgs[2];
++ u8 buf[2];
++ int ret;
++
++ snd_assert(reg < ARRAY_SIZE(ak->regs), return -EINVAL);
++
++ /* setup i2c msgs */
++ msgs[0].addr = ak->i2c_client.addr;
++ msgs[0].flags = 0;
++ msgs[0].buf = buf;
++ if (!read)
++ msgs[0].len = 2;
++ else {
++ msgs[1].flags = I2C_M_RD;
++ msgs[1].addr = msgs[0].addr;
++ msgs[1].buf = msgs[0].buf + 1;
++ msgs[0].len = 1;
++ msgs[1].len = 1;
++ }
++
++ buf[0] = reg;
++
++ /* regs[reg] -> buffer, on write */
++ if (!read) buf[1] = ak->regs[reg];
++
++ /* i2c transfer */
++ ret = i2c_transfer(ak->i2c_client.adapter, msgs, read ? 2 : 1);
++ if (ret != (read ? 2 : 1)) return ret; /* transfer error */ //@@ error ret < 0, or not ?
++
++ /* regs[reg] <- buffer, on read */
++ if (read) ak->regs[reg] = buf[1];
++
++ return 0;
++}
++
++static inline int snd_ak4641_hwsync_read(struct snd_ak4641 *ak, u8 reg)
++{
++ return snd_ak4641_hwsync(ak, 1, reg);
++}
++
++static inline int snd_ak4641_hwsync_write(struct snd_ak4641 *ak, u8 reg)
++{
++ return snd_ak4641_hwsync(ak, 0, reg);
++}
++
++static int snd_ak4641_hwsync_read_all(struct snd_ak4641 *ak)
++{
++ u8 reg;
++ for (reg = 0; reg < ARRAY_SIZE(ak->regs); reg++)
++ if (snd_ak4641_hwsync_read(ak, reg) < 0) return -1;
++ return 0;
++}
++
++static int snd_ak4641_hwsync_write_all(struct snd_ak4641 *ak)
++{
++ u8 reg;
++ for (reg = 0; reg < ARRAY_SIZE(ak->regs); reg++)
++ if (snd_ak4641_hwsync_write(ak, reg) < 0) return -1;
++ return 0;
++}
++
++static int snd_ak4641_reg_changed(struct snd_ak4641 *ak, u8 reg)
++{
++ if ((reg != R_PGA && ak->powered_on) ||
++ (reg == R_PGA && (ak->regs[R_PM1] & R_PM1_PMMIC)))
++ return snd_ak4641_hwsync_write(ak, reg);
++ return 0;
++}
++
++/* end {{ Registers & Cache Ops }}*/
++
++
++static inline void snd_ak4641_lock(struct snd_ak4641 *ak)
++{
++ down(&ak->sem);
++}
++
++static inline void snd_ak4641_unlock(struct snd_ak4641 *ak)
++{
++ up(&ak->sem);
++}
++
++#define WRITE_MASK(i, val, mask) (((i) & ~(mask)) | ((val) & (mask)))
++
++
++/* begin {{ Controls }} */
++
++#define INV_RANGE(val, mask) \
++ (~(val) & (mask))
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_actl_playback_volume_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 2;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 0xff;
++ return 0;
++}
++
++static int snd_ak4641_actl_playback_volume_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ucontrol->value.integer.value[0] = INV_RANGE(ak->regs[R_ATTL], 0xff);
++ ucontrol->value.integer.value[1] = INV_RANGE(ak->regs[R_ATTR], 0xff);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static int snd_ak4641_actl_playback_volume_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ak->regs[R_ATTL] = INV_RANGE(ucontrol->value.integer.value[0], 0xff);
++ ak->regs[R_ATTR] = INV_RANGE(ucontrol->value.integer.value[1], 0xff);
++ snd_ak4641_reg_changed(ak, R_ATTL);
++ snd_ak4641_reg_changed(ak, R_ATTR);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_actl_mic_gain_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 0x7f;
++ return 0;
++}
++
++static int snd_ak4641_actl_mic_gain_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ ucontrol->value.integer.value[0] = ak->regs[R_PGA];
++ return 0;
++}
++
++static int snd_ak4641_actl_mic_gain_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ak->regs[R_PGA] = ucontrol->value.integer.value[0];
++ snd_ak4641_reg_changed(ak, R_PGA);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++#define ACTL(ctl_name, _name) \
++static struct snd_kcontrol_new snd_ak4641_actl_ ## ctl_name = \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = _name, \
++ .info = snd_ak4641_actl_ ## ctl_name ## _info, \
++ .get = snd_ak4641_actl_ ## ctl_name ## _get, .put = snd_ak4641_actl_ ## ctl_name ## _put };
++
++ACTL(playback_volume, "Master Playback Volume")
++ACTL(mic_gain, "Mic Capture Gain")
++
++struct snd_ak4641_uctl_bool {
++ int (*get) (struct snd_ak4641 *uda);
++ int (*set) (struct snd_ak4641 *uda, int on);
++};
++
++static int snd_ak4641_actl_bool_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 1;
++ return 0;
++}
++
++static int snd_ak4641_actl_bool_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++ struct snd_ak4641_uctl_bool *uctl =
++ (struct snd_ak4641_uctl_bool *) kcontrol->private_value;
++
++ ucontrol->value.integer.value[0] = uctl->get(ak);
++ return 0;
++}
++
++static int snd_ak4641_actl_bool_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++ struct snd_ak4641_uctl_bool *uctl =
++ (struct snd_ak4641_uctl_bool *) kcontrol->private_value;
++
++ return uctl->set(ak, ucontrol->value.integer.value[0]);
++}
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_playback_switch_get(struct snd_ak4641 *ak)
++{
++ return (ak->regs[R_DAC] & R_DAC_SMUTE) == 0x00;
++}
++
++static int snd_ak4641_uctl_playback_switch_set(struct snd_ak4641 *ak, int on)
++{
++ snd_ak4641_lock(ak);
++ ak->regs[R_DAC] = WRITE_MASK(ak->regs[R_DAC],
++ on ? 0x00 : R_DAC_SMUTE, R_DAC_SMUTE);
++ snd_ak4641_reg_changed(ak, R_DAC);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_mic_boost_get(struct snd_ak4641 *ak)
++{
++ return (ak->regs[R_MIC] & R_MIC_MGAIN) == R_MIC_MGAIN;
++}
++
++static int snd_ak4641_uctl_mic_boost_set(struct snd_ak4641 *ak, int on)
++{
++ snd_ak4641_lock(ak);
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC],
++ on ? R_MIC_MGAIN : 0x00, R_MIC_MGAIN);
++ snd_ak4641_reg_changed(ak, R_MIC);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_mono_out_get(struct snd_ak4641 *ak)
++{
++ printk("mono_out status 0x%8.8x -> 0x%8.8x\n",ak->regs[R_SEL1], ak->regs[R_SEL1] & REG_SEL1_PSMO);
++ return (ak->regs[R_SEL1] & REG_SEL1_PSMO) == REG_SEL1_PSMO;
++}
++
++static int snd_ak4641_uctl_mono_out_set(struct snd_ak4641 *ak, int on)
++{
++ printk("phone mic enable called. on=%d\n",on);
++ snd_ak4641_lock(ak);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], on ? R_PM1_PMMIC : 0x00, R_PM1_PMMIC);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], on ? REG_PWR1_PMMO : 0x00, REG_PWR1_PMMO);
++ snd_ak4641_reg_changed(ak, R_PM1);
++
++ snd_ak4641_hwsync_write(ak, R_PGA); /* mic PGA gain is reset when PMMIC = 0 */
++
++ /* internal mic */
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], on ? R_MIC_MPWRI : 0x0, R_MIC_MPWRI);
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], 0x0, R_MIC_MSEL);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++
++// ak->regs[REG_BTIF] = WRITE_MASK(ak->regs[REG_BTIF], 0x0, REG_BTIF_DAC2);
++// snd_ak4641_hwsync_write(ak, REG_BTIF);
++ /* */
++// ak->regs[REG_VOL] = WRITE_MASK(ak->regs[REG_VOL], on ? REG_VOL_ATTM : 0x00, REG_VOL_ATTM);
++// ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_MOGN : 0x00, REG_SEL1_MOGN);
++ ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_MICM : 0x00, REG_SEL1_MICM);
++ ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_PSMO : 0x00, REG_SEL1_PSMO);
++ snd_ak4641_reg_changed(ak, R_SEL1);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++#define ACTL_BOOL(ctl_name, _name) \
++static struct snd_ak4641_uctl_bool snd_ak4641_actl_ ## ctl_name ## _pvalue = \
++{ .get = snd_ak4641_uctl_ ## ctl_name ## _get, \
++ .set = snd_ak4641_uctl_ ## ctl_name ## _set }; \
++static struct snd_kcontrol_new snd_ak4641_actl_ ## ctl_name = \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = _name, .info = snd_ak4641_actl_bool_info, \
++ .get = snd_ak4641_actl_bool_get, .put = snd_ak4641_actl_bool_put, \
++ .private_value = (unsigned long) &snd_ak4641_actl_ ## ctl_name ## _pvalue };
++
++ACTL_BOOL(playback_switch, "Master Playback Switch")
++ACTL_BOOL(mic_boost, "Mic Boost (+20dB)")
++ACTL_BOOL(mono_out, "Phone mic enable")
++
++static void snd_ak4641_headphone_on(struct snd_ak4641 *ak, int on);
++static void snd_ak4641_speaker_on(struct snd_ak4641 *ak, int on);
++static void snd_ak4641_select_mic(struct snd_ak4641 *ak);
++
++void snd_ak4641_hp_connected(struct snd_ak4641 *ak, int connected)
++{
++ snd_ak4641_lock(ak);
++ if (connected != ak->hp_connected) {
++ ak->hp_connected = connected;
++
++ /* headphone or speaker, on playback */
++ if (ak->playback_on) {
++ if (connected) {
++ snd_ak4641_headphone_on(ak, 1);
++ snd_ak4641_speaker_on(ak, 0);
++ } else {
++ snd_ak4641_speaker_on(ak, 1);
++ snd_ak4641_headphone_on(ak, 0);
++ }
++ }
++
++ /* headset or internal mic, on capture */
++ if (ak->capture_on)
++ snd_ak4641_select_mic(ak);
++ }
++ snd_ak4641_unlock(ak);
++}
++
++/* end {{ Controls }} */
++
++
++/* begin {{ Headphone Detected Notification }} */
++
++static void snd_ak4641_hp_detected_w_fn(void *p)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *)p;
++
++ snd_ak4641_hp_connected(ak, ak->hp_detected.detected);
++}
++
++void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected)
++{
++ if (detected != ak->hp_detected.detected) {
++ ak->hp_detected.detected = detected;
++ queue_work(ak->hp_detected.wq, &ak->hp_detected.w);
++ }
++}
++
++static int snd_ak4641_hp_detected_init(struct snd_ak4641 *ak)
++{
++ INIT_WORK(&ak->hp_detected.w, snd_ak4641_hp_detected_w_fn);
++ ak->hp_detected.detected = ak->hp_connected;
++ ak->hp_detected.wq = create_singlethread_workqueue("ak4641");
++ if (ak->hp_detected.wq) return 0;
++ else return -1;
++}
++
++static void snd_ak4641_hp_detected_free(struct snd_ak4641 *ak)
++{
++ destroy_workqueue(ak->hp_detected.wq);
++}
++
++/* end {{ Headphone Detected Notification }} */
++
++
++/* begin {{ Codec Control }} */
++
++static void snd_ak4641_headphone_on(struct snd_ak4641 *ak, int on)
++{
++ if (on) {
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ ak->headphone_out_on(1);
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ R_SEL2_PSLOL | R_SEL2_PSLOR,
++ R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ } else {
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ 0x00, R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ ak->headphone_out_on(0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ }
++}
++
++static void snd_ak4641_speaker_on(struct snd_ak4641 *ak, int on)
++{
++ if (on) {
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ ak->speaker_out_on(1);
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ R_SEL2_PSLOL | R_SEL2_PSLOR,
++ R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ } else {
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ 0x00, R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ ak->speaker_out_on(0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ }
++}
++
++static inline int snd_ak4641_power_on(struct snd_ak4641 *ak)
++{
++ ak->reset_pin(1);
++ ak->power_on_chip(1);
++ msleep(1);
++ ak->reset_pin(0);
++ ak->powered_on = 1;
++ return 0;
++}
++
++static inline int snd_ak4641_power_off(struct snd_ak4641 *ak)
++{
++ ak->powered_on = 0;
++ ak->power_on_chip(0);
++ return 0;
++}
++
++static inline void snd_ak4641_headphone_out_on(struct snd_ak4641 *ak, int on)
++{
++ if (ak->headphone_out_on) ak->headphone_out_on(on);
++}
++
++static inline void snd_ak4641_speaker_out_on(struct snd_ak4641 *ak, int on)
++{
++ if (ak->speaker_out_on) ak->speaker_out_on(on);
++}
++
++static int snd_ak4641_playback_on(struct snd_ak4641 *ak)
++{
++ if (ak->playback_on) return 0;
++
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2],
++ R_PM2_PMDAC, R_PM2_MCKPD | R_PM2_PMDAC);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ if (ak->hp_connected) snd_ak4641_headphone_on(ak, 1);
++ else snd_ak4641_speaker_on(ak, 1);
++
++ ak->playback_on = 1;
++
++ return 0;
++}
++
++static int snd_ak4641_playback_off(struct snd_ak4641 *ak)
++{
++ if (!ak->playback_on) return 0;
++
++ ak->playback_on = 0;
++
++ if (ak->hp_connected) snd_ak4641_headphone_on(ak, 0);
++ else snd_ak4641_speaker_on(ak, 0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2],
++ (!ak->capture_on ? R_PM2_MCKPD : 0x00) | R_PM2_PMDAC,
++ R_PM2_MCKPD | R_PM2_PMDAC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++
++ return 0;
++}
++
++static void snd_ak4641_select_mic(struct snd_ak4641 *ak)
++{
++ int mic = 0;
++ u8 r_mic;
++
++ if (ak->hp_connected) {
++ /* check headset mic */
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], R_MIC_MPWRE, R_MIC_MPWRE);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ snd_ak4641_hwsync_read(ak, R_STATUS);
++ mic = (ak->regs[R_STATUS] & R_STATUS_DTMIC) == R_STATUS_DTMIC;
++
++ printk("htcuniversal_ak4641_select_mic: mic=%d\n",mic);
++
++ r_mic = WRITE_MASK(ak->regs[R_MIC],
++ R_MIC_MSEL | (ak->capture_on ? R_MIC_MPWRE : 0x00),
++ R_MIC_MSEL | R_MIC_MPWRI | R_MIC_MPWRE);
++ }
++ else
++ r_mic = WRITE_MASK(ak->regs[R_MIC],
++ 0x00 | (ak->capture_on ? R_MIC_MPWRI : 0x00),
++ R_MIC_MSEL | R_MIC_MPWRI | R_MIC_MPWRE);
++
++ if (r_mic != ak->regs[R_MIC]) {
++ ak->regs[R_MIC] = r_mic;
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ }
++}
++
++static int snd_ak4641_capture_on(struct snd_ak4641 *ak)
++{
++ if (ak->capture_on) return 0;
++
++ if (!ak->playback_on) {
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2], 0x00, R_PM2_MCKPD);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ }
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMMIC | R_PM1_PMADC,
++ R_PM1_PMMIC | R_PM1_PMADC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_PGA); /* mic PGA gain is reset when PMMIC = 0 */
++
++ ak->capture_on = 1;
++
++ snd_ak4641_select_mic(ak);
++
++ msleep(47); /* accounts for ADC init cycle, time enough for fs >= 44.1 kHz */
++
++ return 0;
++}
++
++static int snd_ak4641_capture_off(struct snd_ak4641 *ak)
++{
++ if (!ak->capture_on) return 0;
++
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC],
++ 0x00, R_MIC_MPWRI | R_MIC_MPWRE | R_MIC_MSEL);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMMIC | R_PM1_PMADC);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ if (!ak->playback_on) {
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2], R_PM2_MCKPD, R_PM2_MCKPD);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ }
++
++ ak->capture_on = 0;
++
++ return 0;
++}
++
++int snd_ak4641_open_stream(struct snd_ak4641 *ak, int stream)
++{
++ snd_ak4641_lock(ak);
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ ak->playback_stream_opened = 1;
++ snd_ak4641_playback_on(ak);
++ } else {
++ ak->capture_stream_opened = 1;
++ snd_ak4641_capture_on(ak);
++ }
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++int snd_ak4641_close_stream(struct snd_ak4641 *ak, int stream)
++{
++ snd_ak4641_lock(ak);
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ ak->playback_stream_opened = 0;
++ snd_ak4641_playback_off(ak);
++ } else {
++ ak->capture_stream_opened = 0;
++ snd_ak4641_capture_off(ak);
++ }
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static int snd_ak4641_init_regs(struct snd_ak4641 *ak)
++{
++ snd_ak4641_hwsync_read_all(ak);
++
++ //@@ MEMO: add some configs
++
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMVCM, R_PM1_PMVCM);
++ ak->regs[R_DAC] = WRITE_MASK(ak->regs[R_DAC], 0x00, R_DAC_DATTC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_DAC);
++
++ return 0;
++}
++
++int snd_ak4641_suspend(struct snd_ak4641 *ak, pm_message_t state)
++{
++ snd_ak4641_lock(ak);
++ if (ak->playback_on) snd_ak4641_playback_off(ak);
++ if (ak->capture_on) snd_ak4641_capture_off(ak);
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++int snd_ak4641_resume(struct snd_ak4641 *ak)
++{
++ snd_ak4641_lock(ak);
++ snd_ak4641_power_on(ak);
++ snd_ak4641_hwsync_write_all(ak);
++ if (ak->playback_stream_opened) snd_ak4641_playback_on(ak);
++ if (ak->capture_stream_opened) snd_ak4641_capture_on(ak);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static void snd_ak4641_init_ak(struct snd_ak4641 *ak)
++{
++ init_MUTEX(&ak->sem);
++ ak->i2c_client.driver = &snd_ak4641_i2c_driver;
++}
++
++int snd_ak4641_activate(struct snd_ak4641 *ak)
++{
++ int ret = 0;
++
++ snd_ak4641_init_ak(ak);
++ snd_ak4641_lock(ak);
++ snd_ak4641_power_on(ak);
++ if ((ret = snd_ak4641_i2c_attach(ak)) < 0)
++ goto failed_i2c_attach;
++ snd_ak4641_init_regs(ak);
++ if ((ret = snd_ak4641_hp_detected_init(ak)) < 0)
++ goto failed_hp_detected_init;
++ snd_ak4641_unlock(ak);
++ return 0;
++
++ failed_hp_detected_init:
++ snd_ak4641_i2c_detach(ak);
++ failed_i2c_attach:
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++ return ret;
++}
++
++void snd_ak4641_deactivate(struct snd_ak4641 *ak)
++{
++ snd_ak4641_lock(ak);
++ snd_ak4641_hp_detected_free(ak);
++ snd_ak4641_i2c_detach(ak);
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++}
++
++int snd_ak4641_add_mixer_controls(struct snd_ak4641 *ak, struct snd_card *card)
++{
++ snd_ak4641_lock(ak);
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_playback_volume, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_playback_switch, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mic_gain, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mic_boost, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mono_out, ak));
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++/* end {{ Codec Control }} */
++
++
++/* begin {{ Module }} */
++
++static int __init snd_ak4641_module_on_load(void)
++{
++ snd_ak4641_i2c_init();
++ return 0;
++}
++
++static void __exit snd_ak4641_module_on_unload(void)
++{
++ snd_ak4641_i2c_free();
++}
++
++module_init(snd_ak4641_module_on_load);
++module_exit(snd_ak4641_module_on_unload);
++
++EXPORT_SYMBOL(snd_ak4641_activate);
++EXPORT_SYMBOL(snd_ak4641_deactivate);
++EXPORT_SYMBOL(snd_ak4641_add_mixer_controls);
++EXPORT_SYMBOL(snd_ak4641_open_stream);
++EXPORT_SYMBOL(snd_ak4641_close_stream);
++EXPORT_SYMBOL(snd_ak4641_suspend);
++EXPORT_SYMBOL(snd_ak4641_resume);
++EXPORT_SYMBOL(snd_ak4641_hp_connected);
++EXPORT_SYMBOL(snd_ak4641_hp_detected);
++
++MODULE_AUTHOR("Giorgio Padrin");
++MODULE_DESCRIPTION("Audio support for codec Asahi Kasei AK4641");
++MODULE_LICENSE("GPL");
++
++/* end {{ Module }} */
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,65 @@
++/*
++ * Audio support for codec Asahi Kasei AK4641
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Copyright (c) 2006 Giorgio Padrin <giorgio@mandarinlogiq.org>
++ */
++
++#ifndef __SOUND_AK4641_H
++#define __SOUND_AK4641_H
++
++#include <linux/i2c.h>
++
++struct snd_ak4641 {
++ struct semaphore sem;
++
++ u8 regs[0x14]; /* registers cache */
++
++ unsigned int
++ powered_on:1,
++ playback_on:1,
++ playback_stream_opened:1,
++ capture_on:1,
++ capture_stream_opened:1;
++
++ unsigned int
++ hp_connected:1;
++
++ /* -- configuration (to fill before activation) -- */
++ void (*power_on_chip)(int on);
++ void (*reset_pin)(int on);
++ void (*headphone_out_on)(int on);
++ void (*speaker_out_on)(int on);
++
++ struct i2c_client i2c_client; /* to fill .adapter */
++ /* ----------------------------------------------- */
++
++ struct {
++ int detected;
++ struct workqueue_struct *wq;
++ struct work_struct w;
++ } hp_detected;
++};
++
++
++/* Note: opening, closing, suspending and resuming a stream
++ * require the clocks (MCLK and I2S ones) running
++ */
++
++/* don't forget to specify I2C adapter in i2c_client field */
++int snd_ak4641_activate(struct snd_ak4641 *ak);
++
++void snd_ak4641_deactivate(struct snd_ak4641 *ak);
++int snd_ak4641_add_mixer_controls(struct snd_ak4641 *ak, struct snd_card *card);
++int snd_ak4641_open_stream(struct snd_ak4641 *ak, int stream);
++int snd_ak4641_close_stream(struct snd_ak4641 *ak, int stream);
++int snd_ak4641_suspend(struct snd_ak4641 *ak, pm_message_t state);
++int snd_ak4641_resume(struct snd_ak4641 *ak);
++
++void snd_ak4641_hp_connected(struct snd_ak4641 *ak, int connected); /* non atomic context */
++void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected); /* atomic context */
++
++#endif /* __SOUND_AK4641_H */
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,143 @@
++/*
++ * LEDs support for the HP iPaq hx4700
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_leds.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++//FIXME
++//DEFINE_LED_TRIGGER_SHARED_GLOBAL(htcuniversal_radio_trig);
++//EXPORT_LED_TRIGGER_SHARED(htcuniversal_radio_trig);
++
++static struct asic3_led htcuniversal_leds[] = {
++ {
++ .led_cdev = {
++ .name = "htcuniversal:red",
++ .default_trigger = "htcuniversal-charging",
++ },
++ .hw_num = 2,
++
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:green",
++ .default_trigger = "htcuniversal-chargefull",
++ },
++ .hw_num = 1,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:wifi-bt",
++ .default_trigger = "htcuniversal-radio",
++ },
++ .hw_num = 0,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:phonebuttons",
++ .default_trigger = "htcuniversal-phonebuttons",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_BL_KEYP_PWR_ON,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:vibra",
++ .default_trigger = "htcuniversal-vibra",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_VIBRA_PWR_ON,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:flashlight1",
++ .default_trigger = "htcuniversal-flashlight1",
++ },
++ .hw_num = -1,
++ .gpio_num = ('A'-'A')*16+GPIOA_FLASHLIGHT,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:kbdbacklight",
++ .default_trigger = "htcuniversal-kbdbacklight",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_BL_KEYB_PWR_ON,
++ },
++};
++
++void htcuniversal_leds_release(struct device *dev)
++{
++ return;
++}
++
++static
++struct asic3_leds_machinfo htcuniversal_leds_machinfo = {
++ .num_leds = ARRAY_SIZE(htcuniversal_leds),
++ .leds = htcuniversal_leds,
++ .asic3_pdev = &htcuniversal_asic3,
++};
++
++static
++struct platform_device htcuniversal_leds_pdev = {
++ .name = "asic3-leds",
++ .dev = {
++ .platform_data = &htcuniversal_leds_machinfo,
++ .release = htcuniversal_leds_release,
++ },
++};
++
++static
++int __init htcuniversal_leds_init(void)
++{
++ int ret;
++ printk("htcuniversal LEDs Driver\n");
++// led_trigger_register_shared("htcuniversal-radio", &htcuniversal_radio_trig);
++
++ ret = asic3_leds_register();
++ if (ret) goto asic3_leds_failed;
++
++ ret = platform_device_register(&htcuniversal_leds_pdev);
++ if (ret) goto platform_device_failed;
++
++ goto success;
++
++platform_device_failed:
++ asic3_leds_unregister();
++asic3_leds_failed:
++// led_trigger_unregister_shared(htcuniversal_radio_trig);
++ printk("htcuniversal LEDs Driver failed to init");
++success:
++ return ret;
++}
++
++static
++void __exit htcuniversal_leds_exit(void)
++{
++// led_trigger_unregister_shared(htcuniversal_radio_trig);
++ platform_device_unregister(&htcuniversal_leds_pdev);
++ asic3_leds_unregister();
++ return;
++}
++
++module_init(htcuniversal_leds_init);
++module_exit(htcuniversal_leds_exit);
++
++MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
++MODULE_DESCRIPTION("htcuniversal LEDs driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,61 @@
++/*
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * Copyright (C) 2006 Paul Sokolosvky
++ * Based on code from older versions of htcuniversal_lcd.c
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/platform_device.h>
++#include <asm/arch/hardware.h> /* for pxa-regs.h (__REG) */
++#include <asm/arch/pxa-regs.h>
++#include <asm/mach-types.h> /* machine_is_htcuniversal */
++//#include <linux/corgi_bl.h>
++#include <linux/backlight.h>
++#include <linux/err.h>
++
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++#define HTCUNIVERSAL_MAX_INTENSITY 0xc7
++
++static void htcuniversal_set_bl_intensity(int intensity)
++{
++ PWM_CTRL1 = 1; /* pre-scaler */
++ PWM_PWDUTY1 = intensity; /* duty cycle */
++ PWM_PERVAL1 = HTCUNIVERSAL_MAX_INTENSITY+1; /* period */
++
++ if (intensity > 0) {
++ pxa_set_cken(CKEN_PWM1, 1);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev,
++ (1<<GPIOD_FL_PWR_ON), (1<<GPIOD_FL_PWR_ON));
++ } else {
++ pxa_set_cken(CKEN_PWM1, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev,
++ (1<<GPIOD_FL_PWR_ON), 0);
++ }
++}
++
++
++static struct generic_bl_info htcuniversal_bl_machinfo = {
++ .default_intensity = HTCUNIVERSAL_MAX_INTENSITY / 4,
++ .limit_mask = 0xff,
++ .max_intensity = HTCUNIVERSAL_MAX_INTENSITY,
++ .set_bl_intensity = htcuniversal_set_bl_intensity,
++};
++
++struct platform_device htcuniversal_bl = {
++ .name = "corgi-bl",
++ .dev = {
++ .platform_data = &htcuniversal_bl_machinfo,
++ },
++};
++
++MODULE_AUTHOR("Paul Sokolovsky <pmiscml@gmail.com>");
++MODULE_DESCRIPTION("Backlight driver for HTC Universal");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,135 @@
++/* Bluetooth interface driver for TI BRF6150 on HX4700
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-04-21 Todd Blumer Created.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/serial.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include "htcuniversal_bt.h"
++
++static uint use_led=1;
++
++static void
++htcuniversal_bt_configure( int state )
++{
++ int tries;
++
++ printk( KERN_NOTICE "htcuniversal configure bluetooth: %d\n", state );
++ switch (state) {
++
++ case PXA_UART_CFG_PRE_STARTUP:
++ break;
++
++ case PXA_UART_CFG_POST_STARTUP:
++ /* pre-serial-up hardware configuration */
++ htcuniversal_egpio_enable(1<<EGPIO5_BT_3V3_ON);
++ mdelay(50);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_PWR_ON, 1<<GPIOC_BT_PWR_ON);
++ mdelay(10);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_RESET, 0);
++ mdelay(10);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_RESET, 1<<GPIOC_BT_RESET);
++ mdelay(10);
++
++ /*
++ * BRF6150's RTS goes low when firmware is ready
++ * so check for CTS=1 (nCTS=0 -> CTS=1). Typical 150ms
++ */
++ tries = 0;
++ do {
++ mdelay(10);
++ } while ((BTMSR & MSR_CTS) == 0 && tries++ < 50);
++ if (use_led) {
++// htcuniversal_set_led(2, 16, 16);
++ }
++ break;
++
++ case PXA_UART_CFG_PRE_SHUTDOWN:
++ htcuniversal_egpio_disable(1<<EGPIO5_BT_3V3_ON );
++ mdelay(50);
++// htcuniversal_clear_led(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_PWR_ON, 0);
++ break;
++
++ default:
++ break;
++ }
++}
++
++
++static int
++htcuniversal_bt_probe( struct platform_device *dev )
++{
++ struct htcuniversal_bt_funcs *funcs = dev->dev.platform_data;
++
++ /* configure bluetooth UART */
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_RXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_TXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_UART_CTS_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_UART_RTS_MD );
++
++ funcs->configure = htcuniversal_bt_configure;
++
++ /* Make sure the LED is off */
++// htcuniversal_clear_led(2);
++
++ return 0;
++}
++
++static int
++htcuniversal_bt_remove( struct platform_device *dev )
++{
++ struct htcuniversal_bt_funcs *funcs = dev->dev.platform_data;
++
++ funcs->configure = NULL;
++
++ /* Make sure the LED is off */
++// htcuniversal_clear_led(2);
++
++ return 0;
++}
++
++static struct platform_driver bt_driver = {
++ .driver = {
++ .name = "htcuniversal_bt",
++ },
++ .probe = htcuniversal_bt_probe,
++ .remove = htcuniversal_bt_remove,
++};
++
++module_param(use_led, uint, 0);
++
++static int __init
++htcuniversal_bt_init( void )
++{
++ printk(KERN_NOTICE "htcuniversal Bluetooth Driver\n");
++ return platform_driver_register( &bt_driver );
++}
++
++static void __exit
++htcuniversal_bt_exit( void )
++{
++ platform_driver_unregister( &bt_driver );
++}
++
++module_init( htcuniversal_bt_init );
++module_exit( htcuniversal_bt_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Bluetooth Support Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
++
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,17 @@
++/*
++ * Bluetooth support file for calling bluetooth configuration functions
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-06 Todd Blumer Initial Revision
++ */
++
++#ifndef _HTCUNIVERSAL_BT_H
++#define _HTCUNIVERSAL_BT_H
++
++struct htcuniversal_bt_funcs {
++ void (*configure) ( int state );
++};
++
++
++#endif
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,87 @@
++/*
++ * Buttons driver for HTC Universal
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.
++ *
++ * Copyright (C) 2005 Pawel Kolodziejski
++ * Copyright (C) 2003 Joshua Wise
++ *
++ */
++
++#include <linux/input.h>
++#include <linux/input_pda.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/gpio_keys.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_keys.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static struct asic3_keys_button asic3_buttons[] = {
++//{KEY_SCREEN, ASIC3_GPIOA_IRQ_BASE+GPIOA_COVER_ROTATE_N, 1, "screen_cover", EV_SW},
++//{KEY_SWITCHVIDEOMODE, ASIC3_GPIOB_IRQ_BASE+GPIOB_CLAMSHELL_N, 1, "clamshell_rotate", EV_SW},
++//{KEY_KBDILLUMTOGGLE, ASIC3_GPIOB_IRQ_BASE+GPIOB_NIGHT_SENSOR, 1, "night_sensor", EV_SW},
++{SW_LID, ASIC3_GPIOA_IRQ_BASE+GPIOA_COVER_ROTATE_N, 1, "screen_cover", EV_SW},
++{SW_TABLET_MODE, ASIC3_GPIOB_IRQ_BASE+GPIOB_CLAMSHELL_N, 1, "clamshell_rotate", EV_SW},
++//{SW_NIGHT_SENSOR, ASIC3_GPIOB_IRQ_BASE+GPIOB_NIGHT_SENSOR, 1, "night_sensor", EV_SW},
++{KEY_F10, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_BACKLIGHT_N, 1, "backlight_button"},
++{KEY_RECORD, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_RECORD_N, 1, "record_button"},
++{KEY_CAMERA, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_CAMERA_N, 1, "camera_button"},
++{KEY_VOLUMEDOWN, ASIC3_GPIOA_IRQ_BASE+GPIOA_VOL_UP_N, 1, "volume_slider_down"},
++{KEY_VOLUMEUP, ASIC3_GPIOA_IRQ_BASE+GPIOA_VOL_DOWN_N, 1, "volume_slider_up"},
++{KEY_KPENTER, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_OK_N, 1, "select"},
++{KEY_RIGHT, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_RIGHT_N, 1, "right"},
++{KEY_LEFT, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_LEFT_N, 1, "left"},
++{KEY_DOWN, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_DOWN_N, 1, "down"},
++{KEY_UP, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_UP_N, 1, "up"},
++};
++
++static struct asic3_keys_platform_data asic3_keys_data = {
++ .buttons = asic3_buttons,
++ .nbuttons = ARRAY_SIZE(asic3_buttons),
++ .asic3_dev = &htcuniversal_asic3.dev,
++};
++
++static struct platform_device htcuniversal_keys_asic3 = {
++ .name = "asic3-keys",
++ .dev = { .platform_data = &asic3_keys_data, }
++};
++
++static int __init htcuniversal_buttons_probe(struct platform_device *dev)
++{
++ platform_device_register(&htcuniversal_keys_asic3);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_buttons_driver = {
++ .driver = {
++ .name = "htcuniversal_buttons",
++ },
++ .probe = htcuniversal_buttons_probe,
++};
++
++static int __init htcuniversal_buttons_init(void)
++{
++ if (!machine_is_htcuniversal())
++ return -ENODEV;
++
++ return platform_driver_register(&htcuniversal_buttons_driver);
++}
++
++static void __exit htcuniversal_buttons_exit(void)
++{
++ platform_driver_unregister(&htcuniversal_buttons_driver);
++}
++
++module_init(htcuniversal_buttons_init);
++module_exit(htcuniversal_buttons_exit);
++
++MODULE_AUTHOR ("Joshua Wise, Pawel Kolodziejski, Paul Sokolosvky");
++MODULE_DESCRIPTION ("Buttons support for HTC Universal");
++MODULE_LICENSE ("GPL");
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,226 @@
++/* Core Hardware driver for Hx4700 (Serial, ASIC3, EGPIOs)
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-03-29 Todd Blumer Converted basic structure to support hx4700
++ * 2005-04-30 Todd Blumer Add IRDA code from H2200
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/pm.h>
++#include <linux/irq.h>
++
++#include <asm/io.h>
++#include <asm/mach/irq.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa-pm_ll.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include <linux/soc/asic3_base.h>
++#include <asm/hardware/ipaq-asic3.h>
++
++volatile u_int16_t *egpios;
++u_int16_t egpio_reg;
++
++static int htc_bootloader = 0; /* Is the stock HTC bootloader installed? */
++
++/*
++ * may make sense to put egpios elsewhere, but they're here now
++ * since they share some of the same address space with the TI WLAN
++ *
++ * EGPIO register is write-only
++ */
++
++void
++htcuniversal_egpio_enable( u_int16_t bits )
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++
++ egpio_reg |= bits;
++ *egpios = egpio_reg;
++
++ local_irq_restore(flags);
++}
++EXPORT_SYMBOL_GPL(htcuniversal_egpio_enable);
++
++void
++htcuniversal_egpio_disable( u_int16_t bits )
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++
++ egpio_reg &= ~bits;
++ *egpios = egpio_reg;
++
++ local_irq_restore(flags);
++}
++EXPORT_SYMBOL_GPL(htcuniversal_egpio_disable);
++
++#ifdef CONFIG_PM
++
++//void htcuniversal_ll_pm_init(void);
++
++static int htcuniversal_suspend(struct platform_device *dev, pm_message_t state)
++{
++ /* Turn off external clocks here, because htcuniversal_power and asic3_mmc
++ * scared to do so to not hurt each other. (-5 mA) */
++
++
++ /* 0x20c2 is HTC clock value
++ * CLOCK_CDEX_SOURCE 2
++ * CLOCK_CDEX_SPI 0
++ * CLOCK_CDEX_OWM 0
++ *
++ * CLOCK_CDEX_PWM0 0
++ * CLOCK_CDEX_PWM1 0
++ * CLOCK_CDEX_LED0 1
++ * CLOCK_CDEX_LED1 1
++ *
++ * CLOCK_CDEX_LED2 0
++ * CLOCK_CDEX_SD_HOST 0
++ * CLOCK_CDEX_SD_BUS 0
++ * CLOCK_CDEX_SMBUS 0
++ *
++ * CLOCK_CDEX_CONTROL_CX 0
++ * CLOCK_CDEX_EX0 1
++ * CLOCK_CDEX_EX1 0
++ * */
++ asic3_set_clock_cdex(&htcuniversal_asic3.dev, 0xffff, CLOCK_CDEX_SOURCE1
++ |CLOCK_CDEX_LED0
++ |CLOCK_CDEX_LED1
++ |CLOCK_CDEX_LED2
++ |CLOCK_CDEX_EX0
++ |CLOCK_CDEX_EX1);
++
++ *egpios = 0; /* turn off all egpio power */
++
++ /* Wake up enable. */
++ PWER = PWER_GPIO0
++ | PWER_GPIO1 /* reset */
++ | PWER_GPIO9 /* USB */
++ | PWER_GPIO10 /* AC on USB */
++ | PWER_GPIO14 /* ASIC3 mux */
++ | PWER_RTC;
++ /* Wake up on falling edge. */
++ PFER = PWER_GPIO0
++ | PWER_GPIO1
++ | PWER_GPIO9
++ | PWER_GPIO10
++ | PWER_GPIO14;
++
++ /* Wake up on rising edge. */
++ PRER = PWER_GPIO0
++ | PWER_GPIO1
++ | PWER_GPIO9
++ | PWER_GPIO10;
++ /* 3.6864 MHz oscillator power-down enable */
++ PCFR = PCFR_OPDE | PCFR_PI2CEN | PCFR_GPROD | PCFR_GPR_EN;
++
++ PGSR0 = 0x09088004;
++ PGSR1 = 0x00020002;
++ PGSR2 = 0x8001c000;
++ PGSR3 = 0x00106284;
++
++ PSLR = 0xcc000000;
++
++#if 0
++ /*
++ * If we're using bootldr and not the stock HTC bootloader,
++ * we want to wake up periodically to see if the charge is full while
++ * it is suspended. We do this with the OS timer 4 in the pxa270.
++ */
++ if (!htc_bootloader) {
++ OMCR4 = 0x4b; /* Periodic, self-resetting, 1-second timer */
++ OSMR4 = 5; /* Wake up bootldr after x seconds so it can
++ figure out what to do with the LEDs. */
++ OIER |= 0x10; /* Enable interrupt source for Timer 4 */
++ OSCR4 = 0; /* This starts the timer */
++ }
++#endif
++
++ asic3_set_extcf_select(&htcuniversal_asic3.dev, ASIC3_EXTCF_OWM_EN, 0);
++
++ return 0;
++}
++
++static int htcuniversal_resume(struct platform_device *dev)
++{
++ htcuniversal_egpio_enable(0);
++
++ return 0;
++}
++#else
++# define htcuniversal_suspend NULL
++# define htcuniversal_resume NULL
++#endif
++
++static int
++htcuniversal_core_probe( struct platform_device *dev )
++{
++
++ printk( KERN_NOTICE "HTC Universal Core Hardware Driver\n" );
++
++ egpios = (volatile u_int16_t *)ioremap_nocache(HTCUNIVERSAL_EGPIO_BASE, sizeof *egpios );
++ if (!egpios)
++ return -ENODEV;
++ else
++ printk( KERN_NOTICE "HTC Universal Core: egpio at phy=0x%8.8x is at virt=0x%p\n",
++ HTCUNIVERSAL_EGPIO_BASE, egpios );
++
++ printk("Using stock HTC first stage bootloader\n");
++ htc_bootloader = 1;
++
++// htcuniversal_ll_pm_init();
++
++ return 0;
++}
++
++static int
++htcuniversal_core_remove( struct platform_device *dev )
++{
++
++ if (egpios != NULL)
++ iounmap( (void *)egpios );
++
++ return 0;
++}
++
++static struct platform_driver htcuniversal_core_driver = {
++ .driver = {
++ .name = "htcuniversal_core",
++ },
++ .probe = htcuniversal_core_probe,
++ .remove = htcuniversal_core_remove,
++ .suspend = htcuniversal_suspend,
++ .resume = htcuniversal_resume,
++};
++
++static int __init
++htcuniversal_core_init( void )
++{
++ return platform_driver_register( &htcuniversal_core_driver );
++}
++
++
++static void __exit
++htcuniversal_core_exit( void )
++{
++ platform_driver_unregister( &htcuniversal_core_driver );
++}
++
++module_init( htcuniversal_core_init );
++module_exit( htcuniversal_core_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Core Hardware Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,212 @@
++/*
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * History:
++ *
++ * 2004-03-01 Eddi De Pieri Adapted for htcuniversal using h3900_lcd.c
++ * 2004 Shawn Anderson Lcd hacking on htcuniversal
++ * see h3900_lcd.c for more history.
++ *
++ */
++
++#include <linux/types.h>
++#include <asm/arch/hardware.h> /* for pxa-regs.h (__REG) */
++#include <linux/platform_device.h>
++#include <asm/arch/pxa-regs.h> /* LCCR[0,1,2,3]* */
++#include <asm/arch/bitfield.h> /* for pxa-regs.h (Fld, etc) */
++#include <asm/arch/pxafb.h> /* pxafb_mach_info, set_pxa_fb_info */
++#include <asm/mach-types.h> /* machine_is_htcuniversal */
++#include <linux/lcd.h> /* lcd_device */
++#include <linux/err.h>
++#include <linux/delay.h>
++
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++static int saved_lcdpower=-1;
++
++static int powerup_lcd(void)
++{
++ printk( KERN_INFO "htcuniversal powerup_lcd: called\n");
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++#if 1
++ LCCR4|=LCCR4_PCDDIV;
++#endif
++ pxa_set_cken(CKEN_LCD, 0);
++
++ mdelay(100);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 1<<GPIOA_LCD_PWR5_ON);
++ mdelay(5);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 1<<GPIOB_LCD_PWR3_ON);
++ mdelay(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 1<<GPIOC_LCD_PWR1_ON);
++ mdelay(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 1<<GPIOC_LCD_PWR2_ON);
++ mdelay(20);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 1<<GPIOD_LCD_PWR4_ON);
++ mdelay(1);
++ pxa_set_cken(CKEN_LCD, 1);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,1);
++ SET_HTCUNIVERSAL_GPIO(LCD2,1);
++ return 0;
++}
++
++static int powerdown_lcd(void)
++{
++ printk( KERN_INFO "htcuniversal powerdown_lcd: called\n");
++
++#if 1
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ mdelay(100);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ mdelay(10);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++ pxa_set_cken(CKEN_LCD, 0);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,0);
++ SET_HTCUNIVERSAL_GPIO(LCD2,0);
++#else
++ pxa_set_cken(CKEN_LCD, 0);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,0);
++ SET_HTCUNIVERSAL_GPIO(LCD2,0);
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ mdelay(100);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ mdelay(10);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++#endif
++ return 0;
++}
++
++static int htcuniversal_lcd_set_power(struct lcd_device *lm, int power)
++{
++ /* Enable or disable power to the LCD (0: on; 4: off) */
++
++ if ( power < 1 ) {
++
++ powerup_lcd();
++
++ } else {
++
++ powerdown_lcd();
++
++ }
++
++ saved_lcdpower=power;
++
++ return 0;
++}
++
++static int htcuniversal_lcd_get_power(struct lcd_device *lm)
++{
++ /* Get the LCD panel power status (0: full on, 1..3: controller
++ * power on, flat panel power off, 4: full off) */
++
++ if (saved_lcdpower == -1)
++ {
++ htcuniversal_lcd_set_power(lm, 4);
++ saved_lcdpower=4;
++ }
++
++ return saved_lcdpower;
++}
++
++static struct lcd_ops htcuniversal_lcd_properties =
++{
++ .get_power = htcuniversal_lcd_get_power,
++ .set_power = htcuniversal_lcd_set_power,
++};
++
++static struct lcd_device *htcuniversal_lcd_dev;
++
++static int htcuniversal_lcd_probe(struct platform_device * dev)
++{
++ htcuniversal_lcd_dev = lcd_device_register("pxa2xx-fb", &dev->dev, NULL,
++ &htcuniversal_lcd_properties);
++ if (IS_ERR(htcuniversal_lcd_dev)) {
++ printk("htcuniversal_lcd_probe: error registering devices\n");
++ return -1;
++ }
++
++ return 0;
++}
++
++static int htcuniversal_lcd_remove(struct platform_device * dev)
++{
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 4);
++ lcd_device_unregister(htcuniversal_lcd_dev);
++
++ return 0;
++}
++
++static int htcuniversal_lcd_suspend(struct platform_device * dev, pm_message_t state)
++{
++// printk("htcuniversal_lcd_suspend: called.\n");
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 4);
++ return 0;
++}
++
++static int htcuniversal_lcd_resume(struct platform_device * dev)
++{
++// printk("htcuniversal_lcd_resume: called.\n");
++
++ /* */
++#if 1
++ LCCR4|=LCCR4_PCDDIV;
++#endif
++
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 0);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_lcd_driver = {
++ .driver = {
++ .name = "htcuniversal_lcd",
++ },
++ .probe = htcuniversal_lcd_probe,
++ .remove = htcuniversal_lcd_remove,
++ .suspend = htcuniversal_lcd_suspend,
++ .resume = htcuniversal_lcd_resume,
++};
++
++static int htcuniversal_lcd_init(void)
++{
++ if (!machine_is_htcuniversal())
++ return -ENODEV;
++
++ return platform_driver_register(&htcuniversal_lcd_driver);
++}
++
++static void htcuniversal_lcd_exit(void)
++{
++ lcd_device_unregister(htcuniversal_lcd_dev);
++ platform_driver_unregister(&htcuniversal_lcd_driver);
++}
++
++module_init(htcuniversal_lcd_init);
++module_exit(htcuniversal_lcd_exit);
++
++MODULE_AUTHOR("xanadux.org");
++MODULE_DESCRIPTION("Framebuffer driver for HTC Universal");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,167 @@
++
++/* Phone interface driver for Qualcomm MSM6250 on HTC Universal
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-04-21 Todd Blumer Created.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/serial.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include "htcuniversal_phone.h"
++
++static void phone_reset(void)
++{
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_RESET2, 0);
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_RESET,0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++ mdelay(1);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 1<<GPIOD_BB_RESET1);
++ mdelay(20);
++ SET_HTCUNIVERSAL_GPIO(PHONE_RESET,1);
++ mdelay(200);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++}
++
++static void phone_off(void)
++{
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 1<<GPIOD_BB_RESET1);
++ mdelay(2000);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_RESET2, 1<<GPIOB_BB_RESET2);
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0);
++}
++
++static void
++htcuniversal_phone_configure( int state )
++{
++ int tries;
++ unsigned short statusb;
++
++ printk( KERN_NOTICE "htcuniversal configure phone: %d\n", state );
++ switch (state) {
++
++ case PXA_UART_CFG_PRE_STARTUP:
++ break;
++
++ case PXA_UART_CFG_POST_STARTUP:
++ /* pre-serial-up hardware configuration */
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_START,0); /* "bootloader" */
++ SET_HTCUNIVERSAL_GPIO(PHONE_UNKNOWN,0); /* not used */
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0); /* PHONE_OFF */
++
++ phone_reset();
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_START,1); /* phone */
++
++ phone_reset();
++
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_READY, 0);
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_UNKNOWN3, 0);
++
++ /*
++ */
++ tries = 0;
++ do {
++ mdelay(10);
++ statusb = asic3_get_gpio_status_b( &htcuniversal_asic3.dev );
++ } while ( (statusb & (1<<GPIOB_UMTS_DCD)) == 0 && tries++ < 200);
++
++ printk("UMTS_DCD tries=%d of 200\n",tries);
++
++ tries = 0;
++ do {
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,1);
++ mdelay(10);
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0);
++ mdelay(20);
++ statusb = asic3_get_gpio_status_b( &htcuniversal_asic3.dev );
++ } while ( (statusb & (1<<GPIOB_BB_READY)) == 0 && tries++ < 200);
++
++ printk("BB_READY tries=%d of 200\n",tries);
++
++ break;
++
++ case PXA_UART_CFG_PRE_SHUTDOWN:
++
++ phone_off();
++
++ break;
++
++ default:
++ break;
++ }
++}
++
++
++static int
++htcuniversal_phone_probe( struct platform_device *dev )
++{
++ struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
++
++ /* configure phone UART */
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD );
++
++ funcs->configure = htcuniversal_phone_configure;
++
++ return 0;
++}
++
++static int
++htcuniversal_phone_remove( struct platform_device *dev )
++{
++ struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
++
++ funcs->configure = NULL;
++
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_READY, 1<<GPIOB_BB_READY);
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_UNKNOWN3, 1<<GPIOB_BB_UNKNOWN3);
++
++ return 0;
++}
++
++static struct platform_driver phone_driver = {
++ .driver = {
++ .name = "htcuniversal_phone",
++ },
++ .probe = htcuniversal_phone_probe,
++ .remove = htcuniversal_phone_remove,
++};
++
++static int __init
++htcuniversal_phone_init( void )
++{
++ printk(KERN_NOTICE "htcuniversal Phone Driver\n");
++ return platform_driver_register( &phone_driver );
++}
++
++static void __exit
++htcuniversal_phone_exit( void )
++{
++ platform_driver_unregister( &phone_driver );
++}
++
++module_init( htcuniversal_phone_init );
++module_exit( htcuniversal_phone_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Phone Support Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,16 @@
++/*
++ * Bluetooth support file for calling bluetooth configuration functions
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-06 Todd Blumer Initial Revision
++ */
++
++#ifndef _HTCUNIVERSAL_PHONE_H
++#define _HTCUNIVERSAL_PHONE_H
++
++struct htcuniversal_phone_funcs {
++ void (*configure) ( int state );
++};
++
++#endif
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,69 @@
++/*
++ * MyPal 716 power management support for the original HTC IPL in DoC G3
++ *
++ * Use consistent with the GNU GPL is permitted, provided that this
++ * copyright notice is preserved in its entirety in all copies and
++ * derived works.
++ *
++ * Copyright (C) 2005 Pawel Kolodziejski
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/pm.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa-pm_ll.h>
++
++#ifdef CONFIG_PM
++
++static u32 *addr_a0040000;
++static u32 *addr_a0040004;
++static u32 *addr_a0040008;
++static u32 *addr_a004000c;
++
++static u32 save_a0040000;
++static u32 save_a0040004;
++static u32 save_a0040008;
++static u32 save_a004000c;
++
++static void htcuniversal_pxa_ll_pm_suspend(unsigned long resume_addr)
++{
++ save_a0040000 = *addr_a0040000;
++ save_a0040004 = *addr_a0040004;
++ save_a0040008 = *addr_a0040008;
++ save_a004000c = *addr_a004000c;
++
++ /* jump to PSPR */
++ *addr_a0040000 = 0xe3a00101; // mov r0, #0x40000000
++ *addr_a0040004 = 0xe380060f; // orr r0, r0, #0x0f000000
++ *addr_a0040008 = 0xe3800008; // orr r0, r0, #8
++ *addr_a004000c = 0xe590f000; // ldr pc, [r0]
++}
++
++static void htcuniversal_pxa_ll_pm_resume(void)
++{
++ *addr_a0040000 = save_a0040000;
++ *addr_a0040004 = save_a0040004;
++ *addr_a0040008 = save_a0040008;
++ *addr_a004000c = save_a004000c;
++}
++
++static struct pxa_ll_pm_ops htcuniversal_ll_pm_ops = {
++ .suspend = htcuniversal_pxa_ll_pm_suspend,
++ .resume = htcuniversal_pxa_ll_pm_resume,
++};
++
++void htcuniversal_ll_pm_init(void) {
++ addr_a0040000 = phys_to_virt(0xa0040000);
++ addr_a0040004 = phys_to_virt(0xa0040004);
++ addr_a0040008 = phys_to_virt(0xa0040008);
++ addr_a004000c = phys_to_virt(0xa004000c);
++
++ pxa_pm_set_ll_ops(&htcuniversal_ll_pm_ops);
++}
++#endif /* CONFIG_PM */
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,97 @@
++/*
++ * pda_power driver for HTC Universal
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or (at
++ * your option) any later version.
++ *
++ */
++
++#include <linux/platform_device.h>
++#include <linux/module.h>
++#include <linux/pda_power.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static void charge_on(int flags)
++{
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_CHARGE_EN, 0);
++}
++
++static int ac_on(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(POWER_DET) == 0);
++}
++
++static int usb_on(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(USB_DET) == 0);
++}
++
++static char *supplicants[] = {
++ "ds2760-battery.0", "backup-battery"
++};
++
++static struct pda_power_pdata power_pdata = {
++ .is_ac_online = ac_on,
++ .is_usb_online = usb_on,
++ .set_charge = charge_on,
++ .supplied_to = supplicants,
++ .num_supplicants = ARRAY_SIZE(supplicants),
++};
++
++static struct resource power_resources[] = {
++ [0] = {
++ .name = "ac",
++ .start = HTCUNIVERSAL_IRQ(POWER_DET),
++ .end = HTCUNIVERSAL_IRQ(POWER_DET),
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
++ },
++ [1] = {
++ .name = "usb",
++ .start = HTCUNIVERSAL_IRQ(USB_DET),
++ .end = HTCUNIVERSAL_IRQ(USB_DET),
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
++ },
++};
++
++static void dev_release(struct device *dev)
++{
++ return;
++}
++
++static struct platform_device power_dev =
++{
++ .name = "pda-power",
++ .id = -1,
++ .resource = power_resources,
++ .num_resources = ARRAY_SIZE(power_resources),
++ .dev =
++ {
++ .platform_data = &power_pdata,
++ .release = dev_release,
++ },
++};
++
++static int htcuniversal_power_init(void)
++{
++ return platform_device_register(&power_dev);
++}
++
++static void htcuniversal_power_exit(void)
++{
++ platform_device_unregister(&power_dev);
++
++ return;
++}
++
++module_init(htcuniversal_power_init);
++module_exit(htcuniversal_power_exit);
++
++MODULE_DESCRIPTION("Power driver for HTC Universal");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,490 @@
++/* Touch screen driver for the TI something-or-other
++ *
++ * Copyright © 2005 SDG Systems, LLC
++ *
++ * Based on code that was based on the SAMCOP driver.
++ * Copyright © 2003, 2004 Compaq Computer Corporation.
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Keith Packard <keith.packard@hp.com>
++ * May 2003
++ *
++ * Updates:
++ *
++ * 2004-02-11 Michael Opdenacker Renamed names from samcop to shamcop,
++ * Goal:support HAMCOP and SAMCOP.
++ * 2004-02-14 Michael Opdenacker Temporary fix for device id handling
++ *
++ * 2005-02-18 Aric Blumer Converted basic structure to support hx4700
++ *
++ * 2005-06-07 Aric Blumer Added tssim device handling so we can
++ * hook in the fbvncserver.
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/cdev.h>
++#include <linux/interrupt.h>
++#include <linux/sched.h>
++#include <linux/pm.h>
++#include <linux/delay.h>
++#include <linux/input.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/mach/irq.h>
++#include <asm/io.h>
++
++/* remove me */
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/mach-types.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++
++#include "tsc2046_ts.h"
++
++enum touchscreen_state {
++ STATE_WAIT_FOR_TOUCH, /* Waiting for a PEN interrupt */
++ STATE_SAMPLING /* Actively sampling ADC */
++};
++
++struct touchscreen_data {
++ enum touchscreen_state state;
++ struct timer_list timer;
++ int irq;
++ struct input_dev *input;
++ /* */
++ int port;
++ int clock;
++ int pwrbit_X;
++ int pwrbit_Y;
++ int (*pen_down)(void);
++};
++
++static unsigned long poll_sample_time = 10; /* Sample every 10 milliseconds */
++
++static struct touchscreen_data *ts_data;
++
++static int irqblock;
++
++module_param(poll_sample_time, ulong, 0644);
++MODULE_PARM_DESC(poll_sample_time, "Poll sample time");
++
++static inline void
++report_touchpanel(struct touchscreen_data *ts, int pressure, int x, int y)
++{
++ input_report_abs(ts->input, ABS_PRESSURE, pressure);
++ input_report_abs(ts->input, ABS_X, x);
++ input_report_abs(ts->input, ABS_Y, y);
++ input_sync(ts->input);
++}
++
++static void start_read(struct touchscreen_data *touch);
++
++static irqreturn_t
++pen_isr(int irq, void *irq_desc)
++{
++ struct touchscreen_data *ts = ts_data;
++
++ if(irq == ts->irq /* && !irqblock */) {
++ irqblock = 1;
++
++ /*
++ * Disable the pen interrupt. It's reenabled when the user lifts the
++ * pen.
++ */
++ disable_irq(ts->irq);
++
++ if (ts->state == STATE_WAIT_FOR_TOUCH) {
++ ts->state = STATE_SAMPLING;
++ start_read(ts);
++ } else {
++ /* Shouldn't happen */
++ printk(KERN_ERR "Unexpected ts interrupt\n");
++ }
++
++ }
++ return IRQ_HANDLED;
++}
++
++static void
++ssp_init(int port, int clock)
++{
++
++ pxa_set_cken(clock, 0);
++
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_CLK_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_FRM_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DO_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DI_MD);
++
++ SET_HTCUNIVERSAL_GPIO(SPI_FRM,1);
++
++ /* *** Set up the SPI Registers *** */
++ SSCR0_P(port) =
++ SSCR0_EDSS /* Extended Data Size Select */
++ | SSCR0_SerClkDiv(7) /* Serial Clock Rate */
++ /* Synchronous Serial Enable (Disable for now) */
++ | SSCR0_Motorola /* Motorola SPI Interface */
++ | SSCR0_DataSize(8) /* Data Size Select (24-bit) */
++ ;
++ SSCR1_P(port) = 0;
++ SSPSP_P(port) = 0;
++
++ /* Clear the Status */
++ SSSR_P(port) = SSSR_P(port) & 0x00fcfffc;
++
++ /* Now enable it */
++ SSCR0_P(port) =
++ SSCR0_EDSS /* Extended Data Size Select */
++ | SSCR0_SerClkDiv(7) /* Serial Clock Rate */
++ | SSCR0_SSE /* Synchronous Serial Enable */
++ | SSCR0_Motorola /* Motorola SPI Interface */
++ | SSCR0_DataSize(8) /* Data Size Select (24-bit) */
++ ;
++
++ pxa_set_cken(clock, 1);
++}
++
++static void
++start_read(struct touchscreen_data *touch)
++{
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ int i;
++
++ /* Write here to the serial port. We request X and Y only for now.
++ * Then we have to wait for poll_sample_time before we read out the serial
++ * port. Then, when we read it out, we check to see if the pen is still
++ * down. If so, then we issue another request here.
++ */
++#define TS_SAMPLES 7
++
++ /*
++ * We do four samples for each, and throw out the highest and lowest, then
++ * average the other two.
++ */
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ while(!(SSSR_P(touch->port) & SSSR_TNF))
++ ;
++ /* It's not full. Write the command for X */
++ SSDR_P(touch->port) = (TSC2046_SAMPLE_X|(touch->pwrbit_X))<<16;
++ }
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ while(!(SSSR_P(touch->port) & SSSR_TNF))
++ ;
++ /* It's not full. Write the command for Y */
++ SSDR_P(touch->port) = (TSC2046_SAMPLE_Y|(touch->pwrbit_Y))<<16;
++ }
++
++ /*
++ * Enable the timer. We should get an interrupt, but we want keep a timer
++ * to ensure that we can detect missing data
++ */
++ mod_timer(&touch->timer, jiffies + inc);
++}
++
++static void
++ts_timer_callback(unsigned long data)
++{
++ struct touchscreen_data *ts = (struct touchscreen_data *)data;
++ int x, a[TS_SAMPLES], y;
++ static int oldx, oldy;
++ int ssrval;
++
++ /*
++ * Check here to see if there is anything in the SPI FIFO. If so,
++ * return it if there has been a change. If not, then we have a
++ * timeout. Generate an erro somehow.
++ */
++ ssrval = SSSR_P(ts->port);
++
++ if(ssrval & SSSR_RNE) { /* Look at Rx Not Empty bit */
++ int number_of_entries_in_fifo;
++
++ /* The FIFO is not emtpy. Good! Now make sure there are at least two
++ * entries. (Should be two exactly.) */
++
++ number_of_entries_in_fifo = ((ssrval >> 12) & 0xf) + 1;
++
++ if(number_of_entries_in_fifo < TS_SAMPLES * 2) {
++ /* Not ready yet. Come back later. */
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ mod_timer(&ts->timer, jiffies + inc);
++ return;
++ }
++
++ if(number_of_entries_in_fifo == TS_SAMPLES * 2) {
++ int i, j;
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ a[i] = SSDR_P(ts->port);
++ }
++ /* Sort them (bubble) */
++ for(j = TS_SAMPLES - 1; j > 0; j--) {
++ for(i = 0; i < j; i++) {
++ if(a[i] > a[i + 1]) {
++ int tmp;
++ tmp = a[i+1];
++ a[i+1] = a[i];
++ a[i] = tmp;
++ }
++ }
++ }
++
++ /* Take the average of the middle two */
++ /* x = (a[TS_SAMPLES/2 - 1] + a[TS_SAMPLES/2] + a[TS_SAMPLES/2+1] + a[TS_SAMPLES/2+2]) >> 2; */
++ x = a[TS_SAMPLES/2];
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ a[i] = SSDR_P(ts->port);
++ }
++ /* Sort them (bubble) */
++ for(j = TS_SAMPLES - 1; j > 0; j--) {
++ for(i = 0; i < j; i++) {
++ if(a[i] > a[i + 1]) {
++ int tmp;
++ tmp = a[i+1];
++ a[i+1] = a[i];
++ a[i] = tmp;
++ }
++ }
++ }
++
++
++ /* Take the average of the middle two */
++ /* y = (a[TS_SAMPLES/2 - 1] + a[TS_SAMPLES/2] + a[TS_SAMPLES/2+1] + a[TS_SAMPLES/2+2]) >> 2; */
++ y = a[TS_SAMPLES/2];
++ } else {
++ /* We have an error! Too many entries. */
++ printk(KERN_ERR "TS: Expected %d entries. Got %d\n", TS_SAMPLES*2, number_of_entries_in_fifo);
++ /* Try to clear the FIFO */
++ while(number_of_entries_in_fifo--) {
++ (void)SSDR_P(ts->port);
++ }
++
++ if (ts->pen_down())
++ start_read(ts);
++
++ return;
++ }
++ } else {
++ /* Not ready yet. Come back later. */
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ mod_timer(&ts->timer, jiffies + inc);
++ return;
++ }
++
++ /*
++ * Now we check to see if the pen is still down. If it is, then call
++ * start_read().
++ */
++ if (ts->pen_down())
++ {
++ /* Still down */
++ if(oldx != x || oldy != y) {
++ oldx = x;
++ oldy = y;
++ report_touchpanel(ts, 1, x, y);
++ }
++ start_read(ts);
++ } else {
++ /* Up */
++ report_touchpanel(ts, 0, 0, 0);
++ irqblock = 0;
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ /* Re-enable pen down interrupt */
++ enable_irq(ts->irq);
++ }
++}
++
++static int pen_down(void)
++{
++ return ( asic3_get_gpio_status_a( &htcuniversal_asic3.dev ) & (1<<GPIOA_TOUCHSCREEN_N)) == 0 ;
++}
++
++static int
++ts_probe (struct platform_device *dev)
++{
++ int retval;
++ struct touchscreen_data *ts;
++ struct tsc2046_mach_info *mach = dev->dev.platform_data;
++
++ printk("htcuniversal: ts_probe\n");
++
++ ts = ts_data = kmalloc (sizeof (*ts), GFP_KERNEL);
++ if (ts == NULL) {
++ printk( KERN_NOTICE "htcuniversal_ts: unable to allocate memory\n" );
++ return -ENOMEM;
++ }
++ memset (ts, 0, sizeof (*ts));
++
++ ts->input = input_allocate_device();
++ if (ts->input == NULL) {
++ printk( KERN_NOTICE "htcuniversal_ts: unable to allocation touchscreen input\n" );
++ kfree(ts);
++ return -ENOMEM;
++ }
++ ts->input->evbit[0] = BIT(EV_ABS);
++ ts->input->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
++ ts->input->absmin[ABS_X] = 0;
++ ts->input->absmax[ABS_X] = 32767;
++ ts->input->absmin[ABS_Y] = 0;
++ ts->input->absmax[ABS_Y] = 32767;
++ ts->input->absmin[ABS_PRESSURE] = 0;
++ ts->input->absmax[ABS_PRESSURE] = 1;
++
++ ts->input->name = "htcuniversal_ts";
++ ts->input->phys = "touchscreen/htcuniversal_ts";
++ ts->input->private = ts;
++
++ input_register_device(ts->input);
++
++ ts->timer.function = ts_timer_callback;
++ ts->timer.data = (unsigned long)ts;
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ init_timer (&ts->timer);
++
++ platform_set_drvdata(dev, ts);
++
++ ts->port=-1;
++
++ if (mach) {
++ ts->port = mach->port;
++ ts->clock = mach->clock;
++ ts->pwrbit_X = mach->pwrbit_X;
++ ts->pwrbit_Y = mach->pwrbit_Y;
++
++ /* static irq */
++ if (mach->irq)
++ ts->irq = mach->irq;
++
++ if (mach->pen_down)
++ ts->pen_down=mach->pen_down;
++ }
++
++ if (ts->port == -1)
++ {
++ printk("tsc2046: your device is not supported by this driver\n");
++ return -ENODEV;
++ }
++
++ /* *** Initialize the SSP interface *** */
++ ssp_init(ts->port, ts->clock);
++
++ while(!(SSSR_P(ts->port) & SSSR_TNF))
++ ;
++ SSDR_P(ts->port) = (TSC2046_SAMPLE_X|(ts->pwrbit_X))<<16;
++
++ for(retval = 0; retval < 100; retval++) {
++ if(SSSR_P(ts->port) & SSSR_RNE) {
++ while(SSSR_P(ts->port) & SSSR_RNE) {
++ (void)SSDR_P(ts->port);
++ }
++ break;
++ }
++ mdelay(1);
++ }
++
++ if (machine_is_htcuniversal() )
++ {
++ ts->irq = asic3_irq_base( &htcuniversal_asic3.dev ) + ASIC3_GPIOA_IRQ_BASE + GPIOA_TOUCHSCREEN_N;
++ ts->pen_down=pen_down;
++ }
++
++ retval = request_irq(ts->irq, pen_isr, IRQF_DISABLED, "tsc2046_ts", ts);
++ if(retval) {
++ printk("Unable to get interrupt\n");
++ input_unregister_device (ts->input);
++ return -ENODEV;
++ }
++ set_irq_type(ts->irq, IRQ_TYPE_EDGE_FALLING);
++
++ return 0;
++}
++
++static int
++ts_remove (struct platform_device *dev)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ input_unregister_device (ts->input);
++ del_timer_sync (&ts->timer);
++ free_irq (ts->irq, ts);
++ pxa_set_cken(ts->clock, 0);
++
++ kfree(ts);
++ return 0;
++}
++
++static int
++ts_suspend (struct platform_device *dev, pm_message_t state)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ disable_irq(ts->irq);
++
++ printk("htcuniversal_ts2_suspend: called.\n");
++ return 0;
++}
++
++static int
++ts_resume (struct platform_device *dev)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ ssp_init(ts->port, ts->clock);
++ enable_irq(ts->irq);
++
++ printk("htcuniversal_ts2_resume: called.\n");
++ return 0;
++}
++
++static struct platform_driver ts_driver = {
++ .probe = ts_probe,
++ .remove = ts_remove,
++ .suspend = ts_suspend,
++ .resume = ts_resume,
++ .driver = {
++ .name = "htcuniversal_ts",
++ },
++};
++
++
++static int
++ts_module_init (void)
++{
++ printk(KERN_NOTICE "HTC Universal Touch Screen Driver\n");
++
++ return platform_driver_register(&ts_driver);
++}
++
++static void
++ts_module_cleanup (void)
++{
++ platform_driver_unregister (&ts_driver);
++}
++
++module_init(ts_module_init);
++module_exit(ts_module_cleanup);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Touch Screen Driver");
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,71 @@
++
++/*
++ *
++ * htcuniversal_udc.c:
++ * htcuniversal specific code for the pxa27x usb device controller.
++ *
++ * Use consistent with the GNU GPL is permitted.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/udc.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static void htcuniversal_udc_command(int cmd)
++{
++ switch (cmd) {
++ case PXA2XX_UDC_CMD_DISCONNECT:
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev,
++ 1<<GPIOB_USB_PUEN, 0);
++// SET_HTCUNIVERSAL_GPIO(USB_PUEN,0);
++ break;
++ case PXA2XX_UDC_CMD_CONNECT:
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev,
++ 1<<GPIOB_USB_PUEN, 1<<GPIOB_USB_PUEN);
++// SET_HTCUNIVERSAL_GPIO(USB_PUEN,1);
++ break;
++ default:
++ printk("_udc_control: unknown command!\n");
++ break;
++ }
++}
++
++static int htcuniversal_udc_is_connected(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(USB_DET) != 0);
++}
++
++static struct pxa2xx_udc_mach_info htcuniversal_udc_info __initdata = {
++ .udc_is_connected = htcuniversal_udc_is_connected,
++ .udc_command = htcuniversal_udc_command,
++};
++
++static int htcuniversal_udc_probe(struct platform_device * dev)
++{
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_USB_PUEN, 1<<GPIOB_USB_PUEN);
++
++ pxa_set_udc_info(&htcuniversal_udc_info);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_udc_driver = {
++ .driver = {
++ .name = "htcuniversal_udc",
++ },
++ .probe = htcuniversal_udc_probe,
++};
++
++static int __init htcuniversal_udc_init(void)
++{
++ return platform_driver_register(&htcuniversal_udc_driver);
++}
++
++module_init(htcuniversal_udc_init);
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,20 @@
++/*
++ * temporary TSC2046 touchscreen hack
++ */
++
++#ifndef _TSC2046_TS_H
++#define _TSC2046_TS_H
++
++struct tsc2046_mach_info {
++ int port;
++ int clock;
++ int pwrbit_X;
++ int pwrbit_Y;
++ int irq;
++ int (*pen_down)(void);
++};
++
++#define TSC2046_SAMPLE_X 0xd0
++#define TSC2046_SAMPLE_Y 0x90
++
++#endif
+Index: linux-2.6.24/arch/arm/mach-pxa/Kconfig
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/Kconfig 2008-03-10 16:08:01.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -92,6 +92,14 @@
+ bool "Sharp PXA270 models (SL-Cxx00)"
+ select PXA27x
+
++config MACH_HTCUNIVERSAL
++ bool "HTC Universal"
++ select PXA27x
++ help
++ Say Y here if you intend to run this kernel on a
++ HTC Universal. Currently there is only basic support
++ for this PDA.
++
+ endchoice
+
+ endif
+@@ -111,6 +119,86 @@
+
+ endif
+
++if MACH_HTCUNIVERSAL
++
++menu "HTC Universal support"
++
++config HTCUNIVERSAL_CORE
++ tristate "HTC Universal core"
++ depends on MACH_HTCUNIVERSAL
++ help
++ This selection enables HTC Universal core support.
++
++config HTCUNIVERSAL_UDC
++ bool "USB Device Controller support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && USB_PXA27X
++ help
++ Enables HTC Universal specific USB detection
++
++config HTCUNIVERSAL_POWER
++ tristate "HTC Universal power"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ This selection enables HTC Universal power monitoring
++ hardware support (through ASIC3).
++
++config HTCUNIVERSAL_BACKLIGHT
++ bool "HTC Universal Backlight"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD backlight.
++
++config HTCUNIVERSAL_LCD
++ tristate "HTC Universal LCD"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && LCD_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD display.
++
++config HTCUNIVERSAL_TS2
++ tristate "HTC Universal Touchscreen (old)"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ Enable support for the HTC Universal Touchscreen Panel.
++
++config HTCUNIVERSAL_BUTTONS
++ tristate "HTC Universal buttons support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++
++config HTCUNIVERSAL_BLUETOOTH
++ tristate "HTC Universal Bluetooth"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the TI BRF6150 Bluetooth Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_ASIC3_LEDS
++ tristate "HTC Universal ASIC3 LED support"
++ select LEDS_ASIC3
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ ---help---
++ Support for right (colors red+green+(amber)) and left (green+blue) led
++ Off/on hook keys LED backlight
++ Keyboard backlight
++ Vibra
++ Flashlight
++
++config HTCUNIVERSAL_PHONE
++ tristate "HTC Universal Phone"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the Qualcomm MSM6520 Phone Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_AK4641
++ depends on SND && I2C
++ tristate "AK4641 chipset support"
++
++endmenu
++
++endif
++
+ endmenu
+
+ config MACH_POODLE
+@@ -196,4 +284,3 @@
+ depends on (PXA25x || PXA27x) && INPUT
+
+ endif
+-
+Index: linux-2.6.24/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/Makefile 2008-03-10 16:08:01.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -23,6 +23,7 @@
+ obj-$(CONFIG_MACH_TOSA) += tosa.o
+ obj-$(CONFIG_MACH_EM_X270) += em-x270.o
+ obj-$(CONFIG_MACH_HX2750) += hx2750.o hx2750_test.o
++obj-$(CONFIG_MACH_HTCUNIVERSAL) += htcuniversal/
+
+ ifeq ($(CONFIG_MACH_ZYLONITE),y)
+ obj-y += zylonite.o
+Index: linux-2.6.24/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.24.orig/drivers/leds/Kconfig 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/leds/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -114,6 +114,13 @@
+ help
+ This option enables support for the CM-X270 LEDs.
+
++config LEDS_ASIC3
++ tristate "LED Support for the HTC ASIC3 chip"
++ depends on LEDS_CLASS && HTC_ASIC3
++ help
++ This option enables support for the LEDs connected to the
++ HTC ASIC3 chip.
++
+ comment "LED Triggers"
+
+ config LEDS_TRIGGERS
+Index: linux-2.6.24/drivers/leds/leds-asic3.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/leds/leds-asic3.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,189 @@
++/*
++ * LEDs support for HTC ASIC3 devices.
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include "leds.h"
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_leds.h>
++
++#ifdef DEBUG
++#define dbg(msg, ...) printk(msg, __VA_ARGS__)
++#else
++#define dbg(msg, ...)
++#endif
++
++static
++void asic3_leds_set(struct led_classdev *led_cdev, enum led_brightness b)
++{
++ struct asic3_led *led = container_of(led_cdev, struct asic3_led,
++ led_cdev);
++ struct asic3_leds_machinfo *machinfo = led->machinfo;
++ struct device *asic3_dev = &machinfo->asic3_pdev->dev;
++
++ dbg("%s:%s %d(%d)-%s %d\n", __FILE__, __FUNCTION__, led->hw_num,
++ led->gpio_num, led->led_cdev.name, b);
++
++ if (led->hw_num == -1) {
++ asic3_gpio_set_value(asic3_dev, led->gpio_num, b);
++ return;
++ }
++
++ if (b == LED_OFF) {
++ asic3_set_led(asic3_dev, led->hw_num, 0, 16, 6);
++ asic3_set_gpio_out_c(asic3_dev, led->hw_num, 0);
++ }
++ else {
++ asic3_set_gpio_out_c(asic3_dev, led->hw_num, led->hw_num);
++ #ifdef CONFIG_LEDS_TRIGGER_HWTIMER
++ if (led_cdev->trigger && led_cdev->trigger->is_led_supported &&
++ (led_cdev->trigger->is_led_supported(led_cdev) &
++ LED_SUPPORTS_HWTIMER)) {
++ struct hwtimer_data *td = led_cdev->trigger_data;
++ if (!td) return;
++ asic3_set_led(asic3_dev, led->hw_num, td->delay_on/8,
++ (td->delay_on + td->delay_off)/8, 6);
++ }
++ else
++ #endif
++ asic3_set_led(asic3_dev, led->hw_num, 16, 16, 6);
++ }
++
++ return;
++}
++
++static
++int asic3_leds_probe(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int ret, i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ // Turn on clocks early, for the case if trigger would enable
++ // led immediately after led_classdev_register().
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2);
++
++ for (i = 0; i < machinfo->num_leds; i++) {
++ leds[i].machinfo = machinfo;
++ leds[i].led_cdev.brightness_set = asic3_leds_set;
++ ret = led_classdev_register(&pdev->dev, &leds[i].led_cdev);
++ if (ret) {
++ printk(KERN_ERR "Error: can't register %s led\n",
++ leds[i].led_cdev.name);
++ goto out_err;
++ }
++ }
++
++ return 0;
++
++out_err:
++ while (--i >= 0) led_classdev_unregister(&leds[i].led_cdev);
++
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ 0 | 0 | 0);
++
++ return ret;
++}
++
++static
++int asic3_leds_remove(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_unregister(&leds[i].led_cdev);
++
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ 0 | 0 | 0);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++
++static
++int asic3_leds_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_suspend(&leds[i].led_cdev);
++
++ return 0;
++}
++
++static
++int asic3_leds_resume(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_resume(&leds[i].led_cdev);
++
++ return 0;
++}
++
++#endif
++
++static
++struct platform_driver asic3_leds_driver = {
++ .probe = asic3_leds_probe,
++ .remove = asic3_leds_remove,
++#ifdef CONFIG_PM
++ .suspend = asic3_leds_suspend,
++ .resume = asic3_leds_resume,
++#endif
++ .driver = {
++ .name = "asic3-leds",
++ },
++};
++
++int asic3_leds_register(void)
++{
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++ return platform_driver_register(&asic3_leds_driver);
++}
++
++void asic3_leds_unregister(void)
++{
++ platform_driver_unregister(&asic3_leds_driver);
++ return;
++}
++
++EXPORT_SYMBOL_GPL(asic3_leds_register);
++EXPORT_SYMBOL_GPL(asic3_leds_unregister);
++
++MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
++MODULE_DESCRIPTION("HTC ASIC3 LEDs driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/drivers/mfd/Kconfig
+===================================================================
+--- linux-2.6.24.orig/drivers/mfd/Kconfig 2008-03-10 16:07:51.000000000 +0000
++++ linux-2.6.24/drivers/mfd/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -21,6 +21,16 @@
+ help
+ Support for TI TSC2101 Touchscreen and Audio Codec
+
++config HTC_ASIC3
++ tristate "HTC ASIC3 (iPAQ h1900/h3900/h4000/hx4700/rx3000) support"
++
++config HTC_ASIC3_DS1WM
++ bool "Support HTC ASIC3 builtin DS1WM block"
++ help
++ Choose Y here if you want to include support for ASIC3's builtin
++ W1 controller. Some devices do not use it, and yet other have
++ separate DS1WM controller. For them, choose N.
++
+ endmenu
+
+ menu "Multimedia Capabilities Port drivers"
+Index: linux-2.6.24/drivers/mfd/Makefile
+===================================================================
+--- linux-2.6.24.orig/drivers/mfd/Makefile 2008-03-10 16:07:51.000000000 +0000
++++ linux-2.6.24/drivers/mfd/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -2,6 +2,8 @@
+ # Makefile for multifunction miscellaneous devices
+ #
+
++obj-$(CONFIG_HTC_ASIC3) += asic3_base.o soc-core.o
++
+ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MCP) += mcp-core.o
+Index: linux-2.6.24/drivers/mfd/asic3_base.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/mfd/asic3_base.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,1208 @@
++/*
++ * Driver interface to HTC "ASIC3"
++ *
++ * Copyright 2001 Compaq Computer Corporation.
++ * Copyright 2004-2005 Phil Blundell
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Andrew Christian
++ * <Andrew.Christian@compaq.com>
++ * October 2001
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/irq.h>
++#include <linux/clk.h>
++#include <linux/ds1wm.h>
++#include <asm/arch/clock.h>
++
++#include <asm/hardware.h>
++#include <asm/irq.h>
++#include <asm/io.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++#include <linux/soc/tmio_mmc.h>
++#include "soc-core.h"
++
++
++struct asic3_data {
++ void *mapping;
++ unsigned int bus_shift;
++ int irq_base;
++ int irq_nr;
++
++ u16 irq_bothedge[4];
++ struct device *dev;
++
++ struct platform_device *mmc_dev;
++};
++
++static DEFINE_SPINLOCK(asic3_gpio_lock);
++
++static int asic3_remove(struct platform_device *dev);
++
++static inline unsigned long asic3_address(struct device *dev,
++ unsigned int reg)
++{
++ struct asic3_data *adata;
++
++ adata = (struct asic3_data *)dev->driver_data;
++
++ return (unsigned long)adata->mapping + (reg >> (2 - adata->bus_shift));
++}
++
++void asic3_write_register(struct device *dev, unsigned int reg, u32 value)
++{
++ __raw_writew(value, asic3_address(dev, reg));
++}
++EXPORT_SYMBOL(asic3_write_register);
++
++u32 asic3_read_register(struct device *dev, unsigned int reg)
++{
++ return __raw_readw(asic3_address(dev, reg));
++}
++EXPORT_SYMBOL(asic3_read_register);
++
++static inline void __asic3_write_register(struct asic3_data *asic,
++ unsigned int reg, u32 value)
++{
++ __raw_writew(value, (unsigned long)asic->mapping
++ + (reg >> (2 - asic->bus_shift)));
++}
++
++static inline u32 __asic3_read_register(struct asic3_data *asic,
++ unsigned int reg)
++{
++ return __raw_readw((unsigned long)asic->mapping
++ + (reg >> (2 - asic->bus_shift)));
++}
++
++#define ASIC3_GPIO_FN(get_fn_name, set_fn_name, REG) \
++u32 get_fn_name(struct device *dev) \
++{ \
++ return asic3_read_register(dev, REG); \
++} \
++EXPORT_SYMBOL(get_fn_name); \
++ \
++void set_fn_name(struct device *dev, u32 bits, u32 val) \
++{ \
++ unsigned long flags; \
++ \
++ spin_lock_irqsave(&asic3_gpio_lock, flags); \
++ val |= (asic3_read_register(dev, REG) & ~bits); \
++ asic3_write_register(dev, REG, val); \
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags); \
++} \
++EXPORT_SYMBOL(set_fn_name);
++
++#define ASIC3_GPIO_REGISTER(ACTION, action, fn, FN) \
++ ASIC3_GPIO_FN(asic3_get_gpio_ ## action ## _ ## fn , \
++ asic3_set_gpio_ ## action ## _ ## fn , \
++ _IPAQ_ASIC3_GPIO_ ## FN ## _Base \
++ + _IPAQ_ASIC3_GPIO_ ## ACTION )
++
++#define ASIC3_GPIO_FUNCTIONS(fn, FN) \
++ ASIC3_GPIO_REGISTER(Direction, dir, fn, FN) \
++ ASIC3_GPIO_REGISTER(Out, out, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepMask, sleepmask, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepOut, sleepout, fn, FN) \
++ ASIC3_GPIO_REGISTER(BattFaultOut, battfaultout, fn, FN) \
++ ASIC3_GPIO_REGISTER(AltFunction, alt_fn, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepConf, sleepconf, fn, FN) \
++ ASIC3_GPIO_REGISTER(Status, status, fn, FN)
++
++#if 0
++ ASIC3_GPIO_REGISTER(Mask, mask, fn, FN)
++ ASIC3_GPIO_REGISTER(TriggerType, trigtype, fn, FN)
++ ASIC3_GPIO_REGISTER(EdgeTrigger, rising, fn, FN)
++ ASIC3_GPIO_REGISTER(LevelTrigger, triglevel, fn, FN)
++ ASIC3_GPIO_REGISTER(IntStatus, intstatus, fn, FN)
++#endif
++
++ASIC3_GPIO_FUNCTIONS(a, A)
++ASIC3_GPIO_FUNCTIONS(b, B)
++ASIC3_GPIO_FUNCTIONS(c, C)
++ASIC3_GPIO_FUNCTIONS(d, D)
++
++int asic3_gpio_get_value(struct device *dev, unsigned gpio)
++{
++ u32 mask = ASIC3_GPIO_bit(gpio);
++ printk("%s(%d)\n", __FUNCTION__, gpio);
++ switch (gpio >> 4) {
++ case _IPAQ_ASIC3_GPIO_BANK_A:
++ return asic3_get_gpio_status_a(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_B:
++ return asic3_get_gpio_status_b(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_C:
++ return asic3_get_gpio_status_c(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_D:
++ return asic3_get_gpio_status_d(dev) & mask;
++ }
++
++ printk(KERN_ERR "%s: invalid GPIO value 0x%x", __FUNCTION__, gpio);
++ return 0;
++}
++EXPORT_SYMBOL(asic3_gpio_get_value);
++
++void asic3_gpio_set_value(struct device *dev, unsigned gpio, int val)
++{
++ u32 mask = ASIC3_GPIO_bit(gpio);
++ u32 bitval = 0;
++ if (val) bitval = mask;
++ printk("%s(%d, %d)\n", __FUNCTION__, gpio, val);
++
++ switch (gpio >> 4) {
++ case _IPAQ_ASIC3_GPIO_BANK_A:
++ asic3_set_gpio_out_a(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_B:
++ asic3_set_gpio_out_b(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_C:
++ asic3_set_gpio_out_c(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_D:
++ asic3_set_gpio_out_d(dev, mask, bitval);
++ return;
++ }
++
++ printk(KERN_ERR "%s: invalid GPIO value 0x%x", __FUNCTION__, gpio);
++}
++EXPORT_SYMBOL(asic3_gpio_set_value);
++
++int asic3_irq_base(struct device *dev)
++{
++ struct asic3_data *asic = dev->driver_data;
++
++ return asic->irq_base;
++}
++EXPORT_SYMBOL(asic3_irq_base);
++
++static int asic3_gpio_to_irq(struct device *dev, unsigned gpio)
++{
++ struct asic3_data *asic = dev->driver_data;
++ printk("%s(%d)\n", __FUNCTION__, gpio);
++
++ return asic->irq_base + gpio;
++}
++
++void asic3_set_led(struct device *dev, int led_num, int duty_time,
++ int cycle_time, int timebase)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned int led_base;
++
++ /* it's a macro thing: see #define _IPAQ_ASIC_LED_0_Base for why you
++ * can't substitute led_num in the macros below...
++ */
++
++ switch (led_num) {
++ case 0:
++ led_base = _IPAQ_ASIC3_LED_0_Base;
++ break;
++ case 1:
++ led_base = _IPAQ_ASIC3_LED_1_Base;
++ break;
++ case 2:
++ led_base = _IPAQ_ASIC3_LED_2_Base;
++ break;
++ default:
++ printk(KERN_ERR "%s: invalid led number %d", __FUNCTION__,
++ led_num);
++ return;
++ }
++
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_TimeBase,
++ timebase | LED_EN);
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_PeriodTime,
++ cycle_time);
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_DutyTime,
++ 0);
++ udelay(20); /* asic voodoo - possibly need a whole duty cycle? */
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_DutyTime,
++ duty_time);
++}
++EXPORT_SYMBOL(asic3_set_led);
++
++void asic3_set_clock_sel(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_clock_sel);
++
++void asic3_set_clock_cdex(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_clock_cdex);
++
++static void asic3_clock_cdex_enable(struct clk *clk)
++{
++ struct asic3_data *asic = (struct asic3_data *)clk->parent->ctrlbit;
++ unsigned long flags, val;
++
++ local_irq_save(flags);
++
++ val = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ val |= clk->ctrlbit;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), val);
++
++ local_irq_restore(flags);
++}
++
++static void asic3_clock_cdex_disable(struct clk *clk)
++{
++ struct asic3_data *asic = (struct asic3_data *)clk->parent->ctrlbit;
++ unsigned long flags, val;
++
++ local_irq_save(flags);
++
++ val = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ val &= ~clk->ctrlbit;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), val);
++
++ local_irq_restore(flags);
++}
++
++/* base clocks */
++
++static struct clk clk_g = {
++ .name = "gclk",
++ .rate = 0,
++ .parent = NULL,
++};
++
++/* clock definitions */
++
++static struct clk asic3_clocks[] = {
++ {
++ .name = "spi",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_SPI,
++ },
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ {
++ .name = "ds1wm",
++ .id = -1,
++ .rate = 5000000,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_OWM,
++ },
++#endif
++ {
++ .name = "pwm0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_PWM0,
++ },
++ {
++ .name = "pwm1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_PWM1,
++ },
++ {
++ .name = "led0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED0,
++ },
++ {
++ .name = "led1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED1,
++ },
++ {
++ .name = "led2",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED2,
++ },
++ {
++ .name = "smbus",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_SMBUS,
++ },
++ {
++ .name = "ex0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_EX0,
++ },
++ {
++ .name = "ex1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_EX1,
++ },
++};
++
++void asic3_set_extcf_select(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Select));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Select), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_extcf_select);
++
++void asic3_set_extcf_reset(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Reset));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Reset), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_extcf_reset);
++
++void asic3_set_sdhwctrl(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave (&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(SDHWCTRL, SDConf));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(SDHWCTRL, SDConf), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_sdhwctrl);
++
++
++#define MAX_ASIC_ISR_LOOPS 20
++#define _IPAQ_ASIC3_GPIO_Base_INCR \
++ (_IPAQ_ASIC3_GPIO_B_Base - _IPAQ_ASIC3_GPIO_A_Base)
++
++static inline void asic3_irq_flip_edge(struct asic3_data *asic,
++ u32 base, int bit)
++{
++ u16 edge = __asic3_read_register(asic,
++ base + _IPAQ_ASIC3_GPIO_EdgeTrigger);
++ edge ^= bit;
++ __asic3_write_register(asic,
++ base + _IPAQ_ASIC3_GPIO_EdgeTrigger, edge);
++}
++
++static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
++{
++ int iter;
++ struct asic3_data *asic;
++
++ /* Acknowledge the parrent (i.e. CPU's) IRQ */
++ desc->chip->ack(irq);
++
++ asic = desc->handler_data;
++
++ /* printk( KERN_NOTICE "asic3_irq_demux: irq=%d\n", irq ); */
++ for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) {
++ u32 status;
++ int bank;
++
++ status = __asic3_read_register(asic,
++ IPAQ_ASIC3_OFFSET(INTR, PIntStat));
++ /* Check all ten register bits */
++ if ((status & 0x3ff) == 0)
++ break;
++
++ /* Handle GPIO IRQs */
++ for (bank = 0; bank < 4; bank++) {
++ if (status & (1 << bank)) {
++ unsigned long base, i, istat;
++
++ base = _IPAQ_ASIC3_GPIO_A_Base
++ + bank * _IPAQ_ASIC3_GPIO_Base_INCR;
++ istat = __asic3_read_register(asic,
++ base + _IPAQ_ASIC3_GPIO_IntStatus);
++ /* IntStatus is write 0 to clear */
++ /* XXX could miss interrupts! */
++ __asic3_write_register(asic,
++ base + _IPAQ_ASIC3_GPIO_IntStatus, 0);
++
++ for (i = 0; i < 16; i++) {
++ int bit = (1 << i);
++ unsigned int irqnr;
++ if (!(istat & bit))
++ continue;
++
++ irqnr = asic->irq_base
++ + (16 * bank) + i;
++ desc = irq_desc + irqnr;
++ desc->handle_irq(irqnr, desc);
++ if (asic->irq_bothedge[bank] & bit) {
++ asic3_irq_flip_edge(asic, base,
++ bit);
++ }
++ }
++ }
++ }
++
++ /* Handle remaining IRQs in the status register */
++ {
++ int i;
++
++ for (i = ASIC3_LED0_IRQ; i <= ASIC3_OWM_IRQ; i++) {
++ /* They start at bit 4 and go up */
++ if (status & (1 << (i - ASIC3_LED0_IRQ + 4))) {
++ desc = irq_desc + asic->irq_base + i;
++ desc->handle_irq(asic->irq_base + i,
++ desc);
++ }
++ }
++ }
++
++ }
++
++ if (iter >= MAX_ASIC_ISR_LOOPS)
++ printk(KERN_ERR "%s: interrupt processing overrun\n",
++ __FUNCTION__);
++}
++
++static inline int asic3_irq_to_bank(struct asic3_data *asic, int irq)
++{
++ int n;
++
++ n = (irq - asic->irq_base) >> 4;
++
++ return (n * (_IPAQ_ASIC3_GPIO_B_Base - _IPAQ_ASIC3_GPIO_A_Base));
++}
++
++static inline int asic3_irq_to_index(struct asic3_data *asic, int irq)
++{
++ return (irq - asic->irq_base) & 15;
++}
++
++static void asic3_mask_gpio_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 val, bank, index;
++ unsigned long flags;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ val = __asic3_read_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask);
++ val |= 1 << index;
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask, val);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++
++static void asic3_mask_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ int regval;
++
++ if (irq < ASIC3_NR_GPIO_IRQS) {
++ printk(KERN_ERR "asic3_base: gpio mask attempt, irq %d\n",
++ irq);
++ return;
++ }
++
++ regval = __asic3_read_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask);
++
++ switch (irq - asic->irq_base) {
++ case ASIC3_LED0_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK0);
++ break;
++ case ASIC3_LED1_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK1);
++ break;
++ case ASIC3_LED2_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK2);
++ break;
++ case ASIC3_SPI_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK3);
++ break;
++ case ASIC3_SMBUS_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK4);
++ break;
++ case ASIC3_OWM_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK5);
++ break;
++ default:
++ printk(KERN_ERR "asic3_base: bad non-gpio irq %d\n", irq);
++ break;
++ }
++}
++
++static void asic3_unmask_gpio_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 val, bank, index;
++ unsigned long flags;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ val = __asic3_read_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask);
++ val &= ~(1 << index);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask, val);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++
++static void asic3_unmask_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ int regval;
++
++ if (irq < ASIC3_NR_GPIO_IRQS) {
++ printk(KERN_ERR "asic3_base: gpio unmask attempt, irq %d\n",
++ irq);
++ return;
++ }
++
++ regval = __asic3_read_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask);
++
++ switch (irq - asic->irq_base) {
++ case ASIC3_LED0_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK0);
++ break;
++ case ASIC3_LED1_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK1);
++ break;
++ case ASIC3_LED2_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK2);
++ break;
++ case ASIC3_SPI_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK3);
++ break;
++ case ASIC3_SMBUS_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK4);
++ break;
++ case ASIC3_OWM_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK5);
++ break;
++ default:
++ printk(KERN_ERR "asic3_base: bad non-gpio irq %d\n", irq);
++ break;
++ }
++}
++
++static int asic3_gpio_irq_type(unsigned int irq, unsigned int type)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 bank, index;
++ unsigned long flags;
++ u16 trigger, level, edge, bit;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++ bit = 1<<index;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ level = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_LevelTrigger);
++ edge = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_EdgeTrigger);
++ trigger = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_TriggerType);
++ asic->irq_bothedge[(irq - asic->irq_base) >> 4] &= ~bit;
++
++ if (type == IRQT_RISING) {
++ trigger |= bit;
++ edge |= bit;
++ } else if (type == IRQT_FALLING) {
++ trigger |= bit;
++ edge &= ~bit;
++ } else if (type == IRQT_BOTHEDGE) {
++ trigger |= bit;
++ if (asic3_gpio_get_value(asic->dev, irq - asic->irq_base))
++ edge &= ~bit;
++ else
++ edge |= bit;
++ asic->irq_bothedge[(irq - asic->irq_base) >> 4] |= bit;
++ } else if (type == IRQT_LOW) {
++ trigger &= ~bit;
++ level &= ~bit;
++ } else if (type == IRQT_HIGH) {
++ trigger &= ~bit;
++ level |= bit;
++ } else {
++ /*
++ * if type == IRQT_NOEDGE, we should mask interrupts, but
++ * be careful to not unmask them if mask was also called.
++ * Probably need internal state for mask.
++ */
++ printk(KERN_NOTICE "asic3: irq type not changed.\n");
++ }
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_LevelTrigger,
++ level);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_EdgeTrigger,
++ edge);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_TriggerType,
++ trigger);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++ return 0;
++}
++
++static struct irq_chip asic3_gpio_irq_chip = {
++ .name = "ASIC3-GPIO",
++ .ack = asic3_mask_gpio_irq,
++ .mask = asic3_mask_gpio_irq,
++ .unmask = asic3_unmask_gpio_irq,
++ .set_type = asic3_gpio_irq_type,
++};
++
++static struct irq_chip asic3_irq_chip = {
++ .name = "ASIC3",
++ .ack = asic3_mask_irq,
++ .mask = asic3_mask_irq,
++ .unmask = asic3_unmask_irq,
++};
++
++static void asic3_release(struct device *dev)
++{
++ struct platform_device *sdev = to_platform_device(dev);
++
++ kfree(sdev->resource);
++ kfree(sdev);
++}
++
++int asic3_register_mmc(struct device *dev)
++{
++ struct platform_device *sdev = kzalloc(sizeof(*sdev), GFP_KERNEL);
++ struct tmio_mmc_hwconfig *mmc_config = kmalloc(sizeof(*mmc_config),
++ GFP_KERNEL);
++ struct platform_device *pdev = to_platform_device(dev);
++ struct asic3_data *asic = dev->driver_data;
++ struct asic3_platform_data *asic3_pdata = dev->platform_data;
++ struct resource *res;
++ int rc;
++
++ if (sdev == NULL || mmc_config == NULL)
++ return -ENOMEM;
++
++ if (asic3_pdata->tmio_mmc_hwconfig) {
++ memcpy(mmc_config, asic3_pdata->tmio_mmc_hwconfig,
++ sizeof(*mmc_config));
++ } else {
++ memset(mmc_config, 0, sizeof(*mmc_config));
++ }
++ mmc_config->address_shift = asic->bus_shift;
++
++ sdev->id = -1;
++ sdev->name = "asic3_mmc";
++ sdev->dev.parent = dev;
++ sdev->num_resources = 2;
++ sdev->dev.platform_data = mmc_config;
++ sdev->dev.release = asic3_release;
++
++ res = kzalloc(sdev->num_resources * sizeof(struct resource),
++ GFP_KERNEL);
++ if (res == NULL) {
++ kfree(sdev);
++ kfree(mmc_config);
++ return -ENOMEM;
++ }
++ sdev->resource = res;
++
++ res[0].start = pdev->resource[2].start;
++ res[0].end = pdev->resource[2].end;
++ res[0].flags = IORESOURCE_MEM;
++ res[1].start = res[1].end = pdev->resource[3].start;
++ res[1].flags = IORESOURCE_IRQ;
++
++ rc = platform_device_register(sdev);
++ if (rc) {
++ printk(KERN_ERR "asic3_base: "
++ "Could not register asic3_mmc device\n");
++ kfree(res);
++ kfree(sdev);
++ return rc;
++ }
++
++ asic->mmc_dev = sdev;
++
++ return 0;
++}
++EXPORT_SYMBOL(asic3_register_mmc);
++
++int asic3_unregister_mmc(struct device *dev)
++{
++ struct asic3_data *asic = dev->driver_data;
++ platform_device_unregister(asic->mmc_dev);
++ asic->mmc_dev = 0;
++
++ return 0;
++}
++EXPORT_SYMBOL(asic3_unregister_mmc);
++
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++/*
++ * DS1WM subdevice
++ */
++
++static void asic3_ds1wm_enable(struct platform_device *ds1wm_dev)
++{
++ struct device *dev = ds1wm_dev->dev.parent;
++
++ /* Turn on external clocks and the OWM clock */
++ asic3_set_clock_cdex(dev,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM);
++
++ mdelay(1);
++
++ asic3_set_extcf_reset(dev, ASIC3_EXTCF_OWM_RESET,
++ ASIC3_EXTCF_OWM_RESET);
++ mdelay(1);
++ asic3_set_extcf_reset(dev, ASIC3_EXTCF_OWM_RESET, 0);
++ mdelay(1);
++
++ /* Clear OWM_SMB, set OWM_EN */
++ asic3_set_extcf_select(dev,
++ ASIC3_EXTCF_OWM_SMB | ASIC3_EXTCF_OWM_EN,
++ 0 | ASIC3_EXTCF_OWM_EN);
++
++ mdelay(1);
++}
++
++static void asic3_ds1wm_disable(struct platform_device *ds1wm_dev)
++{
++ struct device *dev = ds1wm_dev->dev.parent;
++
++ asic3_set_extcf_select(dev,
++ ASIC3_EXTCF_OWM_SMB | ASIC3_EXTCF_OWM_EN,
++ 0 | 0);
++
++ asic3_set_clock_cdex(dev,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | 0);
++}
++
++
++static struct resource asic3_ds1wm_resources[] = {
++ {
++ .start = _IPAQ_ASIC3_OWM_Base,
++ .end = _IPAQ_ASIC3_OWM_Base + 0x14 - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = ASIC3_OWM_IRQ,
++ .end = ASIC3_OWM_IRQ,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
++ IORESOURCE_IRQ_SOC_SUBDEVICE,
++ },
++};
++
++static struct ds1wm_platform_data ds1wm_pd = {
++ .enable = asic3_ds1wm_enable,
++ .disable = asic3_ds1wm_disable,
++};
++#endif
++
++static struct soc_device_data asic3_blocks[] = {
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ {
++ .name = "ds1wm",
++ .res = asic3_ds1wm_resources,
++ .num_resources = ARRAY_SIZE(asic3_ds1wm_resources),
++ .hwconfig = &ds1wm_pd,
++ },
++#endif
++};
++
++static int asic3_probe(struct platform_device *pdev)
++{
++ struct asic3_platform_data *pdata = pdev->dev.platform_data;
++ struct asic3_data *asic;
++ struct device *dev = &pdev->dev;
++ unsigned long clksel;
++ int i, rc;
++
++ asic = kzalloc(sizeof(struct asic3_data), GFP_KERNEL);
++ if (!asic)
++ return -ENOMEM;
++
++ platform_set_drvdata(pdev, asic);
++ asic->dev = &pdev->dev;
++
++ asic->mapping = ioremap(pdev->resource[0].start, IPAQ_ASIC3_MAP_SIZE);
++ if (!asic->mapping) {
++ printk(KERN_ERR "asic3: couldn't ioremap ASIC3\n");
++ kfree (asic);
++ return -ENOMEM;
++ }
++
++ if (pdata && pdata->bus_shift)
++ asic->bus_shift = pdata->bus_shift;
++ else
++ asic->bus_shift = 2;
++
++ /* XXX: should get correct SD clock values from pdata struct */
++ clksel = 0;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), clksel);
++
++ /* Register ASIC3's clocks. */
++ clk_g.ctrlbit = (int)asic;
++
++ if (clk_register(&clk_g) < 0)
++ printk(KERN_ERR "asic3: failed to register ASIC3 gclk\n");
++
++ for (i = 0; i < ARRAY_SIZE(asic3_clocks); i++) {
++ rc = clk_register(&asic3_clocks[i]);
++ if (rc < 0)
++ printk(KERN_ERR "asic3: "
++ "failed to register clock %s (%d)\n",
++ asic3_clocks[i].name, rc);
++ }
++
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(A, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(B, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(C, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(D, Mask), 0xffff);
++
++ asic3_set_gpio_sleepmask_a(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_b(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_c(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_d(dev, 0xffff, 0xffff);
++
++ if (pdata) {
++ asic3_set_gpio_out_a(dev, 0xffff, pdata->gpio_a.init);
++ asic3_set_gpio_out_b(dev, 0xffff, pdata->gpio_b.init);
++ asic3_set_gpio_out_c(dev, 0xffff, pdata->gpio_c.init);
++ asic3_set_gpio_out_d(dev, 0xffff, pdata->gpio_d.init);
++
++ asic3_set_gpio_dir_a(dev, 0xffff, pdata->gpio_a.dir);
++ asic3_set_gpio_dir_b(dev, 0xffff, pdata->gpio_b.dir);
++ asic3_set_gpio_dir_c(dev, 0xffff, pdata->gpio_c.dir);
++ asic3_set_gpio_dir_d(dev, 0xffff, pdata->gpio_d.dir);
++
++ asic3_set_gpio_sleepmask_a(dev, 0xffff,
++ pdata->gpio_a.sleep_mask);
++ asic3_set_gpio_sleepmask_b(dev, 0xffff,
++ pdata->gpio_b.sleep_mask);
++ asic3_set_gpio_sleepmask_c(dev, 0xffff,
++ pdata->gpio_c.sleep_mask);
++ asic3_set_gpio_sleepmask_d(dev, 0xffff,
++ pdata->gpio_d.sleep_mask);
++
++ asic3_set_gpio_sleepout_a(dev, 0xffff,
++ pdata->gpio_a.sleep_out);
++ asic3_set_gpio_sleepout_b(dev, 0xffff,
++ pdata->gpio_b.sleep_out);
++ asic3_set_gpio_sleepout_c(dev, 0xffff,
++ pdata->gpio_c.sleep_out);
++ asic3_set_gpio_sleepout_d(dev, 0xffff,
++ pdata->gpio_d.sleep_out);
++
++ asic3_set_gpio_battfaultout_a(dev, 0xffff,
++ pdata->gpio_a.batt_fault_out);
++ asic3_set_gpio_battfaultout_b(dev, 0xffff,
++ pdata->gpio_b.batt_fault_out);
++ asic3_set_gpio_battfaultout_c(dev, 0xffff,
++ pdata->gpio_c.batt_fault_out);
++ asic3_set_gpio_battfaultout_d(dev, 0xffff,
++ pdata->gpio_d.batt_fault_out);
++
++ asic3_set_gpio_sleepconf_a(dev, 0xffff,
++ pdata->gpio_a.sleep_conf);
++ asic3_set_gpio_sleepconf_b(dev, 0xffff,
++ pdata->gpio_b.sleep_conf);
++ asic3_set_gpio_sleepconf_c(dev, 0xffff,
++ pdata->gpio_c.sleep_conf);
++ asic3_set_gpio_sleepconf_d(dev, 0xffff,
++ pdata->gpio_d.sleep_conf);
++
++ asic3_set_gpio_alt_fn_a(dev, 0xffff,
++ pdata->gpio_a.alt_function);
++ asic3_set_gpio_alt_fn_b(dev, 0xffff,
++ pdata->gpio_b.alt_function);
++ asic3_set_gpio_alt_fn_c(dev, 0xffff,
++ pdata->gpio_c.alt_function);
++ asic3_set_gpio_alt_fn_d(dev, 0xffff,
++ pdata->gpio_d.alt_function);
++ }
++
++ asic->irq_nr = -1;
++ asic->irq_base = -1;
++
++ if (pdev->num_resources > 1)
++ asic->irq_nr = pdev->resource[1].start;
++
++ if (asic->irq_nr != -1) {
++ unsigned int i;
++
++ if (!pdata->irq_base) {
++ printk(KERN_ERR "asic3: IRQ base not specified\n");
++ asic3_remove(pdev);
++ return -EINVAL;
++ }
++
++ asic->irq_base = pdata->irq_base;
++
++ /* turn on clock to IRQ controller */
++ clksel |= CLOCK_SEL_CX;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL),
++ clksel);
++
++ printk(KERN_INFO "asic3: using irq %d-%d on irq %d\n",
++ asic->irq_base, asic->irq_base + ASIC3_NR_IRQS - 1,
++ asic->irq_nr);
++
++ for (i = 0 ; i < ASIC3_NR_IRQS ; i++) {
++ int irq = i + asic->irq_base;
++ if (i < ASIC3_NR_GPIO_IRQS) {
++ set_irq_chip(irq, &asic3_gpio_irq_chip);
++ set_irq_chip_data(irq, asic);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ } else {
++ /* The remaining IRQs are not GPIO */
++ set_irq_chip(irq, &asic3_irq_chip);
++ set_irq_chip_data(irq, asic);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++ }
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ ASIC3_INTMASK_GINTMASK);
++
++ set_irq_chained_handler(asic->irq_nr, asic3_irq_demux);
++ set_irq_type(asic->irq_nr, IRQT_RISING);
++ set_irq_data(asic->irq_nr, asic);
++ }
++
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ ds1wm_pd.bus_shift = asic->bus_shift;
++#endif
++
++ pdata->gpiodev_ops.get = asic3_gpio_get_value;
++ pdata->gpiodev_ops.set = asic3_gpio_set_value;
++ pdata->gpiodev_ops.to_irq = asic3_gpio_to_irq;
++
++ soc_add_devices(pdev, asic3_blocks, ARRAY_SIZE(asic3_blocks),
++ &pdev->resource[0],
++ asic->bus_shift - ASIC3_DEFAULT_ADDR_SHIFT,
++ asic->irq_base);
++
++ if (pdev->num_resources > 2) {
++ int rc;
++ rc = asic3_register_mmc(dev);
++ if (rc) {
++ asic3_remove(pdev);
++ return rc;
++ }
++ }
++
++ if (pdata && pdata->num_child_platform_devs != 0)
++ platform_add_devices(pdata->child_platform_devs,
++ pdata->num_child_platform_devs);
++
++ return 0;
++}
++
++static int asic3_remove(struct platform_device *pdev)
++{
++ struct asic3_platform_data *pdata = pdev->dev.platform_data;
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ int i;
++
++ if (pdata && pdata->num_child_platform_devs != 0) {
++ for (i = 0; i < pdata->num_child_platform_devs; i++) {
++ platform_device_unregister(
++ pdata->child_platform_devs[i]);
++ }
++ }
++
++ if (asic->irq_nr != -1) {
++ unsigned int i;
++
++ for (i = 0 ; i < ASIC3_NR_IRQS ; i++) {
++ int irq = i + asic->irq_base;
++ set_irq_flags(irq, 0);
++ set_irq_handler (irq, NULL);
++ set_irq_chip (irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++
++ set_irq_chained_handler(asic->irq_nr, NULL);
++ }
++
++ if (asic->mmc_dev)
++ asic3_unregister_mmc(&pdev->dev);
++
++ for (i = 0; i < ARRAY_SIZE(asic3_clocks); i++)
++ clk_unregister(&asic3_clocks[i]);
++ clk_unregister(&clk_g);
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), 0);
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask), 0);
++
++ iounmap(asic->mapping);
++
++ kfree(asic);
++
++ return 0;
++}
++
++static void asic3_shutdown(struct platform_device *pdev)
++{
++}
++
++#define ASIC3_SUSPEND_CDEX_MASK \
++ (CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2)
++static unsigned short suspend_cdex;
++
++static int asic3_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ suspend_cdex = __asic3_read_register(asic,
++ _IPAQ_ASIC3_CLOCK_Base + _IPAQ_ASIC3_CLOCK_CDEX);
++ /* The LEDs are still active during suspend */
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_CLOCK_Base + _IPAQ_ASIC3_CLOCK_CDEX,
++ suspend_cdex & ASIC3_SUSPEND_CDEX_MASK);
++ return 0;
++}
++
++static int asic3_resume(struct platform_device *pdev)
++{
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ unsigned short intmask;
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX),
++ suspend_cdex);
++
++ if (asic->irq_nr != -1) {
++ /* Toggle the interrupt mask to try to get ASIC3 to show
++ * the CPU an interrupt edge. For more details see the
++ * kernel-discuss thread around 13 June 2005 with the
++ * subject "asic3 suspend / resume". */
++ intmask = __asic3_read_register(asic,
++ IPAQ_ASIC3_OFFSET(INTR, IntMask));
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ intmask & ~ASIC3_INTMASK_GINTMASK);
++ mdelay(1);
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ intmask | ASIC3_INTMASK_GINTMASK);
++ }
++
++ return 0;
++}
++
++static struct platform_driver asic3_device_driver = {
++ .driver = {
++ .name = "asic3",
++ },
++ .probe = asic3_probe,
++ .remove = asic3_remove,
++ .suspend = asic3_suspend,
++ .resume = asic3_resume,
++ .shutdown = asic3_shutdown,
++};
++
++static int __init asic3_base_init(void)
++{
++ int retval = 0;
++ retval = platform_driver_register(&asic3_device_driver);
++ return retval;
++}
++
++static void __exit asic3_base_exit(void)
++{
++ platform_driver_unregister(&asic3_device_driver);
++}
++
++#ifdef MODULE
++module_init(asic3_base_init);
++#else /* start early for dependencies */
++subsys_initcall(asic3_base_init);
++#endif
++module_exit(asic3_base_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Phil Blundell <pb@handhelds.org>");
++MODULE_DESCRIPTION("Core driver for HTC ASIC3");
++MODULE_SUPPORTED_DEVICE("asic3");
+Index: linux-2.6.24/drivers/mfd/soc-core.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/mfd/soc-core.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,106 @@
++/*
++ * drivers/soc/soc-core.c
++ *
++ * core SoC support
++ * Copyright (c) 2006 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This file contains functionality used by many SoC type devices.
++ *
++ * Created: 2006-11-28
++ *
++ */
++
++#include <linux/ioport.h>
++#include <linux/slab.h>
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include "soc-core.h"
++
++void soc_free_devices(struct platform_device *devices, int nr_devs)
++{
++ struct platform_device *dev = devices;
++ int i;
++
++ for (i = 0; i < nr_devs; i++) {
++ struct resource *res = dev->resource;
++ platform_device_unregister(dev++);
++ kfree(res);
++ }
++ kfree(devices);
++}
++EXPORT_SYMBOL_GPL(soc_free_devices);
++
++#define SIGNED_SHIFT(val, shift) ((shift) >= 0 ? ((val) << (shift)) : ((val) >> -(shift)))
++
++struct platform_device *soc_add_devices(struct platform_device *dev,
++ struct soc_device_data *soc, int nr_devs,
++ struct resource *mem,
++ int relative_addr_shift, int irq_base)
++{
++ struct platform_device *devices;
++ int i, r, base;
++
++ devices = kzalloc(nr_devs * sizeof(struct platform_device), GFP_KERNEL);
++ if (!devices)
++ return NULL;
++
++ for (i = 0; i < nr_devs; i++) {
++ struct platform_device *sdev = &devices[i];
++ struct soc_device_data *blk = &soc[i];
++ struct resource *res;
++
++ sdev->id = -1;
++ sdev->name = blk->name;
++
++ sdev->dev.parent = &dev->dev;
++ sdev->dev.platform_data = (void *)blk->hwconfig;
++ sdev->num_resources = blk->num_resources;
++
++ /* Allocate space for the subdevice resources */
++ res = kzalloc (blk->num_resources * sizeof (struct resource), GFP_KERNEL);
++ if (!res)
++ goto fail;
++
++ for (r = 0 ; r < blk->num_resources ; r++) {
++ res[r].name = blk->res[r].name; // Fixme - should copy
++
++ /* Find out base to use */
++ base = 0;
++ if (blk->res[r].flags & IORESOURCE_MEM) {
++ base = mem->start;
++ } else if ((blk->res[r].flags & IORESOURCE_IRQ) &&
++ (blk->res[r].flags & IORESOURCE_IRQ_MFD_SUBDEVICE)) {
++ base = irq_base;
++ }
++
++ /* Adjust resource */
++ if (blk->res[r].flags & IORESOURCE_MEM) {
++ res[r].parent = mem;
++ res[r].start = base + SIGNED_SHIFT(blk->res[r].start, relative_addr_shift);
++ res[r].end = base + SIGNED_SHIFT(blk->res[r].end, relative_addr_shift);
++ } else {
++ res[r].start = base + blk->res[r].start;
++ res[r].end = base + blk->res[r].end;
++ }
++ res[r].flags = blk->res[r].flags;
++ }
++
++ sdev->resource = res;
++ if (platform_device_register(sdev)) {
++ kfree(res);
++ goto fail;
++ }
++
++ printk(KERN_INFO "SoC: registering %s\n", blk->name);
++ }
++ return devices;
++
++fail:
++ soc_free_devices(devices, i + 1);
++ return NULL;
++}
++EXPORT_SYMBOL_GPL(soc_add_devices);
+Index: linux-2.6.24/drivers/mfd/soc-core.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/mfd/soc-core.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,30 @@
++/*
++ * drivers/soc/soc-core.h
++ *
++ * core SoC support
++ * Copyright (c) 2006 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This file contains prototypes for the functions in soc-core.c
++ *
++ * Created: 2006-11-28
++ *
++ */
++
++struct soc_device_data {
++ char *name;
++ struct resource *res;
++ int num_resources;
++ void *hwconfig; /* platform_data to pass to the subdevice */
++};
++
++struct platform_device *soc_add_devices(struct platform_device *dev,
++ struct soc_device_data *soc, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift, int irq_base);
++
++void soc_free_devices(struct platform_device *devices, int nr_devs);
++
+Index: linux-2.6.24/include/asm-arm/arch-pxa/clock.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/clock.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,27 @@
++/*
++ * linux/include/asm-arm/arch-pxa/clock.h
++ *
++ * Copyright (C) 2006 Erik Hovland
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++struct clk {
++ struct list_head node;
++ struct module *owner;
++ struct clk *parent;
++ const char *name;
++ int id;
++ unsigned int enabled;
++ unsigned long rate;
++ unsigned long ctrlbit;
++
++ void (*enable)(struct clk *);
++ void (*disable)(struct clk *);
++};
++
++
++extern int clk_register(struct clk *clk);
++extern void clk_unregister(struct clk *clk);
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-asic.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-asic.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,213 @@
++/*
++ * include/asm/arm/arch-pxa/htcuniversal-asic.h
++ *
++ * Authors: Giuseppe Zompatori <giuseppe_zompatori@yahoo.it>
++ *
++ * based on previews work, see below:
++ *
++ * include/asm/arm/arch-pxa/hx4700-asic.h
++ * Copyright (c) 2004 SDG Systems, LLC
++ *
++ */
++
++#ifndef _HTCUNIVERSAL_ASIC_H_
++#define _HTCUNIVERSAL_ASIC_H_
++
++#include <asm/hardware/ipaq-asic3.h>
++
++/* ASIC3 */
++
++#define HTCUNIVERSAL_ASIC3_GPIO_PHYS PXA_CS4_PHYS
++#define HTCUNIVERSAL_ASIC3_MMC_PHYS PXA_CS3_PHYS
++
++/* TODO: some information is missing here */
++
++/* ASIC3 GPIO A bank */
++
++#define GPIOA_I2C_EN 0 /* Output */
++#define GPIOA_SPK_PWR1_ON 1 /* Output */
++#define GPIOA_AUDIO_PWR_ON 2 /* Output */
++#define GPIOA_EARPHONE_PWR_ON 3 /* Output */
++
++#define GPIOA_UNKNOWN4 4 /* Output */
++#define GPIOA_BUTTON_BACKLIGHT_N 5 /* Input */
++#define GPIOA_SPK_PWR2_ON 6 /* Output */
++#define GPIOA_BUTTON_RECORD_N 7 /* Input */
++
++#define GPIOA_BUTTON_CAMERA_N 8 /* Input */
++#define GPIOA_UNKNOWN9 9 /* Output */
++#define GPIOA_FLASHLIGHT 10 /* Output */
++#define GPIOA_COVER_ROTATE_N 11 /* Input */
++
++#define GPIOA_TOUCHSCREEN_N 12 /* Input */
++#define GPIOA_VOL_UP_N 13 /* Input */
++#define GPIOA_VOL_DOWN_N 14 /* Input */
++#define GPIOA_LCD_PWR5_ON 15 /* Output */
++
++/* ASIC3 GPIO B bank */
++
++#define GPIOB_BB_READY 0 /* Input */
++#define GPIOB_CODEC_PDN 1 /* Output */
++#define GPIOB_UNKNOWN2 2 /* Input */
++#define GPIOB_BB_UNKNOWN3 3 /* Input */
++
++#define GPIOB_BT_IRQ 4 /* Input */
++#define GPIOB_CLAMSHELL_N 5 /* Input */
++#define GPIOB_LCD_PWR3_ON 6 /* Output */
++#define GPIOB_BB_ALERT 7 /* Input */
++
++#define GPIOB_BB_RESET2 8 /* Output */
++#define GPIOB_EARPHONE_N 9 /* Input */
++#define GPIOB_MICRECORD_N 10 /* Input */
++#define GPIOB_NIGHT_SENSOR 11 /* Input */
++
++#define GPIOB_UMTS_DCD 12 /* Input */
++#define GPIOB_UNKNOWN13 13 /* Input */
++#define GPIOB_CHARGE_EN 14 /* Output */
++#define GPIOB_USB_PUEN 15 /* Output */
++
++/* ASIC3 GPIO C bank */
++
++#define GPIOC_LED_BTWIFI 0 /* Output */
++#define GPIOC_LED_RED 1 /* Output */
++#define GPIOC_LED_GREEN 2 /* Output */
++#define GPIOC_BOARDID3 3 /* Input */
++
++#define GPIOC_WIFI_IRQ_N 4 /* Input */
++#define GPIOC_WIFI_RESET 5 /* Output */
++#define GPIOC_WIFI_PWR1_ON 6 /* Output */
++#define GPIOC_BT_RESET 7 /* Output */
++
++#define GPIOC_UNKNOWN8 8 /* Output */
++#define GPIOC_LCD_PWR1_ON 9 /* Output */
++#define GPIOC_LCD_PWR2_ON 10 /* Output */
++#define GPIOC_BOARDID2 11 /* Input */
++
++#define GPIOC_BOARDID1 12 /* Input */
++#define GPIOC_BOARDID0 13 /* Input */
++#define GPIOC_BT_PWR_ON 14 /* Output */
++#define GPIOC_CHARGE_ON 15 /* Output */
++
++/* ASIC3 GPIO D bank */
++
++#define GPIOD_KEY_OK_N 0 /* Input */
++#define GPIOD_KEY_RIGHT_N 1 /* Input */
++#define GPIOD_KEY_LEFT_N 2 /* Input */
++#define GPIOD_KEY_DOWN_N 3 /* Input */
++
++#define GPIOD_KEY_UP_N 4 /* Input */
++#define GPIOD_SDIO_DET 5 /* Input */
++#define GPIOD_WIFI_PWR2_ON 6 /* Output */
++#define GPIOD_HW_REBOOT 7 /* Output */
++
++#define GPIOD_BB_RESET1 8 /* Output */
++#define GPIOD_UNKNOWN9 9 /* Output */
++#define GPIOD_VIBRA_PWR_ON 10 /* Output */
++#define GPIOD_WIFI_PWR3_ON 11 /* Output */
++
++#define GPIOD_FL_PWR_ON 12 /* Output */
++#define GPIOD_LCD_PWR4_ON 13 /* Output */
++#define GPIOD_BL_KEYP_PWR_ON 14 /* Output */
++#define GPIOD_BL_KEYB_PWR_ON 15 /* Output */
++
++extern struct platform_device htcuniversal_asic3;
++
++/* ASIC3 GPIO A bank */
++
++#define GPIO_I2C_EN 0*16+GPIOA_I2C_EN
++#define GPIO_SPK_PWR1_ON 0*16+GPIOA_SPK_PWR1_ON
++#define GPIO_AUDIO_PWR_ON 0*16+GPIOA_AUDIO_PWR_ON
++#define GPIO_EARPHONE_PWR_ON 0*16+GPIOA_EARPHONE_PWR_ON
++
++#define GPIO_UNKNOWNA4 0*16+GPIOA_UNKNOWN4
++#define GPIO_BUTTON_BACKLIGHT_N 0*16+GPIOA_BUTTON_BACKLIGHT_N
++#define GPIO_SPK_PWR2_ON 0*16+GPIOA_SPK_PWR2_ON
++#define GPIO_BUTTON_RECORD_N 0*16+GPIOA_BUTTON_RECORD_N
++
++#define GPIO_BUTTON_CAMERA_N 0*16+GPIOA_BUTTON_CAMERA_N
++#define GPIO_UNKNOWNA9 0*16+GPIOA_UNKNOWN9
++#define GPIO_FLASHLIGHT 0*16+GPIOA_FLASHLIGHT
++#define GPIO_COVER_ROTATE_N 0*16+GPIOA_COVER_ROTATE_N
++
++#define GPIO_TOUCHSCREEN_N 0*16+GPIOA_TOUCHSCREEN_N
++#define GPIO_VOL_UP_N 0*16+GPIOA_VOL_UP_N
++#define GPIO_VOL_DOWN_N 0*16+GPIOA_VOL_DOWN_N
++#define GPIO_LCD_PWR5_ON 0*16+GPIOA_LCD_PWR5_ON
++
++/* ASIC3 GPIO B bank */
++
++#define GPIO_BB_READY 1*16+GPIOB_BB_READY
++#define GPIO_CODEC_PDN 1*16+GPIOB_CODEC_PDN
++#define GPIO_UNKNOWNB2 1*16+GPIOB_UNKNOWN2
++#define GPIO_BB_UNKNOWN3 1*16+GPIOB_BB_UNKNOWN3
++
++#define GPIO_BT_IRQ 1*16+GPIOB_BT_IRQ
++#define GPIO_CLAMSHELL_N 1*16+GPIOB_CLAMSHELL_N
++#define GPIO_LCD_PWR3_ON 1*16+GPIOB_LCD_PWR3_ON
++#define GPIO_BB_ALERT 1*16+GPIOB_BB_ALERT
++
++#define GPIO_BB_RESET2 1*16+GPIOB_BB_RESET2
++#define GPIO_EARPHONE_N 1*16+GPIOB_EARPHONE_N
++#define GPIO_MICRECORD_N 1*16+GPIOB_MICRECORD_N
++#define GPIO_NIGHT_SENSOR 1*16+GPIOB_NIGHT_SENSOR
++
++#define GPIO_UMTS_DCD 1*16+GPIOB_UMTS_DCD
++#define GPIO_UNKNOWNB13 1*16+GPIOB_UNKNOWN13
++#define GPIO_CHARGE_EN 1*16+GPIOB_CHARGE_EN
++#define GPIO_USB_PUEN 1*16+GPIOB_USB_PUEN
++
++/* ASIC3 GPIO C bank */
++
++#define GPIO_LED_BTWIFI 2*16+GPIOC_LED_BTWIFI
++#define GPIO_LED_RED 2*16+GPIOC_LED_RED
++#define GPIO_LED_GREEN 2*16+GPIOC_LED_GREEN
++#define GPIO_BOARDID3 2*16+GPIOC_BOARDID3
++
++#define GPIO_WIFI_IRQ_N 2*16+GPIOC_WIFI_IRQ_N
++#define GPIO_WIFI_RESET 2*16+GPIOC_WIFI_RESET
++#define GPIO_WIFI_PWR1_ON 2*16+GPIOC_WIFI_PWR1_ON
++#define GPIO_BT_RESET 2*16+GPIOC_BT_RESET
++
++#define GPIO_UNKNOWNC8 2*16+GPIOC_UNKNOWN8
++#define GPIO_LCD_PWR1_ON 2*16+GPIOC_LCD_PWR1_ON
++#define GPIO_LCD_PWR2_ON 2*16+GPIOC_LCD_PWR2_ON
++#define GPIO_BOARDID2 2*16+GPIOC_BOARDID2
++
++#define GPIO_BOARDID1 2*16+GPIOC_BOARDID1
++#define GPIO_BOARDID0 2*16+GPIOC_BOARDID0
++#define GPIO_BT_PWR_ON 2*16+GPIOC_BT_PWR_ON
++#define GPIO_CHARGE_ON 2*16+GPIOC_CHARGE_ON
++
++/* ASIC3 GPIO D bank */
++
++#define GPIO_KEY_OK_N 3*16+GPIOD_KEY_OK_N
++#define GPIO_KEY_RIGHT_N 3*16+GPIOD_KEY_RIGHT_N
++#define GPIO_KEY_LEFT_N 3*16+GPIOD_KEY_LEFT_N
++#define GPIO_KEY_DOWN_N 3*16+GPIOD_KEY_DOWN_N
++
++#define GPIO_KEY_UP_N 3*16+GPIOD_KEY_UP_N
++#define GPIO_SDIO_DET 3*16+GPIOD_SDIO_DET
++#define GPIO_WIFI_PWR2_ON 3*16+GPIOD_WIFI_PWR2_ON
++#define GPIO_HW_REBOOT 3*16+GPIOD_HW_REBOOT
++
++#define GPIO_BB_RESET1 3*16+GPIOD_BB_RESET1
++#define GPIO_UNKNOWND9 3*16+GPIOD_UNKNOWN9
++#define GPIO_VIBRA_PWR_ON 3*16+GPIOD_VIBRA_PWR_ON
++#define GPIO_WIFI_PWR3_ON 3*16+GPIOD_WIFI_PWR3_ON
++
++#define GPIO_FL_PWR_ON 3*16+GPIOD_FL_PWR_ON
++#define GPIO_LCD_PWR4_ON 3*16+GPIOD_LCD_PWR4_ON
++#define GPIO_BL_KEYP_PWR_ON 3*16+GPIOD_BL_KEYP_PWR_ON
++#define GPIO_BL_KEYB_PWR_ON 3*16+GPIOD_BL_KEYB_PWR_ON
++
++#define HTCUNIVERSAL_EGPIO_BASE PXA_CS2_PHYS+0x02000000
++
++#define EGPIO4_ON 4 /* something */
++#define EGPIO5_BT_3V3_ON 5 /* Bluetooth related */
++#define EGPIO6_WIFI_ON 6 /* WLAN related*/
++
++extern void htcuniversal_egpio_enable( u_int16_t bits );
++extern void htcuniversal_egpio_disable( u_int16_t bits );
++
++#endif /* _HTCUNIVERSAL_ASIC_H_ */
++
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-gpio.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,220 @@
++/*
++ * include/asm-arm/arch-pxa/htcuniversal-gpio.h
++ * History:
++ *
++ * 2004-12-10 Michael Opdenacker. Wrote down GPIO settings as identified by Jamey Hicks.
++ * Reused the h2200-gpio.h file as a template.
++ */
++
++#ifndef _HTCUNIVERSAL_GPIO_H_
++#define _HTCUNIVERSAL_GPIO_H_
++
++#include <asm/arch/pxa-regs.h>
++
++#define GET_HTCUNIVERSAL_GPIO(gpio) \
++ (GPLR(GPIO_NR_HTCUNIVERSAL_ ## gpio) & GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio))
++
++#define SET_HTCUNIVERSAL_GPIO(gpio, setp) \
++do { \
++if (setp) \
++ GPSR(GPIO_NR_HTCUNIVERSAL_ ## gpio) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio); \
++else \
++ GPCR(GPIO_NR_HTCUNIVERSAL_ ## gpio) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio); \
++} while (0)
++
++#define SET_HTCUNIVERSAL_GPIO_N(gpio, setp) \
++do { \
++if (setp) \
++ GPCR(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N); \
++else \
++ GPSR(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N); \
++} while (0)
++
++#define HTCUNIVERSAL_IRQ(gpio) \
++ IRQ_GPIO(GPIO_NR_HTCUNIVERSAL_ ## gpio)
++
++#define GPIO_NR_HTCUNIVERSAL_KEY_ON_N 0
++#define GPIO_NR_HTCUNIVERSAL_GP_RST_N 1
++
++#define GPIO_NR_HTCUNIVERSAL_USB_DET 9
++#define GPIO_NR_HTCUNIVERSAL_POWER_DET 10
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD7 12
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_SDIO_INT_N 13
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_EXT_INT 14
++#define GPIO_NR_HTCUNIVERSAL_CS1_N 15
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD6 17
++#define GPIO_NR_HTCUNIVERSAL_RDY 18
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_START 19
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT7 22
++#define GPIO_NR_HTCUNIVERSAL_SPI_CLK 23
++#define GPIO_NR_HTCUNIVERSAL_SPI_FRM 24
++#define GPIO_NR_HTCUNIVERSAL_SPI_DO 25
++#define GPIO_NR_HTCUNIVERSAL_SPI_DI 26
++
++#define GPIO_NR_HTCUNIVERSAL_CODEC_ON 27
++#define GPIO_NR_HTCUNIVERSAL_I2S_BCK 28
++#define GPIO_NR_HTCUNIVERSAL_I2S_DIN 29
++#define GPIO_NR_HTCUNIVERSAL_I2S_DOUT 30
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYNC 31
++
++#define GPIO_NR_HTCUNIVERSAL_RS232_ON 32
++#define GPIO_NR_HTCUNIVERSAL_CS5_N 33
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RXD 34
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS 35
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN7 36
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN3 37
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN4 38
++#define GPIO_NR_HTCUNIVERSAL_PHONE_TXD 39
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT6 40
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS 41
++#define GPIO_NR_HTCUNIVERSAL_BT_RXD 42
++#define GPIO_NR_HTCUNIVERSAL_BT_TXD 43
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_CTS 44
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_RTS 45
++
++#define GPIO_NR_HTCUNIVERSAL_SIR_RXD 42
++#define GPIO_NR_HTCUNIVERSAL_SIR_TXD 43
++
++#define GPIO_NR_HTCUNIVERSAL_POE_N 48
++#define GPIO_NR_HTCUNIVERSAL_PWE_N 49
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD3 50
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD2 51
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD4 52
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_MCLK 53
++#define GPIO_NR_HTCUNIVERSAL_CIF_PCLK 54
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD1 55
++
++#define GPIO_NR_HTCUNIVERSAL_LDD0 58
++#define GPIO_NR_HTCUNIVERSAL_LDD1 59
++#define GPIO_NR_HTCUNIVERSAL_LDD2 60
++#define GPIO_NR_HTCUNIVERSAL_LDD3 61
++#define GPIO_NR_HTCUNIVERSAL_LDD4 62
++#define GPIO_NR_HTCUNIVERSAL_LDD5 63
++#define GPIO_NR_HTCUNIVERSAL_LDD6 64
++#define GPIO_NR_HTCUNIVERSAL_LDD7 65
++#define GPIO_NR_HTCUNIVERSAL_LDD8 66
++#define GPIO_NR_HTCUNIVERSAL_LDD9 67
++#define GPIO_NR_HTCUNIVERSAL_LDD10 68
++#define GPIO_NR_HTCUNIVERSAL_LDD11 69
++#define GPIO_NR_HTCUNIVERSAL_LDD12 70
++#define GPIO_NR_HTCUNIVERSAL_LDD13 71
++#define GPIO_NR_HTCUNIVERSAL_LDD14 72
++#define GPIO_NR_HTCUNIVERSAL_LDD15 73
++
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_RD 74
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_A0 75
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_WR 76
++#define GPIO_NR_HTCUNIVERSAL_LBIAS 77
++
++#define GPIO_NR_HTCUNIVERSAL_CS2_N 78
++#define GPIO_NR_HTCUNIVERSAL_CS3_N 79
++#define GPIO_NR_HTCUNIVERSAL_CS4_N 80
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD0 81
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD5 82
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_LV 84
++#define GPIO_NR_HTCUNIVERSAL_CIF_FV 85
++
++#define GPIO_NR_HTCUNIVERSAL_LCD1 86
++#define GPIO_NR_HTCUNIVERSAL_LCD2 87
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN5 90
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN6 91
++
++#define GPIO_NR_HTCUNIVERSAL_DREQ1 97
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RESET 98
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN0 100
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN1 101
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN2 102
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT0 103
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT1 104
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT2 105
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT3 106
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT4 107
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT5 108
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UNKNOWN 109
++#define GPIO_NR_HTCUNIVERSAL_PHONE_OFF 110
++
++#define GPIO_NR_HTCUNIVERSAL_USB_PUEN 112
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYSCLK 113
++
++#define GPIO_NR_HTCUNIVERSAL_PWM_OUT1 115
++
++#define GPIO_NR_HTCUNIVERSAL_I2C_SCL 117
++#define GPIO_NR_HTCUNIVERSAL_I2C_SDA 118
++
++#if 0
++#define GPIO_NR_HTCUNIVERSAL_CPU_BATT_FAULT_N
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_RESET_N
++#define GPIO_NR_HTCUNIVERSAL_CHARGE_EN_N
++#define GPIO_NR_HTCUNIVERSAL_FLASH_VPEN
++#define GPIO_NR_HTCUNIVERSAL_BATT_OFF
++#define GPIO_NR_HTCUNIVERSAL_USB_CHARGE_RATE
++#define GPIO_NR_HTCUNIVERSAL_BL_DETECT_N
++#define GPIO_NR_HTCUNIVERSAL_CPU_HW_RESET_N
++#endif
++
++
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_CLK_MD (23 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_FRM_MD (24 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD (34 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD (35 | GPIO_ALT_FN_1_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD (39 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD (41 | GPIO_ALT_FN_2_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_BT_RXD_MD (42 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_BT_TXD_MD (43 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_CTS_MD (44 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_RTS_MD (45 | GPIO_ALT_FN_2_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_SIR_RXD_MD (46 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_SIR_TXD_MD (47 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
++#define GPIO_NR_HTCUNIVERSAL_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN0_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN0 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN1_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN1 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN2_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN2 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN3_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN3 | GPIO_ALT_FN_3_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN4_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN4 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN5_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN5 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN6_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN6 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN7_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN7 | GPIO_ALT_FN_3_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT0_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT0 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT1_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT1 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT2_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT2 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT3_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT3 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT4_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT4 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT5_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT5 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT6_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT6 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT7_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT7 | GPIO_ALT_FN_1_OUT)
++
++
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_PWM1OUT_MD (115 | GPIO_ALT_FN_3_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_I2C_SCL_MD (117 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT)
++
++#endif /* _HTCUNIVERSAL_GPIO_H */
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-init.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-init.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,14 @@
++/*
++ * include/asm/arm/arch-pxa/htcuniversal-init.h
++ * Copyright (c) 2004 SDG Systems, LLC
++ */
++
++#ifndef _HTCUNIVERSAL_INIT_H_
++#define _HTCUNIVERSAL_INIT_H_
++
++/* htcuniversal initialization data should be found here
++ * See -init.h files from other devices for details
++ */
++
++#endif /* _HTCUNIVERSAL_INIT_H_ */
++
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,3 @@
++#include <asm/arch/irqs.h>
++
++#define HTCUNIVERSAL_ASIC3_IRQ_BASE IRQ_BOARD_START
+Index: linux-2.6.24/include/asm-arm/arch-pxa/pxa-pm_ll.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/pxa-pm_ll.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,6 @@
++struct pxa_ll_pm_ops {
++ void (*suspend)(unsigned long);
++ void (*resume)(void);
++};
++
++extern struct pxa_ll_pm_ops *pxa_pm_set_ll_ops(struct pxa_ll_pm_ops *new_ops);
+Index: linux-2.6.24/include/asm-arm/hardware/asic3_keys.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/asic3_keys.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,18 @@
++#include <linux/input.h>
++
++struct asic3_keys_button {
++ /* Configuration parameters */
++ int keycode;
++ int gpio;
++ int active_low;
++ char *desc;
++ int type;
++ /* Internal state vars - add below */
++};
++
++struct asic3_keys_platform_data {
++ struct asic3_keys_button *buttons;
++ int nbuttons;
++ struct input_dev *input;
++ struct device *asic3_dev;
++};
+Index: linux-2.6.24/include/asm-arm/hardware/asic3_leds.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/asic3_leds.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,34 @@
++/*
++ * LEDs support for HTC ASIC3 devices.
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++
++struct asic3_leds_machinfo;
++
++struct asic3_led {
++ struct led_classdev led_cdev;
++ int hw_num; /* Number of "hardware-accelerated" led */
++ int gpio_num; /* Number of GPIO if hw_num == -1 */
++ struct asic3_leds_machinfo *machinfo;
++};
++
++struct asic3_leds_machinfo {
++ int num_leds;
++ struct asic3_led *leds;
++ struct platform_device *asic3_pdev;
++};
++
++extern int asic3_leds_register(void);
++extern void asic3_leds_unregister(void);
++
+Index: linux-2.6.24/include/asm-arm/hardware/ipaq-asic3.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/ipaq-asic3.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,602 @@
++/*
++ *
++ * Definitions for the HTC ASIC3 chip found in several handheld devices
++ *
++ * Copyright 2001 Compaq Computer Corporation.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Andrew Christian
++ *
++ */
++
++#ifndef IPAQ_ASIC3_H
++#define IPAQ_ASIC3_H
++
++/****************************************************/
++/* IPAQ, ASIC #3, replaces ASIC #1 */
++
++#define IPAQ_ASIC3_OFFSET(x,y) (_IPAQ_ASIC3_ ## x ## _Base + _IPAQ_ASIC3_ ## x ## _ ## y)
++#define IPAQ_ASIC3_GPIO_OFFSET(x,y) (_IPAQ_ASIC3_GPIO_ ## x ## _Base + _IPAQ_ASIC3_GPIO_ ## y)
++
++
++/* All offsets below are specified with the following address bus shift */
++#define ASIC3_DEFAULT_ADDR_SHIFT 2
++
++#define _IPAQ_ASIC3_GPIO_A_Base 0x0000
++#define _IPAQ_ASIC3_GPIO_B_Base 0x0100
++#define _IPAQ_ASIC3_GPIO_C_Base 0x0200
++#define _IPAQ_ASIC3_GPIO_D_Base 0x0300
++
++#define _IPAQ_ASIC3_GPIO_Mask 0x00 /* R/W 0:don't mask, 1:mask interrupt */
++#define _IPAQ_ASIC3_GPIO_Direction 0x04 /* R/W 0:input, 1:output */
++#define _IPAQ_ASIC3_GPIO_Out 0x08 /* R/W 0:output low, 1:output high */
++#define _IPAQ_ASIC3_GPIO_TriggerType 0x0c /* R/W 0:level, 1:edge */
++#define _IPAQ_ASIC3_GPIO_EdgeTrigger 0x10 /* R/W 0:falling, 1:rising */
++#define _IPAQ_ASIC3_GPIO_LevelTrigger 0x14 /* R/W 0:low, 1:high level detect */
++#define _IPAQ_ASIC3_GPIO_SleepMask 0x18 /* R/W 0:don't mask, 1:mask trigger in sleep mode */
++#define _IPAQ_ASIC3_GPIO_SleepOut 0x1c /* R/W level 0:low, 1:high in sleep mode */
++#define _IPAQ_ASIC3_GPIO_BattFaultOut 0x20 /* R/W level 0:low, 1:high in batt_fault */
++#define _IPAQ_ASIC3_GPIO_IntStatus 0x24 /* R/W 0:none, 1:detect */
++#define _IPAQ_ASIC3_GPIO_AltFunction 0x28 /* R/W 0:normal control 1:LED register control */
++#define _IPAQ_ASIC3_GPIO_SleepConf 0x2c /* R/W bit 1: autosleep 0: disable gposlpout in normal mode, enable gposlpout in sleep mode */
++#define _IPAQ_ASIC3_GPIO_Status 0x30 /* R Pin status */
++
++#define IPAQ_ASIC3_GPIO_A_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Mask )
++#define IPAQ_ASIC3_GPIO_A_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Direction )
++#define IPAQ_ASIC3_GPIO_A_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Out )
++#define IPAQ_ASIC3_GPIO_A_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, A, TriggerType )
++#define IPAQ_ASIC3_GPIO_A_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, A, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_A_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, A, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepMask )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepOut )
++#define IPAQ_ASIC3_GPIO_A_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_A_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, A, IntStatus )
++#define IPAQ_ASIC3_GPIO_A_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, A, AltFunction )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepConf )
++#define IPAQ_ASIC3_GPIO_A_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Status )
++
++#define IPAQ_ASIC3_GPIO_B_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Mask )
++#define IPAQ_ASIC3_GPIO_B_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Direction )
++#define IPAQ_ASIC3_GPIO_B_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Out )
++#define IPAQ_ASIC3_GPIO_B_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, B, TriggerType )
++#define IPAQ_ASIC3_GPIO_B_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, B, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_B_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, B, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepMask )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepOut )
++#define IPAQ_ASIC3_GPIO_B_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_B_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, B, IntStatus )
++#define IPAQ_ASIC3_GPIO_B_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, B, AltFunction )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepConf )
++#define IPAQ_ASIC3_GPIO_B_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Status )
++
++#define IPAQ_ASIC3_GPIO_C_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Mask )
++#define IPAQ_ASIC3_GPIO_C_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Direction )
++#define IPAQ_ASIC3_GPIO_C_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Out )
++#define IPAQ_ASIC3_GPIO_C_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, C, TriggerType )
++#define IPAQ_ASIC3_GPIO_C_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, C, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_C_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, C, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepMask )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepOut )
++#define IPAQ_ASIC3_GPIO_C_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_C_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, C, IntStatus )
++#define IPAQ_ASIC3_GPIO_C_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, C, AltFunction )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepConf )
++#define IPAQ_ASIC3_GPIO_C_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Status )
++
++#define IPAQ_ASIC3_GPIO_D_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Mask )
++#define IPAQ_ASIC3_GPIO_D_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Direction )
++#define IPAQ_ASIC3_GPIO_D_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Out )
++#define IPAQ_ASIC3_GPIO_D_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, D, TriggerType )
++#define IPAQ_ASIC3_GPIO_D_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, D, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_D_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, D, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepMask )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepOut )
++#define IPAQ_ASIC3_GPIO_D_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_D_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, D, IntStatus )
++#define IPAQ_ASIC3_GPIO_D_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, D, AltFunction )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepConf )
++#define IPAQ_ASIC3_GPIO_D_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Status )
++
++#define _IPAQ_ASIC3_SPI_Base 0x0400
++#define _IPAQ_ASIC3_SPI_Control 0x0000
++#define _IPAQ_ASIC3_SPI_TxData 0x0004
++#define _IPAQ_ASIC3_SPI_RxData 0x0008
++#define _IPAQ_ASIC3_SPI_Int 0x000c
++#define _IPAQ_ASIC3_SPI_Status 0x0010
++
++#define IPAQ_ASIC3_SPI_Control(_b) IPAQ_ASIC3( _b, u16, SPI, Control )
++#define IPAQ_ASIC3_SPI_TxData(_b) IPAQ_ASIC3( _b, u16, SPI, TxData )
++#define IPAQ_ASIC3_SPI_RxData(_b) IPAQ_ASIC3( _b, u16, SPI, RxData )
++#define IPAQ_ASIC3_SPI_Int(_b) IPAQ_ASIC3( _b, u16, SPI, Int )
++#define IPAQ_ASIC3_SPI_Status(_b) IPAQ_ASIC3( _b, u16, SPI, Status )
++
++#define SPI_CONTROL_SPR(clk) ((clk) & 0x0f) /* Clock rate */
++
++#define _IPAQ_ASIC3_PWM_0_Base 0x0500
++#define _IPAQ_ASIC3_PWM_1_Base 0x0600
++#define _IPAQ_ASIC3_PWM_TimeBase 0x0000
++#define _IPAQ_ASIC3_PWM_PeriodTime 0x0004
++#define _IPAQ_ASIC3_PWM_DutyTime 0x0008
++
++#define IPAQ_ASIC3_PWM_TimeBase(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, TimeBase )
++#define IPAQ_ASIC3_PWM_PeriodTime(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, PeriodTime )
++#define IPAQ_ASIC3_PWM_DutyTime(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, DutyTime )
++
++#define PWM_TIMEBASE_VALUE(x) ((x)&0xf) /* Low 4 bits sets time base */
++#define PWM_TIMEBASE_ENABLE (1 << 4) /* Enable clock */
++
++#define _IPAQ_ASIC3_LED_0_Base 0x0700
++#define _IPAQ_ASIC3_LED_1_Base 0x0800
++#define _IPAQ_ASIC3_LED_2_Base 0x0900
++#define _IPAQ_ASIC3_LED_TimeBase 0x0000 /* R/W 7 bits */
++#define _IPAQ_ASIC3_LED_PeriodTime 0x0004 /* R/W 12 bits */
++#define _IPAQ_ASIC3_LED_DutyTime 0x0008 /* R/W 12 bits */
++#define _IPAQ_ASIC3_LED_AutoStopCount 0x000c /* R/W 16 bits */
++
++#define IPAQ_ASIC3_LED_TimeBase(_b, x) IPAQ_ASIC3_N( _b, u8, LED, x, TimeBase )
++#define IPAQ_ASIC3_LED_PeriodTime(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, PeriodTime )
++#define IPAQ_ASIC3_LED_DutyTime(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, DutyTime )
++#define IPAQ_ASIC3_LED_AutoStopCount(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, AutoStopCount )
++
++/* LED TimeBase bits - match ASIC2 */
++#define LED_TBS 0x0f /* Low 4 bits sets time base, max = 13 */
++ /* Note: max = 5 on hx4700 */
++ /* 0: maximum time base */
++ /* 1: maximum time base / 2 */
++ /* n: maximum time base / 2^n */
++
++#define LED_EN (1 << 4) /* LED ON/OFF 0:off, 1:on */
++#define LED_AUTOSTOP (1 << 5) /* LED ON/OFF auto stop set 0:disable, 1:enable */
++#define LED_ALWAYS (1 << 6) /* LED Interrupt Mask 0:No mask, 1:mask */
++
++#define _IPAQ_ASIC3_CLOCK_Base 0x0A00
++#define _IPAQ_ASIC3_CLOCK_CDEX 0x00
++#define _IPAQ_ASIC3_CLOCK_SEL 0x04
++
++#define IPAQ_ASIC3_CLOCK_CDEX(_b) IPAQ_ASIC3( _b, u16, CLOCK, CDEX )
++#define IPAQ_ASIC3_CLOCK_SEL(_b) IPAQ_ASIC3( _b, u16, CLOCK, SEL )
++
++#define CLOCK_CDEX_SOURCE (1 << 0) /* 2 bits */
++#define CLOCK_CDEX_SOURCE0 (1 << 0)
++#define CLOCK_CDEX_SOURCE1 (1 << 1)
++#define CLOCK_CDEX_SPI (1 << 2)
++#define CLOCK_CDEX_OWM (1 << 3)
++#define CLOCK_CDEX_PWM0 (1 << 4)
++#define CLOCK_CDEX_PWM1 (1 << 5)
++#define CLOCK_CDEX_LED0 (1 << 6)
++#define CLOCK_CDEX_LED1 (1 << 7)
++#define CLOCK_CDEX_LED2 (1 << 8)
++
++#define CLOCK_CDEX_SD_HOST (1 << 9) /* R/W: SD host clock source 24.576M/12.288M */
++#define CLOCK_CDEX_SD_BUS (1 << 10) /* R/W: SD bus clock source control 24.576M/12.288M */
++#define CLOCK_CDEX_SMBUS (1 << 11)
++#define CLOCK_CDEX_CONTROL_CX (1 << 12)
++
++#define CLOCK_CDEX_EX0 (1 << 13) /* R/W: 32.768 kHz crystal */
++#define CLOCK_CDEX_EX1 (1 << 14) /* R/W: 24.576 MHz crystal */
++
++#define CLOCK_SEL_SD_HCLK_SEL (1 << 0) /* R/W: SDIO host clock select - 1: 24.576 Mhz, 0: 12.288 MHz */
++#define CLOCK_SEL_SD_BCLK_SEL (1 << 1) /* R/W: SDIO bus clock select - 1: 24.576 MHz, 0: 12.288 MHz */
++#define CLOCK_SEL_CX (1 << 2) /* R/W: INT clock source control (32.768 kHz) */
++
++
++#define _IPAQ_ASIC3_INTR_Base 0x0B00
++
++#define _IPAQ_ASIC3_INTR_IntMask 0x00 /* Interrupt mask control */
++#define _IPAQ_ASIC3_INTR_PIntStat 0x04 /* Peripheral interrupt status */
++#define _IPAQ_ASIC3_INTR_IntCPS 0x08 /* Interrupt timer clock pre-scale */
++#define _IPAQ_ASIC3_INTR_IntTBS 0x0c /* Interrupt timer set */
++
++#define IPAQ_ASIC3_INTR_IntMask(_b) IPAQ_ASIC3( _b, u8, INTR, IntMask )
++#define IPAQ_ASIC3_INTR_PIntStat(_b) IPAQ_ASIC3( _b, u8, INTR, PIntStat )
++#define IPAQ_ASIC3_INTR_IntCPS(_b) IPAQ_ASIC3( _b, u8, INTR, IntCPS )
++#define IPAQ_ASIC3_INTR_IntTBS(_b) IPAQ_ASIC3( _b, u16, INTR, IntTBS )
++
++#define ASIC3_INTMASK_GINTMASK (1 << 0) /* Global interrupt mask 1:enable */
++#define ASIC3_INTMASK_GINTEL (1 << 1) /* 1: rising edge, 0: hi level */
++#define ASIC3_INTMASK_MASK0 (1 << 2)
++#define ASIC3_INTMASK_MASK1 (1 << 3)
++#define ASIC3_INTMASK_MASK2 (1 << 4)
++#define ASIC3_INTMASK_MASK3 (1 << 5)
++#define ASIC3_INTMASK_MASK4 (1 << 6)
++#define ASIC3_INTMASK_MASK5 (1 << 7)
++
++#define ASIC3_INTR_PERIPHERAL_A (1 << 0)
++#define ASIC3_INTR_PERIPHERAL_B (1 << 1)
++#define ASIC3_INTR_PERIPHERAL_C (1 << 2)
++#define ASIC3_INTR_PERIPHERAL_D (1 << 3)
++#define ASIC3_INTR_LED0 (1 << 4)
++#define ASIC3_INTR_LED1 (1 << 5)
++#define ASIC3_INTR_LED2 (1 << 6)
++#define ASIC3_INTR_SPI (1 << 7)
++#define ASIC3_INTR_SMBUS (1 << 8)
++#define ASIC3_INTR_OWM (1 << 9)
++
++#define ASIC3_INTR_CPS(x) ((x)&0x0f) /* 4 bits, max 14 */
++#define ASIC3_INTR_CPS_SET ( 1 << 4 ) /* Time base enable */
++
++
++/* Basic control of the SD ASIC */
++#define _IPAQ_ASIC3_SDHWCTRL_Base 0x0E00
++
++#define _IPAQ_ASIC3_SDHWCTRL_SDConf 0x00
++#define IPAQ_ASIC3_SDHWCTRL_SDConf(_b) IPAQ_ASIC3( _b, u8, SDHWCTRL, SDConf )
++
++#define ASIC3_SDHWCTRL_SUSPEND (1 << 0) /* 1=suspend all SD operations */
++#define ASIC3_SDHWCTRL_CLKSEL (1 << 1) /* 1=SDICK, 0=HCLK */
++#define ASIC3_SDHWCTRL_PCLR (1 << 2) /* All registers of SDIO cleared */
++#define ASIC3_SDHWCTRL_LEVCD (1 << 3) /* Level of SD card detection: 1:high, 0:low */
++#define ASIC3_SDHWCTRL_LEVWP (1 << 4) /* Level of SD card write protection: 1=low, 0=high */
++#define ASIC3_SDHWCTRL_SDLED (1 << 5) /* SD card LED signal 1=enable, 0=disable */
++#define ASIC3_SDHWCTRL_SDPWR (1 << 6) /* SD card power supply control 1=enable */
++
++
++/* This is a pointer to an array of 12 u32 values - but only the lower 2 bytes matter */
++/* Use it as "IPAQ_ASIC3_HWPROTECT_ARRAY[x]" */
++
++#define _IPAQ_ASIC3_HWPROTECT_Base 0x1000
++#define IPAQ_ASIC3_HWPROTECT_ARRAY ((volatile u32*)(_IPAQ_ASIC3_Base + _IPAQ_ASIC3_HWPROTECT_Base))
++#define HWPROTECT_ARRAY_LEN 12
++#define HWPROTECT_ARRAY_VALUES {0x4854,0x432d,0x5344,0x494f,0x2050,0x2f4e,0x3a33,0x3048,0x3830,0x3032,0x382d,0x3030}
++
++
++#define _IPAQ_ASIC3_EXTCF_Base 0x1100
++
++#define _IPAQ_ASIC3_EXTCF_Select 0x00
++#define _IPAQ_ASIC3_EXTCF_Reset 0x04
++
++#define IPAQ_ASIC3_EXTCF_Select(_b) IPAQ_ASIC3( _b, u16, EXTCF, Select )
++#define IPAQ_ASIC3_EXTCF_Reset(_b) IPAQ_ASIC3( _b, u16, EXTCF, Reset )
++
++#define ASIC3_EXTCF_SMOD0 (1 << 0) /* slot number of mode 0 */
++#define ASIC3_EXTCF_SMOD1 (1 << 1) /* slot number of mode 1 */
++#define ASIC3_EXTCF_SMOD2 (1 << 2) /* slot number of mode 2 */
++#define ASIC3_EXTCF_OWM_EN (1 << 4) /* enable onewire module */
++#define ASIC3_EXTCF_OWM_SMB (1 << 5) /* OWM bus selection */
++#define ASIC3_EXTCF_OWM_RESET (1 << 6) /* undocumented, used by OWM and CF */
++#define ASIC3_EXTCF_CF0_SLEEP_MODE (1 << 7) /* CF0 sleep state control */
++#define ASIC3_EXTCF_CF1_SLEEP_MODE (1 << 8) /* CF1 sleep state control */
++#define ASIC3_EXTCF_CF0_PWAIT_EN (1 << 10) /* CF0 PWAIT_n control */
++#define ASIC3_EXTCF_CF1_PWAIT_EN (1 << 11) /* CF1 PWAIT_n control */
++#define ASIC3_EXTCF_CF0_BUF_EN (1 << 12) /* CF0 buffer control */
++#define ASIC3_EXTCF_CF1_BUF_EN (1 << 13) /* CF1 buffer control */
++#define ASIC3_EXTCF_SD_MEM_ENABLE (1 << 14)
++#define ASIC3_EXTCF_CF_SLEEP (1 << 15) /* CF sleep mode control */
++
++/*****************************************************************************
++ * The Onewire interface registers
++ *
++ * OWM_CMD
++ * OWM_DAT
++ * OWM_INTR
++ * OWM_INTEN
++ * OWM_CLKDIV
++ *
++ *****************************************************************************/
++
++#define _IPAQ_ASIC3_OWM_Base 0xC00
++
++#define _IPAQ_ASIC3_OWM_CMD 0x00
++#define _IPAQ_ASIC3_OWM_DAT 0x04
++#define _IPAQ_ASIC3_OWM_INTR 0x08
++#define _IPAQ_ASIC3_OWM_INTEN 0x0C
++#define _IPAQ_ASIC3_OWM_CLKDIV 0x10
++
++#define ASIC3_OWM_CMD_ONEWR (1 << 0)
++#define ASIC3_OWM_CMD_SRA (1 << 1)
++#define ASIC3_OWM_CMD_DQO (1 << 2)
++#define ASIC3_OWM_CMD_DQI (1 << 3)
++
++#define ASIC3_OWM_INTR_PD (1 << 0)
++#define ASIC3_OWM_INTR_PDR (1 << 1)
++#define ASIC3_OWM_INTR_TBE (1 << 2)
++#define ASIC3_OWM_INTR_TEMP (1 << 3)
++#define ASIC3_OWM_INTR_RBF (1 << 4)
++
++#define ASIC3_OWM_INTEN_EPD (1 << 0)
++#define ASIC3_OWM_INTEN_IAS (1 << 1)
++#define ASIC3_OWM_INTEN_ETBE (1 << 2)
++#define ASIC3_OWM_INTEN_ETMT (1 << 3)
++#define ASIC3_OWM_INTEN_ERBF (1 << 4)
++
++#define ASIC3_OWM_CLKDIV_PRE (3 << 0) /* two bits wide at bit position 0 */
++#define ASIC3_OWM_CLKDIV_DIV (7 << 2) /* 3 bits wide at bit position 2 */
++
++
++/*****************************************************************************
++ * The SD configuration registers are at a completely different location
++ * in memory. They are divided into three sets of registers:
++ *
++ * SD_CONFIG Core configuration register
++ * SD_CTRL Control registers for SD operations
++ * SDIO_CTRL Control registers for SDIO operations
++ *
++ *****************************************************************************/
++
++#define IPAQ_ASIC3_SD_CONFIG(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SD_CONFIG_Base + (_IPAQ_ASIC3_SD_CONFIG_ ## x))))
++
++#define _IPAQ_ASIC3_SD_CONFIG_Base 0x0400 // Assumes 32 bit addressing
++
++#define _IPAQ_ASIC3_SD_CONFIG_Command 0x08 /* R/W: Command */
++#define _IPAQ_ASIC3_SD_CONFIG_Addr0 0x20 /* [9:31] SD Control Register Base Address */
++#define _IPAQ_ASIC3_SD_CONFIG_Addr1 0x24 /* [9:31] SD Control Register Base Address */
++#define _IPAQ_ASIC3_SD_CONFIG_IntPin 0x78 /* R/O: interrupt assigned to pin */
++#define _IPAQ_ASIC3_SD_CONFIG_ClkStop 0x80 /* Set to 0x1f to clock SD controller, 0 otherwise. */
++ /* at 0x82 - Gated Clock Control */
++#define _IPAQ_ASIC3_SD_CONFIG_ClockMode 0x84 /* Control clock of SD controller */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_PinStatus 0x88 /* R/0: read status of SD pins */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Power1 0x90 /* Power1 - manual power control */
++ /* Power2 is at 0x92 - auto power up after card inserted */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Power3 0x94 /* auto power down when card removed */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_CardDetect 0x98 /* */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Slot 0xA0 /* R/O: define support slot number */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk1 0x1E0 /* Could be used for gated clock (don't use) */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk2 0x1E2 /* Could be used for gated clock (don't use) */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_GPIO_OutAndEnable 0x1E8 /* GPIO Output Reg. , at 0x1EA - GPIO Output Enable Reg. */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_GPIO_Status 0x1EC /* GPIO Status Reg. */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk3 0x1F0 /* Bit 1: double buffer/single buffer */
++
++#define IPAQ_ASIC3_SD_CONFIG_Command(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Command )
++#define IPAQ_ASIC3_SD_CONFIG_Addr0(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Addr0 )
++#define IPAQ_ASIC3_SD_CONFIG_Addr1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Addr1 )
++#define IPAQ_ASIC3_SD_CONFIG_IntPin(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, IntPin )
++#define IPAQ_ASIC3_SD_CONFIG_ClkStop(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, ClkStop )
++#define IPAQ_ASIC3_SD_CONFIG_ClockMode(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, ClockMode )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_PinStatus(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_PinStatus )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Power1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Power1 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Power3(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Power3 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_CardDetect(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_CardDetect )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Slot(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Slot )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_ExtGateClk1 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk3(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_ExtGateClk3 )
++
++#define SD_CONFIG_
++
++#define SD_CONFIG_COMMAND_MAE (1<<1) /* Memory access enable (set to 1 to access SD Controller) */
++
++#define SD_CONFIG_CLK_ENABLE_ALL 0x1f
++
++#define SD_CONFIG_POWER1_PC_33V 0x0200 /* Set for 3.3 volts */
++#define SD_CONFIG_POWER1_PC_OFF 0x0000 /* Turn off power */
++
++#define SD_CONFIG_CARDDETECTMODE_CLK ((x)&0x3) /* two bits - number of cycles for card detection */
++
++
++#define _IPAQ_ASIC3_SD_CTRL_Base 0x1000
++
++#define IPAQ_ASIC3_SD(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SD_CTRL_Base + (_IPAQ_ASIC3_SD_CTRL_ ## x))))
++
++#define _IPAQ_ASIC3_SD_CTRL_Cmd 0x00
++#define _IPAQ_ASIC3_SD_CTRL_Arg0 0x08
++#define _IPAQ_ASIC3_SD_CTRL_Arg1 0x0C
++#define _IPAQ_ASIC3_SD_CTRL_StopInternal 0x10
++#define _IPAQ_ASIC3_SD_CTRL_TransferSectorCount 0x14
++#define _IPAQ_ASIC3_SD_CTRL_Response0 0x18
++#define _IPAQ_ASIC3_SD_CTRL_Response1 0x1C
++#define _IPAQ_ASIC3_SD_CTRL_Response2 0x20
++#define _IPAQ_ASIC3_SD_CTRL_Response3 0x24
++#define _IPAQ_ASIC3_SD_CTRL_Response4 0x28
++#define _IPAQ_ASIC3_SD_CTRL_Response5 0x2C
++#define _IPAQ_ASIC3_SD_CTRL_Response6 0x30
++#define _IPAQ_ASIC3_SD_CTRL_Response7 0x34
++#define _IPAQ_ASIC3_SD_CTRL_CardStatus 0x38
++#define _IPAQ_ASIC3_SD_CTRL_BufferCtrl 0x3C
++#define _IPAQ_ASIC3_SD_CTRL_IntMaskCard 0x40
++#define _IPAQ_ASIC3_SD_CTRL_IntMaskBuffer 0x44
++#define _IPAQ_ASIC3_SD_CTRL_CardClockCtrl 0x48
++#define _IPAQ_ASIC3_SD_CTRL_MemCardXferDataLen 0x4C
++#define _IPAQ_ASIC3_SD_CTRL_MemCardOptionSetup 0x50
++#define _IPAQ_ASIC3_SD_CTRL_ErrorStatus0 0x58
++#define _IPAQ_ASIC3_SD_CTRL_ErrorStatus1 0x5C
++#define _IPAQ_ASIC3_SD_CTRL_DataPort 0x60
++#define _IPAQ_ASIC3_SD_CTRL_TransactionCtrl 0x68
++#define _IPAQ_ASIC3_SD_CTRL_SoftwareReset 0x1C0
++
++#define IPAQ_ASIC3_SD_CTRL_Cmd(_b) IPAQ_ASIC3_SD( _b, u16, Cmd ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Arg0(_b) IPAQ_ASIC3_SD( _b, u16, Arg0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Arg1(_b) IPAQ_ASIC3_SD( _b, u16, Arg1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_StopInternal(_b) IPAQ_ASIC3_SD( _b, u16, StopInternal ) /* */
++#define IPAQ_ASIC3_SD_CTRL_TransferSectorCount(_b) IPAQ_ASIC3_SD( _b, u16, TransferSectorCount ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response0(_b) IPAQ_ASIC3_SD( _b, u16, Response0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response1(_b) IPAQ_ASIC3_SD( _b, u16, Response1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response2(_b) IPAQ_ASIC3_SD( _b, u16, Response2 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response3(_b) IPAQ_ASIC3_SD( _b, u16, Response3 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response4(_b) IPAQ_ASIC3_SD( _b, u16, Response4 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response5(_b) IPAQ_ASIC3_SD( _b, u16, Response5 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response6(_b) IPAQ_ASIC3_SD( _b, u16, Response6 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response7(_b) IPAQ_ASIC3_SD( _b, u16, Response7 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_CardStatus(_b) IPAQ_ASIC3_SD( _b, u16, CardStatus ) /* */
++#define IPAQ_ASIC3_SD_CTRL_BufferCtrl(_b) IPAQ_ASIC3_SD( _b, u16, BufferCtrl ) /* and error status*/
++#define IPAQ_ASIC3_SD_CTRL_IntMaskCard(_b) IPAQ_ASIC3_SD( _b, u16, IntMaskCard ) /* */
++#define IPAQ_ASIC3_SD_CTRL_IntMaskBuffer(_b) IPAQ_ASIC3_SD( _b, u16, IntMaskBuffer ) /* */
++#define IPAQ_ASIC3_SD_CTRL_CardClockCtrl(_b) IPAQ_ASIC3_SD( _b, u16, CardClockCtrl ) /* */
++#define IPAQ_ASIC3_SD_CTRL_MemCardXferDataLen(_b) IPAQ_ASIC3_SD( _b, u16, MemCardXferDataLen ) /* */
++#define IPAQ_ASIC3_SD_CTRL_MemCardOptionSetup(_b) IPAQ_ASIC3_SD( _b, u16, MemCardOptionSetup ) /* */
++#define IPAQ_ASIC3_SD_CTRL_ErrorStatus0(_b) IPAQ_ASIC3_SD( _b, u16, ErrorStatus0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_ErrorStatus1(_b) IPAQ_ASIC3_SD( _b, u16, ErrorStatus1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_DataPort(_b) IPAQ_ASIC3_SD( _b, u16, DataPort ) /* */
++#define IPAQ_ASIC3_SD_CTRL_TransactionCtrl(_b) IPAQ_ASIC3_SD( _b, u16, TransactionCtrl ) /* */
++#define IPAQ_ASIC3_SD_CTRL_SoftwareReset(_b) IPAQ_ASIC3_SD( _b, u16, SoftwareReset ) /* */
++
++#define SD_CTRL_SOFTWARE_RESET_CLEAR (1<<0)
++
++#define SD_CTRL_TRANSACTIONCONTROL_SET (1<<8) // 0x0100
++
++#define SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD (1<<15)// 0x8000
++#define SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK (1<<8) // 0x0100
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_512 (1<<7) // 0x0080
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_256 (1<<6) // 0x0040
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_128 (1<<5) // 0x0020
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_64 (1<<4) // 0x0010
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_32 (1<<3) // 0x0008
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_16 (1<<2) // 0x0004
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_8 (1<<1) // 0x0002
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_4 (1<<0) // 0x0001
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_2 (0<<0) // 0x0000
++
++#define MEM_CARD_OPTION_REQUIRED 0x000e
++#define MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(x) (((x)&0x0f)<<4) /* Four bits */
++#define MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT (1<<14) // 0x4000
++#define MEM_CARD_OPTION_DATA_XFR_WIDTH_1 (1<<15) // 0x8000
++#define MEM_CARD_OPTION_DATA_XFR_WIDTH_4 (0<<15) //~0x8000
++
++#define SD_CTRL_COMMAND_INDEX(x) ((x)&0x3f) /* 0=CMD0, 1=CMD1, ..., 63=CMD63 */
++#define SD_CTRL_COMMAND_TYPE_CMD (0 << 6)
++#define SD_CTRL_COMMAND_TYPE_ACMD (1 << 6)
++#define SD_CTRL_COMMAND_TYPE_AUTHENTICATION (2 << 6)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL (0 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1 (4 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B (5 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2 (6 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3 (7 << 8)
++#define SD_CTRL_COMMAND_DATA_PRESENT (1 << 11)
++#define SD_CTRL_COMMAND_TRANSFER_READ (1 << 12)
++#define SD_CTRL_COMMAND_TRANSFER_WRITE (0 << 12)
++#define SD_CTRL_COMMAND_MULTI_BLOCK (1 << 13)
++#define SD_CTRL_COMMAND_SECURITY_CMD (1 << 14)
++
++#define SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12 (1 << 0)
++#define SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12 (1 << 8)
++
++#define SD_CTRL_CARDSTATUS_RESPONSE_END (1 << 0)
++#define SD_CTRL_CARDSTATUS_RW_END (1 << 2)
++#define SD_CTRL_CARDSTATUS_CARD_REMOVED_0 (1 << 3)
++#define SD_CTRL_CARDSTATUS_CARD_INSERTED_0 (1 << 4)
++#define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_0 (1 << 5)
++#define SD_CTRL_CARDSTATUS_WRITE_PROTECT (1 << 7)
++#define SD_CTRL_CARDSTATUS_CARD_REMOVED_3 (1 << 8)
++#define SD_CTRL_CARDSTATUS_CARD_INSERTED_3 (1 << 9)
++#define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_3 (1 << 10)
++
++#define SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_BUFFERSTATUS_CRC_ERROR (1 << 1) // 0x0002
++#define SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR (1 << 2) // 0x0004
++#define SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT (1 << 3) // 0x0008
++#define SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW (1 << 4) // 0x0010
++#define SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW (1 << 5) // 0x0020
++#define SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT (1 << 6) // 0x0040
++#define SD_CTRL_BUFFERSTATUS_UNK7 (1 << 7) // 0x0080
++#define SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE (1 << 8) // 0x0100
++#define SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE (1 << 9) // 0x0200
++#define SD_CTRL_BUFFERSTATUS_ILLEGAL_FUNCTION (1 << 13)// 0x2000
++#define SD_CTRL_BUFFERSTATUS_CMD_BUSY (1 << 14)// 0x4000
++#define SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS (1 << 15)// 0x8000
++
++#define SD_CTRL_INTMASKCARD_RESPONSE_END (1 << 0) // 0x0001
++#define SD_CTRL_INTMASKCARD_RW_END (1 << 2) // 0x0004
++#define SD_CTRL_INTMASKCARD_CARD_REMOVED_0 (1 << 3) // 0x0008
++#define SD_CTRL_INTMASKCARD_CARD_INSERTED_0 (1 << 4) // 0x0010
++#define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 (1 << 5) // 0x0020
++#define SD_CTRL_INTMASKCARD_UNK6 (1 << 6) // 0x0040
++#define SD_CTRL_INTMASKCARD_WRITE_PROTECT (1 << 7) // 0x0080
++#define SD_CTRL_INTMASKCARD_CARD_REMOVED_3 (1 << 8) // 0x0100
++#define SD_CTRL_INTMASKCARD_CARD_INSERTED_3 (1 << 9) // 0x0200
++#define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 (1 << 10)// 0x0400
++
++#define SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_INTMASKBUFFER_CRC_ERROR (1 << 1) // 0x0002
++#define SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR (1 << 2) // 0x0004
++#define SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT (1 << 3) // 0x0008
++#define SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW (1 << 4) // 0x0010
++#define SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW (1 << 5) // 0x0020
++#define SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT (1 << 6) // 0x0040
++#define SD_CTRL_INTMASKBUFFER_UNK7 (1 << 7) // 0x0080
++#define SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE (1 << 8) // 0x0100
++#define SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE (1 << 9) // 0x0200
++#define SD_CTRL_INTMASKBUFFER_ILLEGAL_FUNCTION (1 << 13)// 0x2000
++#define SD_CTRL_INTMASKBUFFER_CMD_BUSY (1 << 14)// 0x4000
++#define SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS (1 << 15)// 0x8000
++
++#define SD_CTRL_DETAIL0_RESPONSE_CMD_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 2) // 0x0004
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_CMD12 (1 << 3) // 0x0008
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_READ_DATA (1 << 4) // 0x0010
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_WRITE_CRC_STATUS (1 << 5) // 0x0020
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 8) // 0x0100
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_CMD12 (1 << 9) // 0x0200
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_READ_DATA (1 << 10)// 0x0400
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_WRITE_CMD (1 << 11)// 0x0800
++
++#define SD_CTRL_DETAIL1_NO_CMD_RESPONSE (1 << 0) // 0x0001
++#define SD_CTRL_DETAIL1_TIMEOUT_READ_DATA (1 << 4) // 0x0010
++#define SD_CTRL_DETAIL1_TIMEOUT_CRS_STATUS (1 << 5) // 0x0020
++#define SD_CTRL_DETAIL1_TIMEOUT_CRC_BUSY (1 << 6) // 0x0040
++
++#define _IPAQ_ASIC3_SDIO_CTRL_Base 0x1200
++
++#define IPAQ_ASIC3_SDIO(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SDIO_CTRL_Base + (_IPAQ_ASIC3_SDIO_CTRL_ ## x))))
++
++#define _IPAQ_ASIC3_SDIO_CTRL_Cmd 0x00
++#define _IPAQ_ASIC3_SDIO_CTRL_CardPortSel 0x04
++#define _IPAQ_ASIC3_SDIO_CTRL_Arg0 0x08
++#define _IPAQ_ASIC3_SDIO_CTRL_Arg1 0x0C
++#define _IPAQ_ASIC3_SDIO_CTRL_TransferBlockCount 0x14
++#define _IPAQ_ASIC3_SDIO_CTRL_Response0 0x18
++#define _IPAQ_ASIC3_SDIO_CTRL_Response1 0x1C
++#define _IPAQ_ASIC3_SDIO_CTRL_Response2 0x20
++#define _IPAQ_ASIC3_SDIO_CTRL_Response3 0x24
++#define _IPAQ_ASIC3_SDIO_CTRL_Response4 0x28
++#define _IPAQ_ASIC3_SDIO_CTRL_Response5 0x2C
++#define _IPAQ_ASIC3_SDIO_CTRL_Response6 0x30
++#define _IPAQ_ASIC3_SDIO_CTRL_Response7 0x34
++#define _IPAQ_ASIC3_SDIO_CTRL_CardStatus 0x38
++#define _IPAQ_ASIC3_SDIO_CTRL_BufferCtrl 0x3C
++#define _IPAQ_ASIC3_SDIO_CTRL_IntMaskCard 0x40
++#define _IPAQ_ASIC3_SDIO_CTRL_IntMaskBuffer 0x44
++#define _IPAQ_ASIC3_SDIO_CTRL_CardXferDataLen 0x4C
++#define _IPAQ_ASIC3_SDIO_CTRL_CardOptionSetup 0x50
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorStatus0 0x54
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorStatus1 0x58
++#define _IPAQ_ASIC3_SDIO_CTRL_DataPort 0x60
++#define _IPAQ_ASIC3_SDIO_CTRL_TransactionCtrl 0x68
++#define _IPAQ_ASIC3_SDIO_CTRL_CardIntCtrl 0x6C
++#define _IPAQ_ASIC3_SDIO_CTRL_ClocknWaitCtrl 0x70
++#define _IPAQ_ASIC3_SDIO_CTRL_HostInformation 0x74
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorCtrl 0x78
++#define _IPAQ_ASIC3_SDIO_CTRL_LEDCtrl 0x7C
++#define _IPAQ_ASIC3_SDIO_CTRL_SoftwareReset 0x1C0
++
++#define IPAQ_ASIC3_SDIO_CTRL_Cmd(_b) IPAQ_ASIC3_SDIO( _b, u16, Cmd ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardPortSel(_b) IPAQ_ASIC3_SDIO( _b, u16, CardPortSel ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Arg0(_b) IPAQ_ASIC3_SDIO( _b, u16, Arg0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Arg1(_b) IPAQ_ASIC3_SDIO( _b, u16, Arg1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_TransferBlockCount(_b) IPAQ_ASIC3_SDIO( _b, u16, TransferBlockCount ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response0(_b) IPAQ_ASIC3_SDIO( _b, u16, Response0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response1(_b) IPAQ_ASIC3_SDIO( _b, u16, Response1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response2(_b) IPAQ_ASIC3_SDIO( _b, u16, Response2 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response3(_b) IPAQ_ASIC3_SDIO( _b, u16, Response3 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response4(_b) IPAQ_ASIC3_SDIO( _b, u16, Response4 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response5(_b) IPAQ_ASIC3_SDIO( _b, u16, Response5 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response6(_b) IPAQ_ASIC3_SDIO( _b, u16, Response6 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response7(_b) IPAQ_ASIC3_SDIO( _b, u16, Response7 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardStatus(_b) IPAQ_ASIC3_SDIO( _b, u16, CardStatus ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_BufferCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, BufferCtrl ) /* and error status*/
++#define IPAQ_ASIC3_SDIO_CTRL_IntMaskCard(_b) IPAQ_ASIC3_SDIO( _b, u16, IntMaskCard ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_IntMaskBuffer(_b) IPAQ_ASIC3_SDIO( _b, u16, IntMaskBuffer ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardXferDataLen(_b) IPAQ_ASIC3_SDIO( _b, u16, CardXferDataLen ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardOptionSetup(_b) IPAQ_ASIC3_SDIO( _b, u16, CardOptionSetup ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorStatus0(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorStatus0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorStatus1(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorStatus1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_DataPort(_b) IPAQ_ASIC3_SDIO( _b, u16, DataPort ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_TransactionCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, TransactionCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardIntCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, CardIntCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ClocknWaitCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, ClocknWaitCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_HostInformation(_b) IPAQ_ASIC3_SDIO( _b, u16, HostInformation ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_LEDCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, LEDCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_SoftwareReset(_b) IPAQ_ASIC3_SDIO( _b, u16, SoftwareReset ) /* */
++
++#define IPAQ_ASIC3_MAP_SIZE 0x2000
++
++#endif
+Index: linux-2.6.24/include/linux/gpiodev.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/linux/gpiodev.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,44 @@
++#ifndef __GPIODEV_H
++#define __GPIODEV_H
++
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <asm/gpio.h>
++
++/* Interface */
++
++/* This structure must be first member of device platform_data structure
++ of a device which provides gpiodev interface. All method pointers
++ must be non-NULL, so stubs must be used for non-implemented ones. */
++struct gpiodev_ops {
++ int (*get)(struct device *this, unsigned gpio_no);
++ void (*set)(struct device *this, unsigned gpio_no, int val);
++ int (*to_irq)(struct device *this, unsigned gpio_no);
++};
++
++/* Generalized GPIO structure */
++
++struct gpio {
++ struct device *gpio_dev;
++ unsigned gpio_no;
++};
++
++/* API functions */
++
++static inline int gpiodev_get_value(struct gpio *gpio)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ return ops->get(gpio->gpio_dev, gpio->gpio_no);
++}
++static inline void gpiodev_set_value(struct gpio *gpio, int val)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ ops->set(gpio->gpio_dev, gpio->gpio_no, val);
++}
++static inline int gpiodev_to_irq(struct gpio *gpio)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ return ops->to_irq(gpio->gpio_dev, gpio->gpio_no);
++}
++
++#endif /* __GPIODEV_H */
+Index: linux-2.6.24/include/linux/input_pda.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/linux/input_pda.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,47 @@
++#ifndef _INPUT_PDA_H
++#define _INPUT_PDA_H
++
++/*
++ * This is temporary virtual button key codes map
++ * for keyboardless handheld computers.
++ * Its purpose is to provide map common to all devices
++ * and known to work with current software and its bugs
++ * and misfeatures. Once issues with the software are
++ * solved, codes from input.h will be used directly
++ * (missing key definitions will be added).
++ */
++
++/* Some directly usable keycodes:
++KEY_POWER - Power/suspend button
++KEY_ENTER - Enter/Action/Central button on joypad
++KEY_UP
++KEY_DOWN
++KEY_LEFT
++KEY_RIGHT
++*/
++
++/* XXX Instead of using any values in include/linux/input.h, we have to use
++ use values < 128 due to some munging that kdrive does to get keystrokes.
++ When kdrive gets its key events from evdev instead of the console,
++ we should be able to switch to using input.h values and get rid of
++ xmodmap. */
++
++#define _KEY_APP1 KEY_F9 // xmodmap sees 67 + 8 = 75
++#define _KEY_APP2 KEY_F10 // xmodmap 76
++#define _KEY_APP3 KEY_F11 // xmodmap 95
++#define _KEY_APP4 KEY_F12 // xmodmap 96
++
++#define _KEY_RECORD KEY_RO
++
++/* It is highly recommended to use exactly 4 codes above for
++ 4 buttons the device has. This will ensure that console and
++ framebuffer applications (e.g. games) will work ok on all
++ devices. If you'd like more distinguishable names, following
++ convenience defines are provided, suiting many devices. */
++
++#define _KEY_CALENDAR _KEY_APP1
++#define _KEY_CONTACTS _KEY_APP2
++#define _KEY_MAIL _KEY_APP3
++#define _KEY_HOMEPAGE _KEY_APP4
++
++#endif
+Index: linux-2.6.24/include/linux/soc/asic3_base.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/linux/soc/asic3_base.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,104 @@
++#include <asm/types.h>
++#include <linux/gpiodev.h>
++
++/* Private API - for ASIC3 devices internal use only */
++#define HDR_IPAQ_ASIC3_ACTION(ACTION,action,fn,FN) \
++u32 asic3_get_gpio_ ## action ## _ ## fn (struct device *dev); \
++void asic3_set_gpio_ ## action ## _ ## fn (struct device *dev, u32 bits, u32 val);
++
++#define HDR_IPAQ_ASIC3_FN(fn,FN) \
++ HDR_IPAQ_ASIC3_ACTION ( MASK,mask,fn,FN) \
++ HDR_IPAQ_ASIC3_ACTION ( DIR, dir, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( OUT, out, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( LEVELTRI, trigtype, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( RISING, rising, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( LEVEL, triglevel, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_MASK, sleepmask, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_OUT, sleepout, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( BATT_FAULT_OUT, battfaultout, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( INT_STATUS, intstatus, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( ALT_FUNCTION, alt_fn, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_CONF, sleepconf, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( STATUS, status, fn, FN)
++
++/* Public API */
++
++#define ASIC3_GPIOA_IRQ_BASE 0
++#define ASIC3_GPIOB_IRQ_BASE 16
++#define ASIC3_GPIOC_IRQ_BASE 32
++#define ASIC3_GPIOD_IRQ_BASE 48
++#define ASIC3_LED0_IRQ 64
++#define ASIC3_LED1_IRQ 65
++#define ASIC3_LED2_IRQ 66
++#define ASIC3_SPI_IRQ 67
++#define ASIC3_SMBUS_IRQ 68
++#define ASIC3_OWM_IRQ 69
++
++#define ASIC3_NR_GPIO_IRQS 64 /* 16 bits each GPIO A...D banks */
++#define ASIC3_NR_IRQS (ASIC3_OWM_IRQ + 1)
++
++extern int asic3_irq_base(struct device *dev);
++
++extern void asic3_write_register(struct device *dev, unsigned int reg,
++ u32 value);
++extern u32 asic3_read_register(struct device *dev, unsigned int reg);
++
++/* old clock api */
++extern void asic3_set_clock_sel(struct device *dev, u32 bits, u32 val);
++extern u32 asic3_get_clock_cdex(struct device *dev);
++extern void asic3_set_clock_cdex(struct device *dev, u32 bits, u32 val);
++
++extern void asic3_set_extcf_select(struct device *dev, u32 bits, u32 val);
++extern void asic3_set_extcf_reset(struct device *dev, u32 bits, u32 val);
++extern void asic3_set_sdhwctrl(struct device *dev, u32 bits, u32 val);
++
++extern void asic3_set_led(struct device *dev, int led_num, int duty_time,
++ int cycle_time, int timebase);
++
++extern int asic3_register_mmc(struct device *dev);
++extern int asic3_unregister_mmc(struct device *dev);
++
++/* Accessors for GPIO banks */
++HDR_IPAQ_ASIC3_FN(a, A)
++HDR_IPAQ_ASIC3_FN(b, B)
++HDR_IPAQ_ASIC3_FN(c, C)
++HDR_IPAQ_ASIC3_FN(d, D)
++
++#define _IPAQ_ASIC3_GPIO_BANK_A 0
++#define _IPAQ_ASIC3_GPIO_BANK_B 1
++#define _IPAQ_ASIC3_GPIO_BANK_C 2
++#define _IPAQ_ASIC3_GPIO_BANK_D 3
++
++#define ASIC3_GPIO_bit(gpio) (1 << (gpio & 0xf))
++
++extern int asic3_get_gpio_bit(struct device *dev, int gpio);
++extern void asic3_set_gpio_bit(struct device *dev, int gpio, int val);
++extern int asic3_gpio_get_value(struct device *dev, unsigned gpio);
++extern void asic3_gpio_set_value(struct device *dev, unsigned gpio, int val);
++
++
++struct tmio_mmc_hwconfig;
++
++struct asic3_platform_data
++{
++ // Must be first member
++ struct gpiodev_ops gpiodev_ops;
++
++ struct {
++ u32 dir;
++ u32 init;
++ u32 sleep_mask;
++ u32 sleep_out;
++ u32 batt_fault_out;
++ u32 sleep_conf;
++ u32 alt_function;
++ } gpio_a, gpio_b, gpio_c, gpio_d;
++
++ int irq_base;
++ unsigned int bus_shift;
++
++ struct platform_device **child_platform_devs;
++ int num_child_platform_devs;
++
++ struct tmio_mmc_hwconfig *tmio_mmc_hwconfig;
++};
+Index: linux-2.6.24/include/linux/soc/tmio_mmc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/linux/soc/tmio_mmc.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,17 @@
++#include <linux/platform_device.h>
++
++#define MMC_CLOCK_DISABLED 0
++#define MMC_CLOCK_ENABLED 1
++
++#define TMIO_WP_ALWAYS_RW ((void*)-1)
++
++struct tmio_mmc_hwconfig {
++ void (*hwinit)(struct platform_device *sdev);
++ void (*set_mmc_clock)(struct platform_device *sdev, int state);
++
++ /* NULL - use ASIC3 signal,
++ TMIO_WP_ALWAYS_RW - assume always R/W (e.g. miniSD)
++ otherwise - machine-specific handler */
++ int (*mmc_get_ro)(struct platform_device *pdev);
++ short address_shift;
++};
+Index: linux-2.6.24/include/asm-arm/arch-pxa/pxa-regs.h
+===================================================================
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/pxa-regs.h 2008-03-10 16:07:59.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/pxa-regs.h 2008-03-10 16:09:23.000000000 +0000
+@@ -2058,6 +2058,8 @@
+ #define LDCMD_SOFINT (1 << 22)
+ #define LDCMD_EOFINT (1 << 21)
+
++#define LCCR4_13M_PCD_EN (1<<25) /* 13M PCD enable */
++#define LCCR4_PCDDIV (1<<31) /* PCD selection */
+
+ #define LCCR5_SOFM1 (1<<0) /* Start Of Frame Mask for Overlay 1 (channel 1) */
+ #define LCCR5_SOFM2 (1<<1) /* Start Of Frame Mask for Overlay 2 (channel 2) */
+Index: linux-2.6.24/drivers/mmc/host/Makefile
+===================================================================
+--- linux-2.6.24.orig/drivers/mmc/host/Makefile 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -13,6 +13,7 @@
+ obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o
+ obj-$(CONFIG_MMC_WBSD) += wbsd.o
+ obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
++obj-$(CONFIG_MMC_ASIC3) += asic3_mmc.o
+ obj-$(CONFIG_MMC_OMAP) += omap.o
+ obj-$(CONFIG_MMC_AT91) += at91_mci.o
+ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
+Index: linux-2.6.24/drivers/mmc/host/asic3_mmc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/asic3_mmc.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,900 @@
++/* Note that this driver can likely be merged into the tmio driver, so
++ * consider this code temporary. It works, though.
++ */
++/*
++ * linux/drivers/mmc/asic3_mmc.c
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * based on tmio_mmc.c
++ * Copyright (C) 2004 Ian Molton
++ *
++ * Refactored to support all ASIC3 devices, 2006 Paul Sokolovsky
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Driver for the SD / SDIO cell found in:
++ *
++ * TC6393XB
++ *
++ * This driver draws mainly on scattered spec sheets, Reverse engineering
++ * of the toshiba e800 SD driver and some parts of the 2.4 ASIC3 driver (4 bit
++ * support).
++ *
++ * Supports MMC 1 bit transfers and SD 1 and 4 bit modes.
++ *
++ * TODO:
++ * Eliminate FIXMEs
++ * SDIO support
++ * Power management
++ * Handle MMC errors (at all)
++ *
++ */
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/blkdev.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/mmc/mmc.h>
++#include <linux/mmc/host.h>
++#include <linux/mmc/card.h>
++//#include <linux/mmc/protocol.h>
++#include <linux/mmc/sd.h>
++#include <linux/scatterlist.h>
++//#include <linux/soc-old.h>
++#include <linux/soc/asic3_base.h>
++#include <linux/soc/tmio_mmc.h>
++
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/mach/irq.h>
++#include <linux/clk.h>
++#include <asm/mach-types.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include "asic3_mmc.h"
++
++struct asic3_mmc_host {
++ void *ctl_base;
++ struct device *asic3_dev; /* asic3 device */
++ struct tmio_mmc_hwconfig *hwconfig; /* HW config data/handlers, guaranteed != NULL */
++ unsigned long bus_shift;
++ struct mmc_command *cmd;
++ struct mmc_request *mrq;
++ struct mmc_data *data;
++ struct mmc_host *mmc;
++ int irq;
++ unsigned short clock_for_sd;
++
++ /* I/O related stuff */
++ struct scatterlist *sg_ptr;
++ unsigned int sg_len;
++ unsigned int sg_off;
++};
++
++static void
++mmc_finish_request(struct asic3_mmc_host *host)
++{
++ struct mmc_request *mrq = host->mrq;
++
++ /* Write something to end the command */
++ host->mrq = NULL;
++ host->cmd = NULL;
++ host->data = NULL;
++
++ mmc_request_done(host->mmc, mrq);
++}
++
++
++#define ASIC3_MMC_REG(host, block, reg) (*((volatile u16 *) ((host->ctl_base) + ((_IPAQ_ASIC3_## block ## _Base + _IPAQ_ASIC3_ ## block ## _ ## reg) >> (2 - host->bus_shift))) ))
++
++static void
++mmc_start_command(struct asic3_mmc_host *host, struct mmc_command *cmd)
++{
++ struct mmc_data *data = host->data;
++ int c = cmd->opcode;
++
++ DBG("Opcode: %d, base: %p\n", cmd->opcode, host->ctl_base);
++
++ if(cmd->opcode == MMC_STOP_TRANSMISSION) {
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12;
++ cmd->resp[0] = cmd->opcode;
++ cmd->resp[1] = 0;
++ cmd->resp[2] = 0;
++ cmd->resp[3] = 0;
++ cmd->resp[4] = 0;
++ return;
++ }
++
++ switch(cmd->flags & 0x1f) {
++ case MMC_RSP_NONE: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL; break;
++ case MMC_RSP_R1: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1; break;
++ case MMC_RSP_R1B: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B; break;
++ case MMC_RSP_R2: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2; break;
++ case MMC_RSP_R3: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3; break;
++ default:
++ DBG("Unknown response type %d\n", cmd->flags & 0x1f);
++ break;
++ }
++
++ host->cmd = cmd;
++
++ if(cmd->opcode == MMC_APP_CMD) {
++ c |= APP_CMD;
++ }
++ if (cmd->opcode == MMC_GO_IDLE_STATE) {
++ c |= (3 << 8); /* This was removed from ipaq-asic3.h for some reason */
++ }
++ if(data) {
++ c |= SD_CTRL_COMMAND_DATA_PRESENT;
++ if(data->blocks > 1) {
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12;
++ c |= SD_CTRL_COMMAND_MULTI_BLOCK;
++ }
++ if(data->flags & MMC_DATA_READ) {
++ c |= SD_CTRL_COMMAND_TRANSFER_READ;
++ }
++ /* MMC_DATA_WRITE does not require a bit to be set */
++ }
++
++ /* Enable the command and data interrupts */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0
++#if 0
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_3
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_3
++#endif
++ );
++
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) = ~(
++ SD_CTRL_INTMASKBUFFER_UNK7
++ | SD_CTRL_INTMASKBUFFER_CMD_BUSY
++#if 0
++ | SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR
++ | SD_CTRL_INTMASKBUFFER_CRC_ERROR
++ | SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR
++ | SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT
++ | SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW
++ | SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW
++ | SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT
++ | SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE
++ | SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE
++ | SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS
++#endif
++ );
++
++ /* Send the command */
++ ASIC3_MMC_REG(host, SD_CTRL, Arg1) = cmd->arg >> 16;
++ ASIC3_MMC_REG(host, SD_CTRL, Arg0) = cmd->arg & 0xffff;
++ ASIC3_MMC_REG(host, SD_CTRL, Cmd) = c;
++}
++
++/* This chip always returns (at least?) as much data as you ask for. I'm
++ * unsure what happens if you ask for less than a block. This should be looked
++ * into to ensure that a funny length read doesnt mess up the controller data
++ * state machine.
++ *
++ * Aric: Statement above may not apply to ASIC3.
++ *
++ * FIXME - this chip cannot do 1 and 2 byte data requests in 4 bit mode
++ *
++ * Aric: Statement above may not apply to ASIC3.
++ */
++
++static struct tasklet_struct mmc_data_read_tasklet;
++
++static void
++mmc_data_transfer(unsigned long h)
++{
++ struct asic3_mmc_host *host = (struct asic3_mmc_host *)h;
++ struct mmc_data *data = host->data;
++ unsigned short *buf;
++ int count;
++ /* unsigned long flags; */
++
++ if(!data){
++ printk(KERN_WARNING DRIVER_NAME ": Spurious Data IRQ\n");
++ return;
++ }
++
++ /* local_irq_save(flags); */
++ /* buf = kmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); */
++ buf = kmap(host->sg_ptr->page);
++ buf += host->sg_ptr->offset/2 + host->sg_off/2;
++
++ /*
++ * Ensure we dont read more than one block. The chip will interrupt us
++ * When the next block is available.
++ */
++ count = host->sg_ptr->length - host->sg_off;
++ if(count > data->blksz) {
++ count = data->blksz;
++ }
++
++ DBG("count: %08x, page: %p, offset: %08x flags %08x\n",
++ count, host->sg_ptr->page, host->sg_off, data->flags);
++
++ host->sg_off += count;
++
++ /* Transfer the data */
++ if(data->flags & MMC_DATA_READ) {
++ while(count > 0) {
++ /* Read two bytes from SD/MMC controller. */
++ *buf = ASIC3_MMC_REG(host, SD_CTRL, DataPort);
++ buf++;
++ count -= 2;
++ }
++ //flush_dcache_page(host->sg_ptr->page);
++ } else {
++ while(count > 0) {
++ /* Write two bytes to SD/MMC controller. */
++ ASIC3_MMC_REG(host, SD_CTRL, DataPort) = *buf;
++ buf++;
++ count -= 2;
++ }
++ }
++
++ /* kunmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); */
++ kunmap(host->sg_ptr->page);
++ /* local_irq_restore(flags); */
++ if(host->sg_off == host->sg_ptr->length) {
++ host->sg_ptr++;
++ host->sg_off = 0;
++ --host->sg_len;
++ }
++
++ return;
++}
++
++static void
++mmc_data_end_irq(struct asic3_mmc_host *host)
++{
++ struct mmc_data *data = host->data;
++
++ host->data = NULL;
++
++ if(!data){
++ printk(KERN_WARNING DRIVER_NAME ": Spurious data end IRQ\n");
++ return;
++ }
++
++ if (data->error == MMC_ERR_NONE) {
++ data->bytes_xfered = data->blocks * data->blksz;
++ } else {
++ data->bytes_xfered = 0;
++ }
++
++ DBG("Completed data request\n");
++
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = 0;
++
++ /* Make sure read enable interrupt and write enable interrupt are disabled */
++ if(data->flags & MMC_DATA_READ) {
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) |= SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE;
++ } else {
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) |= SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE;
++ }
++
++ mmc_finish_request(host);
++}
++
++static void
++mmc_cmd_irq(struct asic3_mmc_host *host, unsigned int buffer_stat)
++{
++ struct mmc_command *cmd = host->cmd;
++ u8 *buf = (u8 *)cmd->resp;
++ u16 data;
++
++ if(!host->cmd) {
++ printk(KERN_WARNING DRIVER_NAME ": Spurious CMD irq\n");
++ return;
++ }
++
++ host->cmd = NULL;
++ if(cmd->flags & MMC_RSP_PRESENT && cmd->flags & MMC_RSP_136) {
++ /* R2 */
++ buf[12] = 0xff;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response0);
++ buf[13] = data & 0xff;
++ buf[14] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response1);
++ buf[15] = data & 0xff;
++ buf[8] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response2);
++ buf[9] = data & 0xff;
++ buf[10] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response3);
++ buf[11] = data & 0xff;
++ buf[4] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response4);
++ buf[5] = data & 0xff;
++ buf[6] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response5);
++ buf[7] = data & 0xff;
++ buf[0] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response6);
++ buf[1] = data & 0xff;
++ buf[2] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response7);
++ buf[3] = data & 0xff;
++ } else if(cmd->flags & MMC_RSP_PRESENT) {
++ /* R1, R1B, R3 */
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response0);
++ buf[0] = data & 0xff;
++ buf[1] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response1);
++ buf[2] = data & 0xff;
++ buf[3] = data >> 8;
++ }
++ DBG("Response: %08x %08x %08x %08x\n", cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
++
++ if(buffer_stat & SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT) {
++ cmd->error = MMC_ERR_TIMEOUT;
++ } else if((buffer_stat & SD_CTRL_BUFFERSTATUS_CRC_ERROR) && (cmd->flags & MMC_RSP_CRC)) {
++ cmd->error = MMC_ERR_BADCRC;
++ } else if(buffer_stat &
++ (
++ SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS
++ | SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR
++ | SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR
++ | SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW
++ | SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW
++ | SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT
++ )
++ ) {
++ DBG("Buffer status ERROR 0x%04x - inside check buffer\n", buffer_stat);
++ DBG("detail0 error status 0x%04x\n", ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus0));
++ DBG("detail1 error status 0x%04x\n", ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus1));
++ cmd->error = MMC_ERR_FAILED;
++ }
++
++ if(cmd->error == MMC_ERR_NONE) {
++ switch (cmd->opcode) {
++ case SD_APP_SET_BUS_WIDTH:
++ if(cmd->arg == SD_BUS_WIDTH_4) {
++ host->clock_for_sd = SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_4;
++ } else {
++ host->clock_for_sd = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1;
++ }
++ break;
++ case MMC_SELECT_CARD:
++ if((cmd->arg >> 16) == 0) {
++ /* We have been deselected. */
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1;
++ }
++ }
++ }
++
++ /*
++ * If there is data to handle we enable data IRQs here, and we will
++ * ultimatley finish the request in the mmc_data_end_irq handler.
++ */
++ if(host->data && (cmd->error == MMC_ERR_NONE)){
++ if(host->data->flags & MMC_DATA_READ) {
++ /* Enable the read enable interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &=
++ ~SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE;
++ } else {
++ /* Enable the write enable interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &=
++ ~SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE;
++ }
++ } else {
++ /* There's no data, or we encountered an error, so finish now. */
++ mmc_finish_request(host);
++ }
++
++ return;
++}
++
++static void hwinit2_irqsafe(struct asic3_mmc_host *host);
++
++static irqreturn_t
++mmc_irq(int irq, void *irq_desc)
++{
++ struct asic3_mmc_host *host;
++ unsigned int breg, bmask, bstatus, creg, cmask, cstatus;
++
++ host = irq_desc;
++
++ /* asic3 bstatus has errors */
++ bstatus = ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl);
++ bmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer);
++ cstatus = ASIC3_MMC_REG(host, SD_CTRL, CardStatus);
++ cmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard);
++ breg = bstatus & ~bmask & ~DONT_CARE_BUFFER_BITS;
++ creg = cstatus & ~cmask & ~DONT_CARE_CARD_BITS;
++
++ if (!breg && !creg) {
++ /* This occurs sometimes for no known reason. It doesn't hurt
++ * anything, so I don't print it. */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &= ~breg;
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) &= ~creg;
++ goto out;
++ }
++
++ while (breg || creg) {
++
++ /* XXX TODO: Need to handle errors in breg here. */
++
++ /*
++ * Card insert/remove. The mmc controlling code is stateless. That
++ * is, it doesn't care if it was an insert or a remove. It treats
++ * both the same.
++ */
++ /* XXX Asic3 has _3 versions of these status bits, too, for a second slot, perhaps? */
++ if (creg & (SD_CTRL_CARDSTATUS_CARD_INSERTED_0 | SD_CTRL_CARDSTATUS_CARD_REMOVED_0)) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &=
++ ~(SD_CTRL_CARDSTATUS_CARD_REMOVED_0 | SD_CTRL_CARDSTATUS_CARD_INSERTED_0);
++ if(creg & SD_CTRL_CARDSTATUS_CARD_INSERTED_0) {
++ hwinit2_irqsafe(host);
++ }
++ mmc_detect_change(host->mmc,1);
++ }
++
++ /* Command completion */
++ if (creg & SD_CTRL_CARDSTATUS_RESPONSE_END) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &=
++ ~(SD_CTRL_CARDSTATUS_RESPONSE_END);
++ mmc_cmd_irq(host, bstatus);
++ }
++
++ /* Data transfer */
++ if (breg & (SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE | SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE)) {
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) &=
++ ~(SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE | SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE);
++ tasklet_schedule(&mmc_data_read_tasklet);
++ }
++
++ /* Data transfer completion */
++ if (creg & SD_CTRL_CARDSTATUS_RW_END) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &= ~(SD_CTRL_CARDSTATUS_RW_END);
++ mmc_data_end_irq(host);
++ }
++
++ /* Check status - keep going until we've handled it all */
++ bstatus = ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl);
++ bmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer);
++ cstatus = ASIC3_MMC_REG(host, SD_CTRL, CardStatus);
++ cmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard);
++ breg = bstatus & ~bmask & ~DONT_CARE_BUFFER_BITS;
++ creg = cstatus & ~cmask & ~DONT_CARE_CARD_BITS;
++ }
++
++out:
++ /* Ensure all interrupt sources are cleared */
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) = 0;
++ return IRQ_HANDLED;
++}
++
++static void
++mmc_start_data(struct asic3_mmc_host *host, struct mmc_data *data)
++{
++ DBG("setup data transfer: blocksize %08x nr_blocks %d, page: %08x, offset: %08x\n", data->blksz,
++ data->blocks, (int)data->sg->page, data->sg->offset);
++
++ host->sg_len = data->sg_len;
++ host->sg_ptr = data->sg;
++ host->sg_off = 0;
++ host->data = data;
++
++ /* Set transfer length and blocksize */
++ ASIC3_MMC_REG(host, SD_CTRL, TransferSectorCount) = data->blocks;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardXferDataLen) = data->blksz;
++}
++
++/* Process requests from the MMC layer */
++static void
++mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ WARN_ON(host->mrq != NULL);
++
++ host->mrq = mrq;
++
++ /* If we're performing a data request we need to setup some
++ extra information */
++ if(mrq->data) {
++ mmc_start_data(host, mrq->data);
++ }
++
++ mmc_start_command(host, mrq->cmd);
++}
++
++/* Set MMC clock / power.
++ * Note: This controller uses a simple divider scheme therefore it cannot run
++ * a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as MMC
++ * wont run that fast, it has to be clocked at 12MHz which is the next slowest
++ * setting. This is likely not an issue because we are doing single 16-bit
++ * writes for data I/O.
++ */
++static void
++mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ u32 clk = 0;
++
++ DBG("clock %uHz busmode %u powermode %u Vdd %u\n",
++ ios->clock, ios->bus_mode, ios->power_mode, ios->vdd);
++
++ if (ios->clock) {
++ clk = 0x80; /* slowest by default */
++ if(ios->clock >= 24000000 / 256) clk >>= 1;
++ if(ios->clock >= 24000000 / 128) clk >>= 1;
++ if(ios->clock >= 24000000 / 64) clk >>= 1;
++ if(ios->clock >= 24000000 / 32) clk >>= 1;
++ if(ios->clock >= 24000000 / 16) clk >>= 1;
++ if(ios->clock >= 24000000 / 8) clk >>= 1;
++ if(ios->clock >= 24000000 / 4) clk >>= 1;
++ if(ios->clock >= 24000000 / 2) clk >>= 1;
++ if(ios->clock >= 24000000 / 1) clk >>= 1;
++ if(clk == 0) { /* For fastest speed we disable the divider. */
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 0;
++ } else {
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 1;
++ }
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) =
++ host->clock_for_sd
++ | SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK
++ | clk;
++ msleep(10);
++ } else {
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ }
++
++ switch (ios->power_mode) {
++ case MMC_POWER_OFF:
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = 0;
++ msleep(1);
++ break;
++ case MMC_POWER_UP:
++ break;
++ case MMC_POWER_ON:
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = SD_CONFIG_POWER1_PC_33V;
++ msleep(20);
++ break;
++ }
++}
++
++static int
++mmc_get_ro(struct mmc_host *mmc)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ /* Call custom handler for RO status */
++ if(host->hwconfig->mmc_get_ro) {
++ /* Special case for cards w/o WP lock (like miniSD) */
++ if (host->hwconfig->mmc_get_ro == (void*)-1) {
++ return 0;
++ } else {
++ struct platform_device *pdev = to_platform_device(mmc_dev(mmc));
++ return host->hwconfig->mmc_get_ro(pdev);
++ }
++ }
++
++ /* WRITE_PROTECT is active low */
++ return (ASIC3_MMC_REG(host, SD_CTRL, CardStatus) & SD_CTRL_CARDSTATUS_WRITE_PROTECT)?0:1;
++}
++
++static struct mmc_host_ops mmc_ops = {
++ .request = mmc_request,
++ .set_ios = mmc_set_ios,
++ .get_ro = mmc_get_ro,
++};
++
++static void
++hwinit2_irqsafe(struct asic3_mmc_host *host)
++{
++ ASIC3_MMC_REG(host, SD_CONFIG, Addr1) = 0x0000;
++ ASIC3_MMC_REG(host, SD_CONFIG, Addr0) = 0x0800;
++
++ ASIC3_MMC_REG(host, SD_CONFIG, ClkStop) = SD_CONFIG_CLKSTOP_ENABLE_ALL;
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_CardDetect) = 2;
++ ASIC3_MMC_REG(host, SD_CONFIG, Command) = SD_CONFIG_COMMAND_MAE;
++
++ ASIC3_MMC_REG(host, SD_CTRL, SoftwareReset) = 0; /* reset on */
++ mdelay(2);
++
++ ASIC3_MMC_REG(host, SD_CTRL, SoftwareReset) = 1; /* reset off */
++ mdelay(2);
++
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1
++ ;
++ host->clock_for_sd = 0;
++
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus0) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus1) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = 0;
++
++ ASIC3_MMC_REG(host, SDIO_CTRL, ClocknWaitCtrl) = 0x100;
++ /* *((unsigned short *)(((char *)host->ctl_base) + 0x938)) = 0x100; */
++
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++
++ mdelay(1);
++
++
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0
++#if 0
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_3
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_3
++#endif
++ )
++ ; /* check */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) = 0xffff; /* IRQs off */
++
++ /*
++ * ASIC3_MMC_REG(host, SD_CTRL, TransactionCtrl) = SD_CTRL_TRANSACTIONCONTROL_SET;
++ * Wince has 0x1000
++ */
++ /* ASIC3_MMC_REG(host, SD_CTRL, TransactionCtrl) = 0x1000; */
++
++
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SDPWR, ASIC3_SDHWCTRL_SDPWR); /* turn on power at controller(?) */
++
++}
++
++static void
++hwinit(struct asic3_mmc_host *host, struct platform_device *pdev)
++{
++ /* Call custom handler for enabling clock (if needed) */
++ if(host->hwconfig->set_mmc_clock)
++ host->hwconfig->set_mmc_clock(pdev, MMC_CLOCK_ENABLED);
++
++ /* Not sure if it must be done bit by bit, but leaving as-is */
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_LEVCD, ASIC3_SDHWCTRL_LEVCD);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_LEVWP, ASIC3_SDHWCTRL_LEVWP);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, 0);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_PCLR, 0);
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_EX1 | CLOCK_CDEX_EX0, CLOCK_CDEX_EX1 | CLOCK_CDEX_EX0);
++ msleep(1);
++
++ asic3_set_clock_sel (host->asic3_dev,
++ CLOCK_SEL_SD_HCLK_SEL | CLOCK_SEL_SD_BCLK_SEL,
++ CLOCK_SEL_SD_HCLK_SEL | 0); /* ? */
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS);
++ msleep(1);
++
++ asic3_set_extcf_select(host->asic3_dev, ASIC3_EXTCF_SD_MEM_ENABLE, ASIC3_EXTCF_SD_MEM_ENABLE);
++
++ /* Long Delay */
++ if( !machine_is_h4700())
++ msleep(500);
++
++ hwinit2_irqsafe(host);
++}
++
++#ifdef CONFIG_PM
++static int
++mmc_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ int ret;
++
++ ret = mmc_suspend_host(mmc, state);
++
++ if (ret) {
++ printk(KERN_ERR DRIVER_NAME ": Could not suspend MMC host, hardware not suspended");
++ return ret;
++ }
++
++ /* disable the card insert / remove interrupt while sleeping */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END);
++
++ /* disable clock */
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CONFIG, ClkStop) = 0;
++
++ /* power down */
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = 0;
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS, 0);
++
++ /* disable core clock */
++ if(host->hwconfig->set_mmc_clock)
++ host->hwconfig->set_mmc_clock(pdev, MMC_CLOCK_DISABLED);
++
++ /* Put in suspend mode */
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, ASIC3_SDHWCTRL_SUSPEND);
++ return 0;
++}
++
++static int
++mmc_resume(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ printk(KERN_INFO "%s: starting resume\n", DRIVER_NAME);
++
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, 0);
++ hwinit(host, pdev);
++
++ /* re-enable card remove / insert interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0 );
++
++ mmc_resume_host(mmc);
++
++ printk(KERN_INFO "%s: finished resume\n", DRIVER_NAME);
++ return 0;
++}
++#endif
++
++static int
++mmc_probe(struct platform_device *pdev)
++{
++ struct mmc_host *mmc;
++ struct asic3_mmc_host *host = NULL;
++ int retval = 0;
++ struct tmio_mmc_hwconfig *mmc_config = (struct tmio_mmc_hwconfig *)pdev->dev.platform_data;
++
++ /* bus_shift is mandatory */
++ if (!mmc_config) {
++ printk(KERN_ERR DRIVER_NAME ": Invalid configuration\n");
++ return -EINVAL;
++ }
++
++ mmc = mmc_alloc_host(sizeof(struct asic3_mmc_host) + 128, &pdev->dev);
++ if (!mmc) {
++ retval = -ENOMEM;
++ goto exceptional_return;
++ }
++
++ host = mmc_priv(mmc);
++ host->mmc = mmc;
++ platform_set_drvdata(pdev, mmc);
++
++ host->ctl_base = 0;
++ host->hwconfig = mmc_config;
++ host->bus_shift = mmc_config->address_shift;
++ host->asic3_dev = pdev->dev.parent;
++ host->clock_for_sd = 0;
++
++ tasklet_init(&mmc_data_read_tasklet, mmc_data_transfer, (unsigned long)host);
++
++ host->ctl_base = ioremap_nocache ((unsigned long)pdev->resource[0].start, pdev->resource[0].end - pdev->resource[0].start);
++ if(!host->ctl_base){
++ printk(KERN_ERR DRIVER_NAME ": Could not map ASIC3 SD controller\n");
++ retval = -ENODEV;
++ goto exceptional_return;
++ }
++
++ printk(DRIVER_NAME ": ASIC3 MMC/SD Driver, controller at 0x%lx\n", (unsigned long)pdev->resource[0].start);
++
++ mmc->ops = &mmc_ops;
++ mmc->caps = MMC_CAP_4_BIT_DATA;
++ mmc->f_min = 46875; /* ARIC: not sure what these should be */
++ mmc->f_max = 24000000; /* ARIC: not sure what these should be */
++ mmc->ocr_avail = MMC_VDD_32_33;
++
++ hwinit(host, pdev);
++
++
++ host->irq = pdev->resource[1].start;
++
++ retval = request_irq(host->irq, mmc_irq, 0, DRIVER_NAME, host);
++ if(retval) {
++ printk(KERN_ERR DRIVER_NAME ": Unable to get interrupt\n");
++ retval = -ENODEV;
++ goto exceptional_return;
++ }
++ set_irq_type(host->irq, IRQT_FALLING);
++
++ mmc_add_host(mmc);
++
++#ifdef CONFIG_PM
++ // resume_timer.function = resume_timer_callback;
++ // resume_timer.data = 0;
++ // init_timer(&resume_timer);
++#endif
++
++ return 0;
++
++exceptional_return:
++ if (mmc) {
++ mmc_free_host(mmc);
++ }
++ if(host && host->ctl_base) iounmap(host->ctl_base);
++ return retval;
++}
++
++static int
++mmc_remove(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++
++ platform_set_drvdata(pdev, NULL);
++
++ if (mmc) {
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ mmc_remove_host(mmc);
++ free_irq(host->irq, host);
++ /* FIXME - we might want to consider stopping the chip here... */
++ iounmap(host->ctl_base);
++ mmc_free_host(mmc); /* FIXME - why does this call hang? */
++ }
++ return 0;
++}
++
++/* ------------------- device registration ----------------------- */
++
++static struct platform_driver mmc_asic3_driver = {
++ .driver = {
++ .name = DRIVER_NAME,
++ },
++ .probe = mmc_probe,
++ .remove = mmc_remove,
++#ifdef CONFIG_PM
++ .suspend = mmc_suspend,
++ .resume = mmc_resume,
++#endif
++};
++
++static int __init mmc_init(void)
++{
++ return platform_driver_register(&mmc_asic3_driver);
++}
++
++static void __exit mmc_exit(void)
++{
++ platform_driver_unregister(&mmc_asic3_driver);
++}
++
++late_initcall(mmc_init);
++module_exit(mmc_exit);
++
++MODULE_DESCRIPTION("HTC ASIC3 SD/MMC driver");
++MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.24/drivers/mmc/host/asic3_mmc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/asic3_mmc.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,25 @@
++#ifndef __ASIC3_MMC_H
++#define __ASIC3_MMC_H
++
++#define DRIVER_NAME "asic3_mmc"
++
++#ifdef CONFIG_MMC_DEBUG
++#define DBG(x...) printk(DRIVER_NAME ": " x)
++#else
++#define DBG(x...) do { } while (0)
++#endif
++
++/* Response types */
++#define APP_CMD 0x0040
++
++#define SD_CONFIG_CLKSTOP_ENABLE_ALL 0x1f
++
++#define DONT_CARE_CARD_BITS ( \
++ SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 \
++ | SD_CTRL_INTMASKCARD_WRITE_PROTECT \
++ | SD_CTRL_INTMASKCARD_UNK6 \
++ | SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 \
++ )
++#define DONT_CARE_BUFFER_BITS ( SD_CTRL_INTMASKBUFFER_UNK7 | SD_CTRL_INTMASKBUFFER_CMD_BUSY )
++
++#endif // __ASIC3_MMC_H
+Index: linux-2.6.24/drivers/input/keyboard/asic3_keys.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/asic3_keys.c 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,131 @@
++/*
++ * Generic buttons driver for ASIC3 SoC.
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * Copyright (C) 2003 Joshua Wise
++ * Copyright (C) 2005 Pawel Kolodziejski
++ * Copyright (C) 2006 Paul Sokolovsky
++ *
++ */
++
++#include <linux/input.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <asm/arch/irqs.h>
++#include <asm/hardware.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/hardware/asic3_keys.h>
++
++static irqreturn_t asic3_keys_asic_handle(int irq, void *data)
++{
++ struct asic3_keys_platform_data *pdata = data;
++ int i, base_irq;
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++ for (i = 0; i < pdata->nbuttons; i++) {
++ struct asic3_keys_button *b = &pdata->buttons[i];
++ if ((base_irq + b->gpio) == irq) {
++ int state = !!asic3_gpio_get_value(pdata->asic3_dev, b->gpio);
++
++ if (pdata->buttons[i].type == EV_SW)
++ input_report_switch(pdata->input, pdata->buttons[i].keycode, state ^ b->active_low);
++ else
++ input_report_key(pdata->input, b->keycode, state ^ b->active_low);
++ input_sync(pdata->input);
++ }
++ }
++
++ return IRQ_HANDLED;
++}
++
++static int __devinit asic3_keys_probe(struct platform_device *pdev)
++{
++ struct asic3_keys_platform_data *pdata = pdev->dev.platform_data;
++ int i, base_irq;
++ int j, ret;
++
++ pdata->input = input_allocate_device();
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++
++ for (i = 0; i < pdata->nbuttons; i++) {
++ struct asic3_keys_button *b = &pdata->buttons[i];
++ set_bit(b->keycode, pdata->input->keybit);
++ ret=request_irq(base_irq + b->gpio, asic3_keys_asic_handle, SA_SAMPLE_RANDOM, b->desc, pdata);
++ if (ret)
++ {
++ printk(KERN_NOTICE "Failed to allocate asic3_keys irq=%d.\n",b->gpio);
++
++ for(j=0; j<i ; j++)
++ free_irq(base_irq + pdata->buttons[i].gpio, NULL);
++
++ input_unregister_device (pdata->input);
++
++ return -ENODEV;
++ }
++
++ set_irq_type(base_irq + b->gpio, IRQT_BOTHEDGE);
++ if (pdata->buttons[i].type == EV_SW) {
++ pdata->input->evbit[0] |= BIT(EV_SW);
++ set_bit(b->keycode, pdata->input->swbit);
++ } else {
++ pdata->input->evbit[0] |= BIT(EV_KEY);
++ set_bit(b->keycode, pdata->input->keybit);
++ }
++ }
++
++ pdata->input->name = pdev->name;
++ input_register_device(pdata->input);
++
++ return 0;
++}
++
++static int __devexit asic3_keys_remove(struct platform_device *pdev)
++{
++ struct asic3_keys_platform_data *pdata = pdev->dev.platform_data;
++ int i, base_irq;
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++ for (i = 0; i < pdata->nbuttons; i++) {
++ free_irq(base_irq + pdata->buttons[i].gpio, NULL);
++ }
++
++ input_unregister_device(pdata->input);
++
++ return 0;
++}
++
++
++static struct platform_driver asic3_keys_driver = {
++ .probe = asic3_keys_probe,
++ .remove = __devexit_p(asic3_keys_remove),
++ .driver = {
++ .name = "asic3-keys",
++ },
++};
++
++static int __init asic3_keys_init(void)
++{
++ return platform_driver_register(&asic3_keys_driver);
++}
++
++static void __exit asic3_keys_exit(void)
++{
++ platform_driver_unregister(&asic3_keys_driver);
++}
++
++module_init(asic3_keys_init);
++module_exit(asic3_keys_exit);
++
++MODULE_AUTHOR("Joshua Wise, Pawel Kolodziejski, Paul Sokolovsky");
++MODULE_DESCRIPTION("Buttons driver for HTC ASIC3 SoC");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/include/asm-arm/arch-pxa/irqs.h
+===================================================================
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/irqs.h 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/irqs.h 2008-03-10 16:09:23.000000000 +0000
+@@ -182,6 +182,8 @@
+ defined(CONFIG_MACH_LOGICPD_PXA270) || \
+ defined(CONFIG_MACH_MAINSTONE)
+ #define NR_IRQS (IRQ_BOARD_END)
++#elif defined(CONFIG_MACH_HTCUNIVERSAL)
++#define NR_IRQS (IRQ_BOARD_START + 96)
+ #else
+ #define NR_IRQS (IRQ_BOARD_START)
+ #endif
+Index: linux-2.6.24/include/asm-arm/arch-pxa/serial.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/serial.h 2008-03-10 16:09:23.000000000 +0000
+@@ -0,0 +1,78 @@
++/*
++ * linux/include/asm-arm/arch-pxa/serial.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <asm/arch/pxa-regs.h>
++
++#define BAUD_BASE 921600
++
++/* Standard COM flags */
++#define STD_COM_FLAGS (ASYNC_SKIP_TEST)
++
++#define STD_SERIAL_PORT_DEFNS \
++ { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &FFUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_FFUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &STUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_STUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &BTUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_BTUART, \
++ flags: STD_COM_FLAGS, \
++ }
++
++#define EXTRA_SERIAL_PORT_DEFNS
++
++struct platform_pxa_serial_funcs {
++
++ /* Initialize whatever is connected to this serial port. */
++ void (*configure)(int state);
++#define PXA_UART_CFG_PRE_STARTUP 0
++#define PXA_UART_CFG_POST_STARTUP 1
++#define PXA_UART_CFG_PRE_SHUTDOWN 2
++#define PXA_UART_CFG_POST_SHUTDOWN 3
++
++ /* Enable or disable the individual transmitter/receiver submodules.
++ * On transceivers without echo cancellation (e.g. SIR)
++ * transmitter always has priority; e.g. if both bits are set,
++ * only the transmitter is enabled. */
++ void (*set_txrx)(int txrx);
++#define PXA_SERIAL_TX 1
++#define PXA_SERIAL_RX 2
++
++ /* Get the current state of tx/rx. */
++ int (*get_txrx)(void);
++
++ int (*suspend)(struct platform_device *dev, pm_message_t state);
++ int (*resume)(struct platform_device *dev);
++};
++
++void pxa_set_ffuart_info(struct platform_pxa_serial_funcs *ffuart_funcs);
++void pxa_set_btuart_info(struct platform_pxa_serial_funcs *btuart_funcs);
++void pxa_set_stuart_info(struct platform_pxa_serial_funcs *stuart_funcs);
++void pxa_set_hwuart_info(struct platform_pxa_serial_funcs *hwuart_funcs);
+Index: linux-2.6.24/drivers/serial/pxa.c
+===================================================================
+--- linux-2.6.24.orig/drivers/serial/pxa.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/serial/pxa.c 2008-03-10 16:09:23.000000000 +0000
+@@ -47,6 +47,7 @@
+ #include <asm/io.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
++#include <asm/arch/serial.h>
+ #include <asm/arch/pxa-regs.h>
+
+
+@@ -60,6 +61,14 @@
+ char *name;
+ };
+
++
++#define IS_METHOD(dev, method) (dev && (dev)->platform_data && ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method)
++#define METHOD_CALL(dev, method) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method()
++#define SAFE_METHOD_CALL(dev, method, args...) \
++ if (IS_METHOD(dev, method)) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method(args)
++
+ static inline unsigned int serial_in(struct uart_pxa_port *up, int offset)
+ {
+ offset <<= 2;
+@@ -347,6 +356,9 @@
+ unsigned long flags;
+ int retval;
+
++ /* Perform platform-specific port initialization, if needed. */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_STARTUP);
++
+ if (port->line == 3) /* HWUART */
+ up->mcr |= UART_MCR_AFE;
+ else
+@@ -404,6 +416,12 @@
+ (void) serial_in(up, UART_IIR);
+ (void) serial_in(up, UART_MSR);
+
++ /*
++ * Perform platform-specific port initialization if needed
++ */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_STARTUP);
++ SAFE_METHOD_CALL(port->dev, set_txrx, PXA_SERIAL_RX);
++
+ return 0;
+ }
+
+@@ -412,6 +430,8 @@
+ struct uart_pxa_port *up = (struct uart_pxa_port *)port;
+ unsigned long flags;
+
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_SHUTDOWN);
++
+ free_irq(up->port.irq, up);
+
+ /*
+@@ -433,6 +453,8 @@
+ UART_FCR_CLEAR_RCVR |
+ UART_FCR_CLEAR_XMIT);
+ serial_out(up, UART_FCR, 0);
++
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_SHUTDOWN);
+ }
+
+ static void
+Index: linux-2.6.24/arch/arm/mach-pxa/generic.c
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/generic.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/generic.c 2008-03-10 16:09:23.000000000 +0000
+@@ -38,6 +38,7 @@
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/irda.h>
+ #include <asm/arch/i2c.h>
++#include <asm/arch/serial.h>
+
+ #include "devices.h"
+ #include "generic.h"
+@@ -412,6 +413,18 @@
+ .num_resources = ARRAY_SIZE(pxa_resource_hwuart),
+ };
+
++void __init pxa_set_ffuart_info(struct platform_pxa_serial_funcs *info)
++{
++ pxa_device_ffuart.dev.platform_data = info;
++}
++EXPORT_SYMBOL(pxa_set_ffuart_info);
++
++void __init pxa_set_btuart_info(struct platform_pxa_serial_funcs *info)
++{
++ pxa_device_btuart.dev.platform_data = info;
++}
++EXPORT_SYMBOL(pxa_set_btuart_info);
++
+ static struct resource pxai2c_resources[] = {
+ {
+ .start = 0x40301680,
+Index: linux-2.6.24/drivers/leds/Makefile
+===================================================================
+--- linux-2.6.24.orig/drivers/leds/Makefile 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/leds/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -15,6 +15,7 @@
+ obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
+ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
++obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o
+ obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
+ obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
+ obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
+Index: linux-2.6.24/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/Kconfig 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -293,4 +293,11 @@
+ To compile this driver as a module, choose M here: the
+ module will be called bf54x-keys.
+
++config KEYBOARD_ASIC3
++ tristate "Buttons on ASIC3 SoC GPIOs (iPaqs, etc.)"
++ depends on HTC_ASIC3
++ help
++ This enables support for the buttons attached to GPIOs of
++ HTC ASIC3 peripheral controller.
++
+ endif
+Index: linux-2.6.24/drivers/mmc/host/Kconfig
+===================================================================
+--- linux-2.6.24.orig/drivers/mmc/host/Kconfig 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/Kconfig 2008-03-10 16:09:59.000000000 +0000
+@@ -24,6 +24,13 @@
+
+ If unsure, say N.
+
++config MMC_ASIC3
++ tristate "HTC ASIC3 SD/MMC support"
++ depends on MMC && HTC_ASIC3
++ help
++ This provides support for the ASIC3 SD/MMC controller, used
++ in the iPAQ hx4700 and others.
++
+ config MMC_SDHCI
+ tristate "Secure Digital Host Controller Interface support (EXPERIMENTAL)"
+ depends on PCI && EXPERIMENTAL
+Index: linux-2.6.24/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/Makefile 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Makefile 2008-03-10 16:10:28.000000000 +0000
+@@ -6,6 +6,7 @@
+
+ obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
+ obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
++obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+ obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o
+ obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
+ obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
diff --git a/recipes/linux/linux-kexecboot-2.6.24/mtd-module.patch b/recipes/linux/linux-kexecboot-2.6.24/mtd-module.patch
new file mode 100644
index 0000000000..4aa2f22aee
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/mtd-module.patch
@@ -0,0 +1,13 @@
+Index: linux-2.6.23/drivers/mtd/maps/Kconfig
+===================================================================
+--- linux-2.6.23/drivers/mtd/maps/Kconfig
++++ linux-2.6.23/drivers/mtd/maps/Kconfig
+@@ -600,7 +600,7 @@
+ default "4"
+
+ config MTD_SHARP_SL
+- bool "ROM mapped on Sharp SL Series"
++ tristate "ROM mapped on Sharp SL Series"
+ depends on ARCH_PXA
+ help
+ This enables access to the flash chip on the Sharp SL Series of PDAs.
diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch b/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch
new file mode 100644
index 0000000000..4c22fb7960
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch
@@ -0,0 +1,10 @@
+--- ../ref/linux-2.6.21.6/arch/arm/mach-pxa/poodle.c 2007-07-06 23:47:55.000000000 -0500
++++ linux-2.6.21.6-armeb/arch/arm/mach-pxa/poodle.c 2007-08-06 23:02:50.000000000 -0500
+@@ -409,6 +409,7 @@
+
+ MACHINE_START(POODLE, "SHARP Poodle")
+ .phys_io = 0x40000000,
++ .boot_params = 0xa0000200, /* fake boot params loc for kexec */
+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
+ .fixup = fixup_poodle,
+ .map_io = pxa_map_io,
diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig b/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig
new file mode 100644
index 0000000000..6ad99c785d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig
@@ -0,0 +1,903 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Sun Feb 1 20:09:19 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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_FAIR_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+# CONFIG_FUTEX is not set
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+# CONFIG_TINY_SHMEM is not set
+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_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_MACH_POODLE=y
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_TOSA is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+# CONFIG_SUSPEND is not set
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_IDEDISK is not set
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=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=y
+CONFIG_CHR_DEV_OSST=y
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_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_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+# CONFIG_MD 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=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_LOCOMO=y
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+CONFIG_SHARPSL_RC=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_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=y
+
+#
+# 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 is not set
+# 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_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=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_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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 Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS 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_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_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=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=y
+CONFIG_SQUASHFS=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+# CONFIG_NLS_ISO8859_1 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=y
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO 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=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle_buildfixes.patch b/recipes/linux/linux-kexecboot-2.6.24/poodle_buildfixes.patch
new file mode 100644
index 0000000000..2447234a0a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/poodle_buildfixes.patch
@@ -0,0 +1,54 @@
+diff -up ./drivers/video/pxafb.c.helge ./drivers/video/pxafb.c
+--- ./drivers/video/pxafb.c.helge 2008-01-27 13:26:44.000000000 +0100
++++ ./drivers/video/pxafb.c 2008-01-27 13:27:39.000000000 +0100
+@@ -1194,7 +1194,7 @@ pxafb_freq_transition(struct notifier_bl
+ if ((clkinfo->old == 13000))
+ break;
+
+- pcd = get_pcd(fbi->fb.var.pixclock);
++ pcd = get_pcd(fbi, fbi->fb.var.pixclock);
+ lccr3 = fbi->reg_lccr3;
+ set_hsync_time(fbi, pcd);
+ fbi->reg_lccr3 = (fbi->reg_lccr3 & ~0xff) | LCCR3_PixClkDiv(pcd);
+diff -up ./drivers/video/backlight/locomolcd.c.helge ./drivers/video/backlight/locomolcd.c
+--- ./drivers/video/backlight/locomolcd.c.helge 2008-01-27 15:40:33.000000000 +0100
++++ ./drivers/video/backlight/locomolcd.c 2008-01-27 15:42:26.000000000 +0100
+@@ -80,7 +80,7 @@ static void locomolcd_off(int comadj)
+ locomo_gpio_write(locomolcd_dev->dev.parent, LOCOMO_GPIO_LCD_VSHD_ON, 0);
+ }
+
+-void locomolcd_power(int on)
++void locomolcd_power(int on, struct fb_var_screeninfo *var_unused)
+ {
+ int comadj = sharpsl_param.comadj;
+ unsigned long flags;
+@@ -178,7 +178,7 @@ static int locomolcd_probe(struct locomo
+ * from fs_initcall, which is before locomo is activated.
+ * We need to recall poodle_lcd_power here*/
+ if (machine_is_poodle())
+- locomolcd_power(1);
++ locomolcd_power(1, NULL);
+
+ local_irq_restore(flags);
+
+diff -up ./arch/arm/mach-pxa/poodle.c.helge ./arch/arm/mach-pxa/poodle.c
+--- ./arch/arm/mach-pxa/poodle.c.helge 2008-01-27 13:07:09.000000000 +0100
++++ ./arch/arm/mach-pxa/poodle.c 2008-01-27 15:49:59.000000000 +0100
+@@ -48,7 +48,7 @@
+ #include "devices.h"
+ #include "sharpsl.h"
+
+-extern void locomolcd_power(int on);
++extern void locomolcd_power(int on, struct fb_var_screeninfo *var_unused);
+
+ static struct resource poodle_scoop_resources[] = {
+ [0] = {
+@@ -176,7 +176,7 @@ static void poodle_null_hsync(void)
+ }
+
+ static struct corgits_machinfo poodle_ts_machinfo = {
+- .get_hsync_len = poodle_get_hsync_len,
++ .get_hsync_invperiod = poodle_get_hsync_len,
+ .put_hsync = poodle_null_hsync,
+ .wait_hsync = poodle_null_hsync,
+ };
diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle_serial_vcc.patch b/recipes/linux/linux-kexecboot-2.6.24/poodle_serial_vcc.patch
new file mode 100644
index 0000000000..80d1f95104
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/poodle_serial_vcc.patch
@@ -0,0 +1,28 @@
+--- a/arch/arm/common/locomo.c 2007-05-06 23:42:34.000000000 +0200
++++ a/arch/arm/common/locomo.c 2007-05-06 17:05:43.000000000 +0200
+@@ -677,7 +677,7 @@
+ locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC);
+
+ /* GPIO */
+- locomo_writel(0, lchip->base + LOCOMO_GPO);
++ locomo_writel(POODLE_LOCOMO_GPIO_232VCC_ON, lchip->base + LOCOMO_GPO);
+ locomo_writel( (LOCOMO_GPIO(2) | LOCOMO_GPIO(3) | LOCOMO_GPIO(13) | LOCOMO_GPIO(14))
+ , lchip->base + LOCOMO_GPE);
+ locomo_writel( (LOCOMO_GPIO(2) | LOCOMO_GPIO(3) | LOCOMO_GPIO(13) | LOCOMO_GPIO(14))
+
+
+--- a/drivers/serial/pxa.c 2006-06-18 03:49:35.000000000 +0200
++++ b/drivers/serial/pxa.c 2007-05-06 17:04:48.000000000 +0200
+@@ -290,9 +290,9 @@
+ unsigned char mcr = 0;
+
+ if (mctrl & TIOCM_RTS)
+- mcr |= UART_MCR_RTS;
++ mcr &= ~UART_MCR_RTS;
+ if (mctrl & TIOCM_DTR)
+- mcr |= UART_MCR_DTR;
++ mcr &= ~UART_MCR_DTR;
+ if (mctrl & TIOCM_OUT1)
+ mcr |= UART_MCR_OUT1;
+ if (mctrl & TIOCM_OUT2)
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle_ts.patch b/recipes/linux/linux-kexecboot-2.6.24/poodle_ts.patch
new file mode 100644
index 0000000000..b10ee2eab8
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/poodle_ts.patch
@@ -0,0 +1,22 @@
+Index: linux-2.6.23/arch/arm/mach-pxa/poodle.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/poodle.c 2008-01-25 12:10:10.000000000 -0800
++++ linux-2.6.23/arch/arm/mach-pxa/poodle.c 2008-01-25 12:11:58.000000000 -0800
+@@ -166,7 +166,7 @@
+ },
+ };
+
+-static unsigned long poodle_get_hsync_len(void)
++static unsigned long poodle_get_hsync_invperiod(void)
+ {
+ return 0;
+ }
+@@ -176,7 +176,7 @@
+ }
+
+ static struct corgits_machinfo poodle_ts_machinfo = {
+- .get_hsync_len = poodle_get_hsync_len,
++ .get_hsync_invperiod = poodle_get_hsync_invperiod,
+ .put_hsync = poodle_null_hsync,
+ .wait_hsync = poodle_null_hsync,
+ };
diff --git a/recipes/linux/linux-kexecboot-2.6.24/pxa-resume.patch b/recipes/linux/linux-kexecboot-2.6.24/pxa-resume.patch
new file mode 100644
index 0000000000..71d466e31c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/pxa-resume.patch
@@ -0,0 +1,58 @@
+diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
+
+index a941c71..039194c 100644
+--- a/arch/arm/mach-pxa/pm.c
++++ b/arch/arm/mach-pxa/pm.c
+@@ -38,34 +38,37 @@ int pxa_pm_enter(suspend_state_t state)
+ iwmmxt_task_disable(NULL);
+ #endif
+
+- pxa_cpu_pm_fns->save(sleep_save);
++ /* skip registers saving for standby */
++ if (state != PM_SUSPEND_STANDBY) {
++ pxa_cpu_pm_fns->save(sleep_save);
++ /* before sleeping, calculate and save a checksum */
++ for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
++ sleep_save_checksum += sleep_save[i];
++ }
+
+ /* Clear sleep reset status */
+ RCSR = RCSR_SMR;
+
+- /* before sleeping, calculate and save a checksum */
+- for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
+- sleep_save_checksum += sleep_save[i];
+-
+ /* *** go zzz *** */
+ pxa_cpu_pm_fns->enter(state);
+ cpu_init();
+
+- /* after sleeping, validate the checksum */
+- for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
+- checksum += sleep_save[i];
++ if (state != PM_SUSPEND_STANDBY) {
++ /* after sleeping, validate the checksum */
++ for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
++ checksum += sleep_save[i];
+
+- /* if invalid, display message and wait for a hardware reset */
+- if (checksum != sleep_save_checksum) {
++ /* if invalid, display message and wait for a hardware reset */
++ if (checksum != sleep_save_checksum) {
+ #ifdef CONFIG_ARCH_LUBBOCK
+- LUB_HEXLED = 0xbadbadc5;
++ LUB_HEXLED = 0xbadbadc5;
+ #endif
+- while (1)
+- pxa_cpu_pm_fns->enter(state);
++ while (1)
++ pxa_cpu_pm_fns->enter(state);
++ }
++ pxa_cpu_pm_fns->restore(sleep_save);
+ }
+
+- pxa_cpu_pm_fns->restore(sleep_save);
+-
+ pr_debug("*** made it back from resume\n");
+
+ return 0;
diff --git a/recipes/linux/linux-kexecboot-2.6.24/pxa-serial-hack.patch b/recipes/linux/linux-kexecboot-2.6.24/pxa-serial-hack.patch
new file mode 100644
index 0000000000..bf20f46a05
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/pxa-serial-hack.patch
@@ -0,0 +1,90 @@
+---
+ drivers/serial/8250.c | 5 +++++
+ drivers/serial/serial_core.c | 1 +
+ drivers/serial/serial_cs.c | 12 +++++++++---
+ include/linux/serial_core.h | 1 +
+ 4 files changed, 16 insertions(+), 3 deletions(-)
+
+Index: linux-2.6.20/drivers/serial/8250.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/8250.c 2007-04-27 13:37:26.000000000 +0100
++++ linux-2.6.20/drivers/serial/8250.c 2007-04-27 13:38:16.000000000 +0100
+@@ -2429,7 +2429,12 @@
+ .driver_name = "serial",
+ .dev_name = "ttyS",
+ .major = TTY_MAJOR,
++#ifdef CONFIG_SERIAL_PXA
++ .minor = 64 + 4,
++ .name_base = 4,
++#else
+ .minor = 64,
++#endif
+ .nr = UART_NR,
+ .cons = SERIAL8250_CONSOLE,
+ };
+Index: linux-2.6.20/drivers/serial/serial_core.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/serial_core.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_core.c 2007-04-27 13:39:39.000000000 +0100
+@@ -2068,7 +2068,8 @@
+ printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
+ port->dev ? port->dev->bus_id : "",
+ port->dev ? ": " : "",
+- drv->dev_name, port->line, address, port->irq, uart_type(port));
++ drv->dev_name, port->line + drv->name_base, address, port->irq,
++ uart_type(port));
+ }
+
+ static void
+@@ -2183,6 +2184,7 @@
+ normal->owner = drv->owner;
+ normal->driver_name = drv->driver_name;
+ normal->name = drv->dev_name;
++ normal->name_base = drv->name_base;
+ normal->major = drv->major;
+ normal->minor_start = drv->minor;
+ normal->type = TTY_DRIVER_TYPE_SERIAL;
+Index: linux-2.6.20/include/linux/serial_core.h
+===================================================================
+--- linux-2.6.20.orig/include/linux/serial_core.h 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/include/linux/serial_core.h 2007-04-27 13:37:27.000000000 +0100
+@@ -341,6 +341,7 @@
+ struct module *owner;
+ const char *driver_name;
+ const char *dev_name;
++ int name_base;
+ int major;
+ int minor;
+ int nr;
+Index: linux-2.6.20/drivers/serial/serial_cs.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/serial_cs.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_cs.c 2007-04-27 13:40:34.000000000 +0100
+@@ -390,7 +390,7 @@
+ kio_addr_t iobase, int irq)
+ {
+ struct uart_port port;
+- int line;
++ int line, linestart;
+
+ memset(&port, 0, sizeof (struct uart_port));
+ port.iobase = iobase;
+@@ -411,10 +411,16 @@
+ return -EINVAL;
+ }
+
++#if CONFIG_SERIAL_PXA
++ linestart = 4;
++#else
++ linestart = 0;
++#endif
++
+ info->line[info->ndev] = line;
+- sprintf(info->node[info->ndev].dev_name, "ttyS%d", line);
++ sprintf(info->node[info->ndev].dev_name, "ttyS%d", line+linestart);
+ info->node[info->ndev].major = TTY_MAJOR;
+- info->node[info->ndev].minor = 0x40 + line;
++ info->node[info->ndev].minor = 0x40 + line + linestart;
+ if (info->ndev > 0)
+ info->node[info->ndev - 1].next = &info->node[info->ndev];
+ info->ndev++;
diff --git a/recipes/linux/linux-kexecboot-2.6.24/pxa27x-resume.patch b/recipes/linux/linux-kexecboot-2.6.24/pxa27x-resume.patch
new file mode 100644
index 0000000000..6447a0b104
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/pxa27x-resume.patch
@@ -0,0 +1,41 @@
+List: linux-arm-kernel
+Subject: [PATCH] Fix PXA27x resume
+From: Russell King - ARM Linux <linux@arm.linux.org.uk>
+Date: 2008-01-21 13:53:31
+Message-ID: 20080121135331.GC30149@flint.arm.linux.org.uk
+[Download message RAW]
+
+When PXA27x wakes up, tick_resume_oneshot() tries to set a timer
+interrupt to occur immediately. Since PXA27x requires at least
+MIN_OSCR_DELTA, this causes us to flag an error.
+
+tick_program_event() then increments the next event time by
+min_delta_ns. However, by the time we get back to programming
+the next event, the OSCR has incremented such that we fail again.
+We repeatedly retry, but the OSCR is too fast for us - we never
+catch up, so we never break out of the loop - resulting in us
+never apparantly resuming.
+
+Fix this by doubling min_delta_ns.
+
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+
+diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
+index ac0bbad..7b7c017 100644
+--- a/arch/arm/mach-pxa/time.c
++++ b/arch/arm/mach-pxa/time.c
+@@ -169,7 +169,7 @@ static void __init pxa_timer_init(void)
+ ckevt_pxa_osmr0.max_delta_ns =
+ clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0);
+ ckevt_pxa_osmr0.min_delta_ns =
+- clockevent_delta2ns(MIN_OSCR_DELTA, &ckevt_pxa_osmr0) + 1;
++ clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
+
+ cksrc_pxa_oscr0.mult =
+ clocksource_hz2mult(clock_tick_rate, cksrc_pxa_oscr0.shift);
+
+-------------------------------------------------------------------
+List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
+FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
+Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/pxa2xx_udc-clock.patch b/recipes/linux/linux-kexecboot-2.6.24/pxa2xx_udc-clock.patch
new file mode 100644
index 0000000000..14c496a31a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/pxa2xx_udc-clock.patch
@@ -0,0 +1,221 @@
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 88 ++++++++++++++++++++++------------------
+ drivers/usb/gadget/pxa2xx_udc.h | 4 +
+ 2 files changed, 53 insertions(+), 39 deletions(-)
+
+--- g26.orig/drivers/usb/gadget/pxa2xx_udc.c 2008-02-19 12:47:06.000000000 -0800
++++ g26/drivers/usb/gadget/pxa2xx_udc.c 2008-02-19 14:07:17.000000000 -0800
+@@ -103,6 +103,12 @@ static const char ep0name [] = "ep0";
+ #error "Can't configure both IXP and PXA"
+ #endif
+
++/* IXP doesn't yet support <linux/clk.h> */
++#define clk_get(dev,name) NULL
++#define clk_enable(clk) do { } while (0)
++#define clk_disable(clk) do { } while (0)
++#define clk_put(clk) do { } while (0)
++
+ #endif
+
+ #include "pxa2xx_udc.h"
+@@ -934,20 +940,31 @@ static void udc_disable(struct pxa2xx_ud
+ /* We disable the UDC -- and its 48 MHz clock -- whenever it's not
+ * in active use.
+ */
+-static int pullup(struct pxa2xx_udc *udc, int is_active)
++static int pullup(struct pxa2xx_udc *udc)
+ {
+- is_active = is_active && udc->vbus && udc->pullup;
++ int is_active = udc->vbus && udc->pullup && !udc->suspended;
+ DMSG("%s\n", is_active ? "active" : "inactive");
+- if (is_active)
+- udc_enable(udc);
+- else {
+- if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
+- DMSG("disconnect %s\n", udc->driver
+- ? udc->driver->driver.name
+- : "(no driver)");
+- stop_activity(udc, udc->driver);
++ if (is_active) {
++ if (!udc->active) {
++ udc->active = 1;
++ /* Enable clock for USB device */
++ clk_enable(udc->clk);
++ udc_enable(udc);
+ }
+- udc_disable(udc);
++ } else {
++ if (udc->active) {
++ if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
++ DMSG("disconnect %s\n", udc->driver
++ ? udc->driver->driver.name
++ : "(no driver)");
++ stop_activity(udc, udc->driver);
++ }
++ udc_disable(udc);
++ /* Disable clock for USB device */
++ clk_disable(udc->clk);
++ udc->active = 0;
++ }
++
+ }
+ return 0;
+ }
+@@ -958,9 +975,9 @@ static int pxa2xx_udc_vbus_session(struc
+ struct pxa2xx_udc *udc;
+
+ udc = container_of(_gadget, struct pxa2xx_udc, gadget);
+- udc->vbus = is_active = (is_active != 0);
++ udc->vbus = (is_active != 0);
+ DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
+- pullup(udc, is_active);
++ pullup(udc);
+ return 0;
+ }
+
+@@ -975,9 +992,8 @@ static int pxa2xx_udc_pullup(struct usb_
+ if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
+ return -EOPNOTSUPP;
+
+- is_active = (is_active != 0);
+- udc->pullup = is_active;
+- pullup(udc, is_active);
++ udc->pullup = (is_active != 0);
++ pullup(udc);
+ return 0;
+ }
+
+@@ -1146,11 +1162,6 @@ static void udc_disable(struct pxa2xx_ud
+
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+-#ifdef CONFIG_ARCH_PXA
+- /* Disable clock for USB device */
+- clk_disable(dev->clk);
+-#endif
+-
+ ep0_idle (dev);
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ }
+@@ -1191,11 +1202,6 @@ static void udc_enable (struct pxa2xx_ud
+ {
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+-#ifdef CONFIG_ARCH_PXA
+- /* Enable clock for USB device */
+- clk_enable(dev->clk);
+-#endif
+-
+ /* try to clear these bits before we enable the udc */
+ udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR);
+
+@@ -1286,7 +1292,7 @@ fail:
+ * for set_configuration as well as eventual disconnect.
+ */
+ DMSG("registered gadget driver '%s'\n", driver->driver.name);
+- pullup(dev, 1);
++ pullup(dev);
+ dump_state(dev);
+ return 0;
+ }
+@@ -1329,7 +1335,8 @@ int usb_gadget_unregister_driver(struct
+ return -EINVAL;
+
+ local_irq_disable();
+- pullup(dev, 0);
++ dev->pullup = 0;
++ pullup(dev);
+ stop_activity(dev, driver);
+ local_irq_enable();
+
+@@ -2131,13 +2138,11 @@ static int __init pxa2xx_udc_probe(struc
+ if (irq < 0)
+ return -ENODEV;
+
+-#ifdef CONFIG_ARCH_PXA
+ dev->clk = clk_get(&pdev->dev, "UDCCLK");
+ if (IS_ERR(dev->clk)) {
+ retval = PTR_ERR(dev->clk);
+ goto err_clk;
+ }
+-#endif
+
+ pr_debug("%s: IRQ %d%s%s\n", driver_name, irq,
+ dev->has_cfr ? "" : " (!cfr)",
+@@ -2250,10 +2255,8 @@ lubbock_fail0:
+ if (dev->mach->gpio_vbus)
+ gpio_free(dev->mach->gpio_vbus);
+ err_gpio_vbus:
+-#ifdef CONFIG_ARCH_PXA
+ clk_put(dev->clk);
+ err_clk:
+-#endif
+ return retval;
+ }
+
+@@ -2269,7 +2272,9 @@ static int __exit pxa2xx_udc_remove(stru
+ if (dev->driver)
+ return -EBUSY;
+
+- udc_disable(dev);
++ dev->pullup = 0;
++ pullup(dev);
++
+ remove_proc_files();
+
+ if (dev->got_irq) {
+@@ -2289,9 +2294,7 @@ static int __exit pxa2xx_udc_remove(stru
+ if (dev->mach->gpio_pullup)
+ gpio_free(dev->mach->gpio_pullup);
+
+-#ifdef CONFIG_ARCH_PXA
+ clk_put(dev->clk);
+-#endif
+
+ platform_set_drvdata(pdev, NULL);
+ the_controller = NULL;
+@@ -2317,10 +2320,15 @@ static int __exit pxa2xx_udc_remove(stru
+ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
+ {
+ struct pxa2xx_udc *udc = platform_get_drvdata(dev);
++ unsigned long flags;
+
+ if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
+ WARN("USB host won't detect disconnect!\n");
+- pullup(udc, 0);
++ udc->suspended = 1;
++
++ local_irq_save(flags);
++ pullup(udc);
++ local_irq_restore(flags);
+
+ return 0;
+ }
+@@ -2328,8 +2336,12 @@ static int pxa2xx_udc_suspend(struct pla
+ static int pxa2xx_udc_resume(struct platform_device *dev)
+ {
+ struct pxa2xx_udc *udc = platform_get_drvdata(dev);
++ unsigned long flags;
+
+- pullup(udc, 1);
++ udc->suspended = 0;
++ local_irq_save(flags);
++ pullup(udc);
++ local_irq_restore(flags);
+
+ return 0;
+ }
+--- g26.orig/drivers/usb/gadget/pxa2xx_udc.h 2008-02-19 12:47:06.000000000 -0800
++++ g26/drivers/usb/gadget/pxa2xx_udc.h 2008-02-19 12:57:42.000000000 -0800
+@@ -119,7 +119,9 @@ struct pxa2xx_udc {
+ has_cfr : 1,
+ req_pending : 1,
+ req_std : 1,
+- req_config : 1;
++ req_config : 1,
++ suspended : 1,
++ active : 1;
+
+ #define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200))
+ struct timer_list timer;
+-
diff --git a/recipes/linux/linux-kexecboot-2.6.24/pxa_fb_overlay.patch b/recipes/linux/linux-kexecboot-2.6.24/pxa_fb_overlay.patch
new file mode 100644
index 0000000000..49c59b3275
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/pxa_fb_overlay.patch
@@ -0,0 +1,26 @@
+---
+ drivers/video/pxafb.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: linux-2.6.22/drivers/video/pxafb.h
+===================================================================
+--- linux-2.6.22.orig/drivers/video/pxafb.h 2007-09-25 15:44:42.000000000 +0200
++++ linux-2.6.22/drivers/video/pxafb.h 2007-09-25 15:45:07.000000000 +0200
+@@ -36,7 +36,7 @@
+ struct fb_bitfield transp;
+ };
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ /* PXA Overlay Framebuffer Support */
+ struct overlayfb_info
+ {
+@@ -142,7 +142,7 @@
+ wait_queue_head_t ctrlr_wait;
+ struct work_struct task;
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ /* PXA Overlay Framebuffer Support */
+ struct overlayfb_info *overlay1fb;
+ struct overlayfb_info *overlay2fb;
diff --git a/recipes/linux/linux-kexecboot-2.6.24/pxafb.patch b/recipes/linux/linux-kexecboot-2.6.24/pxafb.patch
new file mode 100644
index 0000000000..7fe693cd91
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/pxafb.patch
@@ -0,0 +1,13 @@
+Index: linux-2.6.23/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.23.orig/drivers/video/pxafb.c 2008-01-25 16:25:21.000000000 -0800
++++ linux-2.6.23/drivers/video/pxafb.c 2008-01-25 16:32:14.000000000 -0800
+@@ -1194,7 +1194,7 @@
+ if ((clkinfo->old == 13000))
+ break;
+
+- pcd = get_pcd(fbi->fb.var.pixclock);
++ pcd = get_pcd(fbi,fbi->fb.var.pixclock);
+ lccr3 = fbi->reg_lccr3;
+ set_hsync_time(fbi, pcd);
+ fbi->reg_lccr3 = (fbi->reg_lccr3 & ~0xff) | LCCR3_PixClkDiv(pcd);
diff --git a/recipes/linux/linux-kexecboot-2.6.24/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch b/recipes/linux/linux-kexecboot-2.6.24/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
new file mode 100644
index 0000000000..b513ba1466
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
@@ -0,0 +1,155 @@
+
+From: Petr Vandrovec <vandrove@vc.cvut.cz>
+
+Patch below adds support for using different prescaler than 16 for 16c950
+chips. This is needed for using Fujitsu-Siemens Connect2Air compact-flash
+card, which comes (apparently) with 806kHz clocks, and so you have to
+program prescaler for division by 7, and DLAB to 1, to get 115200Bd.
+
+To get card properly running you also have to add lines below to
+/etc/pcmcia/serial.opts so kernel knows that base speed is not 115200 but
+50400 (50400 * 16 = 806400; 806400 / 7 = 115200). As I've found no code
+specifying baud_rate in serial_cs, I assume that specifying it in
+serial.opts is right way to do this type of things.
+
+Patch also fixes problem that for UPF_MAGIC_MULTIPLIER maximum possible
+baud rate passed to uart code was uartclk / 16 while correct value for
+these devices (and for 16c950) is uartclk / 4.
+
+Patch also fixes problem that for UPF_MAGIC_MULTIPLIER devices with
+baud_rate 19200 or 9600 spd_cust did not work correctly. Not that such
+devices exist, but we should not ignore spd_cust, user probably knows why
+he asked for spd_cust.
+
+serial.opts:
+
+case "$MANFID-$FUNCID-$PRODID_1-$PRODID_2-$PRODID_3-$PRODID_4" in
+'0279,950b-2-GPRS Modem---')
+ SERIAL_OPTS="baud_base 50400"
+ ;;
+esac
+
+Cc: David Woodhouse <dwmw2@infradead.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+---
+
+ drivers/serial/8250.c | 82 +++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 64 insertions(+), 18 deletions(-)
+
+Index: linux-2.6.21/drivers/serial/8250.c
+===================================================================
+--- linux-2.6.21.orig/drivers/serial/8250.c 2007-07-01 16:59:52.000000000 +0100
++++ linux-2.6.21/drivers/serial/8250.c 2007-07-01 17:01:21.000000000 +0100
+@@ -1964,24 +1964,58 @@ static void serial8250_shutdown(struct u
+ serial_unlink_irq_chain(up);
+ }
+
+-static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud)
++static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud,
++ unsigned int *prescaler)
+ {
+- unsigned int quot;
+-
+- /*
+- * Handle magic divisors for baud rates above baud_base on
+- * SMSC SuperIO chips.
++ /*
++ * Use special handling only if user did not supply its own divider.
++ * spd_cust is defined in terms of baud_base, so always use default
++ * prescaler when spd_cust is requested.
+ */
+- if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
+- baud == (port->uartclk/4))
+- quot = 0x8001;
+- else if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
+- baud == (port->uartclk/8))
+- quot = 0x8002;
+- else
+- quot = uart_get_divisor(port, baud);
+
+- return quot;
++ *prescaler = 16;
++ if (baud != 38400 || (port->flags & UPF_SPD_MASK) != UPF_SPD_CUST) {
++ unsigned int quot = port->uartclk / baud;
++
++ /*
++ * Handle magic divisors for baud rates above baud_base on
++ * SMSC SuperIO chips.
++ */
++ if (port->flags & UPF_MAGIC_MULTIPLIER) {
++ if (quot == 4) {
++ return 0x8001;
++ } else if (quot == 8) {
++ return 0x8002;
++ }
++ }
++ if (port->type == PORT_16C950) {
++ /*
++ * This computes TCR value (4 to 16), not CPR value (which can
++ * be between 1.000 and 31.875) - chip I have uses XTAL of
++ * 806400Hz, and so a division by 7 is required to get 115200Bd.
++ * I'm leaving CPR disabled for now, until someone will
++ * hit even more exotic XTAL (it is needed to get 500kbps
++ * or 1000kbps from 18.432MHz XTAL, but I have no device
++ * which would benefit from doing that).
++ *
++ * If we can use divide by 16, use it. Otherwise look for
++ * better prescaler, from 15 to 4. If quotient cannot
++ * be divided by any integer value between 4 and 15, use 4.
++ */
++ if (quot & 0x0F) {
++ unsigned int div;
++
++ for (div = 15; div > 4; div--) {
++ if (quot % div == 0) {
++ break;
++ }
++ }
++ *prescaler = div;
++ return quot / div;
++ }
++ }
++ }
++ return uart_get_divisor(port, baud);
+ }
+
+ static void
+@@ -1991,7 +2025,7 @@ serial8250_set_termios(struct uart_port
+ struct uart_8250_port *up = (struct uart_8250_port *)port;
+ unsigned char cval, fcr = 0;
+ unsigned long flags;
+- unsigned int baud, quot;
++ unsigned int baud, quot, prescaler;
+
+ switch (termios->c_cflag & CSIZE) {
+ case CS5:
+@@ -2023,8 +2057,13 @@ serial8250_set_termios(struct uart_port
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+- baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
+- quot = serial8250_get_divisor(port, baud);
++ if (port->type == PORT_16C950 || (port->flags & UPF_MAGIC_MULTIPLIER)) {
++ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/4);
++ } else {
++ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
++ }
++ quot = serial8250_get_divisor(port, baud, &prescaler);
++
+
+ /*
+ * Oxford Semi 952 rev B workaround
+@@ -2139,6 +2178,13 @@ serial8250_set_termios(struct uart_port
+ serial_dl_write(up, quot);
+
+ /*
++ * Program prescaler for 16C950 chips.
++ */
++ if (up->port.type == PORT_16C950) {
++ serial_icr_write(up, UART_TCR, prescaler == 16 ? 0 : prescaler);
++ }
++
++ /*
+ * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR
+ * is written without DLAB set, this mode will be disabled.
+ */
diff --git a/recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r1.patch b/recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r1.patch
new file mode 100644
index 0000000000..bed41c55d5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r1.patch
@@ -0,0 +1,527 @@
+This patch adds support for Sharp CE-RH2 on Spitz.
+
+It is not clean enough to be upstreamed:
+- It is a bit syslog-noisy.
+- Does not support other Zaurus models.
+- Maybe split to more parts:
+ * MAX1111 driver
+ * linear input device
+ * virtual keyboard on top of linear input device
+
+Index: linux-2.6.24/arch/arm/mach-pxa/spitz.c
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/spitz.c 2008-03-10 17:05:37.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/spitz.c 2008-03-10 17:05:55.000000000 +0000
+@@ -259,6 +259,13 @@
+ .id = -1,
+ };
+
++/*
++ * Spitz Remote Control Device
++ */
++static struct platform_device sharpsl_rc_device = {
++ .name = "sharpsl-remote-control",
++ .id = -1,
++};
+
+ /*
+ * Spitz LEDs
+@@ -548,6 +555,7 @@
+ &spitzscoop_device,
+ &spitzssp_device,
+ &spitzkbd_device,
++ &sharpsl_rc_device,
+ &spitzts_device,
+ &spitzbl_device,
+ &spitzled_device,
+Index: linux-2.6.24/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/Kconfig 2008-03-10 17:05:40.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Kconfig 2008-03-10 17:05:55.000000000 +0000
+@@ -154,6 +154,17 @@
+ To compile this driver as a module, choose M here: the
+ module will be called spitzkbd.
+
++config SHARPSL_RC
++ tristate "Sharp SL-Cxx00 Remote Control"
++ depends on PXA_SHARPSL
++ default y
++ help
++ Say Y here to enable the remote on the Sharp Zaurus SL-Cxx00,
++ SL-C1000, SL-C3000 and Sl-C3100 series of PDAs.
++
++ To compile this driver as a module, choose M here: the
++ module will be called sharpsl_rc.
++
+ config KEYBOARD_AMIGA
+ tristate "Amiga keyboard"
+ depends on AMIGA
+Index: linux-2.6.24/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/Makefile 2008-03-10 17:05:40.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Makefile 2008-03-10 17:06:17.000000000 +0000
+@@ -26,3 +26,5 @@
+ obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
+ obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
+ obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
++obj-$(CONFIG_SHARPSL_RC) += sharpsl_rc.o
++
+Index: linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c 2008-03-10 17:05:55.000000000 +0000
+@@ -0,0 +1,291 @@
++/*
++ * Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
++ *
++ * Copyright (c) 2004-2005 Richard Purdie
++ *
++ * Based on corgikbd.c and Sharp's RC driver
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#define DEBUG 1
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/init.h>
++#include <linux/input.h>
++#include <linux/interrupt.h>
++#include <linux/jiffies.h>
++#include <linux/module.h>
++#include <linux/slab.h>
++
++#ifdef CONFIG_MACH_SPITZ
++#include <asm/arch/spitz.h>
++#endif
++#ifdef CONFIG_MACH_CORGI
++#include <asm/arch/corgi.h>
++#endif
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/hardware/scoop.h>
++#include <asm/arch/sharpsl.h>
++#include <asm/hardware/sharpsl_pm.h>
++
++#define DPRINTK(fmt, args...) dev_dbg(data->dev, fmt "\n", ##args)
++
++struct remote_control_key {
++ unsigned char min;
++ unsigned char max;
++ unsigned char key;
++};
++
++#ifdef CONFIG_MACH_SPITZ
++#define REMOTE_AKIN_PULLUP SPITZ_SCP2_AKIN_PULLUP
++#define REMOTE_SCOOP_DEVICE spitzscoop2_device
++#define REMOTE_GPIO_INT SPITZ_GPIO_AK_INT
++#define REMOTE_IRQ_INT SPITZ_IRQ_GPIO_AK_INT
++static struct remote_control_key remote_keys[] = {
++ { 25, 35, KEY_STOPCD},
++ { 55, 65, KEY_PLAYPAUSE},
++ { 85, 95, KEY_NEXTSONG},
++ { 115, 125, KEY_VOLUMEUP},
++ { 145, 155, KEY_PREVIOUSSONG},
++ { 180, 190, KEY_MUTE},
++ { 215, 225, KEY_VOLUMEDOWN},
++};
++#endif
++#ifdef CONFIG_MACH_CORGI
++#define REMOTE_AKIN_PULLUP CORGI_SCP_AKIN_PULLUP
++#define REMOTE_SCOOP_DEVICE corgiscoop_device
++#define REMOTE_GPIO_INT CORGI_GPIO_AK_INT
++#define REMOTE_IRQ_INT CORGI_IRQ_GPIO_AK_INT
++static struct remote_control_key remote_keys[] = {
++ //These need to be fixed for the CE-RH1's values
++ { 25, 35, KEY_STOPCD},
++ { 55, 65, KEY_PLAYPAUSE},
++ { 85, 95, KEY_NEXTSONG},
++ { 115, 125, KEY_VOLUMEUP},
++ { 145, 155, KEY_PREVIOUSSONG},
++ { 180, 190, KEY_MUTE},
++ { 215, 225, KEY_VOLUMEDOWN},
++};
++#endif
++
++#define RELEASE_HI 230
++#define MAX_EARPHONE 6
++#define RC_POLL_MS 10
++#define RC_FINISH_MS 500
++#define WAIT_STATE 3
++#define NOISE_THRESHOLD 100
++
++struct sharpsl_rc {
++ struct input_dev *input;
++ struct device *dev;
++
++ spinlock_t lock;
++ struct timer_list rctimer;
++ struct timer_list rctimer_finish;
++
++ unsigned int handling_press;
++ unsigned int noise;
++ unsigned int state;
++ unsigned int last_key;
++};
++
++static int get_remocon_raw(void)
++{
++ int i, val;
++
++ val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
++ for (i = 0; i < ARRAY_SIZE(remote_keys); ++i) {
++ if (val >= remote_keys[i].min
++ && val <= remote_keys[i].max) {
++ printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, remote_keys[i].key);
++ return remote_keys[i].key;
++ }
++ }
++ return 0;
++}
++
++static irqreturn_t sharpsl_rc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++ struct sharpsl_rc *data = dev_id;
++ DPRINTK("sharpsl_rc_interrupt %d\n", irq);
++ if (!data->handling_press) {
++ DPRINTK("handling interrupt");
++ data->handling_press = 1;
++ data->noise = 0;
++ data->state = 0;
++ data->last_key = 0;
++
++ reset_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
++
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ }
++ return IRQ_HANDLED;
++}
++
++static void sharpsl_rc_timer_callback(unsigned long dataPtr)
++{
++ struct sharpsl_rc *data = (struct sharpsl_rc *) dataPtr;
++ int timer = 1;
++ int key = get_remocon_raw();
++ DPRINTK("timer callback, key: %d", key);
++
++ //wait for value to stabilize
++ if (data->state < WAIT_STATE) {
++ if (data->last_key != key) {
++ ++data->noise;
++ if (data->noise > NOISE_THRESHOLD) {
++ DPRINTK("too much noise, bailing");
++ timer = 0;
++ }
++ data->state = 0;
++ } else {
++ ++data->state;
++ }
++ data->last_key = key;
++
++ //stable value, send event
++ } else if (data->state == WAIT_STATE) {
++ data->noise = 0;
++ //non-key returned, skip the rest of the states and bail now
++ if (data->last_key == 0) {
++ DPRINTK("non-key detected %d, noise: %d", data->last_key, data->noise);
++ timer = 0;
++ //send button press
++ } else {
++ DPRINTK("key press detected %d, noise %d", data->last_key, data->noise);
++ input_report_key(data->input, data->last_key, 1);
++ }
++ ++data->state;
++
++ //wait until key is released
++ } else if (data->state < WAIT_STATE * 2) {
++ if (key == data->last_key
++ && data->noise < NOISE_THRESHOLD) {
++ data->state = WAIT_STATE + 1;
++ ++data->noise;
++ } else {
++ ++data->state;
++ }
++ //key is released, send event
++ } else {
++ //send button release
++ DPRINTK("release key %d", data->last_key);
++ input_report_key(data->input, data->last_key, 0);
++ timer = 0;
++ }
++ if (timer) {
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ } else {
++ set_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
++ data->handling_press = 0;
++ }
++}
++
++static int __init sharpsl_rc_probe(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc;
++ struct input_dev *input_dev;
++ int i, ret;
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_probe\n");
++
++ sharpsl_rc = kzalloc(sizeof(struct sharpsl_rc), GFP_KERNEL);
++ input_dev = input_allocate_device();
++ if (!sharpsl_rc || !input_dev) {
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, sharpsl_rc);
++
++ sharpsl_rc->dev = &pdev->dev;
++ sharpsl_rc->input = input_dev;
++ spin_lock_init(&sharpsl_rc->lock);
++
++ /* Init Remote Control Timer */
++ init_timer(&sharpsl_rc->rctimer);
++ sharpsl_rc->rctimer.function = sharpsl_rc_timer_callback;
++ sharpsl_rc->rctimer.data = (unsigned long) sharpsl_rc;
++
++ input_dev->name = "Sharp Remote Control CE-RHX";
++ input_dev->phys = "sharpsl_rc/input0";
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x0001;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++ input_dev->cdev.dev = &pdev->dev;
++ input_dev->private = sharpsl_rc;
++
++ input_dev->evbit[0] = BIT(EV_KEY);
++
++ for (i = 0; i <= ARRAY_SIZE(remote_keys); i++)
++ set_bit(remote_keys[i].key, input_dev->keybit);
++
++ input_register_device(sharpsl_rc->input);
++
++ pxa_gpio_mode(REMOTE_GPIO_INT | GPIO_IN);
++ ret = request_irq(REMOTE_IRQ_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ if (ret < 0) {
++ dev_dbg(&pdev->dev, "Can't get IRQ: %d!\n", i);
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return ret;
++ }
++
++ return 0;
++}
++
++static int sharpsl_rc_remove(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc = platform_get_drvdata(pdev);
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_remove\n");
++
++ free_irq(REMOTE_IRQ_INT, sharpsl_rc);
++ del_timer_sync(&sharpsl_rc->rctimer);
++ input_unregister_device(sharpsl_rc->input);
++ kfree(sharpsl_rc);
++
++ return 0;
++}
++
++static struct platform_driver sharpsl_rc_driver = {
++ .probe = sharpsl_rc_probe,
++ .remove = sharpsl_rc_remove,
++ .suspend = NULL,
++ .resume = NULL,
++ .driver = {
++ .name = "sharpsl-remote-control",
++ },
++};
++
++static int __devinit sharpsl_rc_init(void)
++{
++ printk("sharpsl_rc_init\n");
++ return platform_driver_register(&sharpsl_rc_driver);
++}
++
++static void __exit sharpsl_rc_exit(void)
++{
++ printk("sharpsl_rc_exit\n");
++ platform_driver_unregister(&sharpsl_rc_driver);
++}
++
++module_init(sharpsl_rc_init);
++module_exit(sharpsl_rc_exit);
++
++MODULE_AUTHOR("Justin Patrin <papercrane@reversefold.com>");
++MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
++MODULE_DESCRIPTION("SharpSL Remote Control Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.24/drivers/input/keyboard/spitzkbd.c
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/spitzkbd.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/spitzkbd.c 2008-03-10 17:05:55.000000000 +0000
+@@ -19,6 +19,7 @@
+ #include <linux/jiffies.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
++#include <linux/kmod.h>
+
+ #include <asm/arch/spitz.h>
+ #include <asm/arch/hardware.h>
+@@ -279,13 +280,21 @@
+ static int sharpsl_hinge_state;
+ static int hinge_count;
+
++void spitzkbd_handle_sharpsl_rc(void *arg) {
++ request_module("sharpsl_rc");
++}
++
++DECLARE_WORK(spitzkbd_work, spitzkbd_handle_sharpsl_rc);
++
+ static void spitzkbd_hinge_timer(unsigned long data)
+ {
+ struct spitzkbd *spitzkbd_data = (struct spitzkbd *) data;
+ unsigned long state;
+ unsigned long flags;
++ unsigned int headphone, remote;
+
+ state = GPLR(SPITZ_GPIO_SWA) & (GPIO_bit(SPITZ_GPIO_SWA)|GPIO_bit(SPITZ_GPIO_SWB));
++ state |= (GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN));
+ state |= (GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT));
+ if (state != sharpsl_hinge_state) {
+ hinge_count = 0;
+@@ -299,9 +308,18 @@
+
+ input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
+ input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
+- input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
++
++ headphone = ((GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN)) != 0);
++ input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, headphone);
++
++ remote = headphone && ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) == 0);
++ input_report_switch(spitzkbd_data->input, SW_REMOTE_INSERT, remote);
+ input_sync(spitzkbd_data->input);
+
++ if (remote) {
++ schedule_work(&spitzkbd_work);
++ }
++
+ spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
+ } else {
+ mod_timer(&spitzkbd_data->htimer, jiffies + msecs_to_jiffies(HINGE_SCAN_INTERVAL));
+@@ -395,6 +413,7 @@
+ set_bit(SW_LID, input_dev->swbit);
+ set_bit(SW_TABLET_MODE, input_dev->swbit);
+ set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
++ set_bit(SW_REMOTE_INSERT, input_dev->swbit);
+
+ err = input_register_device(input_dev);
+ if (err)
+@@ -432,9 +451,12 @@
+ request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd SWB", spitzkbd);
+- request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ request_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd HP", spitzkbd);
++ request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "Spitzkbd HP Type", spitzkbd);
+
+ return 0;
+
+@@ -455,6 +477,7 @@
+ free_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd);
++ free_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd);
+
+ del_timer_sync(&spitzkbd->htimer);
+Index: linux-2.6.24/arch/arm/mach-pxa/sharpsl.h
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/sharpsl.h 2008-03-10 17:05:35.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/sharpsl.h 2008-03-10 17:05:55.000000000 +0000
+@@ -37,15 +37,10 @@
+ */
+ #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
+
+-/* MAX1111 Channel Definitions */
+-#define MAX1111_BATT_VOLT 4u
+-#define MAX1111_BATT_TEMP 2u
+-#define MAX1111_ACIN_VOLT 6u
+-
+ extern struct battery_thresh spitz_battery_levels_acin[];
+ extern struct battery_thresh spitz_battery_levels_noac[];
+ void sharpsl_pm_pxa_init(void);
+ void sharpsl_pm_pxa_remove(void);
+-int sharpsl_pm_pxa_read_max1111(int channel);
++
+
+
+Index: linux-2.6.24/arch/arm/mach-pxa/sharpsl_pm.c
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/sharpsl_pm.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/sharpsl_pm.c 2008-03-10 17:05:55.000000000 +0000
+@@ -135,6 +135,8 @@
+ | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
+ }
+
++EXPORT_SYMBOL(sharpsl_pm_pxa_read_max1111);
++
+ void sharpsl_pm_pxa_init(void)
+ {
+ pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);
+Index: linux-2.6.24/include/asm-arm/hardware/sharpsl_pm.h
+===================================================================
+--- linux-2.6.24.orig/include/asm-arm/hardware/sharpsl_pm.h 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/sharpsl_pm.h 2008-03-10 17:05:55.000000000 +0000
+@@ -104,3 +104,10 @@
+ irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id);
+ irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id);
+
++/* MAX1111 Channel Definitions */
++#define MAX1111_REMCOM 0u
++#define MAX1111_BATT_VOLT 4u
++#define MAX1111_BATT_TEMP 2u
++#define MAX1111_ACIN_VOLT 6u
++
++int sharpsl_pm_pxa_read_max1111(int channel);
+Index: linux-2.6.24/include/linux/input.h
+===================================================================
+--- linux-2.6.24.orig/include/linux/input.h 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/include/linux/input.h 2008-03-10 17:05:55.000000000 +0000
+@@ -636,6 +636,7 @@
+ #define SW_TABLET_MODE 0x01 /* set = tablet mode */
+ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
+ #define SW_RADIO 0x03 /* set = radio enabled */
++#define SW_REMOTE_INSERT 0x04 /* set = remote */
+ #define SW_MAX 0x0f
+ #define SW_CNT (SW_MAX+1)
+
+Index: linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/spitz_pm.c 2008-03-10 17:05:40.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c 2008-03-10 17:05:55.000000000 +0000
+@@ -162,6 +162,13 @@
+ if (resume_on_alarm && (PEDR & PWER_RTC))
+ is_resume |= PWER_RTC;
+
++ printk("wakeup: PEDR: %x, PKSR: %x, HP_IN: %x, AK_INT: %x\n", PEDR, PKSR, GPIO_bit(SPITZ_GPIO_HP_IN), GPIO_bit(SPITZ_GPIO_AK_INT));
++
++ //remote/headphone interrupt, wakeup
++ if (PEDR == 0 && (PKSR & 0xc0d01) != 0) {
++ is_resume |= PWER_RTC;
++ }
++
+ dev_dbg(sharpsl_pm.dev, "is_resume: %x\n",is_resume);
+ return is_resume;
+ }
diff --git a/recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r2.patch b/recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r2.patch
new file mode 100644
index 0000000000..6fb34ec179
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/sharpsl-rc-r2.patch
@@ -0,0 +1,180 @@
+This patch adds support for Sharp CE-RH2 on Akita and CE-RH1 on C7x0.
+
+This patch is a bit ugly:
+- Device specific functions should be moved to platform infrastructure.
+- Maybe define generic *_scoopexp functions handling Akita x Spitz differences.
+
+Index: linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/sharpsl_rc.c 2008-03-08 19:29:02.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c 2008-03-08 22:23:35.000000000 +0000
+@@ -21,12 +21,10 @@
+ #include <linux/module.h>
+ #include <linux/slab.h>
+
+-#ifdef CONFIG_MACH_SPITZ
++#include <asm/mach-types.h>
+ #include <asm/arch/spitz.h>
+-#endif
+-#ifdef CONFIG_MACH_CORGI
++#include <asm/arch/akita.h>
+ #include <asm/arch/corgi.h>
+-#endif
+
+ #include <asm/arch/hardware.h>
+ #include <asm/arch/pxa-regs.h>
+@@ -42,12 +40,8 @@
+ unsigned char key;
+ };
+
+-#ifdef CONFIG_MACH_SPITZ
+-#define REMOTE_AKIN_PULLUP SPITZ_SCP2_AKIN_PULLUP
+-#define REMOTE_SCOOP_DEVICE spitzscoop2_device
+-#define REMOTE_GPIO_INT SPITZ_GPIO_AK_INT
+-#define REMOTE_IRQ_INT SPITZ_IRQ_GPIO_AK_INT
+-static struct remote_control_key remote_keys[] = {
++static struct remote_control_key remote_keys_spitz[] = {
++ /* CE-RH2 values */
+ { 25, 35, KEY_STOPCD},
+ { 55, 65, KEY_PLAYPAUSE},
+ { 85, 95, KEY_NEXTSONG},
+@@ -56,23 +50,15 @@
+ { 180, 190, KEY_MUTE},
+ { 215, 225, KEY_VOLUMEDOWN},
+ };
+-#endif
+-#ifdef CONFIG_MACH_CORGI
+-#define REMOTE_AKIN_PULLUP CORGI_SCP_AKIN_PULLUP
+-#define REMOTE_SCOOP_DEVICE corgiscoop_device
+-#define REMOTE_GPIO_INT CORGI_GPIO_AK_INT
+-#define REMOTE_IRQ_INT CORGI_IRQ_GPIO_AK_INT
+-static struct remote_control_key remote_keys[] = {
+- //These need to be fixed for the CE-RH1's values
+- { 25, 35, KEY_STOPCD},
+- { 55, 65, KEY_PLAYPAUSE},
+- { 85, 95, KEY_NEXTSONG},
+- { 115, 125, KEY_VOLUMEUP},
+- { 145, 155, KEY_PREVIOUSSONG},
+- { 180, 190, KEY_MUTE},
+- { 215, 225, KEY_VOLUMEDOWN},
++static struct remote_control_key remote_keys_corgi[] = {
++ /* CE-RH1 values */
++ { 27, 35, KEY_STOPCD},
++ { 7, 13, KEY_PLAYPAUSE},
++ { 77, 93, KEY_NEXTSONG},
++ { 115, 132, KEY_VOLUMEUP},
++ { 46, 58, KEY_PREVIOUSSONG},
++ { 170, 186, KEY_VOLUMEDOWN},
+ };
+-#endif
+
+ #define RELEASE_HI 230
+ #define MAX_EARPHONE 6
+@@ -98,9 +84,17 @@
+ static int get_remocon_raw(void)
+ {
+ int i, val;
++ struct remote_control_key *remote_keys;
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ remote_keys = remote_keys_spitz;
++ else
++ remote_keys = remote_keys_corgi;
+
+ val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
+- for (i = 0; i < ARRAY_SIZE(remote_keys); ++i) {
++ for (i = 0; i < (machine_is_borzoi() || machine_is_spitz() || machine_is_akita() ?
++ ARRAY_SIZE(remote_keys_spitz) : ARRAY_SIZE(remote_keys_corgi));
++ ++i) {
+ if (val >= remote_keys[i].min
+ && val <= remote_keys[i].max) {
+ printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, remote_keys[i].key);
+@@ -121,8 +115,12 @@
+ data->state = 0;
+ data->last_key = 0;
+
+- reset_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
+-
++ if (machine_is_borzoi() || machine_is_spitz())
++ reset_scoop_gpio(platform_scoop_config->devs[1].dev, SPITZ_SCP2_AKIN_PULLUP);
++ else if (machine_is_akita())
++ akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_AKIN_PULLUP);
++ else
++ reset_scoop_gpio(platform_scoop_config->devs[0].dev, CORGI_SCP_AKIN_PULLUP);
+ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
+ }
+ return IRQ_HANDLED;
+@@ -182,7 +180,12 @@
+ if (timer) {
+ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
+ } else {
+- set_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
++ if (machine_is_borzoi() || machine_is_spitz())
++ set_scoop_gpio(platform_scoop_config->devs[1].dev, SPITZ_SCP2_AKIN_PULLUP);
++ else if (machine_is_akita())
++ akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_AKIN_PULLUP);
++ else
++ set_scoop_gpio(platform_scoop_config->devs[0].dev, CORGI_SCP_AKIN_PULLUP);
+ data->handling_press = 0;
+ }
+ }
+@@ -192,6 +195,7 @@
+ struct sharpsl_rc *sharpsl_rc;
+ struct input_dev *input_dev;
+ int i, ret;
++ struct remote_control_key *remote_keys;
+
+ dev_dbg(&pdev->dev, "sharpsl_rc_probe\n");
+
+@@ -225,17 +229,32 @@
+
+ input_dev->evbit[0] = BIT(EV_KEY);
+
+- for (i = 0; i <= ARRAY_SIZE(remote_keys); i++)
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ remote_keys = remote_keys_spitz;
++ else
++ remote_keys = remote_keys_corgi;
++ for (i = 0; i < (machine_is_borzoi() || machine_is_spitz() || machine_is_akita() ?
++ ARRAY_SIZE(remote_keys_spitz) : ARRAY_SIZE(remote_keys_corgi));
++ ++i)
+ set_bit(remote_keys[i].key, input_dev->keybit);
+
+ input_register_device(sharpsl_rc->input);
+
+- pxa_gpio_mode(REMOTE_GPIO_INT | GPIO_IN);
+- ret = request_irq(REMOTE_IRQ_INT,
+- sharpsl_rc_interrupt,
+- IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
+- "sharpsl_rc",
+- sharpsl_rc);
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita()) {
++ pxa_gpio_mode(SPITZ_GPIO_AK_INT | GPIO_IN);
++ ret = request_irq(SPITZ_IRQ_GPIO_AK_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ } else {
++ pxa_gpio_mode(CORGI_GPIO_AK_INT | GPIO_IN);
++ ret = request_irq(CORGI_IRQ_GPIO_AK_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ }
+ if (ret < 0) {
+ dev_dbg(&pdev->dev, "Can't get IRQ: %d!\n", i);
+ kfree(sharpsl_rc);
+@@ -252,7 +271,10 @@
+
+ dev_dbg(&pdev->dev, "sharpsl_rc_remove\n");
+
+- free_irq(REMOTE_IRQ_INT, sharpsl_rc);
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ free_irq(SPITZ_IRQ_GPIO_AK_INT, sharpsl_rc);
++ else
++ free_irq(CORGI_IRQ_GPIO_AK_INT, sharpsl_rc);
+ del_timer_sync(&sharpsl_rc->rctimer);
+ input_unregister_device(sharpsl_rc->input);
+ kfree(sharpsl_rc);
diff --git a/recipes/linux/linux-kexecboot-2.6.24/spitz/defconfig b/recipes/linux/linux-kexecboot-2.6.24/spitz/defconfig
new file mode 100644
index 0000000000..eab0e478d8
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/spitz/defconfig
@@ -0,0 +1,1239 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Sun Feb 1 20:48:10 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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_PXA_SHARPSL_25x is not set
+CONFIG_PXA_SHARPSL_27x=y
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE 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
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+CONFIG_KEYBOARD_SPITZ=y
+CONFIG_SHARPSL_RC=y
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DAB 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=m
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+# CONFIG_USB_ETH is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SPITZ=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.24/spitz_h_rewrite.patch b/recipes/linux/linux-kexecboot-2.6.24/spitz_h_rewrite.patch
new file mode 100644
index 0000000000..df6d5f66c2
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/spitz_h_rewrite.patch
@@ -0,0 +1,497 @@
+http://www.uwsg.indiana.edu/hypermail/linux/kernel/0802.1/3541.html
+
+Here is a rewrite of spitz.h, which includes comments documenting
+function of particular GPIO pins.
+
+spitz_h_rewrite.patch provides:
+- no changes in compiled code
+- partial spitz.h rewrite:
+ * organized by function
+ * describes complete GPIO pinout
+ * comments added
+ * removed defines cloning pxa-regs.h
+- prefer generic pxa-regs.h GPIO if available
+- use GPIO names instead of numbers
+
+Thanks to Trisoft for providing needed information.
+
+Index: linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.24.orig/arch/arm/mach-pxa/spitz_pm.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c 2008-02-13 13:49:22.000000000 +0000
+@@ -110,9 +110,9 @@
+ pxa_gpio_mode(GPIO18_RDY|GPIO_OUT | GPIO_DFLT_HIGH);
+
+ PRER = GPIO_bit(SPITZ_GPIO_KEY_INT);
+- PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
+- PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET) | PWER_RTC;
+- PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
++ PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST);
++ PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST) | PWER_RTC;
++ PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST);
+ PKSR = 0xffffffff; // clear
+
+ /* nRESET_OUT Disable */
+@@ -128,7 +128,7 @@
+ static void spitz_postsuspend(void)
+ {
+ pxa_gpio_mode(GPIO18_RDY_MD);
+- pxa_gpio_mode(10 | GPIO_IN);
++ pxa_gpio_mode(SPITZ_GPIO_NC_10 | GPIO_IN);
+ }
+
+ static int spitz_should_wakeup(unsigned int resume_on_alarm)
+Index: linux-2.6.24/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.24.orig/drivers/video/pxafb.c 2008-02-13 13:49:04.000000000 +0000
++++ linux-2.6.24/drivers/video/pxafb.c 2008-02-13 13:49:57.000000000 +0000
+@@ -920,7 +920,7 @@
+ return;
+ }
+
+- for (gpio = 58; ldd_bits > 0; gpio++, ldd_bits--) {
++ for (gpio = GPIO58_LDD_0; ldd_bits > 0; gpio++, ldd_bits--) {
+ pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT);
+ }
+ pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
+Index: linux-2.6.24/include/asm-arm/arch-pxa/akita.h
+===================================================================
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/akita.h 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/akita.h 2008-02-13 13:49:22.000000000 +0000
+@@ -12,11 +12,11 @@
+ /* Akita IO Expander GPIOs */
+
+ #define AKITA_IOEXP_RESERVED_7 (1 << 7)
+-#define AKITA_IOEXP_IR_ON (1 << 6)
+-#define AKITA_IOEXP_AKIN_PULLUP (1 << 5)
+-#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4)
+-#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3)
+-#define AKITA_IOEXP_MIC_BIAS (1 << 2)
++#define AKITA_IOEXP_IR_ON (1 << 6) /* IrDA On */
++#define AKITA_IOEXP_AKIN_PULLUP (1 << 5) /* Pull-Up for Remote */
++#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) /* Backlight Control */
++#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) /* Backlight On */
++#define AKITA_IOEXP_MIC_BIAS (1 << 2) /* Mic Bias On */
+ #define AKITA_IOEXP_RESERVED_1 (1 << 1)
+ #define AKITA_IOEXP_RESERVED_0 (1 << 0)
+
+Index: linux-2.6.24/include/asm-arm/arch-pxa/pxa-regs.h
+===================================================================
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/pxa-regs.h 2008-02-13 13:49:07.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/pxa-regs.h 2008-02-13 13:49:22.000000000 +0000
+@@ -1334,6 +1334,7 @@
+ #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */
+ #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */
+ #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
++#define GPIO104_pSKTSEL 104 /* PCMCIA Socket Select (PXA27x) */
+ #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */
+ #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */
+ #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */
+Index: linux-2.6.24/include/asm-arm/arch-pxa/spitz.h
+===================================================================
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/spitz.h 2008-02-13 13:49:01.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/spitz.h 2008-02-13 13:49:22.000000000 +0000
+@@ -1,8 +1,9 @@
+ /*
+- * Hardware specific definitions for SL-Cx000 series of PDAs
++ * Hardware specific definitions for SL-Cxx00 series of PDAs
+ *
+ * Copyright (c) 2005 Alexander Wykes
+ * Copyright (c) 2005 Richard Purdie
++ * Copyright (c) 2008 Stanislav Brabec
+ *
+ * Based on Sharp's 2.4 kernel patches
+ *
+@@ -13,140 +14,257 @@
+ */
+ #ifndef __ASM_ARCH_SPITZ_H
+ #define __ASM_ARCH_SPITZ_H 1
+-#endif
+
+-#include <linux/fb.h>
++#include <asm-arm/arch-pxa/irqs.h>
++#include <linux/platform_device.h>
+
+ /* Spitz/Akita GPIOs */
+
+-#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
+-#define SPITZ_GPIO_RESET (1)
+-#define SPITZ_GPIO_nSD_DETECT (9)
+-#define SPITZ_GPIO_TP_INT (11) /* Touch Panel interrupt */
+-#define SPITZ_GPIO_AK_INT (13) /* Remote Control */
+-#define SPITZ_GPIO_ADS7846_CS (14)
+-#define SPITZ_GPIO_SYNC (16)
+-#define SPITZ_GPIO_MAX1111_CS (20)
+-#define SPITZ_GPIO_FATAL_BAT (21)
+-#define SPITZ_GPIO_HSYNC (22)
+-#define SPITZ_GPIO_nSD_CLK (32)
+-#define SPITZ_GPIO_USB_DEVICE (35)
+-#define SPITZ_GPIO_USB_HOST (37)
+-#define SPITZ_GPIO_USB_CONNECT (41)
+-#define SPITZ_GPIO_LCDCON_CS (53)
+-#define SPITZ_GPIO_nPCE (54)
+-#define SPITZ_GPIO_nSD_WP (81)
+-#define SPITZ_GPIO_ON_RESET (89)
+-#define SPITZ_GPIO_BAT_COVER (90)
+-#define SPITZ_GPIO_CF_CD (94)
+-#define SPITZ_GPIO_ON_KEY (95)
+-#define SPITZ_GPIO_SWA (97)
+-#define SPITZ_GPIO_SWB (96)
+-#define SPITZ_GPIO_CHRG_FULL (101)
+-#define SPITZ_GPIO_CO (101)
+-#define SPITZ_GPIO_CF_IRQ (105)
+-#define SPITZ_GPIO_AC_IN (115)
+-#define SPITZ_GPIO_HP_IN (116)
++/* This list refers to all GPIO pins either in defines or in comments.
++ *
++ * GPIO pins not listed:
++ * GPIO2 SYS_EN: System Power Enable
++ * GPIO5-GPIO8 PWR_CAP0-PWR_CAP3: sleep DC-DC converter power capacitors
++ * GPIO40 not connected
++ */
+
+-/* Spitz Only GPIOs */
+
+-#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
+-#define SPITZ_GPIO_CF2_CD (93)
++/* Spitz/Akita System GPIO */
++
++#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
++#define SPITZ_GPIO_SYNC (16) /* IOPORT Wake Up (input) */
++#define SPITZ_GPIO_NAND_CS (79) /* NAND Flash Chip Select */
++#define SPITZ_GPIO_NC_10 (10) /* Not Connected (but used in kernel) */
++/* This GPIO pin is connected:
++ * GPIO1_RST
++ */
+
+
++/* Compact Flash Interface */
++
++/* Spitz/Akita Compact Flash Interface */
++#define SPITZ_GPIO_CF_CD (94) /* CF IRQ */
++#define SPITZ_GPIO_CF_IRQ (105) /* CF Ready */
++/* These GPIO pins are connected:
++ * GPIO48_nPOE
++ * GPIO49_nPWE
++ * GPIO50_nPIOR
++ * GPIO51_nPIOW
++ * GPIO54_nPCE_2
++ * GPIO55_nPREG
++ * GPIO56_nPWAIT
++ * GPIO57_nIOIS16
++ * GPIO80_nCS_4
++ * GPIO85_nPCE_1
++ * GPIO104_pSKTSEL
++ */
++
++/* Spitz only Compact Flash Interface */
++#define SPITZ_GPIO_CF2_CD (93) /* CF slot1 IRQ */
++#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
++/* This GPIO pin is connected:
++ * GPIO78_nCS_2
++ */
++
++
++/* Spitz/Akita Battery, Power and Service Connector */
++
++#define SPITZ_GPIO_FATAL_BAT (21) /* Fatal Battery */
++#define SPITZ_GPIO_BAT_COVER (90) /* Battery Cover switch */
++#define SPITZ_GPIO_BAT_COVER2 (15) /* Battery Cover switch, parallel pin */
++#define SPITZ_GPIO_CHRG_FULL (101) /* Battery Full */
++#define SPITZ_GPIO_AC_IN (115) /* External Power Supply is active */
++#define SPITZ_GPIO_ON_RESET (89) /* Software Reset */
++#define SPITZ_GPIO_SERVICE0 (83) /* Service Connector */
++#define SPITZ_GPIO_SERVICE1 (84) /* Service Connector */
++/* This GPIO pin is connected:
++ * GPIO18_RDY
++ */
++
++
++/* Spitz/Akita Display Controller */
++
++#define SPITZ_GPIO_HSYNC (22) /* Line Sync Feedback */
++/* These GPIO pins are connected:
++ * GPIO58_LDD_0-GPIO58_LDD_15
++ * GPIO74_LCD_FCLK
++ * GPIO75_LCD_LCLK
++ * GPIO76_LCD_PCLK
++ * GPIO77_LCD_ACBIAS
++ */
++
++
++/* Spitz/Akita SSP/SPI Bus and Devices */
++
++#define SPITZ_GPIO_SSP_CLK (19) /* SSP bus Clock */
++#define SPITZ_GPIO_SSP_RXD (86) /* SSP bus RxD */
++#define SPITZ_GPIO_SSP_TXD (87) /* SSP bus TxD */
++#define SPITZ_GPIO_TP_INT (11) /* Touch Panel IRQ */
++#define SPITZ_GPIO_ADS7846_CS (14) /* Touch Panel Controller Chip Select */
++#define SPITZ_GPIO_MAX1111_CS (20) /* Multi Channel ADC Chip Select */
++#define SPITZ_GPIO_LCDCON_CS (53) /* LCD Controller Chip Select */
++
++
++/* Spitz/Akita Supplementary USB OTG Pins */
++
++#define SPITZ_GPIO_USB_DEVICE (35) /* USB Client power is present */
++#define SPITZ_GPIO_USB_HOST (37) /* USB OTG 5V Host power supply control */
++#define SPITZ_GPIO_USB_CONNECT (41) /* USB Host Cable is connected */
++
++
++/* Spitz/Akita Audio */
++
++#define SPITZ_GPIO_HP_IN (116) /* CPU Headphone detect */
++#define SPITZ_GPIO_AK_INT (13) /* Remote Control detect */
++/* These GPIO AC97 pins are connected:
++ * GPIO28_BITCLK
++ * GPIO29_SDATA_IN
++ * GPIO30_SDATA_OUT
++ * GPIO31_SYNC
++ * GPIO113_AC97_RESET_N
++ */
++
++
++/* Spitz/Akita SD Slot */
++
++#define SPITZ_GPIO_nSD_DETECT (9) /* SD Card Presence */
++#define SPITZ_GPIO_nSD_WP (81) /* SD Write Protection */
++/* These GPIO pins are connected:
++ * GPIO32_MMCCLK
++ * GPIO92_MMCDAT0
++ * GPIO109_MMCDAT1
++ * GPIO110_MMCDAT2
++ * GPIO111_MMCDAT3
++ * GPIO112_MMCCMD
++ */
++
++/* Spitz/Akita I2C bus */
++#define SPITZ_GPIO_SCL (117) /* I2C SCL */
++#define SPITZ_GPIO_SDA (118) /* I2C SDA */
++#define SPITZ_GPIO_PWR_SCL (3) /* I2C SCL power */
++#define SPITZ_GPIO_PWR_SDA (4) /* I2C SDA power */
++
++/* audio codec pins */
++
++
++/* Spitz/Akita UART ports */
++
++/* Fully Featured UART - connected to IOPORT connector */
++#define SPITZ_GPIO_FFRXD (102) /* IOPORT has nRXD inverted levels */
++#define SPITZ_GPIO_FFTXD (99) /* IOPORT has nTXD inverted levels */
++#define SPITZ_GPIO_FFRTS (98)
++#define SPITZ_GPIO_FFCTS (100)
++#define SPITZ_GPIO_FFDTR (82)
++#define SPITZ_GPIO_FFDSR (33)
++
++/* These UART GPIO pins are connected to Bluetooth
++ * (only on Akita version with Bluetooth)
++ * GPIO42_BTRXD
++ * GPIO43_BTTXD
++ * GPIO44_BTCTS
++ * GPIO45_BTRTS
++ */
++
++/* These UART GPIO pins are connected to IrDA:
++ * GPIO46_STRXD
++ * GPIO47_STTXD
++ */
++
+ /* Spitz/Akita Keyboard Definitions */
+
+-#define SPITZ_KEY_STROBE_NUM (11)
+-#define SPITZ_KEY_SENSE_NUM (7)
+-#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
+-#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
+-#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
+-#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
+-#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
+-#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
+-#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
+-#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
+-
+-#define SPITZ_GPIO_KEY_STROBE0 88
+-#define SPITZ_GPIO_KEY_STROBE1 23
+-#define SPITZ_GPIO_KEY_STROBE2 24
+-#define SPITZ_GPIO_KEY_STROBE3 25
+-#define SPITZ_GPIO_KEY_STROBE4 26
+-#define SPITZ_GPIO_KEY_STROBE5 27
+-#define SPITZ_GPIO_KEY_STROBE6 52
+-#define SPITZ_GPIO_KEY_STROBE7 103
+-#define SPITZ_GPIO_KEY_STROBE8 107
+-#define SPITZ_GPIO_KEY_STROBE9 108
+-#define SPITZ_GPIO_KEY_STROBE10 114
+-
+-#define SPITZ_GPIO_KEY_SENSE0 12
+-#define SPITZ_GPIO_KEY_SENSE1 17
+-#define SPITZ_GPIO_KEY_SENSE2 91
+-#define SPITZ_GPIO_KEY_SENSE3 34
+-#define SPITZ_GPIO_KEY_SENSE4 36
+-#define SPITZ_GPIO_KEY_SENSE5 38
+-#define SPITZ_GPIO_KEY_SENSE6 39
++#define SPITZ_KEY_STROBE_NUM (11)
++#define SPITZ_KEY_SENSE_NUM (7)
++#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
++#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
++#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
++#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
++#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
++#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
++#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
++#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
++#define SPITZ_GPIO_KEY_STROBE0 (88)
++#define SPITZ_GPIO_KEY_STROBE1 (23)
++#define SPITZ_GPIO_KEY_STROBE2 (24)
++#define SPITZ_GPIO_KEY_STROBE3 (25)
++#define SPITZ_GPIO_KEY_STROBE4 (26)
++#define SPITZ_GPIO_KEY_STROBE5 (27)
++#define SPITZ_GPIO_KEY_STROBE6 (52)
++#define SPITZ_GPIO_KEY_STROBE7 (103)
++#define SPITZ_GPIO_KEY_STROBE8 (107)
++#define SPITZ_GPIO_KEY_STROBE9 (108)
++#define SPITZ_GPIO_KEY_STROBE10 (114)
++#define SPITZ_GPIO_KEY_SENSE0 (12)
++#define SPITZ_GPIO_KEY_SENSE1 (17)
++#define SPITZ_GPIO_KEY_SENSE2 (91)
++#define SPITZ_GPIO_KEY_SENSE3 (34)
++#define SPITZ_GPIO_KEY_SENSE4 (36)
++#define SPITZ_GPIO_KEY_SENSE5 (38)
++#define SPITZ_GPIO_KEY_SENSE6 (39)
++
++#define SPITZ_GPIO_SWA (97) /* Keyboard Interrupt A */
++#define SPITZ_GPIO_SWB (96) /* Keyboard Interrupt B */
++#define SPITZ_GPIO_ON_KEY (95) /* Power On Key */
+
+
+-/* Spitz Scoop Device (No. 1) GPIOs */
++/* Spitz/Akita Scoop Device (No. 1) GPIOs */
+ /* Suspend States in comments */
+-#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Keep */
+-#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Keep */
+-#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Keep */
+-#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Low */
+-#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Low */
+-#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* Keep */
+-#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Keep */
+-#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Low */
+-#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Low */
++#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Green LED, Keep */
++#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Fast Charge On, Keep */
++#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Charge On, Keep */
++#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Extra Mute Left, Low */
++#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Extra Mute Right, Low */
++#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* CF+SD Power Circuit, Keep */
++#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Orange LED, Keep */
++#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Dummy Load, Low */
++#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Battery Sensor On, Low */
+
+ #define SPITZ_SCP_IO_DIR (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \
+- SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
+- SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
++ SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
++ SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
+ #define SPITZ_SCP_IO_OUT (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R)
+ #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
+ #define SPITZ_SCP_SUS_SET 0
+
+ /* Spitz Scoop Device (No. 2) GPIOs */
+-/* Suspend States in comments */
+-#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* High */
+-#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Keep */
+-#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
+-#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
+-#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
+-#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
+-#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Low */
+-#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Low */
+-#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Low */
++/* Suspend States in comments
++ * Spitz only, Akita uses corresponding AKITA_IOEXP_ */
++#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* IrDA On, High */
++#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Pull-Up for Remote, Keep */
++#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
++#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
++#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
++#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
++#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Backlight Control, Low */
++#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Backlight On, Low */
++#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Mic Bias On, Low */
+
+ #define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \
+- SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
+- SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++ SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
+
+ #define SPITZ_SCP2_IO_OUT (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1)
+ #define SPITZ_SCP2_SUS_CLR (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
+- SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
+ #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1)
+
+
+-/* Spitz IRQ Definitions */
++/* Spitz/Akita IRQ Definitions */
+
+-#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
+-#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
+-#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
+-#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
+-#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
+-#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
+-#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
+-#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
+-#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
++#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
++#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
++#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
++#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
++#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
++#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
++#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
++#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
++#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
+ #define SPITZ_IRQ_GPIO_BAT_COVER IRQ_GPIO(SPITZ_GPIO_BAT_COVER)
+ #define SPITZ_IRQ_GPIO_FATAL_BAT IRQ_GPIO(SPITZ_GPIO_FATAL_BAT)
+-#define SPITZ_IRQ_GPIO_CO IRQ_GPIO(SPITZ_GPIO_CO)
+-#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
+-#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
+-#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
+-#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
++#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
++#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
++#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
++#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
+ #define SPITZ_IRQ_GPIO_nSD_DETECT IRQ_GPIO(SPITZ_GPIO_nSD_DETECT)
+
+ /*
+@@ -156,3 +274,5 @@
+ extern struct platform_device spitzscoop2_device;
+ extern struct platform_device spitzssp_device;
+ extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
++
++#endif
+Index: linux-2.6.24/sound/arm/pxa2xx-ac97.c
+===================================================================
+--- linux-2.6.24.orig/sound/arm/pxa2xx-ac97.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/sound/arm/pxa2xx-ac97.c 2008-02-13 13:49:22.000000000 +0000
+@@ -133,10 +133,10 @@
+ #ifdef CONFIG_PXA27x
+ /* warm reset broken on Bulverde,
+ so manually keep AC97 reset high */
+- pxa_gpio_mode(113 | GPIO_OUT | GPIO_DFLT_HIGH);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N | GPIO_OUT | GPIO_DFLT_HIGH);
+ udelay(10);
+ GCR |= GCR_WARM_RST;
+- pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N_MD);
+ udelay(500);
+ #else
+ GCR |= GCR_WARM_RST|GCR_PRIRDY_IEN|GCR_SECRDY_IEN;
+@@ -335,7 +335,7 @@
+ pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
+ #ifdef CONFIG_PXA27x
+ /* Use GPIO 113 as AC97 Reset on Bulverde */
+- pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N_MD);
+ #endif
+ pxa_set_cken(CKEN_AC97, 1);
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/squashfs3.3.patch b/recipes/linux/linux-kexecboot-2.6.24/squashfs3.3.patch
new file mode 100644
index 0000000000..cb9a5c49e4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/squashfs3.3.patch
@@ -0,0 +1,4234 @@
+diff -x .gitignore -Nurp linux-2.6.24/fs/Kconfig linux-2.6.24-squashfs3.3/fs/Kconfig
+--- linux-2.6.24/fs/Kconfig 2007-10-25 17:41:45.000000000 +0100
++++ linux-2.6.24-squashfs3.3/fs/Kconfig 2007-11-01 05:06:25.000000000 +0000
+@@ -1396,6 +1396,56 @@ config CRAMFS
+
+ If unsure, say N.
+
++config SQUASHFS
++ tristate "SquashFS 3.3 - Squashed file system support"
++ select ZLIB_INFLATE
++ help
++ Saying Y here includes support for SquashFS 3.3 (a Compressed
++ Read-Only File System). Squashfs is a highly compressed read-only
++ filesystem for Linux. It uses zlib compression to compress both
++ files, inodes and directories. Inodes in the system are very small
++ and all blocks are packed to minimise data overhead. Block sizes
++ greater than 4K are supported up to a maximum of 1 Mbytes (default
++ block size 128K). SquashFS 3.3 supports 64 bit filesystems and files
++ (larger than 4GB), full uid/gid information, hard links and timestamps.
++
++ Squashfs is intended for general read-only filesystem use, for
++ archival use (i.e. in cases where a .tar.gz file may be used), and in
++ embedded systems where low overhead is needed. Further information
++ and filesystem tools are available from http://squashfs.sourceforge.net.
++
++ If you want to compile this as a module ( = code which can be
++ inserted in and removed from the running kernel whenever you want),
++ say M here and read <file:Documentation/modules.txt>. The module
++ will be called squashfs. Note that the root file system (the one
++ containing the directory /) cannot be compiled as a module.
++
++ If unsure, say N.
++
++config SQUASHFS_EMBEDDED
++
++ bool "Additional option for memory-constrained systems"
++ depends on SQUASHFS
++ default n
++ help
++ Saying Y here allows you to specify cache size.
++
++ If unsure, say N.
++
++config SQUASHFS_FRAGMENT_CACHE_SIZE
++ int "Number of fragments cached" if SQUASHFS_EMBEDDED
++ depends on SQUASHFS
++ default "3"
++ help
++ By default SquashFS caches the last 3 fragments read from
++ the filesystem. Increasing this amount may mean SquashFS
++ has to re-read fragments less often from disk, at the expense
++ of extra system memory. Decreasing this amount will mean
++ SquashFS uses less memory at the expense of extra reads from disk.
++
++ Note there must be at least one cached fragment. Anything
++ much more than three will probably not make much difference.
++
+ config VXFS_FS
+ tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
+ depends on BLOCK
+diff -x .gitignore -Nurp linux-2.6.24/fs/Makefile linux-2.6.24-squashfs3.3/fs/Makefile
+--- linux-2.6.24/fs/Makefile 2007-10-25 17:41:45.000000000 +0100
++++ linux-2.6.24-squashfs3.3/fs/Makefile 2007-11-01 05:08:09.000000000 +0000
+@@ -72,6 +72,7 @@ obj-$(CONFIG_JBD) += jbd/
+ obj-$(CONFIG_JBD2) += jbd2/
+ obj-$(CONFIG_EXT2_FS) += ext2/
+ obj-$(CONFIG_CRAMFS) += cramfs/
++obj-$(CONFIG_SQUASHFS) += squashfs/
+ obj-y += ramfs/
+ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
+ obj-$(CONFIG_CODA_FS) += coda/
+diff -x .gitignore -Nurp linux-2.6.24/fs/squashfs/inode.c linux-2.6.24-squashfs3.3/fs/squashfs/inode.c
+--- linux-2.6.24/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/fs/squashfs/inode.c 2007-11-01 05:05:00.000000000 +0000
+@@ -0,0 +1,2192 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.demon.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * inode.c
++ */
++
++#include <linux/squashfs_fs.h>
++#include <linux/module.h>
++#include <linux/zlib.h>
++#include <linux/fs.h>
++#include <linux/squashfs_fs_sb.h>
++#include <linux/squashfs_fs_i.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/vmalloc.h>
++#include <linux/smp_lock.h>
++#include <linux/exportfs.h>
++
++#include "squashfs.h"
++
++int squashfs_cached_blks;
++
++static void vfs_read_inode(struct inode *i);
++static struct dentry *squashfs_get_parent(struct dentry *child);
++static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode);
++static int squashfs_statfs(struct dentry *, struct kstatfs *);
++static int squashfs_symlink_readpage(struct file *file, struct page *page);
++static long long read_blocklist(struct inode *inode, int index,
++ int readahead_blks, char *block_list,
++ unsigned short **block_p, unsigned int *bsize);
++static int squashfs_readpage(struct file *file, struct page *page);
++static int squashfs_readdir(struct file *, void *, filldir_t);
++static struct dentry *squashfs_lookup(struct inode *, struct dentry *,
++ struct nameidata *);
++static int squashfs_remount(struct super_block *s, int *flags, char *data);
++static void squashfs_put_super(struct super_block *);
++static int squashfs_get_sb(struct file_system_type *,int, const char *, void *,
++ struct vfsmount *);
++static struct inode *squashfs_alloc_inode(struct super_block *sb);
++static void squashfs_destroy_inode(struct inode *inode);
++static int init_inodecache(void);
++static void destroy_inodecache(void);
++
++static struct file_system_type squashfs_fs_type = {
++ .owner = THIS_MODULE,
++ .name = "squashfs",
++ .get_sb = squashfs_get_sb,
++ .kill_sb = kill_block_super,
++ .fs_flags = FS_REQUIRES_DEV
++};
++
++static const unsigned char squashfs_filetype_table[] = {
++ DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK
++};
++
++static struct super_operations squashfs_super_ops = {
++ .alloc_inode = squashfs_alloc_inode,
++ .destroy_inode = squashfs_destroy_inode,
++ .statfs = squashfs_statfs,
++ .put_super = squashfs_put_super,
++ .remount_fs = squashfs_remount
++};
++
++static struct super_operations squashfs_export_super_ops = {
++ .alloc_inode = squashfs_alloc_inode,
++ .destroy_inode = squashfs_destroy_inode,
++ .statfs = squashfs_statfs,
++ .put_super = squashfs_put_super,
++ .read_inode = vfs_read_inode
++};
++
++static struct export_operations squashfs_export_ops = {
++ .get_parent = squashfs_get_parent
++};
++
++SQSH_EXTERN const struct address_space_operations squashfs_symlink_aops = {
++ .readpage = squashfs_symlink_readpage
++};
++
++SQSH_EXTERN const struct address_space_operations squashfs_aops = {
++ .readpage = squashfs_readpage
++};
++
++static const struct file_operations squashfs_dir_ops = {
++ .read = generic_read_dir,
++ .readdir = squashfs_readdir
++};
++
++SQSH_EXTERN struct inode_operations squashfs_dir_inode_ops = {
++ .lookup = squashfs_lookup
++};
++
++
++static struct buffer_head *get_block_length(struct super_block *s,
++ int *cur_index, int *offset, int *c_byte)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ unsigned short temp;
++ struct buffer_head *bh;
++
++ if (!(bh = sb_bread(s, *cur_index)))
++ goto out;
++
++ if (msblk->devblksize - *offset == 1) {
++ if (msblk->swap)
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ (bh->b_data + *offset));
++ else
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ (bh->b_data + *offset));
++ brelse(bh);
++ if (!(bh = sb_bread(s, ++(*cur_index))))
++ goto out;
++ if (msblk->swap)
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ bh->b_data);
++ else
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ bh->b_data);
++ *c_byte = temp;
++ *offset = 1;
++ } else {
++ if (msblk->swap) {
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ (bh->b_data + *offset));
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ (bh->b_data + *offset + 1));
++ } else {
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ (bh->b_data + *offset));
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ (bh->b_data + *offset + 1));
++ }
++ *c_byte = temp;
++ *offset += 2;
++ }
++
++ if (SQUASHFS_CHECK_DATA(msblk->sblk.flags)) {
++ if (*offset == msblk->devblksize) {
++ brelse(bh);
++ if (!(bh = sb_bread(s, ++(*cur_index))))
++ goto out;
++ *offset = 0;
++ }
++ if (*((unsigned char *) (bh->b_data + *offset)) !=
++ SQUASHFS_MARKER_BYTE) {
++ ERROR("Metadata block marker corrupt @ %x\n",
++ *cur_index);
++ brelse(bh);
++ goto out;
++ }
++ (*offset)++;
++ }
++ return bh;
++
++out:
++ return NULL;
++}
++
++
++SQSH_EXTERN unsigned int squashfs_read_data(struct super_block *s, char *buffer,
++ long long index, unsigned int length,
++ long long *next_index, int srclength)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ struct buffer_head **bh;
++ unsigned int offset = index & ((1 << msblk->devblksize_log2) - 1);
++ unsigned int cur_index = index >> msblk->devblksize_log2;
++ int bytes, avail_bytes, b = 0, k = 0;
++ unsigned int compressed;
++ unsigned int c_byte = length;
++
++ bh = kmalloc(((sblk->block_size >> msblk->devblksize_log2) + 1) *
++ sizeof(struct buffer_head *), GFP_KERNEL);
++ if (bh == NULL)
++ goto read_failure;
++
++ if (c_byte) {
++ bytes = msblk->devblksize - offset;
++ compressed = SQUASHFS_COMPRESSED_BLOCK(c_byte);
++ c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(c_byte);
++
++ TRACE("Block @ 0x%llx, %scompressed size %d, src size %d\n", index,
++ compressed ? "" : "un", (unsigned int) c_byte, srclength);
++
++ if (c_byte > srclength || index < 0 || (index + c_byte) > sblk->bytes_used)
++ goto read_failure;
++
++ bh[0] = sb_getblk(s, cur_index);
++ if (bh[0] == NULL)
++ goto block_release;
++
++ for (b = 1; bytes < c_byte; b++) {
++ bh[b] = sb_getblk(s, ++cur_index);
++ if (bh[b] == NULL)
++ goto block_release;
++ bytes += msblk->devblksize;
++ }
++ ll_rw_block(READ, b, bh);
++ } else {
++ if (index < 0 || (index + 2) > sblk->bytes_used)
++ goto read_failure;
++
++ bh[0] = get_block_length(s, &cur_index, &offset, &c_byte);
++ if (bh[0] == NULL)
++ goto read_failure;
++
++ bytes = msblk->devblksize - offset;
++ compressed = SQUASHFS_COMPRESSED(c_byte);
++ c_byte = SQUASHFS_COMPRESSED_SIZE(c_byte);
++
++ TRACE("Block @ 0x%llx, %scompressed size %d\n", index, compressed
++ ? "" : "un", (unsigned int) c_byte);
++
++ if (c_byte > srclength || (index + c_byte) > sblk->bytes_used)
++ goto read_failure;
++
++ for (b = 1; bytes < c_byte; b++) {
++ bh[b] = sb_getblk(s, ++cur_index);
++ if (bh[b] == NULL)
++ goto block_release;
++ bytes += msblk->devblksize;
++ }
++ ll_rw_block(READ, b - 1, bh + 1);
++ }
++
++ if (compressed) {
++ int zlib_err = 0;
++
++ /*
++ * uncompress block
++ */
++
++ mutex_lock(&msblk->read_data_mutex);
++
++ msblk->stream.next_out = buffer;
++ msblk->stream.avail_out = srclength;
++
++ for (bytes = 0; k < b; k++) {
++ avail_bytes = min(c_byte - bytes, msblk->devblksize - offset);
++
++ wait_on_buffer(bh[k]);
++ if (!buffer_uptodate(bh[k]))
++ goto release_mutex;
++
++ msblk->stream.next_in = bh[k]->b_data + offset;
++ msblk->stream.avail_in = avail_bytes;
++
++ if (k == 0) {
++ zlib_err = zlib_inflateInit(&msblk->stream);
++ if (zlib_err != Z_OK) {
++ ERROR("zlib_inflateInit returned unexpected result 0x%x,"
++ " srclength %d\n", zlib_err, srclength);
++ goto release_mutex;
++ }
++
++ if (avail_bytes == 0) {
++ offset = 0;
++ brelse(bh[k]);
++ continue;
++ }
++ }
++
++ zlib_err = zlib_inflate(&msblk->stream, Z_NO_FLUSH);
++ if (zlib_err != Z_OK && zlib_err != Z_STREAM_END) {
++ ERROR("zlib_inflate returned unexpected result 0x%x,"
++ " srclength %d, avail_in %d, avail_out %d\n", zlib_err,
++ srclength, msblk->stream.avail_in, msblk->stream.avail_out);
++ goto release_mutex;
++ }
++
++ bytes += avail_bytes;
++ offset = 0;
++ brelse(bh[k]);
++ }
++
++ if (zlib_err != Z_STREAM_END)
++ goto release_mutex;
++
++ zlib_err = zlib_inflateEnd(&msblk->stream);
++ if (zlib_err != Z_OK) {
++ ERROR("zlib_inflateEnd returned unexpected result 0x%x,"
++ " srclength %d\n", zlib_err, srclength);
++ goto release_mutex;
++ }
++ bytes = msblk->stream.total_out;
++ mutex_unlock(&msblk->read_data_mutex);
++ } else {
++ int i;
++
++ for(i = 0; i < b; i++) {
++ wait_on_buffer(bh[i]);
++ if (!buffer_uptodate(bh[i]))
++ goto block_release;
++ }
++
++ for (bytes = 0; k < b; k++) {
++ avail_bytes = min(c_byte - bytes, msblk->devblksize - offset);
++
++ memcpy(buffer + bytes, bh[k]->b_data + offset, avail_bytes);
++ bytes += avail_bytes;
++ offset = 0;
++ brelse(bh[k]);
++ }
++ }
++
++ if (next_index)
++ *next_index = index + c_byte + (length ? 0 :
++ (SQUASHFS_CHECK_DATA(msblk->sblk.flags) ? 3 : 2));
++
++ kfree(bh);
++ return bytes;
++
++release_mutex:
++ mutex_unlock(&msblk->read_data_mutex);
++
++block_release:
++ for (; k < b; k++)
++ brelse(bh[k]);
++
++read_failure:
++ ERROR("sb_bread failed reading block 0x%x\n", cur_index);
++ kfree(bh);
++ return 0;
++}
++
++
++SQSH_EXTERN int squashfs_get_cached_block(struct super_block *s, void *buffer,
++ long long block, unsigned int offset,
++ int length, long long *next_block,
++ unsigned int *next_offset)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ int n, i, bytes, return_length = length;
++ long long next_index;
++
++ TRACE("Entered squashfs_get_cached_block [%llx:%x]\n", block, offset);
++
++ while (1) {
++ for (i = 0; i < squashfs_cached_blks; i++)
++ if (msblk->block_cache[i].block == block)
++ break;
++
++ mutex_lock(&msblk->block_cache_mutex);
++
++ if (i == squashfs_cached_blks) {
++ /* read inode header block */
++ if (msblk->unused_cache_blks == 0) {
++ mutex_unlock(&msblk->block_cache_mutex);
++ wait_event(msblk->waitq, msblk->unused_cache_blks);
++ continue;
++ }
++
++ i = msblk->next_cache;
++ for (n = 0; n < squashfs_cached_blks; n++) {
++ if (msblk->block_cache[i].block != SQUASHFS_USED_BLK)
++ break;
++ i = (i + 1) % squashfs_cached_blks;
++ }
++
++ msblk->next_cache = (i + 1) % squashfs_cached_blks;
++
++ if (msblk->block_cache[i].block == SQUASHFS_INVALID_BLK) {
++ msblk->block_cache[i].data = vmalloc(SQUASHFS_METADATA_SIZE);
++ if (msblk->block_cache[i].data == NULL) {
++ ERROR("Failed to allocate cache block\n");
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto out;
++ }
++ }
++
++ msblk->block_cache[i].block = SQUASHFS_USED_BLK;
++ msblk->unused_cache_blks --;
++ mutex_unlock(&msblk->block_cache_mutex);
++
++ msblk->block_cache[i].length = squashfs_read_data(s,
++ msblk->block_cache[i].data, block, 0, &next_index,
++ SQUASHFS_METADATA_SIZE);
++
++ if (msblk->block_cache[i].length == 0) {
++ ERROR("Unable to read cache block [%llx:%x]\n", block, offset);
++ mutex_lock(&msblk->block_cache_mutex);
++ msblk->block_cache[i].block = SQUASHFS_INVALID_BLK;
++ msblk->unused_cache_blks ++;
++ smp_mb();
++ vfree(msblk->block_cache[i].data);
++ wake_up(&msblk->waitq);
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto out;
++ }
++
++ mutex_lock(&msblk->block_cache_mutex);
++ msblk->block_cache[i].block = block;
++ msblk->block_cache[i].next_index = next_index;
++ msblk->unused_cache_blks ++;
++ smp_mb();
++ wake_up(&msblk->waitq);
++ TRACE("Read cache block [%llx:%x]\n", block, offset);
++ }
++
++ if (msblk->block_cache[i].block != block) {
++ mutex_unlock(&msblk->block_cache_mutex);
++ continue;
++ }
++
++ bytes = msblk->block_cache[i].length - offset;
++
++ if (bytes < 1) {
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto out;
++ } else if (bytes >= length) {
++ if (buffer)
++ memcpy(buffer, msblk->block_cache[i].data + offset, length);
++ if (msblk->block_cache[i].length - offset == length) {
++ *next_block = msblk->block_cache[i].next_index;
++ *next_offset = 0;
++ } else {
++ *next_block = block;
++ *next_offset = offset + length;
++ }
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto finish;
++ } else {
++ if (buffer) {
++ memcpy(buffer, msblk->block_cache[i].data + offset, bytes);
++ buffer = (char *) buffer + bytes;
++ }
++ block = msblk->block_cache[i].next_index;
++ mutex_unlock(&msblk->block_cache_mutex);
++ length -= bytes;
++ offset = 0;
++ }
++ }
++
++finish:
++ return return_length;
++out:
++ return 0;
++}
++
++
++static int get_fragment_location(struct super_block *s, unsigned int fragment,
++ long long *fragment_start_block,
++ unsigned int *fragment_size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ long long start_block =
++ msblk->fragment_index[SQUASHFS_FRAGMENT_INDEX(fragment)];
++ int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
++ struct squashfs_fragment_entry fragment_entry;
++
++ if (msblk->swap) {
++ struct squashfs_fragment_entry sfragment_entry;
++
++ if (!squashfs_get_cached_block(s, &sfragment_entry, start_block, offset,
++ sizeof(sfragment_entry), &start_block, &offset))
++ goto out;
++ SQUASHFS_SWAP_FRAGMENT_ENTRY(&fragment_entry, &sfragment_entry);
++ } else
++ if (!squashfs_get_cached_block(s, &fragment_entry, start_block, offset,
++ sizeof(fragment_entry), &start_block, &offset))
++ goto out;
++
++ *fragment_start_block = fragment_entry.start_block;
++ *fragment_size = fragment_entry.size;
++
++ return 1;
++
++out:
++ return 0;
++}
++
++
++SQSH_EXTERN void release_cached_fragment(struct squashfs_sb_info *msblk,
++ struct squashfs_fragment_cache *fragment)
++{
++ mutex_lock(&msblk->fragment_mutex);
++ fragment->locked --;
++ if (fragment->locked == 0) {
++ msblk->unused_frag_blks ++;
++ smp_mb();
++ wake_up(&msblk->fragment_wait_queue);
++ }
++ mutex_unlock(&msblk->fragment_mutex);
++}
++
++
++SQSH_EXTERN
++struct squashfs_fragment_cache *get_cached_fragment(struct super_block *s,
++ long long start_block, int length)
++{
++ int i, n;
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ while (1) {
++ mutex_lock(&msblk->fragment_mutex);
++
++ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS &&
++ msblk->fragment[i].block != start_block; i++);
++
++ if (i == SQUASHFS_CACHED_FRAGMENTS) {
++ if (msblk->unused_frag_blks == 0) {
++ mutex_unlock(&msblk->fragment_mutex);
++ wait_event(msblk->fragment_wait_queue, msblk->unused_frag_blks);
++ continue;
++ }
++
++ i = msblk->next_fragment;
++ for (n = 0; n < SQUASHFS_CACHED_FRAGMENTS; n++) {
++ if (msblk->fragment[i].locked == 0)
++ break;
++ i = (i + 1) % SQUASHFS_CACHED_FRAGMENTS;
++ }
++
++ msblk->next_fragment = (msblk->next_fragment + 1) %
++ SQUASHFS_CACHED_FRAGMENTS;
++
++ if (msblk->fragment[i].data == NULL) {
++ msblk->fragment[i].data = vmalloc(sblk->block_size);
++ if (msblk->fragment[i].data == NULL) {
++ ERROR("Failed to allocate fragment cache block\n");
++ mutex_unlock(&msblk->fragment_mutex);
++ goto out;
++ }
++ }
++
++ msblk->unused_frag_blks --;
++ msblk->fragment[i].block = SQUASHFS_INVALID_BLK;
++ msblk->fragment[i].locked = 1;
++ mutex_unlock(&msblk->fragment_mutex);
++
++ msblk->fragment[i].length = squashfs_read_data(s,
++ msblk->fragment[i].data, start_block, length, NULL,
++ sblk->block_size);
++
++ if (msblk->fragment[i].length == 0) {
++ ERROR("Unable to read fragment cache block [%llx]\n", start_block);
++ msblk->fragment[i].locked = 0;
++ msblk->unused_frag_blks ++;
++ smp_mb();
++ wake_up(&msblk->fragment_wait_queue);
++ goto out;
++ }
++
++ mutex_lock(&msblk->fragment_mutex);
++ msblk->fragment[i].block = start_block;
++ TRACE("New fragment %d, start block %lld, locked %d\n",
++ i, msblk->fragment[i].block, msblk->fragment[i].locked);
++ mutex_unlock(&msblk->fragment_mutex);
++ break;
++ }
++
++ if (msblk->fragment[i].locked == 0)
++ msblk->unused_frag_blks --;
++ msblk->fragment[i].locked++;
++ mutex_unlock(&msblk->fragment_mutex);
++ TRACE("Got fragment %d, start block %lld, locked %d\n", i,
++ msblk->fragment[i].block, msblk->fragment[i].locked);
++ break;
++ }
++
++ return &msblk->fragment[i];
++
++out:
++ return NULL;
++}
++
++
++static void squashfs_new_inode(struct squashfs_sb_info *msblk, struct inode *i,
++ struct squashfs_base_inode_header *inodeb)
++{
++ i->i_ino = inodeb->inode_number;
++ i->i_mtime.tv_sec = inodeb->mtime;
++ i->i_atime.tv_sec = inodeb->mtime;
++ i->i_ctime.tv_sec = inodeb->mtime;
++ i->i_uid = msblk->uid[inodeb->uid];
++ i->i_mode = inodeb->mode;
++ i->i_size = 0;
++
++ if (inodeb->guid == SQUASHFS_GUIDS)
++ i->i_gid = i->i_uid;
++ else
++ i->i_gid = msblk->guid[inodeb->guid];
++}
++
++
++static squashfs_inode_t squashfs_inode_lookup(struct super_block *s, int ino)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ long long start = msblk->inode_lookup_table[SQUASHFS_LOOKUP_BLOCK(ino - 1)];
++ int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino - 1);
++ squashfs_inode_t inode;
++
++ TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino);
++
++ if (msblk->swap) {
++ squashfs_inode_t sinode;
++
++ if (!squashfs_get_cached_block(s, &sinode, start, offset,
++ sizeof(sinode), &start, &offset))
++ goto out;
++ SQUASHFS_SWAP_INODE_T((&inode), &sinode);
++ } else if (!squashfs_get_cached_block(s, &inode, start, offset,
++ sizeof(inode), &start, &offset))
++ goto out;
++
++ TRACE("squashfs_inode_lookup, inode = 0x%llx\n", inode);
++
++ return inode;
++
++out:
++ return SQUASHFS_INVALID_BLK;
++}
++
++
++static void vfs_read_inode(struct inode *i)
++{
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, i->i_ino);
++
++ TRACE("Entered vfs_read_inode\n");
++
++ if(inode != SQUASHFS_INVALID_BLK)
++ (msblk->read_inode)(i, inode);
++}
++
++
++static struct dentry *squashfs_get_parent(struct dentry *child)
++{
++ struct inode *i = child->d_inode;
++ struct inode *parent = iget(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode);
++ struct dentry *rv;
++
++ TRACE("Entered squashfs_get_parent\n");
++
++ if(parent == NULL) {
++ rv = ERR_PTR(-EACCES);
++ goto out;
++ }
++
++ rv = d_alloc_anon(parent);
++ if(rv == NULL)
++ rv = ERR_PTR(-ENOMEM);
++
++out:
++ return rv;
++}
++
++
++SQSH_EXTERN struct inode *squashfs_iget(struct super_block *s,
++ squashfs_inode_t inode, unsigned int inode_number)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct inode *i = iget_locked(s, inode_number);
++
++ TRACE("Entered squashfs_iget\n");
++
++ if(i && (i->i_state & I_NEW)) {
++ (msblk->read_inode)(i, inode);
++ unlock_new_inode(i);
++ }
++
++ return i;
++}
++
++
++static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode)
++{
++ struct super_block *s = i->i_sb;
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long block = SQUASHFS_INODE_BLK(inode) + sblk->inode_table_start;
++ unsigned int offset = SQUASHFS_INODE_OFFSET(inode);
++ long long next_block;
++ unsigned int next_offset;
++ union squashfs_inode_header id, sid;
++ struct squashfs_base_inode_header *inodeb = &id.base, *sinodeb = &sid.base;
++
++ TRACE("Entered squashfs_read_inode\n");
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodeb, block, offset,
++ sizeof(*sinodeb), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_BASE_INODE_HEADER(inodeb, sinodeb, sizeof(*sinodeb));
++ } else
++ if (!squashfs_get_cached_block(s, inodeb, block, offset,
++ sizeof(*inodeb), &next_block, &next_offset))
++ goto failed_read;
++
++ squashfs_new_inode(msblk, i, inodeb);
++
++ switch(inodeb->inode_type) {
++ case SQUASHFS_FILE_TYPE: {
++ unsigned int frag_size;
++ long long frag_blk;
++ struct squashfs_reg_inode_header *inodep = &id.reg;
++ struct squashfs_reg_inode_header *sinodep = &sid.reg;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_REG_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ frag_blk = SQUASHFS_INVALID_BLK;
++
++ if (inodep->fragment != SQUASHFS_INVALID_FRAG)
++ if(!get_fragment_location(s, inodep->fragment, &frag_blk,
++ &frag_size))
++ goto failed_read;
++
++ i->i_nlink = 1;
++ i->i_size = inodep->file_size;
++ i->i_fop = &generic_ro_fops;
++ i->i_mode |= S_IFREG;
++ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
++ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
++ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->u.s1.block_list_start = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++ i->i_data.a_ops = &squashfs_aops;
++
++ TRACE("File inode %x:%x, start_block %llx, "
++ "block_list_start %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, next_block,
++ next_offset);
++ break;
++ }
++ case SQUASHFS_LREG_TYPE: {
++ unsigned int frag_size;
++ long long frag_blk;
++ struct squashfs_lreg_inode_header *inodep = &id.lreg;
++ struct squashfs_lreg_inode_header *sinodep = &sid.lreg;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_LREG_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ frag_blk = SQUASHFS_INVALID_BLK;
++
++ if (inodep->fragment != SQUASHFS_INVALID_FRAG)
++ if (!get_fragment_location(s, inodep->fragment, &frag_blk,
++ &frag_size))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->file_size;
++ i->i_fop = &generic_ro_fops;
++ i->i_mode |= S_IFREG;
++ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
++ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
++ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->u.s1.block_list_start = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++ i->i_data.a_ops = &squashfs_aops;
++
++ TRACE("File inode %x:%x, start_block %llx, "
++ "block_list_start %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, next_block,
++ next_offset);
++ break;
++ }
++ case SQUASHFS_DIR_TYPE: {
++ struct squashfs_dir_inode_header *inodep = &id.dir;
++ struct squashfs_dir_inode_header *sinodep = &sid.dir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DIR_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops;
++ i->i_fop = &squashfs_dir_ops;
++ i->i_mode |= S_IFDIR;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count = 0;
++ SQUASHFS_I(i)->u.s2.parent_inode = inodep->parent_inode;
++
++ TRACE("Directory inode %x:%x, start_block %x, offset "
++ "%x\n", SQUASHFS_INODE_BLK(inode),
++ offset, inodep->start_block,
++ inodep->offset);
++ break;
++ }
++ case SQUASHFS_LDIR_TYPE: {
++ struct squashfs_ldir_inode_header *inodep = &id.ldir;
++ struct squashfs_ldir_inode_header *sinodep = &sid.ldir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_LDIR_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops;
++ i->i_fop = &squashfs_dir_ops;
++ i->i_mode |= S_IFDIR;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_start = next_block;
++ SQUASHFS_I(i)->u.s2.directory_index_offset = next_offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count = inodep->i_count;
++ SQUASHFS_I(i)->u.s2.parent_inode = inodep->parent_inode;
++
++ TRACE("Long directory inode %x:%x, start_block %x, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, inodep->offset);
++ break;
++ }
++ case SQUASHFS_SYMLINK_TYPE: {
++ struct squashfs_symlink_inode_header *inodep = &id.symlink;
++ struct squashfs_symlink_inode_header *sinodep = &sid.symlink;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_SYMLINK_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->symlink_size;
++ i->i_op = &page_symlink_inode_operations;
++ i->i_data.a_ops = &squashfs_symlink_aops;
++ i->i_mode |= S_IFLNK;
++ SQUASHFS_I(i)->start_block = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++
++ TRACE("Symbolic link inode %x:%x, start_block %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ next_block, next_offset);
++ break;
++ }
++ case SQUASHFS_BLKDEV_TYPE:
++ case SQUASHFS_CHRDEV_TYPE: {
++ struct squashfs_dev_inode_header *inodep = &id.dev;
++ struct squashfs_dev_inode_header *sinodep = &sid.dev;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DEV_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_mode |= (inodeb->inode_type == SQUASHFS_CHRDEV_TYPE) ?
++ S_IFCHR : S_IFBLK;
++ init_special_inode(i, i->i_mode, old_decode_dev(inodep->rdev));
++
++ TRACE("Device inode %x:%x, rdev %x\n",
++ SQUASHFS_INODE_BLK(inode), offset, inodep->rdev);
++ break;
++ }
++ case SQUASHFS_FIFO_TYPE:
++ case SQUASHFS_SOCKET_TYPE: {
++ struct squashfs_ipc_inode_header *inodep = &id.ipc;
++ struct squashfs_ipc_inode_header *sinodep = &sid.ipc;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, sinodep, block, offset,
++ sizeof(*sinodep), &next_block, &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_IPC_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, inodep, block, offset,
++ sizeof(*inodep), &next_block, &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_mode |= (inodeb->inode_type == SQUASHFS_FIFO_TYPE)
++ ? S_IFIFO : S_IFSOCK;
++ init_special_inode(i, i->i_mode, 0);
++ break;
++ }
++ default:
++ ERROR("Unknown inode type %d in squashfs_iget!\n",
++ inodeb->inode_type);
++ goto failed_read1;
++ }
++
++ return 1;
++
++failed_read:
++ ERROR("Unable to read inode [%llx:%x]\n", block, offset);
++
++failed_read1:
++ make_bad_inode(i);
++ return 0;
++}
++
++
++static int read_inode_lookup_table(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned int length = SQUASHFS_LOOKUP_BLOCK_BYTES(sblk->inodes);
++
++ TRACE("In read_inode_lookup_table, length %d\n", length);
++
++ /* Allocate inode lookup table */
++ msblk->inode_lookup_table = kmalloc(length, GFP_KERNEL);
++ if (msblk->inode_lookup_table == NULL) {
++ ERROR("Failed to allocate inode lookup table\n");
++ return 0;
++ }
++
++ if (!squashfs_read_data(s, (char *) msblk->inode_lookup_table,
++ sblk->lookup_table_start, length |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length)) {
++ ERROR("unable to read inode lookup table\n");
++ return 0;
++ }
++
++ if (msblk->swap) {
++ int i;
++ long long block;
++
++ for (i = 0; i < SQUASHFS_LOOKUP_BLOCKS(sblk->inodes); i++) {
++ /* XXX */
++ SQUASHFS_SWAP_LOOKUP_BLOCKS((&block),
++ &msblk->inode_lookup_table[i], 1);
++ msblk->inode_lookup_table[i] = block;
++ }
++ }
++
++ return 1;
++}
++
++
++static int read_fragment_index_table(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned int length = SQUASHFS_FRAGMENT_INDEX_BYTES(sblk->fragments);
++
++ if(length == 0)
++ return 1;
++
++ /* Allocate fragment index table */
++ msblk->fragment_index = kmalloc(length, GFP_KERNEL);
++ if (msblk->fragment_index == NULL) {
++ ERROR("Failed to allocate fragment index table\n");
++ return 0;
++ }
++
++ if (!squashfs_read_data(s, (char *) msblk->fragment_index,
++ sblk->fragment_table_start, length |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length)) {
++ ERROR("unable to read fragment index table\n");
++ return 0;
++ }
++
++ if (msblk->swap) {
++ int i;
++ long long fragment;
++
++ for (i = 0; i < SQUASHFS_FRAGMENT_INDEXES(sblk->fragments); i++) {
++ /* XXX */
++ SQUASHFS_SWAP_FRAGMENT_INDEXES((&fragment),
++ &msblk->fragment_index[i], 1);
++ msblk->fragment_index[i] = fragment;
++ }
++ }
++
++ return 1;
++}
++
++
++static int readahead_metadata(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ int i;
++
++ squashfs_cached_blks = SQUASHFS_CACHED_BLKS;
++
++ /* Init inode_table block pointer array */
++ msblk->block_cache = kmalloc(sizeof(struct squashfs_cache) *
++ squashfs_cached_blks, GFP_KERNEL);
++ if (msblk->block_cache == NULL) {
++ ERROR("Failed to allocate block cache\n");
++ goto failed;
++ }
++
++ for (i = 0; i < squashfs_cached_blks; i++)
++ msblk->block_cache[i].block = SQUASHFS_INVALID_BLK;
++
++ msblk->next_cache = 0;
++ msblk->unused_cache_blks = squashfs_cached_blks;
++
++ return 1;
++
++failed:
++ return 0;
++}
++
++
++static int supported_squashfs_filesystem(struct squashfs_sb_info *msblk, int silent)
++{
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ msblk->read_inode = squashfs_read_inode;
++ msblk->read_blocklist = read_blocklist;
++ msblk->read_fragment_index_table = read_fragment_index_table;
++
++ if (sblk->s_major == 1) {
++ if (!squashfs_1_0_supported(msblk)) {
++ SERROR("Major/Minor mismatch, Squashfs 1.0 filesystems "
++ "are unsupported\n");
++ SERROR("Please recompile with Squashfs 1.0 support enabled\n");
++ return 0;
++ }
++ } else if (sblk->s_major == 2) {
++ if (!squashfs_2_0_supported(msblk)) {
++ SERROR("Major/Minor mismatch, Squashfs 2.0 filesystems "
++ "are unsupported\n");
++ SERROR("Please recompile with Squashfs 2.0 support enabled\n");
++ return 0;
++ }
++ } else if(sblk->s_major != SQUASHFS_MAJOR || sblk->s_minor >
++ SQUASHFS_MINOR) {
++ SERROR("Major/Minor mismatch, trying to mount newer %d.%d "
++ "filesystem\n", sblk->s_major, sblk->s_minor);
++ SERROR("Please update your kernel\n");
++ return 0;
++ }
++
++ return 1;
++}
++
++
++static int squashfs_fill_super(struct super_block *s, void *data, int silent)
++{
++ struct squashfs_sb_info *msblk;
++ struct squashfs_super_block *sblk;
++ int i;
++ char b[BDEVNAME_SIZE];
++ struct inode *root;
++
++ TRACE("Entered squashfs_fill_superblock\n");
++
++ s->s_fs_info = kzalloc(sizeof(struct squashfs_sb_info), GFP_KERNEL);
++ if (s->s_fs_info == NULL) {
++ ERROR("Failed to allocate superblock\n");
++ goto failure;
++ }
++ msblk = s->s_fs_info;
++
++ msblk->stream.workspace = vmalloc(zlib_inflate_workspacesize());
++ if (msblk->stream.workspace == NULL) {
++ ERROR("Failed to allocate zlib workspace\n");
++ goto failure;
++ }
++ sblk = &msblk->sblk;
++
++ msblk->devblksize = sb_min_blocksize(s, BLOCK_SIZE);
++ msblk->devblksize_log2 = ffz(~msblk->devblksize);
++
++ mutex_init(&msblk->read_data_mutex);
++ mutex_init(&msblk->read_page_mutex);
++ mutex_init(&msblk->block_cache_mutex);
++ mutex_init(&msblk->fragment_mutex);
++ mutex_init(&msblk->meta_index_mutex);
++
++ init_waitqueue_head(&msblk->waitq);
++ init_waitqueue_head(&msblk->fragment_wait_queue);
++
++ /* sblk->bytes_used is checked in squashfs_read_data to ensure reads are not
++ * beyond filesystem end. As we're using squashfs_read_data to read sblk here,
++ * first set sblk->bytes_used to a useful value */
++ sblk->bytes_used = sizeof(struct squashfs_super_block);
++ if (!squashfs_read_data(s, (char *) sblk, SQUASHFS_START,
++ sizeof(struct squashfs_super_block) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, sizeof(struct squashfs_super_block))) {
++ SERROR("unable to read superblock\n");
++ goto failed_mount;
++ }
++
++ /* Check it is a SQUASHFS superblock */
++ if ((s->s_magic = sblk->s_magic) != SQUASHFS_MAGIC) {
++ if (sblk->s_magic == SQUASHFS_MAGIC_SWAP) {
++ struct squashfs_super_block ssblk;
++
++ WARNING("Mounting a different endian SQUASHFS filesystem on %s\n",
++ bdevname(s->s_bdev, b));
++
++ SQUASHFS_SWAP_SUPER_BLOCK(&ssblk, sblk);
++ memcpy(sblk, &ssblk, sizeof(struct squashfs_super_block));
++ msblk->swap = 1;
++ } else {
++ SERROR("Can't find a SQUASHFS superblock on %s\n",
++ bdevname(s->s_bdev, b));
++ goto failed_mount;
++ }
++ }
++
++ /* Check the MAJOR & MINOR versions */
++ if(!supported_squashfs_filesystem(msblk, silent))
++ goto failed_mount;
++
++ /* Check the filesystem does not extend beyond the end of the
++ block device */
++ if(sblk->bytes_used < 0 || sblk->bytes_used > i_size_read(s->s_bdev->bd_inode))
++ goto failed_mount;
++
++ /* Check the root inode for sanity */
++ if (SQUASHFS_INODE_OFFSET(sblk->root_inode) > SQUASHFS_METADATA_SIZE)
++ goto failed_mount;
++
++ TRACE("Found valid superblock on %s\n", bdevname(s->s_bdev, b));
++ TRACE("Inodes are %scompressed\n", SQUASHFS_UNCOMPRESSED_INODES(sblk->flags)
++ ? "un" : "");
++ TRACE("Data is %scompressed\n", SQUASHFS_UNCOMPRESSED_DATA(sblk->flags)
++ ? "un" : "");
++ TRACE("Check data is %spresent in the filesystem\n",
++ SQUASHFS_CHECK_DATA(sblk->flags) ? "" : "not ");
++ TRACE("Filesystem size %lld bytes\n", sblk->bytes_used);
++ TRACE("Block size %d\n", sblk->block_size);
++ TRACE("Number of inodes %d\n", sblk->inodes);
++ if (sblk->s_major > 1)
++ TRACE("Number of fragments %d\n", sblk->fragments);
++ TRACE("Number of uids %d\n", sblk->no_uids);
++ TRACE("Number of gids %d\n", sblk->no_guids);
++ TRACE("sblk->inode_table_start %llx\n", sblk->inode_table_start);
++ TRACE("sblk->directory_table_start %llx\n", sblk->directory_table_start);
++ if (sblk->s_major > 1)
++ TRACE("sblk->fragment_table_start %llx\n", sblk->fragment_table_start);
++ TRACE("sblk->uid_start %llx\n", sblk->uid_start);
++
++ s->s_maxbytes = MAX_LFS_FILESIZE;
++ s->s_flags |= MS_RDONLY;
++ s->s_op = &squashfs_super_ops;
++
++ if (readahead_metadata(s) == 0)
++ goto failed_mount;
++
++ /* Allocate read_page block */
++ msblk->read_page = vmalloc(sblk->block_size);
++ if (msblk->read_page == NULL) {
++ ERROR("Failed to allocate read_page block\n");
++ goto failed_mount;
++ }
++
++ /* Allocate uid and gid tables */
++ msblk->uid = kmalloc((sblk->no_uids + sblk->no_guids) *
++ sizeof(unsigned int), GFP_KERNEL);
++ if (msblk->uid == NULL) {
++ ERROR("Failed to allocate uid/gid table\n");
++ goto failed_mount;
++ }
++ msblk->guid = msblk->uid + sblk->no_uids;
++
++ if (msblk->swap) {
++ unsigned int suid[sblk->no_uids + sblk->no_guids];
++
++ if (!squashfs_read_data(s, (char *) &suid, sblk->uid_start,
++ ((sblk->no_uids + sblk->no_guids) *
++ sizeof(unsigned int)) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, (sblk->no_uids + sblk->no_guids) * sizeof(unsigned int))) {
++ ERROR("unable to read uid/gid table\n");
++ goto failed_mount;
++ }
++
++ SQUASHFS_SWAP_DATA(msblk->uid, suid, (sblk->no_uids +
++ sblk->no_guids), (sizeof(unsigned int) * 8));
++ } else
++ if (!squashfs_read_data(s, (char *) msblk->uid, sblk->uid_start,
++ ((sblk->no_uids + sblk->no_guids) *
++ sizeof(unsigned int)) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, (sblk->no_uids + sblk->no_guids) * sizeof(unsigned int))) {
++ ERROR("unable to read uid/gid table\n");
++ goto failed_mount;
++ }
++
++
++ if (sblk->s_major == 1 && squashfs_1_0_supported(msblk))
++ goto allocate_root;
++
++ msblk->fragment = kzalloc(sizeof(struct squashfs_fragment_cache) *
++ SQUASHFS_CACHED_FRAGMENTS, GFP_KERNEL);
++ if (msblk->fragment == NULL) {
++ ERROR("Failed to allocate fragment block cache\n");
++ goto failed_mount;
++ }
++
++ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) {
++ msblk->fragment[i].block = SQUASHFS_INVALID_BLK;
++ }
++
++ msblk->next_fragment = 0;
++ msblk->unused_frag_blks = SQUASHFS_CACHED_FRAGMENTS;
++
++ /* Allocate and read fragment index table */
++ if (msblk->read_fragment_index_table(s) == 0)
++ goto failed_mount;
++
++ if(sblk->s_major < 3 || sblk->lookup_table_start == SQUASHFS_INVALID_BLK)
++ goto allocate_root;
++
++ /* Allocate and read inode lookup table */
++ if (read_inode_lookup_table(s) == 0)
++ goto failed_mount;
++
++ s->s_op = &squashfs_export_super_ops;
++ s->s_export_op = &squashfs_export_ops;
++
++allocate_root:
++ root = new_inode(s);
++ if ((msblk->read_inode)(root, sblk->root_inode) == 0)
++ goto failed_mount;
++ insert_inode_hash(root);
++
++ s->s_root = d_alloc_root(root);
++ if (s->s_root == NULL) {
++ ERROR("Root inode create failed\n");
++ iput(root);
++ goto failed_mount;
++ }
++
++ TRACE("Leaving squashfs_fill_super\n");
++ return 0;
++
++failed_mount:
++ kfree(msblk->inode_lookup_table);
++ kfree(msblk->fragment_index);
++ kfree(msblk->fragment);
++ kfree(msblk->uid);
++ vfree(msblk->read_page);
++ kfree(msblk->block_cache);
++ kfree(msblk->fragment_index_2);
++ vfree(msblk->stream.workspace);
++ kfree(s->s_fs_info);
++ s->s_fs_info = NULL;
++ return -EINVAL;
++
++failure:
++ return -ENOMEM;
++}
++
++
++static int squashfs_statfs(struct dentry *dentry, struct kstatfs *buf)
++{
++ struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ TRACE("Entered squashfs_statfs\n");
++
++ buf->f_type = SQUASHFS_MAGIC;
++ buf->f_bsize = sblk->block_size;
++ buf->f_blocks = ((sblk->bytes_used - 1) >> sblk->block_log) + 1;
++ buf->f_bfree = buf->f_bavail = 0;
++ buf->f_files = sblk->inodes;
++ buf->f_ffree = 0;
++ buf->f_namelen = SQUASHFS_NAME_LEN;
++
++ return 0;
++}
++
++
++static int squashfs_symlink_readpage(struct file *file, struct page *page)
++{
++ struct inode *inode = page->mapping->host;
++ int index = page->index << PAGE_CACHE_SHIFT, length, bytes, avail_bytes;
++ long long block = SQUASHFS_I(inode)->start_block;
++ int offset = SQUASHFS_I(inode)->offset;
++ void *pageaddr = kmap(page);
++
++ TRACE("Entered squashfs_symlink_readpage, page index %ld, start block "
++ "%llx, offset %x\n", page->index,
++ SQUASHFS_I(inode)->start_block,
++ SQUASHFS_I(inode)->offset);
++
++ for (length = 0; length < index; length += bytes) {
++ bytes = squashfs_get_cached_block(inode->i_sb, NULL, block,
++ offset, PAGE_CACHE_SIZE, &block, &offset);
++ if (bytes == 0) {
++ ERROR("Unable to read symbolic link [%llx:%x]\n", block, offset);
++ goto skip_read;
++ }
++ }
++
++ if (length != index) {
++ ERROR("(squashfs_symlink_readpage) length != index\n");
++ bytes = 0;
++ goto skip_read;
++ }
++
++ avail_bytes = min_t(int, i_size_read(inode) - length, PAGE_CACHE_SIZE);
++
++ bytes = squashfs_get_cached_block(inode->i_sb, pageaddr, block, offset,
++ avail_bytes, &block, &offset);
++ if (bytes == 0)
++ ERROR("Unable to read symbolic link [%llx:%x]\n", block, offset);
++
++skip_read:
++ memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++ kunmap(page);
++ flush_dcache_page(page);
++ SetPageUptodate(page);
++ unlock_page(page);
++
++ return 0;
++}
++
++
++struct meta_index *locate_meta_index(struct inode *inode, int index, int offset)
++{
++ struct meta_index *meta = NULL;
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ int i;
++
++ mutex_lock(&msblk->meta_index_mutex);
++
++ TRACE("locate_meta_index: index %d, offset %d\n", index, offset);
++
++ if (msblk->meta_index == NULL)
++ goto not_allocated;
++
++ for (i = 0; i < SQUASHFS_META_NUMBER; i ++) {
++ if (msblk->meta_index[i].inode_number == inode->i_ino &&
++ msblk->meta_index[i].offset >= offset &&
++ msblk->meta_index[i].offset <= index &&
++ msblk->meta_index[i].locked == 0) {
++ TRACE("locate_meta_index: entry %d, offset %d\n", i,
++ msblk->meta_index[i].offset);
++ meta = &msblk->meta_index[i];
++ offset = meta->offset;
++ }
++ }
++
++ if (meta)
++ meta->locked = 1;
++
++not_allocated:
++ mutex_unlock(&msblk->meta_index_mutex);
++
++ return meta;
++}
++
++
++struct meta_index *empty_meta_index(struct inode *inode, int offset, int skip)
++{
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct meta_index *meta = NULL;
++ int i;
++
++ mutex_lock(&msblk->meta_index_mutex);
++
++ TRACE("empty_meta_index: offset %d, skip %d\n", offset, skip);
++
++ if (msblk->meta_index == NULL) {
++ msblk->meta_index = kmalloc(sizeof(struct meta_index) *
++ SQUASHFS_META_NUMBER, GFP_KERNEL);
++ if (msblk->meta_index == NULL) {
++ ERROR("Failed to allocate meta_index\n");
++ goto failed;
++ }
++ for (i = 0; i < SQUASHFS_META_NUMBER; i++) {
++ msblk->meta_index[i].inode_number = 0;
++ msblk->meta_index[i].locked = 0;
++ }
++ msblk->next_meta_index = 0;
++ }
++
++ for (i = SQUASHFS_META_NUMBER; i &&
++ msblk->meta_index[msblk->next_meta_index].locked; i --)
++ msblk->next_meta_index = (msblk->next_meta_index + 1) %
++ SQUASHFS_META_NUMBER;
++
++ if (i == 0) {
++ TRACE("empty_meta_index: failed!\n");
++ goto failed;
++ }
++
++ TRACE("empty_meta_index: returned meta entry %d, %p\n",
++ msblk->next_meta_index,
++ &msblk->meta_index[msblk->next_meta_index]);
++
++ meta = &msblk->meta_index[msblk->next_meta_index];
++ msblk->next_meta_index = (msblk->next_meta_index + 1) %
++ SQUASHFS_META_NUMBER;
++
++ meta->inode_number = inode->i_ino;
++ meta->offset = offset;
++ meta->skip = skip;
++ meta->entries = 0;
++ meta->locked = 1;
++
++failed:
++ mutex_unlock(&msblk->meta_index_mutex);
++ return meta;
++}
++
++
++void release_meta_index(struct inode *inode, struct meta_index *meta)
++{
++ meta->locked = 0;
++ smp_mb();
++}
++
++
++static int read_block_index(struct super_block *s, int blocks, char *block_list,
++ long long *start_block, int *offset)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ unsigned int *block_listp;
++ int block = 0;
++
++ if (msblk->swap) {
++ char sblock_list[blocks << 2];
++
++ if (!squashfs_get_cached_block(s, sblock_list, *start_block,
++ *offset, blocks << 2, start_block, offset)) {
++ ERROR("Fail reading block list [%llx:%x]\n", *start_block, *offset);
++ goto failure;
++ }
++ SQUASHFS_SWAP_INTS(((unsigned int *)block_list),
++ ((unsigned int *)sblock_list), blocks);
++ } else {
++ if (!squashfs_get_cached_block(s, block_list, *start_block,
++ *offset, blocks << 2, start_block, offset)) {
++ ERROR("Fail reading block list [%llx:%x]\n", *start_block, *offset);
++ goto failure;
++ }
++ }
++
++ for (block_listp = (unsigned int *) block_list; blocks;
++ block_listp++, blocks --)
++ block += SQUASHFS_COMPRESSED_SIZE_BLOCK(*block_listp);
++
++ return block;
++
++failure:
++ return -1;
++}
++
++
++#define SIZE 256
++
++static inline int calculate_skip(int blocks) {
++ int skip = (blocks - 1) / ((SQUASHFS_SLOTS * SQUASHFS_META_ENTRIES + 1) * SQUASHFS_META_INDEXES);
++ return skip >= 7 ? 7 : skip + 1;
++}
++
++
++static int get_meta_index(struct inode *inode, int index,
++ long long *index_block, int *index_offset,
++ long long *data_block, char *block_list)
++{
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int skip = calculate_skip(i_size_read(inode) >> sblk->block_log);
++ int offset = 0;
++ struct meta_index *meta;
++ struct meta_entry *meta_entry;
++ long long cur_index_block = SQUASHFS_I(inode)->u.s1.block_list_start;
++ int cur_offset = SQUASHFS_I(inode)->offset;
++ long long cur_data_block = SQUASHFS_I(inode)->start_block;
++ int i;
++
++ index /= SQUASHFS_META_INDEXES * skip;
++
++ while (offset < index) {
++ meta = locate_meta_index(inode, index, offset + 1);
++
++ if (meta == NULL) {
++ meta = empty_meta_index(inode, offset + 1, skip);
++ if (meta == NULL)
++ goto all_done;
++ } else {
++ if(meta->entries == 0)
++ goto failed;
++ /* XXX */
++ offset = index < meta->offset + meta->entries ? index :
++ meta->offset + meta->entries - 1;
++ /* XXX */
++ meta_entry = &meta->meta_entry[offset - meta->offset];
++ cur_index_block = meta_entry->index_block + sblk->inode_table_start;
++ cur_offset = meta_entry->offset;
++ cur_data_block = meta_entry->data_block;
++ TRACE("get_meta_index: offset %d, meta->offset %d, "
++ "meta->entries %d\n", offset, meta->offset, meta->entries);
++ TRACE("get_meta_index: index_block 0x%llx, offset 0x%x"
++ " data_block 0x%llx\n", cur_index_block,
++ cur_offset, cur_data_block);
++ }
++
++ for (i = meta->offset + meta->entries; i <= index &&
++ i < meta->offset + SQUASHFS_META_ENTRIES; i++) {
++ int blocks = skip * SQUASHFS_META_INDEXES;
++
++ while (blocks) {
++ int block = blocks > (SIZE >> 2) ? (SIZE >> 2) : blocks;
++ int res = read_block_index(inode->i_sb, block, block_list,
++ &cur_index_block, &cur_offset);
++
++ if (res == -1)
++ goto failed;
++
++ cur_data_block += res;
++ blocks -= block;
++ }
++
++ meta_entry = &meta->meta_entry[i - meta->offset];
++ meta_entry->index_block = cur_index_block - sblk->inode_table_start;
++ meta_entry->offset = cur_offset;
++ meta_entry->data_block = cur_data_block;
++ meta->entries ++;
++ offset ++;
++ }
++
++ TRACE("get_meta_index: meta->offset %d, meta->entries %d\n",
++ meta->offset, meta->entries);
++
++ release_meta_index(inode, meta);
++ }
++
++all_done:
++ *index_block = cur_index_block;
++ *index_offset = cur_offset;
++ *data_block = cur_data_block;
++
++ return offset * SQUASHFS_META_INDEXES * skip;
++
++failed:
++ release_meta_index(inode, meta);
++ return -1;
++}
++
++
++static long long read_blocklist(struct inode *inode, int index,
++ int readahead_blks, char *block_list,
++ unsigned short **block_p, unsigned int *bsize)
++{
++ long long block_ptr;
++ int offset;
++ long long block;
++ int res = get_meta_index(inode, index, &block_ptr, &offset, &block,
++ block_list);
++
++ TRACE("read_blocklist: res %d, index %d, block_ptr 0x%llx, offset"
++ " 0x%x, block 0x%llx\n", res, index, block_ptr, offset, block);
++
++ if(res == -1)
++ goto failure;
++
++ index -= res;
++
++ while (index) {
++ int blocks = index > (SIZE >> 2) ? (SIZE >> 2) : index;
++ int res = read_block_index(inode->i_sb, blocks, block_list,
++ &block_ptr, &offset);
++ if (res == -1)
++ goto failure;
++ block += res;
++ index -= blocks;
++ }
++
++ if (read_block_index(inode->i_sb, 1, block_list, &block_ptr, &offset) == -1)
++ goto failure;
++ *bsize = *((unsigned int *) block_list);
++
++ return block;
++
++failure:
++ return 0;
++}
++
++
++static int squashfs_readpage(struct file *file, struct page *page)
++{
++ struct inode *inode = page->mapping->host;
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned char *block_list = NULL;
++ long long block;
++ unsigned int bsize, i;
++ int bytes;
++ int index = page->index >> (sblk->block_log - PAGE_CACHE_SHIFT);
++ void *pageaddr;
++ struct squashfs_fragment_cache *fragment = NULL;
++ char *data_ptr = msblk->read_page;
++
++ int mask = (1 << (sblk->block_log - PAGE_CACHE_SHIFT)) - 1;
++ int start_index = page->index & ~mask;
++ int end_index = start_index | mask;
++ int file_end = i_size_read(inode) >> sblk->block_log;
++ int sparse = 0;
++
++ TRACE("Entered squashfs_readpage, page index %lx, start block %llx\n",
++ page->index, SQUASHFS_I(inode)->start_block);
++
++ if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
++ PAGE_CACHE_SHIFT))
++ goto out;
++
++ if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK
++ || index < file_end) {
++ block_list = kmalloc(SIZE, GFP_KERNEL);
++ if (block_list == NULL) {
++ ERROR("Failed to allocate block_list\n");
++ goto error_out;
++ }
++
++ block = (msblk->read_blocklist)(inode, index, 1, block_list, NULL, &bsize);
++ if (block == 0)
++ goto error_out;
++
++ if (bsize == 0) { /* hole */
++ bytes = index == file_end ?
++ (i_size_read(inode) & (sblk->block_size - 1)) : sblk->block_size;
++ sparse = 1;
++ } else {
++ mutex_lock(&msblk->read_page_mutex);
++
++ bytes = squashfs_read_data(inode->i_sb, msblk->read_page, block,
++ bsize, NULL, sblk->block_size);
++
++ if (bytes == 0) {
++ ERROR("Unable to read page, block %llx, size %x\n", block, bsize);
++ mutex_unlock(&msblk->read_page_mutex);
++ goto error_out;
++ }
++ }
++ } else {
++ fragment = get_cached_fragment(inode->i_sb,
++ SQUASHFS_I(inode)-> u.s1.fragment_start_block,
++ SQUASHFS_I(inode)->u.s1.fragment_size);
++
++ if (fragment == NULL) {
++ ERROR("Unable to read page, block %llx, size %x\n",
++ SQUASHFS_I(inode)->u.s1.fragment_start_block,
++ (int) SQUASHFS_I(inode)->u.s1.fragment_size);
++ goto error_out;
++ }
++ bytes = i_size_read(inode) & (sblk->block_size - 1);
++ data_ptr = fragment->data + SQUASHFS_I(inode)->u.s1.fragment_offset;
++ }
++
++ for (i = start_index; i <= end_index && bytes > 0; i++,
++ bytes -= PAGE_CACHE_SIZE, data_ptr += PAGE_CACHE_SIZE) {
++ struct page *push_page;
++ int avail = sparse ? 0 : min_t(unsigned int, bytes, PAGE_CACHE_SIZE);
++
++ TRACE("bytes %d, i %d, available_bytes %d\n", bytes, i, avail);
++
++ push_page = (i == page->index) ? page :
++ grab_cache_page_nowait(page->mapping, i);
++
++ if (!push_page)
++ continue;
++
++ if (PageUptodate(push_page))
++ goto skip_page;
++
++ pageaddr = kmap_atomic(push_page, KM_USER0);
++ memcpy(pageaddr, data_ptr, avail);
++ memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail);
++ kunmap_atomic(pageaddr, KM_USER0);
++ flush_dcache_page(push_page);
++ SetPageUptodate(push_page);
++skip_page:
++ unlock_page(push_page);
++ if(i != page->index)
++ page_cache_release(push_page);
++ }
++
++ if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK
++ || index < file_end) {
++ if (!sparse)
++ mutex_unlock(&msblk->read_page_mutex);
++ kfree(block_list);
++ } else
++ release_cached_fragment(msblk, fragment);
++
++ return 0;
++
++error_out:
++ SetPageError(page);
++out:
++ pageaddr = kmap_atomic(page, KM_USER0);
++ memset(pageaddr, 0, PAGE_CACHE_SIZE);
++ kunmap_atomic(pageaddr, KM_USER0);
++ flush_dcache_page(page);
++ if (!PageError(page))
++ SetPageUptodate(page);
++ unlock_page(page);
++
++ kfree(block_list);
++ return 0;
++}
++
++
++static int get_dir_index_using_offset(struct super_block *s,
++ long long *next_block, unsigned int *next_offset,
++ long long index_start, unsigned int index_offset, int i_count,
++ long long f_pos)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index index;
++
++ TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n",
++ i_count, (unsigned int) f_pos);
++
++ f_pos =- 3;
++ if (f_pos == 0)
++ goto finish;
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index sindex;
++ squashfs_get_cached_block(s, &sindex, index_start, index_offset,
++ sizeof(sindex), &index_start, &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX(&index, &sindex);
++ } else
++ squashfs_get_cached_block(s, &index, index_start, index_offset,
++ sizeof(index), &index_start, &index_offset);
++
++ if (index.index > f_pos)
++ break;
++
++ squashfs_get_cached_block(s, NULL, index_start, index_offset,
++ index.size + 1, &index_start, &index_offset);
++
++ length = index.index;
++ *next_block = index.start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++
++finish:
++ return length + 3;
++}
++
++
++static int get_dir_index_using_name(struct super_block *s,
++ long long *next_block, unsigned int *next_offset,
++ long long index_start, unsigned int index_offset, int i_count,
++ const char *name, int size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index *index;
++ char *str;
++
++ TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count);
++
++ str = kmalloc(sizeof(struct squashfs_dir_index) +
++ (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL);
++ if (str == NULL) {
++ ERROR("Failed to allocate squashfs_dir_index\n");
++ goto failure;
++ }
++
++ index = (struct squashfs_dir_index *) (str + SQUASHFS_NAME_LEN + 1);
++ strncpy(str, name, size);
++ str[size] = '\0';
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index sindex;
++ squashfs_get_cached_block(s, &sindex, index_start, index_offset,
++ sizeof(sindex), &index_start, &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX(index, &sindex);
++ } else
++ squashfs_get_cached_block(s, index, index_start, index_offset,
++ sizeof(struct squashfs_dir_index), &index_start, &index_offset);
++
++ squashfs_get_cached_block(s, index->name, index_start, index_offset,
++ index->size + 1, &index_start, &index_offset);
++
++ index->name[index->size + 1] = '\0';
++
++ if (strcmp(index->name, str) > 0)
++ break;
++
++ length = index->index;
++ *next_block = index->start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++ kfree(str);
++
++failure:
++ return length + 3;
++}
++
++
++static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
++{
++ struct inode *i = file->f_dentry->d_inode;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0, dir_count;
++ struct squashfs_dir_header dirh;
++ struct squashfs_dir_entry *dire;
++
++ TRACE("Entered squashfs_readdir [%llx:%x]\n", next_block, next_offset);
++
++ dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL);
++ if (dire == NULL) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto finish;
++ }
++
++ while(file->f_pos < 3) {
++ char *name;
++ int size, i_ino;
++
++ if(file->f_pos == 0) {
++ name = ".";
++ size = 1;
++ i_ino = i->i_ino;
++ } else {
++ name = "..";
++ size = 2;
++ i_ino = SQUASHFS_I(i)->u.s2.parent_inode;
++ }
++ TRACE("Calling filldir(%x, %s, %d, %d, %d, %d)\n",
++ (unsigned int) dirent, name, size, (int)
++ file->f_pos, i_ino, squashfs_filetype_table[1]);
++
++ if (filldir(dirent, name, size, file->f_pos, i_ino,
++ squashfs_filetype_table[1]) < 0) {
++ TRACE("Filldir returned less than 0\n");
++ goto finish;
++ }
++ file->f_pos += size;
++ }
++
++ length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count, file->f_pos);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header sdirh;
++
++ if (!squashfs_get_cached_block(i->i_sb, &sdirh, next_block,
++ next_offset, sizeof(sdirh), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, &dirh, next_block,
++ next_offset, sizeof(dirh), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry sdire;
++ if (!squashfs_get_cached_block(i->i_sb, &sdire, next_block,
++ next_offset, sizeof(sdire), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, dire, next_block,
++ next_offset, sizeof(*dire), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name, next_block,
++ next_offset, dire->size + 1, &next_block, &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (file->f_pos >= length)
++ continue;
++
++ dire->name[dire->size + 1] = '\0';
++
++ TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d, %d)\n",
++ (unsigned int) dirent, dire->name, dire->size + 1,
++ (int) file->f_pos, dirh.start_block, dire->offset,
++ dirh.inode_number + dire->inode_number,
++ squashfs_filetype_table[dire->type]);
++
++ if (filldir(dirent, dire->name, dire->size + 1, file->f_pos,
++ dirh.inode_number + dire->inode_number,
++ squashfs_filetype_table[dire->type]) < 0) {
++ TRACE("Filldir returned less than 0\n");
++ goto finish;
++ }
++ file->f_pos = length;
++ }
++ }
++
++finish:
++ kfree(dire);
++ return 0;
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ kfree(dire);
++ return 0;
++}
++
++
++static struct dentry *squashfs_lookup(struct inode *i, struct dentry *dentry,
++ struct nameidata *nd)
++{
++ const unsigned char *name = dentry->d_name.name;
++ int len = dentry->d_name.len;
++ struct inode *inode = NULL;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0, dir_count;
++ struct squashfs_dir_header dirh;
++ struct squashfs_dir_entry *dire;
++
++ TRACE("Entered squashfs_lookup [%llx:%x]\n", next_block, next_offset);
++
++ dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL);
++ if (dire == NULL) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto exit_lookup;
++ }
++
++ if (len > SQUASHFS_NAME_LEN)
++ goto exit_lookup;
++
++ length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count, name, len);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header sdirh;
++ if (!squashfs_get_cached_block(i->i_sb, &sdirh, next_block,
++ next_offset, sizeof(sdirh), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, &dirh, next_block,
++ next_offset, sizeof(dirh), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry sdire;
++ if (!squashfs_get_cached_block(i->i_sb, &sdire, next_block,
++ next_offset, sizeof(sdire), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, dire, next_block,
++ next_offset, sizeof(*dire), &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name, next_block,
++ next_offset, dire->size + 1, &next_block, &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (name[0] < dire->name[0])
++ goto exit_lookup;
++
++ if ((len == dire->size + 1) && !strncmp(name, dire->name, len)) {
++ squashfs_inode_t ino = SQUASHFS_MKINODE(dirh.start_block,
++ dire->offset);
++
++ TRACE("calling squashfs_iget for directory entry %s, inode"
++ " %x:%x, %d\n", name, dirh.start_block, dire->offset,
++ dirh.inode_number + dire->inode_number);
++
++ inode = squashfs_iget(i->i_sb, ino, dirh.inode_number + dire->inode_number);
++
++ goto exit_lookup;
++ }
++ }
++ }
++
++exit_lookup:
++ kfree(dire);
++ if (inode)
++ return d_splice_alias(inode, dentry);
++ d_add(dentry, inode);
++ return ERR_PTR(0);
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ goto exit_lookup;
++}
++
++
++static int squashfs_remount(struct super_block *s, int *flags, char *data)
++{
++ *flags |= MS_RDONLY;
++ return 0;
++}
++
++
++static void squashfs_put_super(struct super_block *s)
++{
++ int i;
++
++ if (s->s_fs_info) {
++ struct squashfs_sb_info *sbi = s->s_fs_info;
++ if (sbi->block_cache)
++ for (i = 0; i < squashfs_cached_blks; i++)
++ if (sbi->block_cache[i].block != SQUASHFS_INVALID_BLK)
++ vfree(sbi->block_cache[i].data);
++ if (sbi->fragment)
++ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++)
++ vfree(sbi->fragment[i].data);
++ kfree(sbi->fragment);
++ kfree(sbi->block_cache);
++ vfree(sbi->read_page);
++ kfree(sbi->uid);
++ kfree(sbi->fragment_index);
++ kfree(sbi->fragment_index_2);
++ kfree(sbi->meta_index);
++ vfree(sbi->stream.workspace);
++ kfree(s->s_fs_info);
++ s->s_fs_info = NULL;
++ }
++}
++
++
++static int squashfs_get_sb(struct file_system_type *fs_type, int flags,
++ const char *dev_name, void *data, struct vfsmount *mnt)
++{
++ return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super,
++ mnt);
++}
++
++
++static int __init init_squashfs_fs(void)
++{
++ int err = init_inodecache();
++ if (err)
++ goto out;
++
++ printk(KERN_INFO "squashfs: version 3.3 (2007/10/31) "
++ "Phillip Lougher\n");
++
++ err = register_filesystem(&squashfs_fs_type);
++ if (err)
++ destroy_inodecache();
++
++out:
++ return err;
++}
++
++
++static void __exit exit_squashfs_fs(void)
++{
++ unregister_filesystem(&squashfs_fs_type);
++ destroy_inodecache();
++}
++
++
++static struct kmem_cache * squashfs_inode_cachep;
++
++
++static struct inode *squashfs_alloc_inode(struct super_block *sb)
++{
++ struct squashfs_inode_info *ei;
++ ei = kmem_cache_alloc(squashfs_inode_cachep, GFP_KERNEL);
++ return ei ? &ei->vfs_inode : NULL;
++}
++
++
++static void squashfs_destroy_inode(struct inode *inode)
++{
++ kmem_cache_free(squashfs_inode_cachep, SQUASHFS_I(inode));
++}
++
++
++static void init_once(struct kmem_cache *cachep, void *foo)
++{
++ struct squashfs_inode_info *ei = foo;
++
++ inode_init_once(&ei->vfs_inode);
++}
++
++
++static int __init init_inodecache(void)
++{
++ squashfs_inode_cachep = kmem_cache_create("squashfs_inode_cache",
++ sizeof(struct squashfs_inode_info), 0,
++ SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, init_once);
++ if (squashfs_inode_cachep == NULL)
++ return -ENOMEM;
++ return 0;
++}
++
++
++static void destroy_inodecache(void)
++{
++ kmem_cache_destroy(squashfs_inode_cachep);
++}
++
++
++module_init(init_squashfs_fs);
++module_exit(exit_squashfs_fs);
++MODULE_DESCRIPTION("squashfs 3.2-r2-CVS, a compressed read-only filesystem");
++MODULE_AUTHOR("Phillip Lougher <phillip@lougher.demon.co.uk>");
++MODULE_LICENSE("GPL");
+diff -x .gitignore -Nurp linux-2.6.24/fs/squashfs/Makefile linux-2.6.24-squashfs3.3/fs/squashfs/Makefile
+--- linux-2.6.24/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/fs/squashfs/Makefile 2005-11-20 14:31:00.000000000 +0000
+@@ -0,0 +1,7 @@
++#
++# Makefile for the linux squashfs routines.
++#
++
++obj-$(CONFIG_SQUASHFS) += squashfs.o
++squashfs-y += inode.o
++squashfs-y += squashfs2_0.o
+diff -x .gitignore -Nurp linux-2.6.24/fs/squashfs/squashfs2_0.c linux-2.6.24-squashfs3.3/fs/squashfs/squashfs2_0.c
+--- linux-2.6.24/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/fs/squashfs/squashfs2_0.c 2007-10-25 00:43:59.000000000 +0100
+@@ -0,0 +1,740 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.demon.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs2_0.c
++ */
++
++#include <linux/squashfs_fs.h>
++#include <linux/module.h>
++#include <linux/zlib.h>
++#include <linux/fs.h>
++#include <linux/squashfs_fs_sb.h>
++#include <linux/squashfs_fs_i.h>
++
++#include "squashfs.h"
++static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir);
++static struct dentry *squashfs_lookup_2(struct inode *, struct dentry *,
++ struct nameidata *);
++
++static struct file_operations squashfs_dir_ops_2 = {
++ .read = generic_read_dir,
++ .readdir = squashfs_readdir_2
++};
++
++static struct inode_operations squashfs_dir_inode_ops_2 = {
++ .lookup = squashfs_lookup_2
++};
++
++static unsigned char squashfs_filetype_table[] = {
++ DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK
++};
++
++static int read_fragment_index_table_2(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ if (!(msblk->fragment_index_2 = kmalloc(SQUASHFS_FRAGMENT_INDEX_BYTES_2
++ (sblk->fragments), GFP_KERNEL))) {
++ ERROR("Failed to allocate uid/gid table\n");
++ return 0;
++ }
++
++ if (SQUASHFS_FRAGMENT_INDEX_BYTES_2(sblk->fragments) &&
++ !squashfs_read_data(s, (char *)
++ msblk->fragment_index_2,
++ sblk->fragment_table_start,
++ SQUASHFS_FRAGMENT_INDEX_BYTES_2
++ (sblk->fragments) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, SQUASHFS_FRAGMENT_INDEX_BYTES_2(sblk->fragments))) {
++ ERROR("unable to read fragment index table\n");
++ return 0;
++ }
++
++ if (msblk->swap) {
++ int i;
++ unsigned int fragment;
++
++ for (i = 0; i < SQUASHFS_FRAGMENT_INDEXES_2(sblk->fragments);
++ i++) {
++ SQUASHFS_SWAP_FRAGMENT_INDEXES_2((&fragment),
++ &msblk->fragment_index_2[i], 1);
++ msblk->fragment_index_2[i] = fragment;
++ }
++ }
++
++ return 1;
++}
++
++
++static int get_fragment_location_2(struct super_block *s, unsigned int fragment,
++ long long *fragment_start_block,
++ unsigned int *fragment_size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ long long start_block =
++ msblk->fragment_index_2[SQUASHFS_FRAGMENT_INDEX_2(fragment)];
++ int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET_2(fragment);
++ struct squashfs_fragment_entry_2 fragment_entry;
++
++ if (msblk->swap) {
++ struct squashfs_fragment_entry_2 sfragment_entry;
++
++ if (!squashfs_get_cached_block(s, (char *) &sfragment_entry,
++ start_block, offset,
++ sizeof(sfragment_entry), &start_block,
++ &offset))
++ goto out;
++ SQUASHFS_SWAP_FRAGMENT_ENTRY_2(&fragment_entry, &sfragment_entry);
++ } else
++ if (!squashfs_get_cached_block(s, (char *) &fragment_entry,
++ start_block, offset,
++ sizeof(fragment_entry), &start_block,
++ &offset))
++ goto out;
++
++ *fragment_start_block = fragment_entry.start_block;
++ *fragment_size = fragment_entry.size;
++
++ return 1;
++
++out:
++ return 0;
++}
++
++
++static void squashfs_new_inode(struct squashfs_sb_info *msblk, struct inode *i,
++ struct squashfs_base_inode_header_2 *inodeb, unsigned int ino)
++{
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ i->i_ino = ino;
++ i->i_mtime.tv_sec = sblk->mkfs_time;
++ i->i_atime.tv_sec = sblk->mkfs_time;
++ i->i_ctime.tv_sec = sblk->mkfs_time;
++ i->i_uid = msblk->uid[inodeb->uid];
++ i->i_mode = inodeb->mode;
++ i->i_nlink = 1;
++ i->i_size = 0;
++ if (inodeb->guid == SQUASHFS_GUIDS)
++ i->i_gid = i->i_uid;
++ else
++ i->i_gid = msblk->guid[inodeb->guid];
++}
++
++
++static int squashfs_read_inode_2(struct inode *i, squashfs_inode_t inode)
++{
++ struct super_block *s = i->i_sb;
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned int block = SQUASHFS_INODE_BLK(inode) +
++ sblk->inode_table_start;
++ unsigned int offset = SQUASHFS_INODE_OFFSET(inode);
++ unsigned int ino = SQUASHFS_MK_VFS_INODE(block -
++ sblk->inode_table_start, offset);
++ long long next_block;
++ unsigned int next_offset;
++ union squashfs_inode_header_2 id, sid;
++ struct squashfs_base_inode_header_2 *inodeb = &id.base,
++ *sinodeb = &sid.base;
++
++ TRACE("Entered squashfs_read_inode_2\n");
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *) sinodeb, block,
++ offset, sizeof(*sinodeb), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_BASE_INODE_HEADER_2(inodeb, sinodeb,
++ sizeof(*sinodeb));
++ } else
++ if (!squashfs_get_cached_block(s, (char *) inodeb, block,
++ offset, sizeof(*inodeb), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ squashfs_new_inode(msblk, i, inodeb, ino);
++
++ switch(inodeb->inode_type) {
++ case SQUASHFS_FILE_TYPE: {
++ struct squashfs_reg_inode_header_2 *inodep = &id.reg;
++ struct squashfs_reg_inode_header_2 *sinodep = &sid.reg;
++ long long frag_blk;
++ unsigned int frag_size = 0;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_REG_INODE_HEADER_2(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ frag_blk = SQUASHFS_INVALID_BLK;
++ if (inodep->fragment != SQUASHFS_INVALID_FRAG &&
++ !get_fragment_location_2(s,
++ inodep->fragment, &frag_blk, &frag_size))
++ goto failed_read;
++
++ i->i_size = inodep->file_size;
++ i->i_fop = &generic_ro_fops;
++ i->i_mode |= S_IFREG;
++ i->i_mtime.tv_sec = inodep->mtime;
++ i->i_atime.tv_sec = inodep->mtime;
++ i->i_ctime.tv_sec = inodep->mtime;
++ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
++ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
++ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->u.s1.block_list_start = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++ i->i_data.a_ops = &squashfs_aops;
++
++ TRACE("File inode %x:%x, start_block %x, "
++ "block_list_start %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, next_block,
++ next_offset);
++ break;
++ }
++ case SQUASHFS_DIR_TYPE: {
++ struct squashfs_dir_inode_header_2 *inodep = &id.dir;
++ struct squashfs_dir_inode_header_2 *sinodep = &sid.dir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DIR_INODE_HEADER_2(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops_2;
++ i->i_fop = &squashfs_dir_ops_2;
++ i->i_mode |= S_IFDIR;
++ i->i_mtime.tv_sec = inodep->mtime;
++ i->i_atime.tv_sec = inodep->mtime;
++ i->i_ctime.tv_sec = inodep->mtime;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count = 0;
++ SQUASHFS_I(i)->u.s2.parent_inode = 0;
++
++ TRACE("Directory inode %x:%x, start_block %x, offset "
++ "%x\n", SQUASHFS_INODE_BLK(inode),
++ offset, inodep->start_block,
++ inodep->offset);
++ break;
++ }
++ case SQUASHFS_LDIR_TYPE: {
++ struct squashfs_ldir_inode_header_2 *inodep = &id.ldir;
++ struct squashfs_ldir_inode_header_2 *sinodep = &sid.ldir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_LDIR_INODE_HEADER_2(inodep,
++ sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops_2;
++ i->i_fop = &squashfs_dir_ops_2;
++ i->i_mode |= S_IFDIR;
++ i->i_mtime.tv_sec = inodep->mtime;
++ i->i_atime.tv_sec = inodep->mtime;
++ i->i_ctime.tv_sec = inodep->mtime;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_start = next_block;
++ SQUASHFS_I(i)->u.s2.directory_index_offset =
++ next_offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count =
++ inodep->i_count;
++ SQUASHFS_I(i)->u.s2.parent_inode = 0;
++
++ TRACE("Long directory inode %x:%x, start_block %x, "
++ "offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, inodep->offset);
++ break;
++ }
++ case SQUASHFS_SYMLINK_TYPE: {
++ struct squashfs_symlink_inode_header_2 *inodep =
++ &id.symlink;
++ struct squashfs_symlink_inode_header_2 *sinodep =
++ &sid.symlink;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(inodep,
++ sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_size = inodep->symlink_size;
++ i->i_op = &page_symlink_inode_operations;
++ i->i_data.a_ops = &squashfs_symlink_aops;
++ i->i_mode |= S_IFLNK;
++ SQUASHFS_I(i)->start_block = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++
++ TRACE("Symbolic link inode %x:%x, start_block %llx, "
++ "offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ next_block, next_offset);
++ break;
++ }
++ case SQUASHFS_BLKDEV_TYPE:
++ case SQUASHFS_CHRDEV_TYPE: {
++ struct squashfs_dev_inode_header_2 *inodep = &id.dev;
++ struct squashfs_dev_inode_header_2 *sinodep = &sid.dev;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DEV_INODE_HEADER_2(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_mode |= (inodeb->inode_type ==
++ SQUASHFS_CHRDEV_TYPE) ? S_IFCHR :
++ S_IFBLK;
++ init_special_inode(i, i->i_mode,
++ old_decode_dev(inodep->rdev));
++
++ TRACE("Device inode %x:%x, rdev %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->rdev);
++ break;
++ }
++ case SQUASHFS_FIFO_TYPE:
++ case SQUASHFS_SOCKET_TYPE: {
++
++ i->i_mode |= (inodeb->inode_type == SQUASHFS_FIFO_TYPE)
++ ? S_IFIFO : S_IFSOCK;
++ init_special_inode(i, i->i_mode, 0);
++ break;
++ }
++ default:
++ ERROR("Unknown inode type %d in squashfs_iget!\n",
++ inodeb->inode_type);
++ goto failed_read1;
++ }
++
++ return 1;
++
++failed_read:
++ ERROR("Unable to read inode [%x:%x]\n", block, offset);
++
++failed_read1:
++ return 0;
++}
++
++
++static int get_dir_index_using_offset(struct super_block *s, long long
++ *next_block, unsigned int *next_offset,
++ long long index_start,
++ unsigned int index_offset, int i_count,
++ long long f_pos)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index_2 index;
++
++ TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n",
++ i_count, (unsigned int) f_pos);
++
++ if (f_pos == 0)
++ goto finish;
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index_2 sindex;
++ squashfs_get_cached_block(s, (char *) &sindex,
++ index_start, index_offset,
++ sizeof(sindex), &index_start,
++ &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX_2(&index, &sindex);
++ } else
++ squashfs_get_cached_block(s, (char *) &index,
++ index_start, index_offset,
++ sizeof(index), &index_start,
++ &index_offset);
++
++ if (index.index > f_pos)
++ break;
++
++ squashfs_get_cached_block(s, NULL, index_start, index_offset,
++ index.size + 1, &index_start,
++ &index_offset);
++
++ length = index.index;
++ *next_block = index.start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++
++finish:
++ return length;
++}
++
++
++static int get_dir_index_using_name(struct super_block *s, long long
++ *next_block, unsigned int *next_offset,
++ long long index_start,
++ unsigned int index_offset, int i_count,
++ const char *name, int size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index_2 *index;
++ char *str;
++
++ TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count);
++
++ if (!(str = kmalloc(sizeof(struct squashfs_dir_index) +
++ (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_index\n");
++ goto failure;
++ }
++
++ index = (struct squashfs_dir_index_2 *) (str + SQUASHFS_NAME_LEN + 1);
++ strncpy(str, name, size);
++ str[size] = '\0';
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index_2 sindex;
++ squashfs_get_cached_block(s, (char *) &sindex,
++ index_start, index_offset,
++ sizeof(sindex), &index_start,
++ &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX_2(index, &sindex);
++ } else
++ squashfs_get_cached_block(s, (char *) index,
++ index_start, index_offset,
++ sizeof(struct squashfs_dir_index_2),
++ &index_start, &index_offset);
++
++ squashfs_get_cached_block(s, index->name, index_start,
++ index_offset, index->size + 1,
++ &index_start, &index_offset);
++
++ index->name[index->size + 1] = '\0';
++
++ if (strcmp(index->name, str) > 0)
++ break;
++
++ length = index->index;
++ *next_block = index->start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++ kfree(str);
++failure:
++ return length;
++}
++
++
++static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir)
++{
++ struct inode *i = file->f_dentry->d_inode;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
++ dir_count;
++ struct squashfs_dir_header_2 dirh;
++ struct squashfs_dir_entry_2 *dire;
++
++ TRACE("Entered squashfs_readdir_2 [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto finish;
++ }
++
++ length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count,
++ file->f_pos);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header_2 sdirh;
++
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
++ next_block, next_offset, sizeof(sdirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER_2(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh,
++ next_block, next_offset, sizeof(dirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry_2 sdire;
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ &sdire, next_block, next_offset,
++ sizeof(sdire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ dire, next_block, next_offset,
++ sizeof(*dire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name,
++ next_block, next_offset,
++ dire->size + 1, &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (file->f_pos >= length)
++ continue;
++
++ dire->name[dire->size + 1] = '\0';
++
++ TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d)\n",
++ (unsigned int) dirent, dire->name,
++ dire->size + 1, (int) file->f_pos,
++ dirh.start_block, dire->offset,
++ squashfs_filetype_table[dire->type]);
++
++ if (filldir(dirent, dire->name, dire->size + 1,
++ file->f_pos, SQUASHFS_MK_VFS_INODE(
++ dirh.start_block, dire->offset),
++ squashfs_filetype_table[dire->type])
++ < 0) {
++ TRACE("Filldir returned less than 0\n");
++ goto finish;
++ }
++ file->f_pos = length;
++ }
++ }
++
++finish:
++ kfree(dire);
++ return 0;
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ kfree(dire);
++ return 0;
++}
++
++
++static struct dentry *squashfs_lookup_2(struct inode *i, struct dentry *dentry,
++ struct nameidata *nd)
++{
++ const unsigned char *name = dentry->d_name.name;
++ int len = dentry->d_name.len;
++ struct inode *inode = NULL;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
++ dir_count;
++ struct squashfs_dir_header_2 dirh;
++ struct squashfs_dir_entry_2 *dire;
++ int sorted = sblk->s_major == 2 && sblk->s_minor >= 1;
++
++ TRACE("Entered squashfs_lookup_2 [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto exit_loop;
++ }
++
++ if (len > SQUASHFS_NAME_LEN)
++ goto exit_loop;
++
++ length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count, name,
++ len);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header_2 sdirh;
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
++ next_block, next_offset, sizeof(sdirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER_2(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh,
++ next_block, next_offset, sizeof(dirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry_2 sdire;
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ &sdire, next_block,next_offset,
++ sizeof(sdire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ dire, next_block,next_offset,
++ sizeof(*dire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name,
++ next_block, next_offset, dire->size + 1,
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (sorted && name[0] < dire->name[0])
++ goto exit_loop;
++
++ if ((len == dire->size + 1) && !strncmp(name,
++ dire->name, len)) {
++ squashfs_inode_t ino =
++ SQUASHFS_MKINODE(dirh.start_block,
++ dire->offset);
++ unsigned int inode_number = SQUASHFS_MK_VFS_INODE(dirh.start_block,
++ dire->offset);
++
++ TRACE("calling squashfs_iget for directory "
++ "entry %s, inode %x:%x, %lld\n", name,
++ dirh.start_block, dire->offset, ino);
++
++ inode = squashfs_iget(i->i_sb, ino, inode_number);
++
++ goto exit_loop;
++ }
++ }
++ }
++
++exit_loop:
++ kfree(dire);
++ d_add(dentry, inode);
++ return ERR_PTR(0);
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ goto exit_loop;
++}
++
++
++int squashfs_2_0_supported(struct squashfs_sb_info *msblk)
++{
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ msblk->read_inode = squashfs_read_inode_2;
++ msblk->read_fragment_index_table = read_fragment_index_table_2;
++
++ sblk->bytes_used = sblk->bytes_used_2;
++ sblk->uid_start = sblk->uid_start_2;
++ sblk->guid_start = sblk->guid_start_2;
++ sblk->inode_table_start = sblk->inode_table_start_2;
++ sblk->directory_table_start = sblk->directory_table_start_2;
++ sblk->fragment_table_start = sblk->fragment_table_start_2;
++
++ return 1;
++}
+diff -x .gitignore -Nurp linux-2.6.24/fs/squashfs/squashfs.h linux-2.6.24-squashfs3.3/fs/squashfs/squashfs.h
+--- linux-2.6.24/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/fs/squashfs/squashfs.h 2007-08-19 04:23:16.000000000 +0100
+@@ -0,0 +1,86 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.demon.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs.h
++ */
++
++#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++#undef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++#endif
++
++#ifdef SQUASHFS_TRACE
++#define TRACE(s, args...) printk(KERN_NOTICE "SQUASHFS: "s, ## args)
++#else
++#define TRACE(s, args...) {}
++#endif
++
++#define ERROR(s, args...) printk(KERN_ERR "SQUASHFS error: "s, ## args)
++
++#define SERROR(s, args...) do { \
++ if (!silent) \
++ printk(KERN_ERR "SQUASHFS error: "s, ## args);\
++ } while(0)
++
++#define WARNING(s, args...) printk(KERN_WARNING "SQUASHFS: "s, ## args)
++
++static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode)
++{
++ return list_entry(inode, struct squashfs_inode_info, vfs_inode);
++}
++
++#if defined(CONFIG_SQUASHFS_1_0_COMPATIBILITY ) || defined(CONFIG_SQUASHFS_2_0_COMPATIBILITY)
++#define SQSH_EXTERN
++extern unsigned int squashfs_read_data(struct super_block *s, char *buffer,
++ long long index, unsigned int length,
++ long long *next_index, int srclength);
++extern int squashfs_get_cached_block(struct super_block *s, void *buffer,
++ long long block, unsigned int offset,
++ int length, long long *next_block,
++ unsigned int *next_offset);
++extern void release_cached_fragment(struct squashfs_sb_info *msblk, struct
++ squashfs_fragment_cache *fragment);
++extern struct squashfs_fragment_cache *get_cached_fragment(struct super_block
++ *s, long long start_block,
++ int length);
++extern struct inode *squashfs_iget(struct super_block *s, squashfs_inode_t inode, unsigned int inode_number);
++extern const struct address_space_operations squashfs_symlink_aops;
++extern const struct address_space_operations squashfs_aops;
++extern struct inode_operations squashfs_dir_inode_ops;
++#else
++#define SQSH_EXTERN static
++#endif
++
++#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++extern int squashfs_1_0_supported(struct squashfs_sb_info *msblk);
++#else
++static inline int squashfs_1_0_supported(struct squashfs_sb_info *msblk)
++{
++ return 0;
++}
++#endif
++
++#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
++extern int squashfs_2_0_supported(struct squashfs_sb_info *msblk);
++#else
++static inline int squashfs_2_0_supported(struct squashfs_sb_info *msblk)
++{
++ return 0;
++}
++#endif
+diff -x .gitignore -Nurp linux-2.6.24/include/linux/squashfs_fs.h linux-2.6.24-squashfs3.3/include/linux/squashfs_fs.h
+--- linux-2.6.24/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/include/linux/squashfs_fs.h 2007-11-01 03:50:57.000000000 +0000
+@@ -0,0 +1,935 @@
++#ifndef SQUASHFS_FS
++#define SQUASHFS_FS
++
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.demon.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs.h
++ */
++
++#ifndef CONFIG_SQUASHFS_2_0_COMPATIBILITY
++#define CONFIG_SQUASHFS_2_0_COMPATIBILITY
++#endif
++
++#define SQUASHFS_CACHED_FRAGMENTS CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE
++#define SQUASHFS_MAJOR 3
++#define SQUASHFS_MINOR 1
++#define SQUASHFS_MAGIC 0x73717368
++#define SQUASHFS_MAGIC_SWAP 0x68737173
++#define SQUASHFS_START 0
++
++/* size of metadata (inode and directory) blocks */
++#define SQUASHFS_METADATA_SIZE 8192
++#define SQUASHFS_METADATA_LOG 13
++
++/* default size of data blocks */
++#define SQUASHFS_FILE_SIZE 131072
++#define SQUASHFS_FILE_LOG 17
++
++#define SQUASHFS_FILE_MAX_SIZE 1048576
++
++/* Max number of uids and gids */
++#define SQUASHFS_UIDS 256
++#define SQUASHFS_GUIDS 255
++
++/* Max length of filename (not 255) */
++#define SQUASHFS_NAME_LEN 256
++
++#define SQUASHFS_INVALID ((long long) 0xffffffffffff)
++#define SQUASHFS_INVALID_FRAG ((unsigned int) 0xffffffff)
++#define SQUASHFS_INVALID_BLK ((long long) -1)
++#define SQUASHFS_USED_BLK ((long long) -2)
++
++/* Filesystem flags */
++#define SQUASHFS_NOI 0
++#define SQUASHFS_NOD 1
++#define SQUASHFS_CHECK 2
++#define SQUASHFS_NOF 3
++#define SQUASHFS_NO_FRAG 4
++#define SQUASHFS_ALWAYS_FRAG 5
++#define SQUASHFS_DUPLICATE 6
++#define SQUASHFS_EXPORT 7
++
++#define SQUASHFS_BIT(flag, bit) ((flag >> bit) & 1)
++
++#define SQUASHFS_UNCOMPRESSED_INODES(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NOI)
++
++#define SQUASHFS_UNCOMPRESSED_DATA(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NOD)
++
++#define SQUASHFS_UNCOMPRESSED_FRAGMENTS(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NOF)
++
++#define SQUASHFS_NO_FRAGMENTS(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NO_FRAG)
++
++#define SQUASHFS_ALWAYS_FRAGMENTS(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_ALWAYS_FRAG)
++
++#define SQUASHFS_DUPLICATES(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_DUPLICATE)
++
++#define SQUASHFS_EXPORTABLE(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_EXPORT)
++
++#define SQUASHFS_CHECK_DATA(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_CHECK)
++
++#define SQUASHFS_MKFLAGS(noi, nod, check_data, nof, no_frag, always_frag, \
++ duplicate_checking, exortable) (noi | (nod << 1) | (check_data << 2) \
++ | (nof << 3) | (no_frag << 4) | (always_frag << 5) | \
++ (duplicate_checking << 6) | (exportable << 7))
++
++/* Max number of types and file types */
++#define SQUASHFS_DIR_TYPE 1
++#define SQUASHFS_FILE_TYPE 2
++#define SQUASHFS_SYMLINK_TYPE 3
++#define SQUASHFS_BLKDEV_TYPE 4
++#define SQUASHFS_CHRDEV_TYPE 5
++#define SQUASHFS_FIFO_TYPE 6
++#define SQUASHFS_SOCKET_TYPE 7
++#define SQUASHFS_LDIR_TYPE 8
++#define SQUASHFS_LREG_TYPE 9
++
++/* 1.0 filesystem type definitions */
++#define SQUASHFS_TYPES 5
++#define SQUASHFS_IPC_TYPE 0
++
++/* Flag whether block is compressed or uncompressed, bit is set if block is
++ * uncompressed */
++#define SQUASHFS_COMPRESSED_BIT (1 << 15)
++
++#define SQUASHFS_COMPRESSED_SIZE(B) (((B) & ~SQUASHFS_COMPRESSED_BIT) ? \
++ (B) & ~SQUASHFS_COMPRESSED_BIT : SQUASHFS_COMPRESSED_BIT)
++
++#define SQUASHFS_COMPRESSED(B) (!((B) & SQUASHFS_COMPRESSED_BIT))
++
++#define SQUASHFS_COMPRESSED_BIT_BLOCK (1 << 24)
++
++#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B) ((B) & \
++ ~SQUASHFS_COMPRESSED_BIT_BLOCK)
++
++#define SQUASHFS_COMPRESSED_BLOCK(B) (!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK))
++
++/*
++ * Inode number ops. Inodes consist of a compressed block number, and an
++ * uncompressed offset within that block
++ */
++#define SQUASHFS_INODE_BLK(a) ((unsigned int) ((a) >> 16))
++
++#define SQUASHFS_INODE_OFFSET(a) ((unsigned int) ((a) & 0xffff))
++
++#define SQUASHFS_MKINODE(A, B) ((squashfs_inode_t)(((squashfs_inode_t) (A)\
++ << 16) + (B)))
++
++/* Compute 32 bit VFS inode number from squashfs inode number */
++#define SQUASHFS_MK_VFS_INODE(a, b) ((unsigned int) (((a) << 8) + \
++ ((b) >> 2) + 1))
++/* XXX */
++
++/* Translate between VFS mode and squashfs mode */
++#define SQUASHFS_MODE(a) ((a) & 0xfff)
++
++/* fragment and fragment table defines */
++#define SQUASHFS_FRAGMENT_BYTES(A) ((A) * sizeof(struct squashfs_fragment_entry))
++
++#define SQUASHFS_FRAGMENT_INDEX(A) (SQUASHFS_FRAGMENT_BYTES(A) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_OFFSET(A) (SQUASHFS_FRAGMENT_BYTES(A) % \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEXES(A) ((SQUASHFS_FRAGMENT_BYTES(A) + \
++ SQUASHFS_METADATA_SIZE - 1) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_BYTES(A) (SQUASHFS_FRAGMENT_INDEXES(A) *\
++ sizeof(long long))
++
++/* inode lookup table defines */
++#define SQUASHFS_LOOKUP_BYTES(A) ((A) * sizeof(squashfs_inode_t))
++
++#define SQUASHFS_LOOKUP_BLOCK(A) (SQUASHFS_LOOKUP_BYTES(A) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_LOOKUP_BLOCK_OFFSET(A) (SQUASHFS_LOOKUP_BYTES(A) % \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_LOOKUP_BLOCKS(A) ((SQUASHFS_LOOKUP_BYTES(A) + \
++ SQUASHFS_METADATA_SIZE - 1) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_LOOKUP_BLOCK_BYTES(A) (SQUASHFS_LOOKUP_BLOCKS(A) *\
++ sizeof(long long))
++
++/* cached data constants for filesystem */
++#define SQUASHFS_CACHED_BLKS 8
++
++#define SQUASHFS_MAX_FILE_SIZE_LOG 64
++
++#define SQUASHFS_MAX_FILE_SIZE ((long long) 1 << \
++ (SQUASHFS_MAX_FILE_SIZE_LOG - 2))
++
++#define SQUASHFS_MARKER_BYTE 0xff
++
++/* meta index cache */
++#define SQUASHFS_META_INDEXES (SQUASHFS_METADATA_SIZE / sizeof(unsigned int))
++#define SQUASHFS_META_ENTRIES 31
++#define SQUASHFS_META_NUMBER 8
++#define SQUASHFS_SLOTS 4
++
++struct meta_entry {
++ long long data_block;
++ unsigned int index_block;
++ unsigned short offset;
++ unsigned short pad;
++};
++
++struct meta_index {
++ unsigned int inode_number;
++ unsigned int offset;
++ unsigned short entries;
++ unsigned short skip;
++ unsigned short locked;
++ unsigned short pad;
++ struct meta_entry meta_entry[SQUASHFS_META_ENTRIES];
++};
++
++
++/*
++ * definitions for structures on disk
++ */
++
++typedef long long squashfs_block_t;
++typedef long long squashfs_inode_t;
++
++struct squashfs_super_block {
++ unsigned int s_magic;
++ unsigned int inodes;
++ unsigned int bytes_used_2;
++ unsigned int uid_start_2;
++ unsigned int guid_start_2;
++ unsigned int inode_table_start_2;
++ unsigned int directory_table_start_2;
++ unsigned int s_major:16;
++ unsigned int s_minor:16;
++ unsigned int block_size_1:16;
++ unsigned int block_log:16;
++ unsigned int flags:8;
++ unsigned int no_uids:8;
++ unsigned int no_guids:8;
++ unsigned int mkfs_time /* time of filesystem creation */;
++ squashfs_inode_t root_inode;
++ unsigned int block_size;
++ unsigned int fragments;
++ unsigned int fragment_table_start_2;
++ long long bytes_used;
++ long long uid_start;
++ long long guid_start;
++ long long inode_table_start;
++ long long directory_table_start;
++ long long fragment_table_start;
++ long long lookup_table_start;
++} __attribute__ ((packed));
++
++struct squashfs_dir_index {
++ unsigned int index;
++ unsigned int start_block;
++ unsigned char size;
++ unsigned char name[0];
++} __attribute__ ((packed));
++
++#define SQUASHFS_BASE_INODE_HEADER \
++ unsigned int inode_type:4; \
++ unsigned int mode:12; \
++ unsigned int uid:8; \
++ unsigned int guid:8; \
++ unsigned int mtime; \
++ unsigned int inode_number;
++
++struct squashfs_base_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++} __attribute__ ((packed));
++
++struct squashfs_ipc_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++} __attribute__ ((packed));
++
++struct squashfs_dev_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned short rdev;
++} __attribute__ ((packed));
++
++struct squashfs_symlink_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned short symlink_size;
++ char symlink[0];
++} __attribute__ ((packed));
++
++struct squashfs_reg_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ squashfs_block_t start_block;
++ unsigned int fragment;
++ unsigned int offset;
++ unsigned int file_size;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_lreg_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ squashfs_block_t start_block;
++ unsigned int fragment;
++ unsigned int offset;
++ long long file_size;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned int file_size:19;
++ unsigned int offset:13;
++ unsigned int start_block;
++ unsigned int parent_inode;
++} __attribute__ ((packed));
++
++struct squashfs_ldir_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned int file_size:27;
++ unsigned int offset:13;
++ unsigned int start_block;
++ unsigned int i_count:16;
++ unsigned int parent_inode;
++ struct squashfs_dir_index index[0];
++} __attribute__ ((packed));
++
++union squashfs_inode_header {
++ struct squashfs_base_inode_header base;
++ struct squashfs_dev_inode_header dev;
++ struct squashfs_symlink_inode_header symlink;
++ struct squashfs_reg_inode_header reg;
++ struct squashfs_lreg_inode_header lreg;
++ struct squashfs_dir_inode_header dir;
++ struct squashfs_ldir_inode_header ldir;
++ struct squashfs_ipc_inode_header ipc;
++};
++
++struct squashfs_dir_entry {
++ unsigned int offset:13;
++ unsigned int type:3;
++ unsigned int size:8;
++ int inode_number:16;
++ char name[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_header {
++ unsigned int count:8;
++ unsigned int start_block;
++ unsigned int inode_number;
++} __attribute__ ((packed));
++
++struct squashfs_fragment_entry {
++ long long start_block;
++ unsigned int size;
++ unsigned int pending;
++} __attribute__ ((packed));
++
++extern int squashfs_uncompress_block(void *d, int dstlen, void *s, int srclen);
++extern int squashfs_uncompress_init(void);
++extern int squashfs_uncompress_exit(void);
++
++/*
++ * macros to convert each packed bitfield structure from little endian to big
++ * endian and vice versa. These are needed when creating or using a filesystem
++ * on a machine with different byte ordering to the target architecture.
++ *
++ */
++
++#define SQUASHFS_SWAP_START \
++ int bits;\
++ int b_pos;\
++ unsigned long long val;\
++ unsigned char *s;\
++ unsigned char *d;
++
++#define SQUASHFS_SWAP_SUPER_BLOCK(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_super_block));\
++ SQUASHFS_SWAP((s)->s_magic, d, 0, 32);\
++ SQUASHFS_SWAP((s)->inodes, d, 32, 32);\
++ SQUASHFS_SWAP((s)->bytes_used_2, d, 64, 32);\
++ SQUASHFS_SWAP((s)->uid_start_2, d, 96, 32);\
++ SQUASHFS_SWAP((s)->guid_start_2, d, 128, 32);\
++ SQUASHFS_SWAP((s)->inode_table_start_2, d, 160, 32);\
++ SQUASHFS_SWAP((s)->directory_table_start_2, d, 192, 32);\
++ SQUASHFS_SWAP((s)->s_major, d, 224, 16);\
++ SQUASHFS_SWAP((s)->s_minor, d, 240, 16);\
++ SQUASHFS_SWAP((s)->block_size_1, d, 256, 16);\
++ SQUASHFS_SWAP((s)->block_log, d, 272, 16);\
++ SQUASHFS_SWAP((s)->flags, d, 288, 8);\
++ SQUASHFS_SWAP((s)->no_uids, d, 296, 8);\
++ SQUASHFS_SWAP((s)->no_guids, d, 304, 8);\
++ SQUASHFS_SWAP((s)->mkfs_time, d, 312, 32);\
++ SQUASHFS_SWAP((s)->root_inode, d, 344, 64);\
++ SQUASHFS_SWAP((s)->block_size, d, 408, 32);\
++ SQUASHFS_SWAP((s)->fragments, d, 440, 32);\
++ SQUASHFS_SWAP((s)->fragment_table_start_2, d, 472, 32);\
++ SQUASHFS_SWAP((s)->bytes_used, d, 504, 64);\
++ SQUASHFS_SWAP((s)->uid_start, d, 568, 64);\
++ SQUASHFS_SWAP((s)->guid_start, d, 632, 64);\
++ SQUASHFS_SWAP((s)->inode_table_start, d, 696, 64);\
++ SQUASHFS_SWAP((s)->directory_table_start, d, 760, 64);\
++ SQUASHFS_SWAP((s)->fragment_table_start, d, 824, 64);\
++ SQUASHFS_SWAP((s)->lookup_table_start, d, 888, 64);\
++}
++
++#define SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\
++ SQUASHFS_MEMSET(s, d, n);\
++ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++ SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++ SQUASHFS_SWAP((s)->uid, d, 16, 8);\
++ SQUASHFS_SWAP((s)->guid, d, 24, 8);\
++ SQUASHFS_SWAP((s)->mtime, d, 32, 32);\
++ SQUASHFS_SWAP((s)->inode_number, d, 64, 32);
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, n) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_ipc_inode_header))\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++}
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_dev_inode_header)); \
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->rdev, d, 128, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_symlink_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->symlink_size, d, 128, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_reg_inode_header));\
++ SQUASHFS_SWAP((s)->start_block, d, 96, 64);\
++ SQUASHFS_SWAP((s)->fragment, d, 160, 32);\
++ SQUASHFS_SWAP((s)->offset, d, 192, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 224, 32);\
++}
++
++#define SQUASHFS_SWAP_LREG_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_lreg_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 128, 64);\
++ SQUASHFS_SWAP((s)->fragment, d, 192, 32);\
++ SQUASHFS_SWAP((s)->offset, d, 224, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 256, 64);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_dir_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 128, 19);\
++ SQUASHFS_SWAP((s)->offset, d, 147, 13);\
++ SQUASHFS_SWAP((s)->start_block, d, 160, 32);\
++ SQUASHFS_SWAP((s)->parent_inode, d, 192, 32);\
++}
++
++#define SQUASHFS_SWAP_LDIR_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_ldir_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 128, 27);\
++ SQUASHFS_SWAP((s)->offset, d, 155, 13);\
++ SQUASHFS_SWAP((s)->start_block, d, 168, 32);\
++ SQUASHFS_SWAP((s)->i_count, d, 200, 16);\
++ SQUASHFS_SWAP((s)->parent_inode, d, 216, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_INDEX(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index));\
++ SQUASHFS_SWAP((s)->index, d, 0, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 32, 32);\
++ SQUASHFS_SWAP((s)->size, d, 64, 8);\
++}
++
++#define SQUASHFS_SWAP_DIR_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header));\
++ SQUASHFS_SWAP((s)->count, d, 0, 8);\
++ SQUASHFS_SWAP((s)->start_block, d, 8, 32);\
++ SQUASHFS_SWAP((s)->inode_number, d, 40, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_ENTRY(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry));\
++ SQUASHFS_SWAP((s)->offset, d, 0, 13);\
++ SQUASHFS_SWAP((s)->type, d, 13, 3);\
++ SQUASHFS_SWAP((s)->size, d, 16, 8);\
++ SQUASHFS_SWAP((s)->inode_number, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_ENTRY(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry));\
++ SQUASHFS_SWAP((s)->start_block, d, 0, 64);\
++ SQUASHFS_SWAP((s)->size, d, 64, 32);\
++}
++
++#define SQUASHFS_SWAP_INODE_T(s, d) SQUASHFS_SWAP_LONG_LONGS(s, d, 1)
++
++#define SQUASHFS_SWAP_SHORTS(s, d, n) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * 2);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ 16)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, 16);\
++}
++
++#define SQUASHFS_SWAP_INTS(s, d, n) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * 4);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ 32)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, 32);\
++}
++
++#define SQUASHFS_SWAP_LONG_LONGS(s, d, n) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * 8);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ 64)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, 64);\
++}
++
++#define SQUASHFS_SWAP_DATA(s, d, n, bits) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * bits / 8);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ bits)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, bits);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_INDEXES(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n)
++#define SQUASHFS_SWAP_LOOKUP_BLOCKS(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n)
++
++#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++
++struct squashfs_base_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++} __attribute__ ((packed));
++
++struct squashfs_ipc_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned int type:4;
++ unsigned int offset:4;
++} __attribute__ ((packed));
++
++struct squashfs_dev_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned short rdev;
++} __attribute__ ((packed));
++
++struct squashfs_symlink_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned short symlink_size;
++ char symlink[0];
++} __attribute__ ((packed));
++
++struct squashfs_reg_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned int mtime;
++ unsigned int start_block;
++ unsigned int file_size:32;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned int file_size:19;
++ unsigned int offset:13;
++ unsigned int mtime;
++ unsigned int start_block:24;
++} __attribute__ ((packed));
++
++union squashfs_inode_header_1 {
++ struct squashfs_base_inode_header_1 base;
++ struct squashfs_dev_inode_header_1 dev;
++ struct squashfs_symlink_inode_header_1 symlink;
++ struct squashfs_reg_inode_header_1 reg;
++ struct squashfs_dir_inode_header_1 dir;
++ struct squashfs_ipc_inode_header_1 ipc;
++};
++
++#define SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n) \
++ SQUASHFS_MEMSET(s, d, n);\
++ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++ SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++ SQUASHFS_SWAP((s)->uid, d, 16, 4);\
++ SQUASHFS_SWAP((s)->guid, d, 20, 4);
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n)\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_ipc_inode_header_1));\
++ SQUASHFS_SWAP((s)->type, d, 24, 4);\
++ SQUASHFS_SWAP((s)->offset, d, 28, 4);\
++}
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_dev_inode_header_1));\
++ SQUASHFS_SWAP((s)->rdev, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_symlink_inode_header_1));\
++ SQUASHFS_SWAP((s)->symlink_size, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_reg_inode_header_1));\
++ SQUASHFS_SWAP((s)->mtime, d, 24, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 56, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 88, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_dir_inode_header_1));\
++ SQUASHFS_SWAP((s)->file_size, d, 24, 19);\
++ SQUASHFS_SWAP((s)->offset, d, 43, 13);\
++ SQUASHFS_SWAP((s)->mtime, d, 56, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 88, 24);\
++}
++
++#endif
++
++#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
++
++struct squashfs_dir_index_2 {
++ unsigned int index:27;
++ unsigned int start_block:29;
++ unsigned char size;
++ unsigned char name[0];
++} __attribute__ ((packed));
++
++struct squashfs_base_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++} __attribute__ ((packed));
++
++struct squashfs_ipc_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++} __attribute__ ((packed));
++
++struct squashfs_dev_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned short rdev;
++} __attribute__ ((packed));
++
++struct squashfs_symlink_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned short symlink_size;
++ char symlink[0];
++} __attribute__ ((packed));
++
++struct squashfs_reg_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned int mtime;
++ unsigned int start_block;
++ unsigned int fragment;
++ unsigned int offset;
++ unsigned int file_size:32;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned int file_size:19;
++ unsigned int offset:13;
++ unsigned int mtime;
++ unsigned int start_block:24;
++} __attribute__ ((packed));
++
++struct squashfs_ldir_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned int file_size:27;
++ unsigned int offset:13;
++ unsigned int mtime;
++ unsigned int start_block:24;
++ unsigned int i_count:16;
++ struct squashfs_dir_index_2 index[0];
++} __attribute__ ((packed));
++
++union squashfs_inode_header_2 {
++ struct squashfs_base_inode_header_2 base;
++ struct squashfs_dev_inode_header_2 dev;
++ struct squashfs_symlink_inode_header_2 symlink;
++ struct squashfs_reg_inode_header_2 reg;
++ struct squashfs_dir_inode_header_2 dir;
++ struct squashfs_ldir_inode_header_2 ldir;
++ struct squashfs_ipc_inode_header_2 ipc;
++};
++
++struct squashfs_dir_header_2 {
++ unsigned int count:8;
++ unsigned int start_block:24;
++} __attribute__ ((packed));
++
++struct squashfs_dir_entry_2 {
++ unsigned int offset:13;
++ unsigned int type:3;
++ unsigned int size:8;
++ char name[0];
++} __attribute__ ((packed));
++
++struct squashfs_fragment_entry_2 {
++ unsigned int start_block;
++ unsigned int size;
++} __attribute__ ((packed));
++
++#define SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\
++ SQUASHFS_MEMSET(s, d, n);\
++ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++ SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++ SQUASHFS_SWAP((s)->uid, d, 16, 8);\
++ SQUASHFS_SWAP((s)->guid, d, 24, 8);\
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, n) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER_2(s, d) \
++ SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, sizeof(struct squashfs_ipc_inode_header_2))
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_dev_inode_header_2)); \
++ SQUASHFS_SWAP((s)->rdev, d, 32, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_symlink_inode_header_2));\
++ SQUASHFS_SWAP((s)->symlink_size, d, 32, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_reg_inode_header_2));\
++ SQUASHFS_SWAP((s)->mtime, d, 32, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 64, 32);\
++ SQUASHFS_SWAP((s)->fragment, d, 96, 32);\
++ SQUASHFS_SWAP((s)->offset, d, 128, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 160, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_dir_inode_header_2));\
++ SQUASHFS_SWAP((s)->file_size, d, 32, 19);\
++ SQUASHFS_SWAP((s)->offset, d, 51, 13);\
++ SQUASHFS_SWAP((s)->mtime, d, 64, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 96, 24);\
++}
++
++#define SQUASHFS_SWAP_LDIR_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_ldir_inode_header_2));\
++ SQUASHFS_SWAP((s)->file_size, d, 32, 27);\
++ SQUASHFS_SWAP((s)->offset, d, 59, 13);\
++ SQUASHFS_SWAP((s)->mtime, d, 72, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 104, 24);\
++ SQUASHFS_SWAP((s)->i_count, d, 128, 16);\
++}
++
++#define SQUASHFS_SWAP_DIR_INDEX_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_2));\
++ SQUASHFS_SWAP((s)->index, d, 0, 27);\
++ SQUASHFS_SWAP((s)->start_block, d, 27, 29);\
++ SQUASHFS_SWAP((s)->size, d, 56, 8);\
++}
++#define SQUASHFS_SWAP_DIR_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_2));\
++ SQUASHFS_SWAP((s)->count, d, 0, 8);\
++ SQUASHFS_SWAP((s)->start_block, d, 8, 24);\
++}
++
++#define SQUASHFS_SWAP_DIR_ENTRY_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_2));\
++ SQUASHFS_SWAP((s)->offset, d, 0, 13);\
++ SQUASHFS_SWAP((s)->type, d, 13, 3);\
++ SQUASHFS_SWAP((s)->size, d, 16, 8);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_ENTRY_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_2));\
++ SQUASHFS_SWAP((s)->start_block, d, 0, 32);\
++ SQUASHFS_SWAP((s)->size, d, 32, 32);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_INDEXES_2(s, d, n) SQUASHFS_SWAP_INTS(s, d, n)
++
++/* fragment and fragment table defines */
++#define SQUASHFS_FRAGMENT_BYTES_2(A) (A * sizeof(struct squashfs_fragment_entry_2))
++
++#define SQUASHFS_FRAGMENT_INDEX_2(A) (SQUASHFS_FRAGMENT_BYTES_2(A) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_OFFSET_2(A) (SQUASHFS_FRAGMENT_BYTES_2(A) % \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEXES_2(A) ((SQUASHFS_FRAGMENT_BYTES_2(A) + \
++ SQUASHFS_METADATA_SIZE - 1) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_BYTES_2(A) (SQUASHFS_FRAGMENT_INDEXES_2(A) *\
++ sizeof(int))
++
++#endif
++
++#ifdef __KERNEL__
++
++/*
++ * macros used to swap each structure entry, taking into account
++ * bitfields and different bitfield placing conventions on differing
++ * architectures
++ */
++
++#include <asm/byteorder.h>
++
++#ifdef __BIG_ENDIAN
++ /* convert from little endian to big endian */
++#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \
++ tbits, b_pos)
++#else
++ /* convert from big endian to little endian */
++#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \
++ tbits, 64 - tbits - b_pos)
++#endif
++
++#define _SQUASHFS_SWAP(value, p, pos, tbits, SHIFT) {\
++ b_pos = pos % 8;\
++ val = 0;\
++ s = (unsigned char *)p + (pos / 8);\
++ d = ((unsigned char *) &val) + 7;\
++ for(bits = 0; bits < (tbits + b_pos); bits += 8) \
++ *d-- = *s++;\
++ value = (val >> (SHIFT))/* & ((1 << tbits) - 1)*/;\
++}
++
++#define SQUASHFS_MEMSET(s, d, n) memset(s, 0, n);
++
++#endif
++#endif
+diff -x .gitignore -Nurp linux-2.6.24/include/linux/squashfs_fs_i.h linux-2.6.24-squashfs3.3/include/linux/squashfs_fs_i.h
+--- linux-2.6.24/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/include/linux/squashfs_fs_i.h 2007-08-19 04:24:08.000000000 +0100
+@@ -0,0 +1,45 @@
++#ifndef SQUASHFS_FS_I
++#define SQUASHFS_FS_I
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.demon.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs_i.h
++ */
++
++struct squashfs_inode_info {
++ long long start_block;
++ unsigned int offset;
++ union {
++ struct {
++ long long fragment_start_block;
++ unsigned int fragment_size;
++ unsigned int fragment_offset;
++ long long block_list_start;
++ } s1;
++ struct {
++ long long directory_index_start;
++ unsigned int directory_index_offset;
++ unsigned int directory_index_count;
++ unsigned int parent_inode;
++ } s2;
++ } u;
++ struct inode vfs_inode;
++};
++#endif
+diff -x .gitignore -Nurp linux-2.6.24/include/linux/squashfs_fs_sb.h linux-2.6.24-squashfs3.3/include/linux/squashfs_fs_sb.h
+--- linux-2.6.24/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.24-squashfs3.3/include/linux/squashfs_fs_sb.h 2007-08-19 04:24:26.000000000 +0100
+@@ -0,0 +1,76 @@
++#ifndef SQUASHFS_FS_SB
++#define SQUASHFS_FS_SB
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.demon.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs_sb.h
++ */
++
++#include <linux/squashfs_fs.h>
++
++struct squashfs_cache {
++ long long block;
++ int length;
++ long long next_index;
++ char *data;
++};
++
++struct squashfs_fragment_cache {
++ long long block;
++ int length;
++ unsigned int locked;
++ char *data;
++};
++
++struct squashfs_sb_info {
++ struct squashfs_super_block sblk;
++ int devblksize;
++ int devblksize_log2;
++ int swap;
++ struct squashfs_cache *block_cache;
++ struct squashfs_fragment_cache *fragment;
++ int next_cache;
++ int next_fragment;
++ int next_meta_index;
++ unsigned int *uid;
++ unsigned int *guid;
++ long long *fragment_index;
++ unsigned int *fragment_index_2;
++ char *read_page;
++ struct mutex read_data_mutex;
++ struct mutex read_page_mutex;
++ struct mutex block_cache_mutex;
++ struct mutex fragment_mutex;
++ struct mutex meta_index_mutex;
++ wait_queue_head_t waitq;
++ wait_queue_head_t fragment_wait_queue;
++ struct meta_index *meta_index;
++ z_stream stream;
++ long long *inode_lookup_table;
++ int unused_cache_blks;
++ int unused_frag_blks;
++ int (*read_inode)(struct inode *i, squashfs_inode_t \
++ inode);
++ long long (*read_blocklist)(struct inode *inode, int \
++ index, int readahead_blks, char *block_list, \
++ unsigned short **block_p, unsigned int *bsize);
++ int (*read_fragment_index_table)(struct super_block *s);
++};
++#endif
+diff -x .gitignore -Nurp linux-2.6.24/init/do_mounts_rd.c linux-2.6.24-squashfs3.3/init/do_mounts_rd.c
+--- linux-2.6.24/init/do_mounts_rd.c 2007-10-25 17:41:49.000000000 +0100
++++ linux-2.6.24-squashfs3.3/init/do_mounts_rd.c 2007-11-01 05:06:25.000000000 +0000
+@@ -5,6 +5,7 @@
+ #include <linux/ext2_fs.h>
+ #include <linux/romfs_fs.h>
+ #include <linux/cramfs_fs.h>
++#include <linux/squashfs_fs.h>
+ #include <linux/initrd.h>
+ #include <linux/string.h>
+
+@@ -39,6 +40,7 @@ static int __init crd_load(int in_fd, in
+ * numbers could not be found.
+ *
+ * We currently check for the following magic numbers:
++ * squashfs
+ * minix
+ * ext2
+ * romfs
+@@ -53,6 +55,7 @@ identify_ramdisk_image(int fd, int start
+ struct ext2_super_block *ext2sb;
+ struct romfs_super_block *romfsb;
+ struct cramfs_super *cramfsb;
++ struct squashfs_super_block *squashfsb;
+ int nblocks = -1;
+ unsigned char *buf;
+
+@@ -64,6 +67,7 @@ identify_ramdisk_image(int fd, int start
+ ext2sb = (struct ext2_super_block *) buf;
+ romfsb = (struct romfs_super_block *) buf;
+ cramfsb = (struct cramfs_super *) buf;
++ squashfsb = (struct squashfs_super_block *) buf;
+ memset(buf, 0xe5, size);
+
+ /*
+@@ -101,6 +105,18 @@ identify_ramdisk_image(int fd, int start
+ goto done;
+ }
+
++ /* squashfs is at block zero too */
++ if (squashfsb->s_magic == SQUASHFS_MAGIC) {
++ printk(KERN_NOTICE
++ "RAMDISK: squashfs filesystem found at block %d\n",
++ start_block);
++ if (squashfsb->s_major < 3)
++ nblocks = (squashfsb->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++ else
++ nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++ goto done;
++ }
++
+ /*
+ * Read block 1 to test for minix and ext2 superblock
+ */
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch
new file mode 100644
index 0000000000..ba79b4a470
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch
@@ -0,0 +1,201 @@
+From d48a09b301d9a460d5ce027433e8cb8872e7b5c3 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:26:38 +0000
+Subject: [PATCH 01/64] Allow runtime registration of regions of memory that require dma bouncing.
+
+---
+ arch/arm/common/Kconfig | 4 ++
+ arch/arm/common/dmabounce.c | 82 ++++++++++++++++++++++++++++++++++++-
+ arch/arm/common/sa1111.c | 2 +-
+ arch/arm/mach-ixp4xx/Kconfig | 1 +
+ arch/arm/mach-ixp4xx/common-pci.c | 2 +-
+ 5 files changed, 87 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
+index 3e07346..5f357fb 100644
+--- a/arch/arm/common/Kconfig
++++ b/arch/arm/common/Kconfig
+@@ -13,10 +13,14 @@ config ICST307
+ config SA1111
+ bool
+ select DMABOUNCE
++ select PLATFORM_DMABOUNCE
+
+ config DMABOUNCE
+ bool
+
++config PLATFORM_DMABOUNCE
++ bool
++
+ config TIMER_ACORN
+ bool
+
+diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
+index 52fc6a8..ed80abe 100644
+--- a/arch/arm/common/dmabounce.c
++++ b/arch/arm/common/dmabounce.c
+@@ -16,6 +16,7 @@
+ *
+ * Copyright (C) 2002 Hewlett Packard Company.
+ * Copyright (C) 2004 MontaVista Software, Inc.
++ * Copyright (C) 2007 Dmitry Baryshkov <dbaryshkov@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -24,6 +25,7 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/rwsem.h>
+ #include <linux/slab.h>
+ #include <linux/device.h>
+ #include <linux/dma-mapping.h>
+@@ -80,6 +82,80 @@ struct dmabounce_device_info {
+ rwlock_t lock;
+ };
+
++struct dmabounce_check_entry {
++ struct list_head list;
++ dmabounce_check checker;
++ void *data;
++};
++
++static struct list_head checkers = LIST_HEAD_INIT(checkers);
++static rwlock_t checkers_lock = RW_LOCK_UNLOCKED;
++
++int
++dmabounce_register_checker(dmabounce_check function, void *data)
++{
++ unsigned long flags;
++ struct dmabounce_check_entry *entry =
++ kzalloc(sizeof(struct dmabounce_check_entry), GFP_ATOMIC);
++
++ if (!entry)
++ return ENOMEM;
++
++ INIT_LIST_HEAD(&entry->list);
++ entry->checker = function;
++ entry->data = data;
++
++ write_lock_irqsave(&checkers_lock, flags);
++ list_add(&entry->list, &checkers);
++ write_unlock_irqrestore(&checkers_lock, flags);
++
++ return 0;
++}
++
++void
++dmabounce_remove_checker(dmabounce_check function, void *data)
++{
++ unsigned long flags;
++ struct list_head *pos;
++
++ write_lock_irqsave(&checkers_lock, flags);
++ __list_for_each(pos, &checkers) {
++ struct dmabounce_check_entry *entry = container_of(pos,
++ struct dmabounce_check_entry, list);
++ if (entry->checker == function && entry->data == data) {
++ list_del(pos);
++ write_unlock_irqrestore(&checkers_lock, flags);
++ kfree(entry);
++ return;
++ }
++ }
++
++ write_unlock_irqrestore(&checkers_lock, flags);
++ printk(KERN_WARNING "dmabounce checker not found: %p\n", function);
++}
++
++static int dma_needs_bounce(struct device *dev, dma_addr_t dma, size_t size)
++{
++ unsigned long flags;
++ struct list_head *pos;
++
++ read_lock_irqsave(&checkers_lock, flags);
++ __list_for_each(pos, &checkers) {
++ struct dmabounce_check_entry *entry = container_of(pos,
++ struct dmabounce_check_entry, list);
++ if (entry->checker(dev, dma, size, entry->data)) {
++ read_unlock_irqrestore(&checkers_lock, flags);
++ return 1;
++ }
++ }
++
++ read_unlock_irqrestore(&checkers_lock, flags);
++#ifdef CONFIG_PLATFORM_DMABOUNCE
++ return platform_dma_needs_bounce(dev, dma, size);
++#else
++ return 0;
++#endif
++}
+ #ifdef STATS
+ static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+@@ -239,7 +315,7 @@ map_single(struct device *dev, void *ptr, size_t size,
+ struct safe_buffer *buf;
+
+ buf = alloc_safe_buffer(device_info, ptr, size, dir);
+- if (buf == 0) {
++ if (buf == NULL) {
+ dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
+ __func__, ptr);
+ return 0;
+@@ -643,7 +719,6 @@ dmabounce_unregister_dev(struct device *dev)
+ dev->bus_id, dev->bus->name);
+ }
+
+-
+ EXPORT_SYMBOL(dma_map_single);
+ EXPORT_SYMBOL(dma_unmap_single);
+ EXPORT_SYMBOL(dma_map_sg);
+@@ -653,6 +728,9 @@ EXPORT_SYMBOL(dma_sync_single_for_device);
+ EXPORT_SYMBOL(dma_sync_sg);
+ EXPORT_SYMBOL(dmabounce_register_dev);
+ EXPORT_SYMBOL(dmabounce_unregister_dev);
++EXPORT_SYMBOL(dmabounce_register_checker);
++EXPORT_SYMBOL(dmabounce_remove_checker);
++
+
+ MODULE_AUTHOR("Christopher Hoover <ch@hpl.hp.com>, Deepak Saxena <dsaxena@plexity.net>");
+ MODULE_DESCRIPTION("Special dma_{map/unmap/dma_sync}_* routines for systems with limited DMA windows");
+diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
+index eb06d0b..3b8fbdd 100644
+--- a/arch/arm/common/sa1111.c
++++ b/arch/arm/common/sa1111.c
+@@ -778,7 +778,7 @@ static void __sa1111_remove(struct sa1111 *sachip)
+ * This should only get called for sa1111_device types due to the
+ * way we configure our device dma_masks.
+ */
+-int dma_needs_bounce(struct device *dev, dma_addr_t addr, size_t size)
++int platform_dma_needs_bounce(struct device *dev, dma_addr_t addr, size_t size)
+ {
+ /*
+ * Section 4.6 of the "Intel StrongARM SA-1111 Development Module
+diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
+index 61b2dfc..5870371 100644
+--- a/arch/arm/mach-ixp4xx/Kconfig
++++ b/arch/arm/mach-ixp4xx/Kconfig
+@@ -161,6 +161,7 @@ comment "IXP4xx Options"
+ config DMABOUNCE
+ bool
+ default y
++ select PLATFORM_DMABOUNCE
+ depends on PCI
+
+ config IXP4XX_INDIRECT_PCI
+diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
+index bf04121..ac46492 100644
+--- a/arch/arm/mach-ixp4xx/common-pci.c
++++ b/arch/arm/mach-ixp4xx/common-pci.c
+@@ -336,7 +336,7 @@ static int ixp4xx_pci_platform_notify_remove(struct device *dev)
+ return 0;
+ }
+
+-int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
++int platform_dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
+ {
+ return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
+ }
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0001-pxa2xx-ac97-switch-AC-unit-to-correct-state-before.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0001-pxa2xx-ac97-switch-AC-unit-to-correct-state-before.patch
new file mode 100644
index 0000000000..09f0cb946c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0001-pxa2xx-ac97-switch-AC-unit-to-correct-state-before.patch
@@ -0,0 +1,56 @@
+From 688df15bb534519e0698cc8e4a4d9234afd32105 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 7 Nov 2008 15:50:39 +0300
+Subject: [PATCH] pxa2xx-ac97: switch AC unit to correct state before probing
+
+If AC97 unit is in partially enabled state, early request_irq can trigger
+IRQ storm or even full hang up. Workaround this by forcibly switching ACLINK off
+at the start of the probe.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ sound/soc/pxa/pxa2xx-ac97.c | 30 +++++++++++++++++-------------
+ 1 files changed, 17 insertions(+), 13 deletions(-)
+
+Index: linux-2.6.24/sound/soc/pxa/pxa2xx-ac97.c
+===================================================================
+--- linux-2.6.24.orig/sound/soc/pxa/pxa2xx-ac97.c 2008-01-25 01:58:37.000000000 +0300
++++ linux-2.6.24/sound/soc/pxa/pxa2xx-ac97.c 2008-11-15 20:02:45.396976363 +0300
+@@ -284,10 +284,6 @@ static int pxa2xx_ac97_probe(struct plat
+ {
+ int ret;
+
+- ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
+- if (ret < 0)
+- goto err;
+-
+ pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
+ pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
+ pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
+@@ -296,15 +292,23 @@ static int pxa2xx_ac97_probe(struct plat
+ /* Use GPIO 113 as AC97 Reset on Bulverde */
+ pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
+ #endif
++ GCR = GCR_ACLINK_OFF;
++
+ pxa_set_cken(CKEN_AC97, 1);
++
++ ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
++ if (ret < 0)
++ goto err;
++
++
+ return 0;
+
+- err:
+- if (CKEN & (1 << CKEN_AC97)) {
++err:
++/* if (CKEN & (1 << CKEN_AC97)) {*/
+ GCR |= GCR_ACLINK_OFF;
+ free_irq(IRQ_AC97, NULL);
+ pxa_set_cken(CKEN_AC97, 0);
+- }
++/* }*/
+ return ret;
+ }
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch
new file mode 100644
index 0000000000..a562ef921b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch
@@ -0,0 +1,260 @@
+From 8e95f90487d2fb46fd862744ddb34f47c30b0c5a Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:27:50 +0000
+Subject: [PATCH 02/64] Modify dma_alloc_coherent on ARM so that it supports device local DMA.
+
+---
+ arch/arm/mm/consistent.c | 125 +++++++++++++++++++++++++++++++++++++++++
+ include/asm-arm/dma-mapping.h | 37 +++++++------
+ 2 files changed, 145 insertions(+), 17 deletions(-)
+
+diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
+index 333a82a..3da0f94 100644
+--- a/arch/arm/mm/consistent.c
++++ b/arch/arm/mm/consistent.c
+@@ -3,6 +3,8 @@
+ *
+ * Copyright (C) 2000-2004 Russell King
+ *
++ * Device local coherent memory support added by Ian Molton (spyro@f2s.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.
+@@ -20,6 +22,7 @@
+
+ #include <asm/memory.h>
+ #include <asm/cacheflush.h>
++#include <asm/io.h>
+ #include <asm/tlbflush.h>
+ #include <asm/sizes.h>
+
+@@ -35,6 +38,13 @@
+ #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT)
+ #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT)
+
++struct dma_coherent_mem {
++ void *virt_base;
++ u32 device_base;
++ int size;
++ int flags;
++ unsigned long *bitmap;
++};
+
+ /*
+ * These are the page tables (2MB each) covering uncached, DMA consistent allocations
+@@ -153,6 +163,13 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
+ unsigned long order;
+ u64 mask = ISA_DMA_THRESHOLD, limit;
+
++ /* Following is a work-around (a.k.a. hack) to prevent pages
++ * with __GFP_COMP being passed to split_page() which cannot
++ * handle them. The real problem is that this flag probably
++ * should be 0 on ARM as it is not supported on this
++ * platform--see CONFIG_HUGETLB_PAGE. */
++ gfp &= ~(__GFP_COMP);
++
+ if (!consistent_pte[0]) {
+ printk(KERN_ERR "%s: not initialised\n", __func__);
+ dump_stack();
+@@ -160,6 +177,26 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
+ }
+
+ if (dev) {
++
++ if (dev->dma_mem) {
++ unsigned long flags;
++ int pgnum;
++ void *ret;
++
++ spin_lock_irqsave(&consistent_lock, flags);
++ pgnum = bitmap_find_free_region(dev->dma_mem->bitmap,
++ dev->dma_mem->size,
++ get_order(size));
++ spin_unlock_irqrestore(&consistent_lock, flags);
++
++ if (pgnum >= 0) {
++ *handle = dev->dma_mem->device_base + (pgnum << PAGE_SHIFT);
++ ret = dev->dma_mem->virt_base + (pgnum << PAGE_SHIFT);
++ memset(ret, 0, size);
++ return ret;
++ }
++ }
++
+ mask = dev->coherent_dma_mask;
+
+ /*
+@@ -177,6 +214,9 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
+ mask, (unsigned long long)ISA_DMA_THRESHOLD);
+ goto no_page;
+ }
++
++ if (dev->dma_mem && dev->dma_mem->flags & DMA_MEMORY_EXCLUSIVE)
++ return NULL;
+ }
+
+ /*
+@@ -359,6 +399,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
+ pte_t *ptep;
+ int idx;
+ u32 off;
++ struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
++ unsigned long order;
+
+ WARN_ON(irqs_disabled());
+
+@@ -368,6 +410,15 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
+ }
+
+ size = PAGE_ALIGN(size);
++ order = get_order(size);
++
++ /* What if mem is valid and the range is not? */
++ if (mem && cpu_addr >= mem->virt_base && cpu_addr < (mem->virt_base + (mem->size << PAGE_SHIFT))) {
++ int page = (cpu_addr - mem->virt_base) >> PAGE_SHIFT;
++
++ bitmap_release_region(mem->bitmap, page, order);
++ return;
++ }
+
+ spin_lock_irqsave(&consistent_lock, flags);
+ c = vm_region_find(&consistent_head, (unsigned long)cpu_addr);
+@@ -437,6 +488,80 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
+ }
+ EXPORT_SYMBOL(dma_free_coherent);
+
++int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
++ dma_addr_t device_addr, size_t size, int flags)
++{
++ void __iomem *mem_base;
++ int pages = size >> PAGE_SHIFT;
++ int bitmap_size = (pages + 31)/32;
++
++ if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
++ goto out;
++ if (!size)
++ goto out;
++ if (dev->dma_mem)
++ goto out;
++
++ /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
++ mem_base = ioremap_nocache(bus_addr, size);
++ if (!mem_base)
++ goto out;
++
++ dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
++ if (!dev->dma_mem)
++ goto out;
++ memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem));
++ dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
++ if (!dev->dma_mem->bitmap)
++ goto free1_out;
++
++ dev->dma_mem->virt_base = mem_base;
++ dev->dma_mem->device_base = device_addr;
++ dev->dma_mem->size = pages;
++ dev->dma_mem->flags = flags;
++
++ if (flags & DMA_MEMORY_MAP)
++ return DMA_MEMORY_MAP;
++
++ return DMA_MEMORY_IO;
++
++ free1_out:
++ kfree(dev->dma_mem->bitmap);
++ out:
++ return 0;
++}
++EXPORT_SYMBOL(dma_declare_coherent_memory);
++
++void dma_release_declared_memory(struct device *dev)
++{
++ struct dma_coherent_mem *mem = dev->dma_mem;
++
++ if (!mem)
++ return;
++ dev->dma_mem = NULL;
++ kfree(mem->bitmap);
++ kfree(mem);
++}
++EXPORT_SYMBOL(dma_release_declared_memory);
++
++void *dma_mark_declared_memory_occupied(struct device *dev,
++ dma_addr_t device_addr, size_t size)
++{
++ struct dma_coherent_mem *mem = dev->dma_mem;
++ int pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
++ int pos, err;
++
++ if (!mem)
++ return ERR_PTR(-EINVAL);
++
++ pos = (device_addr - mem->device_base) >> PAGE_SHIFT;
++ err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages));
++ if (err != 0)
++ return ERR_PTR(err);
++ return mem->virt_base + (pos << PAGE_SHIFT);
++}
++EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
++
+ /*
+ * Initialise the consistent memory allocation.
+ */
+diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
+index e99406a..f18ba05 100644
+--- a/include/asm-arm/dma-mapping.h
++++ b/include/asm-arm/dma-mapping.h
+@@ -7,6 +7,19 @@
+
+ #include <linux/scatterlist.h>
+
++#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
++extern int
++dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
++ dma_addr_t device_addr, size_t size, int flags);
++
++extern void
++dma_release_declared_memory(struct device *dev);
++
++extern void *
++dma_mark_declared_memory_occupied(struct device *dev,
++ dma_addr_t device_addr, size_t size);
++
++
+ /*
+ * DMA-consistent mapping functions. These allocate/free a region of
+ * uncached, unwrite-buffered mapped memory space for use with DMA
+@@ -433,23 +446,13 @@ extern int dmabounce_register_dev(struct device *, unsigned long, unsigned long)
+ */
+ extern void dmabounce_unregister_dev(struct device *);
+
+-/**
+- * dma_needs_bounce
+- *
+- * @dev: valid struct device pointer
+- * @dma_handle: dma_handle of unbounced buffer
+- * @size: size of region being mapped
+- *
+- * Platforms that utilize the dmabounce mechanism must implement
+- * this function.
+- *
+- * The dmabounce routines call this function whenever a dma-mapping
+- * is requested to determine whether a given buffer needs to be bounced
+- * or not. The function must return 0 if the buffer is OK for
+- * DMA access and 1 if the buffer needs to be bounced.
+- *
+- */
+-extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
++typedef int (*dmabounce_check)(struct device *dev, dma_addr_t dma, size_t size, void *data);
++extern int dmabounce_register_checker(dmabounce_check, void *data);
++extern void dmabounce_remove_checker(dmabounce_check, void *data);
++#ifdef CONFIG_PLATFORM_DMABOUNCE
++extern int platform_dma_needs_bounce(struct device *dev, dma_addr_t dma, size_t size, void *data);
++#endif
++
+ #endif /* CONFIG_DMABOUNCE */
+
+ #endif /* __KERNEL__ */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0003-Core-MFD-support.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0003-Core-MFD-support.patch
new file mode 100644
index 0000000000..d84a4f7835
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0003-Core-MFD-support.patch
@@ -0,0 +1,243 @@
+From a07910753f9965842b6647f0561db125b538f5ed Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:32:44 +0000
+Subject: [PATCH 03/64] Core MFD support
+
+This patch provides a common subdevice registration system for MFD type
+chips, using platfrom device.
+
+It also provides a new resource type for IRQs such that a subdevices IRQ may
+be computed based on the MFD cores IRQ handler, since many MFDs provide an IRQ
+multiplex.
+---
+ drivers/mfd/Kconfig | 4 ++
+ drivers/mfd/Makefile | 2 +
+ drivers/mfd/mfd-core.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/ioport.h | 1 +
+ include/linux/mfd-core.h | 51 ++++++++++++++++++++
+ 5 files changed, 174 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/mfd-core.c
+ create mode 100644 include/linux/mfd-core.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 2571619..1205c89 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -5,6 +5,10 @@
+ menu "Multifunction device drivers"
+ depends on HAS_IOMEM
+
++config MFD_CORE
++ tristate
++ default n
++
+ config MFD_SM501
+ tristate "Support for Silicon Motion SM501"
+ ---help---
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 5143209..6c20064 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -4,6 +4,8 @@
+
+ obj-$(CONFIG_MFD_SM501) += sm501.o
+
++obj-$(CONFIG_MFD_CORE) += mfd-core.o
++
+ obj-$(CONFIG_MCP) += mcp-core.o
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
+diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
+new file mode 100644
+index 0000000..88874e1
+--- /dev/null
++++ b/drivers/mfd/mfd-core.c
+@@ -0,0 +1,116 @@
++/*
++ * drivers/mfd/mfd-core.c
++ *
++ * core MFD support
++ * Copyright (c) 2006 Ian Molton
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++
++#define SIGNED_SHIFT(val, shift) ((shift) >= 0 ? \
++ ((val) << (shift)) : \
++ ((val) >> -(shift)))
++
++int mfd_add_devices(
++ struct platform_device *parent,
++ const struct mfd_cell *cells, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift,
++ int irq_base)
++{
++ int i;
++
++ for (i = 0; i < n_devs; i++) {
++ struct resource *res = NULL;
++ const struct mfd_cell *cell = cells + i;
++ struct platform_device *pdev;
++ int ret = -ENOMEM;
++ int r;
++
++ pdev = platform_device_alloc(cell->name, -1);
++ if (!pdev)
++ goto fail_alloc;
++
++ pdev->dev.uevent_suppress = 0;
++ pdev->dev.parent = &parent->dev;
++
++ ret = platform_device_add_data(pdev, &cell, sizeof(struct mfd_cell *));
++ if (ret)
++ goto fail_device;
++
++ res = kzalloc(cell->num_resources * sizeof(struct resource),
++ GFP_KERNEL);
++ if (!res)
++ goto fail_device;
++
++ for (r = 0; r < cell->num_resources; r++) {
++ res[r].name = cell->resources[r].name;
++
++ /* Find out base to use */
++ if (cell->resources[r].flags & IORESOURCE_MEM) {
++ res[r].parent = mem;
++ res[r].start = mem->start +
++ SIGNED_SHIFT(cell->resources[r].start,
++ relative_addr_shift);
++ res[r].end = mem->start +
++ SIGNED_SHIFT(cell->resources[r].end,
++ relative_addr_shift);
++ } else if ((cell->resources[r].flags & IORESOURCE_IRQ) &&
++ (cell->resources[r].flags & IORESOURCE_IRQ_MFD_SUBDEVICE)) {
++ res[r].start = irq_base +
++ cell->resources[r].start;
++ res[r].end = irq_base +
++ cell->resources[r].end;
++ } else {
++ res[r].start = cell->resources[r].start;
++ res[r].end = cell->resources[r].end;
++ }
++
++ res[r].flags = cell->resources[r].flags;
++ }
++
++ ret = platform_device_add_resources(pdev,
++ res,
++ cell->num_resources);
++ kfree(res);
++
++ if (ret)
++ goto fail_device;
++
++ ret = platform_device_add(pdev);
++
++ if (ret) {
++ platform_device_del(pdev);
++fail_device:
++ platform_device_put(pdev);
++fail_alloc:
++ mfd_remove_devices(parent);
++ return ret;
++ }
++ }
++ return 0;
++}
++EXPORT_SYMBOL(mfd_add_devices);
++
++static int mfd_remove_devices_fn(struct device *dev, void *unused)
++{
++ platform_device_unregister(container_of(dev, struct platform_device, dev));
++ return 0;
++}
++
++void mfd_remove_devices(struct platform_device *parent)
++{
++ device_for_each_child(&parent->dev, NULL, mfd_remove_devices_fn);
++}
++EXPORT_SYMBOL(mfd_remove_devices);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov");
+diff --git a/include/linux/ioport.h b/include/linux/ioport.h
+index 6187a85..0348c71 100644
+--- a/include/linux/ioport.h
++++ b/include/linux/ioport.h
+@@ -56,6 +56,7 @@ struct resource_list {
+ #define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
+ #define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+ #define IORESOURCE_IRQ_SHAREABLE (1<<4)
++#define IORESOURCE_IRQ_MFD_SUBDEVICE (1<<5)
+
+ /* ISA PnP DMA specific bits (IORESOURCE_BITS) */
+ #define IORESOURCE_DMA_TYPE_MASK (3<<0)
+diff --git a/include/linux/mfd-core.h b/include/linux/mfd-core.h
+new file mode 100644
+index 0000000..0e9de78
+--- /dev/null
++++ b/include/linux/mfd-core.h
+@@ -0,0 +1,51 @@
++#ifndef MFD_CORE_H
++#define MFD_CORE_H
++/*
++ * drivers/mfd/mfd-core.h
++ *
++ * core MFD support
++ * Copyright (c) 2006 Ian Molton
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * 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/platform_device.h>
++
++struct mfd_cell {
++ const char *name;
++
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++
++ void *driver_data; /* data passed to drivers */
++
++ /*
++ * This resources can be specified relatievly to the parent device.
++ * For accessing device you should use resources from device
++ */
++ int num_resources;
++ const struct resource *resources;
++};
++
++static inline __maybe_unused struct mfd_cell *
++mfd_get_cell(struct platform_device *pdev)
++{
++ return *((struct mfd_cell **)(pdev->dev.platform_data));
++}
++
++extern int mfd_add_devices(
++ struct platform_device *parent,
++ const struct mfd_cell *cells, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift,
++ int irq_base);
++
++extern void mfd_remove_devices(struct platform_device *parent);
++
++#endif
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch
new file mode 100644
index 0000000000..a78c0f37f3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch
@@ -0,0 +1,907 @@
+From 3f56cac281fb407b7d8e574d18ee7d72aa7e7c28 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:02:30 +0000
+Subject: [PATCH 04/64] Add support for tc6393xb MFD core
+
+---
+ drivers/mfd/Kconfig | 6 +
+ drivers/mfd/Makefile | 2 +
+ drivers/mfd/tc6393xb.c | 740 ++++++++++++++++++++++++++++++++++++++++++
+ include/linux/mfd/tc6393xb.h | 108 ++++++
+ 4 files changed, 856 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/tc6393xb.c
+ create mode 100644 include/linux/mfd/tc6393xb.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 1205c89..9903d0a 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -9,6 +9,12 @@ config MFD_CORE
+ tristate
+ default n
+
++config MFD_TC6393XB
++ bool "Support Toshiba TC6393XB"
++ select MFD_CORE
++ help
++ Support for Toshiba Mobile IO Controller TC6393XB
++
+ config MFD_SM501
+ tristate "Support for Silicon Motion SM501"
+ ---help---
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 6c20064..ffd342e 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -6,6 +6,8 @@ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MFD_CORE) += mfd-core.o
+
++obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
++
+ obj-$(CONFIG_MCP) += mcp-core.o
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+new file mode 100644
+index 0000000..9439f39
+--- /dev/null
++++ b/drivers/mfd/tc6393xb.c
+@@ -0,0 +1,740 @@
++/*
++ * Toshiba TC6393XB SoC support
++ *
++ * Copyright(c) 2005-2006 Chris Humbert
++ * Copyright(c) 2005 Dirk Opfer
++ * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
++ * Copyright(c) 2007 Dmitry Baryshkov
++ *
++ * Based on code written by Sharp/Lineo for 2.4 kernels
++ * Based on locomo.c
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/io.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/mfd/tc6393xb.h>
++
++struct tc6393xb_scr {
++ u8 x00[8];
++ u8 revid; /* 0x08 Revision ID */
++ u8 x01[0x47];
++ u8 isr; /* 0x50 Interrupt Status */
++ u8 x02;
++ u8 imr; /* 0x52 Interrupt Mask */
++ u8 x03;
++ u8 irr; /* 0x54 Interrupt Routing */
++ u8 x04[0x0b];
++ u16 gper; /* 0x60 GP Enable */
++ u8 x05[2];
++ u16 gpi_sr[2]; /* 0x64 GPI Status */
++ u16 gpi_imr[2]; /* 0x68 GPI INT Mask */
++ u16 gpi_eder[2]; /* 0x6c GPI Edge Detect Enable */
++ u16 gpi_lir[4]; /* 0x70 GPI Level Invert */
++ u16 gpo_dsr[2]; /* 0x78 GPO Data Set */
++ u16 gpo_doecr[2]; /* 0x7c GPO Data OE Control */
++ u16 gp_iarcr[2]; /* 0x80 GP Internal Active Reg Control */
++ u16 gp_iarlcr[2]; /* 0x84 GP Internal Active Reg Level Con*/
++ u8 gpi_bcr[4]; /* 0x88 GPI Buffer Control */
++ u16 gpa_iarcr; /* 0x8c GPa Internal Active Reg Control */
++ u8 x06[2];
++ u16 gpa_iarlcr; /* 0x90 GPa Internal Active Reg Level Co*/
++ u8 x07[2];
++ u16 gpa_bcr; /* 0x94 GPa Buffer Control */
++ u8 x08[2];
++ u16 ccr; /* 0x98 Clock Control */
++ u16 pll2cr; /* 0x9a PLL2 Control */
++ u16 pll1cr[2]; /* 0x9c PLL1 Control */
++ u8 diarcr; /* 0xa0 Device Internal Active Reg Contr*/
++ u8 dbocr; /* 0xa1 Device Buffer Off Control */
++ u8 x09[0x3e];
++ u8 fer; /* 0xe0 Function Enable */
++ u8 x10[3];
++ u16 mcr; /* 0xe4 Mode Control */
++ u8 x11[0x14];
++ u8 config; /* 0xfc Configuration Control */
++ u8 x12[2];
++ u8 debug; /* 0xff Debug */
++} __attribute__ ((packed));
++
++/*--------------------------------------------------------------------------*/
++
++struct tc6393xb {
++ struct tc6393xb_scr __iomem *scr;
++
++ spinlock_t lock; /* protects RMW cycles */
++
++ struct {
++ union tc6393xb_scr_fer fer;
++ union tc6393xb_scr_ccr ccr;
++ u8 gpi_bcr[4];
++ } suspend_state;
++
++ struct resource rscr;
++ struct resource *iomem;
++ int irq;
++};
++
++/*--------------------------------------------------------------------------*/
++
++static int tc6393xb_mmc_enable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.ck32ken = 1;
++ iowrite16(ccr.raw, &scr->ccr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_mmc_disable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.ck32ken = 0;
++ iowrite16(ccr.raw, &scr->ccr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++static int tc6393xb_nand_disable(struct platform_device *nand)
++{
++ return 0;
++}
++
++static int tc6393xb_nand_enable(struct platform_device *nand)
++{
++ struct platform_device *dev = to_platform_device(nand->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ /* SMD buffer on */
++ dev_dbg(&dev->dev, "SMD buffer on\n");
++ iowrite8(0xff, scr->gpi_bcr + 1);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++int tc6393xb_lcd_set_power(struct platform_device *fb, bool on)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.slcden = on ? 1 : 0;
++ iowrite8(fer.raw, &scr->fer);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++EXPORT_SYMBOL(tc6393xb_lcd_set_power);
++
++int tc6393xb_lcd_mode(struct platform_device *fb_dev,
++ struct fb_videomode *mode) {
++ struct tc6393xb *tc6393xb =
++ platform_get_drvdata(to_platform_device(fb_dev->dev.parent));
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++
++ iowrite16(mode->pixclock, scr->pll1cr + 0);
++ iowrite16(mode->pixclock >> 16, scr->pll1cr + 1);
++
++ return 0;
++}
++EXPORT_SYMBOL(tc6393xb_lcd_mode);
++
++static int tc6393xb_ohci_disable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.usben = 0;
++ iowrite8(fer.raw, &scr->fer);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 0;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_ohci_enable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 1;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.usben = 1;
++ iowrite8(fer.raw, &scr->fer);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_disable(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ /*
++ * FIXME: is this correct or it should be moved to other _disable?
++ */
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.slcden = 0;
++/* fer.bits.lcdcven = 0; */
++ iowrite8(fer.raw, &scr->fer);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = disable;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_enable(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = m48MHz;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_suspend(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = disable;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_resume(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = m48MHz;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static struct resource tc6393xb_mmc_resources[] = {
++ {
++ .name = TMIO_MMC_CONTROL,
++ .start = 0x800,
++ .end = 0x9ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_CONFIG,
++ .start = 0x200,
++ .end = 0x2ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_IRQ,
++ .start = IRQ_TC6393_MMC,
++ .end = IRQ_TC6393_MMC,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource tc6393xb_nand_resources[] = {
++ {
++ .name = TMIO_NAND_CONFIG,
++ .start = 0x0100,
++ .end = 0x01ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_CONTROL,
++ .start = 0x1000,
++ .end = 0x1007,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_IRQ,
++ .start = IRQ_TC6393_NAND,
++ .end = IRQ_TC6393_NAND,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource tc6393xb_ohci_resources[] = {
++ {
++ .name = TMIO_OHCI_CONFIG,
++ .start = 0x0300,
++ .end = 0x03ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_CONTROL,
++ .start = 0x3000,
++ .end = 0x31ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_SRAM,
++ .start = 0x010000,
++ .end = 0x017fff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_SRAM_ALIAS,
++ .start = 0x018000,
++ .end = 0x01ffff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_IRQ,
++ .start = IRQ_TC6393_OHCI,
++ .end = IRQ_TC6393_OHCI,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource tc6393xb_fb_resources[] = {
++ {
++ .name = TMIO_FB_CONFIG,
++ .start = 0x0500,
++ .end = 0x05ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_FB_CONTROL,
++ .start = 0x5000,
++ .end = 0x51ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_FB_VRAM,
++ .start = 0x100000,
++ .end = 0x1fffff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_FB_IRQ,
++ .start = IRQ_TC6393_FB,
++ .end = IRQ_TC6393_FB,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++static struct mfd_cell tc6393xb_cells[] = {
++ {
++ .name = "tmio-nand",
++ .enable = tc6393xb_nand_enable,
++ .disable = tc6393xb_nand_disable,
++ .num_resources = ARRAY_SIZE(tc6393xb_nand_resources),
++ .resources = tc6393xb_nand_resources,
++ },
++ {
++ .name = "tmio-ohci",
++ .enable = tc6393xb_ohci_enable,
++ .disable = tc6393xb_ohci_disable,
++ .num_resources = ARRAY_SIZE(tc6393xb_ohci_resources),
++ .resources = tc6393xb_ohci_resources,
++ },
++ {
++ .name = "tmio-fb",
++ .enable = tc6393xb_fb_enable,
++ .disable = tc6393xb_fb_disable,
++ .suspend = tc6393xb_fb_suspend,
++ .resume = tc6393xb_fb_resume,
++ .num_resources = ARRAY_SIZE(tc6393xb_fb_resources),
++ .resources = tc6393xb_fb_resources,
++ },
++ {
++ .name = "tmio-mmc",
++ .enable = tc6393xb_mmc_enable,
++ .disable = tc6393xb_mmc_disable,
++ .num_resources = ARRAY_SIZE(tc6393xb_mmc_resources),
++ .resources = tc6393xb_mmc_resources,
++ },
++};
++
++/*--------------------------------------------------------------------------*/
++
++static void
++tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned int isr;
++ unsigned int i;
++
++ desc->chip->ack(irq);
++
++ while ((isr = ioread8(&scr->isr) & ~ioread8(&scr->imr)))
++ for (i = 0; i < TC6393XB_NR_IRQS; i++) {
++ if (isr & (1 << i))
++ desc_handle_irq(tcpd->irq_base + i,
++ irq_desc + tcpd->irq_base + i);
++ }
++}
++
++static void tc6393xb_irq_ack(unsigned int irq)
++{
++}
++
++static void tc6393xb_irq_mask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) | (1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++}
++
++static void tc6393xb_irq_unmask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) & ~(1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++}
++
++static struct irq_chip tc6393xb_chip = {
++ .name = "tc6393xb",
++ .ack = tc6393xb_irq_ack,
++ .mask = tc6393xb_irq_mask,
++ .unmask = tc6393xb_irq_unmask,
++};
++
++static void tc6393xb_attach_irq(struct platform_device *dev)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + TC6393XB_NR_IRQS;
++ irq++) {
++ set_irq_chip(irq, &tc6393xb_chip);
++ set_irq_chip_data(irq, dev);
++ set_irq_handler(irq, handle_edge_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++
++ set_irq_type(tc6393xb->irq, IRQT_FALLING);
++ set_irq_chip_data(tc6393xb->irq, dev);
++ set_irq_chained_handler(tc6393xb->irq, tc6393xb_irq);
++}
++
++static void tc6393xb_detach_irq(struct platform_device *dev)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ set_irq_chained_handler(tc6393xb->irq, NULL);
++ set_irq_chip_data(tc6393xb->irq, NULL);
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + TC6393XB_NR_IRQS;
++ irq++) {
++ set_irq_flags(irq, 0);
++ set_irq_chip(irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++}
++
++static int tc6393xb_hw_init(struct platform_device *dev, int resume)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ int ret;
++ int i;
++
++ if (resume)
++ ret = tcpd->resume(dev);
++ else
++ ret = tcpd->enable(dev);
++ if (ret)
++ return ret;
++
++ iowrite8(resume ?
++ tc6393xb->suspend_state.fer.raw :
++ 0, &scr->fer);
++ iowrite16(tcpd->scr_pll2cr, &scr->pll2cr);
++ iowrite16(resume?
++ tc6393xb->suspend_state.ccr.raw :
++ tcpd->scr_ccr.raw, &scr->ccr);
++ iowrite16(tcpd->scr_mcr.raw, &scr->mcr);
++ iowrite16(tcpd->scr_gper, &scr->gper);
++ iowrite8(0, &scr->irr);
++ iowrite8(0xbf, &scr->imr);
++ iowrite16(tcpd->scr_gpo_dsr, scr->gpo_dsr + 0);
++ iowrite16(tcpd->scr_gpo_dsr >> 16, scr->gpo_dsr + 1);
++ iowrite16(tcpd->scr_gpo_doecr, scr->gpo_doecr + 0);
++ iowrite16(tcpd->scr_gpo_doecr >> 16, scr->gpo_doecr + 1);
++
++ if (resume)
++ for (i = 0; i < 4; i++)
++ iowrite8(tc6393xb->suspend_state.gpi_bcr[i],
++ scr->gpi_bcr + i);
++
++ return 0;
++}
++
++static int __devinit tc6393xb_probe(struct platform_device *dev)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb;
++ struct resource *iomem;
++ struct resource *rscr;
++ int retval;
++
++ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
++ if (!iomem)
++ return -EINVAL;
++
++ tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL);
++ if (!tc6393xb) {
++ retval = -ENOMEM;
++ goto err_kzalloc;
++ }
++
++ spin_lock_init(&tc6393xb->lock);
++
++ platform_set_drvdata(dev, tc6393xb);
++ tc6393xb->iomem = iomem;
++ tc6393xb->irq = platform_get_irq(dev, 0);
++
++ rscr = &tc6393xb->rscr;
++ rscr->name = "tc6393xb-core";
++ rscr->start = iomem->start;
++ rscr->end = iomem->start + 0xff;
++ rscr->flags = IORESOURCE_MEM;
++
++ retval = request_resource(iomem, rscr);
++ if (retval)
++ goto err_request_scr;
++
++ tc6393xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
++ if (!tc6393xb->scr) {
++ retval = -ENOMEM;
++ goto err_ioremap;
++ }
++
++ retval = tc6393xb_hw_init(dev, 0);
++ if (retval)
++ goto err_hw_init;
++
++ printk(KERN_INFO "Toshiba tc6393xb revision %d at 0x%08lx, irq %d\n",
++ ioread8(&tc6393xb->scr->revid),
++ (unsigned long) iomem->start, tc6393xb->irq);
++
++ if (tc6393xb->irq)
++ tc6393xb_attach_irq(dev);
++
++ tc6393xb_cells[0].driver_data = tcpd->nand_data;
++ tc6393xb_cells[1].driver_data = NULL; /* tcpd->ohci_data; */
++ tc6393xb_cells[2].driver_data = tcpd->fb_data;
++
++ retval = mfd_add_devices(dev,
++ tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells),
++ iomem, 0, tcpd->irq_base);
++
++ if (retval == 0)
++ return 0;
++
++ if (tc6393xb->irq)
++ tc6393xb_detach_irq(dev);
++
++err_hw_init:
++ iounmap(tc6393xb->scr);
++err_ioremap:
++ release_resource(rscr);
++err_request_scr:
++ kfree(tc6393xb);
++err_kzalloc:
++ release_resource(iomem);
++ return retval;
++}
++
++static int __devexit tc6393xb_remove(struct platform_device *dev) {
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ int ret;
++
++ if (tc6393xb->irq)
++ tc6393xb_detach_irq(dev);
++
++ ret = tcpd->disable(dev);
++
++ iounmap(tc6393xb->scr);
++ release_resource(&tc6393xb->rscr);
++ release_resource(tc6393xb->iomem);
++
++ mfd_remove_devices(dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ kfree(tc6393xb);
++
++ return ret;
++}
++
++#ifdef CONFIG_PM
++static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ int i;
++
++
++ tc6393xb->suspend_state.ccr.raw = ioread16(&scr->ccr);
++ tc6393xb->suspend_state.fer.raw = ioread8(&scr->fer);
++ for (i = 0; i < 4; i++)
++ tc6393xb->suspend_state.gpi_bcr[i] =
++ ioread8(scr->gpi_bcr + i);
++
++ return tcpd->suspend(dev);
++}
++
++static int tc6393xb_resume(struct platform_device *dev)
++{
++ return tc6393xb_hw_init(dev, 1);
++}
++#else
++#define tc6393xb_suspend NULL
++#define tc6393xb_resume NULL
++#endif
++
++static struct platform_driver tc6393xb_driver = {
++ .probe = tc6393xb_probe,
++ .remove = __devexit_p(tc6393xb_remove),
++ .suspend = tc6393xb_suspend,
++ .resume = tc6393xb_resume,
++
++ .driver = {
++ .name = "tc6393xb",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init tc6393xb_init(void)
++{
++ return platform_driver_register(&tc6393xb_driver);
++}
++
++static void __exit tc6393xb_exit(void)
++{
++ platform_driver_unregister(&tc6393xb_driver);
++}
++
++module_init(tc6393xb_init);
++module_exit(tc6393xb_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov and Dirk Opfer");
++MODULE_DESCRIPTION("tc6393xb Toshiba Mobile IO Controller");
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+new file mode 100644
+index 0000000..e699294
+--- /dev/null
++++ b/include/linux/mfd/tc6393xb.h
+@@ -0,0 +1,108 @@
++/*
++ * Toshiba TC6393XB SoC support
++ *
++ * Copyright(c) 2005-2006 Chris Humbert
++ * Copyright(c) 2005 Dirk Opfer
++ * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
++ * Copyright(c) 2007 Dmitry Baryshkov
++ *
++ * Based on code written by Sharp/Lineo for 2.4 kernels
++ * Based on locomo.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.
++ */
++
++#ifndef TC6393XB_H
++#define TC6393XB_H
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++union tc6393xb_scr_fer {
++ u8 raw;
++struct {
++ unsigned usben:1; /* D0 USB enable */
++ unsigned lcdcven:1; /* D1 polysylicon TFT enable */
++ unsigned slcden:1; /* D2 SLCD enable */
++} __attribute__ ((packed)) bits;
++} __attribute__ ((packed));
++
++union tc6393xb_scr_ccr {
++ u16 raw;
++struct {
++ unsigned ck32ken:1; /* D0 SD host clock enable */
++ unsigned usbcken:1; /* D1 USB host clock enable */
++ unsigned x00:2;
++ unsigned sharp:1; /* D4 ??? set in Sharp's code */
++ unsigned x01:3;
++ enum { disable = 0,
++ m12MHz = 1,
++ m24MHz = 2,
++ m48MHz = 3,
++ } mclksel:3; /* D10-D8 LCD controller clock */
++ unsigned x02:1;
++ enum { h24MHz = 0,
++ h48MHz = 1,
++ } hclksel:2; /* D13-D12 host bus clock */
++ unsigned x03:2;
++} __attribute__ ((packed)) bits;
++} __attribute__ ((packed));
++
++enum pincontrol {
++ opendrain = 0,
++ tristate = 1,
++ pushpull = 2,
++ /* reserved = 3, */
++};
++
++union tc6393xb_scr_mcr {
++ u16 raw;
++struct {
++ enum pincontrol rdyst:2; /* D1-D0 HRDY control */
++ unsigned x00:1;
++ unsigned aren:1; /* D3 HRDY pull up resistance cut off */
++ enum pincontrol intst:2; /* D5-D4 #HINT control */
++ unsigned x01:1;
++ unsigned aien:1; /* D7 #HINT pull up resitance cut off */
++ unsigned x02:8;
++} __attribute__ ((packed)) bits;
++} __attribute__ ((packed));
++
++struct tc6393xb_platform_data {
++ u16 scr_pll2cr; /* PLL2 Control */
++ union tc6393xb_scr_ccr scr_ccr; /* Clock Control */
++ union tc6393xb_scr_mcr scr_mcr; /* Mode Control */
++ u16 scr_gper; /* GP Enable */
++ u32 scr_gpo_doecr; /* GPO Data OE Control */
++ u32 scr_gpo_dsr; /* GPO Data Set */
++
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++
++ int irq_base; /* a base for cascaded irq */
++
++ struct tmio_nand_data *nand_data;
++ struct tmio_fb_data *fb_data;
++};
++
++extern int tc6393xb_lcd_set_power(struct platform_device *fb_dev, bool on);
++extern int tc6393xb_lcd_mode(struct platform_device *fb_dev,
++ struct fb_videomode *mode);
++
++
++/*
++ * Relative to irq_base
++ */
++#define IRQ_TC6393_NAND 0
++#define IRQ_TC6393_MMC 1
++#define IRQ_TC6393_OHCI 2
++#define IRQ_TC6393_SERIAL 3
++#define IRQ_TC6393_FB 4
++
++#define TC6393XB_NR_IRQS 8
++
++#endif
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch
new file mode 100644
index 0000000000..7183e3af6d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch
@@ -0,0 +1,249 @@
+From a6a6faf1dbb90c950fe55a1719720457bfb5830a Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sun, 16 Dec 2007 02:19:49 +0000
+Subject: [PATCH 05/64] Add support for tc6387xb MFD core
+
+---
+ drivers/mfd/Kconfig | 6 ++
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/tc6387xb.c | 163 ++++++++++++++++++++++++++++++++++++++++++
+ include/linux/mfd/tc6387xb.h | 28 +++++++
+ 4 files changed, 198 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/tc6387xb.c
+ create mode 100644 include/linux/mfd/tc6387xb.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 9903d0a..1575323 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -9,6 +9,12 @@ config MFD_CORE
+ tristate
+ default n
+
++config MFD_TC6387XB
++ bool "Support Toshiba TC6387XB"
++ select MFD_CORE
++ help
++ Support for Toshiba Mobile IO Controller TC6387XB
++
+ config MFD_TC6393XB
+ bool "Support Toshiba TC6393XB"
+ select MFD_CORE
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index ffd342e..41b2190 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -6,6 +6,7 @@ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MFD_CORE) += mfd-core.o
+
++obj-$(CONFIG_MFD_TC6387XB) += tc6387xb.o
+ obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
+
+ obj-$(CONFIG_MCP) += mcp-core.o
+diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
+new file mode 100644
+index 0000000..c81fca2
+--- /dev/null
++++ b/drivers/mfd/tc6387xb.c
+@@ -0,0 +1,163 @@
++/*
++ * Toshiba TC6387XB support
++ * Copyright (c) 2005 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This file contains TC6387XB base support.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++
++#include <asm/hardware.h>
++#include <asm/mach-types.h>
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tc6387xb.h>
++
++#ifdef CONFIG_PM
++static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct tc6387xb_platform_data *pdata = platform_get_drvdata(dev);
++
++ if (pdata && pdata->suspend)
++ pdata->suspend(dev);
++
++ return 0;
++}
++
++static int tc6387xb_resume(struct platform_device *dev)
++{
++ struct tc6387xb_platform_data *pdata = platform_get_drvdata(dev);
++
++ if (pdata && pdata->resume)
++ pdata->resume(dev);
++
++ return 0;
++}
++#else
++#define tc6387xb_suspend NULL
++#define tc6387xb_resume NULL
++#endif
++
++/*--------------------------------------------------------------------------*/
++
++static int tc6387xb_mmc_enable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6387xb_platform_data *tc6387xb = dev->dev.platform_data;
++
++ if(tc6387xb->enable_mmc_clock)
++ tc6387xb->enable_mmc_clock(dev);
++
++ return 0;
++}
++
++static int tc6387xb_mmc_disable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6387xb_platform_data *tc6387xb = dev->dev.platform_data;
++
++ if(tc6387xb->disable_mmc_clock)
++ tc6387xb->disable_mmc_clock(dev);
++
++ return 0;
++}
++
++
++/*--------------------------------------------------------------------------*/
++
++static struct resource tc6387xb_mmc_resources[] = {
++ {
++ .name = TMIO_MMC_CONTROL,
++ .start = 0x800,
++ .end = 0x9ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_CONFIG,
++ .start = 0x200,
++ .end = 0x2ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_IRQ,
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++static struct mfd_cell tc6387xb_cells[] = {
++ {
++ .name = "tmio-mmc",
++ .enable = tc6387xb_mmc_enable,
++ .disable = tc6387xb_mmc_disable,
++ .num_resources = ARRAY_SIZE(tc6387xb_mmc_resources),
++ .resources = tc6387xb_mmc_resources,
++ },
++};
++
++static int tc6387xb_probe(struct platform_device *dev)
++{
++ struct tc6387xb_platform_data *data = platform_get_drvdata(dev);
++ struct resource *iomem;
++ int irq;
++
++ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
++ if (!iomem)
++ return -EINVAL;
++
++ irq = platform_get_irq(dev, 0);
++
++ if(data && data->enable)
++ data->enable(dev);
++
++ printk(KERN_INFO "Toshiba tc6393xb initialised\n");
++
++ return mfd_add_devices(dev, tc6387xb_cells, ARRAY_SIZE(tc6387xb_cells),
++ iomem, 0, irq);
++}
++
++static int tc6387xb_remove(struct platform_device *dev)
++{
++ struct tc6387xb_platform_data *data = platform_get_drvdata(dev);
++
++ if(data && data->disable)
++ data->disable(dev);
++
++ return 0;
++}
++
++
++static struct platform_driver tc6387xb_platform_driver = {
++ .driver = {
++ .name = "tc6387xb",
++ },
++ .probe = tc6387xb_probe,
++ .remove = tc6387xb_remove,
++ .suspend = tc6387xb_suspend,
++ .resume = tc6387xb_resume,
++};
++
++
++static int __init tc6387xb_init(void)
++{
++ return platform_driver_register (&tc6387xb_platform_driver);
++}
++
++static void __exit tc6387xb_exit(void)
++{
++ platform_driver_unregister(&tc6387xb_platform_driver);
++}
++
++module_init(tc6387xb_init);
++module_exit(tc6387xb_exit);
++
++MODULE_DESCRIPTION("Toshiba TC6387XB core driver");
++MODULE_LICENSE("GPLv2");
++MODULE_AUTHOR("Ian Molton");
+diff --git a/include/linux/mfd/tc6387xb.h b/include/linux/mfd/tc6387xb.h
+new file mode 100644
+index 0000000..496770b
+--- /dev/null
++++ b/include/linux/mfd/tc6387xb.h
+@@ -0,0 +1,28 @@
++/*
++ * linux/include/asm-arm/hardware/tc6387xb.h
++ *
++ * This file contains the definitions for the TC6393XB
++ *
++ * (C) Copyright 2005 Ian Molton <spyro@f2s.com>
++ *
++ * May be copied or modified under the terms of the GNU General Public
++ * License. See linux/COPYING for more information.
++ *
++ */
++#ifndef MFD_T7L66XB_H
++#define MFD_T7L66XB_H
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++struct tc6387xb_platform_data
++{
++ int (*enable_mmc_clock)(struct platform_device *dev);
++ int (*disable_mmc_clock)(struct platform_device *dev);
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++};
++
++#endif
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch
new file mode 100644
index 0000000000..e7aff2455b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch
@@ -0,0 +1,653 @@
+From 2e31fea352ca97988452f1f2c94809de2977ce40 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:08:52 +0000
+Subject: [PATCH 06/64] Add support for t7l66xb MFD core
+
+---
+ drivers/mfd/Kconfig | 6 +
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/t7l66xb.c | 550 +++++++++++++++++++++++++++++++++++++++++++
+ include/linux/mfd/t7l66xb.h | 45 ++++
+ 4 files changed, 602 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/t7l66xb.c
+ create mode 100644 include/linux/mfd/t7l66xb.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 1575323..f79a969 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -9,6 +9,12 @@ config MFD_CORE
+ tristate
+ default n
+
++config MFD_T7L66XB
++ bool "Support Toshiba T7L66XB"
++ select MFD_CORE
++ help
++ Support for Toshiba Mobile IO Controller T7L66XB
++
+ config MFD_TC6387XB
+ bool "Support Toshiba TC6387XB"
+ select MFD_CORE
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 41b2190..b2037ae 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -6,6 +6,7 @@ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MFD_CORE) += mfd-core.o
+
++obj-$(CONFIG_MFD_T7L66XB) += t7l66xb.o
+ obj-$(CONFIG_MFD_TC6387XB) += tc6387xb.o
+ obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
+
+diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
+new file mode 100644
+index 0000000..308776a
+--- /dev/null
++++ b/drivers/mfd/t7l66xb.c
+@@ -0,0 +1,550 @@
++/*
++ *
++ * Toshiba T7L66XB core mfd support
++ *
++ * Copyright (c) 2005 Ian Molton
++ * Copyright (c) 2007 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * T7L66 features:
++ *
++ * Supported in this driver:
++ * SD/MMC
++ * SM/NAND flash controller
++ * OHCI controller
++ *
++ * As yet not supported
++ * GPIO interface (on NAND pins)
++ * Serial interface
++ * TFT 'interface converter'
++ * PCMCIA interface logic
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/io.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/mfd/t7l66xb.h>
++
++union t7l66xb_dev_ctl {
++ u8 raw;
++struct {
++ unsigned usb_en:1; /* D0 USB enable */
++ unsigned mmc_en:1; /* D1 MMC enable */
++} __attribute__ ((packed));
++} __attribute__ ((packed));
++
++
++struct t7l66xb_scr {
++ u8 x00[8];
++ u8 revid; /* 0x08 Revision ID */
++ u8 x01[57];
++ u8 imr; /* 0x42 Interrupt Mask */
++ u8 x03[157];
++ union t7l66xb_dev_ctl dev_ctl; /* 0xe0 Device control */
++ u8 isr; /* 0xe1 Interrupt Status */
++ u8 x04[14];
++ u8 gpio_output_ctl; /* 0xf0 */
++ u8 gpio_output_status; /* 0xf1 */
++ u16 gpio_input_status; /* 0xf2 */
++ u8 x05[4];
++ u8 active_pullup_down_ctl; /* 0xf8 */
++ u8 x06[7];
++} __attribute__ ((packed));
++
++
++/*--------------------------------------------------------------------------*/
++
++struct t7l66xb
++{
++ struct t7l66xb_scr __iomem *scr;
++ spinlock_t lock;
++
++ struct resource rscr;
++ struct resource *iomem;
++ int irq;
++};
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_ohci_enable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.usb_en = 1;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++static int t7l66xb_ohci_disable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.usb_en = 0;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_mmc_enable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ if(pdata->enable_clk32k)
++ pdata->enable_clk32k(dev);
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.mmc_en = 1;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++static int t7l66xb_mmc_disable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.mmc_en = 0;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++ if(pdata->disable_clk32k)
++ pdata->disable_clk32k(dev);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_nand_disable(struct platform_device *nand)
++{
++ struct platform_device *dev = to_platform_device(nand->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++// dev_ctl.nand_en = 0;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++static int t7l66xb_nand_enable(struct platform_device *nand)
++{
++ struct platform_device *dev = to_platform_device(nand->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ // dev_ctl.nand_en = 1;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++const static struct resource t7l66xb_mmc_resources[] = {
++ {
++ .name = TMIO_MMC_CONTROL,
++ .start = 0x800,
++ .end = 0x9ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_CONFIG,
++ .start = 0x200,
++ .end = 0x2ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_IRQ,
++ .start = IRQ_T7L66XB_MMC,
++ .end = IRQ_T7L66XB_MMC,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource t7l66xb_ohci_resources[] = {
++ {
++ .name = TMIO_OHCI_CONFIG,
++ .start = 0x0300,
++ .end = 0x03ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_CONTROL,
++ .start = 0xa00,
++ .end = 0xbff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_SRAM,
++ .start = 0x01000,
++ .end = 0x02fff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_IRQ,
++ .start = IRQ_T7L66XB_OHCI,
++ .end = IRQ_T7L66XB_OHCI,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource t7l66xb_nand_resources[] = {
++ {
++ .name = TMIO_NAND_CONFIG,
++ .start = 0x0100,
++ .end = 0x01ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_CONTROL,
++ .start = 0xc00,
++ .end = 0xc07,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_IRQ,
++ .start = IRQ_T7L66XB_NAND,
++ .end = IRQ_T7L66XB_NAND,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++static struct mfd_cell t7l66xb_cells[] = {
++ {
++ .name = "tmio-mmc",
++ .enable = t7l66xb_mmc_enable,
++ .disable = t7l66xb_mmc_disable,
++ .num_resources = ARRAY_SIZE(t7l66xb_mmc_resources),
++ .resources = t7l66xb_mmc_resources,
++ },
++ {
++ .name = "tmio-ohci",
++ .enable = t7l66xb_ohci_enable,
++ .disable = t7l66xb_ohci_disable,
++ .num_resources = ARRAY_SIZE(t7l66xb_ohci_resources),
++ .resources = t7l66xb_ohci_resources,
++ },
++ {
++ .name = "tmio-nand",
++ .enable = t7l66xb_nand_enable,
++ .disable = t7l66xb_nand_disable,
++ .num_resources = ARRAY_SIZE(t7l66xb_nand_resources),
++ .resources = t7l66xb_nand_resources,
++ },
++};
++
++/*--------------------------------------------------------------------------*/
++
++/* Handle the T7L66XB interrupt mux */
++static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned int isr;
++ unsigned int i;
++
++ desc->chip->ack(irq);
++ while ((isr = readb(&scr->isr) & ~readb(&scr->imr)))
++ for (i = 0; i < T7L66XB_NR_IRQS; i++)
++ if (isr & (1 << i))
++ desc_handle_irq(tcpd->irq_base + i,
++ irq_desc + tcpd->irq_base + i);
++}
++
++static void t7l66xb_irq_mask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) | (1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++}
++
++static void t7l66xb_irq_unmask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) & ~(1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++}
++
++static struct irq_chip t7l66xb_chip = {
++ .name = "t7l66xb",
++ .ack = t7l66xb_irq_mask,
++ .mask = t7l66xb_irq_mask,
++ .unmask = t7l66xb_irq_unmask,
++};
++
++/*--------------------------------------------------------------------------*/
++
++/* Install the IRQ handler */
++static void t7l66xb_attach_irq(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + T7L66XB_NR_IRQS;
++ irq++) {
++ set_irq_chip (irq, &t7l66xb_chip);
++ set_irq_chip_data (irq, dev);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++
++ set_irq_type (t7l66xb->irq, IRQT_FALLING);
++ set_irq_chip_data (t7l66xb->irq, dev);
++ set_irq_chained_handler (t7l66xb->irq, t7l66xb_irq);
++}
++
++static void t7l66xb_detach_irq(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ set_irq_chained_handler(t7l66xb->irq, NULL);
++ set_irq_chip_data(t7l66xb->irq, NULL);
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + T7L66XB_NR_IRQS;
++ irq++) {
++ set_irq_flags(irq, 0);
++ set_irq_chip(irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++}
++
++/*--------------------------------------------------------------------------*/
++
++#ifdef CONFIG_PM
++static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++
++
++ if (pdata && pdata->suspend)
++ pdata->suspend(dev);
++
++ return 0;
++}
++
++static int t7l66xb_resume(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++
++ if (pdata && pdata->resume)
++ pdata->resume(dev);
++
++ return 0;
++}
++#else
++#define t7l66xb_suspend NULL
++#define t7l66xb_resume NULL
++#endif
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_probe(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb;
++ struct resource *iomem;
++ struct resource *rscr;
++ int retval = -ENOMEM;
++
++ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
++ if (!iomem)
++ return -EINVAL;
++
++ t7l66xb = kzalloc (sizeof *t7l66xb, GFP_KERNEL);
++ if (!t7l66xb)
++ goto err_kzalloc;
++
++ spin_lock_init(&t7l66xb->lock);
++
++ platform_set_drvdata(dev, t7l66xb);
++ t7l66xb->iomem = iomem;
++ t7l66xb->irq = platform_get_irq(dev, 0);
++
++ rscr = &t7l66xb->rscr;
++ rscr->name = "t7l66xb-core";
++ rscr->start = iomem->start;
++ rscr->end = iomem->start + 0xff;
++ rscr->flags = IORESOURCE_MEM;
++
++ if((retval = request_resource(iomem, rscr)))
++ goto err_request_scr;
++
++ t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
++ if (!t7l66xb->scr) {
++ retval = -ENOMEM;
++ goto err_ioremap;
++ }
++
++ if (pdata && pdata->enable)
++ pdata->enable(dev);
++
++ writeb(0xbf, &t7l66xb->scr->imr); /* Mask all interrupts */
++
++ printk(KERN_INFO "%s rev %d @ 0x%08lx, irq %d\n",
++ dev->name, readb(&t7l66xb->scr->revid),
++ (unsigned long)t7l66xb->scr, t7l66xb->irq);
++
++ if(t7l66xb->irq)
++ t7l66xb_attach_irq(dev);
++
++ t7l66xb_cells[2].driver_data = pdata->nand_data;
++
++ if(!(retval = mfd_add_devices(dev, t7l66xb_cells,
++ ARRAY_SIZE(t7l66xb_cells),
++ iomem, 0, pdata->irq_base)))
++ return 0;
++
++ if(t7l66xb->irq)
++ t7l66xb_detach_irq(dev);
++
++ iounmap(t7l66xb->scr);
++err_ioremap:
++ release_resource(rscr);
++err_request_scr:
++ kfree(t7l66xb);
++err_kzalloc:
++ release_resource(iomem);
++ return retval;
++}
++
++static int t7l66xb_remove(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ int ret;
++
++ if (t7l66xb->irq)
++ t7l66xb_detach_irq(dev);
++
++ ret = pdata->disable(dev);
++
++ iounmap(t7l66xb->scr);
++ release_resource(&t7l66xb->rscr);
++ release_resource(t7l66xb->iomem);
++
++ mfd_remove_devices(dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ kfree(t7l66xb);
++
++ return ret;
++
++}
++
++static struct platform_driver t7l66xb_platform_driver = {
++ .driver = {
++ .name = "t7l66xb",
++ .owner = THIS_MODULE,
++ },
++ .suspend = t7l66xb_suspend,
++ .resume = t7l66xb_resume,
++ .probe = t7l66xb_probe,
++ .remove = t7l66xb_remove,
++};
++
++/*--------------------------------------------------------------------------*/
++
++static int __init t7l66xb_init(void)
++{
++ int retval = 0;
++
++ retval = platform_driver_register (&t7l66xb_platform_driver);
++ return retval;
++}
++
++static void __exit t7l66xb_exit(void)
++{
++ platform_driver_unregister(&t7l66xb_platform_driver);
++}
++
++module_init(t7l66xb_init);
++module_exit(t7l66xb_exit);
++
++MODULE_DESCRIPTION("Toshiba T7L66XB core driver");
++MODULE_LICENSE("GPLv2");
++MODULE_AUTHOR("Ian Molton");
++
+diff --git a/include/linux/mfd/t7l66xb.h b/include/linux/mfd/t7l66xb.h
+new file mode 100644
+index 0000000..06b8de5
+--- /dev/null
++++ b/include/linux/mfd/t7l66xb.h
+@@ -0,0 +1,45 @@
++/*
++ * linux/include/asm-arm/hardware/t7l66xb.h
++ *
++ * This file contains the definitions for the T7L66XB
++ *
++ * (C) Copyright 2005 Ian Molton <spyro@f2s.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++#ifndef _ASM_ARCH_T7L66XB_SOC
++#define _ASM_ARCH_T7L66XB_SOC
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++
++struct t7l66xb_platform_data
++{
++ int (*enable_clk32k)(struct platform_device *dev);
++ int (*disable_clk32k)(struct platform_device *dev);
++
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++
++ int irq_base; /* a base for cascaded irq */
++
++ struct tmio_nand_data *nand_data;
++};
++
++
++#define T7L66XB_NAND_CNF_BASE (0x000100)
++#define T7L66XB_NAND_CTL_BASE (0x001000)
++
++#define IRQ_T7L66XB_NAND (3)
++#define IRQ_T7L66XB_MMC (1)
++#define IRQ_T7L66XB_OHCI (2)
++
++#define T7L66XB_NR_IRQS 8
++
++#endif
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch
new file mode 100644
index 0000000000..2f5f11400c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch
@@ -0,0 +1,81 @@
+From d6e8b347dbcce9e0e8d2204b774c1c33cfcb483e Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:27:43 +0000
+Subject: [PATCH 07/64] Common headers for TMIO MFD subdevices
+
+---
+ include/linux/mfd/tmio.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 62 insertions(+), 0 deletions(-)
+ create mode 100644 include/linux/mfd/tmio.h
+
+diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
+new file mode 100644
+index 0000000..b42a4c3
+--- /dev/null
++++ b/include/linux/mfd/tmio.h
+@@ -0,0 +1,62 @@
++#ifndef MFD_TMIO_H
++#define MFD_TMIO_H
++
++#include <linux/io.h>
++#include <linux/platform_device.h>
++
++struct fb_videomode;
++
++/*
++ * data for the NAND controller
++ */
++struct tmio_nand_data {
++ struct nand_bbt_descr *badblock_pattern;
++ struct mtd_partition *partition;
++ unsigned int num_partitions;
++};
++
++struct tmio_fb_data {
++ int (*lcd_set_power)(struct platform_device *fb_dev,
++ bool on);
++ int (*lcd_mode)(struct platform_device *fb_dev,
++ struct fb_videomode *mode);
++ int num_modes;
++ struct fb_videomode *modes;
++};
++
++static u32 __maybe_unused tmio_ioread32(const void __iomem *addr)
++{
++ return ((u32) ioread16(addr)) | (((u32) ioread16(addr + 2)) << 16);
++}
++
++static u32 __maybe_unused tmio_iowrite32(u32 val, const void __iomem *addr)
++{
++ iowrite16(val, addr);
++ iowrite16(val >> 16, addr + 2);
++ return val;
++}
++
++#define FBIO_TMIO_ACC_WRITE 0x7C639300
++#define FBIO_TMIO_ACC_SYNC 0x7C639301
++
++#define TMIO_MMC_CONFIG "tmio-mmc-config"
++#define TMIO_MMC_CONTROL "tmio-mmc-control"
++#define TMIO_MMC_IRQ "tmio-mmc"
++
++#define TMIO_NAND_CONFIG "tmio-nand-config"
++#define TMIO_NAND_CONTROL "tmio-nand-control"
++#define TMIO_NAND_IRQ "tmio-nand"
++
++#define TMIO_FB_CONFIG "tmio-fb-config"
++#define TMIO_FB_CONTROL "tmio-fb-control"
++#define TMIO_FB_VRAM "tmio-fb-vram"
++#define TMIO_FB_IRQ "tmio-fb"
++
++#define TMIO_OHCI_CONFIG "tmio-ohci-config"
++#define TMIO_OHCI_CONTROL "tmio-ohci-control"
++#define TMIO_OHCI_SRAM "tmio-ohci-sram"
++#define TMIO_OHCI_SRAM_ALIAS "tmio-ohci-sram-alias"
++#define TMIO_OHCI_IRQ "tmio-ohci"
++
++#endif
++
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..48b8000ab7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch
@@ -0,0 +1,608 @@
+From 917b3997a39396f5f51418930de7b933ad053bad Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:14:23 +0000
+Subject: [PATCH 08/64] Nand driver for TMIO devices
+
+---
+ drivers/mtd/nand/Kconfig | 7 +
+ drivers/mtd/nand/Makefile | 1 +
+ drivers/mtd/nand/tmio_nand.c | 557 ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 565 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mtd/nand/tmio_nand.c
+
+diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
+index 246d451..43e489a 100644
+--- a/drivers/mtd/nand/Kconfig
++++ b/drivers/mtd/nand/Kconfig
+@@ -284,6 +284,13 @@ config MTD_NAND_CM_X270
+ depends on MTD_NAND && MACH_ARMCORE
+
+
++config MTD_NAND_TMIO
++ tristate "NAND Flash device on Toshiba Mobile IO Controller"
++ depends on MTD_NAND && MFD_CORE
++ help
++ Support for NAND flash connected to a Toshiba Mobile IO
++ Controller in some PDAs, including the Sharp SL6000x.
++
+ config MTD_NAND_NANDSIM
+ tristate "Support for NAND Flash Simulator"
+ depends on MTD_PARTITIONS
+diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
+index 3ad6c01..d839ebd 100644
+--- a/drivers/mtd/nand/Makefile
++++ b/drivers/mtd/nand/Makefile
+@@ -27,6 +27,7 @@ obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
+ obj-$(CONFIG_MTD_NAND_AT91) += at91_nand.o
+ obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
+ obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
++obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
+ obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
+ obj-$(CONFIG_MTD_ALAUDA) += alauda.o
+
+diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
+new file mode 100644
+index 0000000..450b4ec
+--- /dev/null
++++ b/drivers/mtd/nand/tmio_nand.c
+@@ -0,0 +1,557 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/delay.h>
++#include <linux/io.h>
++#include <linux/irq.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/nand_ecc.h>
++#include <linux/mtd/partitions.h>
++
++/*--------------------------------------------------------------------------*/
++
++/* tmio_nfcr.mode Register Command List */
++#define FCR_MODE_DATA 0x94 /* Data Data_Mode */
++#define FCR_MODE_COMMAND 0x95 /* Data Command_Mode */
++#define FCR_MODE_ADDRESS 0x96 /* Data Address_Mode */
++
++#define FCR_MODE_HWECC_CALC 0xB4 /* HW-ECC Data */
++#define FCR_MODE_HWECC_RESULT 0xD4 /* HW-ECC Calculation Result Read_Mode */
++#define FCR_MODE_HWECC_RESET 0xF4 /* HW-ECC Reset */
++
++#define FCR_MODE_POWER_ON 0x0C /* Power Supply ON to SSFDC card */
++#define FCR_MODE_POWER_OFF 0x08 /* Power Supply OFF to SSFDC card */
++
++#define FCR_MODE_LED_OFF 0x00 /* LED OFF */
++#define FCR_MODE_LED_ON 0x04 /* LED ON */
++
++#define FCR_MODE_EJECT_ON 0x68 /* Ejection Demand from Penguin is Advanced */
++#define FCR_MODE_EJECT_OFF 0x08 /* Ejection Demand from Penguin is Not Advanced */
++
++#define FCR_MODE_LOCK 0x6C /* Operates By Lock_Mode. Ejection Switch is Invalid */
++#define FCR_MODE_UNLOCK 0x0C /* Operates By UnLock_Mode.Ejection Switch is Effective */
++
++#define FCR_MODE_CONTROLLER_ID 0x40 /* Controller ID Read */
++#define FCR_MODE_STANDBY 0x00 /* SSFDC card Changes Standby State */
++
++#define FCR_MODE_WE 0x80
++#define FCR_MODE_ECC1 0x40
++#define FCR_MODE_ECC0 0x20
++#define FCR_MODE_CE 0x10
++#define FCR_MODE_PCNT1 0x08
++#define FCR_MODE_PCNT0 0x04
++#define FCR_MODE_ALE 0x02
++#define FCR_MODE_CLE 0x01
++
++#define FCR_STATUS_BUSY 0x80
++
++/*
++ *NAND Flash Host Controller Configuration Register
++ */
++struct tmio_nfhccr {
++ u8 x00[4];
++ u16 command; /* 0x04 Command */
++ u8 x01[0x0a];
++ u16 base[2]; /* 0x10 NAND Flash Control Reg Base Addr*/
++ u8 x02[0x29];
++ u8 intp; /* 0x3d Interrupt Pin */
++ u8 x03[0x0a];
++ u8 inte; /* 0x48 Interrupt Enable */
++ u8 x04;
++ u8 ec; /* 0x4a Event Control */
++ u8 x05;
++ u8 icc; /* 0x4c Internal Clock Control */
++ u8 x06[0x0e];
++ u8 eccc; /* 0x5b ECC Control */
++ u8 x07[4];
++ u8 nftc; /* 0x60 NAND Flash Transaction Control */
++ u8 nfm; /* 0x61 NAND Flash Monitor */
++ u8 nfpsc; /* 0x62 NAND Flash Power Supply Control */
++ u8 nfdc; /* 0x63 NAND Flash Detect Control */
++ u8 x08[0x9c];
++} __attribute__ ((packed));
++
++/*
++ *NAND Flash Control Register
++ */
++struct tmio_nfcr {
++union {
++ u8 u8; /* 0x00 Data Register */
++ u16 u16;
++ u32 u32;
++} __attribute__ ((packed));
++ u8 mode; /* 0x04 Mode Register */
++ u8 status; /* 0x05 Status Register */
++ u8 isr; /* 0x06 Interrupt Status Register */
++ u8 imr; /* 0x07 Interrupt Mask Register */
++} __attribute__ ((packed));
++
++struct tmio_nand {
++ struct mtd_info mtd;
++ struct nand_chip chip;
++
++ struct platform_device *dev;
++
++ struct tmio_nfhccr __iomem *ccr;
++ struct tmio_nfcr __iomem *fcr;
++
++ unsigned int irq;
++
++ /* for tmio_nand_read_byte */
++ u8 read;
++ unsigned read_good:1;
++};
++
++#define mtd_to_tmio(m) container_of(m, struct tmio_nand, mtd)
++
++#ifdef CONFIG_MTD_CMDLINE_PARTS
++static const char *part_probes[] = { "cmdlinepart", NULL };
++#endif
++
++/*--------------------------------------------------------------------------*/
++
++static void tmio_nand_hwcontrol(struct mtd_info *mtd, int cmd,
++ unsigned int ctrl)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ struct nand_chip *chip = mtd->priv;
++
++ if (ctrl & NAND_CTRL_CHANGE) {
++ u8 mode;
++
++ if (ctrl & NAND_NCE) {
++ mode = FCR_MODE_DATA;
++
++ if (ctrl & NAND_CLE)
++ mode |= FCR_MODE_CLE;
++ else
++ mode &= ~FCR_MODE_CLE;
++
++ if (ctrl & NAND_ALE)
++ mode |= FCR_MODE_ALE;
++ else
++ mode &= ~FCR_MODE_ALE;
++ } else {
++ mode = FCR_MODE_STANDBY;
++ }
++
++ iowrite8(mode, &fcr->mode);
++ tmio->read_good = 0;
++ }
++
++ if (cmd != NAND_CMD_NONE)
++ writeb(cmd, chip->IO_ADDR_W);
++}
++
++static int tmio_nand_dev_ready(struct mtd_info *mtd)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ return !(ioread8(&fcr->status) & FCR_STATUS_BUSY);
++}
++
++static irqreturn_t tmio_irq(int irq, void *__dev)
++{
++ struct platform_device *dev = __dev;
++ struct tmio_nand *tmio = platform_get_drvdata(dev);
++ struct nand_chip *nand_chip = &tmio->chip;
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ /* disable RDYREQ interrupt */
++ iowrite8(0x00, &fcr->imr);
++
++ if (unlikely(!waitqueue_active(&nand_chip->controller->wq)))
++ dev_warn(&dev->dev, "spurious interrupt\n");
++
++ wake_up(&nand_chip->controller->wq);
++ return IRQ_HANDLED;
++}
++
++/*
++ *The TMIO core has a RDYREQ interrupt on the posedge of #SMRB.
++ *This interrupt is normally disabled, but for long operations like
++ *erase and write, we enable it to wake us up. The irq handler
++ *disables the interrupt.
++ */
++static int
++tmio_nand_wait(struct mtd_info *mtd, struct nand_chip *nand_chip)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ long timeout;
++
++ /* enable RDYREQ interrupt */
++ iowrite8(0x0f, &fcr->isr);
++ iowrite8(0x81, &fcr->imr);
++
++ timeout = wait_event_timeout(nand_chip->controller->wq, tmio_nand_dev_ready(mtd),
++ msecs_to_jiffies(nand_chip->state == FL_ERASING ? 400 : 20));
++
++ if (unlikely(!tmio_nand_dev_ready(mtd))) {
++ iowrite8(0x00, &fcr->imr);
++ dev_warn(&tmio->dev->dev, "still busy with %s after %d ms\n",
++ nand_chip->state == FL_ERASING ? "erase" : "program",
++ nand_chip->state == FL_ERASING ? 400 : 20);
++
++ } else if (unlikely(!timeout)) {
++ iowrite8(0x00, &fcr->imr);
++ dev_warn(&tmio->dev->dev, "timeout waiting for interrupt\n");
++ }
++
++ nand_chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
++ return nand_chip->read_byte(mtd);
++}
++
++/*
++ *The TMIO controller combines two 8-bit data bytes into one 16-bit
++ *word. This function separates them so nand_base.c works as expected,
++ *especially its NAND_CMD_READID routines.
++ *
++ *To prevent stale data from being read, tmio_nand_hwcontrol() clears
++ *tmio->read_good.
++ */
++static u_char tmio_nand_read_byte(struct mtd_info *mtd)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ unsigned int data;
++
++ if (tmio->read_good--)
++ return tmio->read;
++
++ data = ioread16(&fcr->u16);
++ tmio->read = data >> 8;
++ return data;
++}
++
++/*
++ *The TMIO controller converts an 8-bit NAND interface to a 16-bit
++ *bus interface, so all data reads and writes must be 16-bit wide.
++ *Thus, we implement 16-bit versions of the read, write, and verify
++ *buffer functions.
++ */
++static void
++tmio_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ iowrite16_rep(&fcr->u16, buf, len >> 1);
++}
++
++static void tmio_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ ioread16_rep(&fcr->u16, buf, len >> 1);
++}
++
++static int
++tmio_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ u16 *p = (u16 *) buf;
++
++ for (len >>= 1; len; len--)
++ if (*(p++) != ioread16(&fcr->u16))
++ return -EFAULT;
++ return 0;
++}
++
++static void tmio_nand_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ iowrite8(FCR_MODE_HWECC_RESET, &fcr->mode);
++ ioread8(&fcr->u8); /* dummy read */
++ iowrite8(FCR_MODE_HWECC_CALC, &fcr->mode);
++}
++
++static int tmio_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
++ u_char *ecc_code)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ unsigned int ecc;
++
++ iowrite8(FCR_MODE_HWECC_RESULT, &fcr->mode);
++
++ ecc = ioread16(&fcr->u16);
++ ecc_code[1] = ecc; /* 000-255 LP7-0 */
++ ecc_code[0] = ecc >> 8; /* 000-255 LP15-8 */
++ ecc = ioread16(&fcr->u16);
++ ecc_code[2] = ecc; /* 000-255 CP5-0,11b */
++ ecc_code[4] = ecc >> 8; /* 256-511 LP7-0 */
++ ecc = ioread16(&fcr->u16);
++ ecc_code[3] = ecc; /* 256-511 LP15-8 */
++ ecc_code[5] = ecc >> 8; /* 256-511 CP5-0,11b */
++
++ iowrite8(FCR_MODE_DATA, &fcr->mode);
++ return 0;
++}
++
++static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ const struct resource *nfcr = NULL;
++ struct tmio_nfhccr __iomem *ccr = tmio->ccr;
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ unsigned long base;
++ int i;
++
++ for (i = 0; i < cell->num_resources; i++)
++ if (!strcmp((cell->resources+i)->name, TMIO_NAND_CONTROL))
++ nfcr = &cell->resources[i];
++
++ if (nfcr == NULL)
++ return -ENOMEM;
++
++ if (!cell->enable) {
++ printk(KERN_ERR "null cell enable!");
++ return -EINVAL;
++ }
++
++ cell->enable(dev);
++
++ /* (4Ch) CLKRUN Enable 1st spcrunc */
++ iowrite8(0x81, &ccr->icc);
++
++ /* (10h)BaseAddress 0x1000 spba.spba2 */
++ base = nfcr->start;
++ iowrite16(base, ccr->base + 0);
++ iowrite16(base >> 16, ccr->base + 1);
++
++ /* (04h)Command Register I/O spcmd */
++ iowrite8(0x02, &ccr->command);
++
++ /* (62h) Power Supply Control ssmpwc */
++ /* HardPowerOFF - SuspendOFF - PowerSupplyWait_4MS */
++ iowrite8(0x02, &ccr->nfpsc);
++
++ /* (63h) Detect Control ssmdtc */
++ iowrite8(0x02, &ccr->nfdc);
++
++ /* Interrupt status register clear sintst */
++ iowrite8(0x0f, &fcr->isr);
++
++ /* After power supply, Media are reset smode */
++ iowrite8(FCR_MODE_POWER_ON, &fcr->mode);
++ iowrite8(FCR_MODE_COMMAND, &fcr->mode);
++ iowrite8(NAND_CMD_RESET, &fcr->u8);
++
++ /* Standby Mode smode */
++ iowrite8(FCR_MODE_STANDBY, &fcr->mode);
++
++ mdelay(5);
++
++ return 0;
++}
++
++static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ iowrite8(FCR_MODE_POWER_OFF, &fcr->mode);
++ cell->disable(dev);
++}
++
++static int tmio_probe(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_nand_data *data = cell->driver_data;
++ struct resource *ccr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_NAND_CONFIG);
++ struct resource *fcr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_NAND_CONTROL);
++ int irq = platform_get_irq(dev, 0);
++ struct tmio_nand *tmio;
++ struct mtd_info *mtd;
++ struct nand_chip *nand_chip;
++ struct mtd_partition *parts;
++ int nbparts = 0;
++ int retval;
++
++ if (data == NULL) {
++ dev_err(&dev->dev, "NULL platform data!\n");
++ return -EINVAL;
++ }
++
++ tmio = kzalloc(sizeof *tmio, GFP_KERNEL);
++ if (!tmio) {
++ retval = -ENOMEM;
++ goto err_kzalloc;
++ }
++
++ tmio->dev = dev;
++
++ platform_set_drvdata(dev, tmio);
++ mtd = &tmio->mtd;
++ nand_chip = &tmio->chip;
++ mtd->priv = nand_chip;
++ mtd->name = "tmio-nand";
++
++ tmio->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1);
++ if (!tmio->ccr) {
++ retval = -EIO;
++ goto err_iomap_ccr;
++ }
++
++ tmio->fcr = ioremap(fcr->start, fcr->end - fcr->start + 1);
++ if (!tmio->fcr) {
++ retval = -EIO;
++ goto err_iomap_fcr;
++ }
++
++ retval = tmio_hw_init(dev, tmio);
++ if (retval)
++ goto err_hwinit;
++
++ /* Set address of NAND IO lines */
++ nand_chip->IO_ADDR_R = tmio->fcr;
++ nand_chip->IO_ADDR_W = tmio->fcr;
++
++ /* Set address of hardware control function */
++ nand_chip->cmd_ctrl = tmio_nand_hwcontrol;
++ nand_chip->dev_ready = tmio_nand_dev_ready;
++ nand_chip->read_byte = tmio_nand_read_byte;
++ nand_chip->write_buf = tmio_nand_write_buf;
++ nand_chip->read_buf = tmio_nand_read_buf;
++ nand_chip->verify_buf = tmio_nand_verify_buf;
++
++ /* set eccmode using hardware ECC */
++ nand_chip->ecc.mode = NAND_ECC_HW;
++ nand_chip->ecc.size = 512;
++ nand_chip->ecc.bytes = 6;
++ nand_chip->ecc.hwctl = tmio_nand_enable_hwecc;
++ nand_chip->ecc.calculate = tmio_nand_calculate_ecc;
++ nand_chip->ecc.correct = nand_correct_data;
++ nand_chip->badblock_pattern = data->badblock_pattern;
++
++ /* 15 us command delay time */
++ nand_chip->chip_delay = 15;
++
++ retval = request_irq(irq, &tmio_irq,
++ IRQF_DISABLED, dev->dev.bus_id, dev);
++ if (retval) {
++ dev_err(&dev->dev, "request_irq error %d\n", retval);
++ goto err_irq;
++ }
++
++ tmio->irq = irq;
++ nand_chip->waitfunc = tmio_nand_wait;
++
++ /* Scan to find existence of the device */
++ if (nand_scan(mtd, 1)) {
++ retval = -ENODEV;
++ goto err_scan;
++ }
++ /* Register the partitions */
++#ifdef CONFIG_MTD_PARTITIONS
++#ifdef CONFIG_MTD_CMDLINE_PARTS
++ nbparts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
++#endif
++ if (nbparts <= 0) {
++ parts = data->partition;
++ nbparts = data->num_partitions;
++ }
++
++ retval = add_mtd_partitions(mtd, parts, nbparts);
++#else
++ retval = add_mtd_device(mtd);
++#endif
++
++ if (!retval)
++ return retval;
++
++ nand_release(mtd);
++
++err_scan:
++ if (tmio->irq)
++ free_irq(tmio->irq, dev);
++err_irq:
++ tmio_hw_stop(dev, tmio);
++err_hwinit:
++ iounmap(tmio->fcr);
++err_iomap_fcr:
++ iounmap(tmio->ccr);
++err_iomap_ccr:
++ kfree(tmio);
++err_kzalloc:
++ return retval;
++}
++
++static int tmio_remove(struct platform_device *dev)
++{
++ struct tmio_nand *tmio = platform_get_drvdata(dev);
++
++ nand_release(&tmio->mtd);
++ if (tmio->irq)
++ free_irq(tmio->irq, tmio);
++ tmio_hw_stop(dev, tmio);
++ iounmap(tmio->fcr);
++ iounmap(tmio->ccr);
++ kfree(tmio);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int tmio_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++
++ if (cell->suspend)
++ cell->suspend(dev);
++
++ tmio_hw_stop(dev, platform_get_drvdata(dev));
++ return 0;
++}
++
++static int tmio_resume(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++
++ tmio_hw_init(dev, platform_get_drvdata(dev));
++
++ if (cell->resume)
++ cell->resume(dev);
++
++ return 0;
++}
++#endif
++
++static struct platform_driver tmio_driver = {
++ .driver.name = "tmio-nand",
++ .driver.owner = THIS_MODULE,
++ .probe = tmio_probe,
++ .remove = tmio_remove,
++#ifdef CONFIG_PM
++ .suspend = tmio_suspend,
++ .resume = tmio_resume,
++#endif
++};
++
++static int __init tmio_init(void)
++{
++ return platform_driver_register(&tmio_driver);
++}
++
++static void __exit tmio_exit(void)
++{
++ platform_driver_unregister(&tmio_driver);
++}
++
++module_init(tmio_init);
++module_exit(tmio_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Dirk Opfer, Chris Humbert, Dmitry Baryshkov");
++MODULE_DESCRIPTION("NAND flash driver on Toshiba Mobile IO controller");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..5fc96f8973
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch
@@ -0,0 +1,1128 @@
+From 519d015892ab0a7cad1f6b26fcd38117171384ce Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Tue, 1 Jan 2008 21:22:23 +0000
+Subject: [PATCH 09/64] FB driver for TMIO devices
+
+---
+ drivers/video/Kconfig | 22 +
+ drivers/video/Makefile | 1 +
+ drivers/video/tmiofb.c | 1062 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1085 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/tmiofb.c
+
+diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
+index 5b3dbcf..6d0df58 100644
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -1782,6 +1782,28 @@ config FB_W100
+
+ If unsure, say N.
+
++config FB_TMIO
++ tristate "Toshiba Mobice IO FrameBuffer support"
++ depends on FB && MFD_CORE
++ select FB_CFB_FILLRECT
++ select FB_CFB_COPYAREA
++ select FB_CFB_IMAGEBLIT
++ ---help---
++ Frame buffer driver for the Toshiba Mobile IO integrated as found
++ on the Sharp SL-6000 series
++
++ This driver is also available as a module ( = code which can be
++ inserted and removed from the running kernel whenever you want). The
++ module will be called tmiofb. If you want to compile it as a module,
++ say M here and read <file:Documentation/kbuild/modules.txt>.
++
++ If unsure, say N.
++
++config FB_TMIO_ACCELL
++ bool "tmiofb acceleration"
++ depends on FB_TMIO
++ default y
++
+ config FB_S3C2410
+ tristate "S3C2410 LCD framebuffer support"
+ depends on FB && ARCH_S3C2410
+diff --git a/drivers/video/Makefile b/drivers/video/Makefile
+index 83e02b3..74e9384 100644
+--- a/drivers/video/Makefile
++++ b/drivers/video/Makefile
+@@ -97,6 +97,7 @@ obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o
+ obj-$(CONFIG_FB_ASILIANT) += asiliantfb.o
+ obj-$(CONFIG_FB_PXA) += pxafb.o
+ obj-$(CONFIG_FB_W100) += w100fb.o
++obj-$(CONFIG_FB_TMIO) += tmiofb.o
+ obj-$(CONFIG_FB_AU1100) += au1100fb.o
+ obj-$(CONFIG_FB_AU1200) += au1200fb.o
+ obj-$(CONFIG_FB_PMAG_AA) += pmag-aa-fb.o
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+new file mode 100644
+index 0000000..6b963a1
+--- /dev/null
++++ b/drivers/video/tmiofb.c
+@@ -0,0 +1,1062 @@
++/*
++ * Frame Buffer Device for Toshiba Mobile IO(TMIO) controller
++ *
++ * Copyright(C) 2005-2006 Chris Humbert
++ * Copyright(C) 2005 Dirk Opfer
++ *
++ * Based on:
++ * drivers/video/w100fb.c
++ * code written by Sharp/Lineo for 2.4 kernels
++ *
++ * 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.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/fb.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++/* Why should fb driver call console functions? because acquire_console_sem() */
++#include <linux/console.h>
++#include <linux/uaccess.h>
++#include <linux/vmalloc.h>
++
++/*
++ * accelerator commands
++ */
++#define TMIOFB_ACC_CSADR(x) (0x00000000 | ((x) & 0x001ffffe))
++#define TMIOFB_ACC_CHPIX(x) (0x01000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_CVPIX(x) (0x02000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PSADR(x) (0x03000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_PHPIX(x) (0x04000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PVPIX(x) (0x05000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PHOFS(x) (0x06000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PVOFS(x) (0x07000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_POADR(x) (0x08000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_RSTR(x) (0x09000000 | ((x) & 0x000000ff))
++#define TMIOFB_ACC_TCLOR(x) (0x0A000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_FILL(x) (0x0B000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_DSADR(x) (0x0C000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_SSADR(x) (0x0D000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_DHPIX(x) (0x0E000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_DVPIX(x) (0x0F000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_SHPIX(x) (0x10000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_SVPIX(x) (0x11000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_LBINI(x) (0x12000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_LBK2(x) (0x13000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SHBINI(x) (0x14000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SHBK2(x) (0x15000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SVBINI(x) (0x16000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SVBK2(x) (0x17000000 | ((x) & 0x0000ffff))
++
++#define TMIOFB_ACC_CMGO 0x20000000
++#define TMIOFB_ACC_CMGO_CEND 0x00000001
++#define TMIOFB_ACC_CMGO_INT 0x00000002
++#define TMIOFB_ACC_CMGO_CMOD 0x00000010
++#define TMIOFB_ACC_CMGO_CDVRV 0x00000020
++#define TMIOFB_ACC_CMGO_CDHRV 0x00000040
++#define TMIOFB_ACC_CMGO_RUND 0x00008000
++#define TMIOFB_ACC_SCGO 0x21000000
++#define TMIOFB_ACC_SCGO_CEND 0x00000001
++#define TMIOFB_ACC_SCGO_INT 0x00000002
++#define TMIOFB_ACC_SCGO_ROP3 0x00000004
++#define TMIOFB_ACC_SCGO_TRNS 0x00000008
++#define TMIOFB_ACC_SCGO_DVRV 0x00000010
++#define TMIOFB_ACC_SCGO_DHRV 0x00000020
++#define TMIOFB_ACC_SCGO_SVRV 0x00000040
++#define TMIOFB_ACC_SCGO_SHRV 0x00000080
++#define TMIOFB_ACC_SCGO_DSTXY 0x00008000
++#define TMIOFB_ACC_SBGO 0x22000000
++#define TMIOFB_ACC_SBGO_CEND 0x00000001
++#define TMIOFB_ACC_SBGO_INT 0x00000002
++#define TMIOFB_ACC_SBGO_DVRV 0x00000010
++#define TMIOFB_ACC_SBGO_DHRV 0x00000020
++#define TMIOFB_ACC_SBGO_SVRV 0x00000040
++#define TMIOFB_ACC_SBGO_SHRV 0x00000080
++#define TMIOFB_ACC_SBGO_SBMD 0x00000100
++#define TMIOFB_ACC_FLGO 0x23000000
++#define TMIOFB_ACC_FLGO_CEND 0x00000001
++#define TMIOFB_ACC_FLGO_INT 0x00000002
++#define TMIOFB_ACC_FLGO_ROP3 0x00000004
++#define TMIOFB_ACC_LDGO 0x24000000
++#define TMIOFB_ACC_LDGO_CEND 0x00000001
++#define TMIOFB_ACC_LDGO_INT 0x00000002
++#define TMIOFB_ACC_LDGO_ROP3 0x00000004
++#define TMIOFB_ACC_LDGO_ENDPX 0x00000008
++#define TMIOFB_ACC_LDGO_LVRV 0x00000010
++#define TMIOFB_ACC_LDGO_LHRV 0x00000020
++#define TMIOFB_ACC_LDGO_LDMOD 0x00000040
++
++/* a FIFO is always allocated, even if acceleration is not used */
++#define TMIOFB_FIFO_SIZE 512
++
++/*
++ * LCD Host Controller Configuration Register
++ *
++ * This iomem area supports only 16-bit IO.
++ */
++struct tmio_lhccr {
++ u16 x00[2];
++ u16 cmd; /* 0x04 Command */
++ u16 x01;
++ u16 revid; /* 0x08 Revision ID */
++ u16 x02[3];
++ u16 basel; /* 0x10 LCD Control Reg Base Addr Low */
++ u16 baseh; /* 0x12 LCD Control Reg Base Addr High */
++ u16 x03[0x16];
++ u16 ugcc; /* 0x40 Unified Gated Clock Control */
++ u16 gcc; /* 0x42 Gated Clock Control */
++ u16 x04[6];
++ u16 usc; /* 0x50 Unified Software Clear */
++ u16 x05[7];
++ u16 vramrtc; /* 0x60 VRAM Timing Control */
++ /* 0x61 VRAM Refresh Control */
++ u16 vramsac; /* 0x62 VRAM Access Control */
++ /* 0x63 VRAM Status */
++ u16 vrambc; /* 0x64 VRAM Block Control */
++ u16 x06[0x4d];
++};
++
++/*
++ * LCD Control Register
++ *
++ * This iomem area supports only 16-bit IO.
++ */
++struct tmio_lcr {
++ u16 uis; /* 0x000 Unified Interrupt Status */
++ u16 x00[3];
++ u16 vhpn; /* 0x008 VRAM Horizontal Pixel Number */
++ u16 cfsal; /* 0x00a Command FIFO Start Address Low */
++ u16 cfsah; /* 0x00c Command FIFO Start Address High */
++ u16 cfs; /* 0x00e Command FIFO Size */
++ u16 cfws; /* 0x010 Command FIFO Writeable Size */
++ u16 bbie; /* 0x012 BitBLT Interrupt Enable */
++ u16 bbisc; /* 0x014 BitBLT Interrupt Status and Clear */
++ u16 ccs; /* 0x016 Command Count Status */
++ u16 bbes; /* 0x018 BitBLT Execution Status */
++ u16 x01;
++ u16 cmdl; /* 0x01c Command Low */
++ u16 cmdh; /* 0x01e Command High */
++ u16 x02;
++ u16 cfc; /* 0x022 Command FIFO Clear */
++ u16 ccifc; /* 0x024 CMOS Camera IF Control */
++ u16 hwt; /* 0x026 Hardware Test */
++ u16 x03[0x6c];
++ u16 lcdccrc;/* 0x100 LCDC Clock and Reset Control */
++ u16 lcdcc; /* 0x102 LCDC Control */
++ u16 lcdcopc;/* 0x104 LCDC Output Pin Control */
++ u16 x04;
++ u16 lcdis; /* 0x108 LCD Interrupt Status */
++ u16 lcdim; /* 0x10a LCD Interrupt Mask */
++ u16 lcdie; /* 0x10c LCD Interrupt Enable */
++ u16 x05[10];
++ u16 gdsal; /* 0x122 Graphics Display Start Address Low */
++ u16 gdsah; /* 0x124 Graphics Display Start Address High */
++ u16 x06[2];
++ u16 vhpcl; /* 0x12a VRAM Horizontal Pixel Count Low */
++ u16 vhpch; /* 0x12c VRAM Horizontal Pixel Count High */
++ u16 gm; /* 0x12e Graphic Mode(VRAM access enable) */
++ u16 x07[8];
++ u16 ht; /* 0x140 Horizontal Total */
++ u16 hds; /* 0x142 Horizontal Display Start */
++ u16 hss; /* 0x144 H-Sync Start */
++ u16 hse; /* 0x146 H-Sync End */
++ u16 x08[2];
++ u16 hnp; /* 0x14c Horizontal Number of Pixels */
++ u16 x09;
++ u16 vt; /* 0x150 Vertical Total */
++ u16 vds; /* 0x152 Vertical Display Start */
++ u16 vss; /* 0x154 V-Sync Start */
++ u16 vse; /* 0x156 V-Sync End */
++ u16 x0a[4];
++ u16 cdln; /* 0x160 Current Display Line Number */
++ u16 iln; /* 0x162 Interrupt Line Number */
++ u16 sp; /* 0x164 Sync Polarity */
++ u16 misc; /* 0x166 MISC(RGB565 mode) */
++ u16 x0b;
++ u16 vihss; /* 0x16a Video Interface H-Sync Start */
++ u16 vivs; /* 0x16c Video Interface Vertical Start */
++ u16 vive; /* 0x16e Video Interface Vertical End */
++ u16 vivss; /* 0x170 Video Interface V-Sync Start */
++ u16 x0c[6];
++ u16 vccis; /* 0x17e Video / CMOS Camera Interface Select */
++ u16 vidwsal;/* 0x180 VI Data Write Start Address Low */
++ u16 vidwsah;/* 0x182 VI Data Write Start Address High */
++ u16 vidrsal;/* 0x184 VI Data Read Start Address Low */
++ u16 vidrsah;/* 0x186 VI Data Read Start Address High */
++ u16 vipddst;/* 0x188 VI Picture Data Display Start Timing */
++ u16 vipddet;/* 0x186 VI Picture Data Display End Timing */
++ u16 vie; /* 0x18c Video Interface Enable */
++ u16 vcs; /* 0x18e Video/Camera Select */
++ u16 x0d[2];
++ u16 vphwc; /* 0x194 Video Picture Horizontal Wait Count */
++ u16 vphs; /* 0x196 Video Picture Horizontal Size */
++ u16 vpvwc; /* 0x198 Video Picture Vertical Wait Count */
++ u16 vpvs; /* 0x19a Video Picture Vertical Size */
++ u16 x0e[2];
++ u16 plhpix; /* 0x1a0 PLHPIX */
++ u16 xs; /* 0x1a2 XStart */
++ u16 xckhw; /* 0x1a4 XCK High Width */
++ u16 x0f;
++ u16 sths; /* 0x1a8 STH Start */
++ u16 vt2; /* 0x1aa Vertical Total */
++ u16 ycksw; /* 0x1ac YCK Start Wait */
++ u16 ysts; /* 0x1ae YST Start */
++ u16 ppols; /* 0x1b0 #PPOL Start */
++ u16 precw; /* 0x1b2 PREC Width */
++ u16 vclkhw; /* 0x1b4 VCLK High Width */
++ u16 oc; /* 0x1b6 Output Control */
++ u16 x10[0x24];
++};
++static char *mode_option __devinitdata;
++
++struct tmiofb_par {
++ u32 pseudo_palette[16];
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ wait_queue_head_t wait_acc;
++ bool use_polling;
++#endif
++
++ struct tmio_lhccr __iomem *ccr;
++ struct tmio_lcr __iomem *lcr;
++ void __iomem *vram;
++};
++
++/*--------------------------------------------------------------------------*/
++
++static irqreturn_t tmiofb_irq(int irq, void *__info);
++
++/*--------------------------------------------------------------------------*/
++
++
++/*
++ * Turns off the LCD controller and LCD host controller.
++ */
++static int tmiofb_hw_stop(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct tmio_lhccr __iomem *ccr = par->ccr;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++
++ iowrite16(0, &ccr->ugcc);
++ iowrite16(0, &lcr->gm);
++ data->lcd_set_power(dev, 0);
++ iowrite16(0x0010, &lcr->lcdccrc);
++
++ return 0;
++}
++
++/*
++ * Initializes the LCD host controller.
++ */
++static int tmiofb_hw_init(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct tmio_lhccr __iomem *ccr = par->ccr;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ const struct resource *nlcr = NULL;
++ const struct resource *vram = NULL;
++ unsigned long base;
++ int i;
++
++ for (i = 0; i < cell->num_resources; i++) {
++ if (!strcmp((cell->resources+i)->name, TMIO_FB_CONTROL))
++ nlcr = &cell->resources[i];
++ if (!strcmp((cell->resources+i)->name, TMIO_FB_VRAM))
++ vram = &cell->resources[i];
++ }
++
++ if (nlcr == NULL || vram == NULL)
++ return -EINVAL;
++
++ base = nlcr->start;
++
++ if (info->mode == NULL) {
++ printk(KERN_ERR "tmio-fb: null info->mode\n");
++ info->mode = data->modes;
++ }
++
++ data->lcd_mode(dev, info->mode);
++
++ iowrite16(0x003a, &ccr->ugcc);
++ iowrite16(0x003a, &ccr->gcc);
++ iowrite16(0x3f00, &ccr->usc);
++
++ data->lcd_set_power(dev, 1);
++ mdelay(2);
++
++ iowrite16(0x0000, &ccr->usc);
++ iowrite16(base >> 16, &ccr->baseh);
++ iowrite16(base, &ccr->basel);
++ iowrite16(0x0002, &ccr->cmd); /* base address enable */
++ iowrite16(0x40a8, &ccr->vramrtc); /* VRAMRC, VRAMTC */
++ iowrite16(0x0018, &ccr->vramsac); /* VRAMSTS, VRAMAC */
++ iowrite16(0x0002, &ccr->vrambc);
++ mdelay(2);
++ iowrite16(0x000b, &ccr->vrambc);
++
++ base = vram->start + info->screen_size;
++ iowrite16(base >> 16, &lcr->cfsah);
++ iowrite16(base, &lcr->cfsal);
++ iowrite16(TMIOFB_FIFO_SIZE - 1, &lcr->cfs);
++ iowrite16(1, &lcr->cfc);
++ iowrite16(1, &lcr->bbie);
++ iowrite16(0, &lcr->cfws);
++
++ return 0;
++}
++
++/*
++ * Sets the LCD controller's output resolution and pixel clock
++ */
++static void tmiofb_hw_mode(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct fb_videomode *mode = info->mode;
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ unsigned int i;
++
++ iowrite16(0, &lcr->gm);
++ data->lcd_set_power(dev, 0);
++ iowrite16(0x0010, &lcr->lcdccrc);
++ data->lcd_mode(dev, mode);
++ data->lcd_set_power(dev, 1);
++
++ iowrite16(i = mode->xres * 2, &lcr->vhpn);
++ iowrite16(0, &lcr->gdsah);
++ iowrite16(0, &lcr->gdsal);
++ iowrite16(i >> 16, &lcr->vhpch);
++ iowrite16(i, &lcr->vhpcl);
++ iowrite16(i = 0, &lcr->hss);
++ iowrite16(i += mode->hsync_len, &lcr->hse);
++ iowrite16(i += mode->left_margin, &lcr->hds);
++ iowrite16(i += mode->xres + mode->right_margin, &lcr->ht);
++ iowrite16(mode->xres, &lcr->hnp);
++ iowrite16(i = 0, &lcr->vss);
++ iowrite16(i += mode->vsync_len, &lcr->vse);
++ iowrite16(i += mode->upper_margin, &lcr->vds);
++ iowrite16(i += mode->yres, &lcr->iln);
++ iowrite16(i += mode->lower_margin, &lcr->vt);
++ iowrite16(3, /* RGB565 mode */ &lcr->misc);
++ iowrite16(1, /* VRAM enable */ &lcr->gm);
++ iowrite16(0x4007, &lcr->lcdcc);
++ iowrite16(3, /* sync polarity */ &lcr->sp);
++
++ iowrite16(0x0010, &lcr->lcdccrc);
++ mdelay(5);
++ iowrite16(0x0014, &lcr->lcdccrc); /* STOP_CKP */
++ mdelay(5);
++ iowrite16(0x0015, &lcr->lcdccrc); /* STOP_CKP | SOFT_RESET */
++ iowrite16(0xfffa, &lcr->vcs);
++}
++
++/*--------------------------------------------------------------------------*/
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++static int __must_check
++tmiofb_acc_wait(struct fb_info *info, unsigned int ccs)
++{
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ if (in_atomic() || par->use_polling) {
++ int i = 0;
++ while (ioread16(&lcr->ccs) > ccs) {
++ udelay(1);
++ i++;
++ if (i > 10000) {
++ printk(KERN_ERR "tmiofb: timeout waiting for %d\n", ccs);
++ return -ETIMEDOUT;
++ }
++ tmiofb_irq(-1, info);
++ }
++ } else {
++ if (!wait_event_interruptible_timeout(par->wait_acc,
++ ioread16(&par->lcr->ccs) <= ccs, 1000)) {
++ printk(KERN_ERR "tmiofb: timeout waiting for %d\n", ccs);
++ return -ETIMEDOUT;
++ }
++ }
++
++ return 0;
++}
++
++/*
++ * Writes an accelerator command to the accelerator's FIFO.
++ */
++static int
++tmiofb_acc_write(struct fb_info *info, const u32 *cmd, unsigned int count)
++{
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ int ret;
++
++ ret = tmiofb_acc_wait(info, TMIOFB_FIFO_SIZE - count);
++ if (ret)
++ return ret;
++
++ for (; count; count--, cmd++) {
++ iowrite16(*cmd >> 16, &lcr->cmdh);
++ iowrite16(*cmd, &lcr->cmdl);
++ }
++
++ return ret;
++}
++
++/*
++ * Wait for the accelerator to finish its operations before writing
++ * to the framebuffer for consistent display output.
++ */
++static int tmiofb_sync(struct fb_info *fbi)
++{
++ struct tmiofb_par *par = fbi->par;
++
++ int ret;
++ int i = 0;
++
++ ret = tmiofb_acc_wait(fbi, 0);
++
++ while (ioread16(&par->lcr->bbes) & 2) { /* blit active */
++ udelay(1);
++ i++ ;
++ if (i > 10000) {
++ printk(KERN_ERR "timeout waiting for blit to end!\n");
++ return -ETIMEDOUT;
++ }
++ }
++
++ return ret;
++}
++
++static void
++tmiofb_fillrect(struct fb_info *fbi, const struct fb_fillrect *rect)
++{
++ const u32 cmd [] = {
++ TMIOFB_ACC_DSADR((rect->dy * fbi->mode->xres + rect->dx) * 2),
++ TMIOFB_ACC_DHPIX(rect->width - 1),
++ TMIOFB_ACC_DVPIX(rect->height - 1),
++ TMIOFB_ACC_FILL(rect->color),
++ TMIOFB_ACC_FLGO,
++ };
++
++ if (fbi->state != FBINFO_STATE_RUNNING ||
++ fbi->flags & FBINFO_HWACCEL_DISABLED) {
++ cfb_fillrect(fbi, rect);
++ return;
++ }
++
++ tmiofb_acc_write(fbi, cmd, ARRAY_SIZE(cmd));
++}
++
++static void
++tmiofb_copyarea(struct fb_info *fbi, const struct fb_copyarea *area)
++{
++ const u32 cmd [] = {
++ TMIOFB_ACC_DSADR((area->dy * fbi->mode->xres + area->dx) * 2),
++ TMIOFB_ACC_DHPIX(area->width - 1),
++ TMIOFB_ACC_DVPIX(area->height - 1),
++ TMIOFB_ACC_SSADR((area->sy * fbi->mode->xres + area->sx) * 2),
++ TMIOFB_ACC_SCGO,
++ };
++
++ if (fbi->state != FBINFO_STATE_RUNNING ||
++ fbi->flags & FBINFO_HWACCEL_DISABLED) {
++ cfb_copyarea(fbi, area);
++ return;
++ }
++
++ tmiofb_acc_write(fbi, cmd, ARRAY_SIZE(cmd));
++}
++#endif
++
++static void tmiofb_clearscreen(struct fb_info *info)
++{
++ const struct fb_fillrect rect = {
++ .dx = 0,
++ .dy = 0,
++ .width = info->mode->xres,
++ .height = info->mode->yres,
++ .color = 0,
++ };
++
++ info->fbops->fb_fillrect(info, &rect);
++}
++
++static int tmiofb_vblank(struct fb_info *fbi, struct fb_vblank *vblank)
++{
++ struct tmiofb_par *par = fbi->par;
++ struct fb_videomode *mode = fbi->mode;
++ unsigned int vcount = ioread16(&par->lcr->cdln);
++ unsigned int vds = mode->vsync_len + mode->upper_margin;
++
++ vblank->vcount = vcount;
++ vblank->flags = FB_VBLANK_HAVE_VBLANK | FB_VBLANK_HAVE_VCOUNT
++ | FB_VBLANK_HAVE_VSYNC;
++
++ if (vcount < mode->vsync_len)
++ vblank->flags |= FB_VBLANK_VSYNCING;
++
++ if (vcount < vds || vcount > vds + mode->yres)
++ vblank->flags |= FB_VBLANK_VBLANKING;
++
++ return 0;
++}
++
++
++static int tmiofb_ioctl(struct fb_info *fbi,
++ unsigned int cmd, unsigned long arg)
++{
++ switch (cmd) {
++ case FBIOGET_VBLANK: {
++ struct fb_vblank vblank = {0};
++ void __user *argp = (void __user *) arg;
++
++ tmiofb_vblank(fbi, &vblank);
++ if (copy_to_user(argp, &vblank, sizeof vblank))
++ return -EFAULT;
++ return 0;
++ }
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ case FBIO_TMIO_ACC_SYNC:
++ tmiofb_sync(fbi);
++ return 0;
++
++ case FBIO_TMIO_ACC_WRITE: {
++ u32 __user *argp = (void __user *) arg;
++ u32 len;
++ u32 acc [16];
++
++ if (copy_from_user(&len, argp, sizeof(u32)))
++ return -EFAULT;
++ if (len > ARRAY_SIZE(acc))
++ return -EINVAL;
++ if (copy_from_user(acc, argp + 1, sizeof(u32) * len))
++ return -EFAULT;
++
++ return tmiofb_acc_write(fbi, acc, len);
++ }
++#endif
++ }
++
++ return -EINVAL;
++}
++
++/*--------------------------------------------------------------------------*/
++
++/* Select the smallest mode that allows the desired resolution to be
++ * displayed. If desired, the x and y parameters can be rounded up to
++ * match the selected mode.
++ */
++static struct fb_videomode*
++tmiofb_find_mode(struct fb_info *info, struct fb_var_screeninfo *var)
++{
++ struct mfd_cell *cell = mfd_get_cell(to_platform_device(info->device));
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_videomode *best = NULL;
++ int i;
++
++ for (i = 0; i < data->num_modes; i++) {
++ struct fb_videomode *mode = data->modes + i;
++
++ if (mode->xres >= var->xres && mode->yres >= var->yres
++ && (!best || (mode->xres < best->xres
++ && mode->yres < best->yres)))
++ best = mode;
++ }
++
++ return best;
++}
++
++static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
++{
++
++ struct fb_videomode *mode;
++
++ mode = tmiofb_find_mode(info, var);
++ if (!mode || var->bits_per_pixel > 16)
++ return -EINVAL;
++
++ fb_videomode_to_var(var, mode);
++
++ var->xres_virtual = mode->xres;
++ var->yres_virtual = info->screen_size / (mode->xres * 2);
++ var->xoffset = 0;
++ var->yoffset = 0;
++ var->bits_per_pixel = 16;
++ var->grayscale = 0;
++ var->red.offset = 11; var->red.length = 5;
++ var->green.offset = 5; var->green.length = 6;
++ var->blue.offset = 0; var->blue.length = 5;
++ var->transp.offset = 0; var->transp.length = 0;
++ var->nonstd = 0;
++ var->height = 82; /* mm */
++ var->width = 60; /* mm */
++ var->rotate = 0;
++ return 0;
++}
++
++static int tmiofb_set_par(struct fb_info *info)
++{
++/* struct fb_var_screeninfo *var = &info->var;
++ struct fb_videomode *mode;
++
++ mode = tmiofb_find_mode(info, var);
++ if (!mode)
++ return -EINVAL;
++
++ if (info->mode == mode)
++ return 0;
++
++ info->mode = mode; */
++ info->fix.line_length = info->mode->xres * 2;
++
++ tmiofb_hw_mode(to_platform_device(info->device));
++ tmiofb_clearscreen(info);
++ return 0;
++}
++
++static int tmiofb_setcolreg(unsigned regno, unsigned red, unsigned green,
++ unsigned blue, unsigned transp,
++ struct fb_info *info)
++{
++ struct tmiofb_par *par = info->par;
++
++ if (regno < ARRAY_SIZE(par->pseudo_palette)) {
++ par->pseudo_palette [regno] =
++ ((red & 0xf800)) |
++ ((green & 0xfc00) >> 5) |
++ ((blue & 0xf800) >> 11);
++ return 0;
++ }
++
++ return 1;
++}
++
++static struct fb_ops tmiofb_ops = {
++ .owner = THIS_MODULE,
++
++ .fb_ioctl = tmiofb_ioctl,
++ .fb_check_var = tmiofb_check_var,
++ .fb_set_par = tmiofb_set_par,
++ .fb_setcolreg = tmiofb_setcolreg,
++ .fb_imageblit = cfb_imageblit,
++#ifdef CONFIG_FB_TMIO_ACCELL
++ .fb_sync = tmiofb_sync,
++ .fb_fillrect = tmiofb_fillrect,
++ .fb_copyarea = tmiofb_copyarea,
++#else
++ .fb_fillrect = cfb_fillrect,
++ .fb_copyarea = cfb_copyarea,
++#endif
++};
++
++/*--------------------------------------------------------------------------*/
++
++/*
++ * reasons for an interrupt:
++ * uis bbisc lcdis
++ * 0100 0001 accelerator command completed
++ * 2000 0001 vsync start
++ * 2000 0002 display start
++ * 2000 0004 line number match(0x1ff mask???)
++ */
++static irqreturn_t tmiofb_irq(int irq, void *__info)
++{
++ struct fb_info *info = __info;
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ unsigned int bbisc = ioread16(&lcr->bbisc);
++
++
++ if (unlikely(par->use_polling && irq != -1)) {
++ printk(KERN_INFO "tmiofb: switching to waitq\n");
++ par->use_polling = false;
++ }
++
++ iowrite16(bbisc, &lcr->bbisc);
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ if (bbisc & 1)
++ wake_up(&par->wait_acc);
++#endif
++
++ return IRQ_HANDLED;
++}
++
++static int tmiofb_probe(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct resource *ccr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_FB_CONFIG);
++ struct resource *lcr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_FB_CONTROL);
++ struct resource *vram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_FB_VRAM);
++ int irq = platform_get_irq(dev, 0);
++ struct fb_info *info;
++ struct tmiofb_par *par;
++ int retval;
++
++ if (data == NULL) {
++ dev_err(&dev->dev, "NULL platform data!\n");
++ return -EINVAL;
++ }
++
++ info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev);
++
++ if (!info) {
++ retval = -ENOMEM;
++ goto err_framebuffer_alloc;
++ }
++
++ par = info->par;
++ platform_set_drvdata(dev, info);
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ init_waitqueue_head(&par->wait_acc);
++
++ par->use_polling = true;
++
++ info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA
++ | FBINFO_HWACCEL_FILLRECT;
++#else
++ info->flags = FBINFO_DEFAULT;
++#endif
++
++ info->fbops = &tmiofb_ops;
++
++ strcpy(info->fix.id, "tmio-fb");
++ info->fix.smem_start = vram->start;
++ info->fix.smem_len = vram->end - vram->start + 1;
++ info->fix.type = FB_TYPE_PACKED_PIXELS;
++ info->fix.visual = FB_VISUAL_TRUECOLOR;
++ info->fix.mmio_start = lcr->start;
++ info->fix.mmio_len = lcr->end - lcr->start + 1;
++ info->fix.accel = FB_ACCEL_NONE;
++ info->screen_size = info->fix.smem_len - (4 * TMIOFB_FIFO_SIZE);
++ info->pseudo_palette = par->pseudo_palette;
++
++ par->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1);
++ if (!par->ccr) {
++ retval = -ENOMEM;
++ goto err_ioremap_ccr;
++ }
++
++ par->lcr = ioremap(info->fix.mmio_start, info->fix.mmio_len);
++ if (!par->lcr) {
++ retval = -ENOMEM;
++ goto err_ioremap_lcr;
++ }
++
++ par->vram = ioremap(info->fix.smem_start, info->fix.smem_len);
++ if (!par->vram) {
++ retval = -ENOMEM;
++ goto err_ioremap_vram;
++ }
++ info->screen_base = par->vram;
++
++ retval = request_irq(irq, &tmiofb_irq, IRQF_DISABLED,
++ dev->dev.bus_id, info);
++
++ if (retval)
++ goto err_request_irq;
++
++ retval = fb_find_mode(&info->var, info, mode_option,
++ data->modes, data->num_modes,
++ data->modes, 16);
++ if (!retval) {
++ retval = -EINVAL;
++ goto err_find_mode;
++ }
++
++ retval = cell->enable(dev);
++ if (retval)
++ goto err_enable;
++
++ retval = tmiofb_hw_init(dev);
++ if (retval)
++ goto err_hw_init;
++
++/* retval = tmiofb_set_par(info);
++ if (retval)
++ goto err_set_par;*/
++
++ retval = register_framebuffer(info);
++ if (retval < 0)
++ goto err_register_framebuffer;
++
++ printk(KERN_INFO "fb%d: %s frame buffer device\n",
++ info->node, info->fix.id);
++
++ return 0;
++
++err_register_framebuffer:
++/*err_set_par:*/
++ tmiofb_hw_stop(dev);
++err_hw_init:
++ cell->disable(dev);
++err_enable:
++err_find_mode:
++ free_irq(irq, info);
++err_request_irq:
++ iounmap(par->vram);
++err_ioremap_vram:
++ iounmap(par->lcr);
++err_ioremap_lcr:
++ iounmap(par->ccr);
++err_ioremap_ccr:
++ platform_set_drvdata(dev, NULL);
++ framebuffer_release(info);
++err_framebuffer_alloc:
++ return retval;
++}
++
++static int __devexit tmiofb_remove(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct fb_info *info = platform_get_drvdata(dev);
++ int irq = platform_get_irq(dev, 0);
++ struct tmiofb_par *par;
++
++ if (info) {
++ par = info->par;
++ unregister_framebuffer(info);
++
++ tmiofb_hw_stop(dev);
++
++ cell->disable(dev);
++
++ free_irq(irq, info);
++
++ iounmap(par->vram);
++ iounmap(par->lcr);
++ iounmap(par->ccr);
++
++ framebuffer_release(info);
++ platform_set_drvdata(dev, NULL);
++ }
++
++ return 0;
++}
++
++#if 0
++static void tmiofb_dump_regs(struct platform_device *dev)
++{
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct tmio_lhccr __iomem *ccr = par->ccr;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++
++ printk("lhccr:\n");
++#define CCR_PR(n) printk("\t" #n " = \t%04x\n", ioread16(&ccr->n));
++ CCR_PR(cmd);
++ CCR_PR(revid);
++ CCR_PR(basel);
++ CCR_PR(baseh);
++ CCR_PR(ugcc);
++ CCR_PR(gcc);
++ CCR_PR(usc);
++ CCR_PR(vramrtc);
++ CCR_PR(vramsac);
++ CCR_PR(vrambc);
++#undef CCR_PR
++
++ printk("lcr: \n");
++#define LCR_PR(n) printk("\t" #n " = \t%04x\n", ioread16(&lcr->n));
++ LCR_PR(uis);
++ LCR_PR(vhpn);
++ LCR_PR(cfsal);
++ LCR_PR(cfsah);
++ LCR_PR(cfs);
++ LCR_PR(cfws);
++ LCR_PR(bbie);
++ LCR_PR(bbisc);
++ LCR_PR(ccs);
++ LCR_PR(bbes);
++ LCR_PR(cmdl);
++ LCR_PR(cmdh);
++ LCR_PR(cfc);
++ LCR_PR(ccifc);
++ LCR_PR(hwt);
++ LCR_PR(lcdccrc);
++ LCR_PR(lcdcc);
++ LCR_PR(lcdcopc);
++ LCR_PR(lcdis);
++ LCR_PR(lcdim);
++ LCR_PR(lcdie);
++ LCR_PR(gdsal);
++ LCR_PR(gdsah);
++ LCR_PR(vhpcl);
++ LCR_PR(vhpch);
++ LCR_PR(gm);
++ LCR_PR(ht);
++ LCR_PR(hds);
++ LCR_PR(hss);
++ LCR_PR(hse);
++ LCR_PR(hnp);
++ LCR_PR(vt);
++ LCR_PR(vds);
++ LCR_PR(vss);
++ LCR_PR(vse);
++ LCR_PR(cdln);
++ LCR_PR(iln);
++ LCR_PR(sp);
++ LCR_PR(misc);
++ LCR_PR(vihss);
++ LCR_PR(vivs);
++ LCR_PR(vive);
++ LCR_PR(vivss);
++ LCR_PR(vccis);
++ LCR_PR(vidwsal);
++ LCR_PR(vidwsah);
++ LCR_PR(vidrsal);
++ LCR_PR(vidrsah);
++ LCR_PR(vipddst);
++ LCR_PR(vipddet);
++ LCR_PR(vie);
++ LCR_PR(vcs);
++ LCR_PR(vphwc);
++ LCR_PR(vphs);
++ LCR_PR(vpvwc);
++ LCR_PR(vpvs);
++ LCR_PR(plhpix);
++ LCR_PR(xs);
++ LCR_PR(xckhw);
++ LCR_PR(sths);
++ LCR_PR(vt2);
++ LCR_PR(ycksw);
++ LCR_PR(ysts);
++ LCR_PR(ppols);
++ LCR_PR(precw);
++ LCR_PR(vclkhw);
++ LCR_PR(oc);
++#undef LCR_PR
++}
++#endif
++
++#ifdef CONFIG_PM
++static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ int retval = 0;
++
++ acquire_console_sem();
++
++ fb_set_suspend(info, 1);
++
++ if (info->fbops->fb_sync)
++ info->fbops->fb_sync(info);
++
++
++ printk(KERN_INFO "tmiofb: switching to polling\n");
++ par->use_polling = true;
++ tmiofb_hw_stop(dev);
++
++ if (cell->suspend)
++ retval = cell->suspend(dev);
++
++ release_console_sem();
++
++ return retval;
++}
++
++static int tmiofb_resume(struct platform_device *dev)
++{
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ int retval;
++
++ acquire_console_sem();
++
++ if (cell->resume) {
++ retval = cell->resume(dev);
++ if (retval)
++ return retval;
++ }
++
++ tmiofb_irq(-1, info);
++
++ tmiofb_hw_init(dev);
++
++ tmiofb_hw_mode(dev);
++
++ fb_set_suspend(info, 0);
++ release_console_sem();
++ return 0;
++}
++#endif
++
++static struct platform_driver tmiofb_driver = {
++ .driver.name = "tmio-fb",
++ .driver.owner = THIS_MODULE,
++ .probe = tmiofb_probe,
++ .remove = __devexit_p(tmiofb_remove),
++#ifdef CONFIG_PM
++ .suspend = tmiofb_suspend,
++ .resume = tmiofb_resume,
++#endif
++};
++
++/*--------------------------------------------------------------------------*/
++
++#ifndef MODULE
++static void __init tmiofb_setup(char *options)
++{
++ char *this_opt;
++
++ if (!options || !*options)
++ return;
++
++ while ((this_opt = strsep(&options, ",")) != NULL) {
++ if (!*this_opt) continue;
++ /*
++ * FIXME
++ */
++ }
++}
++#endif
++
++static int __init tmiofb_init(void)
++{
++#ifndef MODULE
++ char *option = NULL;
++
++ if (fb_get_options("tmiofb", &option))
++ return -ENODEV;
++ tmiofb_setup(option);
++#endif
++ return platform_driver_register(&tmiofb_driver);
++}
++
++static void __exit tmiofb_cleanup(void)
++{
++ platform_driver_unregister(&tmiofb_driver);
++}
++
++module_init(tmiofb_init);
++module_exit(tmiofb_cleanup);
++
++MODULE_DESCRIPTION("TMIO framebuffer driver");
++MODULE_AUTHOR("Chris Humbert, Dirk Opfer, Dmitry Baryshkov");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..f358c069d0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch
@@ -0,0 +1,431 @@
+From e5f06830bc8d3ef4792c9c0569825d0347b39852 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:43:31 +0000
+Subject: [PATCH 10/64] OHCI driver for TMIO devices
+
+---
+ drivers/usb/Kconfig | 1 +
+ drivers/usb/host/Kconfig | 1 +
+ drivers/usb/host/ohci-hcd.c | 5 +
+ drivers/usb/host/ohci-tmio.c | 369 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 376 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/usb/host/ohci-tmio.c
+
+diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
+index 7580aa5..8912042 100644
+--- a/drivers/usb/Kconfig
++++ b/drivers/usb/Kconfig
+@@ -36,6 +36,7 @@ config USB_ARCH_HAS_OHCI
+ default y if ARCH_EP93XX
+ default y if ARCH_AT91
+ default y if ARCH_PNX4008
++ default y if MFD_TC6393XB
+ # PPC:
+ default y if STB03xxx
+ default y if PPC_MPC52xx
+diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
+index 49a91c5..5ae3589 100644
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -101,6 +101,7 @@ config USB_OHCI_HCD
+ depends on USB && USB_ARCH_HAS_OHCI
+ select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+ select I2C if ARCH_PNX4008
++ select DMABOUNCE if MFD_TC6393XB
+ ---help---
+ The Open Host Controller Interface (OHCI) is a standard for accessing
+ USB 1.1 host controller hardware. It does more in hardware than Intel's
+diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
+index ecfe800..77abf3e 100644
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -1043,6 +1043,11 @@ MODULE_LICENSE ("GPL");
+ #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
+ #endif
+
++#ifdef CONFIG_MFD_TC6393XB
++#include "ohci-tmio.c"
++#define PLATFORM_DRIVER ohci_hcd_tmio_driver
++#endif
++
+ #ifdef CONFIG_USB_OHCI_HCD_SSB
+ #include "ohci-ssb.c"
+ #define SSB_OHCI_DRIVER ssb_ohci_driver
+diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
+new file mode 100644
+index 0000000..be609f3
+--- /dev/null
++++ b/drivers/usb/host/ohci-tmio.c
+@@ -0,0 +1,369 @@
++/*
++ * OHCI HCD(Host Controller Driver) for USB.
++ *
++ *(C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
++ *(C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
++ *(C) Copyright 2002 Hewlett-Packard Company
++ *
++ * Bus glue for Toshiba Mobile IO(TMIO) Controller's OHCI core
++ *(C) Copyright 2005 Chris Humbert <mahadri-usb@drigon.com>
++ *
++ * This is known to work with the following variants:
++ * TC6393XB revision 3 (32kB SRAM)
++ *
++ * The TMIO's OHCI core DMAs through a small internal buffer that
++ * is directly addressable by the CPU. dma_declare_coherent_memory
++ * and DMA bounce buffers allow the higher-level OHCI host driver to
++ * work. However, the dma API doesn't handle dma mapping failures
++ * well(dma_sg_map() is a prime example), so it is unusable.
++ *
++ * This HC pretends be a PIO-ish controller and uses the kernel's
++ * generic allocator for the entire SRAM. Using the USB core's
++ * usb_operations, we provide hcd_buffer_alloc/free. Using the OHCI's
++ * ohci_ops, we provide memory management for OHCI's TDs and EDs. We
++ * internally queue a URB's TDs until enough dma memory is available
++ * to enqueue them with the HC.
++ *
++ * Written from sparse documentation from Toshiba and Sharp's driver
++ * for the 2.4 kernel,
++ * usb-ohci-tc6393.c(C) Copyright 2004 Lineo Solutions, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++/*#include <linux/fs.h>
++#include <linux/mount.h>
++#include <linux/pagemap.h>
++#include <linux/init.h>
++#include <linux/namei.h>
++#include <linux/sched.h>*/
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/dma-mapping.h>
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * USB Host Controller Configuration Register
++ */
++struct tmio_uhccr {
++ u8 x00[8];
++ u8 revid; /* 0x08 Revision ID */
++ u8 x01[7];
++ u16 basel; /* 0x10 USB Control Register Base Address Low */
++ u16 baseh; /* 0x12 USB Control Register Base Address High */
++ u8 x02[0x2c];
++ u8 ilme; /* 0x40 Internal Local Memory Enable */
++ u8 x03[0x0b];
++ u16 pm; /* 0x4c Power Management */
++ u8 x04[2];
++ u8 intc; /* 0x50 INT Control */
++ u8 x05[3];
++ u16 lmw1l; /* 0x54 Local Memory Window 1 LMADRS Low */
++ u16 lmw1h; /* 0x56 Local Memory Window 1 LMADRS High */
++ u16 lmw1bl; /* 0x58 Local Memory Window 1 Base Address Low */
++ u16 lmw1bh; /* 0x5A Local Memory Window 1 Base Address High */
++ u16 lmw2l; /* 0x5C Local Memory Window 2 LMADRS Low */
++ u16 lmw2h; /* 0x5E Local Memory Window 2 LMADRS High */
++ u16 lmw2bl; /* 0x60 Local Memory Window 2 Base Address Low */
++ u16 lmw2bh; /* 0x62 Local Memory Window 2 Base Address High */
++ u8 x06[0x98];
++ u8 misc; /* 0xFC MISC */
++ u8 x07[3];
++} __attribute__((packed));
++
++#define UHCCR_PM_GKEN 0x0001
++#define UHCCR_PM_CKRNEN 0x0002
++#define UHCCR_PM_USBPW1 0x0004
++#define UHCCR_PM_USBPW2 0x0008
++#define UHCCR_PM_PMEE 0x0100
++#define UHCCR_PM_PMES 0x8000
++
++/*-------------------------------------------------------------------------*/
++
++struct tmio_hcd {
++ struct tmio_uhccr __iomem *ccr;
++};
++
++#define hcd_to_tmio(hcd) ((struct tmio_hcd *)(hcd_to_ohci(hcd) + 1))
++#define ohci_to_tmio(ohci) ((struct tmio_hcd *)(ohci + 1))
++
++/*-------------------------------------------------------------------------*/
++
++static void tmio_stop_hc(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ u16 pm;
++
++ pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN | UHCCR_PM_USBPW1 | UHCCR_PM_USBPW2;
++ iowrite8(0, &ccr->intc);
++ iowrite8(0, &ccr->ilme);
++ iowrite16(0, &ccr->basel);
++ iowrite16(0, &ccr->baseh);
++ iowrite16(pm, &ccr->pm);
++
++ cell->disable(dev);
++}
++
++static void tmio_start_hc(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ u16 pm;
++ unsigned long base = hcd->rsrc_start;
++
++ pm = UHCCR_PM_CKRNEN | UHCCR_PM_GKEN | UHCCR_PM_PMEE | UHCCR_PM_PMES;
++ cell->enable(dev);
++
++ iowrite16(pm, &ccr->pm);
++ iowrite16(base, &ccr->basel);
++ iowrite16(base >> 16, &ccr->baseh);
++ iowrite8(1, &ccr->ilme);
++ iowrite8(2, &ccr->intc);
++
++ dev_info(&dev->dev, "revision %d @ 0x%08llx, irq %d\n",
++ ioread8(&ccr->revid), hcd->rsrc_start, hcd->irq);
++}
++
++static int usb_hcd_tmio_probe(const struct hc_driver *driver,
++ struct platform_device *dev)
++{
++ struct resource *config = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONFIG);
++ struct resource *regs = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONTROL);
++ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++ int irq = platform_get_irq(dev, 0);
++ struct tmio_hcd *tmio;
++ struct ohci_hcd *ohci;
++ struct usb_hcd *hcd;
++ int retval;
++
++ if (usb_disabled())
++ return -ENODEV;
++
++ hcd = usb_create_hcd(driver, &dev->dev, dev->dev.bus_id);
++ if (!hcd) {
++ retval = -ENOMEM;
++ goto err_usb_create_hcd;
++ }
++
++ hcd->rsrc_start = regs->start;
++ hcd->rsrc_len = regs->end - regs->start + 1;
++
++ tmio = hcd_to_tmio(hcd);
++
++ tmio->ccr = ioremap(config->start, config->end - config->start + 1);
++ if (!tmio->ccr) {
++ retval = -ENOMEM;
++ goto err_ioremap_ccr;
++ }
++
++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
++ if (!hcd->regs) {
++ retval = -ENOMEM;
++ goto err_ioremap_regs;
++ }
++
++ if (dma_declare_coherent_memory(&dev->dev, sram->start,
++ sram->start,
++ sram->end - sram->start + 1,
++ DMA_MEMORY_MAP) != DMA_MEMORY_MAP) {
++ retval = -EBUSY;
++ goto err_dma_declare;
++ }
++
++ retval = dmabounce_register_dev(&dev->dev, 512, 4096);
++ if (retval)
++ goto err_dmabounce_register_dev;
++
++ tmio_start_hc(dev);
++ ohci = hcd_to_ohci(hcd);
++ ohci_hcd_init(ohci);
++
++ retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
++
++ if (retval == 0)
++ return retval;
++
++ tmio_stop_hc(dev);
++
++ dmabounce_unregister_dev(&dev->dev);
++err_dmabounce_register_dev:
++ dma_release_declared_memory(&dev->dev);
++err_dma_declare:
++ iounmap(hcd->regs);
++err_ioremap_regs:
++ iounmap(tmio->ccr);
++err_ioremap_ccr:
++ usb_put_hcd(hcd);
++err_usb_create_hcd:
++
++ return retval;
++}
++
++static void usb_hcd_tmio_remove(struct usb_hcd *hcd, struct platform_device *dev)
++{
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++
++ usb_remove_hcd(hcd);
++ tmio_stop_hc(dev);
++ dmabounce_unregister_dev(&dev->dev);
++ dma_release_declared_memory(&dev->dev);
++ iounmap(hcd->regs);
++ iounmap(tmio->ccr);
++ usb_put_hcd(hcd);
++}
++
++static int __devinit
++ohci_tmio_start(struct usb_hcd *hcd)
++{
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ int retval;
++
++ if ((retval = ohci_init(ohci)) < 0)
++ return retval;
++
++ if ((retval = ohci_run(ohci)) < 0) {
++ err("can't start %s", hcd->self.bus_name);
++ ohci_stop(hcd);
++ return retval;
++ }
++
++ return 0;
++}
++
++static const struct hc_driver ohci_tmio_hc_driver = {
++ .description = hcd_name,
++ .product_desc = "TMIO OHCI USB Host Controller",
++ .hcd_priv_size = sizeof(struct ohci_hcd) + sizeof (struct tmio_hcd),
++
++ /* generic hardware linkage */
++ .irq = ohci_irq,
++ .flags = HCD_USB11 | HCD_MEMORY,
++
++ /* basic lifecycle operations */
++ .start = ohci_tmio_start,
++ .stop = ohci_stop,
++ .shutdown = ohci_shutdown,
++
++ /* managing i/o requests and associated device resources */
++ .urb_enqueue = ohci_urb_enqueue,
++ .urb_dequeue = ohci_urb_dequeue,
++ .endpoint_disable = ohci_endpoint_disable,
++
++ /* scheduling support */
++ .get_frame_number = ohci_get_frame,
++
++ /* root hub support */
++ .hub_status_data = ohci_hub_status_data,
++ .hub_control = ohci_hub_control,
++ .hub_irq_enable = ohci_rhsc_enable,
++#ifdef CONFIG_PM
++ .bus_suspend = ohci_bus_suspend,
++ .bus_resume = ohci_bus_resume,
++#endif
++ .start_port_reset = ohci_start_port_reset,
++};
++
++/*-------------------------------------------------------------------------*/
++static struct platform_driver ohci_hcd_tmio_driver;
++
++static int
++tmio_dmabounce_check(struct device *dev, dma_addr_t dma, size_t size, void *data)
++{
++ struct resource *sram = data;
++#ifdef DEBUG
++ printk(KERN_ERR "tmio_dmabounce_check: %08x %d\n", dma, size);
++#endif
++
++ if (dev->driver != &ohci_hcd_tmio_driver.driver)
++ return 0;
++
++ if (sram->start <= dma && dma + size <= sram->end)
++ return 0;
++
++ return 1;
++}
++
++static u64 dma_mask = DMA_32BIT_MASK;
++
++static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
++{
++ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++
++ dev->dev.dma_mask = &dma_mask;
++ dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
++
++ dmabounce_register_checker(tmio_dmabounce_check, sram);
++
++ return usb_hcd_tmio_probe(&ohci_tmio_hc_driver, dev);
++}
++
++static int ohci_hcd_tmio_drv_remove(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++
++ usb_hcd_tmio_remove(hcd, dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ dmabounce_remove_checker(tmio_dmabounce_check, sram);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int ohci_hcd_tmio_drv_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ if (time_before(jiffies, ohci->next_statechange))
++ msleep(5);
++ ohci->next_statechange = jiffies;
++
++ tmio_stop_hc(dev);
++ hcd->state = HC_STATE_SUSPENDED;
++ dev->dev.power.power_state = PMSG_SUSPEND;
++
++ return 0;
++}
++
++static int ohci_hcd_tmio_drv_resume(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ if (time_before(jiffies, ohci->next_statechange))
++ msleep(5);
++ ohci->next_statechange = jiffies;
++
++ tmio_start_hc(dev);
++
++ dev->dev.power.power_state = PMSG_ON;
++ usb_hcd_resume_root_hub(hcd);
++
++ return 0;
++}
++#endif
++
++static struct platform_driver ohci_hcd_tmio_driver = {
++ .probe = ohci_hcd_tmio_drv_probe,
++ .remove = ohci_hcd_tmio_drv_remove,
++ .shutdown = usb_hcd_platform_shutdown,
++#ifdef CONFIG_PM
++ .suspend = ohci_hcd_tmio_drv_suspend,
++ .resume = ohci_hcd_tmio_drv_resume,
++#endif
++ .driver = {
++ .name = "tmio-ohci",
++ },
++};
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..6ff752d1ff
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch
@@ -0,0 +1,891 @@
+From b358a64c1fdd1eb80da57f919c893d910db95e37 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:26:19 +0000
+Subject: [PATCH 11/64] MMC driver for TMIO devices
+
+---
+ drivers/mmc/host/Kconfig | 6 +
+ drivers/mmc/host/Makefile | 1 +
+ drivers/mmc/host/tmio_mmc.c | 633 +++++++++++++++++++++++++++++++++++++++++++
+ drivers/mmc/host/tmio_mmc.h | 205 ++++++++++++++
+ 4 files changed, 845 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mmc/host/tmio_mmc.c
+ create mode 100644 drivers/mmc/host/tmio_mmc.h
+
+diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
+index 5fef678..f8f9b7e 100644
+--- a/drivers/mmc/host/Kconfig
++++ b/drivers/mmc/host/Kconfig
+@@ -130,3 +130,9 @@ config MMC_SPI
+
+ If unsure, or if your system has no SPI master driver, say N.
+
++config MMC_TMIO
++ tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
++ depends on MMC
++ help
++ This provides support for the SD/MMC cell found in TC6393XB,
++ T7L66XB and also ipaq ASIC3
+diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
+index 3877c87..7ac956b 100644
+--- a/drivers/mmc/host/Makefile
++++ b/drivers/mmc/host/Makefile
+@@ -17,4 +17,5 @@ obj-$(CONFIG_MMC_OMAP) += omap.o
+ obj-$(CONFIG_MMC_AT91) += at91_mci.o
+ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
+ obj-$(CONFIG_MMC_SPI) += mmc_spi.o
++obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o
+
+diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
+new file mode 100644
+index 0000000..735c386
+--- /dev/null
++++ b/drivers/mmc/host/tmio_mmc.c
+@@ -0,0 +1,633 @@
++/*
++ * linux/drivers/mmc/tmio_mmc.c
++ *
++ * Copyright (C) 2004 Ian Molton
++ * Copyright (C) 2007 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Driver for the MMC / SD / SDIO cell found in:
++ *
++ * TC6393XB TC6391XB TC6387XB T7L66XB
++ *
++ * This driver draws mainly on scattered spec sheets, Reverse engineering
++ * of the toshiba e800 SD driver and some parts of the 2.4 ASIC3 driver (4 bit
++ * support). (Further 4 bit support from a later datasheet).
++ *
++ * TODO:
++ * Investigate using a workqueue for PIO transfers
++ * Eliminate FIXMEs
++ * SDIO support
++ * Better Power management
++ * Handle MMC errors better
++ * double buffer support
++ *
++ */
++#include <linux/module.h>
++#include <linux/irq.h>
++#include <linux/device.h>
++#include <linux/delay.h>
++#include <linux/mmc/mmc.h>
++#include <linux/mmc/host.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++#include "tmio_mmc.h"
++
++/*
++ * Fixme - documentation conflicts on what the clock values are for the
++ * various dividers.
++ * One document I have says that its a divisor of a 24MHz clock, another 33.
++ * This probably depends on HCLK for a given platform, so we may need to
++ * require HCLK be passed to us from the MFD core.
++ *
++ */
++
++static void tmio_mmc_set_clock (struct tmio_mmc_host *host, int new_clock) {
++ struct tmio_mmc_cnf __iomem *cnf = host->cnf;
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ u32 clk = 0, clock;
++
++ if (new_clock) {
++ for(clock = 46875, clk = 0x100; new_clock >= (clock<<1); ){
++ clock <<= 1;
++ clk >>= 1;
++ }
++ if(clk & 0x1)
++ clk = 0x20000;
++
++ clk >>= 2;
++ if(clk & 0x8000) /* For full speed we disable the divider. */
++ writeb(0, &cnf->sd_clk_mode);
++ else
++ writeb(1, &cnf->sd_clk_mode);
++ clk |= 0x100;
++ }
++
++ writew(clk, &ctl->sd_card_clk_ctl);
++}
++
++static void tmio_mmc_clk_stop (struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ writew(0x0000, &ctl->clk_and_wait_ctl);
++ msleep(10);
++ writew(readw(&ctl->sd_card_clk_ctl) & ~0x0100, &ctl->sd_card_clk_ctl);
++ msleep(10);
++}
++
++static void tmio_mmc_clk_start (struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ writew(readw(&ctl->sd_card_clk_ctl) | 0x0100, &ctl->sd_card_clk_ctl);
++ msleep(10);
++ writew(0x0100, &ctl->clk_and_wait_ctl);
++ msleep(10);
++}
++
++static void reset(struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ /* FIXME - should we set stop clock reg here */
++ writew(0x0000, &ctl->reset_sd);
++ writew(0x0000, &ctl->reset_sdio);
++ msleep(10);
++ writew(0x0001, &ctl->reset_sd);
++ writew(0x0001, &ctl->reset_sdio);
++ msleep(10);
++}
++
++static void
++tmio_mmc_finish_request(struct tmio_mmc_host *host)
++{
++ struct mmc_request *mrq = host->mrq;
++
++ host->mrq = NULL;
++ host->cmd = NULL;
++ host->data = NULL;
++
++ mmc_request_done(host->mmc, mrq);
++}
++
++/* These are the bitmasks the tmio chip requires to implement the MMC response
++ * types. Note that R1 and R6 are the same in this scheme. */
++#define APP_CMD 0x0040
++#define RESP_NONE 0x0300
++#define RESP_R1 0x0400
++#define RESP_R1B 0x0500
++#define RESP_R2 0x0600
++#define RESP_R3 0x0700
++#define DATA_PRESENT 0x0800
++#define TRANSFER_READ 0x1000
++#define TRANSFER_MULTI 0x2000
++#define SECURITY_CMD 0x4000
++
++static void
++tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd)
++{
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_data *data = host->data;
++ int c = cmd->opcode;
++
++ if(cmd->opcode == MMC_STOP_TRANSMISSION) {
++ writew(0x001, &ctl->stop_internal_action);
++ return;
++ }
++
++ switch(mmc_resp_type(cmd)) {
++ case MMC_RSP_NONE: c |= RESP_NONE; break;
++ case MMC_RSP_R1: c |= RESP_R1; break;
++ case MMC_RSP_R1B: c |= RESP_R1B; break;
++ case MMC_RSP_R2: c |= RESP_R2; break;
++ case MMC_RSP_R3: c |= RESP_R3; break;
++ default:
++ DBG("Unknown response type %d\n", mmc_resp_type(cmd));
++ }
++
++ host->cmd = cmd;
++
++/* FIXME - this seems to be ok comented out but the spec suggest this bit should
++ * be set when issuing app commands.
++ * if(cmd->flags & MMC_FLAG_ACMD)
++ * c |= APP_CMD;
++ */
++ if(data) {
++ c |= DATA_PRESENT;
++ if(data->blocks > 1) {
++ writew(0x100, &ctl->stop_internal_action);
++ c |= TRANSFER_MULTI;
++ }
++ if(data->flags & MMC_DATA_READ)
++ c |= TRANSFER_READ;
++ }
++
++ enable_mmc_irqs(ctl, TMIO_MASK_CMD);
++
++ /* Fire off the command */
++ tmio_iowrite32(cmd->arg, ctl->arg_reg);
++ writew(c, &ctl->sd_cmd);
++}
++
++/* This chip always returns (at least?) as much data as you ask for.
++ * Im unsure what happens if you ask for less than a block. This should be
++ * looked into to ensure that a funny length read doesnt hose the controller.
++ *
++ * FIXME - this chip cannot do 1 and 2 byte data requests in 4 bit mode
++ */
++static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_data *data = host->data;
++ unsigned short *buf;
++ unsigned int count;
++ unsigned long flags;
++
++ if(!data){
++ DBG("Spurious PIO IRQ\n");
++ return;
++ }
++
++ buf = (unsigned short *)(tmio_mmc_kmap_atomic(host, &flags) +
++ host->sg_off);
++
++ /* Ensure we dont read more than one block. The chip will interrupt us
++ * When the next block is available.
++ * FIXME - this is probably not true now IRQ handling is fixed
++ */
++ count = host->sg_ptr->length - host->sg_off;
++ if(count > data->blksz)
++ count = data->blksz;
++
++ DBG("count: %08x offset: %08x flags %08x\n",
++ count, host->sg_off, data->flags);
++
++ /* Transfer the data */
++ if(data->flags & MMC_DATA_READ)
++ readsw(&ctl->sd_data_port[0], buf, count >> 1);
++ else
++ writesw(&ctl->sd_data_port[0], buf, count >> 1);
++
++ host->sg_off += count;
++
++ tmio_mmc_kunmap_atomic(host, &flags);
++
++ if(host->sg_off == host->sg_ptr->length)
++ tmio_mmc_next_sg(host);
++
++ return;
++}
++
++static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_data *data = host->data;
++
++ host->data = NULL;
++
++ if(!data){
++ DBG("Spurious data end IRQ\n");
++ return;
++ }
++
++ /* FIXME - return correct transfer count on errors */
++ if (!data->error)
++ data->bytes_xfered = data->blocks * data->blksz;
++ else
++ data->bytes_xfered = 0;
++
++ DBG("Completed data request\n");
++
++ /*FIXME - other drivers allow an optional stop command of any given type
++ * which we dont do, as the chip can auto generate them.
++ * Perhaps we can be smarter about when to use auto CMD12 and
++ * only issue the auto request when we know this is the desired
++ * stop command, allowing fallback to the stop command the
++ * upper layers expect. For now, we do what works.
++ */
++
++ writew(0x000, &ctl->stop_internal_action);
++
++ if(data->flags & MMC_DATA_READ)
++ disable_mmc_irqs(ctl, TMIO_MASK_READOP);
++ else
++ disable_mmc_irqs(ctl, TMIO_MASK_WRITEOP);
++
++ tmio_mmc_finish_request(host);
++}
++
++static inline void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, unsigned int stat) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_command *cmd = host->cmd;
++
++ if(!host->cmd) {
++ DBG("Spurious CMD irq\n");
++ return;
++ }
++
++ host->cmd = NULL;
++
++ /* This controller is sicker than the PXA one. not only do we need to
++ * drop the top 8 bits of the first response word, we also need to
++ * modify the order of the response for short response command types.
++ */
++
++ /* FIXME - this works but readl is wrong and will break on asic3... */
++ cmd->resp[3] = tmio_ioread32(&ctl->response[0]);
++ cmd->resp[2] = tmio_ioread32(&ctl->response[2]);
++ cmd->resp[1] = tmio_ioread32(&ctl->response[4]);
++ cmd->resp[0] = tmio_ioread32(&ctl->response[6]);
++
++ if(cmd->flags & MMC_RSP_136) {
++ cmd->resp[0] = (cmd->resp[0] <<8) | (cmd->resp[1] >>24);
++ cmd->resp[1] = (cmd->resp[1] <<8) | (cmd->resp[2] >>24);
++ cmd->resp[2] = (cmd->resp[2] <<8) | (cmd->resp[3] >>24);
++ cmd->resp[3] <<= 8;
++ }
++ else if(cmd->flags & MMC_RSP_R3) {
++ cmd->resp[0] = cmd->resp[3];
++ }
++
++ if (stat & TMIO_STAT_CMDTIMEOUT)
++ cmd->error = -ETIMEDOUT;
++ else if (stat & TMIO_STAT_CRCFAIL && cmd->flags & MMC_RSP_CRC)
++ cmd->error = -EILSEQ;
++
++ /* If there is data to handle we enable data IRQs here, and
++ * we will ultimatley finish the request in the data_end handler.
++ * If theres no data or we encountered an error, finish now.
++ */
++ if(host->data && !cmd->error){
++ if(host->data->flags & MMC_DATA_READ)
++ enable_mmc_irqs(ctl, TMIO_MASK_READOP);
++ else
++ enable_mmc_irqs(ctl, TMIO_MASK_WRITEOP);
++ }
++ else {
++ tmio_mmc_finish_request(host);
++ }
++
++ return;
++}
++
++
++static irqreturn_t tmio_mmc_irq(int irq, void *devid)
++{
++ struct tmio_mmc_host *host = devid;
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ unsigned int ireg, irq_mask, status;
++
++ DBG("MMC IRQ begin\n");
++
++ status = tmio_ioread32(ctl->status);
++ irq_mask = tmio_ioread32(ctl->irq_mask);
++ ireg = status & TMIO_MASK_IRQ & ~irq_mask;
++
++#ifdef CONFIG_MMC_DEBUG
++ debug_status(status);
++ debug_status(ireg);
++#endif
++ if (!ireg) {
++ disable_mmc_irqs(ctl, status & ~irq_mask);
++#ifdef CONFIG_MMC_DEBUG
++ WARN("tmio_mmc: Spurious MMC irq, disabling! 0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
++ debug_status(status);
++#endif
++ goto out;
++ }
++
++ while (ireg) {
++ /* Card insert / remove attempts */
++ if (ireg & (TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE)){
++ ack_mmc_irqs(ctl, TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE);
++ mmc_detect_change(host->mmc,0);
++ }
++
++ /* CRC and other errors */
++/* if (ireg & TMIO_STAT_ERR_IRQ)
++ * handled |= tmio_error_irq(host, irq, stat);
++ */
++
++ /* Command completion */
++ if (ireg & TMIO_MASK_CMD) {
++ tmio_mmc_cmd_irq(host, status);
++ ack_mmc_irqs(ctl, TMIO_MASK_CMD);
++ }
++
++ /* Data transfer */
++ if (ireg & (TMIO_STAT_RXRDY | TMIO_STAT_TXRQ)) {
++ ack_mmc_irqs(ctl, TMIO_STAT_RXRDY | TMIO_STAT_TXRQ);
++ tmio_mmc_pio_irq(host);
++ }
++
++ /* Data transfer completion */
++ if (ireg & TMIO_STAT_DATAEND) {
++ tmio_mmc_data_irq(host);
++ ack_mmc_irqs(ctl, TMIO_STAT_DATAEND);
++ }
++
++ /* Check status - keep going until we've handled it all */
++ status = tmio_ioread32(ctl->status);
++ irq_mask = tmio_ioread32(ctl->irq_mask);
++ ireg = status & TMIO_MASK_IRQ & ~irq_mask;
++
++#ifdef CONFIG_MMC_DEBUG
++ DBG("Status at end of loop: %08x\n", status);
++ debug_status(status);
++#endif
++ }
++ DBG("MMC IRQ end\n");
++
++out:
++ return IRQ_HANDLED;
++}
++
++static void tmio_mmc_start_data(struct tmio_mmc_host *host, struct mmc_data *data)
++{
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ DBG("setup data transfer: blocksize %08x nr_blocks %d\n",
++ data->blksz, data->blocks);
++
++ tmio_mmc_init_sg(host, data);
++ host->data = data;
++
++ /* Set transfer length / blocksize */
++ writew(data->blksz, &ctl->sd_xfer_len);
++ writew(data->blocks, &ctl->xfer_blk_count);
++}
++
++/* Process requests from the MMC layer */
++static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
++{
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++
++ WARN_ON(host->mrq != NULL);
++
++ host->mrq = mrq;
++
++ /* If we're performing a data request we need to setup some
++ extra information */
++ if (mrq->data)
++ tmio_mmc_start_data(host, mrq->data);
++
++ tmio_mmc_start_command(host, mrq->cmd);
++}
++
++/* Set MMC clock / power.
++ * Note: This controller uses a simple divider scheme therefore it cannot
++ * run a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as
++ * MMC wont run that fast, it has to be clocked at 12MHz which is the next
++ * slowest setting.
++ */
++static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
++{
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ struct tmio_mmc_cnf __iomem *cnf = host->cnf;
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ if(ios->clock)
++ tmio_mmc_set_clock (host, ios->clock);
++
++ /* Power sequence - OFF -> ON -> UP */
++ switch (ios->power_mode) {
++ case MMC_POWER_OFF:
++ writeb(0x00, &cnf->pwr_ctl[1]); /* power down SD bus */
++ tmio_mmc_clk_stop(host);
++ break;
++ case MMC_POWER_ON:
++ writeb(0x02, &cnf->pwr_ctl[1]); /* power up SD bus */
++ break;
++ case MMC_POWER_UP:
++ tmio_mmc_clk_start(host); /* start bus clock */
++ break;
++ }
++
++ switch (ios->bus_width) {
++ case MMC_BUS_WIDTH_1:
++ writew(0x80e0, &ctl->sd_mem_card_opt);
++ break;
++ case MMC_BUS_WIDTH_4:
++ writew(0x00e0, &ctl->sd_mem_card_opt);
++ break;
++ }
++
++ /* Potentially we may need a 140us pause here. FIXME */
++ udelay(140);
++}
++
++static int tmio_mmc_get_ro(struct mmc_host *mmc) {
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ return (readw(&ctl->status[0]) & TMIO_STAT_WRPROTECT)?0:1;
++}
++
++static struct mmc_host_ops tmio_mmc_ops = {
++ .request = tmio_mmc_request,
++ .set_ios = tmio_mmc_set_ios,
++ .get_ro = tmio_mmc_get_ro,
++};
++
++static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state) {
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct mmc_host *mmc = platform_get_drvdata(dev);
++ int ret;
++
++ ret = mmc_suspend_host(mmc, state);
++
++ /* Tell MFD core it can disable us now.*/
++ if(!ret && cell->disable)
++ cell->disable(dev);
++
++ return ret;
++}
++
++static int tmio_mmc_resume(struct platform_device *dev) {
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct mmc_host *mmc = platform_get_drvdata(dev);
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ struct tmio_mmc_cnf __iomem *cnf = host->cnf;
++
++ /* Enable the MMC/SD Control registers */
++ writew(SDCREN, &cnf->cmd);
++ writel(dev->resource[0].start & 0xfffe, &cnf->ctl_base);
++
++ /* Tell the MFD core we are ready to be enabled */
++ if(cell->enable)
++ cell->enable(dev);
++
++ mmc_resume_host(mmc);
++
++ return 0;
++}
++
++static int __devinit tmio_mmc_probe(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_mmc_cnf __iomem *cnf;
++ struct tmio_mmc_ctl __iomem *ctl;
++ struct tmio_mmc_host *host;
++ struct mmc_host *mmc;
++ int ret = -ENOMEM;
++
++ mmc = mmc_alloc_host(sizeof(struct tmio_mmc_host), &dev->dev);
++ if (!mmc) {
++ goto out;
++ }
++
++ host = mmc_priv(mmc);
++ host->mmc = mmc;
++ platform_set_drvdata(dev, mmc); /* Used so we can de-init safely. */
++
++ host->cnf = cnf = ioremap((unsigned long)dev->resource[1].start,
++ (unsigned long)dev->resource[1].end -
++ (unsigned long)dev->resource[1].start);
++ if(!host->cnf)
++ goto host_free;
++
++ host->ctl = ctl = ioremap((unsigned long)dev->resource[0].start,
++ (unsigned long)dev->resource[0].end -
++ (unsigned long)dev->resource[0].start);
++ if (!host->ctl) {
++ goto unmap_cnf;
++ }
++
++ mmc->ops = &tmio_mmc_ops;
++ mmc->caps = MMC_CAP_4_BIT_DATA;
++ mmc->f_min = 46875;
++ mmc->f_max = 24000000;
++ mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
++
++ /* Enable the MMC/SD Control registers */
++ writew(SDCREN, &cnf->cmd);
++ writel(dev->resource[0].start & 0xfffe, &cnf->ctl_base);
++
++ /* Tell the MFD core we are ready to be enabled */
++ if(cell->enable)
++ cell->enable(dev);
++
++ writeb(0x01,&cnf->pwr_ctl[2]); /* Disable SD power during suspend */
++ writeb(0x1f, &cnf->stop_clk_ctl); /* Route clock to SDIO??? FIXME */
++ writeb(0x0, &cnf->pwr_ctl[1]); /* Power down SD bus*/
++ tmio_mmc_clk_stop(host); /* Stop bus clock */
++ reset(host); /* Reset MMC HC */
++
++ host->irq = (unsigned long)dev->resource[2].start;
++ ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED, "tmio-mmc", host);
++ if (ret){
++ ret = -ENODEV;
++ DBG("Failed to allocate IRQ.\n");
++ goto unmap_ctl;
++ }
++ set_irq_type(host->irq, IRQT_FALLING);
++
++ mmc_add_host(mmc);
++
++ printk(KERN_INFO "%s at 0x%08lx irq %d\n", mmc_hostname(host->mmc),
++ (unsigned long)host->ctl, host->irq);
++
++ /* Lets unmask the IRQs we want to know about */
++ disable_mmc_irqs(ctl, TMIO_MASK_ALL);
++ enable_mmc_irqs(ctl, TMIO_MASK_IRQ);
++
++ return 0;
++
++unmap_ctl:
++ iounmap(host->ctl);
++unmap_cnf:
++ iounmap(host->cnf);
++host_free:
++ mmc_free_host(mmc);
++out:
++ return ret;
++}
++
++static int __devexit tmio_mmc_remove(struct platform_device *dev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ if (mmc) {
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ mmc_remove_host(mmc);
++ free_irq(host->irq, host);
++ /* FIXME - we might want to consider stopping the chip here. */
++ iounmap(host->ctl);
++ iounmap(host->cnf);
++ mmc_free_host(mmc); /* FIXME - why does this call hang ? */
++ }
++ return 0;
++}
++
++/* ------------------- device registration ----------------------- */
++
++static struct platform_driver tmio_mmc_driver = {
++ .driver = {
++ .name = "tmio-mmc",
++ },
++ .probe = tmio_mmc_probe,
++ .remove = __devexit_p(tmio_mmc_remove),
++#ifdef CONFIG_PM
++ .suspend = tmio_mmc_suspend,
++ .resume = tmio_mmc_resume,
++#endif
++};
++
++
++static int __init tmio_mmc_init(void)
++{
++ return platform_driver_register (&tmio_mmc_driver);
++}
++
++static void __exit tmio_mmc_exit(void)
++{
++ platform_driver_unregister (&tmio_mmc_driver);
++}
++
++module_init(tmio_mmc_init);
++module_exit(tmio_mmc_exit);
++
++MODULE_DESCRIPTION("Toshiba TMIO SD/MMC driver");
++MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
++MODULE_LICENSE("GPLv2");
+diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
+new file mode 100644
+index 0000000..d4d9f8f
+--- /dev/null
++++ b/drivers/mmc/host/tmio_mmc.h
+@@ -0,0 +1,205 @@
++/* Definitons for use with the tmio_mmc.c
++ *
++ * (c) 2005 Ian Molton <spyro@f2s.com>
++ * (c) 2007 Ian Molton <spyro@f2s.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.
++ *
++ */
++
++struct tmio_mmc_cnf {
++ u8 x00[4];
++ u16 cmd;
++ u8 x01[10];
++ u32 ctl_base;
++ u8 x02[41];
++ u8 int_pin;
++ u8 x03[2];
++ u8 stop_clk_ctl;
++ u8 gclk_ctl; /* Gated Clock Control */
++ u8 sd_clk_mode; /* 0x42 */
++ u8 x04;
++ u16 pin_status;
++ u8 x05[2];
++ u8 pwr_ctl[3];
++ u8 x06;
++ u8 card_detect_mode;
++ u8 x07[3];
++ u8 sd_slot;
++ u8 x08[159];
++ u8 ext_gclk_ctl_1; /* Extended Gated Clock Control 1 */
++ u8 ext_gclk_ctl_2; /* Extended Gated Clock Control 2 */
++ u8 x09[7];
++ u8 ext_gclk_ctl_3; /* Extended Gated Clock Control 3 */
++ u8 sd_led_en_1;
++ u8 x10[3];
++ u8 sd_led_en_2;
++ u8 x11;
++} __attribute__ ((packed));
++
++#define SDCREN 0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/
++
++struct tmio_mmc_ctl {
++ u16 sd_cmd;
++ u16 x00;
++ u16 arg_reg[2];
++ u16 stop_internal_action;
++ u16 xfer_blk_count;
++ u16 response[8];
++ u16 status[2];
++ u16 irq_mask[2];
++ u16 sd_card_clk_ctl;
++ u16 sd_xfer_len;
++ u16 sd_mem_card_opt;
++ u16 x01;
++ u16 sd_error_detail_status[2];
++ u16 sd_data_port[2];
++ u16 transaction_ctl;
++ u16 x02[85];
++ u16 reset_sd;
++ u16 x03[15];
++ u16 sdio_regs[28];
++ u16 clk_and_wait_ctl;
++ u16 x04[83];
++ u16 reset_sdio;
++ u16 x05[15];
++} __attribute__ ((packed));
++
++/* Definitions for values the CTRL_STATUS register can take. */
++#define TMIO_STAT_CMDRESPEND 0x00000001
++#define TMIO_STAT_DATAEND 0x00000004
++#define TMIO_STAT_CARD_REMOVE 0x00000008
++#define TMIO_STAT_CARD_INSERT 0x00000010
++#define TMIO_STAT_SIGSTATE 0x00000020
++#define TMIO_STAT_WRPROTECT 0x00000080
++#define TMIO_STAT_CARD_REMOVE_A 0x00000100
++#define TMIO_STAT_CARD_INSERT_A 0x00000200
++#define TMIO_STAT_SIGSTATE_A 0x00000400
++#define TMIO_STAT_CMD_IDX_ERR 0x00010000
++#define TMIO_STAT_CRCFAIL 0x00020000
++#define TMIO_STAT_STOPBIT_ERR 0x00040000
++#define TMIO_STAT_DATATIMEOUT 0x00080000
++#define TMIO_STAT_RXOVERFLOW 0x00100000
++#define TMIO_STAT_TXUNDERRUN 0x00200000
++#define TMIO_STAT_CMDTIMEOUT 0x00400000
++#define TMIO_STAT_RXRDY 0x01000000
++#define TMIO_STAT_TXRQ 0x02000000
++#define TMIO_STAT_ILL_FUNC 0x20000000
++#define TMIO_STAT_CMD_BUSY 0x40000000
++#define TMIO_STAT_ILL_ACCESS 0x80000000
++
++/* Define some IRQ masks */
++/* This is the mask used at reset by the chip */
++#define TMIO_MASK_ALL 0x837f031d
++#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
++ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
++#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
++ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
++#define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
++ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
++#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
++
++#define enable_mmc_irqs(ctl, i) \
++ do { \
++ u32 mask;\
++ mask = tmio_ioread32((ctl)->irq_mask); \
++ mask &= ~((i) & TMIO_MASK_IRQ); \
++ tmio_iowrite32(mask, (ctl)->irq_mask); \
++ } while (0)
++
++#define disable_mmc_irqs(ctl, i) \
++ do { \
++ u32 mask;\
++ mask = tmio_ioread32((ctl)->irq_mask); \
++ mask |= ((i) & TMIO_MASK_IRQ); \
++ tmio_iowrite32(mask, (ctl)->irq_mask); \
++ } while (0)
++
++#define ack_mmc_irqs(ctl, i) \
++ do { \
++ u32 mask;\
++ mask = tmio_ioread32((ctl)->status); \
++ mask &= ~((i) & TMIO_MASK_IRQ); \
++ tmio_iowrite32(mask, (ctl)->status); \
++ } while (0)
++
++
++struct tmio_mmc_host {
++ struct tmio_mmc_cnf __iomem *cnf;
++ struct tmio_mmc_ctl __iomem *ctl;
++ struct mmc_command *cmd;
++ struct mmc_request *mrq;
++ struct mmc_data *data;
++ struct mmc_host *mmc;
++ int irq;
++
++ /* pio related stuff */
++ struct scatterlist *sg_ptr;
++ unsigned int sg_len;
++ unsigned int sg_off;
++};
++
++#include <linux/scatterlist.h>
++#include <linux/blkdev.h>
++
++static inline void tmio_mmc_init_sg(struct tmio_mmc_host *host, struct mmc_data *data)
++{
++ host->sg_len = data->sg_len;
++ host->sg_ptr = data->sg;
++ host->sg_off = 0;
++}
++
++static inline int tmio_mmc_next_sg(struct tmio_mmc_host *host)
++{
++ host->sg_ptr++;
++ host->sg_off = 0;
++ return --host->sg_len;
++}
++
++static inline char *tmio_mmc_kmap_atomic(struct tmio_mmc_host *host, unsigned long *flags)
++{
++ struct scatterlist *sg = host->sg_ptr;
++
++ local_irq_save(*flags);
++ return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
++}
++
++static inline void tmio_mmc_kunmap_atomic(struct tmio_mmc_host *host, unsigned long *flags)
++{
++ kunmap_atomic(sg_page(host->sg_ptr), KM_BIO_SRC_IRQ);
++ local_irq_restore(*flags);
++}
++
++#ifdef CONFIG_MMC_DEBUG
++#define DBG(args...) printk(args)
++
++void debug_status(u32 status){
++ printk("status: %08x = ", status);
++ if(status & TMIO_STAT_CARD_REMOVE) printk("Card_removed ");
++ if(status & TMIO_STAT_CARD_INSERT) printk("Card_insert ");
++ if(status & TMIO_STAT_SIGSTATE) printk("Sigstate ");
++ if(status & TMIO_STAT_WRPROTECT) printk("Write_protect ");
++ if(status & TMIO_STAT_CARD_REMOVE_A) printk("Card_remove_A ");
++ if(status & TMIO_STAT_CARD_INSERT_A) printk("Card_insert_A ");
++ if(status & TMIO_STAT_SIGSTATE_A) printk("Sigstate_A ");
++ if(status & TMIO_STAT_CMD_IDX_ERR) printk("Cmd_IDX_Err ");
++ if(status & TMIO_STAT_STOPBIT_ERR) printk("Stopbit_ERR ");
++ if(status & TMIO_STAT_ILL_FUNC) printk("ILLEGAL_FUNC ");
++ if(status & TMIO_STAT_CMD_BUSY) printk("CMD_BUSY ");
++ if(status & TMIO_STAT_CMDRESPEND) printk("Response_end ");
++ if(status & TMIO_STAT_DATAEND) printk("Data_end ");
++ if(status & TMIO_STAT_CRCFAIL) printk("CRC_failure ");
++ if(status & TMIO_STAT_DATATIMEOUT) printk("Data_timeout ");
++ if(status & TMIO_STAT_CMDTIMEOUT) printk("Command_timeout ");
++ if(status & TMIO_STAT_RXOVERFLOW) printk("RX_OVF ");
++ if(status & TMIO_STAT_TXUNDERRUN) printk("TX_UND ");
++ if(status & TMIO_STAT_RXRDY) printk("RX_rdy ");
++ if(status & TMIO_STAT_TXRQ) printk("TX_req ");
++ if(status & TMIO_STAT_ILL_ACCESS) printk("ILLEGAL_ACCESS ");
++ printk("\n");
++}
++#else
++#define DBG(fmt,args...) do { } while (0)
++#endif
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0012-Tosa-keyboard-support.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0012-Tosa-keyboard-support.patch
new file mode 100644
index 0000000000..0fa10ebd4c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0012-Tosa-keyboard-support.patch
@@ -0,0 +1,593 @@
+From 6d377e8f80ce421e6842ac5f42081345fbc70002 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:27:41 +0300
+Subject: [PATCH 12/64] Tosa keyboard support
+
+Support keyboard on tosa (Sharp Zaurus SL-6000x).
+Largely based on patches by Dirk Opfer.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 43 ++++
+ drivers/input/keyboard/Kconfig | 21 ++
+ drivers/input/keyboard/Makefile | 1 +
+ drivers/input/keyboard/tosakbd.c | 415 ++++++++++++++++++++++++++++++++++++++
+ include/asm-arm/arch-pxa/tosa.h | 30 +++
+ 5 files changed, 510 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/keyboard/tosakbd.c
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 240fd04..e7e0f52 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -21,6 +21,8 @@
+ #include <linux/mmc/host.h>
+ #include <linux/pm.h>
+ #include <linux/delay.h>
++#include <linux/gpio_keys.h>
++#include <linux/input.h>
+
+ #include <asm/setup.h>
+ #include <asm/memory.h>
+@@ -253,6 +255,46 @@ static struct platform_device tosakbd_device = {
+ .id = -1,
+ };
+
++static struct gpio_keys_button tosa_gpio_keys[] = {
++ {
++ .type = EV_PWR,
++ .code = KEY_SUSPEND,
++ .gpio = TOSA_GPIO_ON_KEY,
++ .desc = "On key",
++ .wakeup = 1,
++ .active_low = 1,
++ },
++ {
++ .type = EV_KEY,
++ .code = TOSA_KEY_RECORD,
++ .gpio = TOSA_GPIO_RECORD_BTN,
++ .desc = "Record Button",
++ .wakeup = 1,
++ .active_low = 1,
++ },
++ {
++ .type = EV_KEY,
++ .code = TOSA_KEY_SYNC,
++ .gpio = TOSA_GPIO_SYNC,
++ .desc = "Sync Button",
++ .wakeup = 1,
++ .active_low = 1,
++ },
++};
++
++static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = {
++ .buttons = tosa_gpio_keys,
++ .nbuttons = ARRAY_SIZE(tosa_gpio_keys),
++};
++
++static struct platform_device tosa_gpio_keys_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .dev = {
++ .platform_data = &tosa_gpio_keys_platform_data,
++ },
++};
++
+ /*
+ * Tosa LEDs
+ */
+@@ -265,6 +307,7 @@ static struct platform_device *devices[] __initdata = {
+ &tosascoop_device,
+ &tosascoop_jc_device,
+ &tosakbd_device,
++ &tosa_gpio_keys_device,
+ &tosaled_device,
+ };
+
+diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
+index 086d58c..0c32762 100644
+--- a/drivers/input/keyboard/Kconfig
++++ b/drivers/input/keyboard/Kconfig
+@@ -154,6 +154,27 @@ config KEYBOARD_SPITZ
+ To compile this driver as a module, choose M here: the
+ module will be called spitzkbd.
+
++config KEYBOARD_TOSA
++ tristate "Tosa keyboard"
++ depends on MACH_TOSA
++ default y
++ help
++ Say Y here to enable the keyboard on the Sharp Zaurus SL-6000x (Tosa)
++
++ To compile this driver as a module, choose M here: the
++ module will be called tosakbd.
++
++config KEYBOARD_TOSA_USE_EXT_KEYCODES
++ bool "Tosa keyboard: use extended keycodes"
++ depends on KEYBOARD_TOSA
++ default n
++ help
++ Say Y here to enable the tosa keyboard driver to generate extended
++ (>= 127) keycodes. Be aware, that they can't be correctly interpreted
++ by either console keyboard driver or by Kdrive keybd driver.
++
++ Say Y only if you know, what you are doing!
++
+ config KEYBOARD_AMIGA
+ tristate "Amiga keyboard"
+ depends on AMIGA
+diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
+index e97455f..6caa065 100644
+--- a/drivers/input/keyboard/Makefile
++++ b/drivers/input/keyboard/Makefile
+@@ -15,6 +15,7 @@ obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
+ obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
+ obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
+ obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
++obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
+diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
+new file mode 100644
+index 0000000..3884d1e
+--- /dev/null
++++ b/drivers/input/keyboard/tosakbd.c
+@@ -0,0 +1,415 @@
++/*
++ * Keyboard driver for Sharp Tosa models (SL-6000x)
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * Based on xtkbd.c/locomkbd.c/corgikbd.c
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++
++#include <asm/arch/gpio.h>
++#include <asm/arch/tosa.h>
++
++#define KB_ROWMASK(r) (1 << (r))
++#define SCANCODE(r, c) (((r)<<4) + (c) + 1)
++#define NR_SCANCODES SCANCODE(TOSA_KEY_SENSE_NUM - 1, TOSA_KEY_STROBE_NUM - 1) + 1
++
++#define SCAN_INTERVAL (HZ/10)
++
++#define KB_DISCHARGE_DELAY 10
++#define KB_ACTIVATE_DELAY 10
++
++static unsigned int tosakbd_keycode[NR_SCANCODES] = {
++0,
++0, KEY_W, 0, 0, 0, KEY_K, KEY_BACKSPACE, KEY_P,
++0, 0, 0, 0, 0, 0, 0, 0,
++KEY_Q, KEY_E, KEY_T, KEY_Y, 0, KEY_O, KEY_I, KEY_COMMA,
++0, 0, 0, 0, 0, 0, 0, 0,
++KEY_A, KEY_D, KEY_G, KEY_U, 0, KEY_L, KEY_ENTER, KEY_DOT,
++0, 0, 0, 0, 0, 0, 0, 0,
++KEY_Z, KEY_C, KEY_V, KEY_J, TOSA_KEY_ADDRESSBOOK, TOSA_KEY_CANCEL, TOSA_KEY_CENTER, TOSA_KEY_OK,
++KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, 0,
++KEY_S, KEY_R, KEY_B, KEY_N, TOSA_KEY_CALENDAR, TOSA_KEY_HOMEPAGE, KEY_LEFTCTRL, TOSA_KEY_LIGHT,
++0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, 0,
++KEY_TAB, KEY_SLASH, KEY_H, KEY_M, TOSA_KEY_MENU, 0, KEY_UP, 0,
++0, 0, TOSA_KEY_FN, 0, 0, 0, 0, 0,
++KEY_X, KEY_F, KEY_SPACE, KEY_APOSTROPHE, TOSA_KEY_MAIL, KEY_LEFT, KEY_DOWN, KEY_RIGHT,
++0, 0, 0,
++};
++
++struct tosakbd {
++ unsigned int keycode[ARRAY_SIZE(tosakbd_keycode)];
++ struct input_dev *input;
++
++ spinlock_t lock; /* protect kbd scanning */
++ struct timer_list timer;
++};
++
++
++/* Helper functions for reading the keyboard matrix
++ * Note: We should really be using pxa_gpio_mode to alter GPDR but it
++ * requires a function call per GPIO bit which is excessive
++ * when we need to access 12 bits at once, multiple times.
++ * These functions must be called within local_irq_save()/local_irq_restore()
++ * or similar.
++ */
++#define GET_ROWS_STATUS(c) ((GPLR2 & TOSA_GPIO_ALL_SENSE_BIT) >> TOSA_GPIO_ALL_SENSE_RSHIFT)
++
++static inline void tosakbd_discharge_all(void)
++{
++ /* STROBE All HiZ */
++ GPCR1 = TOSA_GPIO_HIGH_STROBE_BIT;
++ GPDR1 &= ~TOSA_GPIO_HIGH_STROBE_BIT;
++ GPCR2 = TOSA_GPIO_LOW_STROBE_BIT;
++ GPDR2 &= ~TOSA_GPIO_LOW_STROBE_BIT;
++}
++
++static inline void tosakbd_activate_all(void)
++{
++ /* STROBE ALL -> High */
++ GPSR1 = TOSA_GPIO_HIGH_STROBE_BIT;
++ GPDR1 |= TOSA_GPIO_HIGH_STROBE_BIT;
++ GPSR2 = TOSA_GPIO_LOW_STROBE_BIT;
++ GPDR2 |= TOSA_GPIO_LOW_STROBE_BIT;
++
++ udelay(KB_DISCHARGE_DELAY);
++
++ /* STATE CLEAR */
++ GEDR2 |= TOSA_GPIO_ALL_SENSE_BIT;
++}
++
++static inline void tosakbd_activate_col(int col)
++{
++ if (col <= 5) {
++ /* STROBE col -> High, not col -> HiZ */
++ GPSR1 = TOSA_GPIO_STROBE_BIT(col);
++ GPDR1 = (GPDR1 & ~TOSA_GPIO_HIGH_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ } else {
++ /* STROBE col -> High, not col -> HiZ */
++ GPSR2 = TOSA_GPIO_STROBE_BIT(col);
++ GPDR2 = (GPDR2 & ~TOSA_GPIO_LOW_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ }
++}
++
++static inline void tosakbd_reset_col(int col)
++{
++ if (col <= 5) {
++ /* STROBE col -> Low */
++ GPCR1 = TOSA_GPIO_STROBE_BIT(col);
++ /* STROBE col -> out, not col -> HiZ */
++ GPDR1 = (GPDR1 & ~TOSA_GPIO_HIGH_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ } else {
++ /* STROBE col -> Low */
++ GPCR2 = TOSA_GPIO_STROBE_BIT(col);
++ /* STROBE col -> out, not col -> HiZ */
++ GPDR2 = (GPDR2 & ~TOSA_GPIO_LOW_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ }
++}
++/*
++ * The tosa keyboard only generates interrupts when a key is pressed.
++ * So when a key is pressed, we enable a timer. This timer scans the
++ * keyboard, and this is how we detect when the key is released.
++ */
++
++/* Scan the hardware keyboard and push any changes up through the input layer */
++static void tosakbd_scankeyboard(struct platform_device *dev)
++{
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++ unsigned int row, col, rowd;
++ unsigned long flags;
++ unsigned int num_pressed = 0;
++
++ spin_lock_irqsave(&tosakbd->lock, flags);
++
++ for (col = 0; col < TOSA_KEY_STROBE_NUM; col++) {
++ /*
++ * Discharge the output driver capacitatance
++ * in the keyboard matrix. (Yes it is significant..)
++ */
++ tosakbd_discharge_all();
++ udelay(KB_DISCHARGE_DELAY);
++
++ tosakbd_activate_col(col);
++ udelay(KB_ACTIVATE_DELAY);
++
++ rowd = GET_ROWS_STATUS(col);
++
++ for (row = 0; row < TOSA_KEY_SENSE_NUM; row++) {
++ unsigned int scancode, pressed;
++ scancode = SCANCODE(row, col);
++ pressed = rowd & KB_ROWMASK(row);
++
++ if (pressed && !tosakbd->keycode[scancode])
++ dev_warn(&dev->dev,
++ "unhandled scancode: 0x%02x\n",
++ scancode);
++
++ input_report_key(tosakbd->input,
++ tosakbd->keycode[scancode],
++ pressed);
++ if (pressed)
++ num_pressed++;
++ }
++
++ tosakbd_reset_col(col);
++ }
++
++ tosakbd_activate_all();
++
++ input_sync(tosakbd->input);
++
++ /* if any keys are pressed, enable the timer */
++ if (num_pressed)
++ mod_timer(&tosakbd->timer, jiffies + SCAN_INTERVAL);
++
++ spin_unlock_irqrestore(&tosakbd->lock, flags);
++}
++
++/*
++ * tosa keyboard interrupt handler.
++ */
++static irqreturn_t tosakbd_interrupt(int irq, void *__dev)
++{
++ struct platform_device *dev = __dev;
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++
++ if (!timer_pending(&tosakbd->timer)) {
++ /** wait chattering delay **/
++ udelay(20);
++ tosakbd_scankeyboard(dev);
++ }
++
++ return IRQ_HANDLED;
++}
++
++/*
++ * tosa timer checking for released keys
++ */
++static void tosakbd_timer_callback(unsigned long __dev)
++{
++ struct platform_device *dev = (struct platform_device *)__dev;
++ tosakbd_scankeyboard(dev);
++}
++
++#ifdef CONFIG_PM
++static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++
++ del_timer_sync(&tosakbd->timer);
++
++ return 0;
++}
++
++static int tosakbd_resume(struct platform_device *dev)
++{
++ tosakbd_scankeyboard(dev);
++
++ return 0;
++}
++#else
++#define tosakbd_suspend NULL
++#define tosakbd_resume NULL
++#endif
++
++static int __devinit tosakbd_probe(struct platform_device *pdev) {
++
++ int i;
++ struct tosakbd *tosakbd;
++ struct input_dev *input_dev;
++ int error;
++
++ tosakbd = kzalloc(sizeof(struct tosakbd), GFP_KERNEL);
++ if (!tosakbd)
++ return -ENOMEM;
++
++ input_dev = input_allocate_device();
++ if (!input_dev) {
++ kfree(tosakbd);
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, tosakbd);
++
++ spin_lock_init(&tosakbd->lock);
++
++ /* Init Keyboard rescan timer */
++ init_timer(&tosakbd->timer);
++ tosakbd->timer.function = tosakbd_timer_callback;
++ tosakbd->timer.data = (unsigned long) pdev;
++
++ tosakbd->input = input_dev;
++
++ input_set_drvdata(input_dev, tosakbd);
++ input_dev->name = "Tosa Keyboard";
++ input_dev->phys = "tosakbd/input0";
++ input_dev->dev.parent = &pdev->dev;
++
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x0001;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++
++ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
++ input_dev->keycode = tosakbd->keycode;
++ input_dev->keycodesize = sizeof(unsigned int);
++ input_dev->keycodemax = ARRAY_SIZE(tosakbd_keycode);
++
++ memcpy(tosakbd->keycode, tosakbd_keycode, sizeof(tosakbd_keycode));
++
++ for (i = 0; i < ARRAY_SIZE(tosakbd_keycode); i++)
++ __set_bit(tosakbd->keycode[i], input_dev->keybit);
++ clear_bit(0, input_dev->keybit);
++
++ /* Setup sense interrupts - RisingEdge Detect, sense lines as inputs */
++ for (i = 0; i < TOSA_KEY_SENSE_NUM; i++) {
++ int gpio = TOSA_GPIO_KEY_SENSE(i);
++ int irq;
++ error = gpio_request(gpio, "tosakbd");
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to request GPIO %d, "
++ " error %d\n", gpio, error);
++ goto fail;
++ }
++
++ error = gpio_direction_input(TOSA_GPIO_KEY_SENSE(i));
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to configure input"
++ " direction for GPIO %d, error %d\n",
++ gpio, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++
++ irq = gpio_to_irq(gpio);
++ if (irq < 0) {
++ error = irq;
++ printk(KERN_ERR "gpio-keys: Unable to get irq number"
++ " for GPIO %d, error %d\n",
++ gpio, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++
++ error = request_irq(irq, tosakbd_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING,
++ "tosakbd", pdev);
++
++ if (error) {
++ printk("tosakbd: Can't get IRQ: %d: error %d!\n",
++ irq, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++ }
++
++ /* Set Strobe lines as outputs - set high */
++ for (i = 0; i < TOSA_KEY_STROBE_NUM; i++) {
++ int gpio = TOSA_GPIO_KEY_STROBE(i);
++ error = gpio_request(gpio, "tosakbd");
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to request GPIO %d, "
++ " error %d\n", gpio, error);
++ goto fail2;
++ }
++
++ error = gpio_direction_output(gpio, 1);
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to configure input"
++ " direction for GPIO %d, error %d\n",
++ gpio, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++
++ }
++
++ error = input_register_device(input_dev);
++ if (error) {
++ printk(KERN_ERR "tosakbd: Unable to register input device, "
++ "error: %d\n", error);
++ goto fail;
++ }
++
++ printk(KERN_INFO "input: Tosa Keyboard Registered\n");
++
++ return 0;
++
++fail2:
++ while (--i >= 0)
++ gpio_free(TOSA_GPIO_KEY_STROBE(i));
++
++ i = TOSA_KEY_SENSE_NUM;
++fail:
++ while (--i >= 0) {
++ free_irq(gpio_to_irq(TOSA_GPIO_KEY_SENSE(i)), pdev);
++ gpio_free(TOSA_GPIO_KEY_SENSE(i));
++ }
++
++ platform_set_drvdata(pdev, NULL);
++ input_free_device(input_dev);
++ kfree(tosakbd);
++
++ return error;
++}
++
++static int __devexit tosakbd_remove(struct platform_device *dev) {
++
++ int i;
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++
++ for (i = 0; i < TOSA_KEY_STROBE_NUM; i++)
++ gpio_free(TOSA_GPIO_KEY_STROBE(i));
++
++ for (i = 0; i < TOSA_KEY_SENSE_NUM; i++) {
++ free_irq(gpio_to_irq(TOSA_GPIO_KEY_SENSE(i)), dev);
++ gpio_free(TOSA_GPIO_KEY_SENSE(i));
++ }
++
++ del_timer_sync(&tosakbd->timer);
++
++ input_unregister_device(tosakbd->input);
++
++ kfree(tosakbd);
++
++ return 0;
++}
++
++static struct platform_driver tosakbd_driver = {
++ .probe = tosakbd_probe,
++ .remove = __devexit_p(tosakbd_remove),
++ .suspend = tosakbd_suspend,
++ .resume = tosakbd_resume,
++ .driver = {
++ .name = "tosa-keyboard",
++ },
++};
++
++static int __devinit tosakbd_init(void)
++{
++ return platform_driver_register(&tosakbd_driver);
++}
++
++static void __exit tosakbd_exit(void)
++{
++ platform_driver_unregister(&tosakbd_driver);
++}
++
++module_init(tosakbd_init);
++module_exit(tosakbd_exit);
++
++MODULE_AUTHOR("Dirk Opfer <Dirk@Opfer-Online.de>");
++MODULE_DESCRIPTION("Tosa Keyboard Driver");
++MODULE_LICENSE("GPL v2");
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index c3364a2..c05e4fa 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -163,4 +163,34 @@
+
+ extern struct platform_device tosascoop_jc_device;
+ extern struct platform_device tosascoop_device;
++
++#define TOSA_KEY_SYNC KEY_102ND /* ??? */
++
++
++#ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES
++#define TOSA_KEY_RECORD KEY_YEN
++#define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA
++#define TOSA_KEY_CANCEL KEY_ESC
++#define TOSA_KEY_CENTER KEY_HIRAGANA
++#define TOSA_KEY_OK KEY_HENKAN
++#define TOSA_KEY_CALENDAR KEY_KATAKANAHIRAGANA
++#define TOSA_KEY_HOMEPAGE KEY_HANGEUL
++#define TOSA_KEY_LIGHT KEY_MUHENKAN
++#define TOSA_KEY_MENU KEY_HANJA
++#define TOSA_KEY_FN KEY_RIGHTALT
++#define TOSA_KEY_MAIL KEY_ZENKAKUHANKAKU
++#else
++#define TOSA_KEY_RECORD KEY_RECORD
++#define TOSA_KEY_ADDRESSBOOK KEY_ADDRESSBOOK
++#define TOSA_KEY_CANCEL KEY_CANCEL
++#define TOSA_KEY_CENTER KEY_SELECT /* ??? */
++#define TOSA_KEY_OK KEY_OK
++#define TOSA_KEY_CALENDAR KEY_CALENDAR
++#define TOSA_KEY_HOMEPAGE KEY_HOMEPAGE
++#define TOSA_KEY_LIGHT KEY_KBDILLUMTOGGLE
++#define TOSA_KEY_MENU KEY_MENU
++#define TOSA_KEY_FN KEY_FN
++#define TOSA_KEY_MAIL KEY_MAIL
++#endif
++
+ #endif /* _ASM_ARCH_TOSA_H_ */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch
new file mode 100644
index 0000000000..082a2c72b8
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch
@@ -0,0 +1,61 @@
+From 18c1a92a09faf75ebdac7ac471c741a6622cf3e2 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:27:49 +0300
+Subject: [PATCH 13/64] USB: gadget: pxa2xx_udc supports inverted vbus
+
+Some boards (like e.g. Tosa) invert the VBUS-detection signal:
+it's low when a host is supplying VBUS, and high otherwise.
+Allow specifying whether gpio_vbus value is inverted.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 9 +++++++--
+ include/asm-arm/mach/udc_pxa2xx.h | 2 ++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
+index 3173b39..4f7d4ef 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.c
++++ b/drivers/usb/gadget/pxa2xx_udc.c
+@@ -127,8 +127,10 @@ static int is_vbus_present(void)
+ {
+ struct pxa2xx_udc_mach_info *mach = the_controller->mach;
+
+- if (mach->gpio_vbus)
+- return gpio_get_value(mach->gpio_vbus);
++ if (mach->gpio_vbus) {
++ int value = gpio_get_value(mach->gpio_vbus);
++ return mach->gpio_vbus_inverted ? !value : value;
++ }
+ if (mach->udc_is_connected)
+ return mach->udc_is_connected();
+ return 1;
+@@ -1397,6 +1399,9 @@ static irqreturn_t udc_vbus_irq(int irq, void *_dev)
+ struct pxa2xx_udc *dev = _dev;
+ int vbus = gpio_get_value(dev->mach->gpio_vbus);
+
++ if (dev->mach->gpio_vbus_inverted)
++ vbus = !vbus;
++
+ pxa2xx_udc_vbus_session(&dev->gadget, vbus);
+ return IRQ_HANDLED;
+ }
+diff --git a/include/asm-arm/mach/udc_pxa2xx.h b/include/asm-arm/mach/udc_pxa2xx.h
+index ff0a957..f191e14 100644
+--- a/include/asm-arm/mach/udc_pxa2xx.h
++++ b/include/asm-arm/mach/udc_pxa2xx.h
+@@ -19,7 +19,9 @@ struct pxa2xx_udc_mach_info {
+ * with on-chip GPIOs not Lubbock's wierd hardware, can have a sane
+ * VBUS IRQ and omit the methods above. Store the GPIO number
+ * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits.
++ * Note that sometimes the signals go through inverters...
+ */
++ bool gpio_vbus_inverted;
+ u16 gpio_vbus; /* high == vbus present */
+ u16 gpio_pullup; /* high == pullup activated */
+ };
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch
new file mode 100644
index 0000000000..98783efea0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch
@@ -0,0 +1,38 @@
+From 932ff38b17c7847c43e2bad01b510b64c27f9810 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:27:59 +0300
+Subject: [PATCH 14/64] tosa_udc_use_gpio_vbus.patch
+
+Use gpio_vbus instead of udc_is_connected for udc on tosa.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+ arch/arm/mach-pxa/tosa.c | 9 ++-------
+ 1 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index e7e0f52..5268e94 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -159,15 +159,10 @@ static void tosa_udc_command(int cmd)
+ }
+ }
+
+-static int tosa_udc_is_connected(void)
+-{
+- return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0);
+-}
+-
+-
+ static struct pxa2xx_udc_mach_info udc_info __initdata = {
+ .udc_command = tosa_udc_command,
+- .udc_is_connected = tosa_udc_is_connected,
++ .gpio_vbus = TOSA_GPIO_USB_IN,
++ .gpio_vbus_inverted = 1,
+ };
+
+ /*
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0015-sharpsl-export-params.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0015-sharpsl-export-params.patch
new file mode 100644
index 0000000000..f8e57e8306
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0015-sharpsl-export-params.patch
@@ -0,0 +1,32 @@
+From bba216220d17d1091413e82c9924ac5614402c05 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Wed, 9 Jan 2008 01:28:06 +0300
+Subject: [PATCH 15/64] sharpsl export params
+
+---
+ arch/arm/common/sharpsl_param.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/common/sharpsl_param.c b/arch/arm/common/sharpsl_param.c
+index aad4d94..d56c932 100644
+--- a/arch/arm/common/sharpsl_param.c
++++ b/arch/arm/common/sharpsl_param.c
+@@ -12,6 +12,7 @@
+ */
+
+ #include <linux/kernel.h>
++#include <linux/module.h>
+ #include <linux/string.h>
+ #include <asm/mach/sharpsl_param.h>
+
+@@ -36,6 +37,7 @@
+ #define PHAD_MAGIC MAGIC_CHG('P','H','A','D')
+
+ struct sharpsl_param_info sharpsl_param;
++EXPORT_SYMBOL(sharpsl_param);
+
+ void sharpsl_save_param(void)
+ {
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch
new file mode 100644
index 0000000000..d73de0698c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch
@@ -0,0 +1,44 @@
+From 0fe7b491b70efafbd41185f8e95a3eada65984a1 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 28 Jan 2008 01:49:28 +0300
+Subject: [PATCH 16/64] This patch fixes the pxa25x clocks definitions to add hwuart.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/pxa25x.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
+index 9732d5d..006a6e0 100644
+--- a/arch/arm/mach-pxa/pxa25x.c
++++ b/arch/arm/mach-pxa/pxa25x.c
+@@ -111,11 +111,14 @@ static const struct clkops clk_pxa25x_lcd_ops = {
+ * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
+ * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly)
+ */
++static struct clk pxa25x_hwuart_clk =
++ INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev)
++;
++
+ static struct clk pxa25x_clks[] = {
+ INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev),
+ INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
+ INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
+- INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
+ INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
+ INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
+ INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
+@@ -303,6 +306,10 @@ static int __init pxa25x_init(void)
+ {
+ int ret = 0;
+
++ /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
++ if (cpu_is_pxa25x())
++ clks_register(&pxa25x_hwuart_clk, 1);
++
+ if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
+ clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch
new file mode 100644
index 0000000000..5163361da3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch
@@ -0,0 +1,280 @@
+From 71857e8f6c4a8d2d3eac3037f02e0c30c6fdb37e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:43:28 +0300
+Subject: [PATCH 17/64] Convert pxa2xx UDC to use debugfs
+
+Use debugfs instead of /proc/driver/udc
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 100 +++++++++++++++++----------------------
+ drivers/usb/gadget/pxa2xx_udc.h | 10 +++-
+ 2 files changed, 51 insertions(+), 59 deletions(-)
+
+diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
+index 4f7d4ef..2900556 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.c
++++ b/drivers/usb/gadget/pxa2xx_udc.c
+@@ -38,13 +38,14 @@
+ #include <linux/timer.h>
+ #include <linux/list.h>
+ #include <linux/interrupt.h>
+-#include <linux/proc_fs.h>
+ #include <linux/mm.h>
+ #include <linux/platform_device.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/irq.h>
+ #include <linux/clk.h>
+ #include <linux/err.h>
++#include <linux/seq_file.h>
++#include <linux/debugfs.h>
+
+ #include <asm/byteorder.h>
+ #include <asm/dma.h>
+@@ -993,45 +994,36 @@ static const struct usb_gadget_ops pxa2xx_udc_ops = {
+
+ /*-------------------------------------------------------------------------*/
+
+-#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+-
+-static const char proc_node_name [] = "driver/udc";
++#ifdef CONFIG_USB_GADGET_DEBUG_FS
+
++static struct pxa2xx_udc memory;
+ static int
+-udc_proc_read(char *page, char **start, off_t off, int count,
+- int *eof, void *_dev)
++udc_seq_show(struct seq_file *m, void *d)
+ {
+- char *buf = page;
+- struct pxa2xx_udc *dev = _dev;
+- char *next = buf;
+- unsigned size = count;
++ struct pxa2xx_udc *dev = m->private;
+ unsigned long flags;
+- int i, t;
++ int i;
+ u32 tmp;
+
+- if (off != 0)
+- return 0;
++
++ BUG_ON(dev == NULL);
+
+ local_irq_save(flags);
+
+ /* basic device status */
+- t = scnprintf(next, size, DRIVER_DESC "\n"
++ seq_printf(m, DRIVER_DESC "\n"
+ "%s version: %s\nGadget driver: %s\nHost %s\n\n",
+ driver_name, DRIVER_VERSION SIZE_STR "(pio)",
+ dev->driver ? dev->driver->driver.name : "(none)",
+ is_vbus_present() ? "full speed" : "disconnected");
+- size -= t;
+- next += t;
+
+ /* registers for device and ep0 */
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+- size -= t;
+- next += t;
+
+ tmp = UDCCR;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "udccr %02X =%s%s%s%s%s%s%s%s\n", tmp,
+ (tmp & UDCCR_REM) ? " rem" : "",
+ (tmp & UDCCR_RSTIR) ? " rstir" : "",
+@@ -1041,11 +1033,9 @@ udc_proc_read(char *page, char **start, off_t off, int count,
+ (tmp & UDCCR_RSM) ? " rsm" : "",
+ (tmp & UDCCR_UDA) ? " uda" : "",
+ (tmp & UDCCR_UDE) ? " ude" : "");
+- size -= t;
+- next += t;
+
+ tmp = UDCCS0;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "udccs0 %02X =%s%s%s%s%s%s%s%s\n", tmp,
+ (tmp & UDCCS0_SA) ? " sa" : "",
+ (tmp & UDCCS0_RNE) ? " rne" : "",
+@@ -1055,28 +1045,22 @@ udc_proc_read(char *page, char **start, off_t off, int count,
+ (tmp & UDCCS0_FTF) ? " ftf" : "",
+ (tmp & UDCCS0_IPR) ? " ipr" : "",
+ (tmp & UDCCS0_OPR) ? " opr" : "");
+- size -= t;
+- next += t;
+
+ if (dev->has_cfr) {
+ tmp = UDCCFR;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "udccfr %02X =%s%s\n", tmp,
+ (tmp & UDCCFR_AREN) ? " aren" : "",
+ (tmp & UDCCFR_ACM) ? " acm" : "");
+- size -= t;
+- next += t;
+ }
+
+ if (!is_vbus_present() || !dev->driver)
+ goto done;
+
+- t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
++ seq_printf(m, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
+ dev->stats.write.bytes, dev->stats.write.ops,
+ dev->stats.read.bytes, dev->stats.read.ops,
+ dev->stats.irqs);
+- size -= t;
+- next += t;
+
+ /* dump endpoint queues */
+ for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+@@ -1090,55 +1074,57 @@ udc_proc_read(char *page, char **start, off_t off, int count,
+ if (!d)
+ continue;
+ tmp = *dev->ep [i].reg_udccs;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "%s max %d %s udccs %02x irqs %lu\n",
+ ep->ep.name, le16_to_cpu (d->wMaxPacketSize),
+ "pio", tmp, ep->pio_irqs);
+ /* TODO translate all five groups of udccs bits! */
+
+ } else /* ep0 should only have one transfer queued */
+- t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n",
++ seq_printf(m, "ep0 max 16 pio irqs %lu\n",
+ ep->pio_irqs);
+- if (t <= 0 || t > size)
+- goto done;
+- size -= t;
+- next += t;
+
+ if (list_empty(&ep->queue)) {
+- t = scnprintf(next, size, "\t(nothing queued)\n");
+- if (t <= 0 || t > size)
+- goto done;
+- size -= t;
+- next += t;
++ seq_printf(m, "\t(nothing queued)\n");
+ continue;
+ }
+ list_for_each_entry(req, &ep->queue, queue) {
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "\treq %p len %d/%d buf %p\n",
+ &req->req, req->req.actual,
+ req->req.length, req->req.buf);
+- if (t <= 0 || t > size)
+- goto done;
+- size -= t;
+- next += t;
+ }
+ }
+
+ done:
+ local_irq_restore(flags);
+- *eof = 1;
+- return count - size;
++ return 0;
+ }
+
+-#define create_proc_files() \
+- create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev)
+-#define remove_proc_files() \
+- remove_proc_entry(proc_node_name, NULL)
++static int
++udc_debugfs_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, udc_seq_show, inode->i_private);
++}
++
++static const struct file_operations debug_fops = {
++ .open = udc_debugfs_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++ .owner = THIS_MODULE,
++};
++
++#define create_debug_files(dev) \
++ dev->debugfs_udc = debugfs_create_file(dev->gadget.name, S_IRUGO, \
++ NULL, dev, &debug_fops)
++#define remove_debug_files(dev) \
++ if (dev->debugfs_udc) debugfs_remove(dev->debugfs_udc)
+
+ #else /* !CONFIG_USB_GADGET_DEBUG_FILES */
+
+-#define create_proc_files() do {} while (0)
+-#define remove_proc_files() do {} while (0)
++#define create_debug_files(dev) do {} while (0)
++#define remove_debug_files(dev) do {} while (0)
+
+ #endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+@@ -2245,7 +2231,7 @@ lubbock_fail0:
+ goto err_vbus_irq;
+ }
+ }
+- create_proc_files();
++ create_debug_files(dev);
+
+ return 0;
+
+@@ -2282,7 +2268,7 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
+ return -EBUSY;
+
+ udc_disable(dev);
+- remove_proc_files();
++ remove_debug_files(dev);
+
+ if (dev->got_irq) {
+ free_irq(platform_get_irq(pdev, 0), dev);
+diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
+index 1db46d7..c08b1a2 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.h
++++ b/drivers/usb/gadget/pxa2xx_udc.h
+@@ -129,6 +129,10 @@ struct pxa2xx_udc {
+ struct pxa2xx_udc_mach_info *mach;
+ u64 dma_mask;
+ struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS];
++
++#ifdef CONFIG_USB_GADGET_DEBUG_FS
++ struct dentry *debugfs_udc;
++#endif
+ };
+
+ /*-------------------------------------------------------------------------*/
+@@ -153,6 +157,8 @@ static struct pxa2xx_udc *the_controller;
+
+ #ifdef DEBUG
+
++static int is_vbus_present(void);
++
+ static const char *state_name[] = {
+ "EP0_IDLE",
+ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE",
+@@ -207,8 +213,7 @@ dump_state(struct pxa2xx_udc *dev)
+ unsigned i;
+
+ DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+- //is_usb_connected() ? "host " : "disconnected",
+- "host ",
++ is_vbus_present() ? "host " : "disconnected",
+ state_name[dev->ep0state],
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+ dump_udccr("udccr");
+@@ -224,7 +230,7 @@ dump_state(struct pxa2xx_udc *dev)
+ } else
+ DMSG("ep0 driver '%s'\n", dev->driver->driver.name);
+
+- //if (!is_usb_connected())
+- // return;
++ if (!is_vbus_present())
++ return;
+
+ dump_udccs0 ("udccs0");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch
new file mode 100644
index 0000000000..7bf4ad02d6
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch
@@ -0,0 +1,225 @@
+From b9a0fdbf333b461682d5da8b9aaa42f4de91ffcf Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 10 Feb 2008 03:29:17 +0300
+Subject: [PATCH 18/64] Fix the pxa2xx_udc to balance calls to clk_enable/clk_disable
+
+Signed-off-by: Dmitry Baryshkov dbaryshkov@gmail.com
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 84 +++++++++++++++++++++++----------------
+ drivers/usb/gadget/pxa2xx_udc.h | 6 ++-
+ 2 files changed, 54 insertions(+), 36 deletions(-)
+
+diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
+index 2900556..8e32d07 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.c
++++ b/drivers/usb/gadget/pxa2xx_udc.c
+@@ -680,7 +680,7 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
+
+ /* kickstart this i/o queue? */
+ if (list_empty(&ep->queue) && !ep->stopped) {
+- if (ep->desc == 0 /* ep0 */) {
++ if (ep->desc == NULL /* ep0 */) {
+ unsigned length = _req->length;
+
+ switch (dev->ep0state) {
+@@ -734,7 +734,7 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
+ }
+
+ /* pio or dma irq handler advances the queue. */
+- if (likely (req != 0))
++ if (likely (req != NULL))
+ list_add_tail(&req->queue, &ep->queue);
+ local_irq_restore(flags);
+
+@@ -934,20 +934,35 @@ static void udc_disable(struct pxa2xx_udc *);
+ /* We disable the UDC -- and its 48 MHz clock -- whenever it's not
+ * in active use.
+ */
+-static int pullup(struct pxa2xx_udc *udc, int is_active)
++static int pullup(struct pxa2xx_udc *udc)
+ {
+- is_active = is_active && udc->vbus && udc->pullup;
++ int is_active = udc->vbus && udc->pullup && ! udc->suspended;
+ DMSG("%s\n", is_active ? "active" : "inactive");
+- if (is_active)
+- udc_enable(udc);
+- else {
+- if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
+- DMSG("disconnect %s\n", udc->driver
+- ? udc->driver->driver.name
+- : "(no driver)");
+- stop_activity(udc, udc->driver);
++ if (is_active) {
++ if (!udc->active) {
++ udc->active = 1;
++#ifdef CONFIG_ARCH_PXA
++ /* Enable clock for USB device */
++ clk_enable(udc->clk);
++#endif
++ udc_enable(udc);
+ }
+- udc_disable(udc);
++ } else {
++ if (udc->active) {
++ if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
++ DMSG("disconnect %s\n", udc->driver
++ ? udc->driver->driver.name
++ : "(no driver)");
++ stop_activity(udc, udc->driver);
++ }
++ udc_disable(udc);
++#ifdef CONFIG_ARCH_PXA
++ /* Disable clock for USB device */
++ clk_disable(udc->clk);
++#endif
++ udc->active = 0;
++ }
++
+ }
+ return 0;
+ }
+@@ -958,9 +973,9 @@ static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
+ struct pxa2xx_udc *udc;
+
+ udc = container_of(_gadget, struct pxa2xx_udc, gadget);
+- udc->vbus = is_active = (is_active != 0);
++ udc->vbus = (is_active != 0);
+ DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
+- pullup(udc, is_active);
++ pullup(udc);
+ return 0;
+ }
+
+@@ -975,9 +990,8 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active)
+ if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
+ return -EOPNOTSUPP;
+
+- is_active = (is_active != 0);
+- udc->pullup = is_active;
+- pullup(udc, is_active);
++ udc->pullup = (is_active != 0);
++ pullup(udc);
+ return 0;
+ }
+
+@@ -998,7 +1012,7 @@ static const struct usb_gadget_ops pxa2xx_udc_ops = {
+
+ static struct pxa2xx_udc memory;
+ static int
+-udc_seq_show(struct seq_file *m, void *d)
++udc_seq_show(struct seq_file *m, void *_d)
+ {
+ struct pxa2xx_udc *dev = m->private;
+ unsigned long flags;
+@@ -1145,11 +1159,6 @@ static void udc_disable(struct pxa2xx_udc *dev)
+
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+-#ifdef CONFIG_ARCH_PXA
+- /* Disable clock for USB device */
+- clk_disable(dev->clk);
+-#endif
+-
+ ep0_idle (dev);
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ }
+@@ -1190,11 +1199,6 @@ static void udc_enable (struct pxa2xx_udc *dev)
+ {
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+-#ifdef CONFIG_ARCH_PXA
+- /* Enable clock for USB device */
+- clk_enable(dev->clk);
+-#endif
+-
+ /* try to clear these bits before we enable the udc */
+ udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR);
+
+@@ -1285,7 +1289,7 @@ fail:
+ * for set_configuration as well as eventual disconnect.
+ */
+ DMSG("registered gadget driver '%s'\n", driver->driver.name);
+- pullup(dev, 1);
++ pullup(dev);
+ dump_state(dev);
+ return 0;
+ }
+@@ -1328,7 +1332,8 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+ return -EINVAL;
+
+ local_irq_disable();
+- pullup(dev, 0);
++ dev->pullup = 0;
++ pullup(dev);
+ stop_activity(dev, driver);
+ local_irq_enable();
+
+@@ -2267,7 +2272,9 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
+ if (dev->driver)
+ return -EBUSY;
+
+- udc_disable(dev);
++ dev->pullup = 0;
++ pullup(dev);
++
+ remove_debug_files(dev);
+
+ if (dev->got_irq) {
+@@ -2315,10 +2322,15 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
+ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
+ {
+ struct pxa2xx_udc *udc = platform_get_drvdata(dev);
++ unsigned long flags;
+
+ if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
+ WARN("USB host won't detect disconnect!\n");
+- pullup(udc, 0);
++ udc->suspended = 1;
++
++ local_irq_save(flags);
++ pullup(udc);
++ local_irq_restore(flags);
+
+ return 0;
+ }
+@@ -2326,8 +2338,12 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
+ static int pxa2xx_udc_resume(struct platform_device *dev)
+ {
+ struct pxa2xx_udc *udc = platform_get_drvdata(dev);
++ unsigned long flags;
+
+- pullup(udc, 1);
++ udc->suspended = 0;
++ local_irq_save(flags);
++ pullup(udc);
++ local_irq_restore(flags);
+
+ return 0;
+ }
+diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
+index c08b1a2..93586b2 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.h
++++ b/drivers/usb/gadget/pxa2xx_udc.h
+@@ -119,7 +119,9 @@ struct pxa2xx_udc {
+ has_cfr : 1,
+ req_pending : 1,
+ req_std : 1,
+- req_config : 1;
++ req_config : 1,
++ suspended : 1,
++ active : 1;
+
+ #define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200))
+ struct timer_list timer;
+@@ -239,7 +241,7 @@ dump_state(struct pxa2xx_udc *dev)
+ dev->stats.read.bytes, dev->stats.read.ops);
+
+ for (i = 1; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+- if (dev->ep [i].desc == 0)
++ if (dev->ep [i].desc == NULL)
+ continue;
+ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccs);
+ }
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch
new file mode 100644
index 0000000000..4b4107d655
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch
@@ -0,0 +1,128 @@
+From bda65817167cce5294e1d84670f36815262ed550 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk@dyn-67.arm.linux.org.uk>
+Date: Sun, 3 Feb 2008 21:58:12 +0300
+Subject: [PATCH 19/64] pxa: remove periodic mode emulation support
+
+Apparantly, the generic time subsystem can accurately emulate periodic
+mode via the one-shot support code, so we don't need our own periodic
+emulation code anymore. Just ensure that we build support for one shot
+into the generic time subsystem.
+
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/time.c | 61 ++++++----------------------------------------
+ 2 files changed, 9 insertions(+), 53 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index a04f507..1be7182 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -345,6 +345,7 @@ config ARCH_PXA
+ select GENERIC_GPIO
+ select GENERIC_TIME
+ select GENERIC_CLOCKEVENTS
++ select TICK_ONESHOT
+ help
+ Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
+
+diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
+index fbfa192..3c4abbf 100644
+--- a/arch/arm/mach-pxa/time.c
++++ b/arch/arm/mach-pxa/time.c
+@@ -59,55 +59,17 @@ unsigned long long sched_clock(void)
+ }
+
+
++#define MIN_OSCR_DELTA 16
++
+ static irqreturn_t
+ pxa_ost0_interrupt(int irq, void *dev_id)
+ {
+- int next_match;
+ struct clock_event_device *c = dev_id;
+
+- if (c->mode == CLOCK_EVT_MODE_ONESHOT) {
+- /* Disarm the compare/match, signal the event. */
+- OIER &= ~OIER_E0;
+- OSSR = OSSR_M0;
+- c->event_handler(c);
+- } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) {
+- /* Call the event handler as many times as necessary
+- * to recover missed events, if any (if we update
+- * OSMR0 and OSCR0 is still ahead of us, we've missed
+- * the event). As we're dealing with that, re-arm the
+- * compare/match for the next event.
+- *
+- * HACK ALERT:
+- *
+- * There's a latency between the instruction that
+- * writes to OSMR0 and the actual commit to the
+- * physical hardware, because the CPU doesn't (have
+- * to) run at bus speed, there's a write buffer
+- * between the CPU and the bus, etc. etc. So if the
+- * target OSCR0 is "very close", to the OSMR0 load
+- * value, the update to OSMR0 might not get to the
+- * hardware in time and we'll miss that interrupt.
+- *
+- * To be safe, if the new OSMR0 is "very close" to the
+- * target OSCR0 value, we call the event_handler as
+- * though the event actually happened. According to
+- * Nico's comment in the previous version of this
+- * code, experience has shown that 6 OSCR ticks is
+- * "very close" but he went with 8. We will use 16,
+- * based on the results of testing on PXA270.
+- *
+- * To be doubly sure, we also tell clkevt via
+- * clockevents_register_device() not to ask for
+- * anything that might put us "very close".
+- */
+-#define MIN_OSCR_DELTA 16
+- do {
+- OSSR = OSSR_M0;
+- next_match = (OSMR0 += LATCH);
+- c->event_handler(c);
+- } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA)
+- && (c->mode == CLOCK_EVT_MODE_PERIODIC));
+- }
++ /* Disarm the compare/match, signal the event. */
++ OIER &= ~OIER_E0;
++ OSSR = OSSR_M0;
++ c->event_handler(c);
+
+ return IRQ_HANDLED;
+ }
+@@ -133,14 +95,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
+ unsigned long irqflags;
+
+ switch (mode) {
+- case CLOCK_EVT_MODE_PERIODIC:
+- raw_local_irq_save(irqflags);
+- OSSR = OSSR_M0;
+- OIER |= OIER_E0;
+- OSMR0 = OSCR + LATCH;
+- raw_local_irq_restore(irqflags);
+- break;
+-
+ case CLOCK_EVT_MODE_ONESHOT:
+ raw_local_irq_save(irqflags);
+ OIER &= ~OIER_E0;
+@@ -158,13 +112,14 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
+ break;
+
+ case CLOCK_EVT_MODE_RESUME:
++ case CLOCK_EVT_MODE_PERIODIC:
+ break;
+ }
+ }
+
+ static struct clock_event_device ckevt_pxa_osmr0 = {
+ .name = "osmr0",
+- .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
++ .features = CLOCK_EVT_FEAT_ONESHOT,
+ .shift = 32,
+ .rating = 200,
+ .cpumask = CPU_MASK_CPU0,
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch
new file mode 100644
index 0000000000..0a42bc5855
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch
@@ -0,0 +1,257 @@
+From ee8ca5742e0000dd2369ef4d328c2c1117276a3b Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 02:56:28 +0300
+Subject: [PATCH 20/64] Provide dew device/clock backports from 2.6.24-git
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/devices.h | 12 ++++++++++++
+ arch/arm/mach-pxa/pxa25x.c | 18 ++++++++++++------
+ arch/arm/mach-pxa/pxa27x.c | 22 ++++++++++++++++------
+ arch/arm/mach-pxa/pxa3xx.c | 30 ++++++++++++++++++++++++++++++
+ kernel/Makefile | 1 +
+ 6 files changed, 72 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 1be7182..10faf9c 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -367,6 +367,7 @@ config ARCH_SA1100
+ select ARCH_DISCONTIGMEM_ENABLE
+ select ARCH_MTD_XIP
+ select GENERIC_GPIO
++ select GENERIC_TIME
+ help
+ Support for StrongARM 11x0 based boards.
+
+diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
+index 94c8d5c..96c7c89 100644
+--- a/arch/arm/mach-pxa/devices.h
++++ b/arch/arm/mach-pxa/devices.h
+@@ -1,4 +1,6 @@
+ extern struct platform_device pxa_device_mci;
++extern struct platform_device pxa3xx_device_mci2;
++extern struct platform_device pxa3xx_device_mci3;
+ extern struct platform_device pxa_device_udc;
+ extern struct platform_device pxa_device_fb;
+ extern struct platform_device pxa_device_ffuart;
+@@ -12,3 +14,13 @@ extern struct platform_device pxa_device_rtc;
+
+ extern struct platform_device pxa27x_device_i2c_power;
+ extern struct platform_device pxa27x_device_ohci;
++
++extern struct platform_device pxa25x_device_ssp;
++extern struct platform_device pxa25x_device_nssp;
++extern struct platform_device pxa25x_device_assp;
++extern struct platform_device pxa27x_device_ssp1;
++extern struct platform_device pxa27x_device_ssp2;
++extern struct platform_device pxa27x_device_ssp3;
++extern struct platform_device pxa3xx_device_ssp4;
++
++void __init pxa_register_device(struct platform_device *dev, void *data);
+diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
+index 006a6e0..5988d99 100644
+--- a/arch/arm/mach-pxa/pxa25x.c
++++ b/arch/arm/mach-pxa/pxa25x.c
+@@ -123,12 +123,15 @@ static struct clk pxa25x_clks[] = {
+ INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
+ INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
+ INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
++
++ INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev),
++ INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev),
++ INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev),
++
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+ INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP, 3686400, 0, NULL),
+ INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL),
+- INIT_CKEN("NSSPCLK", NSSP, 3686400, 0, NULL),
+ */
+ INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
+ };
+@@ -216,8 +219,6 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
+
+ static void pxa25x_cpu_pm_enter(suspend_state_t state)
+ {
+- CKEN = 0;
+-
+ switch (state) {
+ case PM_SUSPEND_MEM:
+ /* set resume return address */
+@@ -239,6 +240,8 @@ static void __init pxa25x_init_pm(void)
+ {
+ pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns;
+ }
++#else
++static inline void pxa25x_init_pm(void) {}
+ #endif
+
+ /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm
+@@ -300,6 +303,9 @@ static struct platform_device *pxa25x_devices[] __initdata = {
+ &pxa_device_i2s,
+ &pxa_device_ficp,
+ &pxa_device_rtc,
++ &pxa25x_device_ssp,
++ &pxa25x_device_nssp,
++ &pxa25x_device_assp,
+ };
+
+ static int __init pxa25x_init(void)
+@@ -315,9 +321,9 @@ static int __init pxa25x_init(void)
+
+ if ((ret = pxa_init_dma(16)))
+ return ret;
+-#ifdef CONFIG_PM
++
+ pxa25x_init_pm();
+-#endif
++
+ ret = platform_add_devices(pxa25x_devices,
+ ARRAY_SIZE(pxa25x_devices));
+ }
+diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
+index 8e126e6..30ca4fd 100644
+--- a/arch/arm/mach-pxa/pxa27x.c
++++ b/arch/arm/mach-pxa/pxa27x.c
+@@ -150,11 +150,12 @@ static struct clk pxa27x_clks[] = {
+ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
+
++ INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
++ INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
++ INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
++
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP1, 13000000, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP2, 13000000, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP3, 13000000, 0, NULL),
+ INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
+ INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL),
+ INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL),
+@@ -304,6 +305,8 @@ static void __init pxa27x_init_pm(void)
+ {
+ pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns;
+ }
++#else
++static inline void pxa27x_init_pm(void) {}
+ #endif
+
+ /* PXA27x: Various gpios can issue wakeup events. This logic only
+@@ -423,6 +426,11 @@ struct platform_device pxa27x_device_i2c_power = {
+ .num_resources = ARRAY_SIZE(i2c_power_resources),
+ };
+
++void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
++{
++ pxa27x_device_i2c_power.dev.platform_data = info;
++}
++
+ static struct platform_device *devices[] __initdata = {
+ &pxa_device_mci,
+ &pxa_device_udc,
+@@ -435,7 +443,9 @@ static struct platform_device *devices[] __initdata = {
+ &pxa_device_ficp,
+ &pxa_device_rtc,
+ &pxa27x_device_i2c_power,
+- &pxa27x_device_ohci,
++ &pxa27x_device_ssp1,
++ &pxa27x_device_ssp2,
++ &pxa27x_device_ssp3,
+ };
+
+ static int __init pxa27x_init(void)
+@@ -446,9 +456,9 @@ static int __init pxa27x_init(void)
+
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+-#ifdef CONFIG_PM
++
+ pxa27x_init_pm();
+-#endif
++
+ ret = platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+ return ret;
+diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
+index 61d9c9d..ccab9da 100644
+--- a/arch/arm/mach-pxa/pxa3xx.c
++++ b/arch/arm/mach-pxa/pxa3xx.c
+@@ -189,8 +189,31 @@ static struct clk pxa3xx_clks[] = {
+
+ PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+ PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
++ PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
++
++ PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
++ PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
++ PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
++ PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
++
++ PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
++ PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
++ PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
+ };
+
++#ifdef CONFIG_PM
++#define SLEEP_SAVE_SIZE 4
++
++#define ISRAM_START 0x5c000000
++#define ISRAM_SIZE SZ_256K
++
++static inline void pxa3xx_init_pm(void) {}
++static inline void pxa3xx_init_irq_pm(void) {}
++#else
++static inline void pxa3xx_init_pm(void) {}
++static inline void pxa3xx_init_irq_pm(void) {}
++#endif
++
+ void __init pxa3xx_init_irq(void)
+ {
+ /* enable CP6 access */
+@@ -202,6 +225,7 @@ void __init pxa3xx_init_irq(void)
+ pxa_init_irq_low();
+ pxa_init_irq_high();
+ pxa_init_irq_gpio(128);
++ pxa3xx_init_irq_pm();
+ }
+
+ /*
+@@ -219,6 +243,10 @@ static struct platform_device *devices[] __initdata = {
+ &pxa_device_i2s,
+ &pxa_device_ficp,
+ &pxa_device_rtc,
++ &pxa27x_device_ssp1,
++ &pxa27x_device_ssp2,
++ &pxa27x_device_ssp3,
++ &pxa3xx_device_ssp4,
+ };
+
+ static int __init pxa3xx_init(void)
+@@ -231,6 +259,8 @@ static int __init pxa3xx_init(void)
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+
++ pxa3xx_init_pm();
++
+ return platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+ return 0;
+diff --git a/kernel/Makefile b/kernel/Makefile
+index dfa9695..6d9a87c 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -57,6 +57,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
+ obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+ obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+ obj-$(CONFIG_MARKERS) += marker.o
++obj-$(CONFIG_LATENCYTOP) += latencytop.o
+
+ ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
+ # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch
new file mode 100644
index 0000000000..3f8512128a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch
@@ -0,0 +1,121 @@
+From b77665c545bc260d2b93add129413e4a724d7e6e Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Fri, 18 Jan 2008 00:35:00 +0300
+Subject: [PATCH 21/64] Add an empty drivers/gpio directory for gpiolib infrastructure and GPIO
+ expanders. It will be populated by later patches.
+
+This won't be the only place to hold such gpio_chip code. Many external chips
+add a few GPIOs as secondary functionality (such as MFD drivers) and platform
+code frequently needs to closely integrate GPIO and IRQ support.
+
+This is placed *early* in the build/link sequence since it's common for other
+drivers to depend on GPIOs to do their work, so they must be initialized early
+in the device_initcall() sequence.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Philipp Zabel <philipp.zabel@gmail.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ arch/arm/Kconfig | 2 ++
+ drivers/Kconfig | 2 ++
+ drivers/Makefile | 1 +
+ drivers/gpio/Kconfig | 32 ++++++++++++++++++++++++++++++++
+ drivers/gpio/Makefile | 3 +++
+ 5 files changed, 40 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/gpio/Kconfig
+ create mode 100644 drivers/gpio/Makefile
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 10faf9c..06ca241 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1042,6 +1042,8 @@ source "drivers/i2c/Kconfig"
+
+ source "drivers/spi/Kconfig"
+
++source "drivers/gpio/Kconfig"
++
+ source "drivers/w1/Kconfig"
+
+ source "drivers/power/Kconfig"
+diff --git a/drivers/Kconfig b/drivers/Kconfig
+index f4076d9..90e295a 100644
+--- a/drivers/Kconfig
++++ b/drivers/Kconfig
+@@ -52,6 +52,8 @@ source "drivers/i2c/Kconfig"
+
+ source "drivers/spi/Kconfig"
+
++source "drivers/gpio/Kconfig"
++
+ source "drivers/w1/Kconfig"
+
+ source "drivers/power/Kconfig"
+diff --git a/drivers/Makefile b/drivers/Makefile
+index 8cb37e3..8e5101f 100644
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -5,6 +5,7 @@
+ # Rewritten to use lists instead of if-statements.
+ #
+
++obj-$(CONFIG_HAVE_GPIO_LIB) += gpio/
+ obj-$(CONFIG_PCI) += pci/
+ obj-$(CONFIG_PARISC) += parisc/
+ obj-$(CONFIG_RAPIDIO) += rapidio/
+diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
+new file mode 100644
+index 0000000..560687c
+--- /dev/null
++++ b/drivers/gpio/Kconfig
+@@ -0,0 +1,32 @@
++#
++# GPIO infrastructure and expanders
++#
++
++config HAVE_GPIO_LIB
++ bool
++ help
++ Platforms select gpiolib if they use this infrastructure
++ for all their GPIOs, usually starting with ones integrated
++ into SOC processors.
++
++menu "GPIO Support"
++ depends on HAVE_GPIO_LIB
++
++config DEBUG_GPIO
++ bool "Debug GPIO calls"
++ depends on DEBUG_KERNEL
++ help
++ Say Y here to add some extra checks and diagnostics to GPIO calls.
++ The checks help ensure that GPIOs have been properly initialized
++ before they are used and that sleeping calls aren not made from
++ nonsleeping contexts. They can make bitbanged serial protocols
++ slower. The diagnostics help catch the type of setup errors
++ that are most common when setting up new platforms or boards.
++
++# put expanders in the right section, in alphabetical order
++
++comment "I2C GPIO expanders:"
++
++comment "SPI GPIO expanders:"
++
++endmenu
+diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
+new file mode 100644
+index 0000000..cdbba6b
+--- /dev/null
++++ b/drivers/gpio/Makefile
+@@ -0,0 +1,3 @@
++# gpio support: dedicated expander chips, etc
++
++ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch
new file mode 100644
index 0000000000..f39fedbbaa
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch
@@ -0,0 +1,746 @@
+From 3a0251c01446f3a6763e4406ca5495102db63aa4 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Fri, 18 Jan 2008 00:35:20 +0300
+Subject: [PATCH 22/64] Provide new implementation infrastructure that platforms may choose to use
+ when implementing the GPIO programming interface. Platforms can update their
+ GPIO support to use this. In many cases the incremental cost to access a
+ non-inlined GPIO should be less than a dozen instructions, with the memory
+ cost being about a page (total) of extra data and code. The upside is:
+
+ * Providing two features which were "want to have (but OK to defer)" when
+ GPIO interfaces were first discussed in November 2006:
+
+ - A "struct gpio_chip" to plug in GPIOs that aren't directly supported
+ by SOC platforms, but come from FPGAs or other multifunction devices
+ using conventional device registers (like UCB-1x00 or SM501 GPIOs,
+ and southbridges in PCs with more open specs than usual).
+
+ - Full support for message-based GPIO expanders, where registers are
+ accessed through sleeping I/O calls. Previous support for these
+ "cansleep" calls was just stubs. (One example: the widely used
+ pcf8574 I2C chips, with 8 GPIOs each.)
+
+ * Including a non-stub implementation of the gpio_{request,free}() calls,
+ making those calls much more useful. The diagnostic labels are also
+ recorded given DEBUG_FS, so /sys/kernel/debug/gpio can show a snapshot
+ of all GPIOs known to this infrastructure.
+
+The driver programming interfaces introduced in 2.6.21 do not change at all;
+this infrastructure is entirely below those covers.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Philipp Zabel <philipp.zabel@gmail.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ drivers/gpio/Makefile | 2 +
+ drivers/gpio/gpiolib.c | 567 ++++++++++++++++++++++++++++++++++++++++++++
+ include/asm-generic/gpio.h | 98 ++++++++
+ 3 files changed, 667 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/gpio/gpiolib.c
+
+diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
+index cdbba6b..2db28ce 100644
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -1,3 +1,5 @@
+ # gpio support: dedicated expander chips, etc
+
+ ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG
++
++obj-$(CONFIG_HAVE_GPIO_LIB) += gpiolib.o
+diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
+new file mode 100644
+index 0000000..d8db2f8
+--- /dev/null
++++ b/drivers/gpio/gpiolib.c
+@@ -0,0 +1,567 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/irq.h>
++#include <linux/spinlock.h>
++
++#include <asm/gpio.h>
++
++
++/* Optional implementation infrastructure for GPIO interfaces.
++ *
++ * Platforms may want to use this if they tend to use very many GPIOs
++ * that aren't part of a System-On-Chip core; or across I2C/SPI/etc.
++ *
++ * When kernel footprint or instruction count is an issue, simpler
++ * implementations may be preferred. The GPIO programming interface
++ * allows for inlining speed-critical get/set operations for common
++ * cases, so that access to SOC-integrated GPIOs can sometimes cost
++ * only an instruction or two per bit.
++ */
++
++
++/* When debugging, extend minimal trust to callers and platform code.
++ * Also emit diagnostic messages that may help initial bringup, when
++ * board setup or driver bugs are most common.
++ *
++ * Otherwise, minimize overhead in what may be bitbanging codepaths.
++ */
++#ifdef DEBUG
++#define extra_checks 1
++#else
++#define extra_checks 0
++#endif
++
++/* gpio_lock prevents conflicts during gpio_desc[] table updates.
++ * While any GPIO is requested, its gpio_chip is not removable;
++ * each GPIO's "requested" flag serves as a lock and refcount.
++ */
++static DEFINE_SPINLOCK(gpio_lock);
++
++struct gpio_desc {
++ struct gpio_chip *chip;
++ unsigned long flags;
++/* flag symbols are bit numbers */
++#define FLAG_REQUESTED 0
++#define FLAG_IS_OUT 1
++
++#ifdef CONFIG_DEBUG_FS
++ const char *label;
++#endif
++};
++static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
++
++static inline void desc_set_label(struct gpio_desc *d, const char *label)
++{
++#ifdef CONFIG_DEBUG_FS
++ d->label = label;
++#endif
++}
++
++/* Warn when drivers omit gpio_request() calls -- legal but ill-advised
++ * when setting direction, and otherwise illegal. Until board setup code
++ * and drivers use explicit requests everywhere (which won't happen when
++ * those calls have no teeth) we can't avoid autorequesting. This nag
++ * message should motivate switching to explicit requests...
++ */
++static void gpio_ensure_requested(struct gpio_desc *desc)
++{
++ if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) {
++ pr_warning("GPIO-%d autorequested\n", (int)(desc - gpio_desc));
++ desc_set_label(desc, "[auto]");
++ }
++}
++
++/* caller holds gpio_lock *OR* gpio is marked as requested */
++static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
++{
++ return gpio_desc[gpio].chip;
++}
++
++/**
++ * gpiochip_add() - register a gpio_chip
++ * @chip: the chip to register, with chip->base initialized
++ * Context: potentially before irqs or kmalloc will work
++ *
++ * Returns a negative errno if the chip can't be registered, such as
++ * because the chip->base is invalid or already associated with a
++ * different chip. Otherwise it returns zero as a success code.
++ */
++int gpiochip_add(struct gpio_chip *chip)
++{
++ unsigned long flags;
++ int status = 0;
++ unsigned id;
++
++ /* NOTE chip->base negative is reserved to mean a request for
++ * dynamic allocation. We don't currently support that.
++ */
++
++ if (chip->base < 0 || (chip->base + chip->ngpio) >= ARCH_NR_GPIOS) {
++ status = -EINVAL;
++ goto fail;
++ }
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ /* these GPIO numbers must not be managed by another gpio_chip */
++ for (id = chip->base; id < chip->base + chip->ngpio; id++) {
++ if (gpio_desc[id].chip != NULL) {
++ status = -EBUSY;
++ break;
++ }
++ }
++ if (status == 0) {
++ for (id = chip->base; id < chip->base + chip->ngpio; id++) {
++ gpio_desc[id].chip = chip;
++ gpio_desc[id].flags = 0;
++ }
++ }
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++fail:
++ /* failures here can mean systems won't boot... */
++ if (status)
++ pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n",
++ chip->base, chip->base + chip->ngpio,
++ chip->label ? : "generic");
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpiochip_add);
++
++/**
++ * gpiochip_remove() - unregister a gpio_chip
++ * @chip: the chip to unregister
++ *
++ * A gpio_chip with any GPIOs still requested may not be removed.
++ */
++int gpiochip_remove(struct gpio_chip *chip)
++{
++ unsigned long flags;
++ int status = 0;
++ unsigned id;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ for (id = chip->base; id < chip->base + chip->ngpio; id++) {
++ if (test_bit(FLAG_REQUESTED, &gpio_desc[id].flags)) {
++ status = -EBUSY;
++ break;
++ }
++ }
++ if (status == 0) {
++ for (id = chip->base; id < chip->base + chip->ngpio; id++)
++ gpio_desc[id].chip = NULL;
++ }
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpiochip_remove);
++
++
++/* These "optional" allocation calls help prevent drivers from stomping
++ * on each other, and help provide better diagnostics in debugfs.
++ * They're called even less than the "set direction" calls.
++ */
++int gpio_request(unsigned gpio, const char *label)
++{
++ struct gpio_desc *desc;
++ int status = -EINVAL;
++ unsigned long flags;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ if (gpio >= ARCH_NR_GPIOS)
++ goto done;
++ desc = &gpio_desc[gpio];
++ if (desc->chip == NULL)
++ goto done;
++
++ /* NOTE: gpio_request() can be called in early boot,
++ * before IRQs are enabled.
++ */
++
++ if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) {
++ desc_set_label(desc, label ? : "?");
++ status = 0;
++ } else
++ status = -EBUSY;
++
++done:
++ if (status)
++ pr_debug("gpio_request: gpio-%d (%s) status %d\n",
++ gpio, label ? : "?", status);
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpio_request);
++
++void gpio_free(unsigned gpio)
++{
++ unsigned long flags;
++ struct gpio_desc *desc;
++
++ if (gpio >= ARCH_NR_GPIOS) {
++ WARN_ON(extra_checks);
++ return;
++ }
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ desc = &gpio_desc[gpio];
++ if (desc->chip && test_and_clear_bit(FLAG_REQUESTED, &desc->flags))
++ desc_set_label(desc, NULL);
++ else
++ WARN_ON(extra_checks);
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++}
++EXPORT_SYMBOL_GPL(gpio_free);
++
++
++/**
++ * gpiochip_is_requested - return string iff signal was requested
++ * @chip: controller managing the signal
++ * @offset: of signal within controller's 0..(ngpio - 1) range
++ *
++ * Returns NULL if the GPIO is not currently requested, else a string.
++ * If debugfs support is enabled, the string returned is the label passed
++ * to gpio_request(); otherwise it is a meaningless constant.
++ *
++ * This function is for use by GPIO controller drivers. The label can
++ * help with diagnostics, and knowing that the signal is used as a GPIO
++ * can help avoid accidentally multiplexing it to another controller.
++ */
++const char *gpiochip_is_requested(struct gpio_chip *chip, unsigned offset)
++{
++ unsigned gpio = chip->base + offset;
++
++ if (gpio >= ARCH_NR_GPIOS || gpio_desc[gpio].chip != chip)
++ return NULL;
++ if (test_bit(FLAG_REQUESTED, &gpio_desc[gpio].flags) == 0)
++ return NULL;
++#ifdef CONFIG_DEBUG_FS
++ return gpio_desc[gpio].label;
++#else
++ return "?";
++#endif
++}
++EXPORT_SYMBOL_GPL(gpiochip_is_requested);
++
++
++/* Drivers MUST set GPIO direction before making get/set calls. In
++ * some cases this is done in early boot, before IRQs are enabled.
++ *
++ * As a rule these aren't called more than once (except for drivers
++ * using the open-drain emulation idiom) so these are natural places
++ * to accumulate extra debugging checks. Note that we can't (yet)
++ * rely on gpio_request() having been called beforehand.
++ */
++
++int gpio_direction_input(unsigned gpio)
++{
++ unsigned long flags;
++ struct gpio_chip *chip;
++ struct gpio_desc *desc = &gpio_desc[gpio];
++ int status = -EINVAL;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ if (gpio >= ARCH_NR_GPIOS)
++ goto fail;
++ chip = desc->chip;
++ if (!chip || !chip->get || !chip->direction_input)
++ goto fail;
++ gpio -= chip->base;
++ if (gpio >= chip->ngpio)
++ goto fail;
++ gpio_ensure_requested(desc);
++
++ /* now we know the gpio is valid and chip won't vanish */
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++
++ might_sleep_if(extra_checks && chip->can_sleep);
++
++ status = chip->direction_input(chip, gpio);
++ if (status == 0)
++ clear_bit(FLAG_IS_OUT, &desc->flags);
++ return status;
++fail:
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ if (status)
++ pr_debug("%s: gpio-%d status %d\n",
++ __FUNCTION__, gpio, status);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpio_direction_input);
++
++int gpio_direction_output(unsigned gpio, int value)
++{
++ unsigned long flags;
++ struct gpio_chip *chip;
++ struct gpio_desc *desc = &gpio_desc[gpio];
++ int status = -EINVAL;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ if (gpio >= ARCH_NR_GPIOS)
++ goto fail;
++ chip = desc->chip;
++ if (!chip || !chip->set || !chip->direction_output)
++ goto fail;
++ gpio -= chip->base;
++ if (gpio >= chip->ngpio)
++ goto fail;
++ gpio_ensure_requested(desc);
++
++ /* now we know the gpio is valid and chip won't vanish */
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++
++ might_sleep_if(extra_checks && chip->can_sleep);
++
++ status = chip->direction_output(chip, gpio, value);
++ if (status == 0)
++ set_bit(FLAG_IS_OUT, &desc->flags);
++ return status;
++fail:
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ if (status)
++ pr_debug("%s: gpio-%d status %d\n",
++ __FUNCTION__, gpio, status);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpio_direction_output);
++
++
++/* I/O calls are only valid after configuration completed; the relevant
++ * "is this a valid GPIO" error checks should already have been done.
++ *
++ * "Get" operations are often inlinable as reading a pin value register,
++ * and masking the relevant bit in that register.
++ *
++ * When "set" operations are inlinable, they involve writing that mask to
++ * one register to set a low value, or a different register to set it high.
++ * Otherwise locking is needed, so there may be little value to inlining.
++ *
++ *------------------------------------------------------------------------
++ *
++ * IMPORTANT!!! The hot paths -- get/set value -- assume that callers
++ * have requested the GPIO. That can include implicit requesting by
++ * a direction setting call. Marking a gpio as requested locks its chip
++ * in memory, guaranteeing that these table lookups need no more locking
++ * and that gpiochip_remove() will fail.
++ *
++ * REVISIT when debugging, consider adding some instrumentation to ensure
++ * that the GPIO was actually requested.
++ */
++
++/**
++ * __gpio_get_value() - return a gpio's value
++ * @gpio: gpio whose value will be returned
++ * Context: any
++ *
++ * This is used directly or indirectly to implement gpio_get_value().
++ * It returns the zero or nonzero value provided by the associated
++ * gpio_chip.get() method; or zero if no such method is provided.
++ */
++int __gpio_get_value(unsigned gpio)
++{
++ struct gpio_chip *chip;
++
++ chip = gpio_to_chip(gpio);
++ WARN_ON(extra_checks && chip->can_sleep);
++ return chip->get ? chip->get(chip, gpio - chip->base) : 0;
++}
++EXPORT_SYMBOL_GPL(__gpio_get_value);
++
++/**
++ * __gpio_set_value() - assign a gpio's value
++ * @gpio: gpio whose value will be assigned
++ * @value: value to assign
++ * Context: any
++ *
++ * This is used directly or indirectly to implement gpio_set_value().
++ * It invokes the associated gpio_chip.set() method.
++ */
++void __gpio_set_value(unsigned gpio, int value)
++{
++ struct gpio_chip *chip;
++
++ chip = gpio_to_chip(gpio);
++ WARN_ON(extra_checks && chip->can_sleep);
++ chip->set(chip, gpio - chip->base, value);
++}
++EXPORT_SYMBOL_GPL(__gpio_set_value);
++
++/**
++ * __gpio_cansleep() - report whether gpio value access will sleep
++ * @gpio: gpio in question
++ * Context: any
++ *
++ * This is used directly or indirectly to implement gpio_cansleep(). It
++ * returns nonzero if access reading or writing the GPIO value can sleep.
++ */
++int __gpio_cansleep(unsigned gpio)
++{
++ struct gpio_chip *chip;
++
++ /* only call this on GPIOs that are valid! */
++ chip = gpio_to_chip(gpio);
++
++ return chip->can_sleep;
++}
++EXPORT_SYMBOL_GPL(__gpio_cansleep);
++
++
++
++/* There's no value in making it easy to inline GPIO calls that may sleep.
++ * Common examples include ones connected to I2C or SPI chips.
++ */
++
++int gpio_get_value_cansleep(unsigned gpio)
++{
++ struct gpio_chip *chip;
++
++ might_sleep_if(extra_checks);
++ chip = gpio_to_chip(gpio);
++ return chip->get(chip, gpio - chip->base);
++}
++EXPORT_SYMBOL_GPL(gpio_get_value_cansleep);
++
++void gpio_set_value_cansleep(unsigned gpio, int value)
++{
++ struct gpio_chip *chip;
++
++ might_sleep_if(extra_checks);
++ chip = gpio_to_chip(gpio);
++ chip->set(chip, gpio - chip->base, value);
++}
++EXPORT_SYMBOL_GPL(gpio_set_value_cansleep);
++
++
++#ifdef CONFIG_DEBUG_FS
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++
++
++static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
++{
++ unsigned i;
++ unsigned gpio = chip->base;
++ struct gpio_desc *gdesc = &gpio_desc[gpio];
++ int is_out;
++
++ for (i = 0; i < chip->ngpio; i++, gpio++, gdesc++) {
++ if (!test_bit(FLAG_REQUESTED, &gdesc->flags))
++ continue;
++
++ is_out = test_bit(FLAG_IS_OUT, &gdesc->flags);
++ seq_printf(s, " gpio-%-3d (%-12s) %s %s",
++ gpio, gdesc->label,
++ is_out ? "out" : "in ",
++ chip->get
++ ? (chip->get(chip, i) ? "hi" : "lo")
++ : "? ");
++
++ if (!is_out) {
++ int irq = gpio_to_irq(gpio);
++ struct irq_desc *desc = irq_desc + irq;
++
++ /* This races with request_irq(), set_irq_type(),
++ * and set_irq_wake() ... but those are "rare".
++ *
++ * More significantly, trigger type flags aren't
++ * currently maintained by genirq.
++ */
++ if (irq >= 0 && desc->action) {
++ char *trigger;
++
++ switch (desc->status & IRQ_TYPE_SENSE_MASK) {
++ case IRQ_TYPE_NONE:
++ trigger = "(default)";
++ break;
++ case IRQ_TYPE_EDGE_FALLING:
++ trigger = "edge-falling";
++ break;
++ case IRQ_TYPE_EDGE_RISING:
++ trigger = "edge-rising";
++ break;
++ case IRQ_TYPE_EDGE_BOTH:
++ trigger = "edge-both";
++ break;
++ case IRQ_TYPE_LEVEL_HIGH:
++ trigger = "level-high";
++ break;
++ case IRQ_TYPE_LEVEL_LOW:
++ trigger = "level-low";
++ break;
++ default:
++ trigger = "?trigger?";
++ break;
++ }
++
++ seq_printf(s, " irq-%d %s%s",
++ irq, trigger,
++ (desc->status & IRQ_WAKEUP)
++ ? " wakeup" : "");
++ }
++ }
++
++ seq_printf(s, "\n");
++ }
++}
++
++static int gpiolib_show(struct seq_file *s, void *unused)
++{
++ struct gpio_chip *chip = NULL;
++ unsigned gpio;
++ int started = 0;
++
++ /* REVISIT this isn't locked against gpio_chip removal ... */
++
++ for (gpio = 0; gpio < ARCH_NR_GPIOS; gpio++) {
++ if (chip == gpio_desc[gpio].chip)
++ continue;
++ chip = gpio_desc[gpio].chip;
++ if (!chip)
++ continue;
++
++ seq_printf(s, "%sGPIOs %d-%d, %s%s:\n",
++ started ? "\n" : "",
++ chip->base, chip->base + chip->ngpio - 1,
++ chip->label ? : "generic",
++ chip->can_sleep ? ", can sleep" : "");
++ started = 1;
++ if (chip->dbg_show)
++ chip->dbg_show(s, chip);
++ else
++ gpiolib_dbg_show(s, chip);
++ }
++ return 0;
++}
++
++static int gpiolib_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, gpiolib_show, NULL);
++}
++
++static struct file_operations gpiolib_operations = {
++ .open = gpiolib_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int __init gpiolib_debugfs_init(void)
++{
++ /* /sys/kernel/debug/gpio */
++ (void) debugfs_create_file("gpio", S_IFREG | S_IRUGO,
++ NULL, NULL, &gpiolib_operations);
++ return 0;
++}
++subsys_initcall(gpiolib_debugfs_init);
++
++#endif /* DEBUG_FS */
+diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
+index 2d0aab1..f29a502 100644
+--- a/include/asm-generic/gpio.h
++++ b/include/asm-generic/gpio.h
+@@ -1,6 +1,102 @@
+ #ifndef _ASM_GENERIC_GPIO_H
+ #define _ASM_GENERIC_GPIO_H
+
++#ifdef CONFIG_HAVE_GPIO_LIB
++
++/* Platforms may implement their GPIO interface with library code,
++ * at a small performance cost for non-inlined operations and some
++ * extra memory (for code and for per-GPIO table entries).
++ *
++ * While the GPIO programming interface defines valid GPIO numbers
++ * to be in the range 0..MAX_INT, this library restricts them to the
++ * smaller range 0..ARCH_NR_GPIOS.
++ */
++
++#ifndef ARCH_NR_GPIOS
++#define ARCH_NR_GPIOS 256
++#endif
++
++struct seq_file;
++
++/**
++ * struct gpio_chip - abstract a GPIO controller
++ * @label: for diagnostics
++ * @direction_input: configures signal "offset" as input, or returns error
++ * @get: returns value for signal "offset"; for output signals this
++ * returns either the value actually sensed, or zero
++ * @direction_output: configures signal "offset" as output, or returns error
++ * @set: assigns output value for signal "offset"
++ * @dbg_show: optional routine to show contents in debugfs; default code
++ * will be used when this is omitted, but custom code can show extra
++ * state (such as pullup/pulldown configuration).
++ * @base: identifies the first GPIO number handled by this chip; or, if
++ * negative during registration, requests dynamic ID allocation.
++ * @ngpio: the number of GPIOs handled by this controller; the last GPIO
++ * handled is (base + ngpio - 1).
++ * @can_sleep: flag must be set iff get()/set() methods sleep, as they
++ * must while accessing GPIO expander chips over I2C or SPI
++ *
++ * A gpio_chip can help platforms abstract various sources of GPIOs so
++ * they can all be accessed through a common programing interface.
++ * Example sources would be SOC controllers, FPGAs, multifunction
++ * chips, dedicated GPIO expanders, and so on.
++ *
++ * Each chip controls a number of signals, identified in method calls
++ * by "offset" values in the range 0..(@ngpio - 1). When those signals
++ * are referenced through calls like gpio_get_value(gpio), the offset
++ * is calculated by subtracting @base from the gpio number.
++ */
++struct gpio_chip {
++ char *label;
++
++ int (*direction_input)(struct gpio_chip *chip,
++ unsigned offset);
++ int (*get)(struct gpio_chip *chip,
++ unsigned offset);
++ int (*direction_output)(struct gpio_chip *chip,
++ unsigned offset, int value);
++ void (*set)(struct gpio_chip *chip,
++ unsigned offset, int value);
++ void (*dbg_show)(struct seq_file *s,
++ struct gpio_chip *chip);
++ int base;
++ u16 ngpio;
++ unsigned can_sleep:1;
++};
++
++extern const char *gpiochip_is_requested(struct gpio_chip *chip,
++ unsigned offset);
++
++/* add/remove chips */
++extern int gpiochip_add(struct gpio_chip *chip);
++extern int __must_check gpiochip_remove(struct gpio_chip *chip);
++
++
++/* Always use the library code for GPIO management calls,
++ * or when sleeping may be involved.
++ */
++extern int gpio_request(unsigned gpio, const char *label);
++extern void gpio_free(unsigned gpio);
++
++extern int gpio_direction_input(unsigned gpio);
++extern int gpio_direction_output(unsigned gpio, int value);
++
++extern int gpio_get_value_cansleep(unsigned gpio);
++extern void gpio_set_value_cansleep(unsigned gpio, int value);
++
++
++/* A platform's <asm/gpio.h> code may want to inline the I/O calls when
++ * the GPIO is constant and refers to some always-present controller,
++ * giving direct access to chip registers and tight bitbanging loops.
++ */
++extern int __gpio_get_value(unsigned gpio);
++extern void __gpio_set_value(unsigned gpio, int value);
++
++extern int __gpio_cansleep(unsigned gpio);
++
++
++#else
++
+ /* platforms that don't directly support access to GPIOs through I2C, SPI,
+ * or other blocking infrastructure can use these wrappers.
+ */
+@@ -22,4 +118,6 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
+ gpio_set_value(gpio, value);
+ }
+
++#endif
++
+ #endif /* _ASM_GENERIC_GPIO_H */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch
new file mode 100644
index 0000000000..7a37be85cf
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch
@@ -0,0 +1,498 @@
+From 49da9bd487e54164a75503e0037a054cce697ed5 Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <philipp.zabel@gmail.com>
+Date: Tue, 12 Feb 2008 04:38:12 +0300
+Subject: [PATCH 23/64] This adds gpiolib support for the PXA architecture:
+ - move all GPIO API functions from generic.c into gpio.c
+ - convert the gpio_get/set_value macros into inline functions
+
+This makes it easier to hook up GPIOs provided by external chips like
+ASICs and CPLDs.
+
+Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Cc: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/Makefile | 3 +-
+ arch/arm/mach-pxa/generic.c | 93 ----------------
+ arch/arm/mach-pxa/generic.h | 1 +
+ arch/arm/mach-pxa/gpio.c | 197 +++++++++++++++++++++++++++++++++++
+ arch/arm/mach-pxa/irq.c | 2 +
+ include/asm-arm/arch-pxa/gpio.h | 48 ++++-----
+ include/asm-arm/arch-pxa/pxa-regs.h | 13 +++
+ 8 files changed, 236 insertions(+), 122 deletions(-)
+ create mode 100644 arch/arm/mach-pxa/gpio.c
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 06ca241..423e953 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -346,6 +346,7 @@ config ARCH_PXA
+ select GENERIC_TIME
+ select GENERIC_CLOCKEVENTS
+ select TICK_ONESHOT
++ select HAVE_GPIO_LIB
+ help
+ Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index 4263527..5cb0216 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -3,7 +3,8 @@
+ #
+
+ # Common support (must be linked before board specific support)
+-obj-y += clock.o generic.o irq.o dma.o time.o
++obj-y += clock.o generic.o irq.o dma.o \
++ time.o gpio.o
+ obj-$(CONFIG_PXA25x) += pxa25x.o
+ obj-$(CONFIG_PXA27x) += pxa27x.o
+ obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp.o
+diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
+index 1c34946..6c07292 100644
+--- a/arch/arm/mach-pxa/generic.c
++++ b/arch/arm/mach-pxa/generic.c
+@@ -32,7 +32,6 @@
+ #include <asm/mach/map.h>
+
+ #include <asm/arch/pxa-regs.h>
+-#include <asm/arch/gpio.h>
+ #include <asm/arch/udc.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/mmc.h>
+@@ -73,97 +72,6 @@ unsigned int get_memclk_frequency_10khz(void)
+ EXPORT_SYMBOL(get_memclk_frequency_10khz);
+
+ /*
+- * Handy function to set GPIO alternate functions
+- */
+-int pxa_last_gpio;
+-
+-int pxa_gpio_mode(int gpio_mode)
+-{
+- unsigned long flags;
+- int gpio = gpio_mode & GPIO_MD_MASK_NR;
+- int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
+- int gafr;
+-
+- if (gpio > pxa_last_gpio)
+- return -EINVAL;
+-
+- local_irq_save(flags);
+- if (gpio_mode & GPIO_DFLT_LOW)
+- GPCR(gpio) = GPIO_bit(gpio);
+- else if (gpio_mode & GPIO_DFLT_HIGH)
+- GPSR(gpio) = GPIO_bit(gpio);
+- if (gpio_mode & GPIO_MD_MASK_DIR)
+- GPDR(gpio) |= GPIO_bit(gpio);
+- else
+- GPDR(gpio) &= ~GPIO_bit(gpio);
+- gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
+- GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
+- local_irq_restore(flags);
+-
+- return 0;
+-}
+-
+-EXPORT_SYMBOL(pxa_gpio_mode);
+-
+-int gpio_direction_input(unsigned gpio)
+-{
+- unsigned long flags;
+- u32 mask;
+-
+- if (gpio > pxa_last_gpio)
+- return -EINVAL;
+-
+- mask = GPIO_bit(gpio);
+- local_irq_save(flags);
+- GPDR(gpio) &= ~mask;
+- local_irq_restore(flags);
+-
+- return 0;
+-}
+-EXPORT_SYMBOL(gpio_direction_input);
+-
+-int gpio_direction_output(unsigned gpio, int value)
+-{
+- unsigned long flags;
+- u32 mask;
+-
+- if (gpio > pxa_last_gpio)
+- return -EINVAL;
+-
+- mask = GPIO_bit(gpio);
+- local_irq_save(flags);
+- if (value)
+- GPSR(gpio) = mask;
+- else
+- GPCR(gpio) = mask;
+- GPDR(gpio) |= mask;
+- local_irq_restore(flags);
+-
+- return 0;
+-}
+-EXPORT_SYMBOL(gpio_direction_output);
+-
+-/*
+- * Return GPIO level
+- */
+-int pxa_gpio_get_value(unsigned gpio)
+-{
+- return __gpio_get_value(gpio);
+-}
+-
+-EXPORT_SYMBOL(pxa_gpio_get_value);
+-
+-/*
+- * Set output GPIO level
+- */
+-void pxa_gpio_set_value(unsigned gpio, int value)
+-{
+- __gpio_set_value(gpio, value);
+-}
+-
+-EXPORT_SYMBOL(pxa_gpio_set_value);
+-
+-/*
+ * Routine to safely enable or disable a clock in the CKEN
+ */
+ void __pxa_set_cken(int clock, int enable)
+@@ -178,7 +86,6 @@ void __pxa_set_cken(int clock, int enable)
+
+ local_irq_restore(flags);
+ }
+-
+ EXPORT_SYMBOL(__pxa_set_cken);
+
+ /*
+diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
+index b30f240..727a9f5 100644
+--- a/arch/arm/mach-pxa/generic.h
++++ b/arch/arm/mach-pxa/generic.h
+@@ -16,6 +16,7 @@ extern void __init pxa_init_irq_low(void);
+ extern void __init pxa_init_irq_high(void);
+ extern void __init pxa_init_irq_gpio(int gpio_nr);
+ extern void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int));
++extern void __init pxa_init_gpio(int gpio_nr);
+ extern void __init pxa25x_init_irq(void);
+ extern void __init pxa27x_init_irq(void);
+ extern void __init pxa3xx_init_irq(void);
+diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
+new file mode 100644
+index 0000000..8638dd7
+--- /dev/null
++++ b/arch/arm/mach-pxa/gpio.c
+@@ -0,0 +1,197 @@
++/*
++ * linux/arch/arm/mach-pxa/gpio.c
++ *
++ * Generic PXA GPIO handling
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/init.h>
++#include <linux/module.h>
++
++#include <asm/gpio.h>
++#include <asm/hardware.h>
++#include <asm/io.h>
++#include <asm/arch/pxa-regs.h>
++
++#include "generic.h"
++
++
++struct pxa_gpio_chip {
++ struct gpio_chip chip;
++ void __iomem *regbase;
++};
++
++int pxa_last_gpio;
++
++/*
++ * Configure pins for GPIO or other functions
++ */
++int pxa_gpio_mode(int gpio_mode)
++{
++ unsigned long flags;
++ int gpio = gpio_mode & GPIO_MD_MASK_NR;
++ int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
++ int gafr;
++
++ if (gpio > pxa_last_gpio)
++ return -EINVAL;
++
++ local_irq_save(flags);
++ if (gpio_mode & GPIO_DFLT_LOW)
++ GPCR(gpio) = GPIO_bit(gpio);
++ else if (gpio_mode & GPIO_DFLT_HIGH)
++ GPSR(gpio) = GPIO_bit(gpio);
++ if (gpio_mode & GPIO_MD_MASK_DIR)
++ GPDR(gpio) |= GPIO_bit(gpio);
++ else
++ GPDR(gpio) &= ~GPIO_bit(gpio);
++ gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
++ GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
++ local_irq_restore(flags);
++
++ return 0;
++}
++EXPORT_SYMBOL(pxa_gpio_mode);
++
++static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
++{
++ unsigned long flags;
++ u32 mask = 1 << offset;
++ u32 value;
++ struct pxa_gpio_chip *pxa;
++ void __iomem *gpdr;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++ gpdr = pxa->regbase + GPDR_OFFSET;
++ local_irq_save(flags);
++ value = __raw_readl(gpdr);
++ value &= ~mask;
++ __raw_writel(value, gpdr);
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++static int pxa_gpio_direction_output(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ unsigned long flags;
++ u32 mask = 1 << offset;
++ u32 tmp;
++ struct pxa_gpio_chip *pxa;
++ void __iomem *gpdr;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++ __raw_writel(mask,
++ pxa->regbase + (value ? GPSR_OFFSET : GPCR_OFFSET));
++ gpdr = pxa->regbase + GPDR_OFFSET;
++ local_irq_save(flags);
++ tmp = __raw_readl(gpdr);
++ tmp |= mask;
++ __raw_writel(tmp, gpdr);
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++/*
++ * Return GPIO level
++ */
++static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
++{
++ u32 mask = 1 << offset;
++ struct pxa_gpio_chip *pxa;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++ return __raw_readl(pxa->regbase + GPLR_OFFSET) & mask;
++}
++
++/*
++ * Set output GPIO level
++ */
++static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
++{
++ u32 mask = 1 << offset;
++ struct pxa_gpio_chip *pxa;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++
++ if (value)
++ __raw_writel(mask, pxa->regbase + GPSR_OFFSET);
++ else
++ __raw_writel(mask, pxa->regbase + GPCR_OFFSET);
++}
++
++static struct pxa_gpio_chip pxa_gpio_chip[] = {
++ [0] = {
++ .regbase = GPIO0_BASE,
++ .chip = {
++ .label = "gpio-0",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 0,
++ .ngpio = 32,
++ },
++ },
++ [1] = {
++ .regbase = GPIO1_BASE,
++ .chip = {
++ .label = "gpio-1",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 32,
++ .ngpio = 32,
++ },
++ },
++ [2] = {
++ .regbase = GPIO2_BASE,
++ .chip = {
++ .label = "gpio-2",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 64,
++ .ngpio = 32, /* 21 for PXA25x */
++ },
++ },
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++ [3] = {
++ .regbase = GPIO3_BASE,
++ .chip = {
++ .label = "gpio-3",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 96,
++ .ngpio = 32,
++ },
++ },
++#endif
++};
++
++void __init pxa_init_gpio(int gpio_nr)
++{
++ int i;
++
++ /* add a GPIO chip for each register bank.
++ * the last PXA25x register only contains 21 GPIOs
++ */
++ for (i = 0; i < gpio_nr; i += 32) {
++ if (i+32 > gpio_nr)
++ pxa_gpio_chip[i/32].chip.ngpio = gpio_nr - i;
++ gpiochip_add(&pxa_gpio_chip[i/32].chip);
++ }
++}
+diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
+index 07acb45..d0965ef 100644
+--- a/arch/arm/mach-pxa/irq.c
++++ b/arch/arm/mach-pxa/irq.c
+@@ -310,6 +310,8 @@ void __init pxa_init_irq_gpio(int gpio_nr)
+ /* Install handler for GPIO>=2 edge detect interrupts */
+ set_irq_chip(IRQ_GPIO_2_x, &pxa_internal_chip_low);
+ set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);
++
++ pxa_init_gpio(gpio_nr);
+ }
+
+ void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int))
+diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h
+index 9dbc2dc..bdbf5f9 100644
+--- a/include/asm-arm/arch-pxa/gpio.h
++++ b/include/asm-arm/arch-pxa/gpio.h
+@@ -28,43 +28,35 @@
+ #include <asm/irq.h>
+ #include <asm/hardware.h>
+
+-static inline int gpio_request(unsigned gpio, const char *label)
+-{
+- return 0;
+-}
++#include <asm-generic/gpio.h>
+
+-static inline void gpio_free(unsigned gpio)
+-{
+- return;
+-}
+
+-extern int gpio_direction_input(unsigned gpio);
+-extern int gpio_direction_output(unsigned gpio, int value);
++/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
++ * Those cases currently cause holes in the GPIO number space.
++ */
++#define NR_BUILTIN_GPIO 128
+
+-static inline int __gpio_get_value(unsigned gpio)
++static inline int gpio_get_value(unsigned gpio)
+ {
+- return GPLR(gpio) & GPIO_bit(gpio);
++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
++ return GPLR(gpio) & GPIO_bit(gpio);
++ else
++ return __gpio_get_value(gpio);
+ }
+
+-#define gpio_get_value(gpio) \
+- (__builtin_constant_p(gpio) ? \
+- __gpio_get_value(gpio) : \
+- pxa_gpio_get_value(gpio))
+-
+-static inline void __gpio_set_value(unsigned gpio, int value)
++static inline void gpio_set_value(unsigned gpio, int value)
+ {
+- if (value)
+- GPSR(gpio) = GPIO_bit(gpio);
+- else
+- GPCR(gpio) = GPIO_bit(gpio);
++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
++ if (value)
++ GPSR(gpio) = GPIO_bit(gpio);
++ else
++ GPCR(gpio) = GPIO_bit(gpio);
++ } else {
++ __gpio_set_value(gpio, value);
++ }
+ }
+
+-#define gpio_set_value(gpio,value) \
+- (__builtin_constant_p(gpio) ? \
+- __gpio_set_value(gpio, value) : \
+- pxa_gpio_set_value(gpio, value))
+-
+-#include <asm-generic/gpio.h> /* cansleep wrappers */
++#define gpio_cansleep __gpio_cansleep
+
+ #define gpio_to_irq(gpio) IRQ_GPIO(gpio)
+ #define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
+diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
+index 1bd398d..bd57417 100644
+--- a/include/asm-arm/arch-pxa/pxa-regs.h
++++ b/include/asm-arm/arch-pxa/pxa-regs.h
+@@ -1131,6 +1131,19 @@
+ * General Purpose I/O
+ */
+
++#define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000))
++#define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004))
++#define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008))
++#define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100))
++
++#define GPLR_OFFSET 0x00
++#define GPDR_OFFSET 0x0C
++#define GPSR_OFFSET 0x18
++#define GPCR_OFFSET 0x24
++#define GRER_OFFSET 0x30
++#define GFER_OFFSET 0x3C
++#define GEDR_OFFSET 0x48
++
+ #define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */
+ #define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */
+ #define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch
new file mode 100644
index 0000000000..e460379de6
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch
@@ -0,0 +1,238 @@
+From 7ba82399f2d2df6114ad552999f2e1b9a19cb47a Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Sat, 19 Jan 2008 19:41:18 +0300
+Subject: [PATCH 24/64] Update Documentation/gpio.txt, primarily to include the new "gpiolib"
+ infrastructure.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Philipp Zabel <philipp.zabel@gmail.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ Documentation/gpio.txt | 133 +++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 121 insertions(+), 12 deletions(-)
+
+diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
+index 6bc2ba2..8da724e 100644
+--- a/Documentation/gpio.txt
++++ b/Documentation/gpio.txt
+@@ -32,7 +32,7 @@ The exact capabilities of GPIOs vary between systems. Common options:
+ - Input values are likewise readable (1, 0). Some chips support readback
+ of pins configured as "output", which is very useful in such "wire-OR"
+ cases (to support bidirectional signaling). GPIO controllers may have
+- input de-glitch logic, sometimes with software controls.
++ input de-glitch/debounce logic, sometimes with software controls.
+
+ - Inputs can often be used as IRQ signals, often edge triggered but
+ sometimes level triggered. Such IRQs may be configurable as system
+@@ -60,10 +60,13 @@ used on a board that's wired differently. Only least-common-denominator
+ functionality can be very portable. Other features are platform-specific,
+ and that can be critical for glue logic.
+
+-Plus, this doesn't define an implementation framework, just an interface.
++Plus, this doesn't require any implementation framework, just an interface.
+ One platform might implement it as simple inline functions accessing chip
+ registers; another might implement it by delegating through abstractions
+-used for several very different kinds of GPIO controller.
++used for several very different kinds of GPIO controller. (There is some
++optional code supporting such an implementation strategy, described later
++in this document, but drivers acting as clients to the GPIO interface must
++not care how it's implemented.)
+
+ That said, if the convention is supported on their platform, drivers should
+ use it when possible. Platforms should declare GENERIC_GPIO support in
+@@ -121,6 +124,11 @@ before tasking is enabled, as part of early board setup.
+ For output GPIOs, the value provided becomes the initial output value.
+ This helps avoid signal glitching during system startup.
+
++For compatibility with legacy interfaces to GPIOs, setting the direction
++of a GPIO implicitly requests that GPIO (see below) if it has not been
++requested already. That compatibility may be removed in the future;
++explicitly requesting GPIOs is strongly preferred.
++
+ Setting the direction can fail if the GPIO number is invalid, or when
+ that particular GPIO can't be used in that mode. It's generally a bad
+ idea to rely on boot firmware to have set the direction correctly, since
+@@ -133,6 +141,7 @@ Spinlock-Safe GPIO access
+ -------------------------
+ Most GPIO controllers can be accessed with memory read/write instructions.
+ That doesn't need to sleep, and can safely be done from inside IRQ handlers.
++(That includes hardirq contexts on RT kernels.)
+
+ Use these calls to access such GPIOs:
+
+@@ -145,7 +154,7 @@ Use these calls to access such GPIOs:
+ The values are boolean, zero for low, nonzero for high. When reading the
+ value of an output pin, the value returned should be what's seen on the
+ pin ... that won't always match the specified output value, because of
+-issues including wire-OR and output latencies.
++issues including open-drain signaling and output latencies.
+
+ The get/set calls have no error returns because "invalid GPIO" should have
+ been reported earlier from gpio_direction_*(). However, note that not all
+@@ -170,7 +179,8 @@ get to the head of a queue to transmit a command and get its response.
+ This requires sleeping, which can't be done from inside IRQ handlers.
+
+ Platforms that support this type of GPIO distinguish them from other GPIOs
+-by returning nonzero from this call:
++by returning nonzero from this call (which requires a valid GPIO number,
++either explicitly or implicitly requested):
+
+ int gpio_cansleep(unsigned gpio);
+
+@@ -209,8 +219,11 @@ before tasking is enabled, as part of early board setup.
+ These calls serve two basic purposes. One is marking the signals which
+ are actually in use as GPIOs, for better diagnostics; systems may have
+ several hundred potential GPIOs, but often only a dozen are used on any
+-given board. Another is to catch conflicts between drivers, reporting
+-errors when drivers wrongly think they have exclusive use of that signal.
++given board. Another is to catch conflicts, identifying errors when
++(a) two or more drivers wrongly think they have exclusive use of that
++signal, or (b) something wrongly believes it's safe to remove drivers
++needed to manage a signal that's in active use. That is, requesting a
++GPIO can serve as a kind of lock.
+
+ These two calls are optional because not not all current Linux platforms
+ offer such functionality in their GPIO support; a valid implementation
+@@ -223,6 +236,9 @@ Note that requesting a GPIO does NOT cause it to be configured in any
+ way; it just marks that GPIO as in use. Separate code must handle any
+ pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown).
+
++Also note that it's your responsibility to have stopped using a GPIO
++before you free it.
++
+
+ GPIOs mapped to IRQs
+ --------------------
+@@ -238,7 +254,7 @@ map between them using calls like:
+
+ Those return either the corresponding number in the other namespace, or
+ else a negative errno code if the mapping can't be done. (For example,
+-some GPIOs can't used as IRQs.) It is an unchecked error to use a GPIO
++some GPIOs can't be used as IRQs.) It is an unchecked error to use a GPIO
+ number that wasn't set up as an input using gpio_direction_input(), or
+ to use an IRQ number that didn't originally come from gpio_to_irq().
+
+@@ -299,17 +315,110 @@ Related to multiplexing is configuration and enabling of the pullups or
+ pulldowns integrated on some platforms. Not all platforms support them,
+ or support them in the same way; and any given board might use external
+ pullups (or pulldowns) so that the on-chip ones should not be used.
++(When a circuit needs 5 kOhm, on-chip 100 kOhm resistors won't do.)
+
+ There are other system-specific mechanisms that are not specified here,
+ like the aforementioned options for input de-glitching and wire-OR output.
+ Hardware may support reading or writing GPIOs in gangs, but that's usually
+ configuration dependent: for GPIOs sharing the same bank. (GPIOs are
+ commonly grouped in banks of 16 or 32, with a given SOC having several such
+-banks.) Some systems can trigger IRQs from output GPIOs. Code relying on
+-such mechanisms will necessarily be nonportable.
++banks.) Some systems can trigger IRQs from output GPIOs, or read values
++from pins not managed as GPIOs. Code relying on such mechanisms will
++necessarily be nonportable.
+
+-Dynamic definition of GPIOs is not currently supported; for example, as
++Dynamic definition of GPIOs is not currently standard; for example, as
+ a side effect of configuring an add-on board with some GPIO expanders.
+
+ These calls are purely for kernel space, but a userspace API could be built
+-on top of it.
++on top of them.
++
++
++GPIO implementor's framework (OPTIONAL)
++=======================================
++As noted earlier, there is an optional implementation framework making it
++easier for platforms to support different kinds of GPIO controller using
++the same programming interface.
++
++As a debugging aid, if debugfs is available a /sys/kernel/debug/gpio file
++will be found there. That will list all the controllers registered through
++this framework, and the state of the GPIOs currently in use.
++
++
++Controller Drivers: gpio_chip
++-----------------------------
++In this framework each GPIO controller is packaged as a "struct gpio_chip"
++with information common to each controller of that type:
++
++ - methods to establish GPIO direction
++ - methods used to access GPIO values
++ - flag saying whether calls to its methods may sleep
++ - optional debugfs dump method (showing extra state like pullup config)
++ - label for diagnostics
++
++There is also per-instance data, which may come from device.platform_data:
++the number of its first GPIO, and how many GPIOs it exposes.
++
++The code implementing a gpio_chip should support multiple instances of the
++controller, possibly using the driver model. That code will configure each
++gpio_chip and issue gpiochip_add(). Removing a GPIO controller should be
++rare; use gpiochip_remove() when it is unavoidable.
++
++Most often a gpio_chip is part of an instance-specific structure with state
++not exposed by the GPIO interfaces, such as addressing, power management,
++and more. Chips such as codecs will have complex non-GPIO state,
++
++Any debugfs dump method should normally ignore signals which haven't been
++requested as GPIOs. They can use gpiochip_is_requested(), which returns
++either NULL or the label associated with that GPIO when it was requested.
++
++
++Platform Support
++----------------
++To support this framework, a platform's Kconfig will "select HAVE_GPIO_LIB"
++and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
++three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
++They may also want to provide a custom value for ARCH_NR_GPIOS.
++
++Trivial implementations of those functions can directly use framework
++code, which always dispatches through the gpio_chip:
++
++ #define gpio_get_value __gpio_get_value
++ #define gpio_set_value __gpio_set_value
++ #define gpio_cansleep __gpio_cansleep
++
++Fancier implementations could instead define those as inline functions with
++logic optimizing access to specific SOC-based GPIOs. For example, if the
++referenced GPIO is the constant "12", getting or setting its value could
++cost as little as two or three instructions, never sleeping. When such an
++optimization is not possible those calls must delegate to the framework
++code, costing at least a few dozen instructions. For bitbanged I/O, such
++instruction savings can be significant.
++
++For SOCs, platform-specific code defines and registers gpio_chip instances
++for each bank of on-chip GPIOs. Those GPIOs should be numbered/labeled to
++match chip vendor documentation, and directly match board schematics. They
++may well start at zero and go up to a platform-specific limit. Such GPIOs
++are normally integrated into platform initialization to make them always be
++available, from arch_initcall() or earlier; they can often serve as IRQs.
++
++
++Board Support
++-------------
++For external GPIO controllers -- such as I2C or SPI expanders, ASICs, multi
++function devices, FPGAs or CPLDs -- most often board-specific code handles
++registering controller devices and ensures that their drivers know what GPIO
++numbers to use with gpiochip_add(). Their numbers often start right after
++platform-specific GPIOs.
++
++For example, board setup code could create structures identifying the range
++of GPIOs that chip will expose, and passes them to each GPIO expander chip
++using platform_data. Then the chip driver's probe() routine could pass that
++data to gpiochip_add().
++
++Initialization order can be important. For example, when a device relies on
++an I2C-based GPIO, its probe() routine should only be called after that GPIO
++becomes available. That may mean the device should not be registered until
++calls for that GPIO can work. One way to address such dependencies is for
++such gpio_chip controllers to provide setup() and teardown() callbacks to
++board specific code; those board specific callbacks would register devices
++once all the necessary resources are available.
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch
new file mode 100644
index 0000000000..84d0fd3e19
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch
@@ -0,0 +1,434 @@
+From 39717c1328f6aa13330eded0e0e268993cfd1eea Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Tue, 12 Feb 2008 10:39:53 +0300
+Subject: [PATCH 25/64] Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+
+---
+ arch/arm/mach-pxa/Makefile | 2 +-
+ arch/arm/mach-pxa/devices.c | 401 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 402 insertions(+), 1 deletions(-)
+ create mode 100644 arch/arm/mach-pxa/devices.c
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index 5cb0216..f276d24 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -4,7 +4,7 @@
+
+ # Common support (must be linked before board specific support)
+ obj-y += clock.o generic.o irq.o dma.o \
+- time.o gpio.o
++ time.o gpio.o devices.o
+ obj-$(CONFIG_PXA25x) += pxa25x.o
+ obj-$(CONFIG_PXA27x) += pxa27x.o
+ obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp.o
+diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
+new file mode 100644
+index 0000000..928131a
+--- /dev/null
++++ b/arch/arm/mach-pxa/devices.c
+@@ -0,0 +1,401 @@
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/dma-mapping.h>
++
++#include <asm/arch/gpio.h>
++#include <asm/arch/udc.h>
++#include <asm/arch/pxafb.h>
++#include <asm/arch/mmc.h>
++#include <asm/arch/irda.h>
++#include <asm/arch/i2c.h>
++#include <asm/arch/ohci.h>
++
++#include "devices.h"
++
++#ifdef CONFIG_PXA25x
++
++static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa25x_resource_ssp[] = {
++ [0] = {
++ .start = 0x41000000,
++ .end = 0x4100001f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP,
++ .end = IRQ_SSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 13,
++ .end = 13,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 14,
++ .end = 14,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa25x_device_ssp = {
++ .name = "pxa25x-ssp",
++ .id = 0,
++ .dev = {
++ .dma_mask = &pxa25x_ssp_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa25x_resource_ssp,
++ .num_resources = ARRAY_SIZE(pxa25x_resource_ssp),
++};
++
++static u64 pxa25x_nssp_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa25x_resource_nssp[] = {
++ [0] = {
++ .start = 0x41400000,
++ .end = 0x4140002f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_NSSP,
++ .end = IRQ_NSSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 15,
++ .end = 15,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 16,
++ .end = 16,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa25x_device_nssp = {
++ .name = "pxa25x-nssp",
++ .id = 1,
++ .dev = {
++ .dma_mask = &pxa25x_nssp_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa25x_resource_nssp,
++ .num_resources = ARRAY_SIZE(pxa25x_resource_nssp),
++};
++
++static u64 pxa25x_assp_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa25x_resource_assp[] = {
++ [0] = {
++ .start = 0x41500000,
++ .end = 0x4150002f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_ASSP,
++ .end = IRQ_ASSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 23,
++ .end = 23,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 24,
++ .end = 24,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa25x_device_assp = {
++ /* ASSP is basically equivalent to NSSP */
++ .name = "pxa25x-nssp",
++ .id = 2,
++ .dev = {
++ .dma_mask = &pxa25x_assp_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa25x_resource_assp,
++ .num_resources = ARRAY_SIZE(pxa25x_resource_assp),
++};
++#endif /* CONFIG_PXA25x */
++
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++
++static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ohci[] = {
++ [0] = {
++ .start = 0x4C000000,
++ .end = 0x4C00ff6f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_USBH1,
++ .end = IRQ_USBH1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device pxa27x_device_ohci = {
++ .name = "pxa27x-ohci",
++ .id = -1,
++ .dev = {
++ .dma_mask = &pxa27x_ohci_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ohci),
++ .resource = pxa27x_resource_ohci,
++};
++
++void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
++{
++ pxa_register_device(&pxa27x_device_ohci, info);
++}
++
++static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ssp1[] = {
++ [0] = {
++ .start = 0x41000000,
++ .end = 0x4100003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP,
++ .end = IRQ_SSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 13,
++ .end = 13,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 14,
++ .end = 14,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa27x_device_ssp1 = {
++ .name = "pxa27x-ssp",
++ .id = 0,
++ .dev = {
++ .dma_mask = &pxa27x_ssp1_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa27x_resource_ssp1,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1),
++};
++
++static u64 pxa27x_ssp2_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ssp2[] = {
++ [0] = {
++ .start = 0x41700000,
++ .end = 0x4170003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP2,
++ .end = IRQ_SSP2,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 15,
++ .end = 15,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 16,
++ .end = 16,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa27x_device_ssp2 = {
++ .name = "pxa27x-ssp",
++ .id = 1,
++ .dev = {
++ .dma_mask = &pxa27x_ssp2_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa27x_resource_ssp2,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2),
++};
++
++static u64 pxa27x_ssp3_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ssp3[] = {
++ [0] = {
++ .start = 0x41900000,
++ .end = 0x4190003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP3,
++ .end = IRQ_SSP3,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 66,
++ .end = 66,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 67,
++ .end = 67,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa27x_device_ssp3 = {
++ .name = "pxa27x-ssp",
++ .id = 2,
++ .dev = {
++ .dma_mask = &pxa27x_ssp3_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa27x_resource_ssp3,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
++};
++#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
++
++#ifdef CONFIG_PXA3xx
++static u64 pxa3xx_ssp4_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa3xx_resource_ssp4[] = {
++ [0] = {
++ .start = 0x41a00000,
++ .end = 0x41a0003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP4,
++ .end = IRQ_SSP4,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 2,
++ .end = 2,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 3,
++ .end = 3,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa3xx_device_ssp4 = {
++ /* PXA3xx SSP is basically equivalent to PXA27x */
++ .name = "pxa27x-ssp",
++ .id = 3,
++ .dev = {
++ .dma_mask = &pxa3xx_ssp4_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa3xx_resource_ssp4,
++ .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
++};
++
++static struct resource pxa3xx_resources_mci2[] = {
++ [0] = {
++ .start = 0x42000000,
++ .end = 0x42000fff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_MMC2,
++ .end = IRQ_MMC2,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = 93,
++ .end = 93,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ .start = 94,
++ .end = 94,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa3xx_device_mci2 = {
++ .name = "pxa2xx-mci",
++ .id = 1,
++ .dev = {
++ .dma_mask = &pxamci_dmamask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(pxa3xx_resources_mci2),
++ .resource = pxa3xx_resources_mci2,
++};
++
++void __init pxa3xx_set_mci2_info(struct pxamci_platform_data *info)
++{
++ pxa_register_device(&pxa3xx_device_mci2, info);
++}
++
++static struct resource pxa3xx_resources_mci3[] = {
++ [0] = {
++ .start = 0x42500000,
++ .end = 0x42500fff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_MMC3,
++ .end = IRQ_MMC3,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = 100,
++ .end = 100,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ .start = 101,
++ .end = 101,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa3xx_device_mci3 = {
++ .name = "pxa2xx-mci",
++ .id = 2,
++ .dev = {
++ .dma_mask = &pxamci_dmamask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(pxa3xx_resources_mci3),
++ .resource = pxa3xx_resources_mci3,
++};
++
++void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
++{
++ pxa_register_device(&pxa3xx_device_mci3, info);
++}
++
++#endif /* CONFIG_PXA3xx */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch
new file mode 100644
index 0000000000..e1323e4edc
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch
@@ -0,0 +1,134 @@
+From cbe46408b666983284e8be290950d526dbc0f0a4 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:16 +0300
+Subject: [PATCH 26/64] I don't think we should check for IRQs when determining which one
+ of power supplies to register. Better use is_{ac,usb}_online
+ callbacks, this will not produce an obstacle to implement polling --
+ when irqs aren't mandatory. I'll send my two pending patches to show
+ the idea.
+
+For this particular issue, I think something like that should work.
+If it works for you, I'll commit that version, preserving your
+authorship, of course.
+---
+ drivers/power/pda_power.c | 80 ++++++++++++++++++++++++--------------------
+ 1 files changed, 44 insertions(+), 36 deletions(-)
+
+diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
+index c058f28..d98622f 100644
+--- a/drivers/power/pda_power.c
++++ b/drivers/power/pda_power.c
+@@ -168,66 +168,74 @@ static int pda_power_probe(struct platform_device *pdev)
+ pda_power_supplies[1].num_supplicants = pdata->num_supplicants;
+ }
+
+- ret = power_supply_register(&pdev->dev, &pda_power_supplies[0]);
+- if (ret) {
+- dev_err(dev, "failed to register %s power supply\n",
+- pda_power_supplies[0].name);
+- goto supply0_failed;
+- }
++ if (pdata->is_ac_online) {
++ ret = power_supply_register(&pdev->dev, &pda_power_supplies[0]);
++ if (ret) {
++ dev_err(dev, "failed to register %s power supply\n",
++ pda_power_supplies[0].name);
++ goto ac_supply_failed;
++ }
+
+- ret = power_supply_register(&pdev->dev, &pda_power_supplies[1]);
+- if (ret) {
+- dev_err(dev, "failed to register %s power supply\n",
+- pda_power_supplies[1].name);
+- goto supply1_failed;
++ if (ac_irq) {
++ ret = request_irq(ac_irq->start, power_changed_isr,
++ get_irq_flags(ac_irq), ac_irq->name,
++ &pda_power_supplies[0]);
++ if (ret) {
++ dev_err(dev, "request ac irq failed\n");
++ goto ac_irq_failed;
++ }
++ }
+ }
+
+- if (ac_irq) {
+- ret = request_irq(ac_irq->start, power_changed_isr,
+- get_irq_flags(ac_irq), ac_irq->name,
+- &pda_power_supplies[0]);
++ if (pdata->is_usb_online) {
++ ret = power_supply_register(&pdev->dev, &pda_power_supplies[1]);
+ if (ret) {
+- dev_err(dev, "request ac irq failed\n");
+- goto ac_irq_failed;
++ dev_err(dev, "failed to register %s power supply\n",
++ pda_power_supplies[1].name);
++ goto usb_supply_failed;
+ }
+- }
+
+- if (usb_irq) {
+- ret = request_irq(usb_irq->start, power_changed_isr,
+- get_irq_flags(usb_irq), usb_irq->name,
+- &pda_power_supplies[1]);
+- if (ret) {
+- dev_err(dev, "request usb irq failed\n");
+- goto usb_irq_failed;
++ if (usb_irq) {
++ ret = request_irq(usb_irq->start, power_changed_isr,
++ get_irq_flags(usb_irq),
++ usb_irq->name,
++ &pda_power_supplies[1]);
++ if (ret) {
++ dev_err(dev, "request usb irq failed\n");
++ goto usb_irq_failed;
++ }
+ }
+ }
+
+- goto success;
++ return 0;
+
+ usb_irq_failed:
+- if (ac_irq)
++ if (pdata->is_usb_online)
++ power_supply_unregister(&pda_power_supplies[1]);
++usb_supply_failed:
++ if (pdata->is_ac_online && ac_irq)
+ free_irq(ac_irq->start, &pda_power_supplies[0]);
+ ac_irq_failed:
+- power_supply_unregister(&pda_power_supplies[1]);
+-supply1_failed:
+- power_supply_unregister(&pda_power_supplies[0]);
+-supply0_failed:
++ if (pdata->is_ac_online)
++ power_supply_unregister(&pda_power_supplies[0]);
++ac_supply_failed:
+ noirqs:
+ wrongid:
+-success:
+ return ret;
+ }
+
+ static int pda_power_remove(struct platform_device *pdev)
+ {
+- if (usb_irq)
++ if (pdata->is_usb_online && usb_irq)
+ free_irq(usb_irq->start, &pda_power_supplies[1]);
+- if (ac_irq)
++ if (pdata->is_ac_online && ac_irq)
+ free_irq(ac_irq->start, &pda_power_supplies[0]);
+ del_timer_sync(&charger_timer);
+ del_timer_sync(&supply_timer);
+- power_supply_unregister(&pda_power_supplies[1]);
+- power_supply_unregister(&pda_power_supplies[0]);
++ if (pdata->is_usb_online)
++ power_supply_unregister(&pda_power_supplies[1]);
++ if (pdata->is_ac_online)
++ power_supply_unregister(&pda_power_supplies[0]);
+ return 0;
+ }
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch
new file mode 100644
index 0000000000..240d2d0bd9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch
@@ -0,0 +1,59 @@
+From e5e9808fd5ed9cb54dd9da9fb91b32c4f7e9da52 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:17 +0300
+Subject: [PATCH 27/64] Add LiMn (one of the most common for small non-rechargable batteries)i
+ battery technology and voltage_min/_max properties support.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/power_supply_sysfs.c | 5 ++++-
+ include/linux/power_supply.h | 3 +++
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
+index 249f61b..45d2f95 100644
+--- a/drivers/power/power_supply_sysfs.c
++++ b/drivers/power/power_supply_sysfs.c
+@@ -46,7 +46,8 @@ static ssize_t power_supply_show_property(struct device *dev,
+ "Unspecified failure"
+ };
+ static char *technology_text[] = {
+- "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd"
++ "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd",
++ "LiMn"
+ };
+ static char *capacity_level_text[] = {
+ "Unknown", "Critical", "Low", "Normal", "High", "Full"
+@@ -88,6 +89,8 @@ static struct device_attribute power_supply_attrs[] = {
+ POWER_SUPPLY_ATTR(present),
+ POWER_SUPPLY_ATTR(online),
+ POWER_SUPPLY_ATTR(technology),
++ POWER_SUPPLY_ATTR(voltage_max),
++ POWER_SUPPLY_ATTR(voltage_min),
+ POWER_SUPPLY_ATTR(voltage_max_design),
+ POWER_SUPPLY_ATTR(voltage_min_design),
+ POWER_SUPPLY_ATTR(voltage_now),
+diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
+index 606c095..cdbc5b8 100644
+--- a/include/linux/power_supply.h
++++ b/include/linux/power_supply.h
+@@ -54,6 +54,7 @@ enum {
+ POWER_SUPPLY_TECHNOLOGY_LIPO,
+ POWER_SUPPLY_TECHNOLOGY_LiFe,
+ POWER_SUPPLY_TECHNOLOGY_NiCd,
++ POWER_SUPPLY_TECHNOLOGY_LiMn,
+ };
+
+ enum {
+@@ -72,6 +73,8 @@ enum power_supply_property {
+ POWER_SUPPLY_PROP_PRESENT,
+ POWER_SUPPLY_PROP_ONLINE,
+ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN,
+ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+ POWER_SUPPLY_PROP_VOLTAGE_NOW,
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch
new file mode 100644
index 0000000000..ac5df97dff
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch
@@ -0,0 +1,72 @@
+From df0801d2cd6a7081700c79f437d1185cbe1960a7 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:18 +0300
+Subject: [PATCH 28/64] Add suspend/resume/wakeup support for pda_power.
+ Now with device_init_wakeup.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/pda_power.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 files changed, 34 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
+index d98622f..28360e8 100644
+--- a/drivers/power/pda_power.c
++++ b/drivers/power/pda_power.c
+@@ -207,6 +207,8 @@ static int pda_power_probe(struct platform_device *pdev)
+ }
+ }
+
++ device_init_wakeup(&pdev->dev, 1);
++
+ return 0;
+
+ usb_irq_failed:
+@@ -239,12 +241,44 @@ static int pda_power_remove(struct platform_device *pdev)
+ return 0;
+ }
+
++#ifdef CONFIG_PM
++static int pda_power_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ if (device_may_wakeup(&pdev->dev)) {
++ if (ac_irq)
++ enable_irq_wake(ac_irq->start);
++ if (usb_irq)
++ enable_irq_wake(usb_irq->start);
++ }
++
++ return 0;
++}
++
++static int pda_power_resume(struct platform_device *pdev)
++{
++ if (device_may_wakeup(&pdev->dev)) {
++ if (usb_irq)
++ disable_irq_wake(usb_irq->start);
++ if (ac_irq)
++ disable_irq_wake(ac_irq->start);
++ }
++
++ return 0;
++}
++#else
++#define pda_power_suspend NULL
++#define pda_power_resume NULL
++#endif
++
++
+ static struct platform_driver pda_power_pdrv = {
+ .driver = {
+ .name = "pda-power",
+ },
+ .probe = pda_power_probe,
+ .remove = pda_power_remove,
++ .suspend = pda_power_suspend,
++ .resume = pda_power_resume,
+ };
+
+ static int __init pda_power_init(void)
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch
new file mode 100644
index 0000000000..7347fd5a00
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch
@@ -0,0 +1,163 @@
+From 57d1450b4e5f27fa78c75895dc30213bde7191bc Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:18 +0300
+Subject: [PATCH 29/64] Support using VOLTAGE_* properties for apm calculations. It's pretty
+ dummy, but useful for batteries for which we can only get voltages.
+
+---
+ drivers/power/apm_power.c | 63 ++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 51 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c
+index bbf3ee1..526c96e 100644
+--- a/drivers/power/apm_power.c
++++ b/drivers/power/apm_power.c
+@@ -13,6 +13,12 @@
+ #include <linux/power_supply.h>
+ #include <linux/apm-emulation.h>
+
++typedef enum {
++ SOURCE_ENERGY,
++ SOURCE_CHARGE,
++ SOURCE_VOLTAGE,
++} apm_source;
++
+ #define PSY_PROP(psy, prop, val) psy->get_property(psy, \
+ POWER_SUPPLY_PROP_##prop, val)
+
+@@ -87,7 +93,7 @@ static void find_main_battery(void)
+ }
+ }
+
+-static int calculate_time(int status, int using_charge)
++static int calculate_time(int status, apm_source source)
+ {
+ union power_supply_propval full;
+ union power_supply_propval empty;
+@@ -106,20 +112,34 @@ static int calculate_time(int status, int using_charge)
+ return -1;
+ }
+
+- if (using_charge) {
++ switch (source) {
++ case SOURCE_CHARGE:
+ full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;
+ full_design_prop = POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN;
+ empty_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ empty_design_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ cur_avg_prop = POWER_SUPPLY_PROP_CHARGE_AVG;
+ cur_now_prop = POWER_SUPPLY_PROP_CHARGE_NOW;
+- } else {
++ break;
++ case SOURCE_ENERGY:
+ full_prop = POWER_SUPPLY_PROP_ENERGY_FULL;
+ full_design_prop = POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN;
+ empty_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY;
+ empty_design_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ cur_avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
+ cur_now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
++ break;
++ case SOURCE_VOLTAGE:
++ full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
++ full_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN;
++ empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
++ empty_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN;
++ cur_avg_prop = POWER_SUPPLY_PROP_VOLTAGE_AVG;
++ cur_now_prop = POWER_SUPPLY_PROP_VOLTAGE_NOW;
++ break;
++ default:
++ printk(KERN_ERR "Unsupported source: %d\n", source);
++ return -1;
+ }
+
+ if (_MPSY_PROP(full_prop, &full)) {
+@@ -146,7 +166,7 @@ static int calculate_time(int status, int using_charge)
+ return -((cur.intval - empty.intval) * 60L) / I.intval;
+ }
+
+-static int calculate_capacity(int using_charge)
++static int calculate_capacity(apm_source source)
+ {
+ enum power_supply_property full_prop, empty_prop;
+ enum power_supply_property full_design_prop, empty_design_prop;
+@@ -154,20 +174,33 @@ static int calculate_capacity(int using_charge)
+ union power_supply_propval empty, full, cur;
+ int ret;
+
+- if (using_charge) {
++ switch (source) {
++ case SOURCE_CHARGE:
+ full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;
+ empty_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ full_design_prop = POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN;
+ empty_design_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN;
+ now_prop = POWER_SUPPLY_PROP_CHARGE_NOW;
+ avg_prop = POWER_SUPPLY_PROP_CHARGE_AVG;
+- } else {
++ break;
++ case SOURCE_ENERGY:
+ full_prop = POWER_SUPPLY_PROP_ENERGY_FULL;
+ empty_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY;
+ full_design_prop = POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN;
+ empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN;
+ now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
+ avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
++ case SOURCE_VOLTAGE:
++ full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
++ empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
++ full_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN;
++ empty_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN;
++ now_prop = POWER_SUPPLY_PROP_VOLTAGE_NOW;
++ avg_prop = POWER_SUPPLY_PROP_VOLTAGE_AVG;
++ break;
++ default:
++ printk(KERN_ERR "Unsupported source: %d\n", source);
++ return -1;
+ }
+
+ if (_MPSY_PROP(full_prop, &full)) {
+@@ -234,10 +267,12 @@ static void apm_battery_apm_get_power_status(struct apm_power_info *info)
+ info->battery_life = capacity.intval;
+ } else {
+ /* try calculate using energy */
+- info->battery_life = calculate_capacity(0);
++ info->battery_life = calculate_capacity(SOURCE_ENERGY);
+ /* if failed try calculate using charge instead */
+ if (info->battery_life == -1)
+- info->battery_life = calculate_capacity(1);
++ info->battery_life = calculate_capacity(SOURCE_CHARGE);
++ if (info->battery_life == -1)
++ info->battery_life = calculate_capacity(SOURCE_VOLTAGE);
+ }
+
+ /* charging status */
+@@ -263,18 +298,22 @@ static void apm_battery_apm_get_power_status(struct apm_power_info *info)
+ !MPSY_PROP(TIME_TO_FULL_NOW, &time_to_full)) {
+ info->time = time_to_full.intval / 60;
+ } else {
+- info->time = calculate_time(status.intval, 0);
++ info->time = calculate_time(status.intval, SOURCE_ENERGY);
+ if (info->time == -1)
+- info->time = calculate_time(status.intval, 1);
++ info->time = calculate_time(status.intval, SOURCE_CHARGE);
++ if (info->time == -1)
++ info->time = calculate_time(status.intval, SOURCE_VOLTAGE);
+ }
+ } else {
+ if (!MPSY_PROP(TIME_TO_EMPTY_AVG, &time_to_empty) ||
+ !MPSY_PROP(TIME_TO_EMPTY_NOW, &time_to_empty)) {
+ info->time = time_to_empty.intval / 60;
+ } else {
+- info->time = calculate_time(status.intval, 0);
++ info->time = calculate_time(status.intval, SOURCE_ENERGY);
++ if (info->time == -1)
++ info->time = calculate_time(status.intval, SOURCE_CHARGE);
+ if (info->time == -1)
+- info->time = calculate_time(status.intval, 1);
++ info->time = calculate_time(status.intval, SOURCE_VOLTAGE);
+ }
+ }
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch
new file mode 100644
index 0000000000..1c86a39c74
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch
@@ -0,0 +1,1083 @@
+From d3e044e0e10e6c6b75716cb927e92b4ec284132f Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:20 +0300
+Subject: [PATCH 30/64] Core driver for WM97xx touchscreens
+
+This patch series adds support for the touchscreen controllers provided
+by Wolfson Microelectronics WM97xx series chips in both polled and
+streaming modes.
+
+These drivers have been maintained out of tree since 2003. During that
+time the driver the primary maintainer was Liam Girdwood and a number of
+people have made contributions including Stanley Cai, Rodolfo Giometti,
+Russell King, Marc Kleine-Budde, Ian Molton, Vincent Sanders, Andrew
+Zabolotny, Graeme Gregory, Mike Arthur and myself. Apologies to anyone
+I have omitted.
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vincent Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm97xx-core.c | 724 +++++++++++++++++++++++++++++++
+ include/linux/wm97xx.h | 309 +++++++++++++
+ 2 files changed, 1033 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm97xx-core.c
+ create mode 100644 include/linux/wm97xx.h
+
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+new file mode 100644
+index 0000000..27a0a99
+--- /dev/null
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -0,0 +1,724 @@
++/*
++ * wm97xx-core.c -- Touch screen driver core for Wolfson WM9705, WM9712
++ * and WM9713 AC97 Codecs.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007, 2008 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * Notes:
++ *
++ * Features:
++ * - supports WM9705, WM9712, WM9713
++ * - polling mode
++ * - continuous mode (arch-dependent)
++ * - adjustable rpu/dpp settings
++ * - adjustable pressure current
++ * - adjustable sample settle delay
++ * - 4 and 5 wire touchscreens (5 wire is WM9712 only)
++ * - pen down detection
++ * - battery monitor
++ * - sample AUX adcs
++ * - power management
++ * - codec GPIO
++ * - codec event notification
++ * Todo
++ * - Support for async sampling control for noisy LCDs.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/string.h>
++#include <linux/proc_fs.h>
++#include <linux/pm.h>
++#include <linux/interrupt.h>
++#include <linux/bitops.h>
++#include <linux/workqueue.h>
++#include <linux/wm97xx.h>
++#include <linux/uaccess.h>
++#include <linux/io.h>
++
++#define TS_NAME "wm97xx"
++#define WM_CORE_VERSION "0.65"
++#define DEFAULT_PRESSURE 0xb0c0
++
++
++/*
++ * Touchscreen absolute values
++ *
++ * These parameters are used to help the input layer discard out of
++ * range readings and reduce jitter etc.
++ *
++ * o min, max:- indicate the min and max values your touch screen returns
++ * o fuzz:- use a higher number to reduce jitter
++ *
++ * The default values correspond to Mainstone II in QVGA mode
++ *
++ * Please read
++ * Documentation/input/input-programming.txt for more details.
++ */
++
++static int abs_x[3] = {350, 3900, 5};
++module_param_array(abs_x, int, NULL, 0);
++MODULE_PARM_DESC(abs_x, "Touchscreen absolute X min, max, fuzz");
++
++static int abs_y[3] = {320, 3750, 40};
++module_param_array(abs_y, int, NULL, 0);
++MODULE_PARM_DESC(abs_y, "Touchscreen absolute Y min, max, fuzz");
++
++static int abs_p[3] = {0, 150, 4};
++module_param_array(abs_p, int, NULL, 0);
++MODULE_PARM_DESC(abs_p, "Touchscreen absolute Pressure min, max, fuzz");
++
++/*
++ * wm97xx IO access, all IO locking done by AC97 layer
++ */
++int wm97xx_reg_read(struct wm97xx *wm, u16 reg)
++{
++ if (wm->ac97)
++ return wm->ac97->bus->ops->read(wm->ac97, reg);
++ else
++ return -1;
++}
++EXPORT_SYMBOL_GPL(wm97xx_reg_read);
++
++void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val)
++{
++ /* cache digitiser registers */
++ if (reg >= AC97_WM9713_DIG1 && reg <= AC97_WM9713_DIG3)
++ wm->dig[(reg - AC97_WM9713_DIG1) >> 1] = val;
++
++ /* cache gpio regs */
++ if (reg >= AC97_GPIO_CFG && reg <= AC97_MISC_AFE)
++ wm->gpio[(reg - AC97_GPIO_CFG) >> 1] = val;
++
++ /* wm9713 irq reg */
++ if (reg == 0x5a)
++ wm->misc = val;
++
++ if (wm->ac97)
++ wm->ac97->bus->ops->write(wm->ac97, reg, val);
++}
++EXPORT_SYMBOL_GPL(wm97xx_reg_write);
++
++/**
++ * wm97xx_read_aux_adc - Read the aux adc.
++ * @wm: wm97xx device.
++ * @adcsel: codec ADC to be read
++ *
++ * Reads the selected AUX ADC.
++ */
++
++int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel)
++{
++ int power_adc = 0, auxval;
++ u16 power = 0;
++
++ /* get codec */
++ mutex_lock(&wm->codec_mutex);
++
++ /* When the touchscreen is not in use, we may have to power up
++ * the AUX ADC before we can use sample the AUX inputs->
++ */
++ if (wm->id == WM9713_ID2 &&
++ (power = wm97xx_reg_read(wm, AC97_EXTENDED_MID)) & 0x8000) {
++ power_adc = 1;
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, power & 0x7fff);
++ }
++
++ /* Prepare the codec for AUX reading */
++ wm->codec->aux_prepare(wm);
++
++ /* Turn polling mode on to read AUX ADC */
++ wm->pen_probably_down = 1;
++ wm->codec->poll_sample(wm, adcsel, &auxval);
++
++ if (power_adc)
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, power | 0x8000);
++
++ wm->codec->dig_restore(wm);
++
++ wm->pen_probably_down = 0;
++
++ mutex_unlock(&wm->codec_mutex);
++ return auxval & 0xfff;
++}
++EXPORT_SYMBOL_GPL(wm97xx_read_aux_adc);
++
++/**
++ * wm97xx_get_gpio - Get the status of a codec GPIO.
++ * @wm: wm97xx device.
++ * @gpio: gpio
++ *
++ * Get the status of a codec GPIO pin
++ */
++
++enum wm97xx_gpio_status wm97xx_get_gpio(struct wm97xx *wm, u32 gpio)
++{
++ u16 status;
++ enum wm97xx_gpio_status ret;
++
++ mutex_lock(&wm->codec_mutex);
++ status = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++
++ if (status & gpio)
++ ret = WM97XX_GPIO_HIGH;
++ else
++ ret = WM97XX_GPIO_LOW;
++
++ mutex_unlock(&wm->codec_mutex);
++ return ret;
++}
++EXPORT_SYMBOL_GPL(wm97xx_get_gpio);
++
++/**
++ * wm97xx_set_gpio - Set the status of a codec GPIO.
++ * @wm: wm97xx device.
++ * @gpio: gpio
++ *
++ *
++ * Set the status of a codec GPIO pin
++ */
++
++void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
++ enum wm97xx_gpio_status status)
++{
++ u16 reg;
++
++ mutex_lock(&wm->codec_mutex);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++
++ if (status & WM97XX_GPIO_HIGH)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ if (wm->id == WM9712_ID2)
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg << 1);
++ else
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg);
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_set_gpio);
++
++/*
++ * Codec GPIO pin configuration, this sets pin direction, polarity,
++ * stickyness and wake up.
++ */
++void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, enum wm97xx_gpio_dir dir,
++ enum wm97xx_gpio_pol pol, enum wm97xx_gpio_sticky sticky,
++ enum wm97xx_gpio_wake wake)
++{
++ u16 reg;
++
++ mutex_lock(&wm->codec_mutex);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++
++ if (pol == WM97XX_GPIO_POL_HIGH)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
++
++ if (sticky == WM97XX_GPIO_STICKY)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
++
++ if (wake == WM97XX_GPIO_WAKE)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_WAKEUP, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++
++ if (dir == WM97XX_GPIO_IN)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, reg);
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_config_gpio);
++
++/*
++ * Handle a pen down interrupt.
++ */
++static void wm97xx_pen_irq_worker(struct work_struct *work)
++{
++ struct wm97xx *wm = container_of(work, struct wm97xx, pen_event_work);
++
++ /* do we need to enable the touch panel reader */
++ if (wm->id == WM9705_ID2) {
++ if (wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD) &
++ WM97XX_PEN_DOWN)
++ wm->pen_is_down = 1;
++ else
++ wm->pen_is_down = 0;
++ } else {
++ u16 status, pol;
++ mutex_lock(&wm->codec_mutex);
++ status = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++ pol = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++
++ if (WM97XX_GPIO_13 & pol & status) {
++ wm->pen_is_down = 1;
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol &
++ ~WM97XX_GPIO_13);
++ } else {
++ wm->pen_is_down = 0;
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol |
++ WM97XX_GPIO_13);
++ }
++
++ if (wm->id == WM9712_ID2)
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, (status &
++ ~WM97XX_GPIO_13) << 1);
++ else
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, status &
++ ~WM97XX_GPIO_13);
++ mutex_unlock(&wm->codec_mutex);
++ }
++
++ queue_delayed_work(wm->ts_workq, &wm->ts_reader, 0);
++
++ if (!wm->pen_is_down && wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->mach_ops->acc_pen_up(wm);
++ wm->mach_ops->irq_enable(wm, 1);
++}
++
++/*
++ * Codec PENDOWN irq handler
++ *
++ * We have to disable the codec interrupt in the handler because it can
++ * take upto 1ms to clear the interrupt source. The interrupt is then enabled
++ * again in the slow handler when the source has been cleared.
++ */
++static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
++{
++ struct wm97xx *wm = dev_id;
++ wm->mach_ops->irq_enable(wm, 0);
++ queue_work(wm->ts_workq, &wm->pen_event_work);
++ return IRQ_HANDLED;
++}
++
++/*
++ * initialise pen IRQ handler and workqueue
++ */
++static int wm97xx_init_pen_irq(struct wm97xx *wm)
++{
++ u16 reg;
++
++ /* If an interrupt is supplied an IRQ enable operation must also be
++ * provided. */
++ BUG_ON(!wm->mach_ops->irq_enable);
++
++ INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker);
++
++ if (request_irq(wm->pen_irq, wm97xx_pen_interrupt, IRQF_SHARED,
++ "wm97xx-pen", wm)) {
++ dev_err(wm->dev,
++ "Failed to register pen down interrupt, polling");
++ wm->pen_irq = 0;
++ return -EINVAL;
++ }
++
++ /* enable PEN down on wm9712/13 */
++ if (wm->id != WM9705_ID2) {
++ reg = wm97xx_reg_read(wm, AC97_MISC_AFE);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, reg & 0xfffb);
++ reg = wm97xx_reg_read(wm, 0x5a);
++ wm97xx_reg_write(wm, 0x5a, reg & ~0x0001);
++ }
++
++ return 0;
++}
++
++static int wm97xx_read_samples(struct wm97xx *wm)
++{
++ struct wm97xx_data data;
++ int rc;
++
++ mutex_lock(&wm->codec_mutex);
++
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ rc = wm->mach_ops->acc_pen_down(wm);
++ else
++ rc = wm->codec->poll_touch(wm, &data);
++
++ if (rc & RC_PENUP) {
++ if (wm->pen_is_down) {
++ wm->pen_is_down = 0;
++ dev_dbg(wm->dev, "pen up\n");
++ input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
++ input_sync(wm->input_dev);
++ } else if (!(rc & RC_AGAIN)) {
++ /* We need high frequency updates only while
++ * pen is down, the user never will be able to
++ * touch screen faster than a few times per
++ * second... On the other hand, when the user
++ * is actively working with the touchscreen we
++ * don't want to lose the quick response. So we
++ * will slowly increase sleep time after the
++ * pen is up and quicky restore it to ~one task
++ * switch when pen is down again.
++ */
++ if (wm->ts_reader_interval < HZ / 10)
++ wm->ts_reader_interval++;
++ }
++
++ } else if (rc & RC_VALID) {
++ dev_dbg(wm->dev,
++ "pen down: x=%x:%d, y=%x:%d, pressure=%x:%d\n",
++ data.x >> 12, data.x & 0xfff, data.y >> 12,
++ data.y & 0xfff, data.p >> 12, data.p & 0xfff);
++ input_report_abs(wm->input_dev, ABS_X, data.x & 0xfff);
++ input_report_abs(wm->input_dev, ABS_Y, data.y & 0xfff);
++ input_report_abs(wm->input_dev, ABS_PRESSURE, data.p & 0xfff);
++ input_sync(wm->input_dev);
++ wm->pen_is_down = 1;
++ wm->ts_reader_interval = wm->ts_reader_min_interval;
++ } else if (rc & RC_PENDOWN) {
++ dev_dbg(wm->dev, "pen down");
++ wm->pen_is_down = 1;
++ wm->ts_reader_interval = wm->ts_reader_min_interval;
++ }
++
++ mutex_unlock(&wm->codec_mutex);
++ return rc;
++}
++
++/*
++* The touchscreen sample reader.
++*/
++static void wm97xx_ts_reader(struct work_struct *work)
++{
++ int rc;
++ struct wm97xx *wm = container_of(work, struct wm97xx, ts_reader.work);
++
++ BUG_ON(!wm->codec);
++
++ do {
++ rc = wm97xx_read_samples(wm);
++ } while (rc & RC_AGAIN);
++
++ if (wm->pen_is_down || !wm->pen_irq)
++ queue_delayed_work(wm->ts_workq, &wm->ts_reader,
++ wm->ts_reader_interval);
++}
++
++/**
++ * wm97xx_ts_input_open - Open the touch screen input device.
++ * @idev: Input device to be opened.
++ *
++ * Called by the input sub system to open a wm97xx touchscreen device.
++ * Starts the touchscreen thread and touch digitiser.
++ */
++static int wm97xx_ts_input_open(struct input_dev *idev)
++{
++ struct wm97xx *wm = input_get_drvdata(idev);
++
++ wm->ts_workq = create_singlethread_workqueue("kwm97xx");
++ if (wm->ts_workq == NULL) {
++ dev_err(wm->dev,
++ "Failed to create workqueue\n");
++ return -EINVAL;
++ }
++
++ /* start digitiser */
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->codec->acc_enable(wm, 1);
++ wm->codec->dig_enable(wm, 1);
++
++ INIT_DELAYED_WORK(&wm->ts_reader, wm97xx_ts_reader);
++
++ wm->ts_reader_min_interval = HZ >= 100 ? HZ / 100 : 1;
++ if (wm->ts_reader_min_interval < 1)
++ wm->ts_reader_min_interval = 1;
++ wm->ts_reader_interval = wm->ts_reader_min_interval;
++
++ wm->pen_is_down = 0;
++ if (wm->pen_irq)
++ wm97xx_init_pen_irq(wm);
++ else
++ dev_err(wm->dev, "No IRQ specified\n");
++
++ /* If we either don't have an interrupt for pen down events or
++ * failed to acquire it then we need to poll.
++ */
++ if (wm->pen_irq == 0)
++ queue_delayed_work(wm->ts_workq, &wm->ts_reader,
++ wm->ts_reader_interval);
++
++ return 0;
++}
++
++/**
++ * wm97xx_ts_input_close - Close the touch screen input device.
++ * @idev: Input device to be closed.
++ *
++ * Called by the input sub system to close a wm97xx touchscreen device.
++ * Kills the touchscreen thread and stops the touch digitiser.
++ */
++
++static void wm97xx_ts_input_close(struct input_dev *idev)
++{
++ struct wm97xx *wm = input_get_drvdata(idev);
++
++ if (wm->pen_irq)
++ free_irq(wm->pen_irq, wm);
++
++ wm->pen_is_down = 0;
++
++ /* ts_reader rearms itself so we need to explicitly stop it
++ * before we destroy the workqueue.
++ */
++ cancel_delayed_work_sync(&wm->ts_reader);
++ destroy_workqueue(wm->ts_workq);
++
++ /* stop digitiser */
++ wm->codec->dig_enable(wm, 0);
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->codec->acc_enable(wm, 0);
++}
++
++static int wm97xx_probe(struct device *dev)
++{
++ struct wm97xx *wm;
++ int ret = 0, id = 0;
++
++ wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL);
++ if (!wm)
++ return -ENOMEM;
++ mutex_init(&wm->codec_mutex);
++
++ wm->dev = dev;
++ dev->driver_data = wm;
++ wm->ac97 = to_ac97_t(dev);
++
++ /* check that we have a supported codec */
++ id = wm97xx_reg_read(wm, AC97_VENDOR_ID1);
++ if (id != WM97XX_ID1) {
++ dev_err(dev, "Device with vendor %04x is not a wm97xx\n", id);
++ kfree(wm);
++ return -ENODEV;
++ }
++
++ wm->id = wm97xx_reg_read(wm, AC97_VENDOR_ID2);
++
++ dev_info(wm->dev, "detected a wm97%02x codec", wm->id & 0xff);
++
++ switch (wm->id & 0xff) {
++#ifdef CONFIG_TOUCHSCREEN_WM9705
++ case 0x05:
++ wm->codec = &wm9705_codec;
++ break;
++#endif
++#ifdef CONFIG_TOUCHSCREEN_WM9712
++ case 0x12:
++ wm->codec = &wm9712_codec;
++ break;
++#endif
++#ifdef CONFIG_TOUCHSCREEN_WM9713
++ case 0x13:
++ wm->codec = &wm9713_codec;
++ break;
++#endif
++ default:
++ dev_err(wm->dev, "Support for wm97%02x not compiled in.\n",
++ wm->id & 0xff);
++ kfree(wm);
++ return -ENODEV;
++ }
++
++ wm->input_dev = input_allocate_device();
++ if (wm->input_dev == NULL) {
++ kfree(wm);
++ return -ENOMEM;
++ }
++
++ /* set up touch configuration */
++ wm->input_dev->name = "wm97xx touchscreen";
++ wm->input_dev->open = wm97xx_ts_input_open;
++ wm->input_dev->close = wm97xx_ts_input_close;
++ set_bit(EV_ABS, wm->input_dev->evbit);
++ set_bit(ABS_X, wm->input_dev->absbit);
++ set_bit(ABS_Y, wm->input_dev->absbit);
++ set_bit(ABS_PRESSURE, wm->input_dev->absbit);
++ input_set_abs_params(wm->input_dev, ABS_X, abs_x[0], abs_x[1],
++ abs_x[2], 0);
++ input_set_abs_params(wm->input_dev, ABS_Y, abs_y[0], abs_y[1],
++ abs_y[2], 0);
++ input_set_abs_params(wm->input_dev, ABS_PRESSURE, abs_p[0], abs_p[1],
++ abs_p[2], 0);
++ input_set_drvdata(wm->input_dev, wm);
++ wm->input_dev->dev.parent = dev;
++ ret = input_register_device(wm->input_dev);
++ if (ret < 0) {
++ input_free_device(wm->input_dev);
++ kfree(wm);
++ return -ENOMEM;
++ }
++
++ /* set up physical characteristics */
++ wm->codec->phy_init(wm);
++
++ /* load gpio cache */
++ wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++ wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++ wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
++ wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
++ wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++ wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
++
++ /* register our battery device */
++ wm->battery_dev = platform_device_alloc("wm97xx-battery", 0);
++ if (!wm->battery_dev)
++ goto batt_err;
++ platform_set_drvdata(wm->battery_dev, wm);
++ wm->battery_dev->dev.parent = dev;
++ ret = platform_device_register(wm->battery_dev);
++ if (ret < 0)
++ goto batt_reg_err;
++
++ /* register our extended touch device (for machine specific
++ * extensions) */
++ wm->touch_dev = platform_device_alloc("wm97xx-touch", 0);
++ if (!wm->touch_dev)
++ goto touch_err;
++ platform_set_drvdata(wm->touch_dev, wm);
++ wm->touch_dev->dev.parent = dev;
++ ret = platform_device_register(wm->touch_dev);
++ if (ret < 0)
++ goto touch_reg_err;
++
++ return ret;
++
++ touch_reg_err:
++ platform_device_put(wm->touch_dev);
++ touch_err:
++ platform_device_unregister(wm->battery_dev);
++ batt_reg_err:
++ platform_device_put(wm->battery_dev);
++ batt_err:
++ input_unregister_device(wm->input_dev);
++ kfree(wm);
++ return ret;
++}
++
++static int wm97xx_remove(struct device *dev)
++{
++ struct wm97xx *wm = dev_get_drvdata(dev);
++
++ platform_device_unregister(wm->battery_dev);
++ platform_device_unregister(wm->touch_dev);
++ input_unregister_device(wm->input_dev);
++
++ kfree(wm);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int wm97xx_resume(struct device *dev)
++{
++ struct wm97xx *wm = dev_get_drvdata(dev);
++
++ /* restore digitiser and gpios */
++ if (wm->id == WM9713_ID2) {
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, wm->dig[0]);
++ wm97xx_reg_write(wm, 0x5a, wm->misc);
++ if (wm->input_dev->users) {
++ u16 reg;
++ reg = wm97xx_reg_read(wm, AC97_EXTENDED_MID) & 0x7fff;
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, reg);
++ }
++ }
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, wm->dig[1]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2]);
++
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, wm->gpio[0]);
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, wm->gpio[1]);
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, wm->gpio[2]);
++ wm97xx_reg_write(wm, AC97_GPIO_WAKEUP, wm->gpio[3]);
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, wm->gpio[4]);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, wm->gpio[5]);
++
++ return 0;
++}
++
++#else
++#define wm97xx_resume NULL
++#endif
++
++/*
++ * Machine specific operations
++ */
++int wm97xx_register_mach_ops(struct wm97xx *wm,
++ struct wm97xx_mach_ops *mach_ops)
++{
++ mutex_lock(&wm->codec_mutex);
++ if (wm->mach_ops) {
++ mutex_unlock(&wm->codec_mutex);
++ return -EINVAL;
++ }
++ wm->mach_ops = mach_ops;
++ mutex_unlock(&wm->codec_mutex);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(wm97xx_register_mach_ops);
++
++void wm97xx_unregister_mach_ops(struct wm97xx *wm)
++{
++ mutex_lock(&wm->codec_mutex);
++ wm->mach_ops = NULL;
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops);
++
++static struct device_driver wm97xx_driver = {
++ .name = "ac97",
++ .bus = &ac97_bus_type,
++ .owner = THIS_MODULE,
++ .probe = wm97xx_probe,
++ .remove = wm97xx_remove,
++ .resume = wm97xx_resume,
++};
++
++static int __init wm97xx_init(void)
++{
++ return driver_register(&wm97xx_driver);
++}
++
++static void __exit wm97xx_exit(void)
++{
++ driver_unregister(&wm97xx_driver);
++}
++
++module_init(wm97xx_init);
++module_exit(wm97xx_exit);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM97xx Core - Touch Screen / AUX ADC / GPIO Driver");
++MODULE_LICENSE("GPL");
+diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
+new file mode 100644
+index 0000000..fc6e0b3
+--- /dev/null
++++ b/include/linux/wm97xx.h
+@@ -0,0 +1,309 @@
++
++/*
++ * Register bits and API for Wolfson WM97xx series of codecs
++ */
++
++#ifndef _LINUX_WM97XX_H
++#define _LINUX_WM97XX_H
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/ac97_codec.h>
++#include <sound/initval.h>
++#include <linux/types.h>
++#include <linux/list.h>
++#include <linux/input.h> /* Input device layer */
++#include <linux/platform_device.h>
++
++/*
++ * WM97xx AC97 Touchscreen registers
++ */
++#define AC97_WM97XX_DIGITISER1 0x76
++#define AC97_WM97XX_DIGITISER2 0x78
++#define AC97_WM97XX_DIGITISER_RD 0x7a
++#define AC97_WM9713_DIG1 0x74
++#define AC97_WM9713_DIG2 AC97_WM97XX_DIGITISER1
++#define AC97_WM9713_DIG3 AC97_WM97XX_DIGITISER2
++
++/*
++ * WM97xx register bits
++ */
++#define WM97XX_POLL 0x8000 /* initiate a polling measurement */
++#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
++#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
++#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
++#define WM97XX_ADCSEL_MASK 0x7000
++#define WM97XX_COO 0x0800 /* enable coordinate mode */
++#define WM97XX_CTC 0x0400 /* enable continuous mode */
++#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
++#define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */
++#define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */
++#define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */
++#define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */
++#define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */
++#define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */
++#define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */
++#define WM97XX_CM_RATE_MASK 0x03f0
++#define WM97XX_RATE(i) (((i & 3) << 8) | ((i & 4) ? 0xf0 : 0))
++#define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */
++#define WM97XX_DELAY_MASK 0x00f0
++#define WM97XX_SLEN 0x0008 /* slot read back enable */
++#define WM97XX_SLT(i) ((i - 5) & 0x7) /* panel slot (5-11) */
++#define WM97XX_SLT_MASK 0x0007
++#define WM97XX_PRP_DETW 0x4000 /* detect on, digitise off, wake */
++#define WM97XX_PRP_DET 0x8000 /* detect on, digitise off, no wake */
++#define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */
++#define WM97XX_RPR 0x2000 /* wake up on pen down */
++#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
++#define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */
++
++#define WM97XX_AUX_ID1 0x8001
++#define WM97XX_AUX_ID2 0x8002
++#define WM97XX_AUX_ID3 0x8003
++#define WM97XX_AUX_ID4 0x8004
++
++
++/* WM9712 Bits */
++#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
++#define WM9712_PDEN 0x0800 /* measure only when pen down */
++#define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */
++#define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */
++#define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */
++#define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */
++#define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */
++#define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */
++#define WM9712_PD(i) (0x1 << i) /* power management */
++
++/* WM9712 Registers */
++#define AC97_WM9712_POWER 0x24
++#define AC97_WM9712_REV 0x58
++
++/* WM9705 Bits */
++#define WM9705_PDEN 0x1000 /* measure only when pen is down */
++#define WM9705_PINV 0x0800 /* inverts sense of pen down output */
++#define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */
++#define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */
++#define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */
++#define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */
++#define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */
++#define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */
++#define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */
++#define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */
++#define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */
++
++
++/* WM9713 Bits */
++#define WM9713_PDPOL 0x0400 /* Pen down polarity */
++#define WM9713_POLL 0x0200 /* initiate a polling measurement */
++#define WM9713_CTC 0x0100 /* enable continuous mode */
++#define WM9713_ADCSEL_X 0x0002 /* X measurement */
++#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */
++#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */
++#define WM9713_COO 0x0001 /* enable coordinate mode */
++#define WM9713_PDEN 0x0800 /* measure only when pen down */
++#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */
++#define WM9713_WAIT 0x0200 /* coordinate wait */
++
++/* AUX ADC ID's */
++#define TS_COMP1 0x0
++#define TS_COMP2 0x1
++#define TS_BMON 0x2
++#define TS_WIPER 0x3
++
++/* ID numbers */
++#define WM97XX_ID1 0x574d
++#define WM9712_ID2 0x4c12
++#define WM9705_ID2 0x4c05
++#define WM9713_ID2 0x4c13
++
++/* Codec GPIO's */
++#define WM97XX_MAX_GPIO 16
++#define WM97XX_GPIO_1 (1 << 1)
++#define WM97XX_GPIO_2 (1 << 2)
++#define WM97XX_GPIO_3 (1 << 3)
++#define WM97XX_GPIO_4 (1 << 4)
++#define WM97XX_GPIO_5 (1 << 5)
++#define WM97XX_GPIO_6 (1 << 6)
++#define WM97XX_GPIO_7 (1 << 7)
++#define WM97XX_GPIO_8 (1 << 8)
++#define WM97XX_GPIO_9 (1 << 9)
++#define WM97XX_GPIO_10 (1 << 10)
++#define WM97XX_GPIO_11 (1 << 11)
++#define WM97XX_GPIO_12 (1 << 12)
++#define WM97XX_GPIO_13 (1 << 13)
++#define WM97XX_GPIO_14 (1 << 14)
++#define WM97XX_GPIO_15 (1 << 15)
++
++
++#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */
++
++
++/*---------------- Return codes from sample reading functions ---------------*/
++
++/* More data is available; call the sample gathering function again */
++#define RC_AGAIN 0x00000001
++/* The returned sample is valid */
++#define RC_VALID 0x00000002
++/* The pen is up (the first RC_VALID without RC_PENUP means pen is down) */
++#define RC_PENUP 0x00000004
++/* The pen is down (RC_VALID implies RC_PENDOWN, but sometimes it is helpful
++ to tell the handler that the pen is down but we don't know yet his coords,
++ so the handler should not sleep or wait for pendown irq) */
++#define RC_PENDOWN 0x00000008
++
++/*
++ * The wm97xx driver provides a private API for writing platform-specific
++ * drivers.
++ */
++
++/* The structure used to return arch specific sampled data into */
++struct wm97xx_data {
++ int x;
++ int y;
++ int p;
++};
++
++/*
++ * Codec GPIO status
++ */
++enum wm97xx_gpio_status {
++ WM97XX_GPIO_HIGH,
++ WM97XX_GPIO_LOW
++};
++
++/*
++ * Codec GPIO direction
++ */
++enum wm97xx_gpio_dir {
++ WM97XX_GPIO_IN,
++ WM97XX_GPIO_OUT
++};
++
++/*
++ * Codec GPIO polarity
++ */
++enum wm97xx_gpio_pol {
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_POL_LOW
++};
++
++/*
++ * Codec GPIO sticky
++ */
++enum wm97xx_gpio_sticky {
++ WM97XX_GPIO_STICKY,
++ WM97XX_GPIO_NOTSTICKY
++};
++
++/*
++ * Codec GPIO wake
++ */
++enum wm97xx_gpio_wake {
++ WM97XX_GPIO_WAKE,
++ WM97XX_GPIO_NOWAKE
++};
++
++/*
++ * Digitiser ioctl commands
++ */
++#define WM97XX_DIG_START 0x1
++#define WM97XX_DIG_STOP 0x2
++#define WM97XX_PHY_INIT 0x3
++#define WM97XX_AUX_PREPARE 0x4
++#define WM97XX_DIG_RESTORE 0x5
++
++struct wm97xx;
++
++extern struct wm97xx_codec_drv wm9705_codec;
++extern struct wm97xx_codec_drv wm9712_codec;
++extern struct wm97xx_codec_drv wm9713_codec;
++
++/*
++ * Codec driver interface - allows mapping to WM9705/12/13 and newer codecs
++ */
++struct wm97xx_codec_drv {
++ u16 id;
++ char *name;
++
++ /* read 1 sample */
++ int (*poll_sample) (struct wm97xx *, int adcsel, int *sample);
++
++ /* read X,Y,[P] in poll */
++ int (*poll_touch) (struct wm97xx *, struct wm97xx_data *);
++
++ int (*acc_enable) (struct wm97xx *, int enable);
++ void (*phy_init) (struct wm97xx *);
++ void (*dig_enable) (struct wm97xx *, int enable);
++ void (*dig_restore) (struct wm97xx *);
++ void (*aux_prepare) (struct wm97xx *);
++};
++
++
++/* Machine specific and accelerated touch operations */
++struct wm97xx_mach_ops {
++
++ /* accelerated touch readback - coords are transmited on AC97 link */
++ int acc_enabled;
++ void (*acc_pen_up) (struct wm97xx *);
++ int (*acc_pen_down) (struct wm97xx *);
++ int (*acc_startup) (struct wm97xx *);
++ void (*acc_shutdown) (struct wm97xx *);
++
++ /* interrupt mask control - required for accelerated operation */
++ void (*irq_enable) (struct wm97xx *, int enable);
++
++ /* pre and post sample - can be used to minimise any analog noise */
++ void (*pre_sample) (int); /* function to run before sampling */
++ void (*post_sample) (int); /* function to run after sampling */
++};
++
++struct wm97xx {
++ u16 dig[3], id, gpio[6], misc; /* Cached codec registers */
++ u16 dig_save[3]; /* saved during aux reading */
++ struct wm97xx_codec_drv *codec; /* attached codec driver*/
++ struct input_dev *input_dev; /* touchscreen input device */
++ struct snd_ac97 *ac97; /* ALSA codec access */
++ struct device *dev; /* ALSA device */
++ struct platform_device *battery_dev;
++ struct platform_device *touch_dev;
++ struct wm97xx_mach_ops *mach_ops;
++ struct mutex codec_mutex;
++ struct delayed_work ts_reader; /* Used to poll touchscreen */
++ unsigned long ts_reader_interval; /* Current interval for timer */
++ unsigned long ts_reader_min_interval; /* Minimum interval */
++ unsigned int pen_irq; /* Pen IRQ number in use */
++ struct workqueue_struct *ts_workq;
++ struct work_struct pen_event_work;
++ u16 acc_slot; /* AC97 slot used for acc touch data */
++ u16 acc_rate; /* acc touch data rate */
++ unsigned pen_is_down:1; /* Pen is down */
++ unsigned aux_waiting:1; /* aux measurement waiting */
++ unsigned pen_probably_down:1; /* used in polling mode */
++};
++
++/*
++ * Codec GPIO access (not supported on WM9705)
++ * This can be used to set/get codec GPIO and Virtual GPIO status.
++ */
++enum wm97xx_gpio_status wm97xx_get_gpio(struct wm97xx *wm, u32 gpio);
++void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
++ enum wm97xx_gpio_status status);
++void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio,
++ enum wm97xx_gpio_dir dir,
++ enum wm97xx_gpio_pol pol,
++ enum wm97xx_gpio_sticky sticky,
++ enum wm97xx_gpio_wake wake);
++
++/* codec AC97 IO access */
++int wm97xx_reg_read(struct wm97xx *wm, u16 reg);
++void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val);
++
++/* aux adc readback */
++int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel);
++
++/* machine ops */
++int wm97xx_register_mach_ops(struct wm97xx *, struct wm97xx_mach_ops *);
++void wm97xx_unregister_mach_ops(struct wm97xx *);
++
++#endif
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch
new file mode 100644
index 0000000000..3890795f61
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch
@@ -0,0 +1,383 @@
+From 7b366ca784d0540613a43908de803e4dedc100d3 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:20 +0300
+Subject: [PATCH 31/64] Add chip driver for WM9705 touchscreen
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm9705.c | 352 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 352 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm9705.c
+
+diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c
+new file mode 100644
+index 0000000..f185104
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9705.c
+@@ -0,0 +1,352 @@
++/*
++ * wm9705.c -- Codec driver for Wolfson WM9705 AC97 Codec.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9705_VERSION "0.62"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 4;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Pen detect comparator threshold.
++ *
++ * 0 to Vmid in 15 steps, 0 = use zero power comparator with Vmid threshold
++ * i.e. 1 = Vmid/15 threshold
++ * 15 = Vmid/1 threshold
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down events.
++ */
++static int pdd = 8;
++module_param(pdd, int, 0);
++MODULE_PARM_DESC(pdd, "Set pen detect comparator threshold");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, /* 1 AC97 Link frames */
++ 42, /* 2 */
++ 84, /* 4 */
++ 167, /* 8 */
++ 333, /* 16 */
++ 667, /* 32 */
++ 1000, /* 48 */
++ 1333, /* 64 */
++ 2000, /* 96 */
++ 2667, /* 128 */
++ 3333, /* 160 */
++ 4000, /* 192 */
++ 4667, /* 224 */
++ 5333, /* 256 */
++ 6000, /* 288 */
++ 0 /* No delay, switch matrix always on */
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay(3 * AC97_LINK_FRAME + delay_table[d]);
++}
++
++/*
++ * set up the physical settings of the WM9705
++ */
++static void wm9705_phy_init(struct wm97xx *wm)
++{
++ u16 dig1 = 0, dig2 = WM97XX_RPR;
++
++ /*
++ * mute VIDEO and AUX as they share X and Y touchscreen
++ * inputs on the WM9705
++ */
++ wm97xx_reg_write(wm, AC97_AUX, 0x8000);
++ wm97xx_reg_write(wm, AC97_VIDEO, 0x8000);
++
++ /* touchpanel pressure current*/
++ if (pil == 2) {
++ dig2 |= WM9705_PIL;
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 200uA.");
++ if (!pil)
++ pressure = 0;
++
++ /* polling mode sample settling delay */
++ if (delay != 4) {
++ if (delay < 0 || delay > 15) {
++ dev_dbg(wm->dev, "supplied delay out of range.");
++ delay = 4;
++ }
++ }
++ dig1 &= 0xff0f;
++ dig1 |= WM97XX_DELAY(delay);
++ dev_dbg(wm->dev, "setting adc sample delay to %d u Secs.",
++ delay_table[delay]);
++
++ /* WM9705 pdd */
++ dig2 |= (pdd & 0x000f);
++ dev_dbg(wm->dev, "setting pdd to Vmid/%d", 1 - (pdd & 0x000f));
++
++ /* mask */
++ dig2 |= ((mask & 0x3) << 4);
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++}
++
++static void wm9705_dig_enable(struct wm97xx *wm, int enable)
++{
++ if (enable) {
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ wm->dig[2] | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ } else
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ wm->dig[2] & ~WM97XX_PRP_DET_DIG);
++}
++
++static void wm9705_aux_prepare(struct wm97xx *wm)
++{
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, 0);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, WM97XX_PRP_DET_DIG);
++}
++
++static void wm9705_dig_restore(struct wm97xx *wm)
++{
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig_save[2]);
++}
++
++static inline int is_pden(struct wm97xx *wm)
++{
++ return wm->dig[2] & WM9705_PDEN;
++}
++
++/*
++ * Read a sample from the WM9705 adc in polling mode.
++ */
++static int wm9705_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = ((adcsel & 0x7fff) + 3) << 12;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ adcsel | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {
++ dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSEL_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Sample the WM9705 touchscreen in polling mode
++ */
++static int wm9705_poll_touch(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_X, &data->x);
++ if (rc != RC_VALID)
++ return rc;
++ rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_Y, &data->y);
++ if (rc != RC_VALID)
++ return rc;
++ if (pil) {
++ rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_PRES, &data->p);
++ if (rc != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9705 continuous mode, i.e. touch data is streamed across
++ * an AC97 slot
++ */
++static int wm9705_acc_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig1, dig2;
++ int ret = 0;
++
++ dig1 = wm->dig[1];
++ dig2 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup &&
++ (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++ dig1 &= ~(WM97XX_CM_RATE_MASK | WM97XX_ADCSEL_MASK |
++ WM97XX_DELAY_MASK | WM97XX_SLT_MASK);
++ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_SLEN |
++ WM97XX_DELAY(delay) |
++ WM97XX_SLT(wm->acc_slot) |
++ WM97XX_RATE(wm->acc_rate);
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++ dig2 |= WM9705_PDEN;
++ } else {
++ dig1 &= ~(WM97XX_CTC | WM97XX_COO | WM97XX_SLEN);
++ dig2 &= ~WM9705_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++ return ret;
++}
++
++struct wm97xx_codec_drv wm9705_codec = {
++ .id = WM9705_ID2,
++ .name = "wm9705",
++ .poll_sample = wm9705_poll_sample,
++ .poll_touch = wm9705_poll_touch,
++ .acc_enable = wm9705_acc_enable,
++ .phy_init = wm9705_phy_init,
++ .dig_enable = wm9705_dig_enable,
++ .dig_restore = wm9705_dig_restore,
++ .aux_prepare = wm9705_aux_prepare,
++};
++EXPORT_SYMBOL_GPL(wm9705_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM9705 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch
new file mode 100644
index 0000000000..6265910a1e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch
@@ -0,0 +1,492 @@
+From b2640063b8321bdfb324c00d5f0c3366ac31696b Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:19 +0300
+Subject: [PATCH 32/64] Add chip driver for WM9712 touchscreen
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm9712.c | 461 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 461 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm9712.c
+
+diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c
+new file mode 100644
+index 0000000..eaab326
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9712.c
+@@ -0,0 +1,461 @@
++/*
++ * wm9712.c -- Codec driver for Wolfson WM9712 AC97 Codecs.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9712_VERSION "0.61"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set internal pull up for pen detect.
++ *
++ * Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive)
++ * i.e. pull up resistance = 64k Ohms / rpu.
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down event.
++ */
++static int rpu = 8;
++module_param(rpu, int, 0);
++MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 3;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Set five_wire = 1 to use a 5 wire touchscreen.
++ *
++ * NOTE: Five wire mode does not allow for readback of pressure.
++ */
++static int five_wire;
++module_param(five_wire, int, 0);
++MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen.");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * Coordinate Polling Enable.
++ *
++ * Set to 1 to enable coordinate polling. e.g. x,y[,p] is sampled together
++ * for every poll.
++ */
++static int coord;
++module_param(coord, int, 0);
++MODULE_PARM_DESC(coord, "Polling coordinate mode");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, /* 1 AC97 Link frames */
++ 42, /* 2 */
++ 84, /* 4 */
++ 167, /* 8 */
++ 333, /* 16 */
++ 667, /* 32 */
++ 1000, /* 48 */
++ 1333, /* 64 */
++ 2000, /* 96 */
++ 2667, /* 128 */
++ 3333, /* 160 */
++ 4000, /* 192 */
++ 4667, /* 224 */
++ 5333, /* 256 */
++ 6000, /* 288 */
++ 0 /* No delay, switch matrix always on */
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay(3 * AC97_LINK_FRAME + delay_table[d]);
++}
++
++/*
++ * set up the physical settings of the WM9712
++ */
++static void wm9712_phy_init(struct wm97xx *wm)
++{
++ u16 dig1 = 0;
++ u16 dig2 = WM97XX_RPR | WM9712_RPU(1);
++
++ /* WM9712 rpu */
++ if (rpu) {
++ dig2 &= 0xffc0;
++ dig2 |= WM9712_RPU(rpu);
++ dev_dbg(wm->dev, "setting pen detect pull-up to %d Ohms",
++ 64000 / rpu);
++ }
++
++ /* touchpanel pressure current*/
++ if (pil == 2) {
++ dig2 |= WM9712_PIL;
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 200uA.");
++ if (!pil)
++ pressure = 0;
++
++ /* WM9712 five wire */
++ if (five_wire) {
++ dig2 |= WM9712_45W;
++ dev_dbg(wm->dev, "setting 5-wire touchscreen mode.");
++ }
++
++ /* polling mode sample settling delay */
++ if (delay < 0 || delay > 15) {
++ dev_dbg(wm->dev, "supplied delay out of range.");
++ delay = 4;
++ }
++ dig1 &= 0xff0f;
++ dig1 |= WM97XX_DELAY(delay);
++ dev_dbg(wm->dev, "setting adc sample delay to %d u Secs.",
++ delay_table[delay]);
++
++ /* mask */
++ dig2 |= ((mask & 0x3) << 6);
++ if (mask) {
++ u16 reg;
++ /* Set GPIO4 as Mask Pin*/
++ reg = wm97xx_reg_read(wm, AC97_MISC_AFE);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, reg | WM97XX_GPIO_4);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, reg | WM97XX_GPIO_4);
++ }
++
++ /* wait - coord mode */
++ if (coord)
++ dig2 |= WM9712_WAIT;
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++}
++
++static void wm9712_dig_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig2 = wm->dig[2];
++
++ if (enable) {
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ dig2 | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ } else
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ dig2 & ~WM97XX_PRP_DET_DIG);
++}
++
++static void wm9712_aux_prepare(struct wm97xx *wm)
++{
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, 0);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, WM97XX_PRP_DET_DIG);
++}
++
++static void wm9712_dig_restore(struct wm97xx *wm)
++{
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig_save[2]);
++}
++
++static inline int is_pden(struct wm97xx *wm)
++{
++ return wm->dig[2] & WM9712_PDEN;
++}
++
++/*
++ * Read a sample from the WM9712 adc in polling mode.
++ */
++static int wm9712_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = ((adcsel & 0x7fff) + 3) << 12;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ adcsel | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {
++ dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSEL_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Read a coord from the WM9712 adc in polling mode.
++ */
++static int wm9712_poll_coord(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data_rd = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data_rd & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ WM97XX_COO | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion and read x */
++ poll_delay(delay);
++ data->x = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ /* read back y data */
++ data->y = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (pil)
++ data->p = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ else
++ data->p = DEFAULT_PRESSURE;
++
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ /* check we have correct sample */
++ if (!(data->x & WM97XX_ADCSEL_X) || !(data->y & WM97XX_ADCSEL_Y))
++ goto err;
++ if (pil && !(data->p & WM97XX_ADCSEL_PRES))
++ goto err;
++
++ if (!(data->x & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++ return RC_VALID;
++err:
++ return RC_PENUP;
++}
++
++/*
++ * Sample the WM9712 touchscreen in polling mode
++ */
++static int wm9712_poll_touch(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if (coord) {
++ rc = wm9712_poll_coord(wm, data);
++ if (rc != RC_VALID)
++ return rc;
++ } else {
++ rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_X, &data->x);
++ if (rc != RC_VALID)
++ return rc;
++
++ rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_Y, &data->y);
++ if (rc != RC_VALID)
++ return rc;
++
++ if (pil && !five_wire) {
++ rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_PRES,
++ &data->p);
++ if (rc != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++ }
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9712 continuous mode, i.e. touch data is streamed across
++ * an AC97 slot
++ */
++static int wm9712_acc_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig1, dig2;
++ int ret = 0;
++
++ dig1 = wm->dig[1];
++ dig2 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup) {
++ ret = wm->mach_ops->acc_startup(wm);
++ if (ret < 0)
++ return ret;
++ }
++ dig1 &= ~(WM97XX_CM_RATE_MASK | WM97XX_ADCSEL_MASK |
++ WM97XX_DELAY_MASK | WM97XX_SLT_MASK);
++ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_SLEN |
++ WM97XX_DELAY(delay) |
++ WM97XX_SLT(wm->acc_slot) |
++ WM97XX_RATE(wm->acc_rate);
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++ dig2 |= WM9712_PDEN;
++ } else {
++ dig1 &= ~(WM97XX_CTC | WM97XX_COO | WM97XX_SLEN);
++ dig2 &= ~WM9712_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++ return 0;
++}
++
++struct wm97xx_codec_drv wm9712_codec = {
++ .id = WM9712_ID2,
++ .name = "wm9712",
++ .poll_sample = wm9712_poll_sample,
++ .poll_touch = wm9712_poll_touch,
++ .acc_enable = wm9712_acc_enable,
++ .phy_init = wm9712_phy_init,
++ .dig_enable = wm9712_dig_enable,
++ .dig_restore = wm9712_dig_restore,
++ .aux_prepare = wm9712_aux_prepare,
++};
++EXPORT_SYMBOL_GPL(wm9712_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM9712 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch
new file mode 100644
index 0000000000..a9dfa18557
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch
@@ -0,0 +1,490 @@
+From 05b2a361eedb5461e902c73ebc6e30f9916b3a8a Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:19 +0300
+Subject: [PATCH 33/64] Add chip driver for WM9713 touchscreen
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm9713.c | 459 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 459 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm9713.c
+
+diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c
+new file mode 100644
+index 0000000..5067e59
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9713.c
+@@ -0,0 +1,459 @@
++/*
++ * wm9713.c -- Codec touch driver for Wolfson WM9713 AC97 Codec.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007, 2008 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9713_VERSION "0.53"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set internal pull up for pen detect.
++ *
++ * Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive)
++ * i.e. pull up resistance = 64k Ohms / rpu.
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down event.
++ */
++static int rpu = 8;
++module_param(rpu, int, 0);
++MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 4;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * Coordinate Polling Enable.
++ *
++ * Set to 1 to enable coordinate polling. e.g. x,y[,p] is sampled together
++ * for every poll.
++ */
++static int coord;
++module_param(coord, int, 0);
++MODULE_PARM_DESC(coord, "Polling coordinate mode");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, /* 1 AC97 Link frames */
++ 42, /* 2 */
++ 84, /* 4 */
++ 167, /* 8 */
++ 333, /* 16 */
++ 667, /* 32 */
++ 1000, /* 48 */
++ 1333, /* 64 */
++ 2000, /* 96 */
++ 2667, /* 128 */
++ 3333, /* 160 */
++ 4000, /* 192 */
++ 4667, /* 224 */
++ 5333, /* 256 */
++ 6000, /* 288 */
++ 0 /* No delay, switch matrix always on */
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay(3 * AC97_LINK_FRAME + delay_table[d]);
++}
++
++/*
++ * set up the physical settings of the WM9713
++ */
++static void wm9713_phy_init(struct wm97xx *wm)
++{
++ u16 dig1 = 0, dig2, dig3;
++
++ /* default values */
++ dig2 = WM97XX_DELAY(4) | WM97XX_SLT(5);
++ dig3 = WM9712_RPU(1);
++
++ /* rpu */
++ if (rpu) {
++ dig3 &= 0xffc0;
++ dig3 |= WM9712_RPU(rpu);
++ dev_info(wm->dev, "setting pen detect pull-up to %d Ohms\n",
++ 64000 / rpu);
++ }
++
++ /* touchpanel pressure */
++ if (pil == 2) {
++ dig3 |= WM9712_PIL;
++ dev_info(wm->dev,
++ "setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dev_info(wm->dev,
++ "setting pressure measurement current to 200uA.");
++ if (!pil)
++ pressure = 0;
++
++ /* sample settling delay */
++ if (delay < 0 || delay > 15) {
++ dev_info(wm->dev, "supplied delay out of range.");
++ delay = 4;
++ dev_info(wm->dev, "setting adc sample delay to %d u Secs.",
++ delay_table[delay]);
++ }
++ dig2 &= 0xff0f;
++ dig2 |= WM97XX_DELAY(delay);
++
++ /* mask */
++ dig3 |= ((mask & 0x3) << 4);
++ if (coord)
++ dig3 |= WM9713_WAIT;
++
++ wm->misc = wm97xx_reg_read(wm, 0x5a);
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, dig2);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, dig3);
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, 0x0);
++}
++
++static void wm9713_dig_enable(struct wm97xx *wm, int enable)
++{
++ u16 val;
++
++ if (enable) {
++ val = wm97xx_reg_read(wm, AC97_EXTENDED_MID);
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, val & 0x7fff);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2] |
++ WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ } else {
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2] &
++ ~WM97XX_PRP_DET_DIG);
++ val = wm97xx_reg_read(wm, AC97_EXTENDED_MID);
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, val | 0x8000);
++ }
++}
++
++static void wm9713_dig_restore(struct wm97xx *wm)
++{
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, wm->dig_save[0]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig_save[2]);
++}
++
++static void wm9713_aux_prepare(struct wm97xx *wm)
++{
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, 0);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, 0);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, WM97XX_PRP_DET_DIG);
++}
++
++static inline int is_pden(struct wm97xx *wm)
++{
++ return wm->dig[2] & WM9713_PDEN;
++}
++
++/*
++ * Read a sample from the WM9713 adc in polling mode.
++ */
++static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
++{
++ u16 dig1;
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = 1 << ((adcsel & 0x7fff) + 3);
++
++ dig1 = wm97xx_reg_read(wm, AC97_WM9713_DIG1);
++ dig1 &= ~WM9713_ADCSEL_MASK;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1 | adcsel | WM9713_POLL);
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM9713_DIG1) & WM9713_POLL) &&
++ timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSRC_MASK) != ffs(adcsel >> 1) << 12) {
++ dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSRC_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Read a coordinate from the WM9713 adc in polling mode.
++ */
++static int wm9713_poll_coord(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ u16 dig1;
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ dig1 = wm97xx_reg_read(wm, AC97_WM9713_DIG1);
++ dig1 &= ~WM9713_ADCSEL_MASK;
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1,
++ dig1 | WM9713_POLL | WM9713_COO);
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++ data->x = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM9713_DIG1) & WM9713_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ /* read back data */
++ data->y = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (pil)
++ data->p = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ else
++ data->p = DEFAULT_PRESSURE;
++
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ /* check we have correct sample */
++ if (!(data->x & WM97XX_ADCSEL_X) || !(data->y & WM97XX_ADCSEL_Y))
++ goto err;
++ if (pil && !(data->p & WM97XX_ADCSEL_PRES))
++ goto err;
++
++ if (!(data->x & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++ return RC_VALID;
++err:
++ return RC_PENUP;
++}
++
++/*
++ * Sample the WM9713 touchscreen in polling mode
++ */
++static int wm9713_poll_touch(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if (coord) {
++ rc = wm9713_poll_coord(wm, data);
++ if (rc != RC_VALID)
++ return rc;
++ } else {
++ rc = wm9713_poll_sample(wm, WM9713_ADCSEL_X, &data->x);
++ if (rc != RC_VALID)
++ return rc;
++ rc = wm9713_poll_sample(wm, WM9713_ADCSEL_Y, &data->y);
++ if (rc != RC_VALID)
++ return rc;
++ if (pil) {
++ rc = wm9713_poll_sample(wm, WM9713_ADCSEL_PRES,
++ &data->p);
++ if (rc != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++ }
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9713 continuous mode, i.e. touch data is streamed across
++ * an AC97 slot
++ */
++static int wm9713_acc_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig1, dig2, dig3;
++ int ret = 0;
++
++ dig1 = wm->dig[0];
++ dig2 = wm->dig[1];
++ dig3 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup &&
++ (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++
++ dig1 &= ~WM9713_ADCSEL_MASK;
++ dig1 |= WM9713_CTC | WM9713_COO | WM9713_ADCSEL_X |
++ WM9713_ADCSEL_Y;
++ if (pil)
++ dig1 |= WM9713_ADCSEL_PRES;
++ dig2 &= ~(WM97XX_DELAY_MASK | WM97XX_SLT_MASK |
++ WM97XX_CM_RATE_MASK);
++ dig2 |= WM97XX_SLEN | WM97XX_DELAY(delay) |
++ WM97XX_SLT(wm->acc_slot) | WM97XX_RATE(wm->acc_rate);
++ dig3 |= WM9713_PDEN;
++ } else {
++ dig1 &= ~(WM9713_CTC | WM9713_COO);
++ dig2 &= ~WM97XX_SLEN;
++ dig3 &= ~WM9713_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, dig2);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, dig3);
++ return ret;
++}
++
++struct wm97xx_codec_drv wm9713_codec = {
++ .id = WM9713_ID2,
++ .name = "wm9713",
++ .poll_sample = wm9713_poll_sample,
++ .poll_touch = wm9713_poll_touch,
++ .acc_enable = wm9713_acc_enable,
++ .phy_init = wm9713_phy_init,
++ .dig_enable = wm9713_dig_enable,
++ .dig_restore = wm9713_dig_restore,
++ .aux_prepare = wm9713_aux_prepare,
++};
++EXPORT_SYMBOL_GPL(wm9713_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM9713 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch
new file mode 100644
index 0000000000..0391cfcd83
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch
@@ -0,0 +1,329 @@
+From 821604bad5ce1ef942eeb420afd9ea2c5c92875e Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:19 +0300
+Subject: [PATCH 34/64] Driver for WM97xx touchscreens in streaming mode on Mainstone
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/mainstone-wm97xx.c | 298 ++++++++++++++++++++++++++
+ 1 files changed, 298 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/mainstone-wm97xx.c
+
+diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
+new file mode 100644
+index 0000000..8e1c35d
+--- /dev/null
++++ b/drivers/input/touchscreen/mainstone-wm97xx.c
+@@ -0,0 +1,298 @@
++/*
++ * mainstone-wm97xx.c -- Mainstone Continuous Touch screen driver for
++ * Wolfson WM97xx AC97 Codecs.
++ *
++ * Copyright 2004, 2007 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * Notes:
++ * This is a wm97xx extended touch driver to capture touch
++ * data in a continuous manner on the Intel XScale archictecture
++ *
++ * Features:
++ * - codecs supported:- WM9705, WM9712, WM9713
++ * - processors supported:- Intel XScale PXA25x, PXA26x, PXA27x
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/irq.h>
++#include <linux/interrupt.h>
++#include <linux/wm97xx.h>
++#include <linux/io.h>
++#include <asm/arch/pxa-regs.h>
++
++#define VERSION "0.13"
++
++struct continuous {
++ u16 id; /* codec id */
++ u8 code; /* continuous code */
++ u8 reads; /* number of coord reads per read cycle */
++ u32 speed; /* number of coords per second */
++};
++
++#define WM_READS(sp) ((sp / HZ) + 1)
++
++static const struct continuous cinfo[] = {
++ {WM9705_ID2, 0, WM_READS(94), 94},
++ {WM9705_ID2, 1, WM_READS(188), 188},
++ {WM9705_ID2, 2, WM_READS(375), 375},
++ {WM9705_ID2, 3, WM_READS(750), 750},
++ {WM9712_ID2, 0, WM_READS(94), 94},
++ {WM9712_ID2, 1, WM_READS(188), 188},
++ {WM9712_ID2, 2, WM_READS(375), 375},
++ {WM9712_ID2, 3, WM_READS(750), 750},
++ {WM9713_ID2, 0, WM_READS(94), 94},
++ {WM9713_ID2, 1, WM_READS(120), 120},
++ {WM9713_ID2, 2, WM_READS(154), 154},
++ {WM9713_ID2, 3, WM_READS(188), 188},
++};
++
++/* continuous speed index */
++static int sp_idx;
++static u16 last, tries;
++
++/*
++ * Pen sampling frequency (Hz) in continuous mode.
++ */
++static int cont_rate = 200;
++module_param(cont_rate, int, 0);
++MODULE_PARM_DESC(cont_rate, "Sampling rate in continuous mode (Hz)");
++
++/*
++ * Pen down detection.
++ *
++ * This driver can either poll or use an interrupt to indicate a pen down
++ * event. If the irq request fails then it will fall back to polling mode.
++ */
++static int pen_int;
++module_param(pen_int, int, 0);
++MODULE_PARM_DESC(pen_int, "Pen down detection (1 = interrupt, 0 = polling)");
++
++/*
++ * Pressure readback.
++ *
++ * Set to 1 to read back pen down pressure
++ */
++static int pressure;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Pressure readback (1 = pressure, 0 = no pressure)");
++
++/*
++ * AC97 touch data slot.
++ *
++ * Touch screen readback data ac97 slot
++ */
++static int ac97_touch_slot = 5;
++module_param(ac97_touch_slot, int, 0);
++MODULE_PARM_DESC(ac97_touch_slot, "Touch screen data slot AC97 number");
++
++
++/* flush AC97 slot 5 FIFO on pxa machines */
++#ifdef CONFIG_PXA27x
++static void wm97xx_acc_pen_up(struct wm97xx *wm)
++{
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(1);
++
++ while (MISR & (1 << 2))
++ MODR;
++}
++#else
++static void wm97xx_acc_pen_up(struct wm97xx *wm)
++{
++ int count = 16;
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(1);
++
++ while (count < 16) {
++ MODR;
++ count--;
++ }
++}
++#endif
++
++static int wm97xx_acc_pen_down(struct wm97xx *wm)
++{
++ u16 x, y, p = 0x100 | WM97XX_ADCSEL_PRES;
++ int reads = 0;
++
++ /* data is never immediately available after pen down irq */
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(1);
++
++ if (tries > 5) {
++ tries = 0;
++ return RC_PENUP;
++ }
++
++ x = MODR;
++ if (x == last) {
++ tries++;
++ return RC_AGAIN;
++ }
++ last = x;
++ do {
++ if (reads)
++ x = MODR;
++ y = MODR;
++ if (pressure)
++ p = MODR;
++
++ /* are samples valid */
++ if ((x & 0x7000) != WM97XX_ADCSEL_X ||
++ (y & 0x7000) != WM97XX_ADCSEL_Y ||
++ (p & 0x7000) != WM97XX_ADCSEL_PRES)
++ goto up;
++
++ /* coordinate is good */
++ tries = 0;
++ input_report_abs(wm->input_dev, ABS_X, x & 0xfff);
++ input_report_abs(wm->input_dev, ABS_Y, y & 0xfff);
++ input_report_abs(wm->input_dev, ABS_PRESSURE, p & 0xfff);
++ input_sync(wm->input_dev);
++ reads++;
++ } while (reads < cinfo[sp_idx].reads);
++up:
++ return RC_PENDOWN | RC_AGAIN;
++}
++
++static int wm97xx_acc_startup(struct wm97xx *wm)
++{
++ int idx = 0;
++
++ /* check we have a codec */
++ if (wm->ac97 == NULL)
++ return -ENODEV;
++
++ /* Go you big red fire engine */
++ for (idx = 0; idx < ARRAY_SIZE(cinfo); idx++) {
++ if (wm->id != cinfo[idx].id)
++ continue;
++ sp_idx = idx;
++ if (cont_rate <= cinfo[idx].speed)
++ break;
++ }
++ wm->acc_rate = cinfo[sp_idx].code;
++ wm->acc_slot = ac97_touch_slot;
++ dev_info(wm->dev,
++ "mainstone accelerated touchscreen driver, %d samples/sec\n",
++ cinfo[sp_idx].speed);
++
++ /* codec specific irq config */
++ if (pen_int) {
++ switch (wm->id) {
++ case WM9705_ID2:
++ wm->pen_irq = IRQ_GPIO(4);
++ set_irq_type(IRQ_GPIO(4), IRQT_BOTHEDGE);
++ break;
++ case WM9712_ID2:
++ case WM9713_ID2:
++ /* enable pen down interrupt */
++ /* use PEN_DOWN GPIO 13 to assert IRQ on GPIO line 2 */
++ wm->pen_irq = MAINSTONE_AC97_IRQ;
++ wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN,
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_STICKY,
++ WM97XX_GPIO_WAKE);
++ wm97xx_config_gpio(wm, WM97XX_GPIO_2, WM97XX_GPIO_OUT,
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_NOTSTICKY,
++ WM97XX_GPIO_NOWAKE);
++ break;
++ default:
++ dev_err(wm->dev,
++ "pen down irq not supported on this device\n");
++ pen_int = 0;
++ break;
++ }
++ }
++
++ return 0;
++}
++
++static void wm97xx_acc_shutdown(struct wm97xx *wm)
++{
++ /* codec specific deconfig */
++ if (pen_int) {
++ switch (wm->id & 0xffff) {
++ case WM9705_ID2:
++ wm->pen_irq = 0;
++ break;
++ case WM9712_ID2:
++ case WM9713_ID2:
++ /* disable interrupt */
++ wm->pen_irq = 0;
++ break;
++ }
++ }
++}
++
++static void wm97xx_irq_enable(struct wm97xx *wm, int enable)
++{
++ if (enable)
++ enable_irq(wm->pen_irq);
++ else
++ disable_irq(wm->pen_irq);
++}
++
++static struct wm97xx_mach_ops mainstone_mach_ops = {
++ .acc_enabled = 1,
++ .acc_pen_up = wm97xx_acc_pen_up,
++ .acc_pen_down = wm97xx_acc_pen_down,
++ .acc_startup = wm97xx_acc_startup,
++ .acc_shutdown = wm97xx_acc_shutdown,
++ .irq_enable = wm97xx_irq_enable,
++};
++
++static int mainstone_wm97xx_probe(struct platform_device *pdev)
++{
++ struct wm97xx *wm = platform_get_drvdata(pdev);
++ return wm97xx_register_mach_ops(wm, &mainstone_mach_ops);
++}
++
++static int mainstone_wm97xx_remove(struct platform_device *pdev)
++{
++ struct wm97xx *wm = platform_get_drvdata(pdev);
++ wm97xx_unregister_mach_ops(wm);
++ return 0;
++}
++
++static struct platform_driver mainstone_wm97xx_driver = {
++ .probe = mainstone_wm97xx_probe,
++ .remove = mainstone_wm97xx_remove,
++ .driver = {
++ .name = "wm97xx-touch",
++ },
++};
++
++static int __init mainstone_wm97xx_init(void)
++{
++ return platform_driver_register(&mainstone_wm97xx_driver);
++}
++
++static void __exit mainstone_wm97xx_exit(void)
++{
++ platform_driver_unregister(&mainstone_wm97xx_driver);
++}
++
++module_init(mainstone_wm97xx_init);
++module_exit(mainstone_wm97xx_exit);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("wm97xx continuous touch driver for mainstone");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch
new file mode 100644
index 0000000000..aa0918f43e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch
@@ -0,0 +1,122 @@
+From eba6a504393932764a33aae64021827dd2c5c70c Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:18 +0300
+Subject: [PATCH 35/64] Build system and MAINTAINERS entry for WM97xx touchscreen drivers
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+---
+ MAINTAINERS | 10 +++++++
+ drivers/input/touchscreen/Kconfig | 52 ++++++++++++++++++++++++++++++++++++
+ drivers/input/touchscreen/Makefile | 7 +++++
+ 3 files changed, 69 insertions(+), 0 deletions(-)
+
+diff --git a/MAINTAINERS b/MAINTAINERS
+index 2340cfb..f02851c 100644
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -4204,6 +4204,16 @@ L: linux-wireless@vger.kernel.org
+ W: http://oops.ghostprotocols.net:81/blog
+ S: Maintained
+
++WM97XX TOUCHSCREEN DRIVERS
++P: Mark Brown
++M: broonie@opensource.wolfsonmicro.com
++P: Liam Girdwood
++M: liam.girdwood@wolfsonmicro.com
++L: linux-input@vger.kernel.org
++T: git git://opensource.wolfsonmicro.com/linux-2.6-touch
++W: http://opensource.wolfsonmicro.com/node/7
++S: Supported
++
+ X.25 NETWORK LAYER
+ P: Henner Eisen
+ M: eis@baty.hanse.de
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index 90e8e92..0be05a2 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -158,6 +158,58 @@ config TOUCHSCREEN_TOUCHRIGHT
+ To compile this driver as a module, choose M here: the
+ module will be called touchright.
+
++config TOUCHSCREEN_WM97XX
++ tristate "Support for WM97xx AC97 touchscreen controllers"
++ depends on AC97_BUS
++
++config TOUCHSCREEN_WM9705
++ bool "WM9705 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have a Wolfson Microelectronics WM9705 touchscreen
++ controller connected to your system.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9705.
++
++config TOUCHSCREEN_WM9712
++ bool "WM9712 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have a Wolfson Microelectronics WM9712 touchscreen
++ controller connected to your system.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9712.
++
++config TOUCHSCREEN_WM9713
++ bool "WM9713 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have a Wolfson Microelectronics WM9713 touchscreen
++ controller connected to your system.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9713.
++
++config TOUCHSCREEN_WM97XX_MAINSTONE
++ tristate "WM97xx Mainstone accelerated touch"
++ depends on TOUCHSCREEN_WM97XX && ARCH_PXA
++ help
++ Say Y here for support for streaming mode with WM97xx touchscreens
++ on Mainstone systems.
++
++ If unsure, say N
++
++ To compile this driver as a module, choose M here: the
++ module will be called mainstone-wm97xx
++
+ config TOUCHSCREEN_TOUCHWIN
+ tristate "Touchwin serial touchscreen"
+ select SERIO
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index 35d4097..d38156e 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -4,6 +4,8 @@
+
+ # Each configuration option enables a list of files.
+
++wm97xx-ts-y := wm97xx-core.o
++
+ obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o
+ obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
+ obj-$(CONFIG_TOUCHSCREEN_CORGI) += corgi_ts.o
+@@ -19,3 +21,8 @@ obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += penmount.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_TSC2101) += tsc2101_ts.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o
++wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o
++wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o
++wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch
new file mode 100644
index 0000000000..dd10b34586
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch
@@ -0,0 +1,35 @@
+From 9ea478cbd5473f52ca036cccc00dddad717d7861 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 30 Jan 2008 19:27:13 +0300
+Subject: [PATCH 36/64] Set id to -1 for wm97xx subdevices
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/touchscreen/wm97xx-core.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+index 27a0a99..e066acc 100644
+--- a/drivers/input/touchscreen/wm97xx-core.c
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -592,7 +592,7 @@ static int wm97xx_probe(struct device *dev)
+ wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
+
+ /* register our battery device */
+- wm->battery_dev = platform_device_alloc("wm97xx-battery", 0);
++ wm->battery_dev = platform_device_alloc("wm97xx-battery", -1);
+ if (!wm->battery_dev)
+ goto batt_err;
+ platform_set_drvdata(wm->battery_dev, wm);
+@@ -603,7 +603,7 @@ static int wm97xx_probe(struct device *dev)
+
+ /* register our extended touch device (for machine specific
+ * extensions) */
+- wm->touch_dev = platform_device_alloc("wm97xx-touch", 0);
++ wm->touch_dev = platform_device_alloc("wm97xx-touch", -1);
+ if (!wm->touch_dev)
+ goto touch_err;
+ platform_set_drvdata(wm->touch_dev, wm);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
new file mode 100644
index 0000000000..010194dd96
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
@@ -0,0 +1,41 @@
+From d2888c7643b07687b14a839239cbe7fc5bf565e6 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Mon, 14 Jan 2008 23:24:26 +0300
+Subject: [PATCH 37/64] Don't lock the codec list in snd_soc_dapm_new_widgets()
+
+snd_soc_dapm_new_widgets() takes the codec lock when adding new widgets,
+causing lockdep warnings when applications later call down through ALSA
+to adjust controls. Since widgets are only added during probe this lock
+should be unneeded so don't take it.
+
+Thanks to Dmitry Baryshkov <dbaryshkov@gmail.com> for reporting this issue.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ sound/soc/soc-dapm.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
+index 29a546f..e46cdc5 100644
+--- a/sound/soc/soc-dapm.c
++++ b/sound/soc/soc-dapm.c
+@@ -963,7 +963,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec)
+ {
+ struct snd_soc_dapm_widget *w;
+
+- mutex_lock(&codec->mutex);
+ list_for_each_entry(w, &codec->dapm_widgets, list)
+ {
+ if (w->new)
+@@ -998,7 +997,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec)
+ }
+
+ dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP);
+- mutex_unlock(&codec->mutex);
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(snd_soc_dapm_new_widgets);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
new file mode 100644
index 0000000000..7a3eb61a27
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
@@ -0,0 +1,57 @@
+From 5bae1fab16c7b14a458aa90e5654fe3a1d8d960f Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sun, 20 Jan 2008 00:06:06 +0300
+Subject: [PATCH 38/64] Don't lock the codec list in snd_soc_dapm_new_widgets()
+
+On Wed, Jan 16, 2008 at 02:40:55AM +0300, Dmitry wrote:
+
+> I'm sorry, but I tested this patch only now. And I just got another
+> message from lockdep:
+
+Could you give this patch a try, please?
+---
+ sound/soc/soc-core.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
+index e6a67b5..7f3ed9f 100644
+--- a/sound/soc/soc-core.c
++++ b/sound/soc/soc-core.c
+@@ -1090,7 +1090,6 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
+ struct snd_soc_machine *machine = socdev->machine;
+ int ret = 0, i, ac97 = 0, err = 0;
+
+- mutex_lock(&codec->mutex);
+ for(i = 0; i < machine->num_links; i++) {
+ if (socdev->machine->dai_link[i].init) {
+ err = socdev->machine->dai_link[i].init(codec);
+@@ -1116,12 +1115,14 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
+ goto out;
+ }
+
++ mutex_lock(&codec->mutex);
+ #ifdef CONFIG_SND_SOC_AC97_BUS
+ if (ac97) {
+ ret = soc_ac97_dev_register(codec);
+ if (ret < 0) {
+ printk(KERN_ERR "asoc: AC97 device register failed\n");
+ snd_card_free(codec->card);
++ mutex_unlock(&codec->mutex);
+ goto out;
+ }
+ }
+@@ -1134,8 +1135,10 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
+ err = device_create_file(socdev->dev, &dev_attr_codec_reg);
+ if (err < 0)
+ printk(KERN_WARNING "asoc: failed to add codec sysfs entries\n");
+-out:
++
+ mutex_unlock(&codec->mutex);
++
++out:
+ return ret;
+ }
+ EXPORT_SYMBOL_GPL(snd_soc_register_card);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch
new file mode 100644
index 0000000000..c09c208c6a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch
@@ -0,0 +1,446 @@
+From 62c9a23cfa7181369637d0b61a8e90c83c562f03 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:06 +0300
+Subject: [PATCH 39/64] Add generic framework for managing clocks.
+
+Provide a generic framework that platform may choose
+to support clocks api. In particular this provides
+platform-independant struct clk definition, a full
+implementation of clocks api and a set of functions
+for registering and unregistering clocks in a safe way.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ include/linux/clklib.h | 85 ++++++++++++++
+ init/Kconfig | 7 +
+ kernel/Makefile | 1 +
+ kernel/clklib.c | 295 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 388 insertions(+), 0 deletions(-)
+ create mode 100644 include/linux/clklib.h
+ create mode 100644 kernel/clklib.c
+
+diff --git a/include/linux/clklib.h b/include/linux/clklib.h
+new file mode 100644
+index 0000000..4bd9b4a
+--- /dev/null
++++ b/include/linux/clklib.h
+@@ -0,0 +1,85 @@
++/*
++ * Copyright (C) 2008 Dmitry Baryshkov
++ *
++ * This file is released under the GPL v2.
++ */
++
++#ifndef CLKLIB_H
++#define CLKLIB_H
++
++#include <linux/list.h>
++
++struct clk {
++ struct list_head node;
++ struct clk *parent;
++
++ const char *name;
++ struct module *owner;
++
++ int users;
++ unsigned long rate;
++ int delay;
++
++ int (*can_get) (struct clk *, struct device *);
++ int (*set_parent) (struct clk *, struct clk *);
++ int (*enable) (struct clk *);
++ void (*disable) (struct clk *);
++ unsigned long (*getrate) (struct clk*);
++ int (*setrate) (struct clk *, unsigned long);
++ long (*roundrate) (struct clk *, unsigned long);
++
++ void *priv;
++};
++
++int clk_register(struct clk *clk);
++void clk_unregister(struct clk *clk);
++static void __maybe_unused clks_register(struct clk *clks, size_t num)
++{
++ int i;
++ for (i = 0; i < num; i++) {
++ clk_register(&clks[i]);
++ }
++}
++
++
++int clk_alloc_function(const char *parent, struct clk *clk);
++
++struct clk_function {
++ const char *parent;
++ struct clk *clk;
++};
++
++#define CLK_FUNC(_clock, _function, _can_get, _data, _format) \
++ { \
++ .parent = _clock, \
++ .clk = &(struct clk) { \
++ .name= _function, \
++ .owner = THIS_MODULE, \
++ .can_get = _can_get, \
++ .priv = _data, \
++ .format = _format, \
++ }, \
++ }
++
++static int __maybe_unused clk_alloc_functions(
++ struct clk_function *funcs,
++ int num)
++{
++ int i;
++ int rc;
++
++ for (i = 0; i < num; i++) {
++ rc = clk_alloc_function(funcs[i].parent, funcs[i].clk);
++
++ if (rc) {
++ printk(KERN_ERR "Error allocating %s.%s function.\n",
++ funcs[i].parent,
++ funcs[i].clk->name);
++ return rc;
++ }
++ }
++
++ return 0;
++}
++
++#endif
+diff --git a/init/Kconfig b/init/Kconfig
+index b9d11a8..05b62ba 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -435,6 +435,13 @@ config CC_OPTIMIZE_FOR_SIZE
+ config SYSCTL
+ bool
+
++config HAVE_CLOCK_LIB
++ bool
++ help
++ Platforms select clocklib if they use this infrastructure
++ for managing their clocks both built into SoC and provided
++ by external devices.
++
+ menuconfig EMBEDDED
+ bool "Configure standard kernel features (for small systems)"
+ help
+diff --git a/kernel/Makefile b/kernel/Makefile
+index 6d9a87c..0b2ade7 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -58,6 +58,7 @@ obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+ obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+ obj-$(CONFIG_MARKERS) += marker.o
+ obj-$(CONFIG_LATENCYTOP) += latencytop.o
++obj-$(CONFIG_HAVE_CLOCK_LIB) += clklib.o
+
+ ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
+ # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
+diff --git a/kernel/clklib.c b/kernel/clklib.c
+new file mode 100644
+index 0000000..203af3d
+--- /dev/null
++++ b/kernel/clklib.c
+@@ -0,0 +1,295 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/clklib.h>
++#include <linux/spinlock.h>
++#include <linux/err.h>
++#include <linux/delay.h>
++
++static LIST_HEAD(clocks);
++static DEFINE_SPINLOCK(clocks_lock);
++
++static int __clk_register(struct clk *clk)
++{
++ if (clk->parent &&
++ !try_module_get(clk->parent->owner))
++ return -EINVAL;
++
++ list_add_tail(&clk->node, &clocks);
++
++ return 0;
++}
++
++int clk_register(struct clk *clk)
++{
++ unsigned long flags;
++ int rc;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = __clk_register(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_register);
++
++void clk_unregister(struct clk *clk)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++ list_del(&clk->node);
++ if (clk->parent)
++ module_put(clk->parent->owner);
++ spin_unlock_irqrestore(&clocks_lock, flags);
++}
++EXPORT_SYMBOL(clk_unregister);
++
++struct clk *clk_get(struct device *dev, const char *id)
++{
++ struct clk *p, *clk = ERR_PTR(-ENOENT);
++ unsigned long flags;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ list_for_each_entry(p, &clocks, node) {
++ if (strcmp(id, p->name) == 0 &&
++ (!p->can_get || p->can_get(p, dev)) &&
++ try_module_get(p->owner)) {
++ clk = p;
++ break;
++ }
++ }
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return clk;
++}
++EXPORT_SYMBOL(clk_get);
++
++void clk_put(struct clk *clk)
++{
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ module_put(clk->owner);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++}
++EXPORT_SYMBOL(clk_put);
++
++int clk_set_parent(struct clk *clk, struct clk *parent)
++{
++ int rc;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ if (!clk->set_parent)
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = clk->set_parent(clk, parent);
++ if (!rc)
++ clk->parent = parent;
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_set_parent);
++
++static int __clk_enable(struct clk *clk)
++{
++ int rc = 0;
++
++ if (clk->parent) {
++ rc = __clk_enable(clk->parent);
++
++ if (rc)
++ return rc;
++ }
++
++ if (clk->users++ == 0)
++ if (clk->enable)
++ rc = clk->enable(clk);
++
++ if (clk->delay)
++ udelay(clk->delay);
++
++ return rc;
++}
++
++int clk_enable(struct clk *clk)
++{
++ unsigned long flags;
++ int rc;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = __clk_enable(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_enable);
++
++static void __clk_disable(struct clk *clk)
++{
++ if (clk->users <= 0) {
++ WARN_ON(1);
++ return;
++ }
++
++ if (--clk->users == 0)
++ if (clk->disable)
++ clk->disable(clk);
++
++ if (clk->parent)
++ __clk_disable(clk->parent);
++}
++
++void clk_disable(struct clk *clk)
++{
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ __clk_disable(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++}
++EXPORT_SYMBOL(clk_disable);
++
++static unsigned long __clk_get_rate(struct clk *clk)
++{
++ unsigned long rate = 0;
++
++ for (;;) {
++ if (rate || !clk)
++ return rate;
++
++ if (clk->getrate)
++ rate = clk->getrate(clk);
++ else if (clk->rate)
++ rate = clk->rate;
++ else
++ clk = clk->parent;
++ }
++}
++
++unsigned long clk_get_rate(struct clk *clk)
++{
++ unsigned long rate = 0;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rate = __clk_get_rate(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rate;
++}
++EXPORT_SYMBOL(clk_get_rate);
++
++long clk_round_rate(struct clk *clk, unsigned long rate)
++{
++ long res;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ if (!clk->roundrate)
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ res = clk->roundrate(clk, rate);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return res;
++}
++EXPORT_SYMBOL(clk_round_rate);
++
++int clk_set_rate(struct clk *clk, unsigned long rate)
++{
++ int rc;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ if (!clk->setrate)
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = clk->setrate(clk, rate);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_set_rate);
++
++int clk_alloc_function(const char *parent, struct clk *clk)
++{
++ int rc = 0;
++ unsigned long flags;
++ struct clk *pclk;
++ bool found = false;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ list_for_each_entry(pclk, &clocks, node) {
++ if (strcmp(parent, pclk->name) == 0 &&
++ try_module_get(pclk->owner)) {
++ found = true;
++ break;
++ }
++ }
++
++ if (!found) {
++ rc = -ENODEV;
++ goto out;
++ }
++
++ clk->parent = pclk;
++
++ __clk_register(clk);
++ /*
++ * We locked parent owner during search
++ * and also in __clk_register. Free one reference
++ */
++ module_put(pclk->owner);
++
++out:
++ if (rc) {
++ kfree(clk);
++ }
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_alloc_function);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0040-Clocklib-debugfs-support.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0040-Clocklib-debugfs-support.patch
new file mode 100644
index 0000000000..160b274f4f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0040-Clocklib-debugfs-support.patch
@@ -0,0 +1,108 @@
+From cae12d96586dac77d223559d686487ea2d457a41 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:05 +0300
+Subject: [PATCH 40/64] Clocklib debugfs support
+
+Provide /sys/kernel/debug/clock to ease debugging.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ include/linux/clklib.h | 5 +++
+ kernel/clklib.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 73 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/clklib.h b/include/linux/clklib.h
+index 4bd9b4a..f916693 100644
+--- a/include/linux/clklib.h
++++ b/include/linux/clklib.h
+@@ -28,6 +28,11 @@ struct clk {
+ int (*setrate) (struct clk *, unsigned long);
+ long (*roundrate) (struct clk *, unsigned long);
+
++ /*
++ * format any additional info
++ */
++ int (*format) (struct clk *, struct seq_file *);
++
+ void *priv;
+ };
+
+diff --git a/kernel/clklib.c b/kernel/clklib.c
+index 203af3d..b782220 100644
+--- a/kernel/clklib.c
++++ b/kernel/clklib.c
+@@ -293,3 +293,71 @@ out:
+ return rc;
+ }
+ EXPORT_SYMBOL(clk_alloc_function);
++
++#ifdef CONFIG_DEBUG_FS
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++static void dump_clocks(struct seq_file *s, struct clk *parent, int nest)
++{
++ struct clk *clk;
++ int i;
++
++ list_for_each_entry(clk, &clocks, node) {
++ if (clk->parent == parent) {
++ for (i = 0; i < nest; i++)
++ seq_putc(s, ' ');
++ seq_puts(s, clk->name);
++
++ i = nest + strlen(clk->name);
++ if (i >= 16)
++ i = 15;
++ for (; i < 16; i++)
++ seq_putc(s, ' ');
++ seq_printf(s, "%c use=%d rate=%lu KHz",
++ clk->set_parent ? '*' : ' ',
++ clk->users,
++ __clk_get_rate(clk));
++ if (clk->format)
++ clk->format(clk, s);
++ seq_putc(s, '\n');
++
++ dump_clocks(s, clk, nest + 1);
++ }
++ }
++}
++
++static int clocklib_show(struct seq_file *s, void *unused)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ dump_clocks(s, NULL, 0);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return 0;
++}
++
++static int clocklib_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, clocklib_show, NULL);
++}
++
++static struct file_operations clocklib_operations = {
++ .open = clocklib_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int __init clocklib_debugfs_init(void)
++{
++ debugfs_create_file("clock", S_IFREG | S_IRUGO,
++ NULL, NULL, &clocklib_operations);
++ return 0;
++}
++subsys_initcall(clocklib_debugfs_init);
++
++#endif /* DEBUG_FS */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch
new file mode 100644
index 0000000000..9c95c67e78
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch
@@ -0,0 +1,593 @@
+From 2a143b9546b01fd6c58ebaac7eb46568a17d6a41 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Tue, 12 Feb 2008 04:58:59 +0300
+Subject: [PATCH 41/64] From 80a359e60c2aec59ccf4fca0a7fd20495f82b1d2 Mon Sep 17 00:00:00 2001
+ In-Reply-To: <20080207005839.GA28509@doriath.ww600.siemens.net>
+ References: <20080207005839.GA28509@doriath.ww600.siemens.net>
+ Date: Thu, 7 Feb 2008 03:35:08 +0300
+ Subject: [PATCH 3/5] Use clocklib for ARM pxa sub-arch.
+ Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/clock.c | 108 ++++++--------------------------------------
+ arch/arm/mach-pxa/clock.h | 58 +++++++++++++-----------
+ arch/arm/mach-pxa/pxa25x.c | 64 +++++++++++++++-----------
+ arch/arm/mach-pxa/pxa27x.c | 61 +++++++++++++-----------
+ arch/arm/mach-pxa/pxa3xx.c | 91 +++++++++++++++++++++----------------
+ 6 files changed, 169 insertions(+), 214 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 423e953..47f3c73 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -347,6 +347,7 @@ config ARCH_PXA
+ select GENERIC_CLOCKEVENTS
+ select TICK_ONESHOT
+ select HAVE_GPIO_LIB
++ select HAVE_CLOCK_LIB
+ help
+ Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
+
+diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
+index 83ef5ec..3296b02 100644
+--- a/arch/arm/mach-pxa/clock.c
++++ b/arch/arm/mach-pxa/clock.c
+@@ -8,6 +8,7 @@
+ #include <linux/err.h>
+ #include <linux/string.h>
+ #include <linux/clk.h>
++#include <linux/clklib.h>
+ #include <linux/spinlock.h>
+ #include <linux/platform_device.h>
+ #include <linux/delay.h>
+@@ -19,123 +20,42 @@
+ #include "generic.h"
+ #include "clock.h"
+
+-static LIST_HEAD(clocks);
+-static DEFINE_MUTEX(clocks_mutex);
+-static DEFINE_SPINLOCK(clocks_lock);
+-
+-struct clk *clk_get(struct device *dev, const char *id)
+-{
+- struct clk *p, *clk = ERR_PTR(-ENOENT);
+-
+- mutex_lock(&clocks_mutex);
+- list_for_each_entry(p, &clocks, node) {
+- if (strcmp(id, p->name) == 0 &&
+- (p->dev == NULL || p->dev == dev)) {
+- clk = p;
+- break;
+- }
+- }
+- mutex_unlock(&clocks_mutex);
+-
+- return clk;
+-}
+-EXPORT_SYMBOL(clk_get);
+-
+-void clk_put(struct clk *clk)
++static int clk_gpio27_enable(struct clk *clk)
+ {
+-}
+-EXPORT_SYMBOL(clk_put);
+-
+-int clk_enable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (clk->enabled++ == 0)
+- clk->ops->enable(clk);
+- spin_unlock_irqrestore(&clocks_lock, flags);
+-
+- if (clk->delay)
+- udelay(clk->delay);
++ pxa_gpio_mode(GPIO11_3_6MHz_MD);
+
+ return 0;
+ }
+-EXPORT_SYMBOL(clk_enable);
+-
+-void clk_disable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- WARN_ON(clk->enabled == 0);
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (--clk->enabled == 0)
+- clk->ops->disable(clk);
+- spin_unlock_irqrestore(&clocks_lock, flags);
+-}
+-EXPORT_SYMBOL(clk_disable);
+-
+-unsigned long clk_get_rate(struct clk *clk)
+-{
+- unsigned long rate;
+-
+- rate = clk->rate;
+- if (clk->ops->getrate)
+- rate = clk->ops->getrate(clk);
+-
+- return rate;
+-}
+-EXPORT_SYMBOL(clk_get_rate);
+-
+-
+-static void clk_gpio27_enable(struct clk *clk)
+-{
+- pxa_gpio_mode(GPIO11_3_6MHz_MD);
+-}
+
+ static void clk_gpio27_disable(struct clk *clk)
+ {
++ /* FIXME: disable clock */
+ }
+
+-static const struct clkops clk_gpio27_ops = {
+- .enable = clk_gpio27_enable,
+- .disable = clk_gpio27_disable,
+-};
+-
+-
+-void clk_cken_enable(struct clk *clk)
++int clk_cken_enable(struct clk *clk)
+ {
+- CKEN |= 1 << clk->cken;
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ CKEN |= 1 << cken;
++
++ return 0;
+ }
+
+ void clk_cken_disable(struct clk *clk)
+ {
+- CKEN &= ~(1 << clk->cken);
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ CKEN &= ~(1 << cken);
+ }
+
+-const struct clkops clk_cken_ops = {
+- .enable = clk_cken_enable,
+- .disable = clk_cken_disable,
+-};
+-
+ static struct clk common_clks[] = {
+ {
+ .name = "GPIO27_CLK",
+- .ops = &clk_gpio27_ops,
+ .rate = 3686400,
++ .owner = THIS_MODULE,
++ .enable = clk_gpio27_enable,
++ .disable = clk_gpio27_disable,
+ },
+ };
+
+-void clks_register(struct clk *clks, size_t num)
+-{
+- int i;
+-
+- mutex_lock(&clocks_mutex);
+- for (i = 0; i < num; i++)
+- list_add(&clks[i].node, &clocks);
+- mutex_unlock(&clocks_mutex);
+-}
+-
+ static int __init clk_init(void)
+ {
+ clks_register(common_clks, ARRAY_SIZE(common_clks));
+diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h
+index bc6b77e..5d0d067 100644
+--- a/arch/arm/mach-pxa/clock.h
++++ b/arch/arm/mach-pxa/clock.h
+@@ -1,43 +1,47 @@
+-struct clk;
++#include <linux/clklib.h>
++#include <linux/seq_file.h>
+
+-struct clkops {
+- void (*enable)(struct clk *);
+- void (*disable)(struct clk *);
+- unsigned long (*getrate)(struct clk *);
++struct clk_cken_priv {
++ unsigned int cken;
+ };
+
+-struct clk {
+- struct list_head node;
+- const char *name;
+- struct device *dev;
+- const struct clkops *ops;
+- unsigned long rate;
+- unsigned int cken;
+- unsigned int delay;
+- unsigned int enabled;
+-};
+-
+-#define INIT_CKEN(_name, _cken, _rate, _delay, _dev) \
++#define INIT_CKEN(_name, _cken, _rate, _delay) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = &clk_cken_ops, \
++ .enable = clk_cken_enable, \
++ .disable = clk_cken_disable, \
+ .rate = _rate, \
+- .cken = CKEN_##_cken, \
+ .delay = _delay, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+-#define INIT_CK(_name, _cken, _ops, _dev) \
++#define INIT_CK(_name, _cken, _getrate) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = _ops, \
+- .cken = CKEN_##_cken, \
++ .enable = clk_cken_enable, \
++ .disable = clk_cken_disable, \
++ .getrate = _getrate, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+-extern const struct clkops clk_cken_ops;
+-
+-void clk_cken_enable(struct clk *clk);
++int clk_cken_enable(struct clk *clk);
+ void clk_cken_disable(struct clk *clk);
+
+ void clks_register(struct clk *clks, size_t num);
++
++static int __maybe_unused clk_dev_can_get(struct clk *clk, struct device *dev)
++{
++ return (dev == clk->priv);
++}
++
++static int __maybe_unused clk_dev_format(struct clk *clk, struct seq_file *s)
++{
++ BUG_ON(!clk->priv);
++ seq_puts(s, "for device ");
++ seq_puts(s, ((struct device *)clk->priv)->bus_id);
++ return 0;
++}
+diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
+index 5988d99..ed3719b 100644
+--- a/arch/arm/mach-pxa/pxa25x.c
++++ b/arch/arm/mach-pxa/pxa25x.c
+@@ -100,40 +100,50 @@ static unsigned long clk_pxa25x_lcd_getrate(struct clk *clk)
+ return pxa25x_get_memclk_frequency_10khz() * 10000;
+ }
+
+-static const struct clkops clk_pxa25x_lcd_ops = {
+- .enable = clk_cken_enable,
+- .disable = clk_cken_disable,
+- .getrate = clk_pxa25x_lcd_getrate,
+-};
+-
+ /*
+ * 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz)
+ * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
+ * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly)
+ */
+-static struct clk pxa25x_hwuart_clk =
+- INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev)
+-;
++static struct clk pxa25x_hwuart_clk[] = {
++ INIT_CKEN("HWUARTCLK", HWUART, 14745600, 1),
++ {
++ .parent = &pxa25x_hwuart_clk[0],
++ .name = "UARTCLK",
++ .can_get = clk_dev_can_get,
++ .priv = &pxa_device_hwuart.dev,
++ },
++};
+
+ static struct clk pxa25x_clks[] = {
+- INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev),
+- INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
+- INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
+- INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
+- INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
+- INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
+- INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
+-
+- INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev),
+- INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev),
+- INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev),
++ INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_getrate),
++ INIT_CKEN("FFUARTCLK", FFUART, 14745600, 1),
++ INIT_CKEN("BTUARTCLK", BTUART, 14745600, 1),
++ INIT_CKEN("STUARTCLK", STUART, 14745600, 1),
++ INIT_CKEN("UDCCLK", USB, 47923000, 5),
++ INIT_CKEN("MMCCLK", MMC, 19169000, 0),
++ INIT_CKEN("I2CCLK", I2C, 31949000, 0),
++
++ INIT_CKEN("SSP_CLK", SSP, 3686400, 0),
++ INIT_CKEN("NSSPCLK", NSSP, 3686400, 0),
++ INIT_CKEN("ASSPCLK", ASSP, 3686400, 0),
+
+ /*
+- INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+- INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+- INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL),
++ INIT_CKEN("PWMCLK", PWM0, 3686400, 0),
++ INIT_CKEN("PWMCLK", PWM0, 3686400, 0),
++ INIT_CKEN("I2SCLK", I2S, 14745600, 0),
+ */
+- INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
++ INIT_CKEN("FICPCLK", FICP, 47923000, 0),
++};
++
++static struct clk_function __initdata pxa25x_clk_funcs[] = {
++ CLK_FUNC("FFUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_ffuart.dev, clk_dev_format),
++ CLK_FUNC("BTUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_btuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_stuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "SIRCLK", NULL, NULL, NULL),
++ CLK_FUNC("SSP_CLK", "SSPCLK", clk_dev_can_get, &pxa25x_device_ssp.dev, clk_dev_format),
++ CLK_FUNC("NSSPCLK", "SSPCLK", clk_dev_can_get, &pxa25x_device_nssp.dev, clk_dev_format),
++ CLK_FUNC("ASSPCLK", "SSPCLK", clk_dev_can_get, &pxa25x_device_assp.dev, clk_dev_format),
+ };
+
+ #ifdef CONFIG_PM
+@@ -313,11 +323,13 @@ static int __init pxa25x_init(void)
+ int ret = 0;
+
+ /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
+- if (cpu_is_pxa25x())
+- clks_register(&pxa25x_hwuart_clk, 1);
++ if (cpu_is_pxa25x()) {
++ clks_register(pxa25x_hwuart_clk, ARRAY_SIZE(pxa25x_hwuart_clk));
++ }
+
+ if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
+ clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
++ clk_alloc_functions(pxa25x_clk_funcs, ARRAY_SIZE(pxa25x_clk_funcs));
+
+ if ((ret = pxa_init_dma(16)))
+ return ret;
+diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
+index 30ca4fd..c51e7b2 100644
+--- a/arch/arm/mach-pxa/pxa27x.c
++++ b/arch/arm/mach-pxa/pxa27x.c
+@@ -126,44 +126,48 @@ static unsigned long clk_pxa27x_lcd_getrate(struct clk *clk)
+ return pxa27x_get_lcdclk_frequency_10khz() * 10000;
+ }
+
+-static const struct clkops clk_pxa27x_lcd_ops = {
+- .enable = clk_cken_enable,
+- .disable = clk_cken_disable,
+- .getrate = clk_pxa27x_lcd_getrate,
+-};
+-
+ static struct clk pxa27x_clks[] = {
+- INIT_CK("LCDCLK", LCD, &clk_pxa27x_lcd_ops, &pxa_device_fb.dev),
+- INIT_CK("CAMCLK", CAMERA, &clk_pxa27x_lcd_ops, NULL),
++ INIT_CK("LCDCLK", LCD, &clk_pxa27x_lcd_getrate),
++ INIT_CK("CAMCLK", CAMERA, &clk_pxa27x_lcd_getrate),
+
+- INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+- INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+- INIT_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
++ INIT_CKEN("FFUARTCLK", FFUART, 14857000, 1),
++ INIT_CKEN("BTUARTCLK", BTUART, 14857000, 1),
++ INIT_CKEN("STUARTCLK", STUART, 14857000, 1),
+
+- INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev),
+- INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+- INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa_device_udc.dev),
+- INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev),
+- INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev),
++ INIT_CKEN("I2SCLK", I2S, 14682000, 0),
++ INIT_CKEN("I2CCLK", I2C, 32842000, 0),
++ INIT_CKEN("UDCCLK", USB, 48000000, 5),
++ INIT_CKEN("MMCCLK", MMC, 19500000, 0),
++ INIT_CKEN("FICPCLK", FICP, 48000000, 0),
+
+- INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev),
+- INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
++ INIT_CKEN("USBCLK", USBHOST, 48000000, 0),
++ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0),
++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0),
+
+- INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
+- INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
+- INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
++ INIT_CKEN("SSP1CLK", SSP1, 13000000, 0),
++ INIT_CKEN("SSP2CLK", SSP2, 13000000, 0),
++ INIT_CKEN("SSP3CLK", SSP3, 13000000, 0),
+
+ /*
+- INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+- INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
+- INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL),
+- INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL),
+- INIT_CKEN("IMCLK", IM, 0, 0, NULL),
+- INIT_CKEN("MEMCLK", MEMC, 0, 0, NULL),
++ INIT_CKEN("PWMCLK", PWM0, 13000000, 0),
++ INIT_CKEN("MSLCLK", MSL, 48000000, 0),
++ INIT_CKEN("USIMCLK", USIM, 48000000, 0),
++ INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0),
++ INIT_CKEN("IMCLK", IM, 0, 0),
++ INIT_CKEN("MEMCLK", MEMC, 0, 0),
+ */
+ };
+
++static struct clk_function __initdata pxa27x_clk_funcs[] = {
++ CLK_FUNC("FFUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_ffuart.dev, clk_dev_format),
++ CLK_FUNC("BTUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_btuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_stuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "SIRCLK", NULL, NULL, NULL),
++ CLK_FUNC("SSP1CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp1.dev, clk_dev_format),
++ CLK_FUNC("SSP2CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp2.dev, clk_dev_format),
++ CLK_FUNC("SSP3CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp3.dev, clk_dev_format),
++};
++
+ #ifdef CONFIG_PM
+
+ #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x
+@@ -453,6 +457,7 @@ static int __init pxa27x_init(void)
+ int ret = 0;
+ if (cpu_is_pxa27x()) {
+ clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks));
++ clk_alloc_functions(pxa27x_clk_funcs, ARRAY_SIZE(pxa27x_clk_funcs));
+
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
+index ccab9da..0f8bbf3 100644
+--- a/arch/arm/mach-pxa/pxa3xx.c
++++ b/arch/arm/mach-pxa/pxa3xx.c
+@@ -122,27 +122,31 @@ static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk)
+ return hsio_clk;
+ }
+
+-static void clk_pxa3xx_cken_enable(struct clk *clk)
++static int clk_pxa3xx_cken_enable(struct clk *clk)
+ {
+- unsigned long mask = 1ul << (clk->cken & 0x1f);
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ unsigned long mask = 1ul << (cken & 0x1f);
+
+ local_irq_disable();
+
+- if (clk->cken < 32)
++ if (cken < 32)
+ CKENA |= mask;
+ else
+ CKENB |= mask;
+
+ local_irq_enable();
++
++ return 0;
+ }
+
+ static void clk_pxa3xx_cken_disable(struct clk *clk)
+ {
+- unsigned long mask = 1ul << (clk->cken & 0x1f);
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ unsigned long mask = 1ul << (cken & 0x1f);
+
+ local_irq_disable();
+
+- if (clk->cken < 32)
++ if (cken < 32)
+ CKENA &= ~mask;
+ else
+ CKENB &= ~mask;
+@@ -150,55 +154,63 @@ static void clk_pxa3xx_cken_disable(struct clk *clk)
+ local_irq_enable();
+ }
+
+-static const struct clkops clk_pxa3xx_cken_ops = {
+- .enable = clk_pxa3xx_cken_enable,
+- .disable = clk_pxa3xx_cken_disable,
+-};
+-
+-static const struct clkops clk_pxa3xx_hsio_ops = {
+- .enable = clk_pxa3xx_cken_enable,
+- .disable = clk_pxa3xx_cken_disable,
+- .getrate = clk_pxa3xx_hsio_getrate,
+-};
+-
+-#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
++#define PXA3xx_CKEN(_name, _cken, _rate, _delay) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = &clk_pxa3xx_cken_ops, \
++ .enable = clk_pxa3xx_cken_enable, \
++ .disable = clk_pxa3xx_cken_disable, \
+ .rate = _rate, \
+- .cken = CKEN_##_cken, \
+ .delay = _delay, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+-#define PXA3xx_CK(_name, _cken, _ops, _dev) \
++#define PXA3xx_CK(_name, _cken, _getrate) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = _ops, \
+- .cken = CKEN_##_cken, \
++ .enable = clk_pxa3xx_cken_enable, \
++ .disable = clk_pxa3xx_cken_disable, \
++ .getrate = _getrate, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+ static struct clk pxa3xx_clks[] = {
+- PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
+- PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
++ PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_getrate),
++ PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_getrate),
+
+- PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+- PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+- PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
++ PXA3xx_CKEN("FFUARTCLK", FFUART, 14857000, 1),
++ PXA3xx_CKEN("BTUARTCLK", BTUART, 14857000, 1),
++ PXA3xx_CKEN("STUARTCLK", STUART, 14857000, 1),
+
+- PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+- PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
+- PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
++ PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0),
++ PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5),
++ PXA3xx_CKEN("USBCLK", USBH, 48000000, 0),
+
+- PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
+- PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
+- PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
+- PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
++ PXA3xx_CKEN("SSP1CLK", SSP1, 13000000, 0),
++ PXA3xx_CKEN("SSP2CLK", SSP2, 13000000, 0),
++ PXA3xx_CKEN("SSP3CLK", SSP3, 13000000, 0),
++ PXA3xx_CKEN("SSP4CLK", SSP4, 13000000, 0),
++
++ PXA3xx_CKEN("MMC1CLK", MMC1, 19500000, 0),
++ PXA3xx_CKEN("MMC2CLK", MMC2, 19500000, 0),
++ PXA3xx_CKEN("MMC3CLK", MMC3, 19500000, 0),
++};
+
+- PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
+- PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
+- PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
++static struct clk_function __initdata pxa3xx_clk_funcs[] = {
++ CLK_FUNC("FFUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_ffuart.dev, clk_dev_format),
++ CLK_FUNC("BTUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_btuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_stuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "SIRCLK", NULL, NULL, NULL),
++ CLK_FUNC("SSP1CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp1.dev, clk_dev_format),
++ CLK_FUNC("SSP2CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp2.dev, clk_dev_format),
++ CLK_FUNC("SSP3CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp3.dev, clk_dev_format),
++ CLK_FUNC("SSP4CLK", "SSPCLK", clk_dev_can_get, &pxa3xx_device_ssp4.dev, clk_dev_format),
++ CLK_FUNC("MMC1CLK", "MMCCLK", clk_dev_can_get, &pxa_device_mci.dev, clk_dev_format),
++ CLK_FUNC("MMC2CLK", "MMCCLK", clk_dev_can_get, &pxa3xx_device_mci2.dev, clk_dev_format),
++ CLK_FUNC("MMC3CLK", "MMCCLK", clk_dev_can_get, &pxa3xx_device_mci3.dev, clk_dev_format),
+ };
+
+ #ifdef CONFIG_PM
+@@ -255,6 +267,7 @@ static int __init pxa3xx_init(void)
+
+ if (cpu_is_pxa3xx()) {
+ clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks));
++ clk_alloc_functions(pxa3xx_clk_funcs, ARRAY_SIZE(pxa3xx_clk_funcs));
+
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch
new file mode 100644
index 0000000000..a605735df0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch
@@ -0,0 +1,26 @@
+From 70dfe7e736467af6242c61092cb64f44d2fd50e3 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:05 +0300
+Subject: [PATCH 42/64] Use correct clock for IrDA on pxa
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/net/irda/pxaficp_ir.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
+index 8c09344..36d2ec0 100644
+--- a/drivers/net/irda/pxaficp_ir.c
++++ b/drivers/net/irda/pxaficp_ir.c
+@@ -814,7 +814,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
+ si->dev = &pdev->dev;
+ si->pdata = pdev->dev.platform_data;
+
+- si->sir_clk = clk_get(&pdev->dev, "UARTCLK");
++ si->sir_clk = clk_get(&pdev->dev, "SIRCLK");
+ si->fir_clk = clk_get(&pdev->dev, "FICPCLK");
+ if (IS_ERR(si->sir_clk) || IS_ERR(si->fir_clk)) {
+ err = PTR_ERR(IS_ERR(si->sir_clk) ? si->sir_clk : si->fir_clk);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch
new file mode 100644
index 0000000000..22b8414b2d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch
@@ -0,0 +1,153 @@
+From 3932e0f5c4c05200c030b60606ed2eb83550f4bb Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:04 +0300
+Subject: [PATCH 43/64] Use clocklib for sa1100 sub-arch.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-sa1100/clock.c | 95 ++---------------------------------------
+ 2 files changed, 6 insertions(+), 90 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 47f3c73..fa47201 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -370,6 +370,7 @@ config ARCH_SA1100
+ select ARCH_MTD_XIP
+ select GENERIC_GPIO
+ select GENERIC_TIME
++ select HAVE_CLOCK_LIB
+ help
+ Support for StrongARM 11x0 based boards.
+
+diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
+index fc97fe5..6b3cc51 100644
+--- a/arch/arm/mach-sa1100/clock.c
++++ b/arch/arm/mach-sa1100/clock.c
+@@ -8,83 +8,13 @@
+ #include <linux/err.h>
+ #include <linux/string.h>
+ #include <linux/clk.h>
++#include <linux/clklib.h>
+ #include <linux/spinlock.h>
+ #include <linux/mutex.h>
+
+ #include <asm/hardware.h>
+
+-/*
+- * Very simple clock implementation - we only have one clock to
+- * deal with at the moment, so we only match using the "name".
+- */
+-struct clk {
+- struct list_head node;
+- unsigned long rate;
+- const char *name;
+- unsigned int enabled;
+- void (*enable)(void);
+- void (*disable)(void);
+-};
+-
+-static LIST_HEAD(clocks);
+-static DEFINE_MUTEX(clocks_mutex);
+-static DEFINE_SPINLOCK(clocks_lock);
+-
+-struct clk *clk_get(struct device *dev, const char *id)
+-{
+- struct clk *p, *clk = ERR_PTR(-ENOENT);
+-
+- mutex_lock(&clocks_mutex);
+- list_for_each_entry(p, &clocks, node) {
+- if (strcmp(id, p->name) == 0) {
+- clk = p;
+- break;
+- }
+- }
+- mutex_unlock(&clocks_mutex);
+-
+- return clk;
+-}
+-EXPORT_SYMBOL(clk_get);
+-
+-void clk_put(struct clk *clk)
+-{
+-}
+-EXPORT_SYMBOL(clk_put);
+-
+-int clk_enable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (clk->enabled++ == 0)
+- clk->enable();
+- spin_unlock_irqrestore(&clocks_lock, flags);
+- return 0;
+-}
+-EXPORT_SYMBOL(clk_enable);
+-
+-void clk_disable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- WARN_ON(clk->enabled == 0);
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (--clk->enabled == 0)
+- clk->disable();
+- spin_unlock_irqrestore(&clocks_lock, flags);
+-}
+-EXPORT_SYMBOL(clk_disable);
+-
+-unsigned long clk_get_rate(struct clk *clk)
+-{
+- return clk->rate;
+-}
+-EXPORT_SYMBOL(clk_get_rate);
+-
+-
+-static void clk_gpio27_enable(void)
++static int clk_gpio27_enable(struct clk *clk)
+ {
+ /*
+ * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111:
+@@ -93,9 +23,11 @@ static void clk_gpio27_enable(void)
+ GAFR |= GPIO_32_768kHz;
+ GPDR |= GPIO_32_768kHz;
+ TUCR = TUCR_3_6864MHz;
++
++ return 0;
+ }
+
+-static void clk_gpio27_disable(void)
++static void clk_gpio27_disable(struct clk *clk)
+ {
+ TUCR = 0;
+ GPDR &= ~GPIO_32_768kHz;
+@@ -109,23 +41,6 @@ static struct clk clk_gpio27 = {
+ .disable = clk_gpio27_disable,
+ };
+
+-int clk_register(struct clk *clk)
+-{
+- mutex_lock(&clocks_mutex);
+- list_add(&clk->node, &clocks);
+- mutex_unlock(&clocks_mutex);
+- return 0;
+-}
+-EXPORT_SYMBOL(clk_register);
+-
+-void clk_unregister(struct clk *clk)
+-{
+- mutex_lock(&clocks_mutex);
+- list_del(&clk->node);
+- mutex_unlock(&clocks_mutex);
+-}
+-EXPORT_SYMBOL(clk_unregister);
+-
+ static int __init clk_init(void)
+ {
+ clk_register(&clk_gpio27);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch
new file mode 100644
index 0000000000..5ca8228604
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch
@@ -0,0 +1,26 @@
+From 03fdebde257197c13c0d10882e16a2a888ab4e0a Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sat, 2 Feb 2008 20:23:01 +0300
+Subject: [PATCH 44/64] fix tmio_mmc debug compilation
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mmc/host/tmio_mmc.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
+index 735c386..b0d38e2 100644
+--- a/drivers/mmc/host/tmio_mmc.c
++++ b/drivers/mmc/host/tmio_mmc.c
+@@ -329,7 +329,7 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid)
+ if (!ireg) {
+ disable_mmc_irqs(ctl, status & ~irq_mask);
+ #ifdef CONFIG_MMC_DEBUG
+- WARN("tmio_mmc: Spurious MMC irq, disabling! 0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
++ printk(KERN_WARNING "tmio_mmc: Spurious MMC irq, disabling! 0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
+ debug_status(status);
+ #endif
+ goto out;
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0045-Update-tmio_ohci.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0045-Update-tmio_ohci.patch
new file mode 100644
index 0000000000..10f483b89d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0045-Update-tmio_ohci.patch
@@ -0,0 +1,416 @@
+From fe3c05491370965eb821aedc95f771b86ebab3ab Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:01:44 +0300
+Subject: [PATCH 45/64] Update tmio_ohci:
+ Ports management.
+ Basic support for ohci suspend/resume.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/tc6393xb.c | 40 ++++++++
+ drivers/usb/host/ohci-tmio.c | 206 +++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 235 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 9439f39..5d17687 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -224,6 +224,44 @@ static int tc6393xb_ohci_enable(struct platform_device *ohci)
+ return 0;
+ }
+
++static int tc6393xb_ohci_suspend(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 0;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_ohci_resume(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 1;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
+ static int tc6393xb_fb_disable(struct platform_device *fb)
+ {
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+@@ -423,6 +461,8 @@ static struct mfd_cell tc6393xb_cells[] = {
+ .name = "tmio-ohci",
+ .enable = tc6393xb_ohci_enable,
+ .disable = tc6393xb_ohci_disable,
++ .suspend = tc6393xb_ohci_suspend,
++ .resume = tc6393xb_ohci_resume,
+ .num_resources = ARRAY_SIZE(tc6393xb_ohci_resources),
+ .resources = tc6393xb_ohci_resources,
+ },
+diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
+index be609f3..65e3cd3 100644
+--- a/drivers/usb/host/ohci-tmio.c
++++ b/drivers/usb/host/ohci-tmio.c
+@@ -75,10 +75,13 @@ struct tmio_uhccr {
+ u8 x07[3];
+ } __attribute__((packed));
+
++#define MAX_TMIO_OHCI_PORTS 3
++
+ #define UHCCR_PM_GKEN 0x0001
+ #define UHCCR_PM_CKRNEN 0x0002
+ #define UHCCR_PM_USBPW1 0x0004
+ #define UHCCR_PM_USBPW2 0x0008
++#define UHCCR_PM_USBPW3 0x0008
+ #define UHCCR_PM_PMEE 0x0100
+ #define UHCCR_PM_PMES 0x8000
+
+@@ -86,44 +89,96 @@ struct tmio_uhccr {
+
+ struct tmio_hcd {
+ struct tmio_uhccr __iomem *ccr;
++ spinlock_t lock; /* protects RMW cycles and disabled_ports data */
++ bool disabled_ports[MAX_TMIO_OHCI_PORTS];
+ };
+
+ #define hcd_to_tmio(hcd) ((struct tmio_hcd *)(hcd_to_ohci(hcd) + 1))
+ #define ohci_to_tmio(ohci) ((struct tmio_hcd *)(ohci + 1))
+
++struct indexed_device_attribute{
++ struct device_attribute dev_attr;
++ int index;
++};
++#define to_indexed_dev_attr(_dev_attr) \
++ container_of(_dev_attr, struct indexed_device_attribute, dev_attr)
++
++#define INDEXED_ATTR(_name, _mode, _show, _store, _index) \
++ { .dev_attr = __ATTR(_name ## _index, _mode, _show, _store), \
++ .index = _index }
++
++#define INDEXED_DEVICE_ATTR(_name, _mode, _show, _store, _index) \
++struct indexed_device_attribute dev_attr_##_name ## _index \
++ = INDEXED_ATTR(_name, _mode, _show, _store, _index)
++
++static bool disabled_tmio_ports[MAX_TMIO_OHCI_PORTS];
++module_param_array(disabled_tmio_ports, bool, NULL, 0644);
++MODULE_PARM_DESC(disabled_tmio_ports,
++ "disable specified TC6393 usb ports (default: all enabled)");
++
+ /*-------------------------------------------------------------------------*/
+
++static void tmio_write_pm(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ u16 pm;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tmio->lock, flags);
++
++ pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN |
++ UHCCR_PM_PMEE | UHCCR_PM_PMES;
++
++ if (tmio->disabled_ports[0])
++ pm |= UHCCR_PM_USBPW1;
++ if (tmio->disabled_ports[1])
++ pm |= UHCCR_PM_USBPW2;
++ if (tmio->disabled_ports[2])
++ pm |= UHCCR_PM_USBPW3;
++
++ iowrite16(pm, &ccr->pm);
++ spin_unlock_irqrestore(&tmio->lock, flags);
++}
++
+ static void tmio_stop_hc(struct platform_device *dev)
+ {
+ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
+ struct tmio_uhccr __iomem *ccr = tmio->ccr;
+ u16 pm;
+
+- pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN | UHCCR_PM_USBPW1 | UHCCR_PM_USBPW2;
++ pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN;
++ switch (ohci->num_ports) {
++ default:
++ dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports);
++ case 3:
++ pm |= UHCCR_PM_USBPW3;
++ case 2:
++ pm |= UHCCR_PM_USBPW2;
++ case 1:
++ pm |= UHCCR_PM_USBPW1;
++ }
+ iowrite8(0, &ccr->intc);
+ iowrite8(0, &ccr->ilme);
+ iowrite16(0, &ccr->basel);
+ iowrite16(0, &ccr->baseh);
+- iowrite16(pm, &ccr->pm);
++ iowrite16(pm, &ccr->pm);
+
+ cell->disable(dev);
+ }
+
+ static void tmio_start_hc(struct platform_device *dev)
+ {
+- struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
+ struct tmio_uhccr __iomem *ccr = tmio->ccr;
+- u16 pm;
+ unsigned long base = hcd->rsrc_start;
+
+- pm = UHCCR_PM_CKRNEN | UHCCR_PM_GKEN | UHCCR_PM_PMEE | UHCCR_PM_PMES;
+- cell->enable(dev);
+-
+- iowrite16(pm, &ccr->pm);
++ tmio_write_pm(dev);
+ iowrite16(base, &ccr->basel);
+ iowrite16(base >> 16, &ccr->baseh);
+ iowrite8(1, &ccr->ilme);
+@@ -133,9 +188,56 @@ static void tmio_start_hc(struct platform_device *dev)
+ ioread8(&ccr->revid), hcd->rsrc_start, hcd->irq);
+ }
+
++static ssize_t tmio_disabled_port_show(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct usb_hcd *hcd = dev_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ int index = to_indexed_dev_attr(attr)->index;
++ return snprintf(buf, PAGE_SIZE, "%c",
++ tmio->disabled_ports[index-1]? 'Y': 'N');
++}
++
++static ssize_t tmio_disabled_port_store(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct usb_hcd *hcd = dev_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ int index = to_indexed_dev_attr(attr)->index;
++
++ if (!count)
++ return -EINVAL;
++
++ switch (buf[0]) {
++ case 'y': case 'Y': case '1':
++ tmio->disabled_ports[index-1] = true;
++ break;
++ case 'n': case 'N': case '0':
++ tmio->disabled_ports[index-1] = false;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ tmio_write_pm(to_platform_device(dev));
++
++ return 1;
++}
++
++
++static INDEXED_DEVICE_ATTR(disabled_usb_port, S_IRUGO | S_IWUSR,
++ tmio_disabled_port_show, tmio_disabled_port_store, 1);
++static INDEXED_DEVICE_ATTR(disabled_usb_port, S_IRUGO | S_IWUSR,
++ tmio_disabled_port_show, tmio_disabled_port_store, 2);
++static INDEXED_DEVICE_ATTR(disabled_usb_port, S_IRUGO | S_IWUSR,
++ tmio_disabled_port_show, tmio_disabled_port_store, 3);
++
+ static int usb_hcd_tmio_probe(const struct hc_driver *driver,
+ struct platform_device *dev)
+ {
++ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct resource *config = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONFIG);
+ struct resource *regs = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONTROL);
+ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
+@@ -159,6 +261,12 @@ static int usb_hcd_tmio_probe(const struct hc_driver *driver,
+
+ tmio = hcd_to_tmio(hcd);
+
++ spin_lock_init(&tmio->lock);
++
++ memcpy(tmio->disabled_ports,
++ disabled_tmio_ports,
++ sizeof(disabled_tmio_ports));
++
+ tmio->ccr = ioremap(config->start, config->end - config->start + 1);
+ if (!tmio->ccr) {
+ retval = -ENOMEM;
+@@ -183,17 +291,46 @@ static int usb_hcd_tmio_probe(const struct hc_driver *driver,
+ if (retval)
+ goto err_dmabounce_register_dev;
+
++ retval = cell->enable(dev);
++ if (retval)
++ goto err_enable;
++
+ tmio_start_hc(dev);
+ ohci = hcd_to_ohci(hcd);
+ ohci_hcd_init(ohci);
+
+ retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
++ if (retval)
++ goto err_add_hcd;
++
++ switch (ohci->num_ports) {
++ default:
++ dev_err(&dev->dev, "Unsupported amount of ports: %d\n",
++ ohci->num_ports);
++ case 3:
++ retval |= device_create_file(&dev->dev,
++ &dev_attr_disabled_usb_port3.dev_attr);
++ case 2:
++ retval |= device_create_file(&dev->dev,
++ &dev_attr_disabled_usb_port2.dev_attr);
++ case 1:
++ retval |= device_create_file(&dev->dev,
++ &dev_attr_disabled_usb_port1.dev_attr);
++ }
+
+ if (retval == 0)
+ return retval;
+
+- tmio_stop_hc(dev);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port3.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port2.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port1.dev_attr);
++
++ usb_remove_hcd(hcd);
+
++err_add_hcd:
++ tmio_stop_hc(dev);
++ cell->disable(dev);
++err_enable:
+ dmabounce_unregister_dev(&dev->dev);
+ err_dmabounce_register_dev:
+ dma_release_declared_memory(&dev->dev);
+@@ -212,6 +349,9 @@ static void usb_hcd_tmio_remove(struct usb_hcd *hcd, struct platform_device *dev
+ {
+ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
+
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port3.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port2.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port1.dev_attr);
+ usb_remove_hcd(hcd);
+ tmio_stop_hc(dev);
+ dmabounce_unregister_dev(&dev->dev);
+@@ -297,13 +437,22 @@ static u64 dma_mask = DMA_32BIT_MASK;
+ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
+ {
+ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++ int retval;
+
+ dev->dev.dma_mask = &dma_mask;
+ dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+
++ /* FIXME: move dmabounce checkers to tc6393xb core? */
+ dmabounce_register_checker(tmio_dmabounce_check, sram);
+
+- return usb_hcd_tmio_probe(&ohci_tmio_hc_driver, dev);
++ retval = usb_hcd_tmio_probe(&ohci_tmio_hc_driver, dev);
++
++ if (retval == 0)
++ return retval;
++
++ dmabounce_remove_checker(tmio_dmabounce_check, sram);
++
++ return retval;
+ }
+
+ static int ohci_hcd_tmio_drv_remove(struct platform_device *dev)
+@@ -323,14 +472,31 @@ static int ohci_hcd_tmio_drv_remove(struct platform_device *dev)
+ #ifdef CONFIG_PM
+ static int ohci_hcd_tmio_drv_suspend(struct platform_device *dev, pm_message_t state)
+ {
++ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ unsigned long flags;
++ u8 misc;
++ int ret;
+
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
+ ohci->next_statechange = jiffies;
+
+- tmio_stop_hc(dev);
++ spin_lock_irqsave(&tmio->lock, flags);
++
++ misc = ioread8(&ccr->misc);
++ misc |= 1 << 3; /* USSUSP */
++ iowrite8(misc, &ccr->misc);
++
++ spin_unlock_irqrestore(&tmio->lock, flags);
++
++ ret = cell->suspend(dev);
++ if (ret)
++ return ret;
++
+ hcd->state = HC_STATE_SUSPENDED;
+ dev->dev.power.power_state = PMSG_SUSPEND;
+
+@@ -339,15 +505,33 @@ static int ohci_hcd_tmio_drv_suspend(struct platform_device *dev, pm_message_t s
+
+ static int ohci_hcd_tmio_drv_resume(struct platform_device *dev)
+ {
++ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ unsigned long flags;
++ u8 misc;
++ int ret;
+
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
+ ohci->next_statechange = jiffies;
+
++ ret = cell->resume(dev);
++ if (ret)
++ return ret;
++
+ tmio_start_hc(dev);
+
++ spin_lock_irqsave(&tmio->lock, flags);
++
++ misc = ioread8(&ccr->misc);
++ misc &= ~(1 << 3); /* USSUSP */
++ iowrite8(misc, &ccr->misc);
++
++ spin_unlock_irqrestore(&tmio->lock, flags);
++
+ dev->dev.power.power_state = PMSG_ON;
+ usb_hcd_resume_root_hub(hcd);
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch
new file mode 100644
index 0000000000..c4b57cb2d1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch
@@ -0,0 +1,66 @@
+From edaab7ec86235871d8ad219a1d225ce12f67f8af Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:13:29 +0300
+Subject: [PATCH 46/64] patch tc6393xb-cleanup
+
+---
+ drivers/mfd/tc6393xb.c | 20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 5d17687..dfae61d 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -590,16 +590,8 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume)
+ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- int ret;
+ int i;
+
+- if (resume)
+- ret = tcpd->resume(dev);
+- else
+- ret = tcpd->enable(dev);
+- if (ret)
+- return ret;
+-
+ iowrite8(resume ?
+ tc6393xb->suspend_state.fer.raw :
+ 0, &scr->fer);
+@@ -664,6 +656,10 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ goto err_ioremap;
+ }
+
++ retval = tcpd->enable(dev);
++ if (retval)
++ goto err_enable;
++
+ retval = tc6393xb_hw_init(dev, 0);
+ if (retval)
+ goto err_hw_init;
+@@ -690,6 +686,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ tc6393xb_detach_irq(dev);
+
+ err_hw_init:
++ tcpd->disable(dev);
++err_enable:
+ iounmap(tc6393xb->scr);
+ err_ioremap:
+ release_resource(rscr);
+@@ -743,6 +741,12 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
+
+ static int tc6393xb_resume(struct platform_device *dev)
+ {
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ int ret = tcpd->resume(dev);
++
++ if (ret)
++ return ret;
++
+ return tc6393xb_hw_init(dev, 1);
+ }
+ #else
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch
new file mode 100644
index 0000000000..54e88253d1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch
@@ -0,0 +1,412 @@
+From c18b8e34c39ec0d395988318e6651076a748d6bd Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Tue, 12 Feb 2008 04:40:54 +0300
+Subject: [PATCH 47/64] tc6393xb: use bitmasks instead of bit-field structs
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/tc6393xb.c | 162 ++++++++++++++++++++++++-----------------
+ include/linux/mfd/tc6393xb.h | 63 +++-------------
+ 2 files changed, 107 insertions(+), 118 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index dfae61d..1a394e4 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -24,6 +24,31 @@
+ #include <linux/mfd/tmio.h>
+ #include <linux/mfd/tc6393xb.h>
+
++#define TC6393XB_FER_USBEN BIT(0) /* USB host enable */
++#define TC6393XB_FER_LCDCVEN BIT(1) /* polysilicon TFT enable */
++#define TC6393XB_FER_SLCDEN BIT(2) /* SLCD enable */
++
++enum pincontrol {
++ opendrain = 0,
++ tristate = 1,
++ pushpull = 2,
++ /* reserved = 3, */
++};
++
++#define TC6393XB_MCR_RDY_MASK (3 << 0)
++#define TC6393XB_MCR_RDY_OPENDRAIN (0 << 0)
++#define TC6393XB_MCR_RDY_TRISTATE (1 << 0)
++#define TC6393XB_MCR_RDY_PUSHPULL (2 << 0)
++#define TC6393XB_MCR_RDY_UNK BIT(2)
++#define TC6393XB_MCR_RDY_EN BIT(3)
++#define TC6393XB_MCR_INT_MASK (3 << 4)
++#define TC6393XB_MCR_INT_OPENDRAIN (0 << 4)
++#define TC6393XB_MCR_INT_TRISTATE (1 << 4)
++#define TC6393XB_MCR_INT_PUSHPULL (2 << 4)
++#define TC6393XB_MCR_INT_UNK BIT(6)
++#define TC6393XB_MCR_INT_EN BIT(7)
++/* bits 8 - 16 are unknown */
++
+ struct tc6393xb_scr {
+ u8 x00[8];
+ u8 revid; /* 0x08 Revision ID */
+@@ -74,8 +99,8 @@ struct tc6393xb {
+ spinlock_t lock; /* protects RMW cycles */
+
+ struct {
+- union tc6393xb_scr_fer fer;
+- union tc6393xb_scr_ccr ccr;
++ u8 fer;
++ u16 ccr;
+ u8 gpi_bcr[4];
+ } suspend_state;
+
+@@ -90,13 +115,13 @@ static int tc6393xb_mmc_enable(struct platform_device *mmc) {
+ struct platform_device *dev = to_platform_device(mmc->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.ck32ken = 1;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr |= TC6393XB_CCR_CK32K;
++ iowrite16(ccr, &scr->ccr);
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+ return 0;
+@@ -106,13 +131,13 @@ static int tc6393xb_mmc_disable(struct platform_device *mmc) {
+ struct platform_device *dev = to_platform_device(mmc->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.ck32ken = 0;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr &= ~TC6393XB_CCR_CK32K;
++ iowrite16(ccr, &scr->ccr);
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+ return 0;
+@@ -148,14 +173,17 @@ int tc6393xb_lcd_set_power(struct platform_device *fb, bool on)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_fer fer;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.slcden = on ? 1 : 0;
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ if (on)
++ fer |= TC6393XB_FER_SLCDEN;
++ else
++ fer &= ~TC6393XB_FER_SLCDEN;
++ iowrite8(fer, &scr->fer);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -181,19 +209,19 @@ static int tc6393xb_ohci_disable(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
+- union tc6393xb_scr_fer fer;
++ u16 ccr;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.usben = 0;
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ fer &= ~TC6393XB_FER_USBEN;
++ iowrite8(fer, &scr->fer);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 0;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr &= ~TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -205,19 +233,19 @@ static int tc6393xb_ohci_enable(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
+- union tc6393xb_scr_fer fer;
++ u16 ccr;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 1;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr |= TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.usben = 1;
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ fer |= TC6393XB_FER_USBEN;
++ iowrite8(fer, &scr->fer);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -229,14 +257,14 @@ static int tc6393xb_ohci_suspend(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 0;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr &= ~TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -248,14 +276,14 @@ static int tc6393xb_ohci_resume(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 1;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr |= TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -267,8 +295,8 @@ static int tc6393xb_fb_disable(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
+- union tc6393xb_scr_fer fer;
++ u16 ccr;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+@@ -276,14 +304,13 @@ static int tc6393xb_fb_disable(struct platform_device *fb)
+ /*
+ * FIXME: is this correct or it should be moved to other _disable?
+ */
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.slcden = 0;
+-/* fer.bits.lcdcven = 0; */
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ fer &= ~TC6393XB_FER_SLCDEN;
++ iowrite8(fer, &scr->fer);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = disable;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_OFF;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -295,14 +322,14 @@ static int tc6393xb_fb_enable(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = m48MHz;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_48;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -314,14 +341,14 @@ static int tc6393xb_fb_suspend(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = disable;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_OFF;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -333,14 +360,14 @@ static int tc6393xb_fb_resume(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = m48MHz;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_48;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -592,14 +619,15 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume)
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+ int i;
+
+- iowrite8(resume ?
+- tc6393xb->suspend_state.fer.raw :
+- 0, &scr->fer);
++ iowrite8(resume ? tc6393xb->suspend_state.fer : 0,
++ &scr->fer);
+ iowrite16(tcpd->scr_pll2cr, &scr->pll2cr);
+ iowrite16(resume?
+- tc6393xb->suspend_state.ccr.raw :
+- tcpd->scr_ccr.raw, &scr->ccr);
+- iowrite16(tcpd->scr_mcr.raw, &scr->mcr);
++ tc6393xb->suspend_state.ccr :
++ tcpd->scr_ccr, &scr->ccr);
++ iowrite16(TC6393XB_MCR_RDY_OPENDRAIN | TC6393XB_MCR_RDY_UNK | TC6393XB_MCR_RDY_EN |
++ TC6393XB_MCR_INT_OPENDRAIN | TC6393XB_MCR_INT_UNK | TC6393XB_MCR_INT_EN |
++ BIT(15), &scr->mcr);
+ iowrite16(tcpd->scr_gper, &scr->gper);
+ iowrite8(0, &scr->irr);
+ iowrite8(0xbf, &scr->imr);
+@@ -730,8 +758,8 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
+ int i;
+
+
+- tc6393xb->suspend_state.ccr.raw = ioread16(&scr->ccr);
+- tc6393xb->suspend_state.fer.raw = ioread8(&scr->fer);
++ tc6393xb->suspend_state.ccr = ioread16(&scr->ccr);
++ tc6393xb->suspend_state.fer = ioread8(&scr->fer);
+ for (i = 0; i < 4; i++)
+ tc6393xb->suspend_state.gpi_bcr[i] =
+ ioread8(scr->gpi_bcr + i);
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+index e699294..2c69f63 100644
+--- a/include/linux/mfd/tc6393xb.h
++++ b/include/linux/mfd/tc6393xb.h
+@@ -20,60 +20,21 @@
+ #include <linux/mfd-core.h>
+ #include <linux/mfd/tmio.h>
+
+-union tc6393xb_scr_fer {
+- u8 raw;
+-struct {
+- unsigned usben:1; /* D0 USB enable */
+- unsigned lcdcven:1; /* D1 polysylicon TFT enable */
+- unsigned slcden:1; /* D2 SLCD enable */
+-} __attribute__ ((packed)) bits;
+-} __attribute__ ((packed));
+-
+-union tc6393xb_scr_ccr {
+- u16 raw;
+-struct {
+- unsigned ck32ken:1; /* D0 SD host clock enable */
+- unsigned usbcken:1; /* D1 USB host clock enable */
+- unsigned x00:2;
+- unsigned sharp:1; /* D4 ??? set in Sharp's code */
+- unsigned x01:3;
+- enum { disable = 0,
+- m12MHz = 1,
+- m24MHz = 2,
+- m48MHz = 3,
+- } mclksel:3; /* D10-D8 LCD controller clock */
+- unsigned x02:1;
+- enum { h24MHz = 0,
+- h48MHz = 1,
+- } hclksel:2; /* D13-D12 host bus clock */
+- unsigned x03:2;
+-} __attribute__ ((packed)) bits;
+-} __attribute__ ((packed));
+-
+-enum pincontrol {
+- opendrain = 0,
+- tristate = 1,
+- pushpull = 2,
+- /* reserved = 3, */
+-};
+-
+-union tc6393xb_scr_mcr {
+- u16 raw;
+-struct {
+- enum pincontrol rdyst:2; /* D1-D0 HRDY control */
+- unsigned x00:1;
+- unsigned aren:1; /* D3 HRDY pull up resistance cut off */
+- enum pincontrol intst:2; /* D5-D4 #HINT control */
+- unsigned x01:1;
+- unsigned aien:1; /* D7 #HINT pull up resitance cut off */
+- unsigned x02:8;
+-} __attribute__ ((packed)) bits;
+-} __attribute__ ((packed));
++#define TC6393XB_CCR_CK32K BIT(0)
++#define TC6393XB_CCR_USBCK BIT(1)
++#define TC6393XB_CCR_UNK1 BIT(4)
++#define TC6393XB_CCR_MCLK_MASK (7 << 8)
++#define TC6393XB_CCR_MCLK_OFF (0 << 8)
++#define TC6393XB_CCR_MCLK_12 (1 << 8)
++#define TC6393XB_CCR_MCLK_24 (2 << 8)
++#define TC6393XB_CCR_MCLK_48 (3 << 8)
++#define TC6393XB_CCR_HCLK_MASK (3 << 12)
++#define TC6393XB_CCR_HCLK_24 (0 << 12)
++#define TC6393XB_CCR_HCLK_48 (1 << 12)
+
+ struct tc6393xb_platform_data {
+ u16 scr_pll2cr; /* PLL2 Control */
+- union tc6393xb_scr_ccr scr_ccr; /* Clock Control */
+- union tc6393xb_scr_mcr scr_mcr; /* Mode Control */
++ u16 scr_ccr; /* Clock Control */
+ u16 scr_gper; /* GP Enable */
+ u32 scr_gpo_doecr; /* GPO Data OE Control */
+ u32 scr_gpo_dsr; /* GPO Data Set */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch
new file mode 100644
index 0000000000..ef47d6cc21
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch
@@ -0,0 +1,225 @@
+From 4fb4d83c7090ea21619bb652f2ea9b5c8c0c453e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:42:58 +0300
+Subject: [PATCH 48/64] tc6393xb GPIO support
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/tc6393xb.c | 124 ++++++++++++++++++++++++++++++++++++++++--
+ include/linux/mfd/tc6393xb.h | 2 +-
+ 2 files changed, 119 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 1a394e4..9001687 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -49,6 +49,8 @@ enum pincontrol {
+ #define TC6393XB_MCR_INT_EN BIT(7)
+ /* bits 8 - 16 are unknown */
+
++#include <asm/gpio.h>
++
+ struct tc6393xb_scr {
+ u8 x00[8];
+ u8 revid; /* 0x08 Revision ID */
+@@ -96,6 +98,8 @@ struct tc6393xb_scr {
+ struct tc6393xb {
+ struct tc6393xb_scr __iomem *scr;
+
++ struct gpio_chip gpio;
++
+ spinlock_t lock; /* protects RMW cycles */
+
+ struct {
+@@ -513,6 +517,96 @@ static struct mfd_cell tc6393xb_cells[] = {
+
+ /*--------------------------------------------------------------------------*/
+
++static int tc6393xb_gpio_get(struct gpio_chip *chip,
++ unsigned offset)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ u32 mask = 1 << offset;
++
++ return tmio_ioread32(scr->gpo_dsr) & mask;
++}
++
++static void __tc6393xb_gpio_set(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ u32 dsr;
++
++ dsr = tmio_ioread32(scr->gpo_dsr);
++ if (value)
++ dsr |= (1L << offset);
++ else
++ dsr &= ~(1L << offset);
++
++ tmio_iowrite32(dsr, scr->gpo_dsr);
++}
++
++static void tc6393xb_gpio_set(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ __tc6393xb_gpio_set(chip, offset, value);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++}
++
++static int tc6393xb_gpio_direction_input(struct gpio_chip *chip,
++ unsigned offset)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++ u32 doecr;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ doecr = tmio_ioread32(scr->gpo_doecr);
++
++ doecr &= ~(1 << offset);
++
++ tmio_iowrite32(doecr, scr->gpo_doecr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_gpio_direction_output(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++ u32 doecr;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ doecr = tmio_ioread32(scr->gpo_doecr);
++
++ doecr |= (1 << offset);
++
++ tmio_iowrite32(doecr, scr->gpo_doecr);
++
++ __tc6393xb_gpio_set(chip, offset, value);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
+ static void
+ tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
+ {
+@@ -631,10 +725,8 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume)
+ iowrite16(tcpd->scr_gper, &scr->gper);
+ iowrite8(0, &scr->irr);
+ iowrite8(0xbf, &scr->imr);
+- iowrite16(tcpd->scr_gpo_dsr, scr->gpo_dsr + 0);
+- iowrite16(tcpd->scr_gpo_dsr >> 16, scr->gpo_dsr + 1);
+- iowrite16(tcpd->scr_gpo_doecr, scr->gpo_doecr + 0);
+- iowrite16(tcpd->scr_gpo_doecr >> 16, scr->gpo_doecr + 1);
++ tmio_iowrite32(tcpd->scr_gpo_dsr, &scr->gpo_dsr);
++ tmio_iowrite32(tcpd->scr_gpo_doecr, &scr->gpo_doecr);
+
+ if (resume)
+ for (i = 0; i < 4; i++)
+@@ -650,7 +742,7 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ struct tc6393xb *tc6393xb;
+ struct resource *iomem;
+ struct resource *rscr;
+- int retval;
++ int retval, temp;
+
+ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
+ if (!iomem)
+@@ -696,6 +788,18 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ ioread8(&tc6393xb->scr->revid),
+ (unsigned long) iomem->start, tc6393xb->irq);
+
++ tc6393xb->gpio.label = "tc6393xb";
++ tc6393xb->gpio.base = tcpd->gpio_base;
++ tc6393xb->gpio.ngpio = 16; /* FIXME: actually 32, but I'm not sure */
++ tc6393xb->gpio.set = tc6393xb_gpio_set;
++ tc6393xb->gpio.get = tc6393xb_gpio_get;
++ tc6393xb->gpio.direction_input = tc6393xb_gpio_direction_input;
++ tc6393xb->gpio.direction_output = tc6393xb_gpio_direction_output;
++
++ retval = gpiochip_add(&tc6393xb->gpio);
++ if (retval)
++ goto err_gpio_add;
++
+ if (tc6393xb->irq)
+ tc6393xb_attach_irq(dev);
+
+@@ -713,6 +817,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ if (tc6393xb->irq)
+ tc6393xb_detach_irq(dev);
+
++err_gpio_add:
++ temp = gpiochip_remove(&tc6393xb->gpio);
+ err_hw_init:
+ tcpd->disable(dev);
+ err_enable:
+@@ -734,6 +840,12 @@ static int __devexit tc6393xb_remove(struct platform_device *dev) {
+ if (tc6393xb->irq)
+ tc6393xb_detach_irq(dev);
+
++ ret = gpiochip_remove(&tc6393xb->gpio);
++ if (ret) {
++ dev_err(&dev->dev, "Can't remove gpio chip: %d\n", ret);
++ return ret;
++ }
++
+ ret = tcpd->disable(dev);
+
+ iounmap(tc6393xb->scr);
+@@ -804,7 +916,7 @@ static void __exit tc6393xb_exit(void)
+ platform_driver_unregister(&tc6393xb_driver);
+ }
+
+-module_init(tc6393xb_init);
++subsys_initcall(tc6393xb_init);
+ module_exit(tc6393xb_exit);
+
+ MODULE_LICENSE("GPL");
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+index 2c69f63..97c4c7c 100644
+--- a/include/linux/mfd/tc6393xb.h
++++ b/include/linux/mfd/tc6393xb.h
+@@ -45,6 +45,7 @@ struct tc6393xb_platform_data {
+ int (*resume)(struct platform_device *dev);
+
+ int irq_base; /* a base for cascaded irq */
++ int gpio_base;
+
+ struct tmio_nand_data *nand_data;
+ struct tmio_fb_data *fb_data;
+@@ -54,7 +55,6 @@ extern int tc6393xb_lcd_set_power(struct platform_device *fb_dev, bool on);
+ extern int tc6393xb_lcd_mode(struct platform_device *fb_dev,
+ struct fb_videomode *mode);
+
+-
+ /*
+ * Relative to irq_base
+ */
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch
new file mode 100644
index 0000000000..ff1186cb71
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch
@@ -0,0 +1,373 @@
+From 30588bdd5c5cdd9fbe269643f582862a76f09efb Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Tue, 12 Feb 2008 04:52:48 +0300
+Subject: [PATCH 49/64] platform support for TMIO on tosa
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 179 ++++++++++++++++++++++++++++++++++++++-
+ include/asm-arm/arch-pxa/irqs.h | 1 +
+ include/asm-arm/arch-pxa/tosa.h | 45 ++++++++--
+ sound/soc/pxa/tosa.c | 3 +-
+ 4 files changed, 216 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 5268e94..e2eec0f 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -18,7 +18,13 @@
+ #include <linux/major.h>
+ #include <linux/fs.h>
+ #include <linux/interrupt.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
+ #include <linux/mmc/host.h>
++#include <linux/mfd/tc6393xb.h>
++#include <linux/mfd/tmio.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
+ #include <linux/pm.h>
+ #include <linux/delay.h>
+ #include <linux/gpio_keys.h>
+@@ -298,12 +304,183 @@ static struct platform_device tosaled_device = {
+ .id = -1,
+ };
+
++/*
++ * Toshiba Mobile IO Controller
++ */
++static struct resource tc6393xb_resources[] = {
++ [0] = {
++ .start = TOSA_LCDC_PHYS,
++ .end = TOSA_LCDC_PHYS + 0x3ffffff,
++ .flags = IORESOURCE_MEM,
++ },
++
++ [1] = {
++ .start = TOSA_IRQ_GPIO_TC6393XB_INT,
++ .end = TOSA_IRQ_GPIO_TC6393XB_INT,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++
++static int tosa_tc6393xb_enable(struct platform_device *dev)
++{
++
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ reset_scoop_gpio(&tosascoop_device.dev, TOSA_SCOOP_TC6393XB_REST_IN); /* #PCLR */
++ pxa_gpio_mode(GPIO11_3_6MHz_MD);
++ pxa_gpio_mode(GPIO18_RDY_MD);
++ mdelay(1);
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ mdelay(10);
++ set_scoop_gpio(&tosascoop_device.dev, TOSA_SCOOP_TC6393XB_REST_IN); /* #PCLR */
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++
++ return 0;
++}
++
++static int tosa_tc6393xb_disable(struct platform_device *dev)
++{
++
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ reset_scoop_gpio(&tosascoop_device.dev, TOSA_SCOOP_TC6393XB_REST_IN); /* #PCLR */
++ pxa_gpio_mode(GPIO11_3_6MHz_MD|GPIO_OUT);
++ GPSR0 = GPIO_bit(GPIO11_3_6MHz);
++
++ return 0;
++}
++
++static int tosa_tc6393xb_resume(struct platform_device *dev)
++{
++
++ pxa_gpio_mode(GPIO11_3_6MHz_MD);
++ pxa_gpio_mode(GPIO18_RDY_MD);
++ mdelay(1);
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ mdelay(10);
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ mdelay(10);
++
++ return 0;
++}
++
++static int tosa_tc6393xb_suspend(struct platform_device *dev)
++{
++
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ pxa_gpio_mode(GPIO11_3_6MHz_MD|GPIO_OUT);
++ GPSR0 = GPIO_bit(GPIO11_3_6MHz);
++
++ return 0;
++}
++
++static struct mtd_partition tosa_nand_partition[] = {
++ {
++ .name = "smf",
++ .offset = 0,
++ .size = 7 * 1024 * 1024,
++ },
++ {
++ .name = "root",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 28 * 1024 * 1024,
++ },
++ {
++ .name = "home",
++ .offset = MTDPART_OFS_APPEND,
++ .size = MTDPART_SIZ_FULL,
++ },
++};
++
++static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
++
++static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = {
++ .options = 0,
++ .offs = 4,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++
++static struct tmio_nand_data tosa_tc6393xb_nand_config = {
++ .num_partitions = ARRAY_SIZE(tosa_nand_partition),
++ .partition = tosa_nand_partition,
++ .badblock_pattern = &tosa_tc6393xb_nand_bbt,
++};
++
++static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
++ {
++ .xres = 480,
++ .yres = 640,
++ .pixclock = 0x002cdf00,/* PLL divisor */
++ .left_margin = 0x004c,
++ .right_margin = 0x005b,
++ .upper_margin = 0x0001,
++ .lower_margin = 0x000d,
++ .hsync_len = 0x0002,
++ .vsync_len = 0x0001,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++ .vmode = FB_VMODE_NONINTERLACED,
++ },{
++ .xres = 240,
++ .yres = 320,
++ .pixclock = 0x00e7f203,/* PLL divisor */
++ .left_margin = 0x0024,
++ .right_margin = 0x002f,
++ .upper_margin = 0x0001,
++ .lower_margin = 0x000d,
++ .hsync_len = 0x0002,
++ .vsync_len = 0x0001,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++ .vmode = FB_VMODE_NONINTERLACED,
++ }
++};
++
++static struct tmio_fb_data tosa_tc6393xb_fb_config = {
++ .lcd_set_power = tc6393xb_lcd_set_power,
++ .lcd_mode = tc6393xb_lcd_mode,
++ .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
++ .modes = &tosa_tc6393xb_lcd_mode[0],
++};
++
++static struct tc6393xb_platform_data tosa_tc6393xb_setup = {
++ .scr_pll2cr = 0x0cc1,
++ .scr_ccr = TC6393XB_CCR_UNK1 | TC6393XB_CCR_HCLK_48,
++ .scr_gper = 0x3300,
++ .scr_gpo_dsr = TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF_JC,
++ .scr_gpo_doecr = TOSA_TC6393XB_GPO_OE,
++
++ .irq_base = IRQ_BOARD_START,
++
++ .enable = tosa_tc6393xb_enable,
++ .disable = tosa_tc6393xb_disable,
++ .suspend = tosa_tc6393xb_suspend,
++ .resume = tosa_tc6393xb_resume,
++
++ .nand_data = &tosa_tc6393xb_nand_config,
++ .fb_data = &tosa_tc6393xb_fb_config,
++};
++
++
++struct platform_device tc6393xb_device = {
++ .name = "tc6393xb",
++ .id = -1,
++ .dev = {
++ .platform_data = &tosa_tc6393xb_setup,
++ },
++ .num_resources = ARRAY_SIZE(tc6393xb_resources),
++ .resource = tc6393xb_resources,
++};
++EXPORT_SYMBOL(tc6393xb_device);
++
+ static struct platform_device *devices[] __initdata = {
+ &tosascoop_device,
+ &tosascoop_jc_device,
+ &tosakbd_device,
+ &tosa_gpio_keys_device,
+ &tosaled_device,
++ &tc6393xb_device,
+ };
+
+ static void tosa_poweroff(void)
+@@ -332,7 +509,7 @@ static void __init tosa_init(void)
+ arm_pm_restart = tosa_restart;
+
+ pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
+- pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
++ pxa_gpio_mode(TOSA_GPIO_TC6393XB_INT | GPIO_IN);
+ pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
+
+ /* setup sleep mode values */
+diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
+index b76ee6d..bf622d8 100644
+--- a/include/asm-arm/arch-pxa/irqs.h
++++ b/include/asm-arm/arch-pxa/irqs.h
+@@ -180,6 +180,7 @@
+ #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
+ #elif defined(CONFIG_ARCH_LUBBOCK) || \
+ defined(CONFIG_MACH_LOGICPD_PXA270) || \
++ defined(CONFIG_MACH_TOSA) || \
+ defined(CONFIG_MACH_MAINSTONE)
+ #define NR_IRQS (IRQ_BOARD_END)
+ #else
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index c05e4fa..1b202b2 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -20,11 +20,35 @@
+ /* Jacket Scoop */
+ #define TOSA_SCOOP_PHYS (PXA_CS5_PHYS + 0x00800000)
+
++#define TC6393XB_GPIO(i) (1 << (i))
++/*
++ * TC6393 GPIOs
++ */
++#define TOSA_TC6393XB_TG_ON TC6393XB_GPIO(0)
++#define TOSA_TC6393XB_L_MUTE TC6393XB_GPIO(1)
++#define TOSA_TC6393XB_BL_C20MA TC6393XB_GPIO(3)
++#define TOSA_TC6393XB_CARD_VCC_ON TC6393XB_GPIO(4)
++#define TOSA_TC6393XB_CHARGE_OFF TC6393XB_GPIO(6)
++#define TOSA_TC6393XB_CHARGE_OFF_JC TC6393XB_GPIO(7)
++#define TOSA_TC6393XB_BAT0_V_ON TC6393XB_GPIO(9)
++#define TOSA_TC6393XB_BAT1_V_ON TC6393XB_GPIO(10)
++#define TOSA_TC6393XB_BU_CHRG_ON TC6393XB_GPIO(11)
++#define TOSA_TC6393XB_BAT_SW_ON TC6393XB_GPIO(12)
++#define TOSA_TC6393XB_BAT0_TH_ON TC6393XB_GPIO(14)
++#define TOSA_TC6393XB_BAT1_TH_ON TC6393XB_GPIO(15)
++
++#define TOSA_TC6393XB_GPO_OE (TOSA_TC6393XB_TG_ON | TOSA_TC6393XB_L_MUTE | TOSA_TC6393XB_BL_C20MA | \
++ TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF | \
++ TOSA_TC6393XB_CHARGE_OFF_JC | TOSA_TC6393XB_BAT0_V_ON | \
++ TOSA_TC6393XB_BAT1_V_ON | TOSA_TC6393XB_BU_CHRG_ON | \
++ TOSA_TC6393XB_BAT_SW_ON | TOSA_TC6393XB_BAT0_TH_ON | \
++ TOSA_TC6393XB_BAT1_TH_ON)
++
+ /*
+ * SCOOP2 internal GPIOs
+ */
+ #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11
+-#define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12
++#define TOSA_SCOOP_TC6393XB_REST_IN SCOOP_GPCR_PA12
+ #define TOSA_SCOOP_IR_POWERDWN SCOOP_GPCR_PA13
+ #define TOSA_SCOOP_SD_WP SCOOP_GPCR_PA14
+ #define TOSA_SCOOP_PWR_ON SCOOP_GPCR_PA15
+@@ -34,11 +58,11 @@
+ #define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19
+
+ /* GPIO Direction 1 : output mode / 0:input mode */
+-#define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \
++#define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393XB_REST_IN | \
+ TOSA_SCOOP_IR_POWERDWN | TOSA_SCOOP_PWR_ON | TOSA_SCOOP_AUD_PWR_ON |\
+ TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN )
+ /* GPIO out put level when init 1: Hi */
+-#define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN )
++#define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393XB_REST_IN )
+
+ /*
+ * SCOOP2 jacket GPIOs
+@@ -47,8 +71,8 @@
+ #define TOSA_SCOOP_JC_NOTE_LED SCOOP_GPCR_PA12
+ #define TOSA_SCOOP_JC_CHRG_ERR_LED SCOOP_GPCR_PA13
+ #define TOSA_SCOOP_JC_USB_PULLUP SCOOP_GPCR_PA14
+-#define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15
+-#define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16
++#define TOSA_SCOOP_JC_TC6393XB_SUSPEND SCOOP_GPCR_PA15
++#define TOSA_SCOOP_JC_TC6393XB_L3V_ON SCOOP_GPCR_PA16
+ #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17
+ #define TOSA_SCOOP_JC_WLAN_LED SCOOP_GPCR_PA18
+ #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19
+@@ -56,7 +80,7 @@
+ /* GPIO Direction 1 : output mode / 0:input mode */
+ #define TOSA_SCOOP_JC_IO_DIR ( TOSA_SCOOP_JC_BT_LED | TOSA_SCOOP_JC_NOTE_LED | \
+ TOSA_SCOOP_JC_CHRG_ERR_LED | TOSA_SCOOP_JC_USB_PULLUP | \
+- TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \
++ TOSA_SCOOP_JC_TC6393XB_SUSPEND | TOSA_SCOOP_JC_TC6393XB_L3V_ON | \
+ TOSA_SCOOP_JC_WLAN_LED | TOSA_SCOOP_JC_CARD_LIMIT_SEL )
+ /* GPIO out put level when init 1: Hi */
+ #define TOSA_SCOOP_JC_IO_OUT ( 0 )
+@@ -94,13 +118,13 @@
+ #define TOSA_GPIO_JACKET_DETECT (7)
+ #define TOSA_GPIO_nSD_DETECT (9)
+ #define TOSA_GPIO_nSD_INT (10)
+-#define TOSA_GPIO_TC6393_CLK (11)
++#define TOSA_GPIO_TC6393XB_CLK (11)
+ #define TOSA_GPIO_BAT1_CRG (12)
+ #define TOSA_GPIO_CF_CD (13)
+ #define TOSA_GPIO_BAT0_CRG (14)
+-#define TOSA_GPIO_TC6393_INT (15)
++#define TOSA_GPIO_TC6393XB_INT (15)
+ #define TOSA_GPIO_BAT0_LOW (17)
+-#define TOSA_GPIO_TC6393_RDY (18)
++#define TOSA_GPIO_TC6393XB_RDY (18)
+ #define TOSA_GPIO_ON_RESET (19)
+ #define TOSA_GPIO_EAR_IN (20)
+ #define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */
+@@ -147,7 +171,7 @@
+ #define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG)
+ #define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD)
+ #define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG)
+-#define TOSA_IRQ_GPIO_TC6393_INT IRQ_GPIO(TOSA_GPIO_TC6393_INT)
++#define TOSA_IRQ_GPIO_TC6393XB_INT IRQ_GPIO(TOSA_GPIO_TC6393XB_INT)
+ #define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW)
+ #define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN)
+ #define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ)
+@@ -161,6 +185,7 @@
+
+ #define TOSA_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(TOSA_GPIO_MAIN_BAT_LOW)
+
++extern struct platform_device tc6393xb_device;
+ extern struct platform_device tosascoop_jc_device;
+ extern struct platform_device tosascoop_device;
+
+diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
+index 5504e30..21c51b5 100644
+--- a/sound/soc/pxa/tosa.c
++++ b/sound/soc/pxa/tosa.c
+@@ -32,7 +32,6 @@
+ #include <sound/soc-dapm.h>
+
+ #include <asm/mach-types.h>
+-#include <asm/hardware/tmio.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/hardware.h>
+ #include <asm/arch/audio.h>
+@@ -138,10 +137,12 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol,
+ /* tosa dapm event handlers */
+ static int tosa_hp_event(struct snd_soc_dapm_widget *w, int event)
+ {
++#if 0
+ if (SND_SOC_DAPM_EVENT_ON(event))
+ set_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
+ else
+ reset_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
++#endif
+ return 0;
+ }
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch
new file mode 100644
index 0000000000..c9b5ac29d4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch
@@ -0,0 +1,99 @@
+From f24c23ba56cdd072b332e8de3e0cff8a31e7e36a Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:03:19 +0300
+Subject: [PATCH 50/64] tosa update for tc6393xb gpio
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 6 +++++-
+ include/asm-arm/arch-pxa/tosa.h | 36 ++++++++++++++++++++++++------------
+ 2 files changed, 29 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index e2eec0f..3e832dc 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -35,6 +35,7 @@
+ #include <asm/mach-types.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
++#include <asm/gpio.h>
+ #include <asm/system.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/irda.h>
+@@ -448,10 +449,13 @@ static struct tc6393xb_platform_data tosa_tc6393xb_setup = {
+ .scr_pll2cr = 0x0cc1,
+ .scr_ccr = TC6393XB_CCR_UNK1 | TC6393XB_CCR_HCLK_48,
+ .scr_gper = 0x3300,
+- .scr_gpo_dsr = TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF_JC,
++ .scr_gpo_dsr =
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CARD_VCC_ON) |
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CHARGE_OFF_JC),
+ .scr_gpo_doecr = TOSA_TC6393XB_GPO_OE,
+
+ .irq_base = IRQ_BOARD_START,
++ .gpio_base = TOSA_TC6393XB_GPIO_BASE,
+
+ .enable = tosa_tc6393xb_enable,
+ .disable = tosa_tc6393xb_disable,
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index 1b202b2..410fa9a 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -20,16 +20,21 @@
+ /* Jacket Scoop */
+ #define TOSA_SCOOP_PHYS (PXA_CS5_PHYS + 0x00800000)
+
+-#define TC6393XB_GPIO(i) (1 << (i))
+ /*
+ * TC6393 GPIOs
+ */
+-#define TOSA_TC6393XB_TG_ON TC6393XB_GPIO(0)
+-#define TOSA_TC6393XB_L_MUTE TC6393XB_GPIO(1)
+-#define TOSA_TC6393XB_BL_C20MA TC6393XB_GPIO(3)
+-#define TOSA_TC6393XB_CARD_VCC_ON TC6393XB_GPIO(4)
++
++#define TOSA_TC6393XB_GPIO_BASE NR_BUILTIN_GPIO
++
++#define TC6393XB_GPIO(i) (TOSA_TC6393XB_GPIO_BASE + (i))
++#define TC6393XB_GPIO_BIT(gpio) (1 << (gpio - TOSA_TC6393XB_GPIO_BASE))
++
++#define TOSA_TC6393XB_TG_ON TC6393XB_GPIO(0)
++#define TOSA_TC6393XB_L_MUTE TC6393XB_GPIO(1)
++#define TOSA_TC6393XB_BL_C20MA TC6393XB_GPIO(3)
++#define TOSA_TC6393XB_CARD_VCC_ON TC6393XB_GPIO(4)
+ #define TOSA_TC6393XB_CHARGE_OFF TC6393XB_GPIO(6)
+-#define TOSA_TC6393XB_CHARGE_OFF_JC TC6393XB_GPIO(7)
++#define TOSA_TC6393XB_CHARGE_OFF_JC TC6393XB_GPIO(7)
+ #define TOSA_TC6393XB_BAT0_V_ON TC6393XB_GPIO(9)
+ #define TOSA_TC6393XB_BAT1_V_ON TC6393XB_GPIO(10)
+ #define TOSA_TC6393XB_BU_CHRG_ON TC6393XB_GPIO(11)
+@@ -37,12 +42,19 @@
+ #define TOSA_TC6393XB_BAT0_TH_ON TC6393XB_GPIO(14)
+ #define TOSA_TC6393XB_BAT1_TH_ON TC6393XB_GPIO(15)
+
+-#define TOSA_TC6393XB_GPO_OE (TOSA_TC6393XB_TG_ON | TOSA_TC6393XB_L_MUTE | TOSA_TC6393XB_BL_C20MA | \
+- TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF | \
+- TOSA_TC6393XB_CHARGE_OFF_JC | TOSA_TC6393XB_BAT0_V_ON | \
+- TOSA_TC6393XB_BAT1_V_ON | TOSA_TC6393XB_BU_CHRG_ON | \
+- TOSA_TC6393XB_BAT_SW_ON | TOSA_TC6393XB_BAT0_TH_ON | \
+- TOSA_TC6393XB_BAT1_TH_ON)
++#define TOSA_TC6393XB_GPO_OE ( \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_TG_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_L_MUTE) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BL_C20MA) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CARD_VCC_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CHARGE_OFF) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CHARGE_OFF_JC) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT0_V_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT1_V_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BU_CHRG_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT_SW_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT0_TH_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT1_TH_ON))
+
+ /*
+ * SCOOP2 internal GPIOs
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch
new file mode 100644
index 0000000000..585f1af288
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch
@@ -0,0 +1,86 @@
+From 38ef1b452cc3138157b92d02b31cad439d12d0ca Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:03:34 +0300
+Subject: [PATCH 51/64] fix sound/soc/pxa/tosa.c to new gpio api
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ sound/soc/pxa/tosa.c | 33 ++++++++++++++++++++++++++-------
+ 1 files changed, 26 insertions(+), 7 deletions(-)
+
+diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
+index 21c51b5..b758de8 100644
+--- a/sound/soc/pxa/tosa.c
++++ b/sound/soc/pxa/tosa.c
+@@ -36,6 +36,7 @@
+ #include <asm/arch/hardware.h>
+ #include <asm/arch/audio.h>
+ #include <asm/arch/tosa.h>
++#include <asm/gpio.h>
+
+ #include "../codecs/wm9712.h"
+ #include "pxa2xx-pcm.h"
+@@ -137,11 +138,11 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol,
+ /* tosa dapm event handlers */
+ static int tosa_hp_event(struct snd_soc_dapm_widget *w, int event)
+ {
+-#if 0
++#ifdef CONFIG_MFD_TC6393XB
+ if (SND_SOC_DAPM_EVENT_ON(event))
+- set_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
++ gpio_set_value(TOSA_TC6393XB_L_MUTE, 1);
+ else
+- reset_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
++ gpio_set_value(TOSA_TC6393XB_L_MUTE, 0);
+ #endif
+ return 0;
+ }
+@@ -262,16 +263,31 @@ static int __init tosa_init(void)
+ if (!machine_is_tosa())
+ return -ENODEV;
+
++#ifdef CONFIG_MFD_TC6393XB
++ ret = gpio_request(TOSA_TC6393XB_L_MUTE, "Headphone Jack");
++ if (ret)
++ return ret;
++ gpio_direction_output(TOSA_TC6393XB_L_MUTE, 0);
++#endif
+ tosa_snd_device = platform_device_alloc("soc-audio", -1);
+- if (!tosa_snd_device)
+- return -ENOMEM;
++ if (!tosa_snd_device) {
++ ret = -ENOMEM;
++ goto err_alloc;
++ }
+
+ platform_set_drvdata(tosa_snd_device, &tosa_snd_devdata);
+ tosa_snd_devdata.dev = &tosa_snd_device->dev;
+ ret = platform_device_add(tosa_snd_device);
+
+- if (ret)
+- platform_device_put(tosa_snd_device);
++ if (!ret)
++ return 0;
++
++ platform_device_put(tosa_snd_device);
++
++err_alloc:
++#ifdef CONFIG_MFD_TC6393XB
++ gpio_free(TOSA_TC6393XB_L_MUTE);
++#endif
+
+ return ret;
+ }
+@@ -279,6 +295,9 @@ static int __init tosa_init(void)
+ static void __exit tosa_exit(void)
+ {
+ platform_device_unregister(tosa_snd_device);
++#ifdef CONFIG_MFD_TC6393XB
++ gpio_free(TOSA_TC6393XB_L_MUTE);
++#endif
+ }
+
+ module_init(tosa_init);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0052-tosa-platform-backlight-support.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0052-tosa-platform-backlight-support.patch
new file mode 100644
index 0000000000..ef5263c18e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0052-tosa-platform-backlight-support.patch
@@ -0,0 +1,400 @@
+From c7537657bc33d4ee1616accd0259e160d57c5c1b Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Wed, 9 Jan 2008 02:05:40 +0300
+Subject: [PATCH 52/64] tosa platform backlight support
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/video/backlight/Kconfig | 10 +
+ drivers/video/backlight/Makefile | 1 +
+ drivers/video/backlight/tosa_bl.c | 345 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 356 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/backlight/tosa_bl.c
+
+diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
+index 9609a6c..f47a601 100644
+--- a/drivers/video/backlight/Kconfig
++++ b/drivers/video/backlight/Kconfig
+@@ -59,6 +59,16 @@ config BACKLIGHT_CORGI
+ known as the Corgi backlight driver. If you have a Sharp Zaurus
+ SL-C7xx, SL-Cxx00 or SL-6000x say y. Most users can say n.
+
++config BACKLIGHT_TOSA
++ tristate "Sharp Tosa LCD/Backlight Driver (SL-6000)"
++ depends on BACKLIGHT_CLASS_DEVICE && MACH_TOSA
++ default y
++ select I2C
++ select I2C_PXA
++ select PXA_SSP
++ help
++ If you have a Sharp Zaurus SL-6000y enable this driver.
++
+ config BACKLIGHT_LOCOMO
+ tristate "Sharp LOCOMO LCD/Backlight Driver"
+ depends on BACKLIGHT_CLASS_DEVICE && SHARP_LOCOMO
+diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
+index 965a78b..e8a6a7c 100644
+--- a/drivers/video/backlight/Makefile
++++ b/drivers/video/backlight/Makefile
+@@ -5,6 +5,7 @@ obj-$(CONFIG_LCD_LTV350QV) += ltv350qv.o
+
+ obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
+ obj-$(CONFIG_BACKLIGHT_CORGI) += corgi_bl.o
++obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o
+ obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o
+ obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o
+ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
+diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c
+new file mode 100644
+index 0000000..11a89c6
+--- /dev/null
++++ b/drivers/video/backlight/tosa_bl.c
+@@ -0,0 +1,345 @@
++/*
++ * LCD / Backlight control code for Sharp SL-6000x (tosa)
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/i2c.h>
++#include <linux/backlight.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++#include <linux/mfd/tc6393xb.h>
++
++#include <asm/hardware/scoop.h>
++#include <asm/mach/sharpsl_param.h>
++#include <asm/arch/ssp.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/tosa.h>
++#include <asm/gpio.h>
++
++#define DAC_BASE 0x4e
++#define DAC_CH1 0
++#define DAC_CH2 1
++
++#define TG_REG0_VQV 0x0001
++#define TG_REG0_COLOR 0x0002
++#define TG_REG0_UD 0x0004
++#define TG_REG0_LR 0x0008
++#define COMADJ_DEFAULT 97
++
++static unsigned short normal_i2c[] = { DAC_BASE, I2C_CLIENT_END };
++I2C_CLIENT_INSMOD;
++
++struct tosa_bl_data {
++ struct i2c_client client;
++
++ int comadj;
++ spinlock_t nssp_lock;
++ struct ssp_dev nssp_dev;
++ struct ssp_state nssp_state;
++
++ struct backlight_device *bl_dev;
++};
++
++static struct i2c_driver tosa_bl_driver;
++
++static void pxa_nssp_output(struct tosa_bl_data *data, unsigned char reg, unsigned char value)
++{
++ unsigned long flag;
++ u32 dummy;
++ u32 dat = ( ((reg << 5) & 0xe0) | (value & 0x1f) );
++ spin_lock_irqsave(&data->nssp_lock, flag);
++
++ ssp_config(&data->nssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(128));
++ ssp_enable(&data->nssp_dev);
++
++ ssp_write_word(&data->nssp_dev,dat);
++
++ /* Read null data back from device to prevent SSP overflow */
++ ssp_read_word(&data->nssp_dev, &dummy);
++ ssp_disable(&data->nssp_dev);
++ spin_unlock_irqrestore(&data->nssp_lock, flag);
++
++}
++
++static void tosa_set_backlight(struct tosa_bl_data *data, int brightness)
++{
++ /* SetBacklightDuty */
++ i2c_smbus_write_byte_data(&data->client, DAC_CH2, (unsigned char)brightness);
++
++ /* SetBacklightVR */
++ if (brightness)
++ gpio_set_value(TOSA_TC6393XB_BL_C20MA, 1);
++ else
++ gpio_set_value(TOSA_TC6393XB_BL_C20MA, 0);
++
++ /* bl_enable GP04=1 otherwise GP04=0*/
++ pxa_nssp_output(data, TG_GPODR2, brightness ? 0x01 : 0x00);
++}
++
++static void tosa_lcd_tg_init(struct tosa_bl_data *data)
++{
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_init\n");
++
++ /* L3V On */
++ set_scoop_gpio( &tosascoop_jc_device.dev,TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ mdelay(60);
++
++ /* TG On */
++ gpio_set_value(TOSA_TC6393XB_TG_ON, 0);
++ mdelay(60);
++
++ pxa_nssp_output(data, TG_TPOSCTL,0x00); /* delayed 0clk TCTL signal for VGA */
++ pxa_nssp_output(data, TG_GPOSR,0x02); /* GPOS0=powercontrol, GPOS1=GPIO, GPOS2=TCTL */
++}
++
++static void tosa_lcd_tg_on(struct tosa_bl_data *data/*, const struct fb_videomode *mode*/)
++{
++ const int value = TG_REG0_COLOR | TG_REG0_UD | TG_REG0_LR;
++
++ tosa_lcd_tg_init(data);
++
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_on\n");
++ pxa_nssp_output(data, TG_PNLCTL, value | (/*mode->yres == 320 ? 0 : */ TG_REG0_VQV));
++
++ /* TG LCD pannel power up */
++ pxa_nssp_output(data, TG_PINICTL,0x4);
++ mdelay(50);
++
++ /* TG LCD GVSS */
++ pxa_nssp_output(data, TG_PINICTL,0x0);
++ mdelay(50);
++
++ /* set common voltage */
++ i2c_smbus_write_byte_data(&data->client, DAC_CH1, data->comadj);
++}
++
++static void tosa_lcd_tg_off(struct tosa_bl_data *data)
++{
++ tosa_set_backlight(data, 0);
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_off\n");
++ /* TG LCD VHSA off */
++ pxa_nssp_output(data, TG_PINICTL,0x4);
++ mdelay(50);
++
++ /* TG LCD signal off */
++ pxa_nssp_output(data, TG_PINICTL,0x6);
++ mdelay(50);
++
++ /* TG Off */
++ gpio_set_value(TOSA_TC6393XB_TG_ON, 1);
++ mdelay(100);
++
++ /* L3V Off */
++ reset_scoop_gpio( &tosascoop_jc_device.dev,TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++}
++
++
++static int tosa_bl_update_status(struct backlight_device *dev)
++{
++ struct backlight_properties *props = &dev->props;
++ struct tosa_bl_data *data = dev_get_drvdata(&dev->dev);
++ int new_power = max(props->power, props->fb_blank);
++
++ tosa_set_backlight(data, props->brightness);
++
++ if (new_power)
++ tosa_lcd_tg_off(data);
++ else
++ tosa_lcd_tg_on(data);
++
++ return 0;
++}
++
++static int tosa_bl_get_brightness(struct backlight_device *dev)
++{
++ struct backlight_properties *props = &dev->props;
++
++ return props->brightness;
++}
++
++static struct backlight_ops tosa_bl_ops = {
++ .get_brightness = tosa_bl_get_brightness,
++ .update_status = tosa_bl_update_status,
++};
++
++static int tosa_bl_detect_client(struct i2c_adapter *adapter, int address,
++ int kind)
++{
++ int err = 0;
++ struct i2c_client *client;
++ struct tosa_bl_data *data;
++
++ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA ))
++ goto out;
++
++ if (!(data = kzalloc(sizeof(struct tosa_bl_data), GFP_KERNEL))) {
++ err = -ENOMEM;
++ goto out;
++ }
++
++ client = &data->client;
++ i2c_set_clientdata(client, data);
++
++ client->addr = address;
++ client->adapter = adapter;
++ client->driver = &tosa_bl_driver;
++
++ strlcpy(client->name, "tosa_bl", I2C_NAME_SIZE);
++
++ spin_lock_init(&data->nssp_lock);
++ data->comadj = sharpsl_param.comadj == -1 ? COMADJ_DEFAULT : sharpsl_param.comadj;
++
++ err = gpio_request(TOSA_TC6393XB_BL_C20MA, "backlight");
++ if (err) {
++ dev_dbg(&data->bl_dev->dev, "Unable to request gpio!\n");
++ goto err_gpio_bl;
++ }
++
++ err = gpio_request(TOSA_TC6393XB_TG_ON, "tg");
++ if (err) {
++ dev_dbg(&data->bl_dev->dev, "Unable to request gpio!\n");
++ goto err_gpio_tg;
++ }
++
++ err = ssp_init(&data->nssp_dev,2,0);
++ if (err) {
++ dev_err(&data->bl_dev->dev, "Unable to register NSSP handler!\n");
++ goto err_ssp_init;
++ }
++
++ /* Tell the i2c layer a new client has arrived */
++ err = i2c_attach_client(client);
++ if (err)
++ goto err_i2c_attach;
++
++ gpio_direction_output(TOSA_TC6393XB_BL_C20MA, 0);
++ gpio_direction_output(TOSA_TC6393XB_TG_ON, 1);
++
++ tosa_lcd_tg_init(data);
++
++ data->bl_dev = backlight_device_register("tosa_bl",
++ &client->dev, data, &tosa_bl_ops);
++ if (err)
++ goto err_bl_register;
++
++ data->bl_dev->props.brightness = 69;
++ data->bl_dev->props.max_brightness = 255;
++ data->bl_dev->props.power = FB_BLANK_UNBLANK;
++ backlight_update_status(data->bl_dev);
++
++
++ return 0;
++
++err_bl_register:
++ tosa_set_backlight(data, 0);
++ tosa_lcd_tg_off(data);
++
++ err = i2c_detach_client(client);
++ if (err)
++ return err;
++err_i2c_attach:
++ ssp_exit(&data->nssp_dev);
++err_ssp_init:
++ gpio_free(TOSA_TC6393XB_TG_ON);
++err_gpio_tg:
++ gpio_free(TOSA_TC6393XB_BL_C20MA);
++err_gpio_bl:
++ kfree(data);
++out:
++ return err;
++}
++
++static int tosa_bl_detach_client(struct i2c_client *client)
++{
++ int err = 0;
++ struct tosa_bl_data *data = i2c_get_clientdata(client);
++
++ backlight_device_unregister(data->bl_dev);
++
++ tosa_set_backlight(data, 0);
++ tosa_lcd_tg_off(data);
++
++ /* Try to detach the client from i2c space */
++ if ((err = i2c_detach_client(client)))
++ return err;
++
++ ssp_exit(&data->nssp_dev);
++
++ gpio_free(TOSA_TC6393XB_TG_ON);
++ gpio_free(TOSA_TC6393XB_BL_C20MA);
++
++ kfree(data);
++
++ return err;
++}
++
++#ifdef CONFIG_PM
++static int tosa_bl_suspend(struct i2c_client *client, pm_message_t mesg)
++{
++ struct tosa_bl_data *data = i2c_get_clientdata(client);
++
++ tosa_lcd_tg_off(data);
++ ssp_flush(&data->nssp_dev);
++ ssp_save_state(&data->nssp_dev,&data->nssp_state);
++
++ return 0;
++}
++
++static int tosa_bl_resume(struct i2c_client *client)
++{
++ struct tosa_bl_data *data = i2c_get_clientdata(client);
++
++ ssp_restore_state(&data->nssp_dev,&data->nssp_state);
++ ssp_enable(&data->nssp_dev);
++ tosa_bl_update_status(data->bl_dev);
++
++ return 0;
++}
++#else
++#define tosa_bl_suspend NULL
++#define tosa_bl_resume NULL
++#endif
++
++static int tosa_bl_attach_adapter(struct i2c_adapter *adapter)
++{
++ return i2c_probe(adapter, &addr_data, &tosa_bl_detect_client);
++}
++
++static struct i2c_driver tosa_bl_driver = {
++ .driver = {
++ .name = "tosa_bl",
++ },
++
++ .attach_adapter = tosa_bl_attach_adapter,
++ .detach_client = tosa_bl_detach_client,
++
++ .suspend = tosa_bl_suspend,
++ .resume = tosa_bl_resume,
++};
++
++static int __init tosa_bl_init(void)
++{
++ return i2c_add_driver(&tosa_bl_driver);
++}
++
++static void __exit tosa_bl_cleanup (void)
++{
++ i2c_del_driver(&tosa_bl_driver);
++}
++
++module_init(tosa_bl_init);
++module_exit(tosa_bl_cleanup);
++
++MODULE_DESCRIPTION("Tosa LCD device");
++MODULE_AUTHOR("Dirk Opfer, Dmitry Baryshkov");
++MODULE_LICENSE("GPL v2");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch
new file mode 100644
index 0000000000..0675342508
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch
@@ -0,0 +1,56 @@
+From 47616d22f8f303dfd66cf3b9125af212194a0f3c Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:17 +0300
+Subject: [PATCH 53/64] sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
+ 1 file changed, 18 insertions(+), 10 deletions(-)
+
+Index: git/sound/soc/codecs/wm9712.c
+===================================================================
+---
+ sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
+ 1 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
+index 986b5d5..dfb31e1 100644
+--- a/sound/soc/codecs/wm9712.c
++++ b/sound/soc/codecs/wm9712.c
+@@ -606,18 +606,26 @@ static int wm9712_dapm_event(struct snd_soc_codec *codec, int event)
+
+ static int wm9712_reset(struct snd_soc_codec *codec, int try_warm)
+ {
+- if (try_warm && soc_ac97_ops.warm_reset) {
+- soc_ac97_ops.warm_reset(codec->ac97);
+- if (!(ac97_read(codec, 0) & 0x8000))
+- return 1;
+- }
++ int retry = 3;
+
+- soc_ac97_ops.reset(codec->ac97);
+- if (ac97_read(codec, 0) & 0x8000)
+- goto err;
+- return 0;
++ while (retry--)
++ {
++ if(try_warm && soc_ac97_ops.warm_reset) {
++ soc_ac97_ops.warm_reset(codec->ac97);
++ if(ac97_read(codec, 0) & 0x8000)
++ continue;
++ else
++ return 1;
++ }
++
++ soc_ac97_ops.reset(codec->ac97);
++ if(ac97_read(codec, 0) & 0x8000)
++ continue;
++ else
++ return 0;
++
++ }
+
+-err:
+ printk(KERN_ERR "WM9712 AC97 reset failed\n");
+ return -EIO;
+ }
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch
new file mode 100644
index 0000000000..be7300ab24
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch
@@ -0,0 +1,28 @@
+From 08fbae2307163b3f0c3b704c4b00a9447752a45e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 10 Jan 2008 17:56:58 +0300
+Subject: [PATCH 54/64] sound/soc/codecs/wm9712.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/sound/soc/codecs/wm9712.c
+===================================================================
+---
+ sound/soc/codecs/wm9712.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
+index dfb31e1..a3d9f96 100644
+--- a/sound/soc/codecs/wm9712.c
++++ b/sound/soc/codecs/wm9712.c
+@@ -647,7 +647,7 @@ static int wm9712_soc_resume(struct platform_device *pdev)
+ int i, ret;
+ u16 *cache = codec->reg_cache;
+
+- ret = wm9712_reset(codec, 1);
++ ret = wm9712_reset(codec, 0);
+ if (ret < 0){
+ printk(KERN_ERR "could not reset AC97 codec\n");
+ return ret;
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch
new file mode 100644
index 0000000000..5bf691cbda
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch
@@ -0,0 +1,30 @@
+From bee8b808445a53a7dbb6c15a27064f14dec410c5 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 03:01:41 +0300
+Subject: [PATCH 55/64] Add GPIO_POWERON to the list of devices that we support resume on.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 3e832dc..d1cf3dc 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -517,9 +517,9 @@ static void __init tosa_init(void)
+ pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
+
+ /* setup sleep mode values */
+- PWER = 0x00000002;
+- PFER = 0x00000000;
+- PRER = 0x00000002;
++ PWER = BIT(TOSA_GPIO_POWERON) | BIT(TOSA_GPIO_RESET);
++ PFER = 0;
++ PRER = BIT(TOSA_GPIO_POWERON) | BIT(TOSA_GPIO_RESET);
+ PGSR0 = 0x00000000;
+ PGSR1 = 0x00FF0002;
+ PGSR2 = 0x00014000;
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch
new file mode 100644
index 0000000000..99220f9200
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch
@@ -0,0 +1,126 @@
+From e039614a0ce6df645f8fa4cbe32e4b21fe46a288 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 02:44:03 +0300
+Subject: [PATCH 56/64] Support resetting by asserting GPIO pin
+
+This adds support for resetting via assertion of GPIO pin.
+This e.g. is used on Sharp Zaurus SL-6000.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/gpio.c | 43 +++++++++++++++++++++++++++++++++++++
+ arch/arm/mach-pxa/pm.c | 4 +-
+ include/asm-arm/arch-pxa/system.h | 10 ++++++++
+ 3 files changed, 55 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
+index 8638dd7..589da3b 100644
+--- a/arch/arm/mach-pxa/gpio.c
++++ b/arch/arm/mach-pxa/gpio.c
+@@ -19,6 +19,7 @@
+ #include <asm/hardware.h>
+ #include <asm/io.h>
+ #include <asm/arch/pxa-regs.h>
++#include <asm/arch/system.h>
+
+ #include "generic.h"
+
+@@ -194,4 +195,46 @@ void __init pxa_init_gpio(int gpio_nr)
+ pxa_gpio_chip[i/32].chip.ngpio = gpio_nr - i;
+ gpiochip_add(&pxa_gpio_chip[i/32].chip);
+ }
++
++ if (reset_gpio < gpio_nr)
++ init_reset_gpio();
++}
++
++int reset_gpio = -1;
++static int __init reset_gpio_setup(char *str)
++{
++ if (get_option(&str, &reset_gpio) != 1) {
++ printk(KERN_ERR "reset_gpio: bad value secified");
++ return 0;
++ }
++
++ return 1;
++}
++
++__setup("reset_gpio=", reset_gpio_setup);
++
++int init_reset_gpio(void)
++{
++ int rc = 0;
++ if (reset_gpio == -1)
++ goto out;
++
++ rc = gpio_request(reset_gpio, "reset generator");
++ if (rc) {
++ printk(KERN_ERR "Can't request reset_gpio\n");
++ goto out;
++ }
++
++ rc = gpio_direction_input(reset_gpio);
++ if (rc) {
++ printk(KERN_ERR "Can't configure reset_gpio for input\n");
++ gpio_free(reset_gpio);
++ goto out;
++ }
++
++out:
++ if (rc)
++ reset_gpio = -1;
++
++ return rc;
+ }
+diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
+index a941c71..64f37e5 100644
+--- a/arch/arm/mach-pxa/pm.c
++++ b/arch/arm/mach-pxa/pm.c
+@@ -40,8 +40,8 @@ int pxa_pm_enter(suspend_state_t state)
+
+ pxa_cpu_pm_fns->save(sleep_save);
+
+- /* Clear sleep reset status */
+- RCSR = RCSR_SMR;
++ /* Clear reset status */
++ RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+
+ /* before sleeping, calculate and save a checksum */
+ for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
+diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h
+index 1d56a3e..c075018 100644
+--- a/include/asm-arm/arch-pxa/system.h
++++ b/include/asm-arm/arch-pxa/system.h
+@@ -11,6 +11,7 @@
+ */
+
+ #include <asm/proc-fns.h>
++#include <asm/gpio.h>
+ #include "hardware.h"
+ #include "pxa-regs.h"
+
+@@ -19,12 +20,21 @@ static inline void arch_idle(void)
+ cpu_do_idle();
+ }
+
++extern int reset_gpio;
++
++int init_reset_gpio(void);
+
+ static inline void arch_reset(char mode)
+ {
++ RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
++
+ if (mode == 's') {
+ /* Jump into ROM at address 0 */
+ cpu_reset(0);
++ } else if (mode == 'g' && reset_gpio != -1) {
++ /* Use GPIO reset */
++ gpio_direction_output(reset_gpio, 0);
++ gpio_set_value(reset_gpio, 1);
+ } else {
+ /* Initialize the watchdog and let it fire */
+ OWER = OWER_WME;
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch
new file mode 100644
index 0000000000..441e1bba75
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch
@@ -0,0 +1,70 @@
+From a6f03929fa4d20cef339dbed7ef5cd1e040d0548 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 02:48:07 +0300
+Subject: [PATCH 57/64] Clean up tosa resetting
+
+Use new gpio-assertion reset.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 16 +++++++---------
+ 1 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index d1cf3dc..2b4aef7 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -41,6 +41,8 @@
+ #include <asm/arch/irda.h>
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/udc.h>
++#include <asm/arch/pm.h>
++#include <asm/arch/system.h>
+
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+@@ -489,13 +491,7 @@ static struct platform_device *devices[] __initdata = {
+
+ static void tosa_poweroff(void)
+ {
+- RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+-
+- pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT);
+- GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET);
+-
+- mdelay(1000);
+- arm_machine_restart('h');
++ arm_machine_restart('g');
+ }
+
+ static void tosa_restart(char mode)
+@@ -504,7 +500,7 @@ static void tosa_restart(char mode)
+ if((MSC0 & 0xffff0000) == 0x7ff00000)
+ MSC0 = (MSC0 & 0xffff) | 0x7ee00000;
+
+- tosa_poweroff();
++ arm_machine_restart('g');
+ }
+
+ static void __init tosa_init(void)
+@@ -512,7 +508,6 @@ static void __init tosa_init(void)
+ pm_power_off = tosa_poweroff;
+ arm_pm_restart = tosa_restart;
+
+- pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
+ pxa_gpio_mode(TOSA_GPIO_TC6393XB_INT | GPIO_IN);
+ pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
+
+@@ -544,6 +539,9 @@ static void __init fixup_tosa(struct machine_desc *desc,
+ mi->bank[0].start = 0xa0000000;
+ mi->bank[0].node = 0;
+ mi->bank[0].size = (64*1024*1024);
++
++ if (reset_gpio == -1)
++ reset_gpio = TOSA_GPIO_ON_RESET;
+ }
+
+ MACHINE_START(TOSA, "SHARP Tosa")
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch
new file mode 100644
index 0000000000..e965857dff
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch
@@ -0,0 +1,27 @@
+From 8b57c409802e5feef64c4bb7659570e06558c0f2 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 02:24:43 +0300
+Subject: [PATCH 58/64] Fix tosakbd suspend
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/keyboard/tosakbd.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
+index 3884d1e..306cbe8 100644
+--- a/drivers/input/keyboard/tosakbd.c
++++ b/drivers/input/keyboard/tosakbd.c
+@@ -210,6 +210,9 @@ static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)
+
+ del_timer_sync(&tosakbd->timer);
+
++ PGSR1 = (PGSR1 & ~TOSA_GPIO_LOW_STROBE_BIT);
++ PGSR2 = (PGSR2 & ~TOSA_GPIO_HIGH_STROBE_BIT);
++
+ return 0;
+ }
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch
new file mode 100644
index 0000000000..812b5bad41
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch
@@ -0,0 +1,46 @@
+From 00f6e9b946d1f653fc776d71c86a1f6a7534cd1d Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 25 Jan 2008 19:16:20 +0300
+Subject: [PATCH 59/64] patch tosa-wakeup-test
+
+---
+ arch/arm/mach-pxa/tosa.c | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 2b4aef7..7008919 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -260,12 +260,28 @@ static struct platform_device tosakbd_device = {
+ };
+
+ static struct gpio_keys_button tosa_gpio_keys[] = {
++ /*
++ * Two following keys are directly tied to "ON" button of tosa. Why?
++ * The first one can be used as a wakeup source, the second can't:
++ * it's outside of permitted area.
++ */
++ {
++ .type = EV_PWR,
++ .code = KEY_RESERVED,
++ .gpio = TOSA_GPIO_POWERON,
++ .desc = "Poweron",
++ .wakeup = 1,
++ .active_low = 1,
++ },
+ {
+ .type = EV_PWR,
+ .code = KEY_SUSPEND,
+ .gpio = TOSA_GPIO_ON_KEY,
+ .desc = "On key",
+- .wakeup = 1,
++ /*
++ * can't be used as wakeup
++ * .wakeup = 1,
++ */
+ .active_low = 1,
+ },
+ {
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch
new file mode 100644
index 0000000000..f7420de040
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch
@@ -0,0 +1,623 @@
+From f6ec15733eb55e851c8ad19c2143d425558f6044 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 20:11:58 +0300
+Subject: [PATCH 60/64] Add support for power_supply on tosa
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/Makefile | 2 +-
+ arch/arm/mach-pxa/tosa_power.c | 82 +++++++
+ drivers/leds/leds-tosa.c | 2 +-
+ drivers/power/Kconfig | 7 +
+ drivers/power/Makefile | 1 +
+ drivers/power/tosa_battery.c | 458 ++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 550 insertions(+), 2 deletions(-)
+ create mode 100644 arch/arm/mach-pxa/tosa_power.c
+ create mode 100644 drivers/power/tosa_battery.c
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index f276d24..2b68254 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -21,7 +21,7 @@ obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o cor
+ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o
+ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
+ obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o sharpsl_pm.o poodle_pm.o
+-obj-$(CONFIG_MACH_TOSA) += tosa.o
++obj-$(CONFIG_MACH_TOSA) += tosa.o tosa_power.o
+ obj-$(CONFIG_MACH_EM_X270) += em-x270.o
+
+ ifeq ($(CONFIG_MACH_ZYLONITE),y)
+diff --git a/arch/arm/mach-pxa/tosa_power.c b/arch/arm/mach-pxa/tosa_power.c
+new file mode 100644
+index 0000000..61ca7dc
+--- /dev/null
++++ b/arch/arm/mach-pxa/tosa_power.c
+@@ -0,0 +1,82 @@
++/*
++ * Battery and Power Management code for the Sharp SL-6000x
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2008 Dmitry Baryshkov
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/power_supply.h>
++#include <linux/pda_power.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++
++#include <asm/arch/tosa.h>
++#include <asm/gpio.h>
++
++static int tosa_power_ac_online(void)
++{
++ return gpio_get_value(TOSA_GPIO_AC_IN) == 0;
++}
++
++static char *tosa_ac_supplied_to[] = {
++ "main-battery",
++ "backup-battery",
++ "jacket-battery",
++};
++
++static struct pda_power_pdata tosa_power_data = {
++ .is_ac_online = tosa_power_ac_online,
++ .supplied_to = tosa_ac_supplied_to,
++ .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to),
++};
++
++static struct resource tosa_power_resource[] = {
++ {
++ .name = "ac",
++ .start = gpio_to_irq(TOSA_GPIO_AC_IN),
++ .end = gpio_to_irq(TOSA_GPIO_AC_IN),
++ .flags = IORESOURCE_IRQ |
++ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ },
++};
++
++static struct platform_device tosa_power_device = {
++ .name = "pda-power",
++ .id = -1,
++ .dev.platform_data = &tosa_power_data,
++ .resource = tosa_power_resource,
++ .num_resources = ARRAY_SIZE(tosa_power_resource),
++};
++
++static int __init tosa_power_init(void)
++{
++ int ret = gpio_request(TOSA_GPIO_AC_IN, "ac");
++ if (ret)
++ goto err_gpio_req;
++
++ ret = gpio_direction_input(TOSA_GPIO_AC_IN);
++ if (ret)
++ goto err_gpio_in;
++
++ return platform_device_register(&tosa_power_device);
++
++err_gpio_in:
++ gpio_free(TOSA_GPIO_AC_IN);
++err_gpio_req:
++ return ret;
++}
++
++static void __exit tosa_power_exit(void)
++{
++ platform_device_unregister(&tosa_power_device);
++ gpio_free(TOSA_GPIO_AC_IN);
++}
++
++module_init(tosa_power_init);
++module_exit(tosa_power_exit);
+diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c
+index fb2416a..b4498b5 100644
+--- a/drivers/leds/leds-tosa.c
++++ b/drivers/leds/leds-tosa.c
+@@ -46,7 +46,7 @@ static void tosaled_green_set(struct led_classdev *led_cdev,
+
+ static struct led_classdev tosa_amber_led = {
+ .name = "tosa:amber",
+- .default_trigger = "sharpsl-charge",
++ .default_trigger = "main-battery-charging",
+ .brightness_set = tosaled_amber_set,
+ };
+
+diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
+index 58c806e..e3a9c37 100644
+--- a/drivers/power/Kconfig
++++ b/drivers/power/Kconfig
+@@ -49,4 +49,11 @@ config BATTERY_OLPC
+ help
+ Say Y to enable support for the battery on the OLPC laptop.
+
++config BATTERY_TOSA
++ tristate "Sharp SL-6000 (tosa) battery"
++ depends on MACH_TOSA && MFD_TC6393XB
++ help
++ Say Y to enable support for the battery on the Sharp Zaurus
++ SL-6000 (tosa) models.
++
+ endif # POWER_SUPPLY
+diff --git a/drivers/power/Makefile b/drivers/power/Makefile
+index 6413ded..1e408fa 100644
+--- a/drivers/power/Makefile
++++ b/drivers/power/Makefile
+@@ -20,3 +20,4 @@ obj-$(CONFIG_APM_POWER) += apm_power.o
+ obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
+ obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
+ obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
++obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+new file mode 100644
+index 0000000..b0fd2f2
+--- /dev/null
++++ b/drivers/power/tosa_battery.c
+@@ -0,0 +1,458 @@
++/*
++ * Battery and Power Management code for the Sharp SL-6000x
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2008 Dmitry Baryshkov
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/power_supply.h>
++#include <linux/wm97xx.h>
++#include <linux/delay.h>
++#include <linux/spinlock.h>
++#include <linux/interrupt.h>
++
++#include <asm/mach-types.h>
++#include <asm/gpio.h>
++#include <asm/arch/tosa.h>
++
++#define BAT_TO_VOLTS(v) ((v) * 1000000 / 414)
++#define BU_TO_VOLTS(v) ((v) * 1000000 / 1266)
++/*
++ * It's pretty strange value, but that's roughly what I get from
++ * zaurus maintainer menu
++ */
++//#define BAT_TO_TEMP(t) ((t) * 10000/2000)
++#define BAT_TO_TEMP(t) (t)
++
++static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
++static struct work_struct bat_work;
++
++struct tosa_bat {
++ int status;
++ struct power_supply psy;
++ int full_chrg;
++
++ struct mutex work_lock; /* protects data */
++ bool (*is_present)(struct tosa_bat *bat);
++ int gpio_full;
++ int gpio_charge_off;
++ int gpio_bat;
++ int adc_bat;
++ int gpio_temp;
++ int adc_temp;
++};
++
++static struct tosa_bat tosa_bat_main;
++static struct tosa_bat tosa_bat_jacket;
++
++static enum power_supply_property tosa_bat_main_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_TEMP,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static enum power_supply_property tosa_bat_bu_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static unsigned long tosa_read_bat(struct tosa_bat *bat)
++{
++ unsigned long value = 0;
++
++ if (bat->gpio_bat < 0 || bat->adc_bat < 0)
++ return 0;
++
++ mutex_lock(&bat_lock);
++ gpio_set_value(bat->gpio_bat, 1);
++ mdelay(5);
++ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_bat);
++ gpio_set_value(bat->gpio_bat, 0);
++ mutex_unlock(&bat_lock);
++ return value;
++}
++
++static unsigned long tosa_read_temp(struct tosa_bat *bat)
++{
++ unsigned long value = 0;
++
++ if (bat->gpio_temp < 0 || bat->adc_temp < 0)
++ return 0;
++
++ mutex_lock(&bat_lock);
++ gpio_set_value(bat->gpio_temp, 1);
++ mdelay(5);
++ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_temp);
++ gpio_set_value(bat->gpio_temp, 0);
++ mutex_unlock(&bat_lock);
++ return value;
++}
++
++static int tosa_bat_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ int ret = 0;
++ struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
++
++ if (bat->is_present && !bat->is_present(bat)
++ && psp != POWER_SUPPLY_PROP_PRESENT) {
++ return -ENODEV;
++ }
++
++ switch (psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ val->intval = bat->status;
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ val->intval = BAT_TO_VOLTS(tosa_read_bat(bat));
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX:
++ if (bat->full_chrg == -1)
++ val->intval = -1;
++ else
++ val->intval = BAT_TO_VOLTS(bat->full_chrg);
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = BAT_TO_VOLTS(1551);
++ break;
++ case POWER_SUPPLY_PROP_TEMP:
++ val->intval = BAT_TO_TEMP(tosa_read_temp(bat));
++ break;
++ case POWER_SUPPLY_PROP_PRESENT:
++ val->intval = bat->is_present ? bat->is_present(bat) : 1;
++ break;
++ default:
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
++
++static int tosa_bu_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ int ret = 0;
++ struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
++
++ switch (psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = POWER_SUPPLY_TECHNOLOGY_LiMn;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = 0;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = 3 * 1000000; /* 3 V */
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ /* I think so */
++ val->intval = BU_TO_VOLTS(tosa_read_bat(bat));
++ break;
++ case POWER_SUPPLY_PROP_PRESENT:
++ val->intval = 1;
++ break;
++ default:
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
++
++static bool tosa_jacket_bat_is_present(struct tosa_bat *bat) {
++ // FIXME
++ return 1;
++}
++
++static void tosa_bat_external_power_changed(struct power_supply *psy)
++{
++ schedule_work(&bat_work);
++}
++
++static irqreturn_t tosa_bat_full_isr(int irq, void *data)
++{
++ printk(KERN_ERR "bat_full irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
++ schedule_work(&bat_work);
++ return IRQ_HANDLED;
++}
++
++static void tosa_bat_update(struct tosa_bat *bat)
++{
++ int old = bat->status;
++ struct power_supply *psy = &bat->psy;
++
++ mutex_lock(&bat->work_lock);
++
++ if (bat->is_present && !bat->is_present(bat)) {
++ printk(KERN_DEBUG "%s not present\n", psy->name);
++ bat->status = POWER_SUPPLY_STATUS_NOT_CHARGING;
++ bat->full_chrg = -1;
++ } else if (power_supply_am_i_supplied(psy)) {
++ if (gpio_get_value(bat->gpio_full)) {
++ printk(KERN_DEBUG "%s full\n", psy->name);
++
++ if (old == POWER_SUPPLY_STATUS_CHARGING || bat->full_chrg == -1)
++ bat->full_chrg = tosa_read_bat(bat);
++
++ gpio_set_value(bat->gpio_charge_off, 1);
++ bat->status = POWER_SUPPLY_STATUS_FULL;
++ } else {
++ printk(KERN_ERR "%s charge\n", psy->name);
++ gpio_set_value(bat->gpio_charge_off, 0);
++ bat->status = POWER_SUPPLY_STATUS_CHARGING;
++ }
++ } else {
++ printk(KERN_ERR "%s discharge\n", psy->name);
++ gpio_set_value(bat->gpio_charge_off, 1);
++ bat->status = POWER_SUPPLY_STATUS_DISCHARGING;
++ }
++
++ if (old != bat->status)
++ power_supply_changed(psy);
++
++ mutex_unlock(&bat->work_lock);
++}
++
++static void tosa_bat_work(struct work_struct *work)
++{
++ tosa_bat_update(&tosa_bat_main);
++ tosa_bat_update(&tosa_bat_jacket);
++}
++
++
++static struct tosa_bat tosa_bat_main = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++ .psy = {
++ .name = "main-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = tosa_bat_main_props,
++ .num_properties = ARRAY_SIZE(tosa_bat_main_props),
++ .get_property = tosa_bat_get_property,
++ .external_power_changed = tosa_bat_external_power_changed,
++ .use_for_apm = 1,
++ },
++
++ .gpio_full = TOSA_GPIO_BAT0_CRG,
++ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF,
++ .gpio_bat = TOSA_TC6393XB_BAT0_V_ON,
++ .adc_bat = WM97XX_AUX_ID3,
++ .gpio_temp = TOSA_TC6393XB_BAT1_TH_ON,
++ .adc_temp = WM97XX_AUX_ID2,
++};
++
++static struct tosa_bat tosa_bat_jacket = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++ .psy = {
++ .name = "jacket-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = tosa_bat_main_props,
++ .num_properties = ARRAY_SIZE(tosa_bat_main_props),
++ .get_property = tosa_bat_get_property,
++ .external_power_changed = tosa_bat_external_power_changed,
++// .use_for_apm = 1,
++ },
++
++ .is_present = tosa_jacket_bat_is_present,
++ .gpio_full = TOSA_GPIO_BAT1_CRG,
++ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF_JC,
++ .gpio_bat = TOSA_TC6393XB_BAT1_V_ON,
++ .adc_bat = WM97XX_AUX_ID3,
++ .gpio_temp = TOSA_TC6393XB_BAT0_TH_ON,
++ .adc_temp = WM97XX_AUX_ID2,
++};
++
++static struct tosa_bat tosa_bat_bu = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++
++ .psy = {
++ .name = "backup-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = tosa_bat_bu_props,
++ .num_properties = ARRAY_SIZE(tosa_bat_bu_props),
++ .get_property = tosa_bu_get_property,
++ .external_power_changed = tosa_bat_external_power_changed,
++ },
++
++ .gpio_full = -1,
++ .gpio_charge_off = -1,
++ .gpio_bat = TOSA_TC6393XB_BU_CHRG_ON,
++ .adc_bat = WM97XX_AUX_ID4,
++ .gpio_temp = -1,
++ .adc_temp = -1,
++};
++
++static struct {
++ int gpio;
++ char *name;
++ bool output;
++ int value;
++} gpios[] = {
++ { TOSA_TC6393XB_CHARGE_OFF, "main charge off", 1, 1 },
++ { TOSA_TC6393XB_CHARGE_OFF_JC, "jacket charge off", 1, 1 },
++ { TOSA_TC6393XB_BAT_SW_ON, "battery switch", 1, 0 },
++ { TOSA_TC6393XB_BAT0_V_ON, "main battery", 1, 0 },
++ { TOSA_TC6393XB_BAT1_V_ON, "jacket battery", 1, 0 },
++ { TOSA_TC6393XB_BAT1_TH_ON, "main battery temp", 1, 0 },
++ { TOSA_TC6393XB_BAT0_TH_ON, "jacket battery temp", 1, 0 },
++ { TOSA_TC6393XB_BU_CHRG_ON, "backup battery", 1, 0 },
++ { TOSA_GPIO_BAT0_CRG, "main battery full", 0, 0 },
++ { TOSA_GPIO_BAT1_CRG, "jacket battery full", 0, 0 },
++ { TOSA_GPIO_BAT0_LOW, "main battery low", 0, 0 },
++ { TOSA_GPIO_BAT1_LOW, "jacket battery low", 0, 0 },
++};
++
++#ifdef CONFIG_PM
++static int tosa_bat_suspend(struct device *dev, pm_message_t state)
++{
++ /* do nothing */
++ return 0;
++}
++
++static int tosa_bat_resume(struct device *dev)
++{
++ schedule_work(&bat_work);
++ return 0;
++}
++#else
++#define tosa_bat_suspend NULL
++#define tosa_bat_resume NULL
++#endif
++
++static int __devinit tosa_bat_probe(struct device *dev)
++{
++ int ret;
++ int i;
++
++ if (!machine_is_tosa())
++ return -ENODEV;
++
++ for (i = 0; i < ARRAY_SIZE(gpios); i++) {
++ ret = gpio_request(gpios[i].gpio, gpios[i].name);
++ if (ret) {
++ i --;
++ goto err_gpio;
++ }
++
++ if (gpios[i].output)
++ ret = gpio_direction_output(gpios[i].gpio,
++ gpios[i].value);
++ else
++ ret = gpio_direction_input(gpios[i].gpio);
++
++ if (ret)
++ goto err_gpio;
++ }
++
++ mutex_init(&tosa_bat_main.work_lock);
++ mutex_init(&tosa_bat_jacket.work_lock);
++
++ INIT_WORK(&bat_work, tosa_bat_work);
++
++ ret = power_supply_register(dev, &tosa_bat_main.psy);
++ if (ret)
++ goto err_psy_reg_main;
++ ret = power_supply_register(dev, &tosa_bat_jacket.psy);
++ if (ret)
++ goto err_psy_reg_jacket;
++ ret = power_supply_register(dev, &tosa_bat_bu.psy);
++ if (ret)
++ goto err_psy_reg_bu;
++
++ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG),
++ tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "main full", &tosa_bat_main);
++ if (ret)
++ goto err_req_main;
++
++ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG),
++ tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "jacket full", &tosa_bat_jacket);
++ if (!ret) {
++ schedule_work(&bat_work);
++ return 0;
++ }
++
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
++err_req_main:
++ power_supply_unregister(&tosa_bat_bu.psy);
++err_psy_reg_bu:
++ power_supply_unregister(&tosa_bat_jacket.psy);
++err_psy_reg_jacket:
++ power_supply_unregister(&tosa_bat_main.psy);
++err_psy_reg_main:
++
++ i --;
++err_gpio:
++ for (; i >= 0; i --)
++ gpio_free(gpios[i].gpio);
++
++ return ret;
++}
++
++static int __devexit tosa_bat_remove(struct device *dev)
++{
++ int i;
++
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG), &tosa_bat_jacket);
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
++
++ power_supply_unregister(&tosa_bat_bu.psy);
++ power_supply_unregister(&tosa_bat_jacket.psy);
++ power_supply_unregister(&tosa_bat_main.psy);
++
++ for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i --)
++ gpio_free(gpios[i].gpio);
++
++ return 0;
++}
++
++static struct device_driver tosa_bat_driver = {
++ .name = "wm97xx-battery",
++ .bus = &wm97xx_bus_type,
++ .owner = THIS_MODULE,
++ .probe = tosa_bat_probe,
++ .remove = __devexit_p(tosa_bat_remove),
++ .suspend = tosa_bat_suspend,
++ .resume = tosa_bat_resume,
++};
++
++static int __init tosa_bat_init(void)
++{
++ return driver_register(&tosa_bat_driver);
++}
++
++static void __exit tosa_bat_exit(void)
++{
++ driver_unregister(&tosa_bat_driver);
++}
++
++module_init(tosa_bat_init);
++module_exit(tosa_bat_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Dmitry Baryshkov");
++MODULE_DESCRIPTION("Tosa battery driver");
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0061-tosa-bat-unify.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0061-tosa-bat-unify.patch
new file mode 100644
index 0000000000..2bcede36a9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0061-tosa-bat-unify.patch
@@ -0,0 +1,342 @@
+From f05aa38af5bd5962ae04c4b128644e7f55451527 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 8 Feb 2008 01:14:48 +0300
+Subject: [PATCH 61/64] tosa-bat-unify
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/tosa_battery.c | 161 ++++++++++++++++++++---------------------
+ 1 files changed, 79 insertions(+), 82 deletions(-)
+
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+index b0fd2f2..008e791 100644
+--- a/drivers/power/tosa_battery.c
++++ b/drivers/power/tosa_battery.c
+@@ -21,15 +21,6 @@
+ #include <asm/gpio.h>
+ #include <asm/arch/tosa.h>
+
+-#define BAT_TO_VOLTS(v) ((v) * 1000000 / 414)
+-#define BU_TO_VOLTS(v) ((v) * 1000000 / 1266)
+-/*
+- * It's pretty strange value, but that's roughly what I get from
+- * zaurus maintainer menu
+- */
+-//#define BAT_TO_TEMP(t) ((t) * 10000/2000)
+-#define BAT_TO_TEMP(t) (t)
+-
+ static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
+ static struct work_struct bat_work;
+
+@@ -39,37 +30,27 @@ struct tosa_bat {
+ int full_chrg;
+
+ struct mutex work_lock; /* protects data */
++
+ bool (*is_present)(struct tosa_bat *bat);
+ int gpio_full;
+ int gpio_charge_off;
++
++ int technology;
++
+ int gpio_bat;
+ int adc_bat;
++ int adc_bat_divider;
++ int bat_max;
++ int bat_min;
++
+ int gpio_temp;
+ int adc_temp;
++ int adc_temp_divider;
+ };
+
+ static struct tosa_bat tosa_bat_main;
+ static struct tosa_bat tosa_bat_jacket;
+
+-static enum power_supply_property tosa_bat_main_props[] = {
+- POWER_SUPPLY_PROP_STATUS,
+- POWER_SUPPLY_PROP_TECHNOLOGY,
+- POWER_SUPPLY_PROP_VOLTAGE_NOW,
+- POWER_SUPPLY_PROP_VOLTAGE_MAX,
+- POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+- POWER_SUPPLY_PROP_TEMP,
+- POWER_SUPPLY_PROP_PRESENT,
+-};
+-
+-static enum power_supply_property tosa_bat_bu_props[] = {
+- POWER_SUPPLY_PROP_STATUS,
+- POWER_SUPPLY_PROP_TECHNOLOGY,
+- POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+- POWER_SUPPLY_PROP_VOLTAGE_NOW,
+- POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+- POWER_SUPPLY_PROP_PRESENT,
+-};
+-
+ static unsigned long tosa_read_bat(struct tosa_bat *bat)
+ {
+ unsigned long value = 0;
+@@ -83,6 +64,9 @@ static unsigned long tosa_read_bat(struct tosa_bat *bat)
+ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_bat);
+ gpio_set_value(bat->gpio_bat, 0);
+ mutex_unlock(&bat_lock);
++
++ value = value * 1000000 / bat->adc_bat_divider;
++
+ return value;
+ }
+
+@@ -99,6 +83,9 @@ static unsigned long tosa_read_temp(struct tosa_bat *bat)
+ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_temp);
+ gpio_set_value(bat->gpio_temp, 0);
+ mutex_unlock(&bat_lock);
++
++ value = value * 10000 / bat->adc_temp_divider;
++
+ return value;
+ }
+
+@@ -119,22 +106,25 @@ static int tosa_bat_get_property(struct power_supply *psy,
+ val->intval = bat->status;
+ break;
+ case POWER_SUPPLY_PROP_TECHNOLOGY:
+- val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
++ val->intval = bat->technology;
+ break;
+ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+- val->intval = BAT_TO_VOLTS(tosa_read_bat(bat));
++ val->intval = tosa_read_bat(bat);
+ break;
+ case POWER_SUPPLY_PROP_VOLTAGE_MAX:
+ if (bat->full_chrg == -1)
+- val->intval = -1;
++ val->intval = bat->bat_max;
+ else
+- val->intval = BAT_TO_VOLTS(bat->full_chrg);
++ val->intval = bat->full_chrg;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = bat->bat_max;
+ break;
+ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
+- val->intval = BAT_TO_VOLTS(1551);
++ val->intval = bat->bat_min;
+ break;
+ case POWER_SUPPLY_PROP_TEMP:
+- val->intval = BAT_TO_TEMP(tosa_read_temp(bat));
++ val->intval = tosa_read_temp(bat);
+ break;
+ case POWER_SUPPLY_PROP_PRESENT:
+ val->intval = bat->is_present ? bat->is_present(bat) : 1;
+@@ -146,40 +136,6 @@ static int tosa_bat_get_property(struct power_supply *psy,
+ return ret;
+ }
+
+-static int tosa_bu_get_property(struct power_supply *psy,
+- enum power_supply_property psp,
+- union power_supply_propval *val)
+-{
+- int ret = 0;
+- struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
+-
+- switch (psp) {
+- case POWER_SUPPLY_PROP_STATUS:
+- val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
+- break;
+- case POWER_SUPPLY_PROP_TECHNOLOGY:
+- val->intval = POWER_SUPPLY_TECHNOLOGY_LiMn;
+- break;
+- case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
+- val->intval = 0;
+- break;
+- case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
+- val->intval = 3 * 1000000; /* 3 V */
+- break;
+- case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+- /* I think so */
+- val->intval = BU_TO_VOLTS(tosa_read_bat(bat));
+- break;
+- case POWER_SUPPLY_PROP_PRESENT:
+- val->intval = 1;
+- break;
+- default:
+- ret = -EINVAL;
+- break;
+- }
+- return ret;
+-}
+-
+ static bool tosa_jacket_bat_is_present(struct tosa_bat *bat) {
+ // FIXME
+ return 1;
+@@ -241,6 +197,25 @@ static void tosa_bat_work(struct work_struct *work)
+ }
+
+
++static enum power_supply_property tosa_bat_main_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_TEMP,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static enum power_supply_property tosa_bat_bu_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
+ static struct tosa_bat tosa_bat_main = {
+ .status = POWER_SUPPLY_STATUS_UNKNOWN,
+ .full_chrg = -1,
+@@ -256,10 +231,18 @@ static struct tosa_bat tosa_bat_main = {
+
+ .gpio_full = TOSA_GPIO_BAT0_CRG,
+ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
++
+ .gpio_bat = TOSA_TC6393XB_BAT0_V_ON,
+ .adc_bat = WM97XX_AUX_ID3,
++ .adc_bat_divider = 414,
++ .bat_max = 4310000,
++ .bat_min = 1551 * 100000 / 414,
++
+ .gpio_temp = TOSA_TC6393XB_BAT1_TH_ON,
+ .adc_temp = WM97XX_AUX_ID2,
++ .adc_temp_divider = 10000,
+ };
+
+ static struct tosa_bat tosa_bat_jacket = {
+@@ -278,10 +261,18 @@ static struct tosa_bat tosa_bat_jacket = {
+ .is_present = tosa_jacket_bat_is_present,
+ .gpio_full = TOSA_GPIO_BAT1_CRG,
+ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF_JC,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
++
+ .gpio_bat = TOSA_TC6393XB_BAT1_V_ON,
+ .adc_bat = WM97XX_AUX_ID3,
++ .adc_bat_divider = 414,
++ .bat_max = 4310000,
++ .bat_min = 1551 * 100000 / 414,
++
+ .gpio_temp = TOSA_TC6393XB_BAT0_TH_ON,
+ .adc_temp = WM97XX_AUX_ID2,
++ .adc_temp_divider = 10000,
+ };
+
+ static struct tosa_bat tosa_bat_bu = {
+@@ -293,16 +284,22 @@ static struct tosa_bat tosa_bat_bu = {
+ .type = POWER_SUPPLY_TYPE_BATTERY,
+ .properties = tosa_bat_bu_props,
+ .num_properties = ARRAY_SIZE(tosa_bat_bu_props),
+- .get_property = tosa_bu_get_property,
++ .get_property = tosa_bat_get_property,
+ .external_power_changed = tosa_bat_external_power_changed,
+ },
+
+ .gpio_full = -1,
+ .gpio_charge_off = -1,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LiMn,
++
+ .gpio_bat = TOSA_TC6393XB_BU_CHRG_ON,
+ .adc_bat = WM97XX_AUX_ID4,
++ .adc_bat_divider = 1266,
++
+ .gpio_temp = -1,
+ .adc_temp = -1,
++ .adc_temp_divider = -1,
+ };
+
+ static struct {
+@@ -326,13 +323,14 @@ static struct {
+ };
+
+ #ifdef CONFIG_PM
+-static int tosa_bat_suspend(struct device *dev, pm_message_t state)
++static int tosa_bat_suspend(struct platform_device *dev, pm_message_t state)
+ {
+ /* do nothing */
++ flush_scheduled_work();
+ return 0;
+ }
+
+-static int tosa_bat_resume(struct device *dev)
++static int tosa_bat_resume(struct platform_device *dev)
+ {
+ schedule_work(&bat_work);
+ return 0;
+@@ -342,7 +340,7 @@ static int tosa_bat_resume(struct device *dev)
+ #define tosa_bat_resume NULL
+ #endif
+
+-static int __devinit tosa_bat_probe(struct device *dev)
++static int __devinit tosa_bat_probe(struct platform_device *dev)
+ {
+ int ret;
+ int i;
+@@ -372,13 +370,13 @@ static int __devinit tosa_bat_probe(struct device *dev)
+
+ INIT_WORK(&bat_work, tosa_bat_work);
+
+- ret = power_supply_register(dev, &tosa_bat_main.psy);
++ ret = power_supply_register(&dev->dev, &tosa_bat_main.psy);
+ if (ret)
+ goto err_psy_reg_main;
+- ret = power_supply_register(dev, &tosa_bat_jacket.psy);
++ ret = power_supply_register(&dev->dev, &tosa_bat_jacket.psy);
+ if (ret)
+ goto err_psy_reg_jacket;
+- ret = power_supply_register(dev, &tosa_bat_bu.psy);
++ ret = power_supply_register(&dev->dev, &tosa_bat_bu.psy);
+ if (ret)
+ goto err_psy_reg_bu;
+
+@@ -413,7 +411,7 @@ err_gpio:
+ return ret;
+ }
+
+-static int __devexit tosa_bat_remove(struct device *dev)
++static int __devexit tosa_bat_remove(struct platform_device *dev)
+ {
+ int i;
+
+@@ -430,10 +428,9 @@ static int __devexit tosa_bat_remove(struct device *dev)
+ return 0;
+ }
+
+-static struct device_driver tosa_bat_driver = {
+- .name = "wm97xx-battery",
+- .bus = &wm97xx_bus_type,
+- .owner = THIS_MODULE,
++static struct platform_driver tosa_bat_driver = {
++ .driver.name = "wm97xx-battery",
++ .driver.owner = THIS_MODULE,
+ .probe = tosa_bat_probe,
+ .remove = __devexit_p(tosa_bat_remove),
+ .suspend = tosa_bat_suspend,
+@@ -442,12 +439,12 @@ static struct device_driver tosa_bat_driver = {
+
+ static int __init tosa_bat_init(void)
+ {
+- return driver_register(&tosa_bat_driver);
++ return platform_driver_register(&tosa_bat_driver);
+ }
+
+ static void __exit tosa_bat_exit(void)
+ {
+- driver_unregister(&tosa_bat_driver);
++ platform_driver_unregister(&tosa_bat_driver);
+ }
+
+ module_init(tosa_bat_init);
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0062-tosa-bat-fix-charging.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0062-tosa-bat-fix-charging.patch
new file mode 100644
index 0000000000..e3a6b74772
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0062-tosa-bat-fix-charging.patch
@@ -0,0 +1,78 @@
+From 0b9f80ab540b2e51f6e86f6a1adec67761f9368d Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 8 Feb 2008 00:50:03 +0300
+Subject: [PATCH 62/64] tosa-bat-fix-charging
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/tosa_battery.c | 28 +++++++++++++++++++++-------
+ 1 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+index 008e791..2db9116 100644
+--- a/drivers/power/tosa_battery.c
++++ b/drivers/power/tosa_battery.c
+@@ -153,39 +153,53 @@ static irqreturn_t tosa_bat_full_isr(int irq, void *data)
+ return IRQ_HANDLED;
+ }
+
++static char *status_text[] = {
++ [POWER_SUPPLY_STATUS_UNKNOWN] = "Unknown",
++ [POWER_SUPPLY_STATUS_CHARGING] = "Charging",
++ [POWER_SUPPLY_STATUS_DISCHARGING] = "Discharging",
++ [POWER_SUPPLY_STATUS_NOT_CHARGING] = "Not charging",
++ [POWER_SUPPLY_STATUS_FULL] = "Full",
++};
++
+ static void tosa_bat_update(struct tosa_bat *bat)
+ {
+- int old = bat->status;
++ int old;
+ struct power_supply *psy = &bat->psy;
+
+ mutex_lock(&bat->work_lock);
+
++ old = bat->status;
++
+ if (bat->is_present && !bat->is_present(bat)) {
+- printk(KERN_DEBUG "%s not present\n", psy->name);
++ printk(KERN_NOTICE "%s not present\n", psy->name);
+ bat->status = POWER_SUPPLY_STATUS_NOT_CHARGING;
+ bat->full_chrg = -1;
+ } else if (power_supply_am_i_supplied(psy)) {
++ if (bat->status == POWER_SUPPLY_STATUS_DISCHARGING) {
++ gpio_set_value(bat->gpio_charge_off, 0);
++ mdelay(15);
++ }
+ if (gpio_get_value(bat->gpio_full)) {
+- printk(KERN_DEBUG "%s full\n", psy->name);
+-
+ if (old == POWER_SUPPLY_STATUS_CHARGING || bat->full_chrg == -1)
+ bat->full_chrg = tosa_read_bat(bat);
+
+ gpio_set_value(bat->gpio_charge_off, 1);
+ bat->status = POWER_SUPPLY_STATUS_FULL;
+ } else {
+- printk(KERN_ERR "%s charge\n", psy->name);
+ gpio_set_value(bat->gpio_charge_off, 0);
+ bat->status = POWER_SUPPLY_STATUS_CHARGING;
+ }
+ } else {
+- printk(KERN_ERR "%s discharge\n", psy->name);
+ gpio_set_value(bat->gpio_charge_off, 1);
+ bat->status = POWER_SUPPLY_STATUS_DISCHARGING;
+ }
+
+- if (old != bat->status)
++ if (old != bat->status) {
++ printk(KERN_NOTICE "%s %s -> %s\n", psy->name,
++ status_text[old],
++ status_text[bat->status]);
+ power_supply_changed(psy);
++ }
+
+ mutex_unlock(&bat->work_lock);
+ }
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch
new file mode 100644
index 0000000000..416cae44ec
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch
@@ -0,0 +1,84 @@
+From 4ef7289137132959e3db5a1e77580ff9db185d90 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 8 Feb 2008 01:13:54 +0300
+Subject: [PATCH 63/64] patch tosa-bat-jacket-detect
+
+---
+ drivers/power/tosa_battery.c | 21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+index 2db9116..70beed2 100644
+--- a/drivers/power/tosa_battery.c
++++ b/drivers/power/tosa_battery.c
+@@ -137,8 +137,7 @@ static int tosa_bat_get_property(struct power_supply *psy,
+ }
+
+ static bool tosa_jacket_bat_is_present(struct tosa_bat *bat) {
+- // FIXME
+- return 1;
++ return gpio_get_value(TOSA_GPIO_JACKET_DETECT) == 0;
+ }
+
+ static void tosa_bat_external_power_changed(struct power_supply *psy)
+@@ -146,9 +145,9 @@ static void tosa_bat_external_power_changed(struct power_supply *psy)
+ schedule_work(&bat_work);
+ }
+
+-static irqreturn_t tosa_bat_full_isr(int irq, void *data)
++static irqreturn_t tosa_bat_gpio_isr(int irq, void *data)
+ {
+- printk(KERN_ERR "bat_full irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
++ printk(KERN_ERR "bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
+ schedule_work(&bat_work);
+ return IRQ_HANDLED;
+ }
+@@ -334,6 +333,7 @@ static struct {
+ { TOSA_GPIO_BAT1_CRG, "jacket battery full", 0, 0 },
+ { TOSA_GPIO_BAT0_LOW, "main battery low", 0, 0 },
+ { TOSA_GPIO_BAT1_LOW, "jacket battery low", 0, 0 },
++ { TOSA_GPIO_JACKET_DETECT, "jacket detect", 0, 0 },
+ };
+
+ #ifdef CONFIG_PM
+@@ -395,19 +395,27 @@ static int __devinit tosa_bat_probe(struct platform_device *dev)
+ goto err_psy_reg_bu;
+
+ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG),
+- tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ tosa_bat_gpio_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "main full", &tosa_bat_main);
+ if (ret)
+ goto err_req_main;
+
+ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG),
+- tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ tosa_bat_gpio_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "jacket full", &tosa_bat_jacket);
++ if (ret)
++ goto err_req_jacket;
++
++ ret = request_irq(gpio_to_irq(TOSA_GPIO_JACKET_DETECT),
++ tosa_bat_gpio_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "jacket detect", &tosa_bat_jacket);
+ if (!ret) {
+ schedule_work(&bat_work);
+ return 0;
+ }
+
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG), &tosa_bat_jacket);
++err_req_jacket:
+ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
+ err_req_main:
+ power_supply_unregister(&tosa_bat_bu.psy);
+@@ -429,6 +437,7 @@ static int __devexit tosa_bat_remove(struct platform_device *dev)
+ {
+ int i;
+
++ free_irq(gpio_to_irq(TOSA_GPIO_JACKET_DETECT), &tosa_bat_jacket);
+ free_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG), &tosa_bat_jacket);
+ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
+
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0064-Export-modes-via-sysfs.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0064-Export-modes-via-sysfs.patch
new file mode 100644
index 0000000000..eeb92cfdd5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0064-Export-modes-via-sysfs.patch
@@ -0,0 +1,27 @@
+From feeee5d22c00d9d1e2e06eb5610740be238749b9 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 7 Feb 2008 22:27:38 +0300
+Subject: [PATCH 64/64] Export modes via sysfs
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/video/tmiofb.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+index 6b963a1..9389a77 100644
+--- a/drivers/video/tmiofb.c
++++ b/drivers/video/tmiofb.c
+@@ -800,6 +800,9 @@ static int tmiofb_probe(struct platform_device *dev)
+ if (retval)
+ goto err_set_par;*/
+
++ fb_videomode_to_modelist(data->modes, data->num_modes,
++ &info->modelist);
++
+ retval = register_framebuffer(info);
+ if (retval < 0)
+ goto err_register_framebuffer;
+--
+1.5.3.8
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0065-wm97xx-core-fixes.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0065-wm97xx-core-fixes.patch
new file mode 100644
index 0000000000..5db0cc6ba0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0065-wm97xx-core-fixes.patch
@@ -0,0 +1,49 @@
+From 2544412fc47dc13f4f3935cb4c2fd500d217e905 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 13 Feb 2008 02:00:15 +0300
+Subject: [PATCH] wm97xx-core fixes
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/touchscreen/wm97xx-core.c | 8 ++++----
+ include/linux/wm97xx.h | 1 -
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+index 840d9ff..4cbb9e5 100644
+--- a/drivers/input/touchscreen/wm97xx-core.c
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -596,7 +596,7 @@ static int wm97xx_probe(struct device *dev)
+ }
+ platform_set_drvdata(wm->battery_dev, wm);
+ wm->battery_dev->dev.parent = dev;
+- ret = platform_device_register(wm->battery_dev);
++ ret = platform_device_add(wm->battery_dev);
+ if (ret < 0)
+ goto batt_reg_err;
+
+@@ -609,7 +609,7 @@ static int wm97xx_probe(struct device *dev)
+ }
+ platform_set_drvdata(wm->touch_dev, wm);
+ wm->touch_dev->dev.parent = dev;
+- ret = platform_device_register(wm->touch_dev);
++ ret = platform_device_add(wm->touch_dev);
+ if (ret < 0)
+ goto touch_reg_err;
+
+@@ -619,10 +619,12 @@ static int wm97xx_probe(struct device *dev)
+ platform_device_put(wm->touch_dev);
+ touch_err:
+ platform_device_unregister(wm->battery_dev);
++ wm->battery_dev = NULL;
+ batt_reg_err:
+ platform_device_put(wm->battery_dev);
+ batt_err:
+ input_unregister_device(wm->input_dev);
++ wm->input_dev = NULL;
+ kfree(wm);
+ return ret;
+ }
+--
+1.5.4.1
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch
new file mode 100644
index 0000000000..42320be50b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch
@@ -0,0 +1,26 @@
+From b6a63ad546cc26519a342f3fdd7b1def49ca33ee Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 13 Feb 2008 02:00:14 +0300
+Subject: [PATCH] tmiofb_probe should be __devinit
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/video/tmiofb.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+index 9389a77..958ee8a 100644
+--- a/drivers/video/tmiofb.c
++++ b/drivers/video/tmiofb.c
+@@ -704,7 +704,7 @@ static irqreturn_t tmiofb_irq(int irq, void *__info)
+ return IRQ_HANDLED;
+ }
+
+-static int tmiofb_probe(struct platform_device *dev)
++static int __devinit tmiofb_probe(struct platform_device *dev)
+ {
+ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct tmio_fb_data *data = cell->driver_data;
+--
+1.5.4.1
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0067-modeswitching.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0067-modeswitching.patch
new file mode 100644
index 0000000000..42b69d9377
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0067-modeswitching.patch
@@ -0,0 +1,225 @@
+From aded2e51a7a2113dae6431c858df1d95fb312851 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 13 Feb 2008 19:34:08 +0300
+Subject: [PATCH] modeswitching
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 33 +++++++++++++++++++++++++++++++-
+ drivers/mfd/tc6393xb.c | 2 +-
+ drivers/video/backlight/tosa_bl.c | 38 +++++++++++++++++++++++++++++++++---
+ drivers/video/tmiofb.c | 8 +++---
+ include/asm-arm/arch-pxa/tosa.h | 2 +
+ include/linux/mfd/tc6393xb.h | 2 +-
+ include/linux/mfd/tmio.h | 2 +-
+ 7 files changed, 75 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 94c9915..6631de2 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -455,9 +455,40 @@ static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
+ }
+ };
+
++static DEFINE_SPINLOCK(tosa_lcd_mode_lock);
++
++static const struct fb_videomode *tosa_lcd_mode = &tosa_tc6393xb_lcd_mode[0];
++
++static int tosa_lcd_set_mode(struct platform_device *fb_dev,
++ const struct fb_videomode *mode)
++{
++ int rc;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tosa_lcd_mode_lock, flags);
++ rc = tc6393xb_lcd_mode(fb_dev, mode);
++ if (!rc)
++ tosa_lcd_mode = mode;
++ spin_unlock_irqrestore(&tosa_lcd_mode_lock, flags);
++
++ return rc;
++}
++
++const struct fb_videomode *tosa_lcd_get_mode(void)
++{
++ unsigned long flags;
++ const struct fb_videomode *mode;
++
++ spin_lock_irqsave(&tosa_lcd_mode_lock, flags);
++ mode = tosa_lcd_mode;
++ spin_unlock_irqrestore(&tosa_lcd_mode_lock, flags);
++
++ return mode;
++}
++
+ static struct tmio_fb_data tosa_tc6393xb_fb_config = {
+ .lcd_set_power = tc6393xb_lcd_set_power,
+- .lcd_mode = tc6393xb_lcd_mode,
++ .lcd_mode = tosa_lcd_set_mode,
+ .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
+ .modes = &tosa_tc6393xb_lcd_mode[0],
+ };
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 9001687..21190f3 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -196,7 +196,7 @@ int tc6393xb_lcd_set_power(struct platform_device *fb, bool on)
+ EXPORT_SYMBOL(tc6393xb_lcd_set_power);
+
+ int tc6393xb_lcd_mode(struct platform_device *fb_dev,
+- struct fb_videomode *mode) {
++ const struct fb_videomode *mode) {
+ struct tc6393xb *tc6393xb =
+ platform_get_drvdata(to_platform_device(fb_dev->dev.parent));
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c
+index 9ef0bfb..45fc6ae 100644
+--- a/drivers/video/backlight/tosa_bl.c
++++ b/drivers/video/backlight/tosa_bl.c
+@@ -48,6 +48,9 @@ struct tosa_bl_data {
+ struct ssp_dev nssp_dev;
+ struct ssp_state nssp_state;
+
++ /* listen for mode changes */
++ struct notifier_block fb_notif;
++
+ struct backlight_device *bl_dev;
+ };
+
+@@ -103,14 +106,19 @@ static void tosa_lcd_tg_init(struct tosa_bl_data *data)
+ pxa_nssp_output(data, TG_GPOSR,0x02); /* GPOS0=powercontrol, GPOS1=GPIO, GPOS2=TCTL */
+ }
+
+-static void tosa_lcd_tg_on(struct tosa_bl_data *data/*, const struct fb_videomode *mode*/)
++static void tosa_lcd_tg_on(struct tosa_bl_data *data)
+ {
+- const int value = TG_REG0_COLOR | TG_REG0_UD | TG_REG0_LR;
++ const struct fb_videomode *mode = tosa_lcd_get_mode();
++
++ int value = TG_REG0_COLOR | TG_REG0_UD | TG_REG0_LR;
++
++ if (mode->yres == 640)
++ value |= TG_REG0_VQV;
+
+ tosa_lcd_tg_init(data);
+
+- dev_dbg(&data->bl_dev->dev, "tosa_lcd_on\n");
+- pxa_nssp_output(data, TG_PNLCTL, value | (/*mode->yres == 320 ? 0 : */ TG_REG0_VQV));
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_on: %04x (%d)\n", value, mode->yres);
++ pxa_nssp_output(data, TG_PNLCTL, value);
+
+ /* TG LCD pannel power up */
+ pxa_nssp_output(data, TG_PINICTL,0x4);
+@@ -173,6 +181,20 @@ static struct backlight_ops tosa_bl_ops = {
+ .update_status = tosa_bl_update_status,
+ };
+
++static int fb_notifier_callback(struct notifier_block *self,
++ unsigned long event, void *_data)
++{
++ struct tosa_bl_data *bl_data =
++ container_of(self, struct tosa_bl_data, fb_notif);
++
++ if (event != FB_EVENT_MODE_CHANGE && event != FB_EVENT_MODE_CHANGE_ALL)
++ return 0;
++
++ tosa_bl_update_status(bl_data->bl_dev);
++
++ return 0;
++}
++
+ static int tosa_bl_detect_client(struct i2c_adapter *adapter, int address,
+ int kind)
+ {
+@@ -238,9 +260,15 @@ static int tosa_bl_detect_client(struct i2c_adapter *adapter, int address,
+ data->bl_dev->props.power = FB_BLANK_UNBLANK;
+ backlight_update_status(data->bl_dev);
+
++ data->fb_notif.notifier_call = fb_notifier_callback;
++ err = fb_register_client(&data->fb_notif);
++ if (err)
++ goto err_fb_register;
+
+ return 0;
+
++err_fb_register:
++ backlight_device_unregister(data->bl_dev);
+ err_bl_register:
+ tosa_set_backlight(data, 0);
+ tosa_lcd_tg_off(data);
+@@ -265,6 +293,8 @@ static int tosa_bl_detach_client(struct i2c_client *client)
+ int err = 0;
+ struct tosa_bl_data *data = i2c_get_clientdata(client);
+
++ fb_unregister_client(&data->fb_notif);
++
+ backlight_device_unregister(data->bl_dev);
+
+ tosa_set_backlight(data, 0);
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+index 958ee8a..cc75df9 100644
+--- a/drivers/video/tmiofb.c
++++ b/drivers/video/tmiofb.c
+@@ -618,17 +618,17 @@ static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+
+ static int tmiofb_set_par(struct fb_info *info)
+ {
+-/* struct fb_var_screeninfo *var = &info->var;
++ struct fb_var_screeninfo *var = &info->var;
+ struct fb_videomode *mode;
+
+ mode = tmiofb_find_mode(info, var);
+ if (!mode)
+ return -EINVAL;
+
+- if (info->mode == mode)
+- return 0;
++/* if (info->mode == mode)
++ return 0;*/
+
+- info->mode = mode; */
++ info->mode = mode;
+ info->fix.line_length = info->mode->xres * 2;
+
+ tmiofb_hw_mode(to_platform_device(info->device));
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index 410fa9a..624c636 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -230,4 +230,6 @@ extern struct platform_device tosascoop_device;
+ #define TOSA_KEY_MAIL KEY_MAIL
+ #endif
+
++const struct fb_videomode *tosa_lcd_get_mode(void);
++
+ #endif /* _ASM_ARCH_TOSA_H_ */
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+index 97c4c7c..8ab9e91 100644
+--- a/include/linux/mfd/tc6393xb.h
++++ b/include/linux/mfd/tc6393xb.h
+@@ -53,7 +53,7 @@ struct tc6393xb_platform_data {
+
+ extern int tc6393xb_lcd_set_power(struct platform_device *fb_dev, bool on);
+ extern int tc6393xb_lcd_mode(struct platform_device *fb_dev,
+- struct fb_videomode *mode);
++ const struct fb_videomode *mode);
+
+ /*
+ * Relative to irq_base
+diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
+index b6d4aac..fe7ff2d 100644
+--- a/include/linux/mfd/tmio.h
++++ b/include/linux/mfd/tmio.h
+@@ -19,7 +19,7 @@ struct tmio_fb_data {
+ int (*lcd_set_power)(struct platform_device *fb_dev,
+ bool on);
+ int (*lcd_mode)(struct platform_device *fb_dev,
+- struct fb_videomode *mode);
++ const struct fb_videomode *mode);
+ int num_modes;
+ struct fb_videomode *modes;
+ };
+--
+1.5.4.1
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch
new file mode 100644
index 0000000000..e90e3751c0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch
@@ -0,0 +1,239 @@
+From f7dad1cd9c1bd3fce5d228e0b644a51baea50cd9 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 15 Feb 2008 15:35:07 +0300
+Subject: [PATCH] Preliminary tosa denoiser
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/touchscreen/Kconfig | 12 ++
+ drivers/input/touchscreen/Makefile | 1 +
+ drivers/input/touchscreen/tosa-wm97xx.c | 182 +++++++++++++++++++++++++++++++
+ 3 files changed, 195 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/tosa-wm97xx.c
+
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index 0be05a2..938aed2 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -210,6 +210,18 @@ config TOUCHSCREEN_WM97XX_MAINSTONE
+ To compile this driver as a module, choose M here: the
+ module will be called mainstone-wm97xx
+
++config TOUCHSCREEN_WM97XX_TOSA
++ tristate "WM97xx Tosa denoiser"
++ depends on TOUCHSCREEN_WM97XX && MACH_TOSA
++ help
++ Say Y here for support for touchscreen denoising on
++ Sharl Zaurus SL-6000 (tosa) system.
++
++ If unsure, say N
++
++ To compile this driver as a module, choose M here: the
++ module will be called tosa-wm97xx
++
+ config TOUCHSCREEN_TOUCHWIN
+ tristate "Touchwin serial touchscreen"
+ select SERIO
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index d38156e..d86278b 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -23,6 +23,7 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
+ obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX_TOSA) += tosa-wm97xx.o
+ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o
+ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o
+ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o
+diff --git a/drivers/input/touchscreen/tosa-wm97xx.c b/drivers/input/touchscreen/tosa-wm97xx.c
+new file mode 100644
+index 0000000..8fd542b
+--- /dev/null
++++ b/drivers/input/touchscreen/tosa-wm97xx.c
+@@ -0,0 +1,182 @@
++/*
++ * tosa_ts.c -- Touchscreen driver for Sharp SL-6000 (Tosa).
++ *
++ * Copyright 2008 Dmitry Baryshkov
++ * Copyright 2006 Wolfson Microelectronics PLC.
++ * Author: Mike Arthur
++ * linux@wolfsonmicro.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.
++ *
++ * Revision history
++ * 1st Sep 2006 Initial version.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/wm97xx.h>
++#include <linux/fb.h>
++
++#include <asm/arch/tosa.h>
++#include <asm/gpio.h>
++
++static unsigned long hsync_time = 0;
++
++static void calc_hsync_time(const struct fb_videomode *mode)
++{
++ /* The 25 and 44 'magic numbers' are from Sharp's 2.4 patches */
++ if (mode->yres == 640) {
++ hsync_time = 25;
++ } else if (mode->yres == 320) {
++ hsync_time = 44;
++ } else {
++ printk(KERN_ERR "unknown video mode res specified: %dx%d!", mode->xres, mode->yres);
++ WARN_ON(1);
++ }
++
++ printk(KERN_ERR "tosa-wm97xx: using %lu hsync time\n", hsync_time);
++}
++
++static int fb_notifier_callback(struct notifier_block *self,
++ unsigned long event, void *_data)
++{
++ if (event != FB_EVENT_MODE_CHANGE && event != FB_EVENT_MODE_CHANGE_ALL)
++ return 0;
++
++ calc_hsync_time(tosa_lcd_get_mode());
++
++ return 0;
++}
++
++static void tosa_lcd_wait_hsync(void)
++{
++ /* Waits for a rising edge on the VGA line */
++ while (gpio_get_value(TOSA_GPIO_VGA_LINE) == 0);
++ while (gpio_get_value(TOSA_GPIO_VGA_LINE) != 0);
++}
++
++/* Taken from the Sharp 2.4 kernel code */
++#define CCNT(a) asm volatile ("mrc p14, 0, %0, C1, C1, 0" : "=r"(a))
++#define CCNT_ON() asm("mcr p14, 0, %0, C0, C0, 0" : : "r"(1))
++#define CCNT_OFF() asm("mcr p14, 0, %0, C0, C0, 0" : : "r"(0))
++
++/* On the Sharp SL-6000 (Tosa), due to a noisy LCD, we need to perform a wait
++ * before sampling the Y axis of the touchscreen */
++static void tosa_lcd_sync_on(int adcsel)
++{
++ unsigned long timer1 = 0, timer2 = 0, wait_time = 0;
++ if (adcsel & WM97XX_ADCSEL_Y) {
++ CCNT_ON();
++ wait_time = hsync_time;
++
++ if (wait_time) {
++
++ /* wait for LCD rising edge */
++ tosa_lcd_wait_hsync();
++ /* get clock */
++ CCNT(timer1);
++ CCNT(timer2);
++
++ while ((timer2 - timer1) < wait_time) {
++ CCNT(timer2);
++ }
++ }
++ }
++}
++
++static void tosa_lcd_sync_off(int adcsel)
++{
++ if (adcsel & WM97XX_ADCSEL_Y)
++ CCNT_OFF();
++}
++
++static struct wm97xx_mach_ops tosa_mach_ops = {
++ .pre_sample = tosa_lcd_sync_on,
++ .post_sample = tosa_lcd_sync_off,
++};
++
++static int __devinit tosa_ts_probe(struct platform_device *dev) {
++ struct wm97xx *wm = platform_get_drvdata(dev);
++ struct notifier_block *notif;
++ int err = -ENOMEM;
++
++ notif = kzalloc(sizeof(struct notifier_block), GFP_KERNEL);
++ if (!notif)
++ goto err_alloc;
++
++ notif->notifier_call = fb_notifier_callback;
++
++ err = gpio_request(TOSA_GPIO_VGA_LINE, "hsync");
++ if (err)
++ goto err_gpio;
++
++ err = gpio_direction_input(TOSA_GPIO_VGA_LINE);
++ if (err)
++ goto err_gpio;
++
++ platform_set_drvdata(dev, notif);
++
++ err = fb_register_client(notif);
++ if (err)
++ goto err_register;
++
++ err = wm97xx_register_mach_ops(wm, &tosa_mach_ops);
++ if (err)
++ goto err_wm97xx;
++
++ calc_hsync_time(tosa_lcd_get_mode());
++
++ return 0;
++
++err_wm97xx:
++ fb_unregister_client(notif);
++err_register:
++ gpio_free(TOSA_GPIO_VGA_LINE);
++err_gpio:
++ kfree(notif);
++err_alloc:
++ return err;
++}
++
++
++static int __devexit tosa_ts_remove(struct platform_device *dev) {
++ struct wm97xx *wm = platform_get_drvdata(dev);
++
++ wm97xx_unregister_mach_ops(wm);
++
++ fb_unregister_client(platform_get_drvdata(dev));
++ gpio_free(TOSA_GPIO_VGA_LINE);
++ kfree(platform_get_drvdata(dev));
++
++ return 0;
++}
++
++static struct platform_driver tosa_ts_driver = {
++ .driver.name = "wm97xx-touch",
++ .driver.owner = THIS_MODULE,
++ .probe = tosa_ts_probe,
++ .remove = __devexit_p(tosa_ts_remove),
++};
++
++static int __init tosa_ts_init(void)
++{
++ return platform_driver_register(&tosa_ts_driver);
++}
++
++static void __exit tosa_ts_exit(void)
++{
++ platform_driver_unregister(&tosa_ts_driver);
++}
++
++module_init(tosa_ts_init);
++module_exit(tosa_ts_exit);
++
++/* Module information */
++MODULE_AUTHOR("Dmitry Baryshkov, Mike Arthur, mike@mikearthur.co.uk, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("Sharp SL6000 Tosa Touch Screen Denoiser");
++MODULE_LICENSE("GPL");
+--
+1.5.4.1
+
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/defconfig b/recipes/linux/linux-kexecboot-2.6.24/tosa/defconfig
new file mode 100644
index 0000000000..9513c418f9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/defconfig
@@ -0,0 +1,1137 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Mon Dec 8 00:58:55 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_HAVE_CLOCK_LIB=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES 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 is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+CONFIG_MACH_TOSA=y
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 debug "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET 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 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_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+CONFIG_MTD_NAND_TMIO=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+# CONFIG_PCMCIA_PCNET is not set
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP 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_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_POWER is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_SHARPSL_RC is not set
+CONFIG_KEYBOARD_TOSA=y
+# CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# 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=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_CORE=y
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+CONFIG_MFD_TC6393XB=y
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+CONFIG_FB_TMIO=y
+# CONFIG_FB_TMIO_ACCELL is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_TOSA=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PROCFS is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_PXA2XX_SOC=y
+CONFIG_SND_PXA2XX_SOC_AC97=y
+CONFIG_SND_PXA2XX_SOC_TOSA=y
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM9712=y
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+# CONFIG_HID_SUPPORT is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_TOSA=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_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=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NETWORK_FILESYSTEMS 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_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_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-kexecboot-2.6.24/tosa/tmiofb-fix-unaccel.patch b/recipes/linux/linux-kexecboot-2.6.24/tosa/tmiofb-fix-unaccel.patch
new file mode 100644
index 0000000000..d611342170
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/tmiofb-fix-unaccel.patch
@@ -0,0 +1,33 @@
+Index: linux-2.6.24/drivers/video/tmiofb.c
+===================================================================
+--- linux-2.6.24.orig/drivers/video/tmiofb.c 2008-12-07 22:30:26.600128369 +0300
++++ linux-2.6.24/drivers/video/tmiofb.c 2008-12-07 22:31:42.537112538 +0300
+@@ -689,14 +689,14 @@ static irqreturn_t tmiofb_irq(int irq, v
+ unsigned int bbisc = ioread16(&lcr->bbisc);
+
+
++ iowrite16(bbisc, &lcr->bbisc);
++
++#ifdef CONFIG_FB_TMIO_ACCELL
+ if (unlikely(par->use_polling && irq != -1)) {
+ printk(KERN_INFO "tmiofb: switching to waitq\n");
+ par->use_polling = false;
+ }
+
+- iowrite16(bbisc, &lcr->bbisc);
+-
+-#ifdef CONFIG_FB_TMIO_ACCELL
+ if (bbisc & 1)
+ wake_up(&par->wait_acc);
+ #endif
+@@ -972,8 +972,10 @@ static int tmiofb_suspend(struct platfor
+ info->fbops->fb_sync(info);
+
+
++#ifdef CONFIG_FB_TMIO_ACCELL
+ printk(KERN_INFO "tmiofb: switching to polling\n");
+ par->use_polling = true;
++#endif
+ tmiofb_hw_stop(dev);
+
+ if (cell->suspend)
diff --git a/recipes/linux/linux-kexecboot-2.6.24/tosa/tosa-bl-fixup.diff b/recipes/linux/linux-kexecboot-2.6.24/tosa/tosa-bl-fixup.diff
new file mode 100644
index 0000000000..c4a23d1f49
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/tosa/tosa-bl-fixup.diff
@@ -0,0 +1,103 @@
+Index: linux-2.6.24/drivers/video/backlight/tosa_bl.c
+===================================================================
+--- linux-2.6.24.orig/drivers/video/backlight/tosa_bl.c 2008-11-15 22:59:51.592985003 +0300
++++ linux-2.6.24/drivers/video/backlight/tosa_bl.c 2008-11-18 04:08:13.021416618 +0300
+@@ -76,6 +76,8 @@ static void pxa_nssp_output(struct tosa_
+
+ static void tosa_set_backlight(struct tosa_bl_data *data, int brightness)
+ {
++ pr_debug("tosa_set_backlight\n");
++
+ /* SetBacklightDuty */
+ i2c_smbus_write_byte_data(&data->client, DAC_CH2, (unsigned char)brightness);
+
+@@ -91,7 +93,7 @@ static void tosa_set_backlight(struct to
+
+ static void tosa_lcd_tg_init(struct tosa_bl_data *data)
+ {
+- dev_dbg(&data->bl_dev->dev, "tosa_lcd_init\n");
++ pr_debug("tosa_lcd_init\n");
+
+ /* L3V On */
+ set_scoop_gpio( &tosascoop_jc_device.dev,TOSA_SCOOP_JC_TC6393XB_L3V_ON);
+@@ -116,7 +118,7 @@ static void tosa_lcd_tg_on(struct tosa_b
+
+ tosa_lcd_tg_init(data);
+
+- dev_dbg(&data->bl_dev->dev, "tosa_lcd_on: %04x (%d)\n", value, mode->yres);
++ pr_debug("tosa_lcd_on: %04x (%d)\n", value, mode->yres);
+ pxa_nssp_output(data, TG_PNLCTL, value);
+
+ /* TG LCD pannel power up */
+@@ -129,12 +131,15 @@ static void tosa_lcd_tg_on(struct tosa_b
+
+ /* set common voltage */
+ i2c_smbus_write_byte_data(&data->client, DAC_CH1, data->comadj);
++
++ tosa_set_backlight(data, data->bl_dev->props.brightness);
++
+ }
+
+ static void tosa_lcd_tg_off(struct tosa_bl_data *data)
+ {
+ tosa_set_backlight(data, 0);
+- dev_dbg(&data->bl_dev->dev, "tosa_lcd_off\n");
++ pr_debug("tosa_lcd_off\n");
+ /* TG LCD VHSA off */
+ pxa_nssp_output(data, TG_PINICTL,0x4);
+ mdelay(50);
+@@ -158,8 +163,6 @@ static int tosa_bl_update_status(struct
+ struct tosa_bl_data *data = dev_get_drvdata(&dev->dev);
+ int new_power = max(props->power, props->fb_blank);
+
+- tosa_set_backlight(data, props->brightness);
+-
+ if (new_power)
+ tosa_lcd_tg_off(data);
+ else
+@@ -223,22 +226,26 @@ static int tosa_bl_detect_client(struct
+
+ err = gpio_request(TOSA_TC6393XB_BL_C20MA, "backlight");
+ if (err) {
+- dev_dbg(&data->bl_dev->dev, "Unable to request gpio!\n");
++ printk(KERN_ERR "tosa-bl; Unable to request gpio!\n");
+ goto err_gpio_bl;
+ }
+
+ err = gpio_request(TOSA_TC6393XB_TG_ON, "tg");
+ if (err) {
+- dev_dbg(&data->bl_dev->dev, "Unable to request gpio!\n");
++ printk(KERN_ERR "tosa-bl: Unable to request gpio!\n");
+ goto err_gpio_tg;
+ }
+
+ err = ssp_init(&data->nssp_dev,2,0);
+ if (err) {
+- dev_err(&data->bl_dev->dev, "Unable to register NSSP handler!\n");
++ printk(KERN_ERR "tosa-bl: Unable to register NSSP handler!\n");
+ goto err_ssp_init;
+ }
+
++ pxa_gpio_mode(GPIO83_NSSP_TX);
++ pxa_gpio_mode(GPIO81_NSSP_CLK_OUT);
++ pxa_gpio_mode(GPIO82_NSSP_FRM_OUT);
++
+ /* Tell the i2c layer a new client has arrived */
+ err = i2c_attach_client(client);
+ if (err)
+@@ -269,7 +276,6 @@ static int tosa_bl_detect_client(struct
+ err_fb_register:
+ backlight_device_unregister(data->bl_dev);
+ err_bl_register:
+- tosa_set_backlight(data, 0);
+ tosa_lcd_tg_off(data);
+
+ err = i2c_detach_client(client);
+@@ -296,7 +302,6 @@ static int tosa_bl_detach_client(struct
+
+ backlight_device_unregister(data->bl_dev);
+
+- tosa_set_backlight(data, 0);
+ tosa_lcd_tg_off(data);
+
+ /* Try to detach the client from i2c space */
diff --git a/recipes/linux/linux-kexecboot-2.6.24/versatile-armv6.patch b/recipes/linux/linux-kexecboot-2.6.24/versatile-armv6.patch
new file mode 100644
index 0000000000..e2d0060ac3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/versatile-armv6.patch
@@ -0,0 +1,19 @@
+---
+ arch/arm/mm/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.23.orig/arch/arm/mm/Kconfig
++++ linux-2.6.23/arch/arm/mm/Kconfig
+@@ -343,11 +343,11 @@ config CPU_XSC3
+ select IO_36
+
+ # ARMv6
+ config CPU_V6
+ bool "Support ARM V6 processor"
+- depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3
++ depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_VERSATILE_PB
+ default y if ARCH_MX3
+ select CPU_32v6
+ select CPU_ABRT_EV6
+ select CPU_CACHE_V6
+ select CPU_CACHE_VIPT
diff --git a/recipes/linux/linux-kexecboot-2.6.24/wm8750-treble.patch b/recipes/linux/linux-kexecboot-2.6.24/wm8750-treble.patch
new file mode 100644
index 0000000000..07a8d8e141
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/wm8750-treble.patch
@@ -0,0 +1,11 @@
+--- linux-2.6.23/sound/soc/codecs/wm8750.c 2007-10-09 22:31:38.000000000 +0200
++++ linux-2.6.23/sound/soc/codecs/wm8750.c 2007-11-02 16:47:35.000000000 +0100
+@@ -189,7 +189,7 @@
+ SOC_ENUM("Bass Filter", wm8750_enum[1]),
+ SOC_SINGLE("Bass Volume", WM8750_BASS, 0, 15, 1),
+
+-SOC_SINGLE("Treble Volume", WM8750_TREBLE, 0, 15, 0),
++SOC_SINGLE("Treble Volume", WM8750_TREBLE, 0, 15, 1),
+ SOC_ENUM("Treble Cut-off", wm8750_enum[2]),
+
+ SOC_SINGLE("3D Switch", WM8750_3D, 0, 1, 0),
diff --git a/recipes/linux/linux-kexecboot-2.6.24/zylonite-boot.patch b/recipes/linux/linux-kexecboot-2.6.24/zylonite-boot.patch
new file mode 100644
index 0000000000..f41928eca5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.24/zylonite-boot.patch
@@ -0,0 +1,45 @@
+From 04c42f566c68b757fdadf54e0e0f9dfe9f3f9b06 Mon Sep 17 00:00:00 2001
+From: eric miao <eric.miao@marvell.com>
+Date: Tue, 19 Jun 2007 16:42:53 +0800
+Subject: [PATCH] [PATCH] make zylonite boot
+
+1. reuse head-xscale.S for XSC3
+
+2. add a workaround for machine ID assignment, which should be done
+ by boot loader
+---
+ arch/arm/boot/compressed/Makefile | 4 ++++
+ arch/arm/boot/compressed/head-xscale.S | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+Index: linux-2.6-pxa3/arch/arm/boot/compressed/Makefile
+===================================================================
+--- linux-2.6-pxa3.orig/arch/arm/boot/compressed/Makefile 2007-09-24 11:25:57.000000000 +0200
++++ linux-2.6-pxa3/arch/arm/boot/compressed/Makefile 2007-09-24 12:26:53.000000000 +0200
+@@ -40,6 +40,10 @@
+ OBJS += head-xscale.o
+ endif
+
++ifeq ($(CONFIG_CPU_XSC3),y)
++OBJS += head-xscale.o
++endif
++
+ ifeq ($(CONFIG_PXA_SHARPSL),y)
+ OBJS += head-sharpsl.o
+ endif
+Index: linux-2.6-pxa3/arch/arm/boot/compressed/head-xscale.S
+===================================================================
+--- linux-2.6-pxa3.orig/arch/arm/boot/compressed/head-xscale.S 2007-09-24 11:42:27.000000000 +0200
++++ linux-2.6-pxa3/arch/arm/boot/compressed/head-xscale.S 2007-09-24 12:26:02.000000000 +0200
+@@ -33,6 +33,11 @@
+ bic r0, r0, #0x1000 @ clear Icache
+ mcr p15, 0, r0, c1, c0, 0
+
++#ifdef CONFIG_MACH_ZYLONITE
++ mov r7, #(MACH_TYPE_ZYLONITE & 0xff)
++ orr r7, r7, #(MACH_TYPE_ZYLONITE & 0xff00)
++#endif
++
+ #ifdef CONFIG_ARCH_COTULLA_IDP
+ mov r7, #MACH_TYPE_COTULLA_IDP
+ #endif
diff --git a/recipes/linux/linux-kexecboot-2.6.26/akita/defconfig b/recipes/linux/linux-kexecboot-2.6.26/akita/defconfig
new file mode 100644
index 0000000000..88236013ed
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/akita/defconfig
@@ -0,0 +1,1011 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26
+# Mon Feb 2 00:27: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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# 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="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+# CONFIG_OPROFILE is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES 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=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_PXA_SHARPSL_25x is not set
+CONFIG_PXA_SHARPSL_27x=y
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_BLK_DEV_HD 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=y
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_BLK_DEV_DM 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=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+CONFIG_KEYBOARD_SPITZ=y
+CONFIG_SHARPSL_RC=y
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP 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_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_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SPITZ=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# 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 is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+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-kexecboot-2.6.26/binutils-buildid-arm.patch b/recipes/linux/linux-kexecboot-2.6.26/binutils-buildid-arm.patch
new file mode 100644
index 0000000000..68e35e89e1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/binutils-buildid-arm.patch
@@ -0,0 +1,16 @@
+---
+ arch/arm/kernel/vmlinux.lds.S | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: linux-2.6.22/arch/arm/kernel/vmlinux.lds.S
+===================================================================
+--- linux-2.6.22.orig/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:32:29.000000000 +0200
++++ linux-2.6.22/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:33:42.000000000 +0200
+@@ -94,6 +94,7 @@
+ TEXT_TEXT
+ SCHED_TEXT
+ LOCK_TEXT
++ *(.note.*)
+ #ifdef CONFIG_MMU
+ *(.fixup)
+ #endif
diff --git a/recipes/linux/linux-kexecboot-2.6.26/bootcdx86/defconfig b/recipes/linux/linux-kexecboot-2.6.26/bootcdx86/defconfig
new file mode 100644
index 0000000000..1176bc70bd
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/bootcdx86/defconfig
@@ -0,0 +1,1994 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:34:58 2008
+#
+# CONFIG_64BIT is not set
+CONFIG_X86_32=y
+# CONFIG_X86_64 is not set
+CONFIG_X86=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+# CONFIG_GENERIC_TIME_VSYSCALL is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+# CONFIG_ZONE_DMA32 is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_AUDIT_ARCH is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_TREE=y
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=15
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SMP=y
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_X86_VSMP is not set
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+# CONFIG_PARAVIRT_GUEST is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_TSC=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=4
+CONFIG_HPET_TIMER=y
+CONFIG_NR_CPUS=8
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_VM86=y
+# CONFIG_TOSHIBA is not set
+# CONFIG_I8K is not set
+# CONFIG_X86_REBOOTFIXUPS is not set
+# CONFIG_MICROCODE is not set
+# CONFIG_X86_MSR is not set
+# CONFIG_X86_CPUID is not set
+CONFIG_NOHIGHMEM=y
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HIGHMEM64G is not set
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_3G_OPT is not set
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_2G_OPT is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_X86_PAE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_NR_QUICK=1
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+# CONFIG_EFI is not set
+CONFIG_IRQBALANCE=y
+CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_KEXEC=y
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_RELOCATABLE is not set
+CONFIG_PHYSICAL_ALIGN=0x100000
+CONFIG_HOTPLUG_CPU=y
+CONFIG_COMPAT_VDSO=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_SMP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION_SMP_POSSIBLE=y
+# CONFIG_HIBERNATION is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_PROCFS is not set
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_PROC_EVENT=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_VIDEO is not set
+CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_ASUS is not set
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_BLACKLIST_YEAR=0
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+# CONFIG_ACPI_SBS is not set
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_LEGACY=y
+CONFIG_HT_IRQ=y
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_K8_NB=y
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_NSC_FIR is not set
+# CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_SMC_IRCC_FIR is not set
+# CONFIG_ALI_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+# CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
+# CONFIG_PARPORT_1284 is not set
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+# CONFIG_ISAPNP is not set
+# CONFIG_PNPBIOS is not set
+CONFIG_PNPACPI=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_FD=y
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ASUS_LAPTOP is not set
+# CONFIG_FUJITSU_LAPTOP is not set
+# CONFIG_MSI_LAPTOP is not set
+# CONFIG_SONY_LAPTOP is not set
+# CONFIG_THINKPAD_ACPI is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_IDEACPI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+CONFIG_BLK_DEV_CMD640=y
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_IDEPNP is not set
+
+#
+# PCI IDE chipsets support
+#
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_IDEPCI_PCIBUS_ORDER=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_RZ1000=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_ATIIXP is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5535 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+CONFIG_BLK_DEV_PIIX=y
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_IDE_ARM is not set
+
+#
+# Other IDE chipsets support
+#
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+# CONFIG_BLK_DEV_4DRIVES is not set
+# CONFIG_BLK_DEV_ALI14XX is not set
+# CONFIG_BLK_DEV_DTC2278 is not set
+# CONFIG_BLK_DEV_HT6560B is not set
+# CONFIG_BLK_DEV_QD65XX is not set
+# CONFIG_BLK_DEV_UMC8672 is not set
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+CONFIG_SCSI_DPT_I2O=m
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_NET_SB1000 is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+CONFIG_LANCE=m
+CONFIG_NET_VENDOR_SMC=y
+CONFIG_WD80x3=m
+CONFIG_ULTRA=m
+CONFIG_SMC9194=m
+# CONFIG_NET_VENDOR_RACAL is not set
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=m
+CONFIG_TULIP_MWI=y
+CONFIG_TULIP_MMIO=y
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_AT1700=m
+CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+# CONFIG_EWRK3 is not set
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=y
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+CONFIG_B44_PCI_AUTOSELECT=y
+CONFIG_B44_PCICORE_AUTOSELECT=y
+CONFIG_B44_PCI=y
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+CONFIG_CS89x0=m
+CONFIG_EEPRO100=m
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=y
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+CONFIG_8139TOO_PIO=y
+CONFIG_8139TOO_TUNE_TWISTER=y
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+CONFIG_SUNDANCE_MMIO=y
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+# CONFIG_NET_POCKET is not set
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+CONFIG_ACENIC_OMIT_TIGON_I=y
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+CONFIG_SK98LIN=m
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+# CONFIG_AIRO is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX is not set
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_WISTRON_BTNS is not set
+# CONFIG_INPUT_ATLAS_BTNS is not set
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_CONSOLE is not set
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+# CONFIG_MWAVE is not set
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_NSC_GPIO is not set
+# CONFIG_CS5535_GPIO is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+# CONFIG_HANGCHECK_TIMER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+CONFIG_SSB=m
+CONFIG_SSB_PCIHOST_POSSIBLE=y
+CONFIG_SSB_PCIHOST=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
+CONFIG_SSB_DRIVER_PCICORE=y
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_BWQCAM is not set
+# CONFIG_VIDEO_CQCAM is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_AGP=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_AMD64=m
+CONFIG_AGP_INTEL=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=m
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_I810 is not set
+# CONFIG_DRM_I830 is not set
+# CONFIG_DRM_I915 is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ARC is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+CONFIG_FB_UVESA=m
+# CONFIG_FB_VESA is not set
+# CONFIG_FB_EFI is not set
+# CONFIG_FB_HECUBA is not set
+# CONFIG_FB_HGA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_I810 is not set
+# CONFIG_FB_LE80578 is not set
+# CONFIG_FB_INTEL is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_CYBLA is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_GEODE is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+# CONFIG_BACKLIGHT_PROGEAR is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_VIDEO_SELECT=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_MTS64 is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_PORTMAN2X4 is not set
+
+#
+# ISA devices
+#
+# CONFIG_SND_ADLIB is not set
+# CONFIG_SND_AD1816A is not set
+# CONFIG_SND_AD1848 is not set
+# CONFIG_SND_ALS100 is not set
+# CONFIG_SND_AZT2320 is not set
+# CONFIG_SND_CMI8330 is not set
+# CONFIG_SND_CS4231 is not set
+# CONFIG_SND_CS4232 is not set
+# CONFIG_SND_CS4236 is not set
+# CONFIG_SND_DT019X is not set
+# CONFIG_SND_ES968 is not set
+# CONFIG_SND_ES1688 is not set
+# CONFIG_SND_ES18XX is not set
+# CONFIG_SND_SC6000 is not set
+# CONFIG_SND_GUSCLASSIC is not set
+# CONFIG_SND_GUSEXTREME is not set
+# CONFIG_SND_GUSMAX is not set
+# CONFIG_SND_INTERWAVE is not set
+# CONFIG_SND_INTERWAVE_STB is not set
+# CONFIG_SND_OPL3SA2 is not set
+# CONFIG_SND_OPTI92X_AD1848 is not set
+# CONFIG_SND_OPTI92X_CS4231 is not set
+# CONFIG_SND_OPTI93X is not set
+# CONFIG_SND_MIRO is not set
+# CONFIG_SND_SB8 is not set
+# CONFIG_SND_SB16 is not set
+# CONFIG_SND_SBAWE is not set
+# CONFIG_SND_SGALAXY is not set
+# CONFIG_SND_SSCAPE is not set
+# CONFIG_SND_WAVEFRONT is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_AD1889 is not set
+# CONFIG_SND_ALS300 is not set
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_ATIIXP is not set
+# CONFIG_SND_ATIIXP_MODEM is not set
+# CONFIG_SND_AU8810 is not set
+# CONFIG_SND_AU8820 is not set
+# CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_BT87X is not set
+# CONFIG_SND_CA0106 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS5530 is not set
+# CONFIG_SND_CS5535AUDIO is not set
+# CONFIG_SND_DARLA20 is not set
+# CONFIG_SND_GINA20 is not set
+# CONFIG_SND_LAYLA20 is not set
+# CONFIG_SND_DARLA24 is not set
+# CONFIG_SND_GINA24 is not set
+# CONFIG_SND_LAYLA24 is not set
+# CONFIG_SND_MONA is not set
+# CONFIG_SND_MIA is not set
+# CONFIG_SND_ECHO3G is not set
+# CONFIG_SND_INDIGO is not set
+# CONFIG_SND_INDIGOIO is not set
+# CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_EMU10K1X is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_HDA_INTEL is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_HDSPM is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+CONFIG_SND_INTEL8X0=y
+# CONFIG_SND_INTEL8X0M is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_MIXART is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_PCXHR is not set
+# CONFIG_SND_RIPTIDE is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VX222 is not set
+# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_AC97_POWER_SAVE is not set
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
+# CONFIG_LGUEST is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+# CONFIG_DELL_RBU is not set
+# CONFIG_DCDBAS is not set
+CONFIG_DMIID=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=y
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_KPROBES is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+# CONFIG_CRYPTO_TWOFISH_586 is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_AES_586 is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_AUDIT_GENERIC=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/c7x0/defconfig b/recipes/linux/linux-kexecboot-2.6.26/c7x0/defconfig
new file mode 100644
index 0000000000..7c48947854
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/c7x0/defconfig
@@ -0,0 +1,1010 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26
+# Mon Feb 2 00:55:07 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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# 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="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+# CONFIG_OPROFILE is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES 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=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_POODLE is not set
+CONFIG_MACH_CORGI=y
+CONFIG_MACH_SHEPHERD=y
+CONFIG_MACH_HUSKY=y
+# CONFIG_MACH_TOSA is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SHARP_C7xx=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_BLK_DEV_HD 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=y
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_BLK_DEV_DM 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=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_CORGI=y
+# CONFIG_KEYBOARD_SPITZ is not set
+CONFIG_SHARPSL_RC=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_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=y
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP 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_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_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_CORGI=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# 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 is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+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-kexecboot-2.6.26/collie.patch b/recipes/linux/linux-kexecboot-2.6.26/collie.patch
new file mode 100644
index 0000000000..750be8ecf3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/collie.patch
@@ -0,0 +1,2601 @@
+Index: linux-2.6.26/arch/arm/Kconfig
+===================================================================
+--- linux-2.6.26.orig/arch/arm/Kconfig 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/arch/arm/Kconfig 2008-10-17 18:15:31.391792839 +0200
+@@ -967,7 +967,7 @@
+
+ config CPU_FREQ_SA1110
+ bool
+- depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3)
++ depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3 || SA1100_COLLIE)
+ default y
+
+ config CPU_FREQ_INTEGRATOR
+Index: linux-2.6.26/arch/arm/mach-sa1100/collie.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-sa1100/collie.c 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/arch/arm/mach-sa1100/collie.c 2008-10-17 18:15:31.391792839 +0200
+@@ -206,7 +206,7 @@
+ }
+
+ static struct flash_platform_data collie_flash_data = {
+- .map_name = "cfi_probe",
++ .map_name = "sharp",
+ .set_vpp = collie_set_vpp,
+ .parts = collie_partitions,
+ .nr_parts = ARRAY_SIZE(collie_partitions),
+Index: linux-2.6.26/arch/arm/mach-sa1100/dma.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-sa1100/dma.c 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/arch/arm/mach-sa1100/dma.c 2008-10-17 18:15:31.399789199 +0200
+@@ -39,7 +39,7 @@
+
+ static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS];
+
+-static spinlock_t dma_list_lock;
++static DEFINE_SPINLOCK(dma_list_lock);
+
+
+ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
+Index: linux-2.6.26/drivers/input/keyboard/locomokbd.c
+===================================================================
+--- linux-2.6.26.orig/drivers/input/keyboard/locomokbd.c 2008-10-17 18:13:16.000000000 +0200
++++ linux-2.6.26/drivers/input/keyboard/locomokbd.c 2008-10-17 18:15:31.403791239 +0200
+@@ -272,6 +272,7 @@
+ for (i = 0; i < LOCOMOKBD_NUMKEYS; i++)
+ set_bit(locomokbd->keycode[i], input_dev->keybit);
+ clear_bit(0, input_dev->keybit);
++ locomo_writel(0, locomokbd->base + LOCOMO_KSC);
+
+ /* attempt to get the interrupt */
+ err = request_irq(dev->irq[0], locomokbd_interrupt, 0, "locomokbd", locomokbd);
+Index: linux-2.6.26/drivers/mfd/Kconfig
+===================================================================
+--- linux-2.6.26.orig/drivers/mfd/Kconfig 2008-10-17 18:13:21.000000000 +0200
++++ linux-2.6.26/drivers/mfd/Kconfig 2008-10-17 18:15:31.403791239 +0200
+@@ -77,4 +77,10 @@
+ tristate "Touchscreen interface support"
+ depends on MCP_UCB1200 && INPUT
+
++config MCP_COLLIE_TS
++ tristate "Touchscreen collie support"
++ depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS
++ ---help---
++ Driver for touchscreen on collie - sharp sl-5500.
++
+ endmenu
+Index: linux-2.6.26/drivers/mfd/Makefile
+===================================================================
+--- linux-2.6.26.orig/drivers/mfd/Makefile 2008-10-17 18:13:21.000000000 +0200
++++ linux-2.6.26/drivers/mfd/Makefile 2008-10-17 18:15:31.407791679 +0200
+@@ -14,7 +14,7 @@
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
+ obj-$(CONFIG_MCP_UCB1200_TS) += ucb1x00-ts.o
+-
++obj-$(CONFIG_MCP_COLLIE_TS) += collie-ts.o
+ ifeq ($(CONFIG_SA1100_ASSABET),y)
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o
+ endif
+Index: linux-2.6.26/drivers/mfd/collie-ts.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26/drivers/mfd/collie-ts.c 2008-10-17 18:15:31.415790559 +0200
+@@ -0,0 +1,449 @@
++/*
++ * Touchscreen driver for UCB1x00-based touchscreens
++ *
++ * Copyright (C) 2001 Russell King, All Rights Reserved.
++ * Copyright (C) 2005 Pavel Machek
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * 21-Jan-2002 <jco@ict.es> :
++ *
++ * Added support for synchronous A/D mode. This mode is useful to
++ * avoid noise induced in the touchpanel by the LCD, provided that
++ * the UCB1x00 has a valid LCD sync signal routed to its ADCSYNC pin.
++ * It is important to note that the signal connected to the ADCSYNC
++ * pin should provide pulses even when the LCD is blanked, otherwise
++ * a pen touch needed to unblank the LCD will never be read.
++ */
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/smp.h>
++#include <linux/smp_lock.h>
++#include <linux/sched.h>
++#include <linux/completion.h>
++#include <linux/delay.h>
++#include <linux/string.h>
++#include <linux/input.h>
++#include <linux/device.h>
++#include <linux/freezer.h>
++#include <linux/slab.h>
++#include <linux/kthread.h>
++#include <linux/semaphore.h>
++
++#include <asm/dma.h>
++#include <asm/arch/collie.h>
++#include <asm/mach-types.h>
++
++#include "ucb1x00.h"
++
++struct ucb1x00_ts {
++ struct input_dev *idev;
++ struct ucb1x00 *ucb;
++
++ wait_queue_head_t irq_wait;
++ struct task_struct *rtask;
++ u16 x_res;
++ u16 y_res;
++
++ unsigned int adcsync:1;
++};
++
++static int adcsync;
++
++/**********************************
++
++ ................
++ . . = 340
++ . .
++ . ^.
++ . ^.
++ . ^.
++ . ^.
++ . .
++ . X. = 10
++ . <<<<<<<< Y .
++ ................
++ . Sharp =200
++ . .
++ . - O - .
++ . .
++ ................
++
++**********************************/
++
++
++static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y)
++{
++ struct input_dev *idev = ts->idev;
++
++ input_report_abs(idev, ABS_X, x);
++ input_report_abs(idev, ABS_Y, y);
++ input_report_abs(idev, ABS_PRESSURE, pressure);
++ input_report_key(idev, BTN_TOUCH, 1);
++ input_sync(idev);
++}
++
++static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
++{
++ struct input_dev *idev = ts->idev;
++
++ input_report_abs(idev, ABS_PRESSURE, 0);
++ input_report_key(idev, BTN_TOUCH, 0);
++ input_sync(idev);
++}
++
++/*
++ * Switch to interrupt mode. This set touchscreen to interrupt
++ * mode, so that chip is able to send interrupt.
++ */
++static inline void ucb1x00_ts_mode_int(struct ucb1x00_ts *ts)
++{
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW |
++ UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND |
++ UCB_TS_CR_MODE_INT);
++}
++
++/*
++ * Switch to pressure mode, and read pressure. We don't need to wait
++ * here, since both plates are being driven.
++ *
++ * set_read_pressure() in sharp code
++ */
++static inline void ucb1x00_ts_read_pressure(struct ucb1x00_ts *ts)
++{
++ ucb1x00_io_write(ts->ucb, COLLIE_TC35143_GPIO_TBL_CHK, 0);
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSPX_POW | UCB_TS_CR_TSMX_POW |
++ UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
++
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_AD2 |
++ UCB_ADC_SYNC_ENA);
++ udelay(100);
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_AD2 |
++ UCB_ADC_SYNC_ENA | UCB_ADC_START);
++}
++
++/*
++ * Switch to X position mode and measure Y plate. We switch the plate
++ * configuration in pressure mode, then switch to position mode. This
++ * gives a faster response time. Even so, we need to wait about 55us
++ * for things to stabilise.
++ */
++static inline void ucb1x00_ts_read_xpos(struct ucb1x00_ts *ts)
++{
++ ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
++ UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
++
++
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPY | UCB_ADC_SYNC_ENA);
++ udelay(100);
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPY | UCB_ADC_SYNC_ENA |
++ UCB_ADC_START);
++}
++
++/*
++ * Switch to Y position mode and measure X plate. We switch the plate
++ * configuration in pressure mode, then switch to position mode. This
++ * gives a faster response time. Even so, we need to wait about 55us
++ * for things to stabilise.
++ */
++static inline void ucb1x00_ts_read_ypos(struct ucb1x00_ts *ts)
++{
++ ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
++
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
++ UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
++
++
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPX | UCB_ADC_SYNC_ENA);
++ udelay(100);
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPX | UCB_ADC_SYNC_ENA |
++ UCB_ADC_START);
++}
++
++/*
++ * Switch to X plate resistance mode. Set MX to ground, PX to
++ * supply. Measure current.
++ */
++static inline unsigned int ucb1x00_ts_read_xres(struct ucb1x00_ts *ts)
++{
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
++ UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
++ return ucb1x00_adc_read(ts->ucb, 0, ts->adcsync);
++}
++
++/*
++ * Switch to Y plate resistance mode. Set MY to ground, PY to
++ * supply. Measure current.
++ */
++static inline unsigned int ucb1x00_ts_read_yres(struct ucb1x00_ts *ts)
++{
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
++ UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
++ return ucb1x00_adc_read(ts->ucb, 0, ts->adcsync);
++}
++
++/*
++ * This is a RT kernel thread that handles the ADC accesses
++ * (mainly so we can use semaphores in the UCB1200 core code
++ * to serialise accesses to the ADC).
++ */
++static int ucb1x00_thread(void *_ts)
++{
++ struct ucb1x00_ts *ts = _ts;
++ struct task_struct *tsk = current;
++ DECLARE_WAITQUEUE(wait, tsk);
++ int state;
++
++ /*
++ * We could run as a real-time thread. However, thus far
++ * this doesn't seem to be necessary.
++ */
++
++ add_wait_queue(&ts->irq_wait, &wait);
++
++ while (!kthread_should_stop()) {
++ unsigned int data[3];
++
++ for (state=0; state<3; state++) {
++
++ ucb1x00_adc_enable(ts->ucb);
++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_ADC, UCB_FALLING);
++ switch (state) {
++ /* Order matters here; last measurement seems to be more noisy then the
++ rest, and we care about pressure least */
++ case 2: ucb1x00_ts_read_pressure(ts);
++ break;
++ case 0: ucb1x00_ts_read_ypos(ts);
++ break;
++ case 1: ucb1x00_ts_read_xpos(ts);
++ break;
++ }
++ /* wait for adc */
++ try_to_freeze();
++ schedule_timeout(1000 * HZ);
++ ucb1x00_disable_irq(ts->ucb, UCB_IRQ_ADC, UCB_FALLING);
++ data[state] = UCB_ADC_DAT(ucb1x00_reg_read(ts->ucb, UCB_ADC_DATA));
++ ucb1x00_adc_disable(ts->ucb);
++ }
++
++ /* If not pressed any more, try to sleep! */
++ if (data[2] < 300) {
++ set_task_state(tsk, TASK_INTERRUPTIBLE);
++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_RISING);
++ ucb1x00_ts_mode_int(ts);
++ ucb1x00_disable(ts->ucb);
++ ucb1x00_ts_event_release(ts);
++ try_to_freeze();
++ schedule_timeout(1000 * HZ);
++ ucb1x00_disable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_RISING);
++ ucb1x00_enable(ts->ucb);
++ } else {
++ ucb1x00_ts_evt_add(ts, data[2], data[1], data[0]);
++ }
++ ucb1x00_disable(ts->ucb);
++ msleep(20);
++ ucb1x00_enable(ts->ucb);
++ }
++
++ remove_wait_queue(&ts->irq_wait, &wait);
++
++ ts->rtask = NULL;
++ return 0;
++}
++
++/*
++ * We only detect touch screen _touches_ with this interrupt
++ * handler, and even then we just schedule our task.
++ */
++static void ucb1x00_ts_irq(int idx, void *id)
++{
++ struct ucb1x00_ts *ts = id;
++ wake_up(&ts->irq_wait);
++}
++
++static void ucb1x00_adc_irq(int idx, void *id)
++{
++ struct ucb1x00_ts *ts = id;
++ wake_up(&ts->irq_wait);
++}
++
++static int ucb1x00_ts_open(struct input_dev *idev)
++{
++ struct ucb1x00_ts *ts = input_get_drvdata(idev);
++ int ret = 0;
++
++ BUG_ON(ts->rtask);
++
++ init_waitqueue_head(&ts->irq_wait);
++
++ ret = ucb1x00_hook_irq(ts->ucb, UCB_IRQ_TSPX, ucb1x00_ts_irq, ts);
++ if (ret < 0)
++ return ret;
++
++ ret = ucb1x00_hook_irq(ts->ucb, UCB_IRQ_ADC, ucb1x00_adc_irq, ts);
++ if (ret < 0) {
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
++ return ret;
++ }
++
++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_RISING);
++
++ /*
++ * If we do this at all, we should allow the user to
++ * measure and read the X and Y resistance at any time.
++ */
++ ucb1x00_adc_enable(ts->ucb);
++ ts->x_res = ucb1x00_ts_read_xres(ts);
++ ts->y_res = ucb1x00_ts_read_yres(ts);
++ ucb1x00_adc_disable(ts->ucb);
++
++ if (machine_is_collie()) {
++ ucb1x00_io_set_dir(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
++ }
++
++ ts->rtask = kthread_run(ucb1x00_thread, ts, "ktsd");
++ if (!IS_ERR(ts->rtask)) {
++ ret = 0;
++ } else {
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
++ ts->rtask = NULL;
++ ret = -EFAULT;
++ }
++
++ return ret;
++}
++
++/*
++ * Release touchscreen resources. Disable IRQs.
++ */
++static void ucb1x00_ts_close(struct input_dev *idev)
++{
++ struct ucb1x00_ts *ts = input_get_drvdata(idev);
++
++ if (ts->rtask)
++ kthread_stop(ts->rtask);
++
++ ucb1x00_enable(ts->ucb);
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_ADC, ts);
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR, 0);
++ ucb1x00_disable(ts->ucb);
++}
++
++#ifdef CONFIG_PM
++static int ucb1x00_ts_resume(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_ts *ts = dev->priv;
++
++ if (ts->rtask != NULL) {
++ /*
++ * Restart the TS thread to ensure the
++ * TS interrupt mode is set up again
++ * after sleep.
++ */
++ wake_up(&ts->irq_wait);
++ }
++ return 0;
++}
++#else
++#define ucb1x00_ts_resume NULL
++#endif
++
++
++/*
++ * Initialisation.
++ */
++static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_ts *ts;
++ struct input_dev *idev;
++ int err;
++
++ ts = kzalloc(sizeof(struct ucb1x00_ts), GFP_KERNEL);
++ idev = input_allocate_device();
++ if (!ts || !idev) {
++ err = -ENOMEM;
++ goto fail;
++ }
++
++ ts->ucb = dev->ucb;
++ ts->idev = idev;
++ ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
++
++ input_set_drvdata(idev, ts);
++ idev->name = "Touchscreen panel";
++ idev->id.product = ts->ucb->id;
++ idev->open = ucb1x00_ts_open;
++ idev->close = ucb1x00_ts_close;
++
++ __set_bit(EV_ABS, idev->evbit);
++ __set_bit(ABS_X, idev->absbit);
++ __set_bit(ABS_Y, idev->absbit);
++ __set_bit(ABS_PRESSURE, idev->absbit);
++
++ input_set_abs_params(ts->idev, ABS_X, 0, 450, 0, 0);
++ input_set_abs_params(ts->idev, ABS_Y, 200, 800, 0, 0);
++ input_set_abs_params(ts->idev, ABS_PRESSURE, 400, 800, 0, 0);
++
++
++ err = input_register_device(idev);
++ if (err)
++ goto fail;
++
++ dev->priv = ts;
++
++ return 0;
++
++ fail:
++ input_free_device(idev);
++ kfree(ts);
++ return err;
++}
++
++static void ucb1x00_ts_remove(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_ts *ts = dev->priv;
++
++ input_unregister_device(ts->idev);
++ kfree(ts);
++}
++
++static struct ucb1x00_driver ucb1x00_ts_driver = {
++ .add = ucb1x00_ts_add,
++ .remove = ucb1x00_ts_remove,
++ .resume = ucb1x00_ts_resume,
++};
++
++static int __init ucb1x00_ts_init(void)
++{
++ return ucb1x00_register_driver(&ucb1x00_ts_driver);
++}
++
++static void __exit ucb1x00_ts_exit(void)
++{
++ ucb1x00_unregister_driver(&ucb1x00_ts_driver);
++}
++
++module_param(adcsync, int, 0444);
++module_init(ucb1x00_ts_init);
++module_exit(ucb1x00_ts_exit);
++
++MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
++MODULE_DESCRIPTION("UCB1x00 touchscreen driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26/drivers/mfd/ucb1x00.h
+===================================================================
+--- linux-2.6.26.orig/drivers/mfd/ucb1x00.h 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/mfd/ucb1x00.h 2008-10-17 18:15:31.415790559 +0200
+@@ -34,7 +34,10 @@
+ #define UCB_IE_TCLIP (1 << 14)
+ #define UCB_IE_ACLIP (1 << 15)
+
++/* UCB1200 irqs */
++#define UCB_IRQ_ADC 11
+ #define UCB_IRQ_TSPX 12
++#define UCB_IRQ_TSMX 13
+
+ #define UCB_TC_A 0x05
+ #define UCB_TC_A_LOOP (1 << 7) /* UCB1200 */
+Index: linux-2.6.26/drivers/mtd/chips/Kconfig
+===================================================================
+--- linux-2.6.26.orig/drivers/mtd/chips/Kconfig 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/mtd/chips/Kconfig 2008-10-17 18:15:31.419791479 +0200
+@@ -239,5 +239,13 @@
+ used for XIP purposes. If you're not sure what this is all about
+ then say N.
+
++config MTD_SHARP
++ tristate "pre-CFI Sharp chip support"
++ depends on MTD
++ help
++ This option enables support for flash chips using Sharp-compatible
++ commands, including some which are not CFI-compatible and hence
++ cannot be used with the CONFIG_MTD_CFI_INTELxxx options.
++
+ endmenu
+
+Index: linux-2.6.26/drivers/mtd/chips/Makefile
+===================================================================
+--- linux-2.6.26.orig/drivers/mtd/chips/Makefile 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/mtd/chips/Makefile 2008-10-17 18:15:31.419791479 +0200
+@@ -12,4 +12,5 @@
+ obj-$(CONFIG_MTD_JEDECPROBE) += jedec_probe.o
+ obj-$(CONFIG_MTD_RAM) += map_ram.o
+ obj-$(CONFIG_MTD_ROM) += map_rom.o
++obj-$(CONFIG_MTD_SHARP) += sharp.o
+ obj-$(CONFIG_MTD_ABSENT) += map_absent.o
+Index: linux-2.6.26/drivers/mtd/chips/sharp.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26/drivers/mtd/chips/sharp.c 2008-10-17 18:15:31.423790399 +0200
+@@ -0,0 +1,645 @@
++/*
++ * MTD chip driver for pre-CFI Sharp flash chips
++ *
++ * Copyright 2000,2001 David A. Schleef <ds@schleef.org>
++ * 2000,2001 Lineo, Inc.
++ *
++ * $Id: sharp.c,v 1.17 2005/11/29 14:28:28 gleixner Exp $
++ *
++ * Devices supported:
++ * LH28F016SCT Symmetrical block flash memory, 2Mx8
++ * LH28F008SCT Symmetrical block flash memory, 1Mx8
++ *
++ * Documentation:
++ * http://www.sharpmeg.com/datasheets/memic/flashcmp/
++ * http://www.sharpmeg.com/datasheets/memic/flashcmp/01symf/16m/016sctl9.pdf
++ * 016sctl9.pdf
++ *
++ * Limitations:
++ * This driver only supports 4x1 arrangement of chips.
++ * Not tested on anything but PowerPC.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/mtd/map.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/cfi.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++
++#define CMD_RESET 0xffffffff
++#define CMD_READ_ID 0x90909090
++#define CMD_READ_STATUS 0x70707070
++#define CMD_CLEAR_STATUS 0x50505050
++#define CMD_BLOCK_ERASE_1 0x20202020
++#define CMD_BLOCK_ERASE_2 0xd0d0d0d0
++#define CMD_BYTE_WRITE 0x40404040
++#define CMD_SUSPEND 0xb0b0b0b0
++#define CMD_RESUME 0xd0d0d0d0
++#define CMD_SET_BLOCK_LOCK_1 0x60606060
++#define CMD_SET_BLOCK_LOCK_2 0x01010101
++#define CMD_SET_MASTER_LOCK_1 0x60606060
++#define CMD_SET_MASTER_LOCK_2 0xf1f1f1f1
++#define CMD_CLEAR_BLOCK_LOCKS_1 0x60606060
++#define CMD_CLEAR_BLOCK_LOCKS_2 0xd0d0d0d0
++
++#define SR_READY 0x80808080 // 1 = ready
++#define SR_ERASE_SUSPEND 0x40404040 // 1 = block erase suspended
++#define SR_ERROR_ERASE 0x20202020 // 1 = error in block erase or clear lock bits
++#define SR_ERROR_WRITE 0x10101010 // 1 = error in byte write or set lock bit
++#define SR_VPP 0x08080808 // 1 = Vpp is low
++#define SR_WRITE_SUSPEND 0x04040404 // 1 = byte write suspended
++#define SR_PROTECT 0x02020202 // 1 = lock bit set
++#define SR_RESERVED 0x01010101
++
++#define SR_ERRORS (SR_ERROR_ERASE|SR_ERROR_WRITE|SR_VPP|SR_PROTECT)
++
++#define BLOCK_MASK 0xfffe0000
++
++/* Configuration options */
++
++#define AUTOUNLOCK /* automatically unlocks blocks before erasing */
++
++static struct mtd_info *sharp_probe(struct map_info *);
++
++static int sharp_probe_map(struct map_info *map, struct mtd_info *mtd);
++
++static int sharp_read(struct mtd_info *mtd, loff_t from, size_t len,
++ size_t *retlen, u_char *buf);
++static int sharp_write(struct mtd_info *mtd, loff_t from, size_t len,
++ size_t *retlen, const u_char *buf);
++static int sharp_erase(struct mtd_info *mtd, struct erase_info *instr);
++static void sharp_sync(struct mtd_info *mtd);
++static int sharp_suspend(struct mtd_info *mtd);
++static void sharp_resume(struct mtd_info *mtd);
++static void sharp_destroy(struct mtd_info *mtd);
++
++static int sharp_write_oneword(struct map_info *map, struct flchip *chip,
++ unsigned long adr, __u32 datum);
++static int sharp_erase_oneblock(struct map_info *map, struct flchip *chip,
++ unsigned long adr);
++#ifdef AUTOUNLOCK
++static inline void sharp_unlock_oneblock(struct map_info *map, struct flchip *chip,
++ unsigned long adr);
++#endif
++
++
++struct sharp_info{
++ struct flchip *chip;
++ int bogus;
++ int chipshift;
++ int numchips;
++ struct flchip chips[1];
++};
++
++static void sharp_destroy(struct mtd_info *mtd);
++
++static struct mtd_chip_driver sharp_chipdrv = {
++ .probe = sharp_probe,
++ .destroy = sharp_destroy,
++ .name = "sharp",
++ .module = THIS_MODULE
++};
++
++static void sharp_udelay(unsigned long i) {
++ if (in_interrupt()) {
++ udelay(i);
++ } else {
++ schedule();
++ }
++}
++
++static struct mtd_info *sharp_probe(struct map_info *map)
++{
++ struct mtd_info *mtd = NULL;
++ struct sharp_info *sharp = NULL;
++ int width;
++
++ mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
++ if(!mtd)
++ return NULL;
++
++ sharp = kzalloc(sizeof(*sharp), GFP_KERNEL);
++ if(!sharp) {
++ kfree(mtd);
++ return NULL;
++ }
++
++ width = sharp_probe_map(map,mtd);
++ if(!width){
++ kfree(mtd);
++ kfree(sharp);
++ return NULL;
++ }
++
++ mtd->priv = map;
++ mtd->type = MTD_NORFLASH;
++ mtd->erase = sharp_erase;
++ mtd->read = sharp_read;
++ mtd->write = sharp_write;
++ mtd->sync = sharp_sync;
++ mtd->suspend = sharp_suspend;
++ mtd->resume = sharp_resume;
++ mtd->flags = MTD_CAP_NORFLASH;
++ mtd->writesize = 1;
++ mtd->name = map->name;
++
++ sharp->chipshift = 24;
++ sharp->numchips = 1;
++ sharp->chips[0].start = 0;
++ sharp->chips[0].state = FL_READY;
++ sharp->chips[0].mutex = &sharp->chips[0]._spinlock;
++ sharp->chips[0].word_write_time = 0;
++ init_waitqueue_head(&sharp->chips[0].wq);
++ spin_lock_init(&sharp->chips[0]._spinlock);
++
++ map->fldrv = &sharp_chipdrv;
++ map->fldrv_priv = sharp;
++
++ __module_get(THIS_MODULE);
++ return mtd;
++}
++
++static inline void sharp_send_cmd(struct map_info *map, unsigned long cmd, unsigned long adr)
++{
++ map_word map_cmd;
++ map_cmd.x[0] = cmd;
++ map_write(map, map_cmd, adr);
++}
++
++static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd)
++{
++ map_word tmp, read0, read4;
++ unsigned long base = 0;
++ int width = 4;
++
++ tmp = map_read(map, base+0);
++
++ sharp_send_cmd(map, CMD_READ_ID, base+0);
++
++ read0 = map_read(map, base+0);
++ read4 = map_read(map, base+4);
++ if (read0.x[0] == 0x00b000b0) {
++ printk("Sharp chip, %lx, %lx, width = %d\n", read0.x[0], read4.x[0], width);
++ /* Prints b000b0, b000b0, width = 4 on collie */
++ switch(read4.x[0]){
++ case 0xaaaaaaaa:
++ case 0xa0a0a0a0:
++ /* aa - LH28F016SCT-L95 2Mx8, 32 64k blocks*/
++ /* a0 - LH28F016SCT-Z4 2Mx8, 32 64k blocks*/
++ mtd->erasesize = 0x10000 * width;
++ mtd->size = 0x200000 * width;
++ return width;
++ case 0xa6a6a6a6:
++ /* a6 - LH28F008SCT-L12 1Mx8, 16 64k blocks*/
++ /* a6 - LH28F008SCR-L85 1Mx8, 16 64k blocks*/
++ mtd->erasesize = 0x10000 * width;
++ mtd->size = 0x100000 * width;
++ return width;
++ case 0x00b000b0:
++ /* a6 - LH28F640BFHE 8 64k * 2 chip blocks*/
++ mtd->erasesize = 0x10000 * width / 2;
++ mtd->size = 0x800000 * width / 2;
++ return width;
++ default:
++ printk("Sort-of looks like sharp flash, 0x%08lx 0x%08lx\n",
++ read0.x[0], read4.x[0]);
++ }
++ } else if ((map_read(map, base+0).x[0] == CMD_READ_ID)){
++ /* RAM, probably */
++ printk("Looks like RAM\n");
++ map_write(map, tmp, base+0);
++ }else{
++ printk("Doesn't look like sharp flash, 0x%08lx 0x%08lx\n",
++ read0.x[0], read4.x[0]);
++ }
++
++ return 0;
++}
++
++/* This function returns with the chip->mutex lock held. */
++static int sharp_wait(struct map_info *map, struct flchip *chip)
++{
++ map_word status;
++ unsigned long timeo = jiffies + HZ;
++ DECLARE_WAITQUEUE(wait, current);
++ int adr = 0;
++
++retry:
++ spin_lock_bh(chip->mutex);
++
++ switch (chip->state) {
++ case FL_READY:
++ sharp_send_cmd(map, CMD_READ_STATUS, adr);
++ chip->state = FL_STATUS;
++ case FL_STATUS:
++ status = map_read(map, adr);
++ if ((status.x[0] & SR_READY) == SR_READY)
++ break;
++ spin_unlock_bh(chip->mutex);
++ if (time_after(jiffies, timeo)) {
++ printk("Waiting for chip to be ready timed out in erase\n");
++ return -EIO;
++ }
++ sharp_udelay(1);
++ goto retry;
++ default:
++ set_current_state(TASK_INTERRUPTIBLE);
++ add_wait_queue(&chip->wq, &wait);
++
++ spin_unlock_bh(chip->mutex);
++
++ sharp_udelay(1);
++
++ set_current_state(TASK_RUNNING);
++ remove_wait_queue(&chip->wq, &wait);
++
++ if(signal_pending(current))
++ return -EINTR;
++
++ timeo = jiffies + HZ;
++
++ goto retry;
++ }
++
++ sharp_send_cmd(map, CMD_RESET, adr);
++
++ chip->state = FL_READY;
++
++ return 0;
++}
++
++static void sharp_release(struct flchip *chip)
++{
++ wake_up(&chip->wq);
++ spin_unlock_bh(chip->mutex);
++}
++
++static int sharp_read(struct mtd_info *mtd, loff_t from, size_t len,
++ size_t *retlen, u_char *buf)
++{
++ struct map_info *map = mtd->priv;
++ struct sharp_info *sharp = map->fldrv_priv;
++ int chipnum;
++ int ret = 0;
++ int ofs = 0;
++
++ chipnum = (from >> sharp->chipshift);
++ ofs = from & ((1 << sharp->chipshift)-1);
++
++ *retlen = 0;
++
++ while(len){
++ unsigned long thislen;
++
++ if(chipnum>=sharp->numchips)
++ break;
++
++ thislen = len;
++ if(ofs+thislen >= (1<<sharp->chipshift))
++ thislen = (1<<sharp->chipshift) - ofs;
++
++ ret = sharp_wait(map,&sharp->chips[chipnum]);
++ if(ret<0)
++ break;
++
++ map_copy_from(map,buf,ofs,thislen);
++
++ sharp_release(&sharp->chips[chipnum]);
++
++ *retlen += thislen;
++ len -= thislen;
++ buf += thislen;
++
++ ofs = 0;
++ chipnum++;
++ }
++ return ret;
++}
++
++static int sharp_write(struct mtd_info *mtd, loff_t to, size_t len,
++ size_t *retlen, const u_char *buf)
++{
++ struct map_info *map = mtd->priv;
++ struct sharp_info *sharp = map->fldrv_priv;
++ int ret = 0;
++ int i,j;
++ int chipnum;
++ unsigned long ofs;
++ union { u32 l; unsigned char uc[4]; } tbuf;
++
++ *retlen = 0;
++
++ while(len){
++ tbuf.l = 0xffffffff;
++ chipnum = to >> sharp->chipshift;
++ ofs = to & ((1<<sharp->chipshift)-1);
++
++ j=0;
++ for(i=ofs&3;i<4 && len;i++){
++ tbuf.uc[i] = *buf;
++ buf++;
++ to++;
++ len--;
++ j++;
++ }
++ sharp_write_oneword(map, &sharp->chips[chipnum], ofs&~3, tbuf.l);
++ if(ret<0)
++ return ret;
++ (*retlen)+=j;
++ }
++
++ return 0;
++}
++
++static int sharp_write_oneword(struct map_info *map, struct flchip *chip,
++ unsigned long adr, __u32 datum)
++{
++ int ret;
++ int try;
++ int i;
++ map_word data, status;
++
++ status.x[0] = 0;
++ ret = sharp_wait(map,chip);
++ if (ret < 0)
++ return ret;
++
++ for (try=0; try<10; try++) {
++ long timeo;
++
++ sharp_send_cmd(map, CMD_BYTE_WRITE, adr);
++ /* cpu_to_le32 -> hack to fix the writel be->le conversion */
++ data.x[0] = cpu_to_le32(datum);
++ map_write(map, data, adr);
++
++ chip->state = FL_WRITING;
++ timeo = jiffies + (HZ/2);
++
++ sharp_send_cmd(map, CMD_READ_STATUS, adr);
++ for(i=0;i<100;i++){
++ status = map_read(map, adr);
++ if((status.x[0] & SR_READY) == SR_READY)
++ break;
++ }
++#ifdef AUTOUNLOCK
++ if (status.x[0] & SR_PROTECT) { /* lock block */
++ sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
++ sharp_unlock_oneblock(map,chip,adr);
++ sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
++ sharp_send_cmd(map, CMD_RESET, adr);
++ continue;
++ }
++#endif
++ if(i==100){
++ printk("sharp: timed out writing\n");
++ }
++
++ if (!(status.x[0] & SR_ERRORS))
++ break;
++
++ printk("sharp: error writing byte at addr=%08lx status=%08lx\n", adr, status.x[0]);
++
++ sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
++ }
++ sharp_send_cmd(map, CMD_RESET, adr);
++ chip->state = FL_READY;
++
++ sharp_release(chip);
++
++ return 0;
++}
++
++static int sharp_erase(struct mtd_info *mtd, struct erase_info *instr)
++{
++ struct map_info *map = mtd->priv;
++ struct sharp_info *sharp = map->fldrv_priv;
++ unsigned long adr,len;
++ int chipnum, ret=0;
++
++ if(instr->addr & (mtd->erasesize - 1))
++ return -EINVAL;
++ if(instr->len & (mtd->erasesize - 1))
++ return -EINVAL;
++ if(instr->len + instr->addr > mtd->size)
++ return -EINVAL;
++
++ chipnum = instr->addr >> sharp->chipshift;
++ adr = instr->addr & ((1<<sharp->chipshift)-1);
++ len = instr->len;
++
++ while(len){
++ ret = sharp_erase_oneblock(map, &sharp->chips[chipnum], adr);
++ if(ret)return ret;
++
++ if (adr >= 0xfe0000) {
++ adr += mtd->erasesize / 8;
++ len -= mtd->erasesize / 8;
++ } else {
++ adr += mtd->erasesize;
++ len -= mtd->erasesize;
++ }
++ if(adr >> sharp->chipshift){
++ adr = 0;
++ chipnum++;
++ if(chipnum>=sharp->numchips)
++ break;
++ }
++ }
++
++ instr->state = MTD_ERASE_DONE;
++ mtd_erase_callback(instr);
++
++ return 0;
++}
++
++static inline int sharp_do_wait_for_ready(struct map_info *map, struct flchip *chip,
++ unsigned long adr)
++{
++ int ret;
++ unsigned long timeo;
++ map_word status;
++ DECLARE_WAITQUEUE(wait, current);
++
++ sharp_send_cmd(map, CMD_READ_STATUS, adr);
++ status = map_read(map, adr);
++
++ timeo = jiffies + HZ * 10;
++
++ while (time_before(jiffies, timeo)) {
++ sharp_send_cmd(map, CMD_READ_STATUS, adr);
++ status = map_read(map, adr);
++ if ((status.x[0] & SR_READY) == SR_READY) {
++ ret = 0;
++ goto out;
++ }
++ set_current_state(TASK_INTERRUPTIBLE);
++ add_wait_queue(&chip->wq, &wait);
++
++ spin_unlock_bh(chip->mutex);
++
++ schedule_timeout(1);
++ schedule();
++
++ spin_lock_bh(chip->mutex);
++
++ remove_wait_queue(&chip->wq, &wait);
++ set_current_state(TASK_RUNNING);
++ }
++ ret = -ETIME;
++out:
++ return ret;
++}
++
++static int sharp_erase_oneblock(struct map_info *map, struct flchip *chip,
++ unsigned long adr)
++{
++ int ret;
++ map_word status;
++
++ ret = sharp_wait(map,chip);
++ if (ret < 0)
++ return ret;
++
++#ifdef AUTOUNLOCK
++ /* This seems like a good place to do an unlock */
++ sharp_unlock_oneblock(map,chip,adr);
++#endif
++
++ sharp_send_cmd(map, CMD_BLOCK_ERASE_1, adr);
++ sharp_send_cmd(map, CMD_BLOCK_ERASE_2, adr);
++
++ chip->state = FL_ERASING;
++
++ ret = sharp_do_wait_for_ready(map,chip,adr);
++ if(ret<0) {
++ spin_unlock_bh(chip->mutex);
++ return ret;
++ }
++
++ sharp_send_cmd(map, CMD_READ_STATUS, adr);
++ status = map_read(map, adr);
++
++ if (!(status.x[0] & SR_ERRORS)) {
++ sharp_send_cmd(map, CMD_RESET, adr);
++ chip->state = FL_READY;
++ spin_unlock_bh(chip->mutex);
++ return 0;
++ }
++
++ printk("sharp: error erasing block at addr=%08lx status=%08lx\n", adr, status.x[0]);
++ sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
++
++ sharp_release(chip);
++
++ return -EIO;
++}
++
++#ifdef AUTOUNLOCK
++static inline void sharp_unlock_oneblock(struct map_info *map, struct flchip *chip,
++ unsigned long adr)
++{
++ map_word status;
++
++ sharp_send_cmd(map, CMD_CLEAR_BLOCK_LOCKS_1, adr & BLOCK_MASK);
++ sharp_send_cmd(map, CMD_CLEAR_BLOCK_LOCKS_2, adr & BLOCK_MASK);
++
++ sharp_do_wait_for_ready(map,chip,adr);
++
++ status = map_read(map, adr);
++
++ if (!(status.x[0] & SR_ERRORS)) {
++ sharp_send_cmd(map, CMD_RESET, adr);
++ chip->state = FL_READY;
++ return;
++ }
++
++ printk("sharp: error unlocking block at addr=%08lx status=%08lx\n", adr, status.x[0]);
++ sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
++}
++#endif
++
++static void sharp_sync(struct mtd_info *mtd)
++{
++}
++
++static int sharp_suspend(struct mtd_info *mtd)
++{
++ struct map_info *map = mtd->priv;
++ struct sharp_info *sharp = map->fldrv_priv;
++ int i;
++ struct flchip *chip;
++ int ret = 0;
++
++ for (i = 0; !ret && i < sharp->numchips; i++) {
++ chip = &sharp->chips[i];
++ ret = sharp_wait(map,chip);
++
++ if (ret) {
++ ret = -EAGAIN;
++ } else {
++ chip->state = FL_PM_SUSPENDED;
++ spin_unlock_bh(chip->mutex);
++ }
++ }
++ return ret;
++}
++
++static void sharp_resume(struct mtd_info *mtd)
++{
++ struct map_info *map = mtd->priv;
++ struct sharp_info *sharp = map->fldrv_priv;
++ int i;
++ struct flchip *chip;
++
++ for (i = 0; i < sharp->numchips; i++) {
++ chip = &sharp->chips[i];
++
++ spin_lock_bh(chip->mutex);
++
++ if (chip->state == FL_PM_SUSPENDED) {
++ /* We need to force it back to a known state */
++ sharp_send_cmd(map, CMD_RESET, chip->start);
++ chip->state = FL_READY;
++ wake_up(&chip->wq);
++ }
++
++ spin_unlock_bh(chip->mutex);
++ }
++}
++
++static void sharp_destroy(struct mtd_info *mtd)
++{
++ struct map_info *map = mtd->priv;
++ struct sharp_info *sharp = map->fldrv_priv;
++
++ kfree(sharp);
++}
++
++static int __init sharp_probe_init(void)
++{
++ printk("MTD Sharp chip driver <ds@lineo.com>\n");
++
++ register_mtd_chip_driver(&sharp_chipdrv);
++
++ return 0;
++}
++
++static void __exit sharp_probe_exit(void)
++{
++ unregister_mtd_chip_driver(&sharp_chipdrv);
++}
++
++module_init(sharp_probe_init);
++module_exit(sharp_probe_exit);
++
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("David Schleef <ds@schleef.org>");
++MODULE_DESCRIPTION("Old MTD chip driver for pre-CFI Sharp flash chips");
+Index: linux-2.6.26/drivers/mtd/maps/Kconfig
+===================================================================
+--- linux-2.6.26.orig/drivers/mtd/maps/Kconfig 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/mtd/maps/Kconfig 2008-10-17 18:15:31.431789839 +0200
+@@ -392,7 +392,7 @@
+
+ config MTD_SA1100
+ tristate "CFI Flash device mapped on StrongARM SA11x0"
+- depends on MTD_CFI && ARCH_SA1100 && MTD_PARTITIONS
++ depends on (MTD_CFI || MTD_SHARP) && ARCH_SA1100 && MTD_PARTITIONS
+ help
+ This enables access to the flash chips on most platforms based on
+ the SA1100 and SA1110, including the Assabet and the Compaq iPAQ.
+Index: linux-2.6.26/drivers/mtd/maps/sa1100-flash.c
+===================================================================
+--- linux-2.6.26.orig/drivers/mtd/maps/sa1100-flash.c 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/mtd/maps/sa1100-flash.c 2008-10-17 18:15:31.431789839 +0200
+@@ -210,6 +210,12 @@
+ goto err;
+ }
+ subdev->mtd->owner = THIS_MODULE;
++
++#ifdef CONFIG_SA1100_COLLIE
++ /* collie flash starts locked */
++// if (subdev->mtd->unlock)
++// subdev->mtd->unlock(subdev->mtd, 0xc0000, subdev->mtd->size - 0xc0000);
++#endif
+
+ printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %dMiB, "
+ "%d-bit\n", phys, subdev->mtd->size >> 20,
+Index: linux-2.6.26/drivers/net/wireless/hostap/hostap_cs.c
+===================================================================
+--- linux-2.6.26.orig/drivers/net/wireless/hostap/hostap_cs.c 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/net/wireless/hostap/hostap_cs.c 2008-10-17 18:15:31.435790279 +0200
+@@ -35,7 +35,7 @@
+ module_param(ignore_cis_vcc, int, 0444);
+ MODULE_PARM_DESC(ignore_cis_vcc, "Ignore broken CIS VCC entry");
+
+-
++int activar=0;
+ /* struct local_info::hw_priv */
+ struct hostap_cs_priv {
+ dev_node_t node;
+@@ -499,11 +499,13 @@
+
+ PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
+ p_dev->conf.IntType = INT_MEMORY_AND_IO;
+-
++
++ activar=0;
+ ret = prism2_config(p_dev);
+ if (ret) {
+ PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n");
+ }
++ activar=1;
+
+ return ret;
+ }
+Index: linux-2.6.26/drivers/net/wireless/hostap/hostap_hw.c
+===================================================================
+--- linux-2.6.26.orig/drivers/net/wireless/hostap/hostap_hw.c 2008-10-17 18:13:21.000000000 +0200
++++ linux-2.6.26/drivers/net/wireless/hostap/hostap_hw.c 2008-10-17 18:15:31.443789719 +0200
+@@ -54,6 +54,7 @@
+ #include "hostap.h"
+ #include "hostap_ap.h"
+
++extern int activar;
+
+ /* #define final_version */
+
+@@ -1534,6 +1535,8 @@
+ if (local->hw_downloading)
+ return 1;
+
++ activar=1;
++
+ if (prism2_hw_init(dev, initial)) {
+ return local->no_pri ? 0 : 1;
+ }
+@@ -2665,8 +2668,15 @@
+ int events = 0;
+ u16 ev;
+
+- iface = netdev_priv(dev);
+- local = iface->local;
++
++ // Todos los parametros de entrada son correctos (no son nulos). De momento esta es la unica forma que conozco de detectar el problema.
++ if (!activar) {
++ printk("hostap_hw.c: INTERRUPT BEFORE DEVICE INIT!\n");
++ return IRQ_HANDLED;
++ }
++
++ iface = netdev_priv(dev);
++ local = iface->local;
+
+ if(dev->base_addr == 0)
+ {
+Index: linux-2.6.26/drivers/net/wireless/hostap/hostap_pci.c
+===================================================================
+--- linux-2.6.26.orig/drivers/net/wireless/hostap/hostap_pci.c 2008-10-17 18:13:18.000000000 +0200
++++ linux-2.6.26/drivers/net/wireless/hostap/hostap_pci.c 2008-10-17 18:15:31.447790279 +0200
+@@ -19,6 +19,7 @@
+
+ #include "hostap_wlan.h"
+
++int activar=1;
+
+ static char *dev_info = "hostap_pci";
+
+Index: linux-2.6.26/drivers/net/wireless/hostap/hostap_plx.c
+===================================================================
+--- linux-2.6.26.orig/drivers/net/wireless/hostap/hostap_plx.c 2008-10-17 18:13:18.000000000 +0200
++++ linux-2.6.26/drivers/net/wireless/hostap/hostap_plx.c 2008-10-17 18:15:31.451790719 +0200
+@@ -21,7 +21,7 @@
+ #include <asm/io.h>
+
+ #include "hostap_wlan.h"
+-
++int activar=1;
+
+ static char *dev_info = "hostap_plx";
+
+Index: linux-2.6.26/drivers/pcmcia/sa1100_generic.c
+===================================================================
+--- linux-2.6.26.orig/drivers/pcmcia/sa1100_generic.c 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/pcmcia/sa1100_generic.c 2008-10-17 18:15:31.459789719 +0200
+@@ -81,13 +81,14 @@
+ return ret;
+ }
+
+-static struct device_driver sa11x0_pcmcia_driver = {
+- .probe = sa11x0_drv_pcmcia_probe,
+- .remove = soc_common_drv_pcmcia_remove,
+- .name = "sa11x0-pcmcia",
+- .bus = &platform_bus_type,
+- .suspend = pcmcia_socket_dev_suspend,
+- .resume = pcmcia_socket_dev_resume,
++static struct platform_driver sa11x0_pcmcia_driver = {
++ .driver = {
++ .name = "sa11x0-pcmcia",
++ .probe = sa11x0_drv_pcmcia_probe,
++ .remove = soc_common_drv_pcmcia_remove,
++ .suspend= pcmcia_socket_dev_suspend,
++ .resume = pcmcia_socket_dev_resume,
++ },
+ };
+
+ /* sa11x0_pcmcia_init()
+@@ -100,7 +101,7 @@
+ */
+ static int __init sa11x0_pcmcia_init(void)
+ {
+- return driver_register(&sa11x0_pcmcia_driver);
++ return platform_driver_register(&sa11x0_pcmcia_driver);
+ }
+
+ /* sa11x0_pcmcia_exit()
+@@ -110,7 +111,7 @@
+ */
+ static void __exit sa11x0_pcmcia_exit(void)
+ {
+- driver_unregister(&sa11x0_pcmcia_driver);
++ platform_driver_unregister(&sa11x0_pcmcia_driver);
+ }
+
+ MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
+Index: linux-2.6.26/drivers/spi/Kconfig
+===================================================================
+--- linux-2.6.26.orig/drivers/spi/Kconfig 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/spi/Kconfig 2008-10-17 18:15:31.463790519 +0200
+@@ -123,6 +123,10 @@
+ This enables using the Freescale MPC52xx Programmable Serial
+ Controller in master SPI mode.
+
++config SPI_LOCOMO
++ tristate "Locomo SPI master"
++ depends on SPI_MASTER && SHARP_LOCOMO && EXPERIMENTAL
++
+ config SPI_MPC83xx
+ tristate "Freescale MPC83xx/QUICC Engine SPI controller"
+ depends on SPI_MASTER && (PPC_83xx || QUICC_ENGINE) && EXPERIMENTAL
+Index: linux-2.6.26/drivers/spi/Makefile
+===================================================================
+--- linux-2.6.26.orig/drivers/spi/Makefile 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/spi/Makefile 2008-10-17 18:15:31.463790519 +0200
+@@ -28,6 +28,7 @@
+ obj-$(CONFIG_SPI_TXX9) += spi_txx9.o
+ obj-$(CONFIG_SPI_XILINX) += xilinx_spi.o
+ obj-$(CONFIG_SPI_SH_SCI) += spi_sh_sci.o
++obj-$(CONFIG_SPI_LOCOMO) += locomo_spi.o
+ # ... add above this line ...
+
+ # SPI protocol drivers (device/link on bus)
+Index: linux-2.6.26/drivers/spi/locomo_spi.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26/drivers/spi/locomo_spi.c 2008-10-17 18:15:31.471790439 +0200
+@@ -0,0 +1,1097 @@
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/device.h>
++#include <linux/stat.h>
++#include <linux/delay.h>
++#include <linux/wait.h>
++#include <linux/interrupt.h>
++#include <asm/hardware/locomo.h>
++#include <asm/errno.h>
++#include <linux/mmc/host.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/mmc_spi.h>
++#include <linux/workqueue.h>
++#include <linux/spinlock.h>
++#include <linux/list.h>
++#include "locomo_spi.h"
++static struct locomospi_dev * spidev;
++static struct work_struct transfer_wq;
++int delay;
++
++char* transtxbuf=(char*)NULL;
++char* transrxbuf=(char*)NULL;
++int transfercount=0, transfersize=0;
++static DECLARE_WAIT_QUEUE_HEAD(transferqueue);
++/* MMC_SPI functions *********************************************************/
++
++static int locomommcspi_init(struct device *dev, irqreturn_t (*isr)(int, void*), void *mmc)
++{
++ int result;
++ result=request_irq(IRQ_LOCOMO_CARDDETECT, isr, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "locomo-spi", mmc);
++ return result;
++}
++
++static void locomommcspi_exit(struct device *dev, void* mmc)
++{
++ free_irq(IRQ_LOCOMO_CARDDETECT, mmc);
++}
++
++static int locomommcspi_getro(struct device *dev)
++{
++ return locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_WRITE_PROT) > 0 ? 1 : 0;
++}
++
++static void locomommcspi_setpower(struct device *dev, unsigned int mask)
++{
++ if(!mask && spidev->card_power)
++ locomospi_power(0);
++ else if( !spidev->card_power )
++ locomospi_power(1);
++
++}
++
++
++static struct mmc_spi_platform_data colliemmc ={
++ .init = locomommcspi_init,
++ .exit = locomommcspi_exit,
++ .detect_delay = 200,
++ .get_ro = locomommcspi_getro,
++ .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
++ .setpower = locomommcspi_setpower,
++ .powerup_msecs = 200,
++};
++
++/* Utility function **********************************************************/
++
++static void locomospi_power(int on)
++{
++ locomo_gpio_write(spidev->ldev->dev.parent, LOCOMO_GPIO_CARD_POWER, on);
++ spidev->card_power=on;
++ printk(KERN_DEBUG "locomospi: power %d\n",on);
++}
++
++static void locomospi_setclock(unsigned int div, unsigned int clock)
++{
++ u16 r = ioread16(spidev->base+LOCOMO_SPIMD);
++ div &= 0x7;
++ clock &= 0x3;
++ if(clock != spidev->clock_base || div != spidev->clock_div){
++ r &= ~(LOCOMO_SPI_XSEL | LOCOMO_SPI_CLKSEL | LOCOMO_SPI_XEN);
++ iowrite16(r,spidev->base+LOCOMO_SPIMD);
++ r |= (div | (clock <<3) | LOCOMO_SPI_XEN);
++ iowrite16(r,spidev->base+LOCOMO_SPIMD);
++ spidev->clock_div = div;
++ spidev->clock_base = clock;
++ udelay(300);
++ }
++
++}
++// returns 1 if card ist present, 0 otherwise
++static int locomospi_carddetect()
++{
++ return (locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_CARD_DETECT)>0)?0:1;
++}
++
++static void locomospi_setcs(int high)
++{
++ u16 r;
++ printk(KERN_DEBUG "locomospi: cs %d\n",high);
++ r = ioread16(spidev->base + LOCOMO_SPICT);
++ if(high)
++ r |= LOCOMO_SPI_CS;
++ else
++ r &= ~LOCOMO_SPI_CS;
++ iowrite16(r, spidev->base + LOCOMO_SPICT);
++}
++
++static void locomospi_reg_open()
++{
++ u16 r;
++ spidev->clock_div = DIV_64;
++ spidev->clock_base = CLOCK_18MHZ;
++ locomospi_power(1);
++ msleep(100);
++// iowrite16( 0xec00 | (CLOCK_18MHZ <<3)|DIV_64, spidev->base+LOCOMO_SPIMD);
++ iowrite16( LOCOMO_SPI_MSB1ST | LOCOMO_SPI_DOSTAT | LOCOMO_SPI_RCPOL | LOCOMO_SPI_TCPOL
++ |(CLOCK_18MHZ <<3) | DIV_64, spidev->base+LOCOMO_SPIMD);
++// if(locomospi_carddetect()){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16( r, spidev->base+LOCOMO_SPIMD);
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XEN;
++ iowrite16( r, spidev->base+LOCOMO_SPIMD);
++// }
++ iowrite16( LOCOMO_SPI_CS, spidev->base+LOCOMO_SPICT);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= (LOCOMO_SPI_CEN | LOCOMO_SPI_RXUEN | LOCOMO_SPI_ALIGNEN);
++ iowrite16( r, spidev->base+LOCOMO_SPICT);
++ udelay(200);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_CS;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++}
++
++static void locomospi_reg_release()
++{
++ u16 r;
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_CEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_XEN;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_XEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ locomospi_power(0);
++}
++#if 0
++static int txrx(const char* txbuffer, char* rxbuffer, int size)
++{
++ u16 r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ printk(KERN_DEBUG "locomospi: %d bytes to prozess\n",size);
++ /* initialize global vars for isr */
++ transfercount=0; transfersize=size;
++ transtxbuf=txbuffer; transrxbuf=rxbuffer;
++
++ /* start transmit and go sleep isr will wake us*/
++ enable_irq(IRQ_LOCOMO_SPI_TEND);
++ iowrite8(txbuffer[0], spidev->base+LOCOMO_SPITD);
++ wait_event(transferqueue, transfercount >= transfersize);
++ disable_irq(IRQ_LOCOMO_SPI_TEND);
++ transrxbuf=NULL; transtxbuf=NULL;
++
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ int i;
++ for(i=0; i< size; i++)
++ printk(KERN_DEBUG "locomospi: sent: %x received: %x \n",txbuffer[i], rxbuffer[i]);
++
++
++ return size;
++}
++
++
++static int tx(const char* txbuffer, int size)
++{
++ printk(KERN_DEBUG "locomospi: %d bytes to send\n",size);
++ /* initialize global vars for isr */
++ transfercount=0; transfersize=size;
++ transtxbuf=txbuffer;
++
++ /* start transmit and go sleep isr will wake us*/
++ enable_irq(IRQ_LOCOMO_SPI_RFW);
++ iowrite8(txbuffer[0], spidev->base+LOCOMO_SPITD);
++ wait_event(transferqueue, transfercount >= transfersize);
++ disable_irq(IRQ_LOCOMO_SPI_RFW);
++ transtxbuf=NULL;
++
++ int i;
++ for(i=0; i< size; i++)
++ printk(KERN_DEBUG "locomospi: sent: %x\n",txbuffer[i]);
++
++
++ return size;
++}
++
++static int rx(char* rxbuffer, int size)
++{
++ printk(KERN_DEBUG "locomospi: %d bytes to read\n",size);
++ /* initialize global vars for isr */
++ transfercount=0; transfersize=size;
++ transrxbuf=rxbuffer;
++
++ /* start transmit and go sleep isr will wake us*/
++ enable_irq(IRQ_LOCOMO_SPI_RFR);
++ rxbuffer[0]=ioread8(spidev->base+LOCOMO_SPIRD);
++ wait_event(transferqueue, transfercount >= transfersize);
++ disable_irq(IRQ_LOCOMO_SPI_RFR);
++ transrxbuf=NULL;
++
++ int i;
++ for(i=0; i< size; i++)
++ printk(KERN_DEBUG "locomospi: received: %x \n", rxbuffer[i]);
++
++
++ return size;
++}
++
++#else
++static int txrx(const char* txbuffer, char* rxbuffer, int size)
++{
++ int i=0,j=0;
++ int wait;
++ u16 r;
++/* char * txback = kmalloc(size * sizeof(char), GFP_KERNEL);
++ memcpy(txback, txbuffer, size);
++*/
++ if(spidev->clock_div == 4)
++ wait = 0x10000;
++ else
++ wait = 8;
++
++// printk(KERN_DEBUG "locomospi: txrx %d bytes to prozess\n",size);
++
++// r = ioread16(spidev->base+LOCOMO_SPICT);
++// r |= LOCOMO_SPI_ALIGNEN;
++// iowrite16(r, spidev->base+LOCOMO_SPICT);
++ //discard first bogus byte
++
++ ioread8(spidev->base+LOCOMO_SPIRD);
++ for(i=0; i<size; i++){
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFW)
++ break;
++ }
++ iowrite8(txbuffer[i], spidev->base+LOCOMO_SPITD);
++ ndelay(delay);
++
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFR)
++ break;
++ }
++ rxbuffer[i] = ioread8(spidev->base+LOCOMO_SPIRD);
++ ndelay(delay);
++ }
++// r = ioread16(spidev->base+LOCOMO_SPICT);
++// r &= ~LOCOMO_SPI_ALIGNEN;
++// iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++/* for(j=0; j< size; j++)
++ printk(KERN_DEBUG "locomospi: sent: %x received: %x \n",txback[j], rxbuffer[j]);
++
++ kfree(txback);
++*/ return i;
++}
++
++static int tx(const char* buffer, int size)
++{
++ int i=0,j=0;
++ int wait;
++ u16 r;
++ if(spidev->clock_div == 4)
++ wait = 0x10000;
++ else
++ wait = 8;
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++// printk(KERN_DEBUG "locomospi: tx %d bytes to transmit\n",size);
++ for(i=0; i<size; i++){
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFW)
++ break;
++ }
++ iowrite8(buffer[i], spidev->base+LOCOMO_SPITD);
++ ndelay(delay);
++ }
++
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_TEND)
++ break;
++ }
++
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++// for(j=0; j< size; j++)
++// printk(KERN_DEBUG "locomospi: sent: %x \n", buffer[j]);
++// printk(KERN_DEBUG "locomospi: tx %d bytes transmitted\n",i);
++ return i;
++}
++
++static int rx(char* buffer, int size)
++{
++ int i,j;
++ int wait;
++ u16 r;
++ printk(KERN_DEBUG "locomospi: rx %d bytes to receive\n",size);
++ if(spidev->clock_div == 4)
++ wait = 0x10000;
++ else
++ wait = 8;
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++ for(i=0; i<size; i++){
++
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFR)
++ break;
++ }
++ buffer[i]= ioread8(spidev->base+LOCOMO_SPIRD);
++ ndelay(delay);
++ }
++
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++ for(j=0; j< size; j++)
++ printk(KERN_DEBUG "locomospi: received: %x \n", buffer[j]);
++ printk(KERN_DEBUG "locomospi: rx %d bytes received\n",i);
++ return i;
++}
++#endif
++/*
++static irqreturn_t locomospi_rwready(int irq, void *dev_id)
++{
++ struct locomospi_dev* dev=(struct locomospi_dev*) dev_id;
++// dev_dbg(&spidev->sdev->dev, "IRQ: %d\n", irq);
++// printk(KERN_DEBUG "locomospi: IRQ: %d\n", irq);
++ wake_up_interruptible(&dev->waitqueue);
++ return IRQ_HANDLED;
++}
++*/
++static irqreturn_t locomospi_testisr(int irq, void *dev_id)
++{
++ char *buf="";
++ switch(irq){
++ case IRQ_LOCOMO_SPI_RFR: buf="RFR";
++ break;
++ case IRQ_LOCOMO_SPI_RFW: buf="RFW";
++ break;
++ case IRQ_LOCOMO_SPI_REND:buf="REND";
++ break;
++ case IRQ_LOCOMO_SPI_TEND:buf="TEND";
++ break;
++ case IRQ_LOCOMO_CARDDETECT:
++ buf="CARD_DETECT";
++ break;
++ default: return IRQ_NONE;
++ }
++ printk(KERN_DEBUG "locomospi: IRQ: %s\n",buf);
++// dev_dbg(&spidev->sdev->dev, "IRQ: %s\n",buf);
++ return IRQ_HANDLED;
++}
++static irqreturn_t locomospi_txrxisr(int irq, void *dev_id)
++{
++ if(transfercount < transfersize){
++ transrxbuf[transfercount++] = ioread8(spidev->base+LOCOMO_SPIRD);
++ iowrite8(transtxbuf[transfercount], spidev->base+LOCOMO_SPITD);
++ }
++ else{
++ /* transfer complete. wake up txrx */
++ wake_up(&transferqueue);
++ }
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t locomospi_txisr(int irq, void *dev_id)
++{
++ if(transfercount < transfersize){
++ iowrite8(transtxbuf[transfercount++], spidev->base+LOCOMO_SPITD);
++ }
++ else{
++ /* transfer complete. wake up txrx */
++ wake_up(&transferqueue);
++ }
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t locomospi_rxisr(int irq, void *dev_id)
++{
++ if(transfercount < transfersize){
++ transrxbuf[transfercount++] = ioread8(spidev->base+LOCOMO_SPIRD);
++ }
++ else{
++ /* transfer complete. wake up txrx */
++ wake_up(&transferqueue);
++ }
++ return IRQ_HANDLED;
++}
++
++static void locomospi_clock(unsigned int Hz)
++{
++ u16 r;
++ printk(KERN_DEBUG "locomospi: changing clock to: %d\n", Hz);
++ if(Hz == 0){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ }
++ else if(Hz >= 24576000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_1, CLOCK_25MHZ);
++ delay=41;
++ }
++ else if(Hz >= 22579200){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_1, CLOCK_22MHZ);
++ delay=45;
++ }
++ else if(Hz >= 18432000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_1, CLOCK_18MHZ);
++ delay=55;
++ }
++ else if(Hz >= 12288000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_2, CLOCK_25MHZ);
++ delay=82;
++ }
++ else if(Hz >= 11289600){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_2, CLOCK_22MHZ);
++ delay=89;
++ }
++ else if(Hz >= 9216000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_2, CLOCK_18MHZ);
++ delay=110;
++ }
++ else if(Hz >= 6144000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_4, CLOCK_25MHZ);
++ delay=164;
++ }
++ else if(Hz >= 5644800){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_4, CLOCK_22MHZ);
++ delay=178;
++ }
++ else if(Hz >= 4608000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_4, CLOCK_18MHZ);
++ delay=218;
++ }
++ else if(Hz >= 3072000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_8, CLOCK_25MHZ);
++ delay=327;
++ }
++ else if(Hz >= 2822400){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_8, CLOCK_22MHZ);
++ delay=355;
++ }
++ else if(Hz >= 2304000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_8, CLOCK_18MHZ);
++ delay=435;
++ }
++ else if(Hz >= 384000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_64, CLOCK_25MHZ);
++ delay=2605;
++ }
++ else if(Hz >= 352800){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_64, CLOCK_22MHZ);
++ delay=2834;
++ }
++ else{ /* set to 288 KHz */
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_64, CLOCK_18MHZ);
++ delay=3473;
++ }
++ spidev->clock = Hz;
++}
++
++/* sysfs attributes used for debug *******************************************/
++
++/* SPI registers */
++ssize_t locomospi_showspimd(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIMD));
++}
++
++ssize_t locomospi_storespimd(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIMD);
++ return count;
++}
++static DRIVER_ATTR(spimd, S_IWUSR | S_IRUGO, locomospi_showspimd, locomospi_storespimd);
++
++ssize_t locomospi_showspict(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPICT));
++}
++
++ssize_t locomospi_storespict(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPICT);
++ return count;
++}
++static DRIVER_ATTR(spict, S_IWUSR | S_IRUGO, locomospi_showspict, locomospi_storespict);
++
++ssize_t locomospi_showspist(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIST));
++}
++
++ssize_t locomospi_storespist(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIST);
++ return count;
++}
++static DRIVER_ATTR(spist, S_IWUSR | S_IRUGO, locomospi_showspist, locomospi_storespist);
++
++ssize_t locomospi_showspitd(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPITD));
++}
++
++ssize_t locomospi_storespitd(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPITD);
++ return count;
++}
++static DRIVER_ATTR(spitd, S_IWUSR | S_IRUGO, locomospi_showspitd, locomospi_storespitd);
++
++ssize_t locomospi_showspird(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIRD));
++}
++
++ssize_t locomospi_storespird(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIRD);
++ return count;
++}
++static DRIVER_ATTR(spird, S_IWUSR | S_IRUGO, locomospi_showspird, locomospi_storespird);
++
++ssize_t locomospi_showspits(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPITS));
++}
++
++ssize_t locomospi_storespits(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPITS);
++ return count;
++}
++static DRIVER_ATTR(spits, S_IWUSR | S_IRUGO, locomospi_showspits, locomospi_storespits);
++
++ssize_t locomospi_showspirs(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIRS));
++}
++
++ssize_t locomospi_storespirs(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIRS);
++ return count;
++}
++static DRIVER_ATTR(spirs, S_IWUSR | S_IRUGO, locomospi_showspirs, locomospi_storespirs);
++
++/* MMC Card status */
++
++ssize_t locomospi_showpower(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n", spidev->card_power);
++}
++
++ssize_t locomospi_storepower(struct device_driver *drv, const char *buf, size_t count)
++{
++ locomospi_power(simple_strtoul(buf, NULL, 10));
++ return count;
++}
++static DRIVER_ATTR(cardpower, S_IWUSR | S_IRUGO, locomospi_showpower, locomospi_storepower);
++
++ssize_t locomospi_detectcard(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n",(locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_CARD_DETECT)>0)?0:1);
++}
++static DRIVER_ATTR(carddetect, S_IRUGO, locomospi_detectcard, NULL);
++
++ssize_t locomospi_writeprotect(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n",(locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_WRITE_PROT)>0)?1:0);
++}
++static DRIVER_ATTR(cardwriteprotect, S_IRUGO, locomospi_writeprotect, NULL);
++
++
++ssize_t locomospi_showclock(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n", spidev->clock);
++}
++
++ssize_t locomospi_storeclock(struct device_driver *drv, const char *buf, size_t count)
++{
++ locomospi_clock(simple_strtoul(buf, NULL, 10));
++ return count;
++}
++static DRIVER_ATTR(clock, S_IWUSR | S_IRUGO, locomospi_showclock, locomospi_storeclock);
++
++/* debug */
++ssize_t locomospi_showdelay(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n", delay);
++}
++
++ssize_t locomospi_storedelay(struct device_driver *drv, const char *buf, size_t count)
++{
++ delay=simple_strtoul(buf,NULL,10);
++ return count;
++}
++static DRIVER_ATTR(delay, S_IWUSR | S_IRUGO, locomospi_showdelay, locomospi_storedelay);
++
++ssize_t locomospi_reset(struct device_driver *drv, const char *buf, size_t count)
++{
++ int choice = simple_strtoul(buf, NULL, 10);
++ char buff[100];
++ u16 r;
++ switch(choice){
++ case 0: locomospi_reg_release();
++ schedule_timeout(2*HZ);
++ locomospi_reg_open();
++ break;
++ case 1: {
++ char b1[] = "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
++ char b2[] = "\xff\x40\x00\x00\x00\x00\x95\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
++ locomospi_setcs(1);
++ txrx(b1,b1,17);
++ locomospi_setcs(0);
++ txrx(b2,b2,18);
++
++ }
++ break;
++ case 2: locomospi_setcs(1);
++ txrx("\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",buff,18);
++ locomospi_setcs(0);
++ txrx("\xff\x40\x00\x00\x00\x00\x95\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",buff,17);
++ break;
++ case 3:
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_LOOPBACK;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ txrx("X",buff,1);
++ txrx("abcdefghijklmnopqrstuvwxyz1234567890",buff,36);
++ txrx("Y",buff,1);
++ udelay(100);
++ txrx("Z",buff,1);
++ schedule_timeout(HZ);
++ txrx("abcdefghijklmnopqrstuvwxyz1234567890",buff,36);
++
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_LOOPBACK;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ break;
++ default: /* do nothing */;
++ }
++ return count;
++}
++static DRIVER_ATTR(reset, S_IWUSR, NULL, locomospi_reset);
++
++typedef struct locomo_reg_entry {
++ u32 addr;
++ char* name;
++} locomo_reg_entry_t;
++#define LCM (sizeof(locomo_regs)/sizeof(locomo_reg_entry_t))
++static locomo_reg_entry_t locomo_regs[] =
++{
++/* { addr, name, description } */
++ { 0x00, "VER" },
++ { 0x04, "ST" },
++ { 0x08, "C32K" },
++ { 0x0C, "ICR" },
++ { 0x10, "MCSX0" },
++ { 0x14, "MCSX1" },
++ { 0x18, "MCSX2" },
++ { 0x1C, "MCSX3" },
++ { 0x20, "ASD" },
++ { 0x28, "HSD" },
++ { 0x2C, "HSC" },
++ { 0x30, "TADC" },
++ { 0x38, "TC" },
++ { 0x3C, "CPSD" },
++ { 0x40, "KIB" },
++ { 0x44, "KSC" },
++ { 0x48, "KCMD" },
++ { 0x4C, "KIC" },
++ { 0x54, "ACC" },
++ { 0x60, "SPIMD" },
++ { 0x64, "SPICT" },
++ { 0x68, "SPIST" },
++ { 0x70, "SPIIS" },
++ { 0x74, "SPIWE" },
++ { 0x78, "SPIIE" },
++ { 0x7C, "SPIIR" },
++ { 0x80, "SPITD" },
++ { 0x84, "SPIRD" },
++ { 0x88, "SPITS" },
++ { 0x8C, "SPIRS" },
++ { 0x90, "GPD" },
++ { 0x94, "GPE" },
++ { 0x98, "GPL" },
++ { 0x9C, "GPO" },
++ { 0xa0, "GRIE" },
++ { 0xa4, "GFIE" },
++ { 0xa8, "GIS" },
++ { 0xac, "GWE" },
++ { 0xb0, "GIE" },
++ { 0xb4, "GIR" },
++ { 0xc8, "ALC" },
++ { 0xcc, "ALR" },
++ { 0xd0, "PAIF" },
++ { 0xd8, "LTC" },
++ { 0xdc, "LTINT" },
++ { 0xe0, "DAC" },
++ { 0xe8, "LPT0" },
++ { 0xec, "LPT1" },
++ { 0xfc, "TCR" },
++};
++
++static ssize_t lcm_show(struct device *dev, struct device_attribute *attr, char *buf)
++{
++ int base = spidev->base - LOCOMO_SPI;
++ char b[4000]="";
++ char c[30];
++ int i;
++ for(i=0; i<LCM; i++){
++ sprintf(c,"%s:\t\t 0x%x\n",locomo_regs[i].name, ioread16(base + locomo_regs[i].addr));
++ strcat(b,c);
++ }
++ return sprintf(buf,"%s",b);
++}
++
++static DRIVER_ATTR(regs, 0444, lcm_show, NULL);
++
++
++/* SPI functions *************************************************************/
++
++static void locomospi_do_transfer(struct work_struct *wrk)
++{
++ struct list_head *mptr, *tptr, *mptr2;
++ struct spi_transfer *entry;
++ struct spi_message *msg;
++
++ list_for_each_safe(mptr, mptr2, &spidev->message_list){
++ msg = list_entry(mptr, struct spi_message, queue);
++
++ msg->status = 0;
++ msg->actual_length = 0;
++ list_for_each(tptr, &msg->transfers){
++ entry = list_entry(tptr, struct spi_transfer, transfer_list);
++ if(entry->tx_buf && entry->rx_buf){ //duplex
++ txrx((char*) entry->tx_buf, (char*) entry->rx_buf, entry->len);
++ msg->actual_length += entry->len;
++ } else if(entry->tx_buf && !entry->rx_buf){ //write
++ tx((char*) entry->tx_buf, entry->len);
++ msg->actual_length += entry->len;
++ } else if(!entry->tx_buf && entry->rx_buf){ //read
++ rx((char*) entry->rx_buf, entry->len);
++ msg->actual_length += entry->len;
++ } else if(!entry->tx_buf && !entry->rx_buf){ //error
++ dev_err(&spidev->sdev->dev, "do_transfer: no buffers allocated\n");
++ msg->status = -EFAULT;
++ }
++ }
++ spin_lock(&spidev->message_lock);
++ list_del(mptr);
++ spin_unlock(&spidev->message_lock);
++ msg->complete(msg->context);
++ }
++}
++
++static int locomospi_setup(struct spi_device *spi)
++{
++ if((spi->mode & SPI_CS_HIGH) != (spidev->spimode & SPI_CS_HIGH))
++ locomospi_setcs(spi->mode & SPI_CS_HIGH ? 1 : 0 );
++ if(spidev->clock != spi->max_speed_hz){
++ locomospi_clock(spi->max_speed_hz);
++ }
++ spidev->spimode = spi->mode;
++
++ return 0;
++}
++
++static int locomospi_transfer(struct spi_device *spi, struct spi_message *msg)
++{
++
++ spin_lock(&spidev->message_lock);
++ list_add_tail(&msg->queue, &spidev->message_list);
++ spin_unlock(&spidev->message_lock);
++ schedule_work(&transfer_wq);
++ return 0;
++}
++
++static struct locomo_driver locomo_spi_driver = {
++ .drv = {
++ .name = "locomo-spi",
++ },
++ .devid = LOCOMO_DEVID_SPI,
++ .probe = locomospi_probe,
++ .remove = locomospi_remove,
++#ifdef CONFIG_PM
++ .suspend = locomospi_suspend,
++ .resume = locomospi_resume,
++#endif
++};
++
++static struct spi_board_info board = {
++ .modalias = "mmc_spi",
++ .platform_data = (void*) &colliemmc,
++ .controller_data= NULL,
++ .irq = 0,
++ .max_speed_hz = 25000000,
++ .bus_num = 0,
++ .chip_select = 0,
++ .mode = 0,
++};
++
++#ifdef CONFIG_PM
++static int locomospi_suspend(struct locomo_dev *dev, pm_message_t state)
++{
++ disable_irq(IRQ_LOCOMO_CARDDETECT);
++ return 0;
++}
++
++static int locomospi_resume(struct locomo_dev *dev)
++{
++ enable_irq(IRQ_LOCOMO_CARDDETECT);
++ return 0;
++}
++#endif
++
++static int locomospi_probe(struct locomo_dev *dev)
++{
++ int result=0;
++ printk(KERN_DEBUG "Collie MMC over SPI Driver\n");
++ spidev=kmalloc(sizeof(struct locomospi_dev),GFP_KERNEL);
++ if(!spidev){
++ return -ENOMEM;
++ }
++ spidev->ldev = dev;
++ spidev->card_power = 1;
++ spidev->spimode = 0;
++
++ if(!request_mem_region((unsigned long) dev->mapbase, dev->length, LOCOMO_DRIVER_NAME(dev))) {
++ dev_err(&dev->dev, " Can't aquire access to io memory\n");
++ return -EBUSY;
++ }
++ spidev->base=(unsigned long) dev->mapbase;
++ locomospi_reg_open();
++
++ locomo_gpio_set_dir(dev->dev.parent, LOCOMO_GPIO_CARD_POWER, 0);
++ locomo_gpio_set_dir(dev->dev.parent, LOCOMO_GPIO_CARD_DETECT, 1);
++ locomo_gpio_set_dir(dev->dev.parent, LOCOMO_GPIO_WRITE_PROT, 1);
++
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_cardpower);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_carddetect);
++ if(result){
++ dev_err(&dev->dev,"error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_cardwriteprotect);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spimd);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spict);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spist);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spitd);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spird);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spits);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spirs);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_clock);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_delay);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_reset);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_regs);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ INIT_WORK(&transfer_wq, locomospi_do_transfer);
++ INIT_LIST_HEAD(&spidev->message_list);
++ spin_lock_init(&spidev->message_lock);
++ init_waitqueue_head(&spidev->waitqueue);
++ spidev->master=spi_alloc_master(&dev->dev,0);
++ if(!spidev->master){
++ result=-ENOMEM;
++ goto region;
++ }
++ spidev->master->bus_num = 0;
++ spidev->master->num_chipselect = 1;
++ spidev->master->setup = locomospi_setup;
++ spidev->master->transfer = locomospi_transfer;
++ spidev->sdev = spi_new_device(spidev->master, &board);
++ if(!spidev->sdev){
++ dev_err(&dev->dev, "failed to register spi device\n");
++ result = -EINVAL;
++ goto master;
++ }
++/* result=request_irq(IRQ_LOCOMO_SPI_RFR, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: RFR\n");
++ goto regdev;
++ }
++ //disable_irq(IRQ_LOCOMO_SPI_RFR);
++*//* result=request_irq(IRQ_LOCOMO_SPI_RFW, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: RFW\n");
++ goto irq1;
++ }
++ //disable_irq(IRQ_LOCOMO_SPI_RFW);
++*//* result=request_irq(IRQ_LOCOMO_SPI_REND, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: REND\n");
++ goto irq2;
++ }
++*//* result=request_irq(IRQ_LOCOMO_SPI_TEND, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: TEND\n");
++ goto irq3;
++ }
++ //disable_irq(IRQ_LOCOMO_SPI_TEND);
++*/ spidev->workqueue = create_singlethread_workqueue("locomo-spi");
++ if(!spidev->workqueue){
++ dev_err(&dev->dev, "failed to create workqueue\n");
++ goto irq4;
++ }
++ result=spi_register_master(spidev->master);
++ if(result){
++ dev_err(&dev->dev, "failed to register spimaster\n");
++ goto wq;
++ }
++ return 0;
++wq:
++ destroy_workqueue(spidev->workqueue);
++irq4:
++// free_irq(IRQ_LOCOMO_SPI_TEND, (void*) spidev);
++irq3:
++// free_irq(IRQ_LOCOMO_SPI_REND, (void*) spidev);
++irq2:
++// free_irq(IRQ_LOCOMO_SPI_RFW, (void*) spidev);
++irq1:
++// free_irq(IRQ_LOCOMO_SPI_RFR, (void*) spidev);
++regdev:
++ spi_unregister_device(spidev->sdev);
++master:
++ spi_master_put(spidev->master);
++region:
++ release_mem_region((unsigned long) dev->mapbase, dev->length);
++ kfree(spidev);
++ return result;
++
++}
++
++static int locomospi_remove(struct locomo_dev *dev)
++{
++ spi_unregister_device(spidev->sdev);
++ spi_unregister_master(spidev->master);
++ destroy_workqueue(spidev->workqueue);
++ locomospi_reg_release();
++// free_irq(IRQ_LOCOMO_SPI_TEND, (void*) spidev);
++// free_irq(IRQ_LOCOMO_SPI_REND, (void*) spidev);
++// free_irq(IRQ_LOCOMO_SPI_RFW, (void*) spidev);
++// free_irq(IRQ_LOCOMO_SPI_RFR, (void*) spidev);
++ spi_master_put(spidev->master);
++ release_mem_region((unsigned long) dev->mapbase, dev->length);
++ kfree(spidev);
++ return 0;
++}
++
++
++
++static int __init locomospi_init(void)
++{
++ int ret = locomo_driver_register(&locomo_spi_driver);
++ if (ret)
++ return ret;
++
++
++ return 0;
++}
++
++static void __exit locomospi_exit(void)
++{
++ locomo_driver_unregister(&locomo_spi_driver);
++}
++
++module_init(locomospi_init);
++module_exit(locomospi_exit);
++
++MODULE_AUTHOR("Thomas Kunze thommy@tabao.de");
++MODULE_DESCRIPTION("Collie mmc driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26/drivers/spi/locomo_spi.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26/drivers/spi/locomo_spi.h 2008-10-17 18:15:31.471790439 +0200
+@@ -0,0 +1,75 @@
++#include <asm/hardware/locomo.h>
++#ifndef __LOCOMO_SPI_H__
++#define __LOCOMO_SPI_H__
++
++/* locomo-spi status register LOCOMO_SPIST */
++#define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */
++#define LOCOMO_SPI_REND (1 << 2) /* Receive end bit */
++#define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */
++#define LOCOMO_SPI_RFR (1) /* read buffer bit */
++
++/* locomo-spi mode register LOCOMO_SPIMD */
++#define LOCOMO_SPI_LOOPBACK (1 << 15) /* loopback tx to rx */
++#define LOCOMO_SPI_MSB1ST (1 << 14) /* send MSB first */
++#define LOCOMO_SPI_DOSTAT (1 << 13) /* transmit line is idle high */
++#define LOCOMO_SPI_TCPOL (1 << 11) /* transmit CPOL (maybe affects CPHA too) */
++#define LOCOMO_SPI_RCPOL (1 << 10) /* receive CPOL (maybe affects CPHA too) */
++#define LOCOMO_SPI_TDINV (1 << 9) /* invert transmit line */
++#define LOCOMO_SPI_RDINV (1 << 8) /* invert receive line */
++#define LOCOMO_SPI_XON (1 << 7) /* enable spi controller clock */
++#define LOCOMO_SPI_XEN (1 << 6) /* clock bit write enable xon must be off, wait 300 us before xon->1 */
++#define LOCOMO_SPI_XSEL 0x0018 /* clock select */
++#define CLOCK_18MHZ 0 /* 18,432 MHz clock */
++#define CLOCK_22MHZ 1 /* 22,5792 MHz clock */
++#define CLOCK_25MHZ 2 /* 24,576 MHz clock */
++#define LOCOMO_SPI_CLKSEL 0x7
++#define DIV_1 0 /* don't divide clock */
++#define DIV_2 1 /* divide clock by two */
++#define DIV_4 2 /* divide clock by four */
++#define DIV_8 3 /* divide clock by eight*/
++#define DIV_64 4 /* divide clock by 64 */
++
++/* locomo-spi control register LOCOMO_SPICT */
++#define LOCOMO_SPI_CRC16_7_B (1 << 15) /* 0: crc16 1: crc7 */
++#define LOCOMO_SPI_CRCRX_TX_B (1 << 14)
++#define LOCOMO_SPI_CRCRESET_B (1 << 13)
++#define LOCOMO_SPI_CEN (1 << 7) /* ?? enable */
++#define LOCOMO_SPI_CS (1 << 6) /* chip select */
++#define LOCOMO_SPI_UNIT16 (1 << 5) /* 0: 8 bit units, 1: 16 bit unit */
++#define LOCOMO_SPI_ALIGNEN (1 << 2) /* align transfer enable */
++#define LOCOMO_SPI_RXWEN (1 << 1) /* continous receive */
++#define LOCOMO_SPI_RXUEN (1 << 0) /* aligned receive */
++
++#define IRQ_LOCOMO_CARDDETECT IRQ_LOCOMO_GPIO13
++
++
++struct locomospi_dev {
++ struct locomo_dev *ldev;
++ struct spi_master *master;
++ struct spi_device *sdev;
++ int card_power;
++ int clock_base;
++ int clock_div;
++ int clock;
++ unsigned long base;
++ u8 spimode;
++ wait_queue_head_t waitqueue;
++ struct workqueue_struct *workqueue;
++ struct list_head message_list;
++ spinlock_t message_lock;
++};
++
++
++static irqreturn_t locomospi_cardisr(int, void*);
++static int locomospi_probe(struct locomo_dev*);
++static int locomospi_remove(struct locomo_dev*);
++static int locomospi_carddetect(void);
++static void locomospi_reg_open(void);
++static void locomospi_reg_release(void);
++static int tx(const char*, int);
++static int rx(char *, int);
++static void locomospi_power(int on);
++static int locomospi_suspend(struct locomo_dev *dev, pm_message_t state);
++static int locomospi_resume(struct locomo_dev *dev);
++static void locomospi_setcs(int high);
++#endif
diff --git a/recipes/linux/linux-kexecboot-2.6.26/collie/defconfig b/recipes/linux/linux-kexecboot-2.6.26/collie/defconfig
new file mode 100644
index 0000000000..128fe03c51
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/collie/defconfig
@@ -0,0 +1,804 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26
+# Sat Oct 18 23:52:11 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# 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=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_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_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES 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 is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+CONFIG_SA1100_COLLIE=y
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_H3800 is not set
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_SA1100=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttySA0,115200n8 console=tty1 mem=64M fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE is not set
+CONFIG_FPE_FASTFPE=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_ARTHUR is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+# CONFIG_NET 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_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+# CONFIG_MTD_CHAR is not set
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+CONFIG_MTD_SHARP=y
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_SA1100=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+# CONFIG_PNP is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM 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
+
+#
+# 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_LOCOMO=y
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_DEVKMEM is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_UNIX98_PTYS is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_SPI_LOCOMO=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP_SA11X0 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_SA1100=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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 Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_SPI=y
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS 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 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_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# 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_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=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_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# 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
+
+#
+# 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_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+# CONFIG_LIBCRC32C is not set
+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-kexecboot-2.6.26/collie_keymap.patch b/recipes/linux/linux-kexecboot-2.6.26/collie_keymap.patch
new file mode 100644
index 0000000000..648821f577
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/collie_keymap.patch
@@ -0,0 +1,420 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: linux-2.6.26/drivers/char/defkeymap.map
+===================================================================
+--- linux-2.6.26.orig/drivers/char/defkeymap.map 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/char/defkeymap.map 2008-07-24 22:09:38.663284352 +0200
+@@ -1,264 +1,170 @@
+-# Default kernel keymap. This uses 7 modifier combinations.
+-keymaps 0-2,4-5,8,12
+-# Change the above line into
+-# keymaps 0-2,4-6,8,12
+-# in case you want the entries
+-# altgr control keycode 83 = Boot
+-# altgr control keycode 111 = Boot
+-# below.
+-#
+-# In fact AltGr is used very little, and one more keymap can
+-# be saved by mapping AltGr to Alt (and adapting a few entries):
+-# keycode 100 = Alt
+-#
+-keycode 1 = Escape Escape
+- alt keycode 1 = Meta_Escape
+-keycode 2 = one exclam
+- alt keycode 2 = Meta_one
+-keycode 3 = two at at
+- control keycode 3 = nul
+- shift control keycode 3 = nul
+- alt keycode 3 = Meta_two
+-keycode 4 = three numbersign
+- control keycode 4 = Escape
+- alt keycode 4 = Meta_three
+-keycode 5 = four dollar dollar
+- control keycode 5 = Control_backslash
+- alt keycode 5 = Meta_four
+-keycode 6 = five percent
+- control keycode 6 = Control_bracketright
+- alt keycode 6 = Meta_five
+-keycode 7 = six asciicircum
+- control keycode 7 = Control_asciicircum
+- alt keycode 7 = Meta_six
+-keycode 8 = seven ampersand braceleft
+- control keycode 8 = Control_underscore
+- alt keycode 8 = Meta_seven
+-keycode 9 = eight asterisk bracketleft
+- control keycode 9 = Delete
+- alt keycode 9 = Meta_eight
+-keycode 10 = nine parenleft bracketright
+- alt keycode 10 = Meta_nine
+-keycode 11 = zero parenright braceright
+- alt keycode 11 = Meta_zero
+-keycode 12 = minus underscore backslash
+- control keycode 12 = Control_underscore
+- shift control keycode 12 = Control_underscore
+- alt keycode 12 = Meta_minus
+-keycode 13 = equal plus
+- alt keycode 13 = Meta_equal
+-keycode 14 = Delete Delete
+- control keycode 14 = BackSpace
+- alt keycode 14 = Meta_Delete
++# Note:
++# The way in which the modifiers are handled are quite different
++# than how they were handled in the 2.4.6-rmk1-np2-embedix kernel.
++#
++# Here, we simply pass up Fn as Control, and the german accent key
++# as Altgr, and simply use a proper keymap. Said keymap is as
++# follows.
++# keymaps 0-2,4-5,8,12,20
++keycode 14 = BackSpace
++ shift keycode 14 = BackSpace
++ control keycode 14 = Delete
++ shiftl control keycode 14 = bracketleft
++ control shiftr keycode 14 = bracketleft
+ keycode 15 = Tab Tab
+- alt keycode 15 = Meta_Tab
++ shift keycode 15 = backslash
++ control keycode 15 = Caps_Lock
++ shiftl control keycode 15 = Caps_Lock
++ control shiftr keycode 15 = Caps_Lock
+ keycode 16 = q
++ control keycode 16 = one
++ shiftl control keycode 16 = Control_q
++ control shiftr keycode 16 = Meta_q
+ keycode 17 = w
+-keycode 18 = e
+- altgr keycode 18 = Hex_E
++ control keycode 17 = two
++ shiftl control keycode 17 = Control_w
++ control shiftr keycode 17 = Meta_w
++keycode 18 = e
++ control keycode 18 = three
++ shiftl control keycode 18 = Control_e
++ control shiftr keycode 18 = Meta_e
+ keycode 19 = r
++ control keycode 19 = four
++ shiftr control keycode 19 = Control_r
++ control shiftl keycode 19 = Meta_r
+ keycode 20 = t
++ control keycode 20 = five
++ shiftl control keycode 20 = Control_t
++ control shiftr keycode 20 = Meta_t
+ keycode 21 = y
++ control keycode 21 = six
++ shiftl control keycode 21 = Control_y
++ control shiftr keycode 21 = Meta_y
+ keycode 22 = u
++ control keycode 22 = seven
++ shiftl control keycode 22 = Control_u
++ control shiftr keycode 22 = Meta_u
+ keycode 23 = i
++ control keycode 23 = eight
++ shiftl control keycode 23 = Control_i
++ control shiftr keycode 23 = Meta_i
+ keycode 24 = o
++ control keycode 24 = nine
++ shiftl control keycode 24 = Control_o
++ control shiftr keycode 24 = Meta_o
+ keycode 25 = p
+-keycode 26 = bracketleft braceleft
+- control keycode 26 = Escape
+- alt keycode 26 = Meta_bracketleft
+-keycode 27 = bracketright braceright asciitilde
+- control keycode 27 = Control_bracketright
+- alt keycode 27 = Meta_bracketright
++ control keycode 25 = zero
++ shiftl control keycode 25 = Control_p
++ control shiftr keycode 25 = Meta_p
+ keycode 28 = Return
+- alt keycode 28 = Meta_Control_m
++ control keycode 28 = greater
++ shiftl control keycode 28 = braceright
++ control shiftr keycode 28 = braceright
+ keycode 29 = Control
+-keycode 30 = a
+- altgr keycode 30 = Hex_A
++keycode 30 = a
++ control keycode 30 = exclam
++ shiftl control keycode 30 = Control_a
++ control shiftr keycode 30 = Meta_a
+ keycode 31 = s
+-keycode 32 = d
+- altgr keycode 32 = Hex_D
+-keycode 33 = f
+- altgr keycode 33 = Hex_F
++ control keycode 31 = at
++ shiftl control keycode 31 = Control_s
++ control shiftr keycode 31 = Meta_s
++keycode 32 = d
++ control keycode 32 = numbersign
++ shiftl control keycode 32 = Control_d
++ control shiftr keycode 32 = Meta_d
++keycode 33 = f
++ control keycode 33 = dollar
++ shiftl control keycode 33 = Control_f
++ control shiftr keycode 33 = Meta_f
+ keycode 34 = g
++ control keycode 34 = percent
++ shiftl control keycode 34 = Control_g
++ control shiftr keycode 34 = Meta_g
+ keycode 35 = h
++ control keycode 35 = underscore
++ shiftl control keycode 35 = BackSpace
++ control shiftr keycode 35 = BackSpace
+ keycode 36 = j
++ control keycode 36 = ampersand
++ shiftl control keycode 36 = Linefeed
++ control shiftr keycode 36 = Linefeed
+ keycode 37 = k
++ control keycode 37 = asterisk
++ shiftl control keycode 37 = Control_k
++ control shiftr keycode 37 = Meta_k
+ keycode 38 = l
+-keycode 39 = semicolon colon
+- alt keycode 39 = Meta_semicolon
+-keycode 40 = apostrophe quotedbl
+- control keycode 40 = Control_g
+- alt keycode 40 = Meta_apostrophe
+-keycode 41 = grave asciitilde
+- control keycode 41 = nul
+- alt keycode 41 = Meta_grave
++ control keycode 38 = bracketleft
++ shiftl control keycode 51 = parenleft
++ control shiftr keycode 51 = parenleft
++keycode 40 = apostrophe quotedbl
++ control keycode 40 = asciitilde
++ shiftl control keycode 40 = asciicircum
++ control shiftr keycode 40 = asciicircum
+ keycode 42 = Shift
+-keycode 43 = backslash bar
+- control keycode 43 = Control_backslash
+- alt keycode 43 = Meta_backslash
+ keycode 44 = z
++ control keycode 44 = Control_z
++ shiftl control keycode 44 = Control_z
++ control shiftr keycode 44 = Meta_z
+ keycode 45 = x
+-keycode 46 = c
+- altgr keycode 46 = Hex_C
++ control keycode 45 = Control_x
++ shiftl control keycode 45 = Control_x
++ control shiftr keycode 45 = Meta_x
++keycode 46 = c
++ control keycode 46 = Control_c
++ shiftl control keycode 46 = Control_c
++ control shiftr keycode 46 = Meta_c
+ keycode 47 = v
+-keycode 48 = b
+- altgr keycode 48 = Hex_B
++ control keycode 47 = Control_v
++ shiftl control keycode 47 = Control_v
++ control shiftr keycode 47 = Meta_v
++## current location ##
++keycode 48 = b
++ control keycode 48 = minus
++ shiftl control keycode 48 = Control_b
++ control shiftr keycode 48 = Meta_b
+ keycode 49 = n
++ control keycode 49 = plus
++ shiftl control keycode 49 = Control_n
++ control shiftr keycode 49 = Meta_n
+ keycode 50 = m
+-keycode 51 = comma less
+- alt keycode 51 = Meta_comma
+-keycode 52 = period greater
+- control keycode 52 = Compose
+- alt keycode 52 = Meta_period
+-keycode 53 = slash question
+- control keycode 53 = Delete
+- alt keycode 53 = Meta_slash
+-keycode 54 = Shift
++ control keycode 50 = equal
++ shiftl control keycode 50 = Control_m
++ control shiftr keycode 50 = Meta_m
++keycode 51 = comma
++ shift keycode 51 = semicolon
++ control keycode 51 = bracketright
++ shiftl control keycode 51 = parenright
++ control shiftr keycode 51 = parenright
++keycode 52 = period
++ shift keycode 52 = colon
++ control keycode 52 = less
++ shiftl control keycode 52 = braceleft
++ control shiftr keycode 52 = braceleft
++keycode 53 = slash
++ shift keycode 53 = question
++ control keycode 53 = Num_Lock
++ shiftl control keycode 53 = Num_Lock
++ control shiftr keycode 53 = Num_Lock
++keycode 54 = AltGr
+ keycode 55 = KP_Multiply
+ keycode 56 = Alt
+-keycode 57 = space space
+- control keycode 57 = nul
+- alt keycode 57 = Meta_space
+-keycode 58 = Caps_Lock
+-keycode 59 = F1 F11 Console_13
+- control keycode 59 = F1
+- alt keycode 59 = Console_1
+- control alt keycode 59 = Console_1
+-keycode 60 = F2 F12 Console_14
+- control keycode 60 = F2
+- alt keycode 60 = Console_2
+- control alt keycode 60 = Console_2
+-keycode 61 = F3 F13 Console_15
+- control keycode 61 = F3
+- alt keycode 61 = Console_3
+- control alt keycode 61 = Console_3
+-keycode 62 = F4 F14 Console_16
+- control keycode 62 = F4
+- alt keycode 62 = Console_4
+- control alt keycode 62 = Console_4
+-keycode 63 = F5 F15 Console_17
+- control keycode 63 = F5
+- alt keycode 63 = Console_5
+- control alt keycode 63 = Console_5
+-keycode 64 = F6 F16 Console_18
+- control keycode 64 = F6
+- alt keycode 64 = Console_6
+- control alt keycode 64 = Console_6
+-keycode 65 = F7 F17 Console_19
+- control keycode 65 = F7
+- alt keycode 65 = Console_7
+- control alt keycode 65 = Console_7
+-keycode 66 = F8 F18 Console_20
+- control keycode 66 = F8
+- alt keycode 66 = Console_8
+- control alt keycode 66 = Console_8
+-keycode 67 = F9 F19 Console_21
+- control keycode 67 = F9
+- alt keycode 67 = Console_9
+- control alt keycode 67 = Console_9
+-keycode 68 = F10 F20 Console_22
+- control keycode 68 = F10
+- alt keycode 68 = Console_10
+- control alt keycode 68 = Console_10
+-keycode 69 = Num_Lock
+- shift keycode 69 = Bare_Num_Lock
+-keycode 70 = Scroll_Lock Show_Memory Show_Registers
+- control keycode 70 = Show_State
+- alt keycode 70 = Scroll_Lock
+-keycode 71 = KP_7
+- alt keycode 71 = Ascii_7
+- altgr keycode 71 = Hex_7
+-keycode 72 = KP_8
+- alt keycode 72 = Ascii_8
+- altgr keycode 72 = Hex_8
+-keycode 73 = KP_9
+- alt keycode 73 = Ascii_9
+- altgr keycode 73 = Hex_9
+-keycode 74 = KP_Subtract
+-keycode 75 = KP_4
+- alt keycode 75 = Ascii_4
+- altgr keycode 75 = Hex_4
+-keycode 76 = KP_5
+- alt keycode 76 = Ascii_5
+- altgr keycode 76 = Hex_5
+-keycode 77 = KP_6
+- alt keycode 77 = Ascii_6
+- altgr keycode 77 = Hex_6
+-keycode 78 = KP_Add
+-keycode 79 = KP_1
+- alt keycode 79 = Ascii_1
+- altgr keycode 79 = Hex_1
+-keycode 80 = KP_2
+- alt keycode 80 = Ascii_2
+- altgr keycode 80 = Hex_2
+-keycode 81 = KP_3
+- alt keycode 81 = Ascii_3
+- altgr keycode 81 = Hex_3
+-keycode 82 = KP_0
+- alt keycode 82 = Ascii_0
+- altgr keycode 82 = Hex_0
+-keycode 83 = KP_Period
+-# altgr control keycode 83 = Boot
+- control alt keycode 83 = Boot
+-keycode 84 = Last_Console
+-keycode 85 =
+-keycode 86 = less greater bar
+- alt keycode 86 = Meta_less
+-keycode 87 = F11 F11 Console_23
+- control keycode 87 = F11
+- alt keycode 87 = Console_11
+- control alt keycode 87 = Console_11
+-keycode 88 = F12 F12 Console_24
+- control keycode 88 = F12
+- alt keycode 88 = Console_12
+- control alt keycode 88 = Console_12
+-keycode 89 =
+-keycode 90 =
+-keycode 91 =
+-keycode 92 =
+-keycode 93 =
+-keycode 94 =
+-keycode 95 =
+-keycode 96 = KP_Enter
+-keycode 97 = Control
+-keycode 98 = KP_Divide
++keycode 57 = space
++ shift keycode 57 = bar
++ control keycode 57 = nul
++ shiftl control keycode 57 = grave
++ control shiftr keycode 57 = grave
++keycode 67 = Control
++keycode 87 = Return
+ keycode 99 = Control_backslash
+ control keycode 99 = Control_backslash
+- alt keycode 99 = Control_backslash
+ keycode 100 = AltGr
+-keycode 101 = Break
+-keycode 102 = Find
+ keycode 103 = Up
+-keycode 104 = Prior
+- shift keycode 104 = Scroll_Backward
+ keycode 105 = Left
+- alt keycode 105 = Decr_Console
+ keycode 106 = Right
+- alt keycode 106 = Incr_Console
+ keycode 107 = Select
+ keycode 108 = Down
+-keycode 109 = Next
+- shift keycode 109 = Scroll_Forward
+-keycode 110 = Insert
+-keycode 111 = Remove
+-# altgr control keycode 111 = Boot
+- control alt keycode 111 = Boot
+-keycode 112 = Macro
+-keycode 113 = F13
+-keycode 114 = F14
+-keycode 115 = Help
+-keycode 116 = Do
+-keycode 117 = F17
+-keycode 118 = KP_MinPlus
+-keycode 119 = Pause
+-keycode 120 =
+-keycode 121 =
+-keycode 122 =
+-keycode 123 =
+-keycode 124 =
+-keycode 125 =
+-keycode 126 =
+-keycode 127 =
++keycode 116 = Escape
+ string F1 = "\033[[A"
+ string F2 = "\033[[B"
+ string F3 = "\033[[C"
+Index: linux-2.6.26/drivers/char/Makefile
+===================================================================
+--- linux-2.6.26.orig/drivers/char/Makefile 2008-07-13 23:51:29.000000000 +0200
++++ linux-2.6.26/drivers/char/Makefile 2008-07-24 21:57:12.744280423 +0200
+@@ -127,7 +127,7 @@
+ # Uncomment if you're changing the keymap and have an appropriate
+ # loadkeys version for the map. By default, we'll use the shipped
+ # versions.
+-# GENERATE_KEYMAP := 1
++ GENERATE_KEYMAP := 1
+
+ ifdef GENERATE_KEYMAP
+
diff --git a/recipes/linux/linux-kexecboot-2.6.26/connectplus-prevent-oops-HACK.patch b/recipes/linux/linux-kexecboot-2.6.26/connectplus-prevent-oops-HACK.patch
new file mode 100644
index 0000000000..b5439c62e7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/connectplus-prevent-oops-HACK.patch
@@ -0,0 +1,17 @@
+Index: linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c
+===================================================================
+--- linux-2.6.21.orig/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:45:39.000000000 +0100
++++ linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:47:30.000000000 +0100
+@@ -2666,6 +2666,12 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if(dev->base_addr == 0)
++ {
++ printk(KERN_DEBUG "%s: IRQ before base_addr set\n", dev->name);
++ return IRQ_HANDLED;
++ }
++
+ prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
+
+ if (local->func->card_present && !local->func->card_present(local)) {
diff --git a/recipes/linux/linux-kexecboot-2.6.26/connectplus-remove-ide-HACK.patch b/recipes/linux/linux-kexecboot-2.6.26/connectplus-remove-ide-HACK.patch
new file mode 100644
index 0000000000..4414b21191
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/connectplus-remove-ide-HACK.patch
@@ -0,0 +1,12 @@
+Index: linux-2.6.13/drivers/ide/legacy/ide-cs.c
+===================================================================
+--- linux-2.6.13.orig/drivers/ide/legacy/ide-cs.c 2005-09-01 22:43:46.000000000 +0100
++++ linux-2.6.13/drivers/ide/legacy/ide-cs.c 2005-09-01 22:45:46.000000000 +0100
+@@ -488,7 +488,6 @@
+ PCMCIA_DEVICE_PROD_ID123("KODAK Picture Card ", "KODAK ", "V100K", 0x94a0d8f3, 0xe4fc3ea0, 0xe5e7eed4),
+ PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
+ PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
+- PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
+ PCMCIA_DEVICE_NULL,
+ };
+ MODULE_DEVICE_TABLE(pcmcia, ide_ids);
diff --git a/recipes/linux/linux-kexecboot-2.6.26/hostap-monitor-mode.patch b/recipes/linux/linux-kexecboot-2.6.26/hostap-monitor-mode.patch
new file mode 100644
index 0000000000..641fd19e50
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/hostap-monitor-mode.patch
@@ -0,0 +1,209 @@
+This is a patch that I've been maintaining for a few years, and I'd
+really like to see it added to the mainstream zaurus kernel so I can
+finally stop distributing my own.
+
+This patch only effects the card while in monitor mode, and does not
+cause any known stability issues.
+
+http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
+
+Rick Farina (Zero_Chaos)
+
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:30:18.000000000 -0400
+@@ -69,6 +69,9 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ goto xmit;
++
+ if (skb->len < ETH_HLEN) {
+ printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb "
+ "(len=%d)\n", dev->name, skb->len);
+@@ -234,6 +237,7 @@
+ memcpy(skb_put(skb, ETH_ALEN), &hdr.addr4, ETH_ALEN);
+ }
+
++xmit:
+ iface->stats.tx_packets++;
+ iface->stats.tx_bytes += skb->len;
+
+@@ -404,8 +408,6 @@
+ }
+
+ if (skb->len < 24) {
+- printk(KERN_DEBUG "%s: hostap_master_start_xmit: short skb "
+- "(len=%d)\n", dev->name, skb->len);
+ ret = 0;
+ iface->stats.tx_dropped++;
+ goto fail;
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_cs.c.orig
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_cs.c.rej
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:30:18.000000000 -0400
+@@ -1005,6 +1005,35 @@
+ return fid;
+ }
+
++static int prism2_monitor_enable(struct net_device *dev)
++{
++ if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE, 5)) {
++ printk(KERN_DEBUG "Port type setting for monitor mode "
++ "failed\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hfa384x_cmd(dev, HFA384X_CMDCODE_TEST | (0x0a << 8),
++ 0, NULL, NULL)) {
++ printk(KERN_DEBUG "Could not enter testmode 0x0a\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
++ HFA384X_WEPFLAGS_PRIVACYINVOKED |
++ HFA384X_WEPFLAGS_HOSTENCRYPT |
++ HFA384X_WEPFLAGS_HOSTDECRYPT)) {
++ printk(KERN_DEBUG "WEP flags setting failed\n");
++ return -EOPNOTSUPP;
++ }
++
++ if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE, 1)) {
++ printk(KERN_DEBUG "Could not set promiscuous mode\n");
++ return -EOPNOTSUPP;
++ }
++
++ return 0;
++}
+
+ static int prism2_reset_port(struct net_device *dev)
+ {
+@@ -1031,6 +1060,10 @@
+ "port\n", dev->name);
+ }
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ /* force mode 0x0a after port 0 reset */
++ return prism2_monitor_enable(dev);
++
+ /* It looks like at least some STA firmware versions reset
+ * fragmentation threshold back to 2346 after enable command. Restore
+ * the configured value, if it differs from this default. */
+@@ -1466,6 +1499,10 @@
+ return 1;
+ }
+
++ if (local->iw_mode == IW_MODE_MONITOR)
++ /* force mode 0x0a after port 0 reset */
++ prism2_monitor_enable(dev);
++
+ local->hw_ready = 1;
+ local->hw_reset_tries = 0;
+ local->hw_resetting = 0;
+@@ -3156,6 +3193,7 @@
+ local->func->hw_config = prism2_hw_config;
+ local->func->hw_reset = prism2_hw_reset;
+ local->func->hw_shutdown = prism2_hw_shutdown;
++ local->func->monitor_enable = prism2_monitor_enable;
+ local->func->reset_port = prism2_reset_port;
+ local->func->schedule_reset = prism2_schedule_reset;
+ #ifdef PRISM2_DOWNLOAD_SUPPORT
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_hw.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:30:18.000000000 -0400
+@@ -1104,33 +1104,7 @@
+
+ printk(KERN_DEBUG "Enabling monitor mode\n");
+ hostap_monitor_set_type(local);
+-
+- if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
+- HFA384X_PORTTYPE_PSEUDO_IBSS)) {
+- printk(KERN_DEBUG "Port type setting for monitor mode "
+- "failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- /* Host decrypt is needed to get the IV and ICV fields;
+- * however, monitor mode seems to remove WEP flag from frame
+- * control field */
+- if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
+- HFA384X_WEPFLAGS_HOSTENCRYPT |
+- HFA384X_WEPFLAGS_HOSTDECRYPT)) {
+- printk(KERN_DEBUG "WEP flags setting failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- if (local->func->reset_port(dev) ||
+- local->func->cmd(dev, HFA384X_CMDCODE_TEST |
+- (HFA384X_TEST_MONITOR << 8),
+- 0, NULL, NULL)) {
+- printk(KERN_DEBUG "Setting monitor mode failed\n");
+- return -EOPNOTSUPP;
+- }
+-
+- return 0;
++ return local->func->reset_port(dev);
+ }
+
+
+@@ -1199,7 +1173,7 @@
+ local->iw_mode = *mode;
+
+ if (local->iw_mode == IW_MODE_MONITOR)
+- hostap_monitor_mode_enable(local);
++ return hostap_monitor_mode_enable(local);
+ else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt &&
+ !local->fw_encrypt_ok) {
+ printk(KERN_DEBUG "%s: defaulting to host-based encryption as "
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:30:18.000000000 -0400
+@@ -331,7 +331,7 @@
+ if (local->iw_mode == IW_MODE_REPEAT)
+ return HFA384X_PORTTYPE_WDS;
+ if (local->iw_mode == IW_MODE_MONITOR)
+- return HFA384X_PORTTYPE_PSEUDO_IBSS;
++ return 5; /*HFA384X_PORTTYPE_PSEUDO_IBSS;*/
+ return HFA384X_PORTTYPE_HOSTAP;
+ }
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_main.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:30:18.000000000 -0400
+@@ -48,6 +48,8 @@
+ { 0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID },
+ /* Samsung MagicLAN SWL-2210P */
+ { 0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID },
++ /* NETGEAR MA311 */
++ { 0x1385, 0x3872, PCI_ANY_ID, PCI_ANY_ID },
+ { 0 }
+ };
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_pci.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:30:18.000000000 -0400
+@@ -101,6 +101,7 @@
+ { 0xc250, 0x0002 } /* EMTAC A2424i */,
+ { 0xd601, 0x0002 } /* Z-Com XI300 */,
+ { 0xd601, 0x0005 } /* Zcomax XI-325H 200mW */,
++ { 0xd601, 0x0010 } /* Zcomax XI-325H 100mW */,
+ { 0, 0}
+ };
+
+Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_plx.c.orig
+diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h
+--- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:26:27.000000000 -0400
++++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:30:18.000000000 -0400
+@@ -575,6 +575,7 @@
+ int (*hw_config)(struct net_device *dev, int initial);
+ void (*hw_reset)(struct net_device *dev);
+ void (*hw_shutdown)(struct net_device *dev, int no_disable);
++ int (*monitor_enable)(struct net_device *dev);
+ int (*reset_port)(struct net_device *dev);
+ void (*schedule_reset)(local_info_t *local);
+ int (*download)(local_info_t *local,
diff --git a/recipes/linux/linux-kexecboot-2.6.26/hrw-hostapcard.patch b/recipes/linux/linux-kexecboot-2.6.26/hrw-hostapcard.patch
new file mode 100644
index 0000000000..67fc5b7c70
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/hrw-hostapcard.patch
@@ -0,0 +1,34 @@
+
+From: Marcin Juszkiewicz <openembedded@haerwu.biz>
+
+Card reported by Ångström user:
+http://bugs.openembedded.net/show_bug.cgi?id=3236
+
+Socket 1:
+ product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", ""
+ manfid: 0x0156, 0x0002
+ function: 6 (network)
+
+Signed-off-by: Marcin Juszkiewicz <openembedded@haerwu.biz>
+Acked-by: Pavel Roskin <proski@gnu.org>
+
+---
+ drivers/net/wireless/hostap/hostap_cs.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.24.orig/drivers/net/wireless/hostap/hostap_cs.c
++++ linux-2.6.24/drivers/net/wireless/hostap/hostap_cs.c
+@@ -892,10 +892,13 @@ static struct pcmcia_device_id hostap_cs
+ 0xa21501a, 0x59868926, 0xc9049a39),
+ PCMCIA_DEVICE_PROD_ID1234(
+ "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
+ "RevA",
+ 0xa5f472c2, 0x9c05598d, 0xc9049a39, 0x57a66194),
++ PCMCIA_DEVICE_PROD_ID123(
++ "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
++ 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
+ PCMCIA_DEVICE_NULL
+ };
+ MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
+
+
diff --git a/recipes/linux/linux-kexecboot-2.6.26/htcuni-acx.patch b/recipes/linux/linux-kexecboot-2.6.26/htcuni-acx.patch
new file mode 100644
index 0000000000..1ccebddc8d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/htcuni-acx.patch
@@ -0,0 +1,33527 @@
+---
+ drivers/net/wireless/Kconfig | 31
+ drivers/net/wireless/Makefile | 2
+ drivers/net/wireless/acx/Kconfig | 113
+ drivers/net/wireless/acx/Makefile | 21
+ drivers/net/wireless/acx/acx.h | 14
+ drivers/net/wireless/acx/acx_config.h | 50
+ drivers/net/wireless/acx/acx_func.h | 710 ++
+ drivers/net/wireless/acx/acx_hw.h | 18
+ drivers/net/wireless/acx/acx_struct.h | 2114 ++++++++
+ drivers/net/wireless/acx/common.c | 7388 ++++++++++++++++++++++++++++
+ drivers/net/wireless/acx/conv.c | 504 +
+ drivers/net/wireless/acx/cs.c | 5703 +++++++++++++++++++++
+ drivers/net/wireless/acx/htcsable_acx.c | 118
+ drivers/net/wireless/acx/htcuniversal_acx.c | 108
+ drivers/net/wireless/acx/hx4700_acx.c | 108
+ drivers/net/wireless/acx/ioctl.c | 2748 ++++++++++
+ drivers/net/wireless/acx/mem.c | 5363 ++++++++++++++++++++
+ drivers/net/wireless/acx/pci.c | 4234 ++++++++++++++++
+ drivers/net/wireless/acx/rx3000_acx.c | 110
+ drivers/net/wireless/acx/setrate.c | 213
+ drivers/net/wireless/acx/usb.c | 1922 +++++++
+ drivers/net/wireless/acx/wlan.c | 424 +
+ drivers/net/wireless/acx/wlan_compat.h | 260
+ drivers/net/wireless/acx/wlan_hdr.h | 497 +
+ drivers/net/wireless/acx/wlan_mgmt.h | 582 ++
+ 25 files changed, 33355 insertions(+)
+
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_config.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_config.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,50 @@
++#define ACX_RELEASE "v0.3.36"
++
++/*
++ * Test out all the channels in reg domain 0x10
++ */
++#define ACX_ALLOW_ALLCHANNELS
++
++/* set to 0 if you don't want any debugging code to be compiled in */
++/* set to 1 if you want some debugging */
++/* set to 2 if you want extensive debug log */
++#define ACX_DEBUG 0
++
++/*
++ * Since we'll be changing channels a lot
++#define ACX_DEFAULT_MSG (L_ASSOC|L_INIT)
++*/
++#define ACX_DEFAULT_MSG (L_ASSOC|L_INIT)
++
++/* assume 32bit I/O width
++ * (16bit is also compatible with Compact Flash) */
++#define ACX_IO_WIDTH 32
++
++/* Set this to 1 if you want monitor mode to use
++ * phy header. Currently it is not useful anyway since we
++ * don't know what useful info (if any) is in phy header.
++ * If you want faster/smaller code, say 0 here */
++#define WANT_PHY_HDR 0
++
++/* whether to do Tx descriptor cleanup in softirq (i.e. not in IRQ
++ * handler) or not. Note that doing it later does slightly increase
++ * system load, so still do that stuff in the IRQ handler for now,
++ * even if that probably means worse latency */
++#define TX_CLEANUP_IN_SOFTIRQ 0
++
++/* if you want very experimental 802.11 power save mode features */
++#define POWER_SAVE_80211 0
++
++/* if you want very early packet fragmentation bits and pieces */
++#define ACX_FRAGMENTATION 0
++
++/* Locking: */
++/* very talkative */
++/* #define PARANOID_LOCKING 1 */
++/* normal (use when bug-free) */
++#define DO_LOCKING 1
++/* else locking is disabled! */
++
++/* 0 - normal mode */
++/* 1 - development/debug: probe for IEs on modprobe */
++#define CMD_DISCOVERY 0
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_func.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_func.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,710 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++
++/***********************************************************************
++** LOGGING
++**
++** - Avoid SHOUTING needlessly. Avoid excessive verbosity.
++** Gradually remove messages which are old debugging aids.
++**
++** - Use printk() for messages which are to be always logged.
++** Supply either 'acx:' or '<devname>:' prefix so that user
++** can figure out who's speaking among other kernel chatter.
++** acx: is for general issues (e.g. "acx: no firmware image!")
++** while <devname>: is related to a particular device
++** (think about multi-card setup). Double check that message
++** is not confusing to the average user.
++**
++** - use printk KERN_xxx level only if message is not a WARNING
++** but is INFO, ERR etc.
++**
++** - Use printk_ratelimited() for messages which may flood
++** (e.g. "rx DUP pkt!").
++**
++** - Use log() for messages which may be omitted (and they
++** _will_ be omitted in non-debug builds). Note that
++** message levels may be disabled at compile-time selectively,
++** thus select them wisely. Example: L_DEBUG is the lowest
++** (most likely to be compiled out) -> use for less important stuff.
++**
++** - Do not print important stuff with log(), or else people
++** will never build non-debug driver.
++**
++** Style:
++** hex: capital letters, zero filled (e.g. 0x02AC)
++** str: dont start from capitals, no trailing periods ("tx: queue is stopped")
++*/
++#if ACX_DEBUG > 1
++
++void log_fn_enter(const char *funcname);
++void log_fn_exit(const char *funcname);
++void log_fn_exit_v(const char *funcname, int v);
++
++#define FN_ENTER \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_enter(__func__); \
++ } \
++ } while (0)
++
++#define FN_EXIT1(v) \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_exit_v(__func__, v); \
++ } \
++ } while (0)
++#define FN_EXIT0 \
++ do { \
++ if (unlikely(acx_debug & L_FUNC)) { \
++ log_fn_exit(__func__); \
++ } \
++ } while (0)
++
++#else
++
++#define FN_ENTER
++#define FN_EXIT1(v)
++#define FN_EXIT0
++
++#endif /* ACX_DEBUG > 1 */
++
++
++#if ACX_DEBUG
++
++#define log(chan, args...) \
++ do { \
++ if (acx_debug & (chan)) \
++ printk(KERN_DEBUG args); \
++ } while (0)
++#define printk_ratelimited(args...) printk(args)
++
++#else /* Non-debug build: */
++
++#define log(chan, args...)
++/* Standard way of log flood prevention */
++#define printk_ratelimited(args...) \
++do { \
++ if (printk_ratelimit()) \
++ printk(args); \
++} while (0)
++
++#endif /* ACX_DEBUG */
++
++void acx_print_mac(const char *head, const u8 *mac, const char *tail);
++
++/* Optimized out to nothing in non-debug build */
++static inline void
++acxlog_mac(int level, const char *head, const u8 *mac, const char *tail)
++{
++ if (acx_debug & level) {
++ acx_print_mac(head, mac, tail);
++ }
++}
++
++
++/***********************************************************************
++** MAC address helpers
++*/
++static inline void
++MAC_COPY(u8 *mac, const u8 *src)
++{
++ *(u32*)mac = *(u32*)src;
++ ((u16*)mac)[2] = ((u16*)src)[2];
++ /* kernel's memcpy will do the same: memcpy(dst, src, ETH_ALEN); */
++}
++
++static inline void
++MAC_FILL(u8 *mac, u8 val)
++{
++ memset(mac, val, ETH_ALEN);
++}
++
++static inline void
++MAC_BCAST(u8 *mac)
++{
++ ((u16*)mac)[2] = *(u32*)mac = -1;
++}
++
++static inline void
++MAC_ZERO(u8 *mac)
++{
++ ((u16*)mac)[2] = *(u32*)mac = 0;
++}
++
++static inline int
++mac_is_equal(const u8 *a, const u8 *b)
++{
++ /* can't beat this */
++ return memcmp(a, b, ETH_ALEN) == 0;
++}
++
++static inline int
++mac_is_bcast(const u8 *mac)
++{
++ /* AND together 4 first bytes with sign-extended 2 last bytes
++ ** Only bcast address gives 0xffffffff. +1 gives 0 */
++ return ( *(s32*)mac & ((s16*)mac)[2] ) + 1 == 0;
++}
++
++static inline int
++mac_is_zero(const u8 *mac)
++{
++ return ( *(u32*)mac | ((u16*)mac)[2] ) == 0;
++}
++
++static inline int
++mac_is_directed(const u8 *mac)
++{
++ return (mac[0] & 1)==0;
++}
++
++static inline int
++mac_is_mcast(const u8 *mac)
++{
++ return (mac[0] & 1) && !mac_is_bcast(mac);
++}
++
++#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X"
++#define MAC(bytevector) \
++ ((unsigned char *)bytevector)[0], \
++ ((unsigned char *)bytevector)[1], \
++ ((unsigned char *)bytevector)[2], \
++ ((unsigned char *)bytevector)[3], \
++ ((unsigned char *)bytevector)[4], \
++ ((unsigned char *)bytevector)[5]
++
++
++/***********************************************************************
++** Random helpers
++*/
++#define TO_STRING(x) #x
++#define STRING(x) TO_STRING(x)
++
++#define CLEAR_BIT(val, mask) ((val) &= ~(mask))
++#define SET_BIT(val, mask) ((val) |= (mask))
++
++/* undefined if v==0 */
++static inline unsigned int
++lowest_bit(u16 v)
++{
++ unsigned int n = 0;
++ while (!(v & 0xf)) { v>>=4; n+=4; }
++ while (!(v & 1)) { v>>=1; n++; }
++ return n;
++}
++
++/* undefined if v==0 */
++static inline unsigned int
++highest_bit(u16 v)
++{
++ unsigned int n = 0;
++ while (v>0xf) { v>>=4; n+=4; }
++ while (v>1) { v>>=1; n++; }
++ return n;
++}
++
++/* undefined if v==0 */
++static inline int
++has_only_one_bit(u16 v)
++{
++ return ((v-1) ^ v) >= v;
++}
++
++
++static inline int
++is_hidden_essid(char *essid)
++{
++ return (('\0' == essid[0]) ||
++ ((' ' == essid[0]) && ('\0' == essid[1])));
++}
++
++/***********************************************************************
++** LOCKING
++** We have adev->sem and adev->lock.
++**
++** We employ following naming convention in order to get locking right:
++**
++** acx_e_xxxx - external entry points called from process context.
++** It is okay to sleep. adev->sem is to be taken on entry.
++** acx_i_xxxx - external entry points possibly called from atomic context.
++** Sleeping is not allowed (and thus down(sem) is not legal!)
++** acx_s_xxxx - potentially sleeping functions. Do not ever call under lock!
++** acx_l_xxxx - functions which expect lock to be already taken.
++** rest - non-sleeping functions which do not require locking
++** but may be run under lock
++**
++** A small number of local helpers do not have acx_[eisl]_ prefix.
++** They are always close to caller and are to be reviewed locally.
++**
++** Theory of operation:
++**
++** All process-context entry points (_e_ functions) take sem
++** immediately. IRQ handler and other 'atomic-context' entry points
++** (_i_ functions) take lock immediately on entry, but dont take sem
++** because that might sleep.
++**
++** Thus *all* code is either protected by sem or lock, or both.
++**
++** Code which must not run concurrently with IRQ takes lock.
++** Such code is marked with _l_.
++**
++** This results in the following rules of thumb useful in code review:
++**
++** + If a function calls _s_ fn, it must be an _s_ itself.
++** + You can call _l_ fn only (a) from another _l_ fn
++** or (b) from _s_, _e_ or _i_ fn by taking lock, calling _l_,
++** and dropping lock.
++** + All IRQ code runs under lock.
++** + Any _s_ fn is running under sem.
++** + Code under sem can race only with IRQ code.
++** + Code under sem+lock cannot race with anything.
++*/
++
++/* These functions *must* be inline or they will break horribly on SPARC, due
++ * to its weird semantics for save/restore flags */
++
++#if defined(PARANOID_LOCKING) /* Lock debugging */
++
++void acx_lock_debug(acx_device_t *adev, const char* where);
++void acx_unlock_debug(acx_device_t *adev, const char* where);
++void acx_down_debug(acx_device_t *adev, const char* where);
++void acx_up_debug(acx_device_t *adev, const char* where);
++void acx_lock_unhold(void);
++void acx_sem_unhold(void);
++
++static inline void
++acx_lock_helper(acx_device_t *adev, unsigned long *fp, const char* where)
++{
++ acx_lock_debug(adev, where);
++ spin_lock_irqsave(&adev->lock, *fp);
++}
++static inline void
++acx_unlock_helper(acx_device_t *adev, unsigned long *fp, const char* where)
++{
++ acx_unlock_debug(adev, where);
++ spin_unlock_irqrestore(&adev->lock, *fp);
++}
++static inline void
++acx_down_helper(acx_device_t *adev, const char* where)
++{
++ acx_down_debug(adev, where);
++}
++static inline void
++acx_up_helper(acx_device_t *adev, const char* where)
++{
++ acx_up_debug(adev, where);
++}
++#define acx_lock(adev, flags) acx_lock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
++#define acx_unlock(adev, flags) acx_unlock_helper(adev, &(flags), __FILE__ ":" STRING(__LINE__))
++#define acx_sem_lock(adev) acx_down_helper(adev, __FILE__ ":" STRING(__LINE__))
++#define acx_sem_unlock(adev) acx_up_helper(adev, __FILE__ ":" STRING(__LINE__))
++
++#elif defined(DO_LOCKING)
++
++#define acx_lock(adev, flags) spin_lock_irqsave(&adev->lock, flags)
++#define acx_unlock(adev, flags) spin_unlock_irqrestore(&adev->lock, flags)
++#define acx_sem_lock(adev) down(&adev->sem)
++#define acx_sem_unlock(adev) up(&adev->sem)
++#define acx_lock_unhold() ((void)0)
++#define acx_sem_unhold() ((void)0)
++
++#else /* no locking! :( */
++
++#define acx_lock(adev, flags) ((void)0)
++#define acx_unlock(adev, flags) ((void)0)
++#define acx_sem_lock(adev) ((void)0)
++#define acx_sem_unlock(adev) ((void)0)
++#define acx_lock_unhold() ((void)0)
++#define acx_sem_unhold() ((void)0)
++
++#endif
++
++
++/***********************************************************************
++*/
++
++/* Can race with rx path (which is not protected by sem):
++** rx -> process_[re]assocresp() -> set_status(ASSOCIATED) -> wake_queue()
++** Can race with tx_complete IRQ:
++** IRQ -> acxpci_l_clean_txdesc -> acx_wake_queue
++** Review carefully all callsites */
++static inline void
++acx_stop_queue(struct net_device *ndev, const char *msg)
++{
++ if (netif_queue_stopped(ndev))
++ return;
++
++ netif_stop_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: stop queue %s\n", msg);
++}
++
++static inline int
++acx_queue_stopped(struct net_device *ndev)
++{
++ return netif_queue_stopped(ndev);
++}
++
++/*
++static inline void
++acx_start_queue(struct net_device *ndev, const char *msg)
++{
++ netif_start_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: start queue %s\n", msg);
++}
++*/
++
++static inline void
++acx_wake_queue(struct net_device *ndev, const char *msg)
++{
++ netif_wake_queue(ndev);
++ if (msg)
++ log(L_BUFT, "tx: wake queue %s\n", msg);
++}
++
++static inline void
++acx_carrier_off(struct net_device *ndev, const char *msg)
++{
++ netif_carrier_off(ndev);
++ if (msg)
++ log(L_BUFT, "tx: carrier off %s\n", msg);
++}
++
++static inline void
++acx_carrier_on(struct net_device *ndev, const char *msg)
++{
++ netif_carrier_on(ndev);
++ if (msg)
++ log(L_BUFT, "tx: carrier on %s\n", msg);
++}
++
++/* This function does not need locking UNLESS you call it
++** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
++** wake queue. This can race with stop_queue elsewhere. */
++void acx_set_status(acx_device_t *adev, u16 status);
++
++
++/***********************************************************************
++** Communication with firmware
++*/
++#define CMD_TIMEOUT_MS(n) (n)
++#define ACX_CMD_TIMEOUT_DEFAULT CMD_TIMEOUT_MS(50)
++
++#if ACX_DEBUG
++
++/* We want to log cmd names */
++int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++int acxmem_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
++static inline int
++acx_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++ return acxusb_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
++}
++#define acx_s_issue_cmd(adev,cmd,param,len) \
++ acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,ACX_CMD_TIMEOUT_DEFAULT,#cmd)
++#define acx_s_issue_cmd_timeo(adev,cmd,param,len,timeo) \
++ acx_s_issue_cmd_timeo_debug(adev,cmd,param,len,timeo,#cmd)
++int acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* str);
++#define acx_s_configure(adev,pdr,type) \
++ acx_s_configure_debug(adev,pdr,type,#type)
++int acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type, const char* str);
++#define acx_s_interrogate(adev,pdr,type) \
++ acx_s_interrogate_debug(adev,pdr,type,#type)
++
++#else
++
++int acxpci_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++int acxmem_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++int acxusb_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
++static inline int
++acx_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++ return acxusb_s_issue_cmd_timeo(adev, cmd, param, len, timeout);
++}
++static inline int
++acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++ if (IS_PCI(adev))
++ return acxpci_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++ return acxusb_s_issue_cmd_timeo(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT);
++}
++int acx_s_configure(acx_device_t *adev, void *pdr, int type);
++int acx_s_interrogate(acx_device_t *adev, void *pdr, int type);
++
++#endif
++
++void acx_s_cmd_start_scan(acx_device_t *adev);
++
++
++/***********************************************************************
++** Ioctls
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++int
++acx100pci_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra);
++
++
++/***********************************************************************
++** /proc
++*/
++#ifdef CONFIG_PROC_FS
++int acx_proc_register_entries(const struct net_device *ndev);
++int acx_proc_unregister_entries(const struct net_device *ndev);
++#else
++static inline int
++acx_proc_register_entries(const struct net_device *ndev) { return OK; }
++static inline int
++acx_proc_unregister_entries(const struct net_device *ndev) { return OK; }
++#endif
++
++
++/***********************************************************************
++*/
++firmware_image_t *acx_s_read_fw(struct device *dev, const char *file, u32 *size);
++int acxpci_s_upload_radio(acx_device_t *adev);
++int acxmem_s_upload_radio(acx_device_t *adev);
++
++
++/***********************************************************************
++** Unsorted yet :)
++*/
++int acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++int acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++int acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
++static inline int
++acx_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_read_phy_reg(adev, reg, charbuf);
++ if (IS_PCI(adev))
++ return acxpci_s_read_phy_reg(adev, reg, charbuf);
++ return acxusb_s_read_phy_reg(adev, reg, charbuf);
++}
++
++int acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++int acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++int acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
++static inline int
++acx_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ if (IS_MEM(adev))
++ return acxmem_s_write_phy_reg(adev, reg, value);
++ if (IS_PCI(adev))
++ return acxpci_s_write_phy_reg(adev, reg, value);
++ return acxusb_s_write_phy_reg(adev, reg, value);
++}
++
++tx_t* acxpci_l_alloc_tx(acx_device_t *adev);
++tx_t* acxmem_l_alloc_tx(acx_device_t *adev);
++tx_t* acxusb_l_alloc_tx(acx_device_t *adev);
++static inline tx_t*
++acx_l_alloc_tx(acx_device_t *adev)
++{
++ if (IS_MEM(adev))
++ return acxmem_l_alloc_tx(adev);
++ if (IS_PCI(adev))
++ return acxpci_l_alloc_tx(adev);
++ return acxusb_l_alloc_tx(adev);
++}
++
++void acxusb_l_dealloc_tx(tx_t *tx_opaque);
++void acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque);
++static inline void
++acx_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++#ifdef ACX_MEM
++ acxmem_l_dealloc_tx (adev, tx_opaque);
++#else
++ if (IS_USB(adev))
++ acxusb_l_dealloc_tx(tx_opaque);
++#endif
++}
++
++void* acxpci_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++void* acxmem_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++void* acxusb_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
++static inline void*
++acx_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque)
++{
++#if defined (ACX_MEM)
++ return acxmem_l_get_txbuf(adev, tx_opaque);
++#else
++ if (IS_PCI(adev))
++ return acxpci_l_get_txbuf(adev, tx_opaque);
++ return acxusb_l_get_txbuf(adev, tx_opaque);
++#endif
++}
++
++void acxpci_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++void acxmem_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++void acxusb_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
++static inline void
++acx_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len)
++{
++#if defined (ACX_MEM)
++ acxmem_l_tx_data(adev, tx_opaque, len);
++#else
++ if (IS_PCI(adev))
++ acxpci_l_tx_data(adev, tx_opaque, len);
++ else
++ acxusb_l_tx_data(adev, tx_opaque, len);
++#endif
++}
++
++static inline wlan_hdr_t*
++acx_get_wlan_hdr(acx_device_t *adev, const rxbuffer_t *rxbuf)
++{
++ return (wlan_hdr_t*)((u8*)&rxbuf->hdr_a3 + adev->phy_header_len);
++}
++
++void acxpci_l_power_led(acx_device_t *adev, int enable);
++int acxpci_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf);
++unsigned int acxpci_l_clean_txdesc(acx_device_t *adev);
++void acxpci_l_clean_txdesc_emergency(acx_device_t *adev);
++int acxpci_s_create_hostdesc_queues(acx_device_t *adev);
++void acxpci_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start);
++void acxpci_free_desc_queues(acx_device_t *adev);
++char* acxpci_s_proc_diag_output(char *p, acx_device_t *adev);
++int acxpci_proc_eeprom_output(char *p, acx_device_t *adev);
++void acxpci_set_interrupt_mask(acx_device_t *adev);
++int acx100pci_s_set_tx_level(acx_device_t *adev, u8 level_dbm);
++
++void acxmem_l_power_led(acx_device_t *adev, int enable);
++int acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf);
++unsigned int acxmem_l_clean_txdesc(acx_device_t *adev);
++void acxmem_l_clean_txdesc_emergency(acx_device_t *adev);
++int acxmem_s_create_hostdesc_queues(acx_device_t *adev);
++void acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start);
++void acxmem_free_desc_queues(acx_device_t *adev);
++char* acxmem_s_proc_diag_output(char *p, acx_device_t *adev);
++int acxmem_proc_eeprom_output(char *p, acx_device_t *adev);
++void acxmem_set_interrupt_mask(acx_device_t *adev);
++int acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm);
++
++void acx_s_msleep(int ms);
++int acx_s_init_mac(acx_device_t *adev);
++void acx_set_reg_domain(acx_device_t *adev, unsigned char reg_dom_id);
++void acx_set_timer(acx_device_t *adev, int timeout_us);
++void acx_update_capabilities(acx_device_t *adev);
++void acx_s_start(acx_device_t *adev);
++
++void acx_s_update_card_settings(acx_device_t *adev);
++void acx_s_parse_configoption(acx_device_t *adev, const acx111_ie_configoption_t *pcfg);
++void acx_l_update_ratevector(acx_device_t *adev);
++
++void acx_init_task_scheduler(acx_device_t *adev);
++void acx_schedule_task(acx_device_t *adev, unsigned int set_flag);
++
++int acx_e_ioctl_old(struct net_device *ndev, struct ifreq *ifr, int cmd);
++
++client_t *acx_l_sta_list_get(acx_device_t *adev, const u8 *address);
++void acx_l_sta_list_del(acx_device_t *adev, client_t *clt);
++
++int acx_l_transmit_disassoc(acx_device_t *adev, client_t *clt);
++void acx_i_timer(unsigned long a);
++int acx_s_complete_scan(acx_device_t *adev);
++
++struct sk_buff *acx_rxbuf_to_ether(acx_device_t *adev, rxbuffer_t *rxbuf);
++int acx_ether_to_txbuf(acx_device_t *adev, void *txbuf, const struct sk_buff *skb);
++
++u8 acx_signal_determine_quality(u8 signal, u8 noise);
++
++void acx_l_process_rxbuf(acx_device_t *adev, rxbuffer_t *rxbuf);
++void acx_l_handle_txrate_auto(acx_device_t *adev, struct client *txc,
++ u16 intended_rate, u8 rate100, u16 rate111, u8 error,
++ int pkts_to_ignore);
++
++void acx_dump_bytes(const void *, int);
++void acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr);
++
++u8 acx_rate111to100(u16);
++
++void acx_s_set_defaults(acx_device_t *adev);
++
++#if !ACX_DEBUG
++static inline const char* acx_get_packet_type_string(u16 fc) { return ""; }
++#else
++const char* acx_get_packet_type_string(u16 fc);
++#endif
++const char* acx_cmd_status_str(unsigned int state);
++
++int acx_i_start_xmit(struct sk_buff *skb, struct net_device *ndev);
++
++void great_inquisitor(acx_device_t *adev);
++
++void acx_s_get_firmware_version(acx_device_t *adev);
++void acx_display_hardware_details(acx_device_t *adev);
++
++int acx_e_change_mtu(struct net_device *ndev, int mtu);
++struct net_device_stats* acx_e_get_stats(struct net_device *ndev);
++struct iw_statistics* acx_e_get_wireless_stats(struct net_device *ndev);
++
++#ifdef ACX_MEM
++int __init acxmem_e_init_module(void);
++void __exit acxmem_e_cleanup_module(void);
++void acxmem_e_release(struct device *dev);
++#else
++int __init acxpci_e_init_module(void);
++int __init acxusb_e_init_module(void);
++void __exit acxpci_e_cleanup_module(void);
++void __exit acxusb_e_cleanup_module(void);
++#endif
++int __init acx_cs_init(void);
++void __exit acx_cs_cleanup(void);
+Index: linux-2.6.23/drivers/net/wireless/acx/acx.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,14 @@
++#if defined(CONFIG_ACX_MEM) && !defined(ACX_MEM)
++#define ACX_MEM
++#endif
++
++#if defined(CONFIG_ACX_CS) && !defined(ACX_MEM)
++#define ACX_MEM
++#endif
++
++#include "acx_config.h"
++#include "wlan_compat.h"
++#include "wlan_hdr.h"
++#include "wlan_mgmt.h"
++#include "acx_struct.h"
++#include "acx_func.h"
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_hw.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_hw.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,18 @@
++/*
++ * Interface for ACX slave memory driver
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * GPL
++ *
++ */
++
++#ifndef _ACX_HW_H
++#define _ACX_HW_H
++
++struct acx_hardware_data {
++ int (*start_hw)( void );
++ int (*stop_hw)( void );
++};
++
++#endif /* _ACX_HW_H */
+Index: linux-2.6.23/drivers/net/wireless/acx/acx_struct.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/acx_struct.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,2114 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** Forward declarations of types
++*/
++typedef struct tx tx_t;
++typedef struct acx_device acx_device_t;
++typedef struct client client_t;
++typedef struct rxdesc rxdesc_t;
++typedef struct txdesc txdesc_t;
++typedef struct rxhostdesc rxhostdesc_t;
++typedef struct txhostdesc txhostdesc_t;
++
++
++/***********************************************************************
++** Debug / log functionality
++*/
++enum {
++ L_LOCK = (ACX_DEBUG>1)*0x0001, /* locking debug log */
++ L_INIT = (ACX_DEBUG>0)*0x0002, /* special card initialization logging */
++ L_IRQ = (ACX_DEBUG>0)*0x0004, /* interrupt stuff */
++ L_ASSOC = (ACX_DEBUG>0)*0x0008, /* assocation (network join) and station log */
++ L_FUNC = (ACX_DEBUG>1)*0x0020, /* logging of function enter / leave */
++ L_XFER = (ACX_DEBUG>1)*0x0080, /* logging of transfers and mgmt */
++ L_DATA = (ACX_DEBUG>1)*0x0100, /* logging of transfer data */
++ L_DEBUG = (ACX_DEBUG>1)*0x0200, /* log of debug info */
++ L_IOCTL = (ACX_DEBUG>0)*0x0400, /* log ioctl calls */
++ L_CTL = (ACX_DEBUG>1)*0x0800, /* log of low-level ctl commands */
++ L_BUFR = (ACX_DEBUG>1)*0x1000, /* debug rx buffer mgmt (ring buffer etc.) */
++ L_XFER_BEACON = (ACX_DEBUG>1)*0x2000, /* also log beacon packets */
++ L_BUFT = (ACX_DEBUG>1)*0x4000, /* debug tx buffer mgmt (ring buffer etc.) */
++ L_USBRXTX = (ACX_DEBUG>0)*0x8000, /* debug USB rx/tx operations */
++ L_BUF = L_BUFR + L_BUFT,
++ L_ANY = 0xffff
++};
++
++#if ACX_DEBUG
++extern unsigned int acx_debug;
++#else
++enum { acx_debug = 0 };
++#endif
++
++
++/***********************************************************************
++** Random helpers
++*/
++#define ACX_PACKED __attribute__ ((packed))
++
++#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0]))
++
++/* Use worker_queues for 2.5/2.6 kernels and queue tasks for 2.4 kernels
++ (used for the 'bottom half' of the interrupt routine) */
++
++#include <linux/workqueue.h>
++#define USE_WORKER_TASKS
++#define WORK_STRUCT struct work_struct
++#define SCHEDULE_WORK schedule_work
++#define FLUSH_SCHEDULED_WORK flush_scheduled_work
++
++
++/***********************************************************************
++** Constants
++*/
++#define OK 0
++#define NOT_OK 1
++
++/* The supported chip models */
++#define CHIPTYPE_ACX100 1
++#define CHIPTYPE_ACX111 2
++
++#define IS_ACX100(adev) ((adev)->chip_type == CHIPTYPE_ACX100)
++#define IS_ACX111(adev) ((adev)->chip_type == CHIPTYPE_ACX111)
++
++/* Supported interfaces */
++#define DEVTYPE_PCI 0
++#define DEVTYPE_USB 1
++#define DEVTYPE_MEM 2
++
++#if !defined(CONFIG_ACX_PCI) && !defined(CONFIG_ACX_USB) && !defined(CONFIG_ACX_MEM) && !defined(CONFIG_ACX_CS)
++#error Driver must include PCI, USB, PCMCIA or memory mapped interface support. You selected none of them.
++#endif
++
++#if defined(CONFIG_ACX_PCI)
++ #if !defined(CONFIG_ACX_USB)
++ #define IS_PCI(adev) 1
++ #else
++ #define IS_PCI(adev) ((adev)->dev_type == DEVTYPE_PCI)
++ #endif
++#else
++ #define IS_PCI(adev) 0
++#endif
++
++#if defined(CONFIG_ACX_USB)
++ #if !defined(CONFIG_ACX_PCI)
++ #define IS_USB(adev) 1
++ #else
++ #define IS_USB(adev) ((adev)->dev_type == DEVTYPE_USB)
++ #endif
++#else
++ #define IS_USB(adev) 0
++#endif
++
++#if defined(CONFIG_ACX_MEM) || defined(CONFIG_ACX_CS)
++ #define IS_MEM(adev) 1
++#else
++ #define IS_MEM(adev) 0
++#endif
++
++/* Driver defaults */
++#define DEFAULT_DTIM_INTERVAL 10
++/* used to be 2048, but FreeBSD driver changed it to 4096 to work properly
++** in noisy wlans */
++#define DEFAULT_MSDU_LIFETIME 4096
++#define DEFAULT_RTS_THRESHOLD 2312 /* max. size: disable RTS mechanism */
++#define DEFAULT_BEACON_INTERVAL 100
++
++#define ACX100_BAP_DATALEN_MAX 4096
++#define ACX100_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
++#define ACX100_RIDDATA_MAXLEN ACX100_RID_GUESSING_MAXLEN
++
++/* Support Constants */
++/* Radio type names, found in Win98 driver's TIACXLN.INF */
++#define RADIO_MAXIM_0D 0x0d
++#define RADIO_RFMD_11 0x11
++#define RADIO_RALINK_15 0x15
++/* used in ACX111 cards (WG311v2, WL-121, ...): */
++#define RADIO_RADIA_16 0x16
++/* most likely *sometimes* used in ACX111 cards: */
++#define RADIO_UNKNOWN_17 0x17
++/* FwRad19.bin was found in a Safecom driver; must be an ACX111 radio: */
++#define RADIO_UNKNOWN_19 0x19
++#define RADIO_UNKNOWN_1B 0x1b /* radio in SafeCom SWLUT-54125 USB adapter; entirely unknown!! */
++
++/* Controller Commands */
++/* can be found in table cmdTable in firmware "Rev. 1.5.0" (FW150) */
++#define ACX1xx_CMD_RESET 0x00
++#define ACX1xx_CMD_INTERROGATE 0x01
++#define ACX1xx_CMD_CONFIGURE 0x02
++#define ACX1xx_CMD_ENABLE_RX 0x03
++#define ACX1xx_CMD_ENABLE_TX 0x04
++#define ACX1xx_CMD_DISABLE_RX 0x05
++#define ACX1xx_CMD_DISABLE_TX 0x06
++#define ACX1xx_CMD_FLUSH_QUEUE 0x07
++#define ACX1xx_CMD_SCAN 0x08
++#define ACX1xx_CMD_STOP_SCAN 0x09
++#define ACX1xx_CMD_CONFIG_TIM 0x0a
++#define ACX1xx_CMD_JOIN 0x0b
++#define ACX1xx_CMD_WEP_MGMT 0x0c
++#ifdef OLD_FIRMWARE_VERSIONS
++#define ACX100_CMD_HALT 0x0e /* mapped to unknownCMD in FW150 */
++#else
++#define ACX1xx_CMD_MEM_READ 0x0d
++#define ACX1xx_CMD_MEM_WRITE 0x0e
++#endif
++#define ACX1xx_CMD_SLEEP 0x0f
++#define ACX1xx_CMD_WAKE 0x10
++#define ACX1xx_CMD_UNKNOWN_11 0x11 /* mapped to unknownCMD in FW150 */
++#define ACX100_CMD_INIT_MEMORY 0x12
++#define ACX1FF_CMD_DISABLE_RADIO 0x12 /* new firmware? TNETW1450? */
++#define ACX1xx_CMD_CONFIG_BEACON 0x13
++#define ACX1xx_CMD_CONFIG_PROBE_RESPONSE 0x14
++#define ACX1xx_CMD_CONFIG_NULL_DATA 0x15
++#define ACX1xx_CMD_CONFIG_PROBE_REQUEST 0x16
++#define ACX1xx_CMD_FCC_TEST 0x17
++#define ACX1xx_CMD_RADIOINIT 0x18
++#define ACX111_CMD_RADIOCALIB 0x19
++#define ACX1FF_CMD_NOISE_HISTOGRAM 0x1c /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_RX_RESET 0x1d /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_LNA_CONTROL 0x20 /* new firmware? TNETW1450? */
++#define ACX1FF_CMD_CONTROL_DBG_TRACE 0x21 /* new firmware? TNETW1450? */
++
++/* 'After Interrupt' Commands */
++#define ACX_AFTER_IRQ_CMD_STOP_SCAN 0x01
++#define ACX_AFTER_IRQ_CMD_ASSOCIATE 0x02
++#define ACX_AFTER_IRQ_CMD_RADIO_RECALIB 0x04
++#define ACX_AFTER_IRQ_UPDATE_CARD_CFG 0x08
++#define ACX_AFTER_IRQ_TX_CLEANUP 0x10
++#define ACX_AFTER_IRQ_COMPLETE_SCAN 0x20
++#define ACX_AFTER_IRQ_RESTART_SCAN 0x40
++
++/***********************************************************************
++** Tx/Rx buffer sizes and watermarks
++**
++** This will alloc and use DMAable buffers of
++** WLAN_A4FR_MAXLEN_WEP_FCS * (RX_CNT + TX_CNT) bytes
++** RX/TX_CNT=32 -> ~150k DMA buffers
++** RX/TX_CNT=16 -> ~75k DMA buffers
++**
++** 2005-10-10: reduced memory usage by lowering both to 16
++*/
++#define RX_CNT 16
++#define TX_CNT 16
++
++/* we clean up txdescs when we have N free txdesc: */
++#define TX_CLEAN_BACKLOG (TX_CNT/4)
++#define TX_START_CLEAN (TX_CNT - TX_CLEAN_BACKLOG)
++#define TX_EMERG_CLEAN 2
++/* we stop queue if we have < N free txbufs: */
++#define TX_STOP_QUEUE 3
++/* we start queue if we have >= N free txbufs: */
++#define TX_START_QUEUE 5
++
++/***********************************************************************
++** Interrogate/Configure cmd constants
++**
++** NB: length includes JUST the data part of the IE
++** (does not include size of the (type,len) pair)
++**
++** TODO: seems that acx100, acx100usb, acx111 have some differences,
++** fix code with regard to this!
++*/
++
++#define DEF_IE(name, val, len) enum { ACX##name=val, ACX##name##_LEN=len }
++
++/* Information Elements: Network Parameters, Static Configuration Entities */
++/* these are handled by real_cfgtable in firmware "Rev 1.5.0" (FW150) */
++DEF_IE(1xx_IE_UNKNOWN_00 ,0x0000, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(100_IE_ACX_TIMER ,0x0001, 0x10);
++DEF_IE(1xx_IE_POWER_MGMT ,0x0002, 0x06); /* TNETW1450: length 0x18!! */
++DEF_IE(1xx_IE_QUEUE_CONFIG ,0x0003, 0x1c);
++DEF_IE(100_IE_BLOCK_SIZE ,0x0004, 0x02);
++DEF_IE(1FF_IE_SLOT_TIME ,0x0004, 0x08); /* later firmware versions only? */
++DEF_IE(1xx_IE_MEMORY_CONFIG_OPTIONS ,0x0005, 0x14);
++DEF_IE(1FF_IE_QUEUE_HEAD ,0x0005, 0x14 /* FIXME: length? */);
++DEF_IE(1xx_IE_RATE_FALLBACK ,0x0006, 0x01); /* TNETW1450: length 2 */
++DEF_IE(100_IE_WEP_OPTIONS ,0x0007, 0x03);
++DEF_IE(111_IE_RADIO_BAND ,0x0007, -1);
++DEF_IE(1FF_IE_TIMING_CFG ,0x0007, -1); /* later firmware versions; TNETW1450 only? */
++DEF_IE(100_IE_SSID ,0x0008, 0x20); /* huh? */
++DEF_IE(1xx_IE_MEMORY_MAP ,0x0008, 0x28); /* huh? TNETW1450 has length 0x40!! */
++DEF_IE(1xx_IE_SCAN_STATUS ,0x0009, 0x04); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_ASSOC_ID ,0x000a, 0x02);
++DEF_IE(1xx_IE_UNKNOWN_0B ,0x000b, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_TX_POWER_LEVEL_TABLE ,0x000b, 0x18); /* later firmware versions; TNETW1450 only? */
++DEF_IE(100_IE_UNKNOWN_0C ,0x000c, -1); /* very small implementation in FW150! */
++/* ACX100 has an equivalent struct in the cmd mailbox directly after reset.
++ * 0x14c seems extremely large, will trash stack on failure (memset!)
++ * in case of small input struct --> OOPS! */
++DEF_IE(111_IE_CONFIG_OPTIONS ,0x000c, 0x14c);
++DEF_IE(1xx_IE_FWREV ,0x000d, 0x18);
++DEF_IE(1xx_IE_FCS_ERROR_COUNT ,0x000e, 0x04);
++DEF_IE(1xx_IE_MEDIUM_USAGE ,0x000f, 0x08);
++DEF_IE(1xx_IE_RXCONFIG ,0x0010, 0x04);
++DEF_IE(100_IE_UNKNOWN_11 ,0x0011, -1); /* NONBINARY: large implementation in FW150! link quality readings or so? */
++DEF_IE(111_IE_QUEUE_THRESH ,0x0011, -1);
++DEF_IE(100_IE_UNKNOWN_12 ,0x0012, -1); /* NONBINARY: VERY large implementation in FW150!! */
++DEF_IE(111_IE_BSS_POWER_SAVE ,0x0012, /* -1 */ 2);
++DEF_IE(1xx_IE_FIRMWARE_STATISTICS ,0x0013, 0x9c); /* TNETW1450: length 0x134!! */
++DEF_IE(1FF_IE_RX_INTR_CONFIG ,0x0014, 0x14); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1xx_IE_FEATURE_CONFIG ,0x0015, 0x08);
++DEF_IE(111_IE_KEY_CHOOSE ,0x0016, 0x04); /* for rekeying. really len=4?? */
++DEF_IE(1FF_IE_MISC_CONFIG_TABLE ,0x0017, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_WONE_CONFIG ,0x0018, -1); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_TID_CONFIG ,0x001a, 0x2c); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_CALIB_ASSESSMENT ,0x001e, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_BEACON_FILTER_OPTIONS ,0x001f, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_LOW_RSSI_THRESH_OPT ,0x0020, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_NOISE_HISTOGRAM_RESULTS ,0x0021, 0x30); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_PACKET_DETECT_THRESH ,0x0023, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_TX_CONFIG_OPTIONS ,0x0024, 0x04); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_CCA_THRESHOLD ,0x0025, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_EVENT_MASK ,0x0026, 0x08); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_DTIM_PERIOD ,0x0027, 0x02); /* later firmware versions, TNETW1450 only? */
++DEF_IE(1FF_IE_ACI_CONFIG_SET ,0x0029, 0x06); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1FF_IE_EEPROM_VER ,0x0030, 0x04); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1xx_IE_DOT11_STATION_ID ,0x1001, 0x06);
++DEF_IE(100_IE_DOT11_UNKNOWN_1002 ,0x1002, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(111_IE_DOT11_FRAG_THRESH ,0x1002, -1); /* mapped to cfgInvalid in FW150; TNETW1450 has length 2!! */
++DEF_IE(100_IE_DOT11_BEACON_PERIOD ,0x1003, 0x02); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_DOT11_DTIM_PERIOD ,0x1004, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_DOT11_MAX_RX_LIFETIME ,0x1004, -1); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(1xx_IE_DOT11_SHORT_RETRY_LIMIT ,0x1005, 0x01); /* TNETW1450: length 2 */
++DEF_IE(1xx_IE_DOT11_LONG_RETRY_LIMIT ,0x1006, 0x01); /* TNETW1450: length 2 */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_WRITE ,0x1007, 0x20); /* configure default keys; TNETW1450 has length 0x24!! */
++DEF_IE(1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME ,0x1008, 0x04);
++DEF_IE(1xx_IE_DOT11_GROUP_ADDR ,0x1009, -1);
++DEF_IE(1xx_IE_DOT11_CURRENT_REG_DOMAIN ,0x100a, 0x02);
++/* It's harmless to have larger struct. Use USB case always. */
++DEF_IE(1xx_IE_DOT11_CURRENT_ANTENNA ,0x100b, 0x02); /* in fact len=1 for PCI */
++DEF_IE(1xx_IE_DOT11_UNKNOWN_100C ,0x100c, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1xx_IE_DOT11_TX_POWER_LEVEL ,0x100d, 0x01); /* TNETW1450 has length 2!! */
++DEF_IE(1xx_IE_DOT11_CURRENT_CCA_MODE ,0x100e, 0x02); /* in fact len=1 for PCI */
++/* USB doesn't return anything - len==0?! */
++DEF_IE(100_IE_DOT11_ED_THRESHOLD ,0x100f, 0x04);
++DEF_IE(1xx_IE_DOT11_WEP_DEFAULT_KEY_SET ,0x1010, 0x01); /* set default key ID; TNETW1450: length 2 */
++DEF_IE(100_IE_DOT11_UNKNOWN_1011 ,0x1011, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(1FF_IE_DOT11_CURR_5GHZ_REGDOM ,0x1011, -1); /* later firmware versions; maybe TNETW1450 only? */
++DEF_IE(100_IE_DOT11_UNKNOWN_1012 ,0x1012, -1); /* mapped to cfgInvalid in FW150 */
++DEF_IE(100_IE_DOT11_UNKNOWN_1013 ,0x1013, -1); /* mapped to cfgInvalid in FW150 */
++
++#if 0
++/* Experimentally obtained on acx100, fw 1.9.8.b
++** -1 means that fw returned 'invalid IE'
++** 0200 FC00 nnnn... are test read contents: u16 type, u16 len, data
++** (AA are poison bytes marking bytes not written by fw)
++**
++** Looks like acx100 fw does not update len field (thus len=256-4=FC here)
++** A number of IEs seem to trash type,len fields
++** IEs marked 'huge' return gobs of data (no poison bytes remain)
++*/
++DEF_IE(100_IE_INVAL_00, 0x0000, -1);
++DEF_IE(100_IE_INVAL_01, 0x0001, -1); /* IE_ACX_TIMER, len=16 on older fw */
++DEF_IE(100_IE_POWER_MGMT, 0x0002, 4); /* 0200FC00 00040000 AAAAAAAA */
++DEF_IE(100_IE_QUEUE_CONFIG, 0x0003, 28); /* 0300FC00 48060000 9CAD0000 0101AAAA DCB00000 E4B00000 9CAA0000 00AAAAAA */
++DEF_IE(100_IE_BLOCK_SIZE, 0x0004, 2); /* 0400FC00 0001AAAA AAAAAAAA AAAAAAAA */
++/* write only: */
++DEF_IE(100_IE_MEMORY_CONFIG_OPTIONS, 0x0005, 20);
++DEF_IE(100_IE_RATE_FALLBACK, 0x0006, 1); /* 0600FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++/* write only: */
++DEF_IE(100_IE_WEP_OPTIONS, 0x0007, 3);
++DEF_IE(100_IE_MEMORY_MAP, 0x0008, 40); /* huge: 0800FC00 30000000 6CA20000 70A20000... */
++/* gives INVAL on read: */
++DEF_IE(100_IE_SCAN_STATUS, 0x0009, -1);
++DEF_IE(100_IE_ASSOC_ID, 0x000a, 2); /* huge: 0A00FC00 00000000 01040800 00000000... */
++DEF_IE(100_IE_INVAL_0B, 0x000b, -1);
++/* 'command rejected': */
++DEF_IE(100_IE_CONFIG_OPTIONS, 0x000c, -3);
++DEF_IE(100_IE_FWREV, 0x000d, 24); /* 0D00FC00 52657620 312E392E 382E6200 AAAAAAAA AAAAAAAA 05050201 AAAAAAAA */
++DEF_IE(100_IE_FCS_ERROR_COUNT, 0x000e, 4);
++DEF_IE(100_IE_MEDIUM_USAGE, 0x000f, 8); /* E41F0000 2D780300 FCC91300 AAAAAAAA */
++DEF_IE(100_IE_RXCONFIG, 0x0010, 4); /* 1000FC00 00280000 AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_QUEUE_THRESH, 0x0011, 12); /* 1100FC00 AAAAAAAA 00000000 00000000 */
++DEF_IE(100_IE_BSS_POWER_SAVE, 0x0012, 1); /* 1200FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++/* read only, variable len */
++DEF_IE(100_IE_FIRMWARE_STATISTICS, 0x0013, 256); /* 0000AC00 00000000 ... */
++DEF_IE(100_IE_INT_CONFIG, 0x0014, 20); /* 00000000 00000000 00000000 00000000 5D74D105 00000000 AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_FEATURE_CONFIG, 0x0015, 8); /* 1500FC00 16000000 AAAAAAAA AAAAAAAA */
++/* returns 'invalid MAC': */
++DEF_IE(100_IE_KEY_CHOOSE, 0x0016, -4);
++DEF_IE(100_IE_INVAL_17, 0x0017, -1);
++DEF_IE(100_IE_UNKNOWN_18, 0x0018, 0); /* null len?! 1800FC00 AAAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_UNKNOWN_19, 0x0019, 256); /* huge: 1900FC00 9C1F00EA FEFFFFEA FEFFFFEA... */
++DEF_IE(100_IE_INVAL_1A, 0x001A, -1);
++
++DEF_IE(100_IE_DOT11_INVAL_1000, 0x1000, -1);
++DEF_IE(100_IE_DOT11_STATION_ID, 0x1001, 6); /* huge: 0110FC00 58B10E2F 03000000 00000000... */
++DEF_IE(100_IE_DOT11_INVAL_1002, 0x1002, -1);
++DEF_IE(100_IE_DOT11_INVAL_1003, 0x1003, -1);
++DEF_IE(100_IE_DOT11_INVAL_1004, 0x1004, -1);
++DEF_IE(100_IE_DOT11_SHORT_RETRY_LIMIT, 0x1005, 1);
++DEF_IE(100_IE_DOT11_LONG_RETRY_LIMIT, 0x1006, 1);
++/* write only: */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_WRITE, 0x1007, 32);
++DEF_IE(100_IE_DOT11_MAX_XMIT_MSDU_LIFETIME, 0x1008, 4); /* huge: 0810FC00 00020000 F4010000 00000000... */
++/* undoc but returns something */
++DEF_IE(100_IE_DOT11_GROUP_ADDR, 0x1009, 12); /* huge: 0910FC00 00000000 00000000 00000000... */
++DEF_IE(100_IE_DOT11_CURRENT_REG_DOMAIN, 0x100a, 1); /* 0A10FC00 30AAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_CURRENT_ANTENNA, 0x100b, 1); /* 0B10FC00 8FAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_INVAL_100C, 0x100c, -1);
++DEF_IE(100_IE_DOT11_TX_POWER_LEVEL, 0x100d, 2); /* 00000000 0100AAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_CURRENT_CCA_MODE, 0x100e, 1); /* 0E10FC00 0DAAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_ED_THRESHOLD, 0x100f, 4); /* 0F10FC00 70000000 AAAAAAAA AAAAAAAA */
++/* set default key ID */
++DEF_IE(100_IE_DOT11_WEP_DEFAULT_KEY_SET, 0x1010, 1); /* 1010FC00 00AAAAAA AAAAAAAA AAAAAAAA */
++DEF_IE(100_IE_DOT11_INVAL_1011, 0x1011, -1);
++DEF_IE(100_IE_DOT11_INVAL_1012, 0x1012, -1);
++DEF_IE(100_IE_DOT11_INVAL_1013, 0x1013, -1);
++DEF_IE(100_IE_DOT11_UNKNOWN_1014, 0x1014, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1015, 0x1015, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1016, 0x1016, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1017, 0x1017, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1018, 0x1018, 256); /* huge */
++DEF_IE(100_IE_DOT11_UNKNOWN_1019, 0x1019, 256); /* huge */
++#endif
++
++#if 0
++/* Experimentally obtained on PCI acx111 Xterasys XN-2522g, fw 1.2.1.34
++** -1 means that fw returned 'invalid IE'
++** 0400 0800 nnnn... are test read contents: u16 type, u16 len, data
++** (AA are poison bytes marking bytes not written by fw)
++**
++** Looks like acx111 fw reports real len!
++*/
++DEF_IE(111_IE_INVAL_00, 0x0000, -1);
++DEF_IE(111_IE_INVAL_01, 0x0001, -1);
++DEF_IE(111_IE_POWER_MGMT, 0x0002, 12);
++/* write only, variable len: 12 + rxqueue_cnt*8 + txqueue_cnt*4: */
++DEF_IE(111_IE_MEMORY_CONFIG, 0x0003, 24);
++DEF_IE(111_IE_BLOCK_SIZE, 0x0004, 8); /* 04000800 AA00AAAA AAAAAAAA */
++/* variable len: 8 + rxqueue_cnt*8 + txqueue_cnt*8: */
++DEF_IE(111_IE_QUEUE_HEAD, 0x0005, 24);
++DEF_IE(111_IE_RATE_FALLBACK, 0x0006, 1);
++/* acx100 name:WEP_OPTIONS */
++/* said to have len:1 (not true, actually returns 12 bytes): */
++DEF_IE(111_IE_RADIO_BAND, 0x0007, 12); /* 07000C00 AAAA1F00 FF03AAAA AAAAAAAA */
++DEF_IE(111_IE_MEMORY_MAP, 0x0008, 48);
++/* said to have len:4, but gives INVAL on read: */
++DEF_IE(111_IE_SCAN_STATUS, 0x0009, -1);
++DEF_IE(111_IE_ASSOC_ID, 0x000a, 2);
++/* write only, len is not known: */
++DEF_IE(111_IE_UNKNOWN_0B, 0x000b, 0);
++/* read only, variable len. I see 67 byte reads: */
++DEF_IE(111_IE_CONFIG_OPTIONS, 0x000c, 67); /* 0C004300 01160500 ... */
++DEF_IE(111_IE_FWREV, 0x000d, 24);
++DEF_IE(111_IE_FCS_ERROR_COUNT, 0x000e, 4);
++DEF_IE(111_IE_MEDIUM_USAGE, 0x000f, 8);
++DEF_IE(111_IE_RXCONFIG, 0x0010, 4);
++DEF_IE(111_IE_QUEUE_THRESH, 0x0011, 12);
++DEF_IE(111_IE_BSS_POWER_SAVE, 0x0012, 1);
++/* read only, variable len. I see 240 byte reads: */
++DEF_IE(111_IE_FIRMWARE_STATISTICS, 0x0013, 240); /* 1300F000 00000000 ... */
++/* said to have len=17. looks like fw pads it to 20: */
++DEF_IE(111_IE_INT_CONFIG, 0x0014, 20); /* 14001400 00000000 00000000 00000000 00000000 00000000 */
++DEF_IE(111_IE_FEATURE_CONFIG, 0x0015, 8);
++/* said to be name:KEY_INDICATOR, len:4, but gives INVAL on read: */
++DEF_IE(111_IE_KEY_CHOOSE, 0x0016, -1);
++/* said to have len:4, but in fact returns 8: */
++DEF_IE(111_IE_MAX_USB_XFR, 0x0017, 8); /* 17000800 00014000 00000000 */
++DEF_IE(111_IE_INVAL_18, 0x0018, -1);
++DEF_IE(111_IE_INVAL_19, 0x0019, -1);
++/* undoc but returns something: */
++/* huh, fw indicates len=20 but uses 4 more bytes in buffer??? */
++DEF_IE(111_IE_UNKNOWN_1A, 0x001A, 20); /* 1A001400 AA00AAAA 0000020F FF030000 00020000 00000007 04000000 */
++
++DEF_IE(111_IE_DOT11_INVAL_1000, 0x1000, -1);
++DEF_IE(111_IE_DOT11_STATION_ID, 0x1001, 6);
++DEF_IE(111_IE_DOT11_FRAG_THRESH, 0x1002, 2);
++/* acx100 only? gives INVAL on read: */
++DEF_IE(111_IE_DOT11_BEACON_PERIOD, 0x1003, -1);
++/* said to be MAX_RECV_MSDU_LIFETIME: */
++DEF_IE(111_IE_DOT11_DTIM_PERIOD, 0x1004, 4);
++DEF_IE(111_IE_DOT11_SHORT_RETRY_LIMIT, 0x1005, 1);
++DEF_IE(111_IE_DOT11_LONG_RETRY_LIMIT, 0x1006, 1);
++/* acx100 only? gives INVAL on read: */
++DEF_IE(111_IE_DOT11_WEP_DEFAULT_KEY_WRITE, 0x1007, -1);
++DEF_IE(111_IE_DOT11_MAX_XMIT_MSDU_LIFETIME, 0x1008, 4);
++/* undoc but returns something. maybe it's 2 multicast MACs to listen to? */
++DEF_IE(111_IE_DOT11_GROUP_ADDR, 0x1009, 12); /* 09100C00 00000000 00000000 00000000 */
++DEF_IE(111_IE_DOT11_CURRENT_REG_DOMAIN, 0x100a, 1);
++DEF_IE(111_IE_DOT11_CURRENT_ANTENNA, 0x100b, 2);
++DEF_IE(111_IE_DOT11_INVAL_100C, 0x100c, -1);
++DEF_IE(111_IE_DOT11_TX_POWER_LEVEL, 0x100d, 1);
++/* said to have len=1 but gives INVAL on read: */
++DEF_IE(111_IE_DOT11_CURRENT_CCA_MODE, 0x100e, -1);
++/* said to have len=4 but gives INVAL on read: */
++DEF_IE(111_IE_DOT11_ED_THRESHOLD, 0x100f, -1);
++/* set default key ID. write only: */
++DEF_IE(111_IE_DOT11_WEP_DEFAULT_KEY_SET, 0x1010, 1);
++/* undoc but returns something: */
++DEF_IE(111_IE_DOT11_UNKNOWN_1011, 0x1011, 1); /* 11100100 20 */
++DEF_IE(111_IE_DOT11_INVAL_1012, 0x1012, -1);
++DEF_IE(111_IE_DOT11_INVAL_1013, 0x1013, -1);
++#endif
++
++
++/***********************************************************************
++**Information Frames Structures
++*/
++
++/* Used in beacon frames and the like */
++#define DOT11RATEBYTE_1 (1*2)
++#define DOT11RATEBYTE_2 (2*2)
++#define DOT11RATEBYTE_5_5 (5*2+1)
++#define DOT11RATEBYTE_11 (11*2)
++#define DOT11RATEBYTE_22 (22*2)
++#define DOT11RATEBYTE_6_G (6*2)
++#define DOT11RATEBYTE_9_G (9*2)
++#define DOT11RATEBYTE_12_G (12*2)
++#define DOT11RATEBYTE_18_G (18*2)
++#define DOT11RATEBYTE_24_G (24*2)
++#define DOT11RATEBYTE_36_G (36*2)
++#define DOT11RATEBYTE_48_G (48*2)
++#define DOT11RATEBYTE_54_G (54*2)
++#define DOT11RATEBYTE_BASIC 0x80 /* flags rates included in basic rate set */
++
++
++/***********************************************************************
++** rxbuffer_t
++**
++** This is the format of rx data returned by acx
++*/
++
++/* I've hoped it's a 802.11 PHY header, but no...
++ * so far, I've seen on acx111:
++ * 0000 3a00 0000 0000 IBSS Beacons
++ * 0000 3c00 0000 0000 ESS Beacons
++ * 0000 2700 0000 0000 Probe requests
++ * --vda
++ */
++typedef struct phy_hdr {
++ u8 unknown[4];
++ u8 acx111_unknown[4];
++} ACX_PACKED phy_hdr_t;
++
++/* seems to be a bit similar to hfa384x_rx_frame.
++ * These fields are still not quite obvious, though.
++ * Some seem to have different meanings... */
++
++#define RXBUF_HDRSIZE 12
++#define RXBUF_BYTES_RCVD(adev, rxbuf) \
++ ((le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0xfff) - (adev)->phy_header_len)
++#define RXBUF_BYTES_USED(rxbuf) \
++ ((le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0xfff) + RXBUF_HDRSIZE)
++/* USBism */
++#define RXBUF_IS_TXSTAT(rxbuf) (le16_to_cpu((rxbuf)->mac_cnt_rcvd) & 0x8000)
++/*
++mac_cnt_rcvd:
++ 12 bits: length of frame from control field to first byte of FCS
++ 3 bits: reserved
++ 1 bit: 1 = it's a tx status info, not a rx packet (USB only)
++
++mac_cnt_mblks:
++ 6 bits: number of memory block used to store frame in adapter memory
++ 1 bit: Traffic Indicator bit in TIM of received Beacon was set
++
++mac_status: 1 byte (bitmap):
++ 7 Matching BSSID
++ 6 Matching SSID
++ 5 BDCST Address 1 field is a broadcast
++ 4 VBM received beacon frame has more than one set bit (?!)
++ 3 TIM Set bit representing this station is set in TIM of received beacon
++ 2 GROUP Address 1 is a multicast
++ 1 ADDR1 Address 1 matches our MAC
++ 0 FCSGD FSC is good
++
++phy_stat_baseband: 1 byte (bitmap):
++ 7 Preamble frame had a long preamble
++ 6 PLCP Error CRC16 error in PLCP header
++ 5 Unsup_Mod unsupported modulation
++ 4 Selected Antenna antenna 1 was used to receive this frame
++ 3 PBCC/CCK frame used: 1=PBCC, 0=CCK modulation
++ 2 OFDM frame used OFDM modulation
++ 1 TI Protection protection frame was detected
++ 0 Reserved
++
++phy_plcp_signal: 1 byte:
++ Receive PLCP Signal field from the Baseband Processor
++
++phy_level: 1 byte:
++ receive AGC gain level (can be used to measure receive signal strength)
++
++phy_snr: 1 byte:
++ estimated noise power of equalized receive signal
++ at input of FEC decoder (can be used to measure receive signal quality)
++
++time: 4 bytes:
++ timestamp sampled from either the Access Manager TSF counter
++ or free-running microsecond counter when the MAC receives
++ first byte of PLCP header.
++*/
++
++typedef struct rxbuffer {
++ u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
++ u8 mac_cnt_mblks;
++ u8 mac_status;
++ u8 phy_stat_baseband; /* bit 0x80: used LNA (Low-Noise Amplifier) */
++ u8 phy_plcp_signal;
++ u8 phy_level; /* PHY stat */
++ u8 phy_snr; /* PHY stat */
++ u32 time; /* timestamp upon MAC rcv first byte */
++/* 4-byte (acx100) or 8-byte (acx111) phy header will be here
++** if RX_CFG1_INCLUDE_PHY_HDR is in effect:
++** phy_hdr_t phy */
++ wlan_hdr_a3_t hdr_a3;
++ /* maximally sized data part of wlan packet */
++ u8 data_a3[WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN];
++ /* can add hdr/data_a4 if needed */
++} ACX_PACKED rxbuffer_t;
++
++
++/*--- Firmware statistics ----------------------------------------------------*/
++
++/* define a random 100 bytes more to catch firmware versions which
++ * provide a bigger struct */
++#define FW_STATS_FUTURE_EXTENSION 100
++
++typedef struct fw_stats_tx {
++ u32 tx_desc_of;
++} ACX_PACKED fw_stats_tx_t;
++
++typedef struct fw_stats_rx {
++ u32 rx_oom;
++ u32 rx_hdr_of;
++ u32 rx_hw_stuck; /* old: u32 rx_hdr_use_next */
++ u32 rx_dropped_frame;
++ u32 rx_frame_ptr_err;
++ u32 rx_xfr_hint_trig;
++ u32 rx_aci_events; /* later versions only */
++ u32 rx_aci_resets; /* later versions only */
++} ACX_PACKED fw_stats_rx_t;
++
++typedef struct fw_stats_dma {
++ u32 rx_dma_req;
++ u32 rx_dma_err;
++ u32 tx_dma_req;
++ u32 tx_dma_err;
++} ACX_PACKED fw_stats_dma_t;
++
++typedef struct fw_stats_irq {
++ u32 cmd_cplt;
++ u32 fiq;
++ u32 rx_hdrs;
++ u32 rx_cmplt;
++ u32 rx_mem_of;
++ u32 rx_rdys;
++ u32 irqs;
++ u32 tx_procs;
++ u32 decrypt_done;
++ u32 dma_0_done;
++ u32 dma_1_done;
++ u32 tx_exch_complet;
++ u32 commands;
++ u32 rx_procs;
++ u32 hw_pm_mode_changes;
++ u32 host_acks;
++ u32 pci_pm;
++ u32 acm_wakeups;
++} ACX_PACKED fw_stats_irq_t;
++
++typedef struct fw_stats_wep {
++ u32 wep_key_count;
++ u32 wep_default_key_count;
++ u32 dot11_def_key_mib;
++ u32 wep_key_not_found;
++ u32 wep_decrypt_fail;
++ u32 wep_pkt_decrypt;
++ u32 wep_decrypt_irqs;
++} ACX_PACKED fw_stats_wep_t;
++
++typedef struct fw_stats_pwr {
++ u32 tx_start_ctr;
++ u32 no_ps_tx_too_short;
++ u32 rx_start_ctr;
++ u32 no_ps_rx_too_short;
++ u32 lppd_started;
++ u32 no_lppd_too_noisy;
++ u32 no_lppd_too_short;
++ u32 no_lppd_matching_frame;
++} ACX_PACKED fw_stats_pwr_t;
++
++typedef struct fw_stats_mic {
++ u32 mic_rx_pkts;
++ u32 mic_calc_fail;
++} ACX_PACKED fw_stats_mic_t;
++
++typedef struct fw_stats_aes {
++ u32 aes_enc_fail;
++ u32 aes_dec_fail;
++ u32 aes_enc_pkts;
++ u32 aes_dec_pkts;
++ u32 aes_enc_irq;
++ u32 aes_dec_irq;
++} ACX_PACKED fw_stats_aes_t;
++
++typedef struct fw_stats_event {
++ u32 heartbeat;
++ u32 calibration;
++ u32 rx_mismatch;
++ u32 rx_mem_empty;
++ u32 rx_pool;
++ u32 oom_late;
++ u32 phy_tx_err;
++ u32 tx_stuck;
++} ACX_PACKED fw_stats_event_t;
++
++/* mainly for size calculation only */
++typedef struct fw_stats {
++ u16 type;
++ u16 len;
++ fw_stats_tx_t tx;
++ fw_stats_rx_t rx;
++ fw_stats_dma_t dma;
++ fw_stats_irq_t irq;
++ fw_stats_wep_t wep;
++ fw_stats_pwr_t pwr;
++ fw_stats_mic_t mic;
++ fw_stats_aes_t aes;
++ fw_stats_event_t evt;
++ u8 _padding[FW_STATS_FUTURE_EXTENSION];
++} fw_stats_t;
++
++/* Firmware version struct */
++
++typedef struct fw_ver {
++ u16 cmd;
++ u16 size;
++ char fw_id[20];
++ u32 hw_id;
++} ACX_PACKED fw_ver_t;
++
++#define FW_ID_SIZE 20
++
++typedef struct shared_queueindicator {
++ u32 indicator;
++ u16 host_lock;
++ u16 fw_lock;
++} ACX_PACKED queueindicator_t;
++
++/*--- WEP stuff --------------------------------------------------------------*/
++#define DOT11_MAX_DEFAULT_WEP_KEYS 4
++
++/* non-firmware struct, no packing necessary */
++typedef struct wep_key {
++ size_t size; /* most often used member first */
++ u8 index;
++ u8 key[29];
++ u16 strange_filler;
++} wep_key_t; /* size = 264 bytes (33*8) */
++/* FIXME: We don't have size 264! Or is there 2 bytes beyond the key
++ * (strange_filler)? */
++
++/* non-firmware struct, no packing necessary */
++typedef struct key_struct {
++ u8 addr[ETH_ALEN]; /* 0x00 */
++ u16 filler1; /* 0x06 */
++ u32 filler2; /* 0x08 */
++ u32 index; /* 0x0c */
++ u16 len; /* 0x10 */
++ u8 key[29]; /* 0x12; is this long enough??? */
++} key_struct_t; /* size = 276. FIXME: where is the remaining space?? */
++
++
++/*--- Client (peer) info -----------------------------------------------------*/
++/* adev->sta_list[] is used for:
++** accumulating and processing of scan results
++** keeping client info in AP mode
++** keeping AP info in STA mode (AP is the only one 'client')
++** keeping peer info in ad-hoc mode
++** non-firmware struct --> no packing necessary */
++enum {
++ CLIENT_EMPTY_SLOT_0 = 0,
++ CLIENT_EXIST_1 = 1,
++ CLIENT_AUTHENTICATED_2 = 2,
++ CLIENT_ASSOCIATED_3 = 3,
++ CLIENT_JOIN_CANDIDATE = 4
++};
++struct client {
++ /* most frequent access first */
++ u8 used; /* misnamed, more like 'status' */
++ struct client* next;
++ unsigned long mtime; /* last time we heard it, in jiffies */
++ size_t essid_len; /* length of ESSID (without '\0') */
++ u32 sir; /* Standard IR */
++ u32 snr; /* Signal to Noise Ratio */
++ u16 aid; /* association ID */
++ u16 seq; /* from client's auth req */
++ u16 auth_alg; /* from client's auth req */
++ u16 cap_info; /* from client's assoc req */
++ u16 rate_cap; /* what client supports (all rates) */
++ u16 rate_bas; /* what client supports (basic rates) */
++ u16 rate_cfg; /* what is allowed (by iwconfig etc) */
++ u16 rate_cur; /* currently used rate mask */
++ u8 rate_100; /* currently used rate byte (acx100 only) */
++ u8 address[ETH_ALEN];
++ u8 bssid[ETH_ALEN]; /* ad-hoc hosts can have bssid != mac */
++ u8 channel;
++ u8 auth_step;
++ u8 ignore_count;
++ u8 fallback_count;
++ u8 stepup_count;
++ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID and trailing '\0' */
++/* FIXME: this one is too damn big */
++ char challenge_text[WLAN_CHALLENGE_LEN];
++};
++
++
++/***********************************************************************
++** Hardware structures
++*/
++
++/* An opaque typesafe helper type
++ *
++ * Some hardware fields are actually pointers,
++ * but they have to remain u32, since using ptr instead
++ * (8 bytes on 64bit systems!) would disrupt the fixed descriptor
++ * format the acx firmware expects in the non-user area.
++ * Since we cannot cram an 8 byte ptr into 4 bytes, we need to
++ * enforce that pointed to data remains in low memory
++ * (address value needs to fit in 4 bytes) on 64bit systems.
++ *
++ * This is easy to get wrong, thus we are using a small struct
++ * and special macros to access it. Macros will check for
++ * attempts to overflow an acx_ptr with value > 0xffffffff.
++ *
++ * Attempts to use acx_ptr without macros result in compile-time errors */
++
++typedef struct {
++ u32 v;
++} ACX_PACKED acx_ptr;
++
++#if ACX_DEBUG
++#define CHECK32(n) BUG_ON(sizeof(n)>4 && (long)(n)>0xffffff00)
++#else
++#define CHECK32(n) ((void)0)
++#endif
++
++/* acx_ptr <-> integer conversion */
++#define cpu2acx(n) ({ CHECK32(n); ((acx_ptr){ .v = cpu_to_le32(n) }); })
++#define acx2cpu(a) (le32_to_cpu(a.v))
++
++/* acx_ptr <-> pointer conversion */
++#define ptr2acx(p) ({ CHECK32(p); ((acx_ptr){ .v = cpu_to_le32((u32)(long)(p)) }); })
++#define acx2ptr(a) ((void*)le32_to_cpu(a.v))
++
++/* Values for rate field (acx100 only) */
++#define RATE100_1 10
++#define RATE100_2 20
++#define RATE100_5 55
++#define RATE100_11 110
++#define RATE100_22 220
++/* This bit denotes use of PBCC:
++** (PBCC encoding is usable with 11 and 22 Mbps speeds only) */
++#define RATE100_PBCC511 0x80
++
++/* Bit values for rate111 field */
++#define RATE111_1 0x0001 /* DBPSK */
++#define RATE111_2 0x0002 /* DQPSK */
++#define RATE111_5 0x0004 /* CCK or PBCC */
++#define RATE111_6 0x0008 /* CCK-OFDM or OFDM */
++#define RATE111_9 0x0010 /* CCK-OFDM or OFDM */
++#define RATE111_11 0x0020 /* CCK or PBCC */
++#define RATE111_12 0x0040 /* CCK-OFDM or OFDM */
++#define RATE111_18 0x0080 /* CCK-OFDM or OFDM */
++#define RATE111_22 0x0100 /* PBCC */
++#define RATE111_24 0x0200 /* CCK-OFDM or OFDM */
++#define RATE111_36 0x0400 /* CCK-OFDM or OFDM */
++#define RATE111_48 0x0800 /* CCK-OFDM or OFDM */
++#define RATE111_54 0x1000 /* CCK-OFDM or OFDM */
++#define RATE111_RESERVED 0x2000
++#define RATE111_PBCC511 0x4000 /* PBCC mod at 5.5 or 11Mbit (else CCK) */
++#define RATE111_SHORTPRE 0x8000 /* short preamble */
++/* Special 'try everything' value */
++#define RATE111_ALL 0x1fff
++/* These bits denote acx100 compatible settings */
++#define RATE111_ACX100_COMPAT 0x0127
++/* These bits denote 802.11b compatible settings */
++#define RATE111_80211B_COMPAT 0x0027
++
++/* Descriptor Ctl field bits
++ * init value is 0x8e, "idle" value is 0x82 (in idle tx descs)
++ */
++#define DESC_CTL_SHORT_PREAMBLE 0x01 /* preamble type: 0 = long; 1 = short */
++#define DESC_CTL_FIRSTFRAG 0x02 /* this is the 1st frag of the frame */
++#define DESC_CTL_AUTODMA 0x04
++#define DESC_CTL_RECLAIM 0x08 /* ready to reuse */
++#define DESC_CTL_HOSTDONE 0x20 /* host has finished processing */
++#define DESC_CTL_ACXDONE 0x40 /* acx has finished processing */
++/* host owns the desc [has to be released last, AFTER modifying all other desc fields!] */
++#define DESC_CTL_HOSTOWN 0x80
++#define DESC_CTL_ACXDONE_HOSTOWN (DESC_CTL_ACXDONE | DESC_CTL_HOSTOWN)
++
++/* Descriptor Status field
++ */
++#define DESC_STATUS_FULL (1 << 31)
++
++/* NB: some bits may be interesting for Monitor mode tx (aka Raw tx): */
++#define DESC_CTL2_SEQ 0x01 /* don't increase sequence field */
++#define DESC_CTL2_FCS 0x02 /* don't add the FCS */
++#define DESC_CTL2_MORE_FRAG 0x04
++#define DESC_CTL2_RETRY 0x08 /* don't increase retry field */
++#define DESC_CTL2_POWER 0x10 /* don't increase power mgmt. field */
++#define DESC_CTL2_RTS 0x20 /* do RTS/CTS magic before sending */
++#define DESC_CTL2_WEP 0x40 /* encrypt this frame */
++#define DESC_CTL2_DUR 0x80 /* don't increase duration field */
++
++/***********************************************************************
++** PCI structures
++*/
++/* IRQ Constants
++** (outside of "#ifdef PCI" because USB (mis)uses HOST_INT_SCAN_COMPLETE) */
++#define HOST_INT_RX_DATA 0x0001
++#define HOST_INT_TX_COMPLETE 0x0002
++#define HOST_INT_TX_XFER 0x0004
++#define HOST_INT_RX_COMPLETE 0x0008
++#define HOST_INT_DTIM 0x0010
++#define HOST_INT_BEACON 0x0020
++#define HOST_INT_TIMER 0x0040
++#define HOST_INT_KEY_NOT_FOUND 0x0080
++#define HOST_INT_IV_ICV_FAILURE 0x0100
++#define HOST_INT_CMD_COMPLETE 0x0200
++#define HOST_INT_INFO 0x0400
++#define HOST_INT_OVERFLOW 0x0800
++#define HOST_INT_PROCESS_ERROR 0x1000
++#define HOST_INT_SCAN_COMPLETE 0x2000
++#define HOST_INT_FCS_THRESHOLD 0x4000
++#define HOST_INT_UNKNOWN 0x8000
++
++/* Outside of "#ifdef PCI" because USB needs to know sizeof()
++** of txdesc and rxdesc: */
++struct txdesc {
++ acx_ptr pNextDesc; /* pointer to next txdesc */
++ acx_ptr HostMemPtr; /* 0x04 */
++ acx_ptr AcxMemPtr; /* 0x08 */
++ u32 tx_time; /* 0x0c */
++ u16 total_length; /* 0x10 */
++ u16 Reserved; /* 0x12 */
++
++/* The following 16 bytes do not change when acx100 owns the descriptor */
++/* BUG: fw clears last byte of this area which is supposedly reserved
++** for driver use. amd64 blew up. We dare not use it now */
++ u32 dummy[4];
++
++ u8 Ctl_8; /* 0x24, 8bit value */
++ u8 Ctl2_8; /* 0x25, 8bit value */
++ u8 error; /* 0x26 */
++ u8 ack_failures; /* 0x27 */
++
++ union {
++ /*
++ * Packing doesn't work correctly on ARM unless unions are on
++ * 4 byte boundaries.
++ */
++ struct {
++ u8 rts_failures; /* 0x28 */
++ u8 rts_ok; /* 0x29 */
++ u16 d1;
++ } ACX_PACKED rts;
++ struct {
++ u16 d1;
++ u8 rate; /* 0x2a */
++ u8 queue_ctrl; /* 0x2b */
++ } ACX_PACKED r1;
++ struct {
++ u16 d1;
++ u16 rate111; /* 0x2a */
++ } ACX_PACKED r2;
++ } ACX_PACKED u;
++ u32 queue_info; /* 0x2c (acx100, reserved on acx111) */
++} ACX_PACKED; /* size : 48 = 0x30 */
++/* NB: acx111 txdesc structure is 4 byte larger */
++/* All these 4 extra bytes are reserved. tx alloc code takes them into account */
++
++struct rxdesc {
++ acx_ptr pNextDesc; /* 0x00 */
++ acx_ptr HostMemPtr; /* 0x04 */
++ acx_ptr ACXMemPtr; /* 0x08 */
++ u32 rx_time; /* 0x0c */
++ u16 total_length; /* 0x10 */
++ u16 WEP_length; /* 0x12 */
++ u32 WEP_ofs; /* 0x14 */
++
++/* the following 16 bytes do not change when acx100 owns the descriptor */
++ u8 driverWorkspace[16]; /* 0x18 */
++
++ u8 Ctl_8;
++ u8 rate;
++ u8 error;
++ u8 SNR; /* Signal-to-Noise Ratio */
++ u8 RxLevel;
++ u8 queue_ctrl;
++ u16 unknown;
++ u32 unknown2;
++} ACX_PACKED; /* size 52 = 0x34 */
++
++#if defined(ACX_PCI) || defined(ACX_MEM)
++
++/* Register I/O offsets */
++#define ACX100_EEPROM_ID_OFFSET 0x380
++
++/* please add further ACX hardware register definitions only when
++ it turns out you need them in the driver, and please try to use
++ firmware functionality instead, since using direct I/O access instead
++ of letting the firmware do it might confuse the firmware's state
++ machine */
++
++/* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
++** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
++enum {
++ IO_ACX_SOFT_RESET = 0,
++
++ IO_ACX_SLV_MEM_ADDR,
++ IO_ACX_SLV_MEM_DATA,
++ IO_ACX_SLV_MEM_CTL,
++ IO_ACX_SLV_END_CTL,
++
++ IO_ACX_FEMR, /* Function Event Mask */
++
++ IO_ACX_INT_TRIG,
++ IO_ACX_IRQ_MASK,
++ IO_ACX_IRQ_STATUS_NON_DES,
++ IO_ACX_IRQ_STATUS_CLEAR, /* CLEAR = clear on read */
++ IO_ACX_IRQ_ACK,
++ IO_ACX_HINT_TRIG,
++
++ IO_ACX_ENABLE,
++
++ IO_ACX_EEPROM_CTL,
++ IO_ACX_EEPROM_ADDR,
++ IO_ACX_EEPROM_DATA,
++ IO_ACX_EEPROM_CFG,
++
++ IO_ACX_PHY_ADDR,
++ IO_ACX_PHY_DATA,
++ IO_ACX_PHY_CTL,
++
++ IO_ACX_GPIO_OE,
++
++ IO_ACX_GPIO_OUT,
++
++ IO_ACX_CMD_MAILBOX_OFFS,
++ IO_ACX_INFO_MAILBOX_OFFS,
++ IO_ACX_EEPROM_INFORMATION,
++
++ IO_ACX_EE_START,
++ IO_ACX_SOR_CFG,
++ IO_ACX_ECPU_CTRL
++};
++/* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
++** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
++
++/* Values for IO_ACX_INT_TRIG register: */
++/* inform hw that rxdesc in queue needs processing */
++#define INT_TRIG_RXPRC 0x08
++/* inform hw that txdesc in queue needs processing */
++#define INT_TRIG_TXPRC 0x04
++/* ack that we received info from info mailbox */
++#define INT_TRIG_INFOACK 0x02
++/* inform hw that we have filled command mailbox */
++#define INT_TRIG_CMD 0x01
++
++struct txhostdesc {
++ acx_ptr data_phy; /* 0x00 [u8 *] */
++ u16 data_offset; /* 0x04 */
++ u16 reserved; /* 0x06 */
++ u16 Ctl_16; /* 16bit value, endianness!! */
++ u16 length; /* 0x0a */
++ acx_ptr desc_phy_next; /* 0x0c [txhostdesc *] */
++ acx_ptr pNext; /* 0x10 [txhostdesc *] */
++ u32 Status; /* 0x14, unused on Tx */
++/* From here on you can use this area as you want (variable length, too!) */
++ u8 *data;
++} ACX_PACKED;
++
++struct rxhostdesc {
++ acx_ptr data_phy; /* 0x00 [rxbuffer_t *] */
++ u16 data_offset; /* 0x04 */
++ u16 reserved; /* 0x06 */
++ u16 Ctl_16; /* 0x08; 16bit value, endianness!! */
++ u16 length; /* 0x0a */
++ acx_ptr desc_phy_next; /* 0x0c [rxhostdesc_t *] */
++ acx_ptr pNext; /* 0x10 [rxhostdesc_t *] */
++ u32 Status; /* 0x14 */
++/* From here on you can use this area as you want (variable length, too!) */
++ rxbuffer_t *data;
++} ACX_PACKED;
++
++#endif /* ACX_PCI */
++
++/***********************************************************************
++** USB structures and constants
++*/
++#ifdef ACX_USB
++
++/* Used for usb_txbuffer.desc field */
++#define USB_TXBUF_TXDESC 0xA
++/* Size of header (everything up to data[]) */
++#define USB_TXBUF_HDRSIZE 14
++typedef struct usb_txbuffer {
++ u16 desc;
++ u16 mpdu_len;
++ u8 queue_index;
++ u8 rate;
++ u32 hostdata;
++ u8 ctrl1;
++ u8 ctrl2;
++ u16 data_len;
++ /* wlan packet content is placed here: */
++ u8 data[WLAN_A4FR_MAXLEN_WEP_FCS];
++} ACX_PACKED usb_txbuffer_t;
++
++/* USB returns either rx packets (see rxbuffer) or
++** these "tx status" structs: */
++typedef struct usb_txstatus {
++ u16 mac_cnt_rcvd; /* only 12 bits are len! (0xfff) */
++ u8 queue_index;
++ u8 mac_status; /* seen 0x20 on tx failure */
++ u32 hostdata;
++ u8 rate;
++ u8 ack_failures;
++ u8 rts_failures;
++ u8 rts_ok;
++} ACX_PACKED usb_txstatus_t;
++
++typedef struct usb_tx {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ /* actual USB bulk output data block is here: */
++ usb_txbuffer_t bulkout;
++} usb_tx_t;
++
++struct usb_rx_plain {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ rxbuffer_t bulkin;
++};
++
++typedef struct usb_rx {
++ unsigned busy:1;
++ struct urb *urb;
++ acx_device_t *adev;
++ rxbuffer_t bulkin;
++ /* Make entire structure 4k. Report if it breaks something. */
++ u8 padding[4*1024 - sizeof(struct usb_rx_plain)];
++} usb_rx_t;
++#endif /* ACX_USB */
++
++
++/* Config Option structs */
++
++typedef struct co_antennas {
++ u8 type;
++ u8 len;
++ u8 list[2];
++} ACX_PACKED co_antennas_t;
++
++typedef struct co_powerlevels {
++ u8 type;
++ u8 len;
++ u16 list[8];
++} ACX_PACKED co_powerlevels_t;
++
++typedef struct co_datarates {
++ u8 type;
++ u8 len;
++ u8 list[8];
++} ACX_PACKED co_datarates_t;
++
++typedef struct co_domains {
++ u8 type;
++ u8 len;
++ u8 list[6];
++} ACX_PACKED co_domains_t;
++
++typedef struct co_product_id {
++ u8 type;
++ u8 len;
++ u8 list[128];
++} ACX_PACKED co_product_id_t;
++
++typedef struct co_manuf_id {
++ u8 type;
++ u8 len;
++ u8 list[128];
++} ACX_PACKED co_manuf_t;
++
++typedef struct co_fixed {
++ char NVSv[8];
++/* u16 NVS_vendor_offs; ACX111-only */
++/* u16 unknown; ACX111-only */
++ u8 MAC[6]; /* ACX100-only */
++ u16 probe_delay; /* ACX100-only */
++ u32 eof_memory;
++ u8 dot11CCAModes;
++ u8 dot11Diversity;
++ u8 dot11ShortPreambleOption;
++ u8 dot11PBCCOption;
++ u8 dot11ChannelAgility;
++ u8 dot11PhyType; /* FIXME: does 802.11 call it "dot11PHYType"? */
++ u8 dot11TempType;
++ u8 table_count;
++} ACX_PACKED co_fixed_t;
++
++typedef struct acx111_ie_configoption {
++ u16 type;
++ u16 len;
++/* Do not access below members directly, they are in fact variable length */
++ co_fixed_t fixed;
++ co_antennas_t antennas;
++ co_powerlevels_t power_levels;
++ co_datarates_t data_rates;
++ co_domains_t domains;
++ co_product_id_t product_id;
++ co_manuf_t manufacturer;
++ u8 _padding[4];
++} ACX_PACKED acx111_ie_configoption_t;
++
++
++/***********************************************************************
++** Main acx per-device data structure
++*/
++#define ACX_STATE_FW_LOADED 0x01
++#define ACX_STATE_IFACE_UP 0x02
++
++/* MAC mode (BSS type) defines
++ * Note that they shouldn't be redefined, since they are also used
++ * during communication with firmware */
++#define ACX_MODE_0_ADHOC 0
++#define ACX_MODE_1_UNUSED 1
++#define ACX_MODE_2_STA 2
++#define ACX_MODE_3_AP 3
++/* These are our own inventions. Sending these to firmware
++** makes it stop emitting beacons, which is exactly what we want
++** for these modes */
++#define ACX_MODE_MONITOR 0xfe
++#define ACX_MODE_OFF 0xff
++/* 'Submode': identifies exact status of ADHOC/STA host */
++#define ACX_STATUS_0_STOPPED 0
++#define ACX_STATUS_1_SCANNING 1
++#define ACX_STATUS_2_WAIT_AUTH 2
++#define ACX_STATUS_3_AUTHENTICATED 3
++#define ACX_STATUS_4_ASSOCIATED 4
++
++/* FIXME: this should be named something like struct acx_priv (typedef'd to
++ * acx_priv_t) */
++
++/* non-firmware struct, no packing necessary */
++struct acx_device {
++ /* most frequent accesses first (dereferencing and cache line!) */
++
++ /*** Locking ***/
++ /* FIXME: try to convert semaphore to more efficient mutex according
++ to Ingo Molnar's docs (but not before driver is in mainline or
++ pre-mutex Linux 2.6.10 is very outdated). */
++ struct semaphore sem;
++ spinlock_t lock;
++#if defined(PARANOID_LOCKING) /* Lock debugging */
++ const char *last_sem;
++ const char *last_lock;
++ unsigned long sem_time;
++ unsigned long lock_time;
++#endif
++#ifdef ACX_MEM
++ spinlock_t txbuf_lock;
++#endif
++
++ /*** Linux network device ***/
++ struct net_device *ndev; /* pointer to linux netdevice */
++
++ /*** Device statistics ***/
++ struct net_device_stats stats; /* net device statistics */
++#ifdef WIRELESS_EXT
++ struct iw_statistics wstats; /* wireless statistics */
++#endif
++ /*** Power managment ***/
++ struct pm_dev *pm; /* PM crap */
++
++ /*** Management timer ***/
++ struct timer_list mgmt_timer;
++
++ /*** Hardware identification ***/
++ const char *chip_name;
++ u8 dev_type;
++ u8 chip_type;
++ u8 form_factor;
++ u8 radio_type;
++ u8 eeprom_version;
++
++ /*** Config retrieved from EEPROM ***/
++ char cfgopt_NVSv[8];
++ u16 cfgopt_NVS_vendor_offs;
++ u8 cfgopt_MAC[6];
++ u16 cfgopt_probe_delay;
++ u32 cfgopt_eof_memory;
++ u8 cfgopt_dot11CCAModes;
++ u8 cfgopt_dot11Diversity;
++ u8 cfgopt_dot11ShortPreambleOption;
++ u8 cfgopt_dot11PBCCOption;
++ u8 cfgopt_dot11ChannelAgility;
++ u8 cfgopt_dot11PhyType;
++ u8 cfgopt_dot11TempType;
++ co_antennas_t cfgopt_antennas;
++ co_powerlevels_t cfgopt_power_levels;
++ co_datarates_t cfgopt_data_rates;
++ co_domains_t cfgopt_domains;
++ co_product_id_t cfgopt_product_id;
++ co_manuf_t cfgopt_manufacturer;
++
++ /*** Firmware identification ***/
++ char firmware_version[FW_ID_SIZE+1];
++ u32 firmware_numver;
++ u32 firmware_id;
++ const u16 *ie_len;
++ const u16 *ie_len_dot11;
++
++ /*** Device state ***/
++ u16 dev_state_mask;
++ u8 led_power; /* power LED status */
++ u32 get_mask; /* mask of settings to fetch from the card */
++ u32 set_mask; /* mask of settings to write to the card */
++
++ /* Barely used in USB case */
++ u16 irq_status;
++
++ u8 after_interrupt_jobs; /* mini job list for doing actions after an interrupt occurred */
++ WORK_STRUCT after_interrupt_task; /* our task for after interrupt actions */
++
++ /*** scanning ***/
++ u16 scan_count; /* number of times to do channel scan */
++ u8 scan_mode; /* 0 == active, 1 == passive, 2 == background */
++ u8 scan_rate;
++ u16 scan_duration;
++ u16 scan_probe_delay;
++#if WIRELESS_EXT > 15
++ struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
++#endif
++
++ /*** Wireless network settings ***/
++ /* copy of the device address (ifconfig hw ether) that we actually use
++ ** for 802.11; copied over from the network device's MAC address
++ ** (ifconfig) when it makes sense only */
++ u8 dev_addr[MAX_ADDR_LEN];
++ u8 bssid[ETH_ALEN]; /* the BSSID after having joined */
++ u8 ap[ETH_ALEN]; /* The AP we want, FF:FF:FF:FF:FF:FF is any */
++ u16 aid; /* The Association ID sent from the AP / last used AID if we're an AP */
++ u16 mode; /* mode from iwconfig */
++ int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */
++ u16 status; /* 802.11 association status */
++ u8 essid_active; /* specific ESSID active, or select any? */
++ u8 essid_len; /* to avoid dozens of strlen() */
++ /* INCLUDES \0 termination for easy printf - but many places
++ ** simply want the string data memcpy'd plus a length indicator!
++ ** Keep that in mind... */
++ char essid[IW_ESSID_MAX_SIZE+1];
++ /* essid we are going to use for association, in case of "essid 'any'"
++ ** and in case of hidden ESSID (use configured ESSID then) */
++ char essid_for_assoc[IW_ESSID_MAX_SIZE+1];
++ char nick[IW_ESSID_MAX_SIZE+1]; /* see essid! */
++ u8 channel;
++ u8 reg_dom_id; /* reg domain setting */
++ u16 reg_dom_chanmask;
++ u16 auth_or_assoc_retries;
++ u16 scan_retries;
++ unsigned long scan_start; /* YES, jiffies is defined as "unsigned long" */
++
++ /* stations known to us (if we're an ap) */
++ client_t sta_list[32]; /* tab is larger than list, so that */
++ client_t *sta_hash_tab[64]; /* hash collisions are not likely */
++ client_t *ap_client; /* this one is our AP (STA mode only) */
++
++ int dup_count;
++ int nondup_count;
++ unsigned long dup_msg_expiry;
++ u16 last_seq_ctrl; /* duplicate packet detection */
++
++ /* 802.11 power save mode */
++ u8 ps_wakeup_cfg;
++ u8 ps_listen_interval;
++ u8 ps_options;
++ u8 ps_hangover_period;
++ u32 ps_enhanced_transition_time;
++ u32 ps_beacon_rx_time;
++
++ /*** PHY settings ***/
++ u8 fallback_threshold;
++ u8 stepup_threshold;
++ u16 rate_basic;
++ u16 rate_oper;
++ u16 rate_bcast;
++ u16 rate_bcast100;
++ u8 rate_auto; /* false if "iwconfig rate N" (WITHOUT 'auto'!) */
++ u8 preamble_mode; /* 0 == Long Preamble, 1 == Short, 2 == Auto */
++ u8 preamble_cur;
++
++ u8 tx_disabled;
++ u8 tx_level_dbm;
++ /* u8 tx_level_val; */
++ /* u8 tx_level_auto; whether to do automatic power adjustment */
++
++ unsigned long recalib_time_last_success;
++ unsigned long recalib_time_last_attempt;
++ int recalib_failure_count;
++ int recalib_msg_ratelimit;
++ int retry_errors_msg_ratelimit;
++
++ unsigned long brange_time_last_state_change; /* time the power LED was last changed */
++ u8 brange_last_state; /* last state of the LED */
++ u8 brange_max_quality; /* maximum quality that equates to full speed */
++
++ u8 sensitivity;
++ u8 antenna; /* antenna settings */
++ u8 ed_threshold; /* energy detect threshold */
++ u8 cca; /* clear channel assessment */
++
++ u16 rts_threshold;
++ u16 frag_threshold;
++ u32 short_retry;
++ u32 long_retry;
++ u16 msdu_lifetime;
++ u16 listen_interval; /* given in units of beacon interval */
++ u32 beacon_interval;
++
++ u16 capabilities;
++ u8 rate_supported_len;
++ u8 rate_supported[13];
++
++ /*** Encryption settings (WEP) ***/
++ u32 auth_alg; /* used in transmit_authen1 */
++ u8 wep_enabled;
++ u8 wep_restricted;
++ u8 wep_current_index;
++ wep_key_t wep_keys[DOT11_MAX_DEFAULT_WEP_KEYS]; /* the default WEP keys */
++ key_struct_t wep_key_struct[10];
++
++ /*** Unknown ***/
++ u8 dtim_interval;
++
++#ifdef ACX_MEM
++ u32 acx_txbuf_start;
++ int acx_txbuf_numblocks;
++ u32 acx_txbuf_free; /* addr of head of free list */
++ int acx_txbuf_blocks_free; /* how many are still open */
++ queueindicator_t *acx_queue_indicator;
++#endif
++
++ /*** Card Rx/Tx management ***/
++ u16 rx_config_1;
++ u16 rx_config_2;
++ u16 memblocksize;
++ unsigned int tx_free;
++ unsigned int tx_head; /* keep as close as possible to Tx stuff below (cache line) */
++ u16 phy_header_len;
++
++/*************************************************************************
++ *** PCI/USB/... must be last or else hw agnostic code breaks horribly ***
++ *************************************************************************/
++
++ /* hack to let common code compile. FIXME */
++ dma_addr_t rxhostdesc_startphy;
++
++ /*** PCI stuff ***/
++#if defined(ACX_PCI) || defined(ACX_MEM)
++ /* pointers to tx buffers, tx host descriptors (in host memory)
++ ** and tx descs in device memory */
++ unsigned int tx_tail;
++ u8 *txbuf_start;
++ txhostdesc_t *txhostdesc_start;
++ txdesc_t *txdesc_start; /* points to PCI-mapped memory */
++ dma_addr_t txbuf_startphy;
++ dma_addr_t txhostdesc_startphy;
++ /* sizes of above host memory areas */
++ unsigned int txbuf_area_size;
++ unsigned int txhostdesc_area_size;
++
++ unsigned int txdesc_size; /* size of txdesc; ACX111 = ACX100 + 4 */
++ client_t *txc[TX_CNT];
++ u16 txr[TX_CNT];
++
++ /* same for rx */
++ unsigned int rx_tail;
++ rxbuffer_t *rxbuf_start;
++ rxhostdesc_t *rxhostdesc_start;
++ rxdesc_t *rxdesc_start;
++ /* physical addresses of above host memory areas */
++ dma_addr_t rxbuf_startphy;
++ /* dma_addr_t rxhostdesc_startphy; */
++ unsigned int rxbuf_area_size;
++ unsigned int rxhostdesc_area_size;
++
++ u8 need_radio_fw;
++ u8 irqs_active; /* whether irq sending is activated */
++
++ const u16 *io; /* points to ACX100 or ACX111 PCI I/O register address set */
++
++#ifdef ACX_PCI
++ struct pci_dev *pdev;
++#endif
++#ifdef ACX_MEM
++ struct device *dev;
++#endif
++
++#ifdef ACX_PCI
++ unsigned long membase;
++#endif
++#ifdef ACX_MEM
++ volatile u32 *membase;
++#endif
++ unsigned long membase2;
++#ifdef ACX_PCI
++ void __iomem *iobase;
++#endif
++#ifdef ACX_MEM
++ volatile u32 *iobase;
++#endif
++ void __iomem *iobase2;
++ /* command interface */
++ u8 __iomem *cmd_area;
++ u8 __iomem *info_area;
++
++ u16 irq_mask; /* interrupt types to mask out (not wanted) with many IRQs activated */
++ u16 irq_mask_off; /* interrupt types to mask out (not wanted) with IRQs off */
++ unsigned int irq_loops_this_jiffy;
++ unsigned long irq_last_jiffies;
++#endif
++
++ /*** USB stuff ***/
++#ifdef ACX_USB
++ struct usb_device *usbdev;
++
++ rxbuffer_t rxtruncbuf;
++
++ usb_tx_t *usb_tx;
++ usb_rx_t *usb_rx;
++
++ int bulkinep; /* bulk-in endpoint */
++ int bulkoutep; /* bulk-out endpoint */
++ int rxtruncsize;
++#endif
++
++};
++
++static inline acx_device_t*
++ndev2adev(struct net_device *ndev)
++{
++ return netdev_priv(ndev);
++}
++
++
++/* For use with ACX1xx_IE_RXCONFIG */
++/* bit description
++ * 13 include additional header (length etc.) *required*
++ * struct is defined in 'struct rxbuffer'
++ * is this bit acx100 only? does acx111 always put the header,
++ * and bit setting is irrelevant? --vda
++ * 10 receive frames only with SSID used in last join cmd
++ * 9 discard broadcast
++ * 8 receive packets for multicast address 1
++ * 7 receive packets for multicast address 0
++ * 6 discard all multicast packets
++ * 5 discard frames from foreign BSSID
++ * 4 discard frames with foreign destination MAC address
++ * 3 promiscuous mode (receive ALL frames, disable filter)
++ * 2 include FCS
++ * 1 include phy header
++ * 0 ???
++ */
++#define RX_CFG1_INCLUDE_RXBUF_HDR 0x2000 /* ACX100 only */
++#define RX_CFG1_FILTER_SSID 0x0400
++#define RX_CFG1_FILTER_BCAST 0x0200
++#define RX_CFG1_RCV_MC_ADDR1 0x0100
++#define RX_CFG1_RCV_MC_ADDR0 0x0080
++#define RX_CFG1_FILTER_ALL_MULTI 0x0040
++#define RX_CFG1_FILTER_BSSID 0x0020
++#define RX_CFG1_FILTER_MAC 0x0010
++#define RX_CFG1_RCV_PROMISCUOUS 0x0008
++#define RX_CFG1_INCLUDE_FCS 0x0004
++#define RX_CFG1_INCLUDE_PHY_HDR (WANT_PHY_HDR ? 0x0002 : 0)
++/* bit description
++ * 11 receive association requests etc.
++ * 10 receive authentication frames
++ * 9 receive beacon frames
++ * 8 receive contention free packets
++ * 7 receive control frames
++ * 6 receive data frames
++ * 5 receive broken frames
++ * 4 receive management frames
++ * 3 receive probe requests
++ * 2 receive probe responses
++ * 1 receive RTS/CTS/ACK frames
++ * 0 receive other
++ */
++#define RX_CFG2_RCV_ASSOC_REQ 0x0800
++#define RX_CFG2_RCV_AUTH_FRAMES 0x0400
++#define RX_CFG2_RCV_BEACON_FRAMES 0x0200
++#define RX_CFG2_RCV_CONTENTION_FREE 0x0100
++#define RX_CFG2_RCV_CTRL_FRAMES 0x0080
++#define RX_CFG2_RCV_DATA_FRAMES 0x0040
++#define RX_CFG2_RCV_BROKEN_FRAMES 0x0020
++#define RX_CFG2_RCV_MGMT_FRAMES 0x0010
++#define RX_CFG2_RCV_PROBE_REQ 0x0008
++#define RX_CFG2_RCV_PROBE_RESP 0x0004
++#define RX_CFG2_RCV_ACK_FRAMES 0x0002
++#define RX_CFG2_RCV_OTHER 0x0001
++
++/* For use with ACX1xx_IE_FEATURE_CONFIG */
++#define FEATURE1_80MHZ_CLOCK 0x00000040L
++#define FEATURE1_4X 0x00000020L
++#define FEATURE1_LOW_RX 0x00000008L
++#define FEATURE1_EXTRA_LOW_RX 0x00000001L
++
++#define FEATURE2_SNIFFER 0x00000080L
++#define FEATURE2_NO_TXCRYPT 0x00000001L
++
++/*-- get and set mask values --*/
++#define GETSET_LED_POWER 0x00000001L
++#define GETSET_STATION_ID 0x00000002L
++#define SET_TEMPLATES 0x00000004L
++#define SET_STA_LIST 0x00000008L
++#define GETSET_TX 0x00000010L
++#define GETSET_RX 0x00000020L
++#define SET_RXCONFIG 0x00000040L
++#define GETSET_ANTENNA 0x00000080L
++#define GETSET_SENSITIVITY 0x00000100L
++#define GETSET_TXPOWER 0x00000200L
++#define GETSET_ED_THRESH 0x00000400L
++#define GETSET_CCA 0x00000800L
++#define GETSET_POWER_80211 0x00001000L
++#define GETSET_RETRY 0x00002000L
++#define GETSET_REG_DOMAIN 0x00004000L
++#define GETSET_CHANNEL 0x00008000L
++/* Used when ESSID changes etc and we need to scan for AP anew */
++#define GETSET_RESCAN 0x00010000L
++#define GETSET_MODE 0x00020000L
++#define GETSET_WEP 0x00040000L
++#define SET_WEP_OPTIONS 0x00080000L
++#define SET_MSDU_LIFETIME 0x00100000L
++#define SET_RATE_FALLBACK 0x00200000L
++
++/* keep in sync with the above */
++#define GETSET_ALL (0 \
++/* GETSET_LED_POWER */ | 0x00000001L \
++/* GETSET_STATION_ID */ | 0x00000002L \
++/* SET_TEMPLATES */ | 0x00000004L \
++/* SET_STA_LIST */ | 0x00000008L \
++/* GETSET_TX */ | 0x00000010L \
++/* GETSET_RX */ | 0x00000020L \
++/* SET_RXCONFIG */ | 0x00000040L \
++/* GETSET_ANTENNA */ | 0x00000080L \
++/* GETSET_SENSITIVITY */| 0x00000100L \
++/* GETSET_TXPOWER */ | 0x00000200L \
++/* GETSET_ED_THRESH */ | 0x00000400L \
++/* GETSET_CCA */ | 0x00000800L \
++/* GETSET_POWER_80211 */| 0x00001000L \
++/* GETSET_RETRY */ | 0x00002000L \
++/* GETSET_REG_DOMAIN */ | 0x00004000L \
++/* GETSET_CHANNEL */ | 0x00008000L \
++/* GETSET_RESCAN */ | 0x00010000L \
++/* GETSET_MODE */ | 0x00020000L \
++/* GETSET_WEP */ | 0x00040000L \
++/* SET_WEP_OPTIONS */ | 0x00080000L \
++/* SET_MSDU_LIFETIME */ | 0x00100000L \
++/* SET_RATE_FALLBACK */ | 0x00200000L \
++ )
++
++
++/***********************************************************************
++** Firmware loading
++*/
++#include <linux/firmware.h> /* request_firmware() */
++#include <linux/pci.h> /* struct pci_device */
++
++
++/***********************************************************************
++*/
++typedef struct acx100_ie_memblocksize {
++ u16 type;
++ u16 len;
++ u16 size;
++} ACX_PACKED acx100_ie_memblocksize_t;
++
++typedef struct acx100_ie_queueconfig {
++ u16 type;
++ u16 len;
++ u32 AreaSize;
++ u32 RxQueueStart;
++ u8 QueueOptions;
++ u8 NumTxQueues;
++ u8 NumRxDesc; /* for USB only */
++ u8 pad1;
++ u32 QueueEnd;
++ u32 HostQueueEnd; /* QueueEnd2 */
++ u32 TxQueueStart;
++ u8 TxQueuePri;
++ u8 NumTxDesc;
++ u16 pad2;
++} ACX_PACKED acx100_ie_queueconfig_t;
++
++typedef struct acx111_ie_queueconfig {
++ u16 type;
++ u16 len;
++ u32 tx_memory_block_address;
++ u32 rx_memory_block_address;
++ u32 rx1_queue_address;
++ u32 reserved1;
++ u32 tx1_queue_address;
++ u8 tx1_attributes;
++ u16 reserved2;
++ u8 reserved3;
++} ACX_PACKED acx111_ie_queueconfig_t;
++
++typedef struct acx100_ie_memconfigoption {
++ u16 type;
++ u16 len;
++ u32 DMA_config;
++ acx_ptr pRxHostDesc;
++ u32 rx_mem;
++ u32 tx_mem;
++ u16 RxBlockNum;
++ u16 TxBlockNum;
++} ACX_PACKED acx100_ie_memconfigoption_t;
++
++typedef struct acx111_ie_memoryconfig {
++ u16 type;
++ u16 len;
++ u16 no_of_stations;
++ u16 memory_block_size;
++ u8 tx_rx_memory_block_allocation;
++ u8 count_rx_queues;
++ u8 count_tx_queues;
++ u8 options;
++ u8 fragmentation;
++ u16 reserved1;
++ u8 reserved2;
++
++ /* start of rx1 block */
++ u8 rx_queue1_count_descs;
++ u8 rx_queue1_reserved1;
++ u8 rx_queue1_type; /* must be set to 7 */
++ u8 rx_queue1_prio; /* must be set to 0 */
++ acx_ptr rx_queue1_host_rx_start;
++ /* end of rx1 block */
++
++ /* start of tx1 block */
++ u8 tx_queue1_count_descs;
++ u8 tx_queue1_reserved1;
++ u8 tx_queue1_reserved2;
++ u8 tx_queue1_attributes;
++ /* end of tx1 block */
++} ACX_PACKED acx111_ie_memoryconfig_t;
++
++typedef struct acx_ie_memmap {
++ u16 type;
++ u16 len;
++ u32 CodeStart;
++ u32 CodeEnd;
++ u32 WEPCacheStart;
++ u32 WEPCacheEnd;
++ u32 PacketTemplateStart;
++ u32 PacketTemplateEnd;
++ u32 QueueStart;
++ u32 QueueEnd;
++ u32 PoolStart;
++ u32 PoolEnd;
++} ACX_PACKED acx_ie_memmap_t;
++
++typedef struct acx111_ie_feature_config {
++ u16 type;
++ u16 len;
++ u32 feature_options;
++ u32 data_flow_options;
++} ACX_PACKED acx111_ie_feature_config_t;
++
++typedef struct acx111_ie_tx_level {
++ u16 type;
++ u16 len;
++ u8 level;
++} ACX_PACKED acx111_ie_tx_level_t;
++
++#define PS_CFG_ENABLE 0x80
++#define PS_CFG_PENDING 0x40 /* status flag when entering PS */
++#define PS_CFG_WAKEUP_MODE_MASK 0x07
++#define PS_CFG_WAKEUP_BY_HOST 0x03
++#define PS_CFG_WAKEUP_EACH_ITVL 0x02
++#define PS_CFG_WAKEUP_ON_DTIM 0x01
++#define PS_CFG_WAKEUP_ALL_BEAC 0x00
++
++/* Enhanced PS mode: sleep until Rx Beacon w/ the STA's AID bit set
++** in the TIM; newer firmwares only(?) */
++#define PS_OPT_ENA_ENHANCED_PS 0x04
++#define PS_OPT_TX_PSPOLL 0x02 /* send PSPoll frame to fetch waiting frames from AP (on frame with matching AID) */
++#define PS_OPT_STILL_RCV_BCASTS 0x01
++
++typedef struct acx100_ie_powersave {
++ u16 type;
++ u16 len;
++ u8 wakeup_cfg;
++ u8 listen_interval; /* for EACH_ITVL: wake up every "beacon units" interval */
++ u8 options;
++ u8 hangover_period; /* remaining wake time after Tx MPDU w/ PS bit, in values of 1/1024 seconds */
++ u16 enhanced_ps_transition_time; /* rem. wake time for Enh. PS */
++} ACX_PACKED acx100_ie_powersave_t;
++
++typedef struct acx111_ie_powersave {
++ u16 type;
++ u16 len;
++ u8 wakeup_cfg;
++ u8 listen_interval; /* for EACH_ITVL: wake up every "beacon units" interval */
++ u8 options;
++ u8 hangover_period; /* remaining wake time after Tx MPDU w/ PS bit, in values of 1/1024 seconds */
++ u32 beacon_rx_time;
++ u32 enhanced_ps_transition_time; /* rem. wake time for Enh. PS */
++} ACX_PACKED acx111_ie_powersave_t;
++
++
++/***********************************************************************
++** Commands and template structures
++*/
++
++/*
++** SCAN command structure
++**
++** even though acx100 scan rates match RATE100 constants,
++** acx111 ones do not match! Therefore we do not use RATE100 #defines */
++#define ACX_SCAN_RATE_1 10
++#define ACX_SCAN_RATE_2 20
++#define ACX_SCAN_RATE_5 55
++#define ACX_SCAN_RATE_11 110
++#define ACX_SCAN_RATE_22 220
++#define ACX_SCAN_RATE_PBCC 0x80 /* OR with this if needed */
++#define ACX_SCAN_OPT_ACTIVE 0x00 /* a bit mask */
++#define ACX_SCAN_OPT_PASSIVE 0x01
++/* Background scan: we go into Power Save mode (by transmitting
++** NULL data frame to AP with the power mgmt bit set), do the scan,
++** and then exit Power Save mode. A plus is that AP buffers frames
++** for us while we do background scan. Thus we avoid frame losses.
++** Background scan can be active or passive, just like normal one */
++#define ACX_SCAN_OPT_BACKGROUND 0x02
++typedef struct acx100_scan {
++ u16 count; /* number of scans to do, 0xffff == continuous */
++ u16 start_chan;
++ u16 flags; /* channel list mask; 0x8000 == all channels? */
++ u8 max_rate; /* max. probe rate */
++ u8 options; /* bit mask, see defines above */
++ u16 chan_duration;
++ u16 max_probe_delay;
++} ACX_PACKED acx100_scan_t; /* length 0xc */
++
++#define ACX111_SCAN_RATE_6 0x0B
++#define ACX111_SCAN_RATE_9 0x0F
++#define ACX111_SCAN_RATE_12 0x0A
++#define ACX111_SCAN_RATE_18 0x0E
++#define ACX111_SCAN_RATE_24 0x09
++#define ACX111_SCAN_RATE_36 0x0D
++#define ACX111_SCAN_RATE_48 0x08
++#define ACX111_SCAN_RATE_54 0x0C
++#define ACX111_SCAN_OPT_5GHZ 0x04 /* else 2.4GHZ */
++#define ACX111_SCAN_MOD_SHORTPRE 0x01 /* you can combine SHORTPRE and PBCC */
++#define ACX111_SCAN_MOD_PBCC 0x80
++#define ACX111_SCAN_MOD_OFDM 0x40
++typedef struct acx111_scan {
++ u16 count; /* number of scans to do */
++ u8 channel_list_select; /* 0: scan all channels, 1: from chan_list only */
++ u16 reserved1;
++ u8 reserved2;
++ u8 rate; /* rate for probe requests (if active scan) */
++ u8 options; /* bit mask, see defines above */
++ u16 chan_duration; /* min time to wait for reply on one channel (in TU) */
++ /* (active scan only) (802.11 section 11.1.3.2.2) */
++ u16 max_probe_delay; /* max time to wait for reply on one channel (active scan) */
++ /* time to listen on a channel (passive scan) */
++ u8 modulation;
++ u8 channel_list[26]; /* bits 7:0 first byte: channels 8:1 */
++ /* bits 7:0 second byte: channels 16:9 */
++ /* 26 bytes is enough to cover 802.11a */
++} ACX_PACKED acx111_scan_t;
++
++
++/*
++** Radio calibration command structure
++*/
++typedef struct acx111_cmd_radiocalib {
++/* 0x80000000 == automatic calibration by firmware, according to interval;
++ * bits 0..3: select calibration methods to go through:
++ * calib based on DC, AfeDC, Tx mismatch, Tx equilization */
++ u32 methods;
++ u32 interval;
++} ACX_PACKED acx111_cmd_radiocalib_t;
++
++
++/*
++** Packet template structures
++**
++** Packet templates store contents of Beacon, Probe response, Probe request,
++** Null data frame, and TIM data frame. Firmware automatically transmits
++** contents of template at appropriate time:
++** - Beacon: when configured as AP or Ad-hoc
++** - Probe response: when configured as AP or Ad-hoc, whenever
++** a Probe request frame is received
++** - Probe request: when host issues SCAN command (active)
++** - Null data frame: when entering 802.11 power save mode
++** - TIM data: at the end of Beacon frames (if no TIM template
++** is configured, then transmits default TIM)
++** NB:
++** - size field must be set to size of actual template
++** (NOT sizeof(struct) - templates are variable in length),
++** size field is not itself counted.
++** - members flagged with an asterisk must be initialized with host,
++** rest must be zero filled.
++** - variable length fields shown only in comments */
++typedef struct acx_template_tim {
++ u16 size;
++ u8 tim_eid; /* 00 1 TIM IE ID * */
++ u8 len; /* 01 1 Length * */
++ u8 dtim_cnt; /* 02 1 DTIM Count */
++ u8 dtim_period; /* 03 1 DTIM Period */
++ u8 bitmap_ctrl; /* 04 1 Bitmap Control * (except bit0) */
++ /* 05 n Partial Virtual Bitmap * */
++ u8 variable[0x100 - 1-1-1-1-1];
++} ACX_PACKED acx_template_tim_t;
++
++typedef struct acx_template_probereq {
++ u16 size;
++ u16 fc; /* 00 2 fc * */
++ u16 dur; /* 02 2 Duration */
++ u8 da[6]; /* 04 6 Destination Address * */
++ u8 sa[6]; /* 0A 6 Source Address * */
++ u8 bssid[6]; /* 10 6 BSSID * */
++ u16 seq; /* 16 2 Sequence Control */
++ /* 18 n SSID * */
++ /* nn n Supported Rates * */
++ u8 variable[0x44 - 2-2-6-6-6-2];
++} ACX_PACKED acx_template_probereq_t;
++
++typedef struct acx_template_proberesp {
++ u16 size;
++ u16 fc; /* 00 2 fc * (bits [15:12] and [10:8] per 802.11 section 7.1.3.1) */
++ u16 dur; /* 02 2 Duration */
++ u8 da[6]; /* 04 6 Destination Address */
++ u8 sa[6]; /* 0A 6 Source Address */
++ u8 bssid[6]; /* 10 6 BSSID */
++ u16 seq; /* 16 2 Sequence Control */
++ u8 timestamp[8];/* 18 8 Timestamp */
++ u16 beacon_interval; /* 20 2 Beacon Interval * */
++ u16 cap; /* 22 2 Capability Information * */
++ /* 24 n SSID * */
++ /* nn n Supported Rates * */
++ /* nn 1 DS Parameter Set * */
++ u8 variable[0x54 - 2-2-6-6-6-2-8-2-2];
++} ACX_PACKED acx_template_proberesp_t;
++#define acx_template_beacon_t acx_template_proberesp_t
++#define acx_template_beacon acx_template_proberesp
++
++typedef struct acx_template_nullframe {
++ u16 size;
++ struct wlan_hdr_a3 hdr;
++} ACX_PACKED acx_template_nullframe_t;
++
++
++/*
++** JOIN command structure
++**
++** as opposed to acx100, acx111 dtim interval is AFTER rates_basic111.
++** NOTE: took me about an hour to get !@#$%^& packing right --> struct packing is eeeeevil... */
++typedef struct acx_joinbss {
++ u8 bssid[ETH_ALEN];
++ u16 beacon_interval;
++ union {
++ struct {
++ u8 dtim_interval;
++ u8 rates_basic;
++ u8 rates_supported;
++ /*
++ * ARM compiler doesn't pack correctly unless unions
++ * inside structures are multiples of 4 bytes. Ugh.
++ */
++ u8 genfrm_txrate; /* generated frame (bcn, proberesp, RTS, PSpoll) tx rate */
++ } ACX_PACKED acx100;
++ struct {
++ u16 rates_basic;
++ u8 dtim_interval;
++ u8 genfrm_txrate; /* generated frame (bcn, proberesp, RTS, PSpoll) tx rate */
++ } ACX_PACKED acx111;
++ /*
++ * ARM compiler doesn't pack correctly unles unions are aligned on
++ * 4 byte boundaries and are multiples of 4 bytes.
++ */
++ struct {
++ u8 d1;
++ u8 d2;
++ u8 d3;
++ u8 genfrm_txrate;
++ } ACX_PACKED txrate;
++ } ACX_PACKED u;
++ u8 genfrm_mod_pre; /* generated frame modulation/preamble:
++ ** bit7: PBCC, bit6: OFDM (else CCK/DQPSK/DBPSK)
++ ** bit5: short pre */
++ u8 macmode; /* BSS Type, must be one of ACX_MODE_xxx */
++ u8 channel;
++ u8 essid_len;
++ char essid[IW_ESSID_MAX_SIZE];
++} ACX_PACKED acx_joinbss_t;
++
++#define JOINBSS_RATES_1 0x01
++#define JOINBSS_RATES_2 0x02
++#define JOINBSS_RATES_5 0x04
++#define JOINBSS_RATES_11 0x08
++#define JOINBSS_RATES_22 0x10
++
++/* Looks like missing bits are used to indicate 11g rates!
++** (it follows from the fact that constants below match 1:1 to RATE111_nn)
++** This was actually seen! Look at that Assoc Request sent by acx111,
++** it _does_ contain 11g rates in basic set:
++01:30:20.070772 Beacon (xxx) [1.0* 2.0* 5.5* 11.0* 6.0* 9.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit] ESS CH: 1
++01:30:20.074425 Authentication (Open System)-1: Succesful
++01:30:20.076539 Authentication (Open System)-2:
++01:30:20.076620 Acknowledgment
++01:30:20.088546 Assoc Request (xxx) [1.0* 2.0* 5.5* 6.0* 9.0* 11.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit]
++01:30:20.122413 Assoc Response AID(1) :: Succesful
++01:30:20.122679 Acknowledgment
++01:30:20.173204 Beacon (xxx) [1.0* 2.0* 5.5* 11.0* 6.0* 9.0* 12.0* 18.0* 24.0* 36.0* 48.0* 54.0* Mbit] ESS CH: 1
++*/
++#define JOINBSS_RATES_BASIC111_1 0x0001
++#define JOINBSS_RATES_BASIC111_2 0x0002
++#define JOINBSS_RATES_BASIC111_5 0x0004
++#define JOINBSS_RATES_BASIC111_11 0x0020
++#define JOINBSS_RATES_BASIC111_22 0x0100
++
++
++/***********************************************************************
++*/
++typedef struct mem_read_write {
++ u16 addr;
++ u16 type; /* 0x0 int. RAM / 0xffff MAC reg. / 0x81 PHY RAM / 0x82 PHY reg.; or maybe it's actually 0x30 for MAC? Better verify it by writing and reading back and checking whether the value holds! */
++ u32 len;
++ u32 data;
++} ACX_PACKED mem_read_write_t;
++
++typedef struct firmware_image {
++ u32 chksum;
++ u32 size;
++ u8 data[1]; /* the byte array of the actual firmware... */
++} ACX_PACKED firmware_image_t;
++
++typedef struct acx_cmd_radioinit {
++ u32 offset;
++ u32 len;
++} ACX_PACKED acx_cmd_radioinit_t;
++
++typedef struct acx100_ie_wep_options {
++ u16 type;
++ u16 len;
++ u16 NumKeys; /* max # of keys */
++ u8 WEPOption; /* 0 == decrypt default key only, 1 == override decrypt */
++ u8 Pad; /* used only for acx111 */
++} ACX_PACKED acx100_ie_wep_options_t;
++
++typedef struct ie_dot11WEPDefaultKey {
++ u16 type;
++ u16 len;
++ u8 action;
++ u8 keySize;
++ u8 defaultKeyNum;
++ u8 key[29]; /* check this! was Key[19] */
++} ACX_PACKED ie_dot11WEPDefaultKey_t;
++
++typedef struct acx111WEPDefaultKey {
++ u8 MacAddr[ETH_ALEN];
++ u16 action; /* NOTE: this is a u16, NOT a u8!! */
++ u16 reserved;
++ u8 keySize;
++ u8 type;
++ u8 index;
++ u8 defaultKeyNum;
++ u8 counter[6];
++ u8 key[32]; /* up to 32 bytes (for TKIP!) */
++} ACX_PACKED acx111WEPDefaultKey_t;
++
++typedef struct ie_dot11WEPDefaultKeyID {
++ u16 type;
++ u16 len;
++ u8 KeyID;
++} ACX_PACKED ie_dot11WEPDefaultKeyID_t;
++
++typedef struct acx100_cmd_wep_mgmt {
++ u8 MacAddr[ETH_ALEN];
++ u16 Action;
++ u16 KeySize;
++ u8 Key[29]; /* 29*8 == 232bits == WEP256 */
++} ACX_PACKED acx100_cmd_wep_mgmt_t;
++
++typedef struct acx_ie_generic {
++ u16 type;
++ u16 len;
++ union {
++ /* Association ID IE: just a 16bit value: */
++ u16 aid;
++ /* generic member for quick implementation of commands */
++ u8 bytes[32];
++ } ACX_PACKED m;
++} ACX_PACKED acx_ie_generic_t;
++
++/***********************************************************************
++*/
++#define CHECK_SIZEOF(type,size) { \
++ extern void BUG_bad_size_for_##type(void); \
++ if (sizeof(type)!=(size)) BUG_bad_size_for_##type(); \
++}
++
++static inline void
++acx_struct_size_check(void)
++{
++ CHECK_SIZEOF(txdesc_t, 0x30);
++ CHECK_SIZEOF(acx100_ie_memconfigoption_t, 24);
++ CHECK_SIZEOF(acx100_ie_queueconfig_t, 0x20);
++ CHECK_SIZEOF(acx_joinbss_t, 0x30);
++ /* IEs need 4 bytes for (type,len) tuple */
++ CHECK_SIZEOF(acx111_ie_configoption_t, ACX111_IE_CONFIG_OPTIONS_LEN + 4);
++}
++
++
++/***********************************************************************
++** Global data
++*/
++extern const u8 acx_bitpos2ratebyte[];
++extern const u8 acx_bitpos2rate100[];
++
++extern const u8 acx_reg_domain_ids[];
++extern const char * const acx_reg_domain_strings[];
++enum {
++ acx_reg_domain_ids_len = 8
++};
++
++extern const struct iw_handler_def acx_ioctl_handler_def;
+Index: linux-2.6.23/drivers/net/wireless/acx/common.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/common.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,7388 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/proc_fs.h>
++#include <linux/if_arp.h>
++#include <linux/rtnetlink.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <net/iw_handler.h>
++
++#include "acx_hw.h"
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++static client_t *acx_l_sta_list_alloc(acx_device_t *adev);
++static client_t *acx_l_sta_list_get_from_hash(acx_device_t *adev, const u8 *address);
++
++static int acx_l_process_data_frame_master(acx_device_t *adev, rxbuffer_t *rxbuf);
++static int acx_l_process_data_frame_client(acx_device_t *adev, rxbuffer_t *rxbuf);
++/* static int acx_l_process_NULL_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala); */
++static int acx_l_process_mgmt_frame(acx_device_t *adev, rxbuffer_t *rxbuf);
++static void acx_l_process_disassoc_from_sta(acx_device_t *adev, const wlan_fr_disassoc_t *req);
++static void acx_l_process_disassoc_from_ap(acx_device_t *adev, const wlan_fr_disassoc_t *req);
++static void acx_l_process_deauth_from_sta(acx_device_t *adev, const wlan_fr_deauthen_t *req);
++static void acx_l_process_deauth_from_ap(acx_device_t *adev, const wlan_fr_deauthen_t *req);
++static int acx_l_process_probe_response(acx_device_t *adev, wlan_fr_proberesp_t *req, const rxbuffer_t *rxbuf);
++static int acx_l_process_assocresp(acx_device_t *adev, const wlan_fr_assocresp_t *req);
++static int acx_l_process_reassocresp(acx_device_t *adev, const wlan_fr_reassocresp_t *req);
++static int acx_l_process_authen(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_assocresp(acx_device_t *adev, const wlan_fr_assocreq_t *req);
++static int acx_l_transmit_reassocresp(acx_device_t *adev, const wlan_fr_reassocreq_t *req);
++static int acx_l_transmit_deauthen(acx_device_t *adev, const u8 *addr, u16 reason);
++static int acx_l_transmit_authen1(acx_device_t *adev);
++static int acx_l_transmit_authen2(acx_device_t *adev, const wlan_fr_authen_t *req, client_t *clt);
++static int acx_l_transmit_authen3(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_authen4(acx_device_t *adev, const wlan_fr_authen_t *req);
++static int acx_l_transmit_assoc_req(acx_device_t *adev);
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG
++unsigned int acx_debug /* will add __read_mostly later */ = ACX_DEFAULT_MSG;
++/* parameter is 'debug', corresponding var is acx_debug */
++module_param_named(debug, acx_debug, uint, 0);
++MODULE_PARM_DESC(debug, "Debug level mask (see L_xxx constants)");
++#endif
++
++#ifdef MODULE_LICENSE
++MODULE_LICENSE("Dual MPL/GPL");
++#endif
++/* USB had this: MODULE_AUTHOR("Martin Wawro <martin.wawro AT uni-dortmund.de>"); */
++MODULE_AUTHOR("ACX100 Open Source Driver development team");
++MODULE_DESCRIPTION("Driver for TI ACX1xx based wireless cards (CardBus/PCI/USB)");
++
++
++/***********************************************************************
++*/
++/* Probably a number of acx's intermediate buffers for USB transfers,
++** not to be confused with number of descriptors in tx/rx rings
++** (which are not directly accessible to host in USB devices) */
++#define USB_RX_CNT 10
++#define USB_TX_CNT 10
++
++
++/***********************************************************************
++*/
++
++/* minutes to wait until next radio recalibration: */
++#define RECALIB_PAUSE 5
++
++/* Please keep acx_reg_domain_ids_len in sync... */
++const u8 acx_reg_domain_ids[acx_reg_domain_ids_len] =
++ { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40, 0x41, 0x51 };
++static const u16 reg_domain_channel_masks[acx_reg_domain_ids_len] =
++#ifdef ACX_ALLOW_ALLCHANNELS
++ { 0x3fff, 0x07ff, 0x1fff, 0x0600, 0x1e00, 0x2000, 0x3fff, 0x01fc };
++#else
++ { 0x07ff, 0x07ff, 0x1fff, 0x0600, 0x1e00, 0x2000, 0x3fff, 0x01fc };
++#endif
++const char * const
++acx_reg_domain_strings[] = {
++ /* 0 */ " 1-11 FCC (USA)",
++ /* 1 */ " 1-11 DOC/IC (Canada)",
++/* BTW: WLAN use in ETSI is regulated by ETSI standard EN 300 328-2 V1.1.2 */
++ /* 2 */ " 1-13 ETSI (Europe)",
++ /* 3 */ "10-11 Spain",
++ /* 4 */ "10-13 France",
++ /* 5 */ " 14 MKK (Japan)",
++ /* 6 */ " 1-14 MKK1",
++ /* 7 */ " 3-9 Israel (not all firmware versions)",
++ NULL /* needs to remain as last entry */
++};
++
++
++
++/***********************************************************************
++** Debugging support
++*/
++#ifdef PARANOID_LOCKING
++static unsigned max_lock_time;
++static unsigned max_sem_time;
++
++void
++acx_lock_unhold() { max_lock_time = 0; }
++void
++acx_sem_unhold() { max_sem_time = 0; }
++
++static inline const char*
++sanitize_str(const char *s)
++{
++ const char* t = strrchr(s, '/');
++ if (t) return t + 1;
++ return s;
++}
++
++void
++acx_lock_debug(acx_device_t *adev, const char* where)
++{
++ unsigned int count = 100*1000*1000;
++ where = sanitize_str(where);
++ while (--count) {
++ if (!spin_is_locked(&adev->lock)) break;
++ cpu_relax();
++ }
++ if (!count) {
++ printk(KERN_EMERG "LOCKUP: already taken at %s!\n", adev->last_lock);
++ BUG();
++ }
++ adev->last_lock = where;
++ rdtscl(adev->lock_time);
++}
++void
++acx_unlock_debug(acx_device_t *adev, const char* where)
++{
++#ifdef SMP
++ if (!spin_is_locked(&adev->lock)) {
++ where = sanitize_str(where);
++ printk(KERN_EMERG "STRAY UNLOCK at %s!\n", where);
++ BUG();
++ }
++#endif
++ if (acx_debug & L_LOCK) {
++ unsigned long diff;
++ rdtscl(diff);
++ diff -= adev->lock_time;
++ if (diff > max_lock_time) {
++ where = sanitize_str(where);
++ printk("max lock hold time %ld CPU ticks from %s "
++ "to %s\n", diff, adev->last_lock, where);
++ max_lock_time = diff;
++ }
++ }
++}
++void
++acx_down_debug(acx_device_t *adev, const char* where)
++{
++ int sem_count;
++ unsigned long timeout = jiffies + 5*HZ;
++
++ where = sanitize_str(where);
++
++ for (;;) {
++ sem_count = atomic_read(&adev->sem.count);
++ if (sem_count) break;
++ if (time_after(jiffies, timeout))
++ break;
++ msleep(5);
++ }
++ if (!sem_count) {
++ printk(KERN_EMERG "D STATE at %s! last sem at %s\n",
++ where, adev->last_sem);
++ dump_stack();
++ }
++ adev->last_sem = where;
++ adev->sem_time = jiffies;
++ down(&adev->sem);
++ if (acx_debug & L_LOCK) {
++ printk("%s: sem_down %d -> %d\n",
++ where, sem_count, atomic_read(&adev->sem.count));
++ }
++}
++void
++acx_up_debug(acx_device_t *adev, const char* where)
++{
++ int sem_count = atomic_read(&adev->sem.count);
++ if (sem_count) {
++ where = sanitize_str(where);
++ printk(KERN_EMERG "STRAY UP at %s! sem.count=%d\n", where, sem_count);
++ dump_stack();
++ }
++ if (acx_debug & L_LOCK) {
++ unsigned long diff = jiffies - adev->sem_time;
++ if (diff > max_sem_time) {
++ where = sanitize_str(where);
++ printk("max sem hold time %ld jiffies from %s "
++ "to %s\n", diff, adev->last_sem, where);
++ max_sem_time = diff;
++ }
++ }
++ up(&adev->sem);
++ if (acx_debug & L_LOCK) {
++ where = sanitize_str(where);
++ printk("%s: sem_up %d -> %d\n",
++ where, sem_count, atomic_read(&adev->sem.count));
++ }
++}
++#endif /* PARANOID_LOCKING */
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG > 1
++
++static int acx_debug_func_indent;
++#define DEBUG_TSC 0
++#define FUNC_INDENT_INCREMENT 2
++
++#if DEBUG_TSC
++#define TIMESTAMP(d) unsigned long d; rdtscl(d)
++#else
++#define TIMESTAMP(d) unsigned long d = jiffies
++#endif
++
++static const char
++spaces[] = " " " "; /* Nx10 spaces */
++
++void
++log_fn_enter(const char *funcname)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s==> %s\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname
++ );
++
++ acx_debug_func_indent += FUNC_INDENT_INCREMENT;
++}
++void
++log_fn_exit(const char *funcname)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ acx_debug_func_indent -= FUNC_INDENT_INCREMENT;
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s<== %s\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname
++ );
++}
++void
++log_fn_exit_v(const char *funcname, int v)
++{
++ int indent;
++ TIMESTAMP(d);
++
++ acx_debug_func_indent -= FUNC_INDENT_INCREMENT;
++
++ indent = acx_debug_func_indent;
++ if (indent >= sizeof(spaces))
++ indent = sizeof(spaces)-1;
++
++ printk("%08ld %s<== %s: %08X\n",
++ d % 100000000,
++ spaces + (sizeof(spaces)-1) - indent,
++ funcname,
++ v
++ );
++}
++#endif /* ACX_DEBUG > 1 */
++
++
++/***********************************************************************
++** Basically a msleep with logging
++*/
++void
++acx_s_msleep(int ms)
++{
++ FN_ENTER;
++ msleep(ms);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** Not inlined: it's larger than it seems
++*/
++void
++acx_print_mac(const char *head, const u8 *mac, const char *tail)
++{
++ printk("%s"MACSTR"%s", head, MAC(mac), tail);
++}
++
++
++/***********************************************************************
++** acx_get_status_name
++*/
++static const char*
++acx_get_status_name(u16 status)
++{
++ static const char * const str[] = {
++ "STOPPED", "SCANNING", "WAIT_AUTH",
++ "AUTHENTICATED", "ASSOCIATED", "INVALID??"
++ };
++ if (status > VEC_SIZE(str)-1)
++ status = VEC_SIZE(str)-1;
++
++ return str[status];
++}
++
++
++/***********************************************************************
++** acx_get_packet_type_string
++*/
++#if ACX_DEBUG
++const char*
++acx_get_packet_type_string(u16 fc)
++{
++ static const char * const mgmt_arr[] = {
++ "MGMT/AssocReq", "MGMT/AssocResp", "MGMT/ReassocReq",
++ "MGMT/ReassocResp", "MGMT/ProbeReq", "MGMT/ProbeResp",
++ "MGMT/UNKNOWN", "MGMT/UNKNOWN", "MGMT/Beacon", "MGMT/ATIM",
++ "MGMT/Disassoc", "MGMT/Authen", "MGMT/Deauthen"
++ };
++ static const char * const ctl_arr[] = {
++ "CTL/PSPoll", "CTL/RTS", "CTL/CTS", "CTL/Ack", "CTL/CFEnd",
++ "CTL/CFEndCFAck"
++ };
++ static const char * const data_arr[] = {
++ "DATA/DataOnly", "DATA/Data CFAck", "DATA/Data CFPoll",
++ "DATA/Data CFAck/CFPoll", "DATA/Null", "DATA/CFAck",
++ "DATA/CFPoll", "DATA/CFAck/CFPoll"
++ };
++ const char *str;
++ u8 fstype = (WF_FC_FSTYPE & fc) >> 4;
++ u8 ctl;
++
++ switch (WF_FC_FTYPE & fc) {
++ case WF_FTYPE_MGMT:
++ if (fstype < VEC_SIZE(mgmt_arr))
++ str = mgmt_arr[fstype];
++ else
++ str = "MGMT/UNKNOWN";
++ break;
++ case WF_FTYPE_CTL:
++ ctl = fstype - 0x0a;
++ if (ctl < VEC_SIZE(ctl_arr))
++ str = ctl_arr[ctl];
++ else
++ str = "CTL/UNKNOWN";
++ break;
++ case WF_FTYPE_DATA:
++ if (fstype < VEC_SIZE(data_arr))
++ str = data_arr[fstype];
++ else
++ str = "DATA/UNKNOWN";
++ break;
++ default:
++ str = "UNKNOWN";
++ break;
++ }
++ return str;
++}
++#endif
++
++
++/***********************************************************************
++** acx_wlan_reason_str
++*/
++static inline const char*
++acx_wlan_reason_str(u16 reason)
++{
++ static const char* const reason_str[] = {
++ /* 0 */ "?",
++ /* 1 */ "unspecified",
++ /* 2 */ "prev auth is not valid",
++ /* 3 */ "leaving BBS",
++ /* 4 */ "due to inactivity",
++ /* 5 */ "AP is busy",
++ /* 6 */ "got class 2 frame from non-auth'ed STA",
++ /* 7 */ "got class 3 frame from non-assoc'ed STA",
++ /* 8 */ "STA has left BSS",
++ /* 9 */ "assoc without auth is not allowed",
++ /* 10 */ "bad power setting (802.11h)",
++ /* 11 */ "bad channel (802.11i)",
++ /* 12 */ "?",
++ /* 13 */ "invalid IE",
++ /* 14 */ "MIC failure",
++ /* 15 */ "four-way handshake timeout",
++ /* 16 */ "group key handshake timeout",
++ /* 17 */ "IE is different",
++ /* 18 */ "invalid group cipher",
++ /* 19 */ "invalid pairwise cipher",
++ /* 20 */ "invalid AKMP",
++ /* 21 */ "unsupported RSN version",
++ /* 22 */ "invalid RSN IE cap",
++ /* 23 */ "802.1x failed",
++ /* 24 */ "cipher suite rejected"
++ };
++ return reason < VEC_SIZE(reason_str) ? reason_str[reason] : "?";
++}
++
++
++/***********************************************************************
++** acx_cmd_status_str
++*/
++const char*
++acx_cmd_status_str(unsigned int state)
++{
++ static const char * const cmd_error_strings[] = {
++ "Idle",
++ "Success",
++ "Unknown Command",
++ "Invalid Information Element",
++ "Channel rejected",
++ "Channel invalid in current regulatory domain",
++ "MAC invalid",
++ "Command rejected (read-only information element)",
++ "Command rejected",
++ "Already asleep",
++ "TX in progress",
++ "Already awake",
++ "Write only",
++ "RX in progress",
++ "Invalid parameter",
++ "Scan in progress",
++ "Failed"
++ };
++ return state < VEC_SIZE(cmd_error_strings) ?
++ cmd_error_strings[state] : "?";
++}
++
++
++/***********************************************************************
++** get_status_string
++*/
++static inline const char*
++get_status_string(unsigned int status)
++{
++ /* A bit shortened, but hopefully still understandable */
++ static const char * const status_str[] = {
++ /* 0 */ "Successful",
++ /* 1 */ "Unspecified failure",
++ /* 2 */ "reserved",
++ /* 3 */ "reserved",
++ /* 4 */ "reserved",
++ /* 5 */ "reserved",
++ /* 6 */ "reserved",
++ /* 7 */ "reserved",
++ /* 8 */ "reserved",
++ /* 9 */ "reserved",
++ /*10 */ "Cannot support all requested capabilities in Capability Information field",
++ /*11 */ "Reassoc denied (reason outside of 802.11b scope)",
++ /*12 */ "Assoc denied (reason outside of 802.11b scope) -- maybe MAC filtering by peer?",
++ /*13 */ "Responding station doesnt support specified auth algorithm -- maybe WEP auth Open vs. Restricted?",
++ /*14 */ "Auth rejected: wrong transaction sequence number",
++ /*15 */ "Auth rejected: challenge failure",
++ /*16 */ "Auth rejected: timeout for next frame in sequence",
++ /*17 */ "Assoc denied: too many STAs on this AP",
++ /*18 */ "Assoc denied: requesting STA doesnt support all data rates in basic set",
++ /*19 */ "Assoc denied: requesting STA doesnt support Short Preamble",
++ /*20 */ "Assoc denied: requesting STA doesnt support PBCC Modulation",
++ /*21 */ "Assoc denied: requesting STA doesnt support Channel Agility"
++ /*22 */ "reserved",
++ /*23 */ "reserved",
++ /*24 */ "reserved",
++ /*25 */ "Assoc denied: requesting STA doesnt support Short Slot Time",
++ /*26 */ "Assoc denied: requesting STA doesnt support DSSS-OFDM"
++ };
++
++ return status_str[status < VEC_SIZE(status_str) ? status : 2];
++}
++
++
++/***********************************************************************
++*/
++void
++acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr)
++{
++ if (acx_debug & L_ASSOC) {
++ int offset = (u8*)ie_ptr - (u8*)hdr;
++ printk("acx: unknown EID %d in mgmt frame at offset %d. IE: ",
++ ie_ptr->eid, offset);
++ /* IE len can be bogus, IE can extend past packet end. Oh well... */
++ acx_dump_bytes(ie_ptr, ie_ptr->len + 2);
++ if (acx_debug & L_DATA) {
++ printk("frame (%s): ",
++ acx_get_packet_type_string(le16_to_cpu(hdr->fc)));
++ acx_dump_bytes(hdr, len);
++ }
++ }
++}
++
++
++/***********************************************************************
++*/
++#if ACX_DEBUG
++void
++acx_dump_bytes(const void *data, int num)
++{
++ const u8* ptr = (const u8*)data;
++
++ if (num <= 0) {
++ printk("\n");
++ return;
++ }
++
++ while (num >= 16) {
++ printk( "%02X %02X %02X %02X %02X %02X %02X %02X "
++ "%02X %02X %02X %02X %02X %02X %02X %02X\n",
++ ptr[0], ptr[1], ptr[2], ptr[3],
++ ptr[4], ptr[5], ptr[6], ptr[7],
++ ptr[8], ptr[9], ptr[10], ptr[11],
++ ptr[12], ptr[13], ptr[14], ptr[15]);
++ num -= 16;
++ ptr += 16;
++ }
++ if (num > 0) {
++ while (--num > 0)
++ printk("%02X ", *ptr++);
++ printk("%02X\n", *ptr);
++ }
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_get_firmware_version
++*/
++void
++acx_s_get_firmware_version(acx_device_t *adev)
++{
++ fw_ver_t fw;
++ u8 hexarr[4] = { 0, 0, 0, 0 };
++ int hexidx = 0, val = 0;
++ const char *num;
++ char c;
++
++ FN_ENTER;
++
++ memset(fw.fw_id, 'E', FW_ID_SIZE);
++ acx_s_interrogate(adev, &fw, ACX1xx_IE_FWREV);
++ memcpy(adev->firmware_version, fw.fw_id, FW_ID_SIZE);
++ adev->firmware_version[FW_ID_SIZE] = '\0';
++
++ log(L_DEBUG, "fw_ver: fw_id='%s' hw_id=%08X\n",
++ adev->firmware_version, fw.hw_id);
++
++ if (strncmp(fw.fw_id, "Rev ", 4) != 0) {
++ printk("acx: strange firmware version string "
++ "'%s', please report\n", adev->firmware_version);
++ adev->firmware_numver = 0x01090407; /* assume 1.9.4.7 */
++ } else {
++ num = &fw.fw_id[4];
++ while (1) {
++ c = *num++;
++ if ((c == '.') || (c == '\0')) {
++ hexarr[hexidx++] = val;
++ if ((hexidx > 3) || (c == '\0')) /* end? */
++ break;
++ val = 0;
++ continue;
++ }
++ if ((c >= '0') && (c <= '9'))
++ c -= '0';
++ else
++ c = c - 'a' + (char)10;
++ val = val*16 + c;
++ }
++
++ adev->firmware_numver = (u32)(
++ (hexarr[0] << 24) | (hexarr[1] << 16)
++ | (hexarr[2] << 8) | hexarr[3]);
++ log(L_DEBUG, "firmware_numver 0x%08X\n", adev->firmware_numver);
++ }
++ if (IS_ACX111(adev)) {
++ if (adev->firmware_numver == 0x00010011) {
++ /* This one does not survive floodpinging */
++ printk("acx: firmware '%s' is known to be buggy, "
++ "please upgrade\n", adev->firmware_version);
++ }
++ }
++
++ adev->firmware_id = le32_to_cpu(fw.hw_id);
++
++ /* we're able to find out more detailed chip names now */
++ switch (adev->firmware_id & 0xffff0000) {
++ case 0x01010000:
++ case 0x01020000:
++ adev->chip_name = "TNETW1100A";
++ break;
++ case 0x01030000:
++ adev->chip_name = "TNETW1100B";
++ break;
++ case 0x03000000:
++ case 0x03010000:
++ adev->chip_name = "TNETW1130";
++ break;
++ case 0x04030000: /* 0x04030101 is TNETW1450 */
++ adev->chip_name = "TNETW1450";
++ break;
++ default:
++ printk("acx: unknown chip ID 0x%08X, "
++ "please report\n", adev->firmware_id);
++ break;
++ }
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_display_hardware_details
++**
++** Displays hw/fw version, radio type etc...
++*/
++void
++acx_display_hardware_details(acx_device_t *adev)
++{
++ const char *radio_str, *form_str;
++
++ FN_ENTER;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ radio_str = "Maxim";
++ break;
++ case RADIO_RFMD_11:
++ radio_str = "RFMD";
++ break;
++ case RADIO_RALINK_15:
++ radio_str = "Ralink";
++ break;
++ case RADIO_RADIA_16:
++ radio_str = "Radia";
++ break;
++ case RADIO_UNKNOWN_17:
++ /* TI seems to have a radio which is
++ * additionally 802.11a capable, too */
++ radio_str = "802.11a/b/g radio?! Please report";
++ break;
++ case RADIO_UNKNOWN_19:
++ radio_str = "A radio used by Safecom cards?! Please report";
++ break;
++ case RADIO_UNKNOWN_1B:
++ radio_str = "An unknown radio used by TNETW1450 USB adapters";
++ break;
++ default:
++ radio_str = "UNKNOWN, please report radio type name!";
++ break;
++ }
++
++ switch (adev->form_factor) {
++ case 0x00:
++ form_str = "unspecified";
++ break;
++ case 0x01:
++ form_str = "(mini-)PCI / CardBus";
++ break;
++ case 0x02:
++ form_str = "USB";
++ break;
++ case 0x03:
++ form_str = "Compact Flash";
++ break;
++ default:
++ form_str = "UNKNOWN, please report";
++ break;
++ }
++
++ printk("acx: === chipset %s, radio type 0x%02X (%s), "
++ "form factor 0x%02X (%s), EEPROM version 0x%02X: "
++ "uploaded firmware '%s' ===\n",
++ adev->chip_name, adev->radio_type, radio_str,
++ adev->form_factor, form_str, adev->eeprom_version,
++ adev->firmware_version);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++*/
++int
++acx_e_change_mtu(struct net_device *ndev, int mtu)
++{
++ enum {
++ MIN_MTU = 256,
++ MAX_MTU = WLAN_DATA_MAXLEN - (ETH_HLEN)
++ };
++
++ if (mtu < MIN_MTU || mtu > MAX_MTU)
++ return -EINVAL;
++
++ ndev->mtu = mtu;
++ return 0;
++}
++
++
++/***********************************************************************
++** acx_e_get_stats, acx_e_get_wireless_stats
++*/
++struct net_device_stats*
++acx_e_get_stats(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ return &adev->stats;
++}
++
++struct iw_statistics*
++acx_e_get_wireless_stats(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ return &adev->wstats;
++}
++
++
++/***********************************************************************
++** maps acx111 tx descr rate field to acx100 one
++*/
++const u8
++acx_bitpos2rate100[] = {
++ RATE100_1 ,/* 0 */
++ RATE100_2 ,/* 1 */
++ RATE100_5 ,/* 2 */
++ RATE100_2 ,/* 3, should not happen */
++ RATE100_2 ,/* 4, should not happen */
++ RATE100_11 ,/* 5 */
++ RATE100_2 ,/* 6, should not happen */
++ RATE100_2 ,/* 7, should not happen */
++ RATE100_22 ,/* 8 */
++ RATE100_2 ,/* 9, should not happen */
++ RATE100_2 ,/* 10, should not happen */
++ RATE100_2 ,/* 11, should not happen */
++ RATE100_2 ,/* 12, should not happen */
++ RATE100_2 ,/* 13, should not happen */
++ RATE100_2 ,/* 14, should not happen */
++ RATE100_2 ,/* 15, should not happen */
++};
++
++u8
++acx_rate111to100(u16 r) {
++ return acx_bitpos2rate100[highest_bit(r)];
++}
++
++
++/***********************************************************************
++** Calculate level like the feb 2003 windows driver seems to do
++*/
++static u8
++acx_signal_to_winlevel(u8 rawlevel)
++{
++ /* u8 winlevel = (u8) (0.5 + 0.625 * rawlevel); */
++ u8 winlevel = ((4 + (rawlevel * 5)) / 8);
++
++ if (winlevel > 100)
++ winlevel = 100;
++ return winlevel;
++}
++
++u8
++acx_signal_determine_quality(u8 signal, u8 noise)
++{
++ int qual;
++
++ qual = (((signal - 30) * 100 / 70) + (100 - noise * 4)) / 2;
++
++ if (qual > 100)
++ return 100;
++ if (qual < 0)
++ return 0;
++ return qual;
++}
++
++
++/***********************************************************************
++** Interrogate/configure commands
++*/
++
++/* FIXME: the lengths given here probably aren't always correct.
++ * They should be gradually replaced by proper "sizeof(acx1XX_ie_XXXX)-4",
++ * unless the firmware actually expects a different length than the struct length */
++static const u16
++acx100_ie_len[] = {
++ 0,
++ ACX100_IE_ACX_TIMER_LEN,
++ sizeof(acx100_ie_powersave_t)-4, /* is that 6 or 8??? */
++ ACX1xx_IE_QUEUE_CONFIG_LEN,
++ ACX100_IE_BLOCK_SIZE_LEN,
++ ACX1xx_IE_MEMORY_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_RATE_FALLBACK_LEN,
++ ACX100_IE_WEP_OPTIONS_LEN,
++ ACX1xx_IE_MEMORY_MAP_LEN, /* ACX1xx_IE_SSID_LEN, */
++ 0,
++ ACX1xx_IE_ASSOC_ID_LEN,
++ 0,
++ ACX111_IE_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_FWREV_LEN,
++ ACX1xx_IE_FCS_ERROR_COUNT_LEN,
++ ACX1xx_IE_MEDIUM_USAGE_LEN,
++ ACX1xx_IE_RXCONFIG_LEN,
++ 0,
++ 0,
++ sizeof(fw_stats_t)-4,
++ 0,
++ ACX1xx_IE_FEATURE_CONFIG_LEN,
++ ACX111_IE_KEY_CHOOSE_LEN,
++ ACX1FF_IE_MISC_CONFIG_TABLE_LEN,
++ ACX1FF_IE_WONE_CONFIG_LEN,
++ 0,
++ ACX1FF_IE_TID_CONFIG_LEN,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_CALIB_ASSESSMENT_LEN,
++ ACX1FF_IE_BEACON_FILTER_OPTIONS_LEN,
++ ACX1FF_IE_LOW_RSSI_THRESH_OPT_LEN,
++ ACX1FF_IE_NOISE_HISTOGRAM_RESULTS_LEN,
++ 0,
++ ACX1FF_IE_PACKET_DETECT_THRESH_LEN,
++ ACX1FF_IE_TX_CONFIG_OPTIONS_LEN,
++ ACX1FF_IE_CCA_THRESHOLD_LEN,
++ ACX1FF_IE_EVENT_MASK_LEN,
++ ACX1FF_IE_DTIM_PERIOD_LEN,
++ 0,
++ ACX1FF_IE_ACI_CONFIG_SET_LEN,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_EEPROM_VER_LEN,
++};
++
++static const u16
++acx100_ie_len_dot11[] = {
++ 0,
++ ACX1xx_IE_DOT11_STATION_ID_LEN,
++ 0,
++ ACX100_IE_DOT11_BEACON_PERIOD_LEN,
++ ACX1xx_IE_DOT11_DTIM_PERIOD_LEN,
++ ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN,
++ ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN,
++ ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE_LEN,
++ ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN,
++ 0,
++ ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN_LEN,
++ ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN,
++ 0,
++ ACX1xx_IE_DOT11_TX_POWER_LEVEL_LEN,
++ ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN,
++ ACX100_IE_DOT11_ED_THRESHOLD_LEN,
++ ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET_LEN,
++ 0,
++ 0,
++ 0,
++};
++
++static const u16
++acx111_ie_len[] = {
++ 0,
++ ACX100_IE_ACX_TIMER_LEN,
++ sizeof(acx111_ie_powersave_t)-4,
++ ACX1xx_IE_QUEUE_CONFIG_LEN,
++ ACX100_IE_BLOCK_SIZE_LEN,
++ ACX1xx_IE_MEMORY_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_RATE_FALLBACK_LEN,
++ ACX100_IE_WEP_OPTIONS_LEN,
++ ACX1xx_IE_MEMORY_MAP_LEN, /* ACX1xx_IE_SSID_LEN, */
++ 0,
++ ACX1xx_IE_ASSOC_ID_LEN,
++ 0,
++ ACX111_IE_CONFIG_OPTIONS_LEN,
++ ACX1xx_IE_FWREV_LEN,
++ ACX1xx_IE_FCS_ERROR_COUNT_LEN,
++ ACX1xx_IE_MEDIUM_USAGE_LEN,
++ ACX1xx_IE_RXCONFIG_LEN,
++ 0,
++ 0,
++ sizeof(fw_stats_t)-4,
++ 0,
++ ACX1xx_IE_FEATURE_CONFIG_LEN,
++ ACX111_IE_KEY_CHOOSE_LEN,
++ ACX1FF_IE_MISC_CONFIG_TABLE_LEN,
++ ACX1FF_IE_WONE_CONFIG_LEN,
++ 0,
++ ACX1FF_IE_TID_CONFIG_LEN,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_CALIB_ASSESSMENT_LEN,
++ ACX1FF_IE_BEACON_FILTER_OPTIONS_LEN,
++ ACX1FF_IE_LOW_RSSI_THRESH_OPT_LEN,
++ ACX1FF_IE_NOISE_HISTOGRAM_RESULTS_LEN,
++ 0,
++ ACX1FF_IE_PACKET_DETECT_THRESH_LEN,
++ ACX1FF_IE_TX_CONFIG_OPTIONS_LEN,
++ ACX1FF_IE_CCA_THRESHOLD_LEN,
++ ACX1FF_IE_EVENT_MASK_LEN,
++ ACX1FF_IE_DTIM_PERIOD_LEN,
++ 0,
++ ACX1FF_IE_ACI_CONFIG_SET_LEN,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ ACX1FF_IE_EEPROM_VER_LEN,
++};
++
++static const u16
++acx111_ie_len_dot11[] = {
++ 0,
++ ACX1xx_IE_DOT11_STATION_ID_LEN,
++ 0,
++ ACX100_IE_DOT11_BEACON_PERIOD_LEN,
++ ACX1xx_IE_DOT11_DTIM_PERIOD_LEN,
++ ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN,
++ ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN,
++ ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE_LEN,
++ ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN,
++ 0,
++ ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN_LEN,
++ ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN,
++ 0,
++ ACX1xx_IE_DOT11_TX_POWER_LEVEL_LEN,
++ ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN,
++ ACX100_IE_DOT11_ED_THRESHOLD_LEN,
++ ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET_LEN,
++ 0,
++ 0,
++ 0,
++};
++
++
++#undef FUNC
++#define FUNC "configure"
++#if !ACX_DEBUG
++int
++acx_s_configure(acx_device_t *adev, void *pdr, int type)
++{
++#else
++int
++acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* typestr)
++{
++#endif
++ u16 len;
++ int res;
++
++ if (type < 0x1000)
++ len = adev->ie_len[type];
++ else
++ len = adev->ie_len_dot11[type - 0x1000];
++
++ log(L_CTL, FUNC"(type:%s,len:%u)\n", typestr, len);
++ if (unlikely(!len)) {
++ log(L_DEBUG, "zero-length type %s?!\n", typestr);
++ }
++
++ ((acx_ie_generic_t *)pdr)->type = cpu_to_le16(type);
++ ((acx_ie_generic_t *)pdr)->len = cpu_to_le16(len);
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIGURE, pdr, len + 4);
++ if (unlikely(OK != res)) {
++#if ACX_DEBUG
++ printk("%s: "FUNC"(type:%s) FAILED\n", adev->ndev->name, typestr);
++#else
++ printk("%s: "FUNC"(type:0x%X) FAILED\n", adev->ndev->name, type);
++#endif
++ /* dump_stack() is already done in issue_cmd() */
++ }
++ return res;
++}
++
++#undef FUNC
++#define FUNC "interrogate"
++#if !ACX_DEBUG
++int
++acx_s_interrogate(acx_device_t *adev, void *pdr, int type)
++{
++#else
++int
++acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type,
++ const char* typestr)
++{
++#endif
++ u16 len;
++ int res;
++
++ /* FIXME: no check whether this exceeds the array yet.
++ * We should probably remember the number of entries... */
++ if (type < 0x1000)
++ len = adev->ie_len[type];
++ else
++ len = adev->ie_len_dot11[type-0x1000];
++
++ log(L_CTL, FUNC"(type:%s,len:%u)\n", typestr, len);
++
++ ((acx_ie_generic_t *)pdr)->type = cpu_to_le16(type);
++ ((acx_ie_generic_t *)pdr)->len = cpu_to_le16(len);
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_INTERROGATE, pdr, len + 4);
++ if (unlikely(OK != res)) {
++#if ACX_DEBUG
++ printk("%s: "FUNC"(type:%s) FAILED\n", adev->ndev->name, typestr);
++#else
++ printk("%s: "FUNC"(type:0x%X) FAILED\n", adev->ndev->name, type);
++#endif
++ /* dump_stack() is already done in issue_cmd() */
++ }
++ return res;
++}
++
++#if CMD_DISCOVERY
++void
++great_inquisitor(acx_device_t *adev)
++{
++ static struct {
++ u16 type;
++ u16 len;
++ /* 0x200 was too large here: */
++ u8 data[0x100 - 4];
++ } ACX_PACKED ie;
++ u16 type;
++
++ FN_ENTER;
++
++ /* 0..0x20, 0x1000..0x1020 */
++ for (type = 0; type <= 0x1020; type++) {
++ if (type == 0x21)
++ type = 0x1000;
++ ie.type = cpu_to_le16(type);
++ ie.len = cpu_to_le16(sizeof(ie) - 4);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_INTERROGATE, &ie, sizeof(ie));
++ }
++ FN_EXIT0;
++}
++#endif
++
++
++#ifdef CONFIG_PROC_FS
++/***********************************************************************
++** /proc files
++*/
++/***********************************************************************
++** acx_l_proc_output
++** Generate content for our /proc entry
++**
++** Arguments:
++** buf is a pointer to write output to
++** adev is the usual pointer to our private struct acx_device
++** Returns:
++** number of bytes actually written to buf
++** Side effects:
++** none
++*/
++static int
++acx_l_proc_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ p += sprintf(p,
++ "acx driver version:\t\t" ACX_RELEASE "\n"
++ "Wireless extension version:\t" STRING(WIRELESS_EXT) "\n"
++ "chip name:\t\t\t%s (0x%08X)\n"
++ "radio type:\t\t\t0x%02X\n"
++ "form factor:\t\t\t0x%02X\n"
++ "EEPROM version:\t\t\t0x%02X\n"
++ "firmware version:\t\t%s (0x%08X)\n",
++ adev->chip_name, adev->firmware_id,
++ adev->radio_type,
++ adev->form_factor,
++ adev->eeprom_version,
++ adev->firmware_version, adev->firmware_numver);
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ p += sprintf(p, "BSS %u BSSID "MACSTR" ESSID %s channel %u "
++ "Cap 0x%X SIR %u SNR %u\n",
++ i, MAC(bss->bssid), (char*)bss->essid, bss->channel,
++ bss->cap_info, bss->sir, bss->snr);
++ }
++ p += sprintf(p, "status:\t\t\t%u (%s)\n",
++ adev->status, acx_get_status_name(adev->status));
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_proc_diag_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ unsigned long flags;
++ unsigned int len = 0, partlen;
++ u32 temp1, temp2;
++ u8 *st, *st_end;
++#ifdef __BIG_ENDIAN
++ u8 *st2;
++#endif
++ fw_stats_t *fw_stats;
++ char *part_str = NULL;
++ fw_stats_tx_t *tx = NULL;
++ fw_stats_rx_t *rx = NULL;
++ fw_stats_dma_t *dma = NULL;
++ fw_stats_irq_t *irq = NULL;
++ fw_stats_wep_t *wep = NULL;
++ fw_stats_pwr_t *pwr = NULL;
++ fw_stats_mic_t *mic = NULL;
++ fw_stats_aes_t *aes = NULL;
++ fw_stats_event_t *evt = NULL;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++#if defined (ACX_MEM)
++ p = acxmem_s_proc_diag_output(p, adev);
++#else
++ if (IS_PCI(adev))
++ p = acxpci_s_proc_diag_output(p, adev);
++#endif
++
++ p += sprintf(p,
++ "\n"
++ "** network status **\n"
++ "dev_state_mask 0x%04X\n"
++ "status %u (%s), "
++ "mode %u, channel %u, "
++ "reg_dom_id 0x%02X, reg_dom_chanmask 0x%04X, ",
++ adev->dev_state_mask,
++ adev->status, acx_get_status_name(adev->status),
++ adev->mode, adev->channel,
++ adev->reg_dom_id, adev->reg_dom_chanmask
++ );
++ p += sprintf(p,
++ "ESSID \"%s\", essid_active %d, essid_len %d, "
++ "essid_for_assoc \"%s\", nick \"%s\"\n"
++ "WEP ena %d, restricted %d, idx %d\n",
++ adev->essid, adev->essid_active, (int)adev->essid_len,
++ adev->essid_for_assoc, adev->nick,
++ adev->wep_enabled, adev->wep_restricted,
++ adev->wep_current_index);
++ p += sprintf(p, "dev_addr "MACSTR"\n", MAC(adev->dev_addr));
++ p += sprintf(p, "bssid "MACSTR"\n", MAC(adev->bssid));
++ p += sprintf(p, "ap_filter "MACSTR"\n", MAC(adev->ap));
++
++ p += sprintf(p,
++ "\n"
++ "** PHY status **\n"
++ "tx_disabled %d, tx_level_dbm %d\n" /* "tx_level_val %d, tx_level_auto %d\n" */
++ "sensitivity %d, antenna 0x%02X, ed_threshold %d, cca %d, preamble_mode %d\n"
++ "rate_basic 0x%04X, rate_oper 0x%04X\n"
++ "rts_threshold %d, frag_threshold %d, short_retry %d, long_retry %d\n"
++ "msdu_lifetime %d, listen_interval %d, beacon_interval %d\n",
++ adev->tx_disabled, adev->tx_level_dbm, /* adev->tx_level_val, adev->tx_level_auto, */
++ adev->sensitivity, adev->antenna, adev->ed_threshold, adev->cca, adev->preamble_mode,
++ adev->rate_basic, adev->rate_oper,
++ adev->rts_threshold, adev->frag_threshold, adev->short_retry, adev->long_retry,
++ adev->msdu_lifetime, adev->listen_interval, adev->beacon_interval);
++
++ acx_unlock(adev, flags);
++
++ p += sprintf(p,
++ "\n"
++ "** Firmware **\n"
++ "NOTE: version dependent statistics layout, "
++ "please report if you suspect wrong parsing!\n"
++ "\n"
++ "version \"%s\"\n", adev->firmware_version);
++
++ /* TODO: may replace kmalloc/memset with kzalloc once
++ * Linux 2.6.14 is widespread */
++ fw_stats = kmalloc(sizeof(*fw_stats), GFP_KERNEL);
++ if (!fw_stats) {
++ FN_EXIT1(0);
++ return 0;
++ }
++ memset(fw_stats, 0, sizeof(*fw_stats));
++
++ st = (u8 *)fw_stats;
++
++ part_str = "statistics query command";
++
++ if (OK != acx_s_interrogate(adev, st, ACX1xx_IE_FIRMWARE_STATISTICS))
++ goto fw_stats_end;
++
++ st += sizeof(u16);
++ len = *(u16 *)st;
++
++ if (len > sizeof(*fw_stats)) {
++ p += sprintf(p,
++ "firmware version with bigger fw_stats struct detected\n"
++ "(%u vs. %u), please report\n", len, sizeof(fw_stats_t));
++ if (len > sizeof(*fw_stats)) {
++ p += sprintf(p, "struct size exceeded allocation!\n");
++ len = sizeof(*fw_stats);
++ }
++ }
++ st += sizeof(u16);
++ st_end = st - 2*sizeof(u16) + len;
++
++#ifdef __BIG_ENDIAN
++ /* let's make one bold assumption here:
++ * (hopefully!) *all* statistics fields are u32 only,
++ * thus if we need to make endianness corrections
++ * we can simply do them in one go, in advance */
++ st2 = (u8 *)fw_stats;
++ for (temp1 = 0; temp1 < len; temp1 += 4, st2 += 4)
++ *(u32 *)st2 = le32_to_cpu(*(u32 *)st2);
++#endif
++
++ part_str = "Rx/Tx";
++
++ /* directly at end of a struct part? --> no error! */
++ if (st == st_end)
++ goto fw_stats_end;
++
++ tx = (fw_stats_tx_t *)st;
++ st += sizeof(fw_stats_tx_t);
++ rx = (fw_stats_rx_t *)st;
++ st += sizeof(fw_stats_rx_t);
++ partlen = sizeof(fw_stats_tx_t) + sizeof(fw_stats_rx_t);
++
++ if (IS_ACX100(adev)) {
++ /* at least ACX100 PCI F/W 1.9.8.b
++ * and ACX100 USB F/W 1.0.7-USB
++ * don't have those two fields... */
++ st -= 2*sizeof(u32);
++
++ /* our parsing doesn't quite match this firmware yet,
++ * log failure */
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = temp2 = 999999999;
++ } else {
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = rx->rx_aci_events;
++ temp2 = rx->rx_aci_resets;
++ }
++
++ p += sprintf(p,
++ "%s:\n"
++ " tx_desc_overfl %u\n"
++ " rx_OutOfMem %u, rx_hdr_overfl %u, rx_hw_stuck %u\n"
++ " rx_dropped_frame %u, rx_frame_ptr_err %u, rx_xfr_hint_trig %u\n"
++ " rx_aci_events %u, rx_aci_resets %u\n",
++ part_str,
++ tx->tx_desc_of,
++ rx->rx_oom,
++ rx->rx_hdr_of,
++ rx->rx_hw_stuck,
++ rx->rx_dropped_frame,
++ rx->rx_frame_ptr_err,
++ rx->rx_xfr_hint_trig,
++ temp1,
++ temp2);
++
++ part_str = "DMA";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ dma = (fw_stats_dma_t *)st;
++ partlen = sizeof(fw_stats_dma_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " rx_dma_req %u, rx_dma_err %u, tx_dma_req %u, tx_dma_err %u\n",
++ part_str,
++ dma->rx_dma_req,
++ dma->rx_dma_err,
++ dma->tx_dma_req,
++ dma->tx_dma_err);
++
++ part_str = "IRQ";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ irq = (fw_stats_irq_t *)st;
++ partlen = sizeof(fw_stats_irq_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " cmd_cplt %u, fiq %u\n"
++ " rx_hdrs %u, rx_cmplt %u, rx_mem_overfl %u, rx_rdys %u\n"
++ " irqs %u, tx_procs %u, decrypt_done %u\n"
++ " dma_0_done %u, dma_1_done %u, tx_exch_complet %u\n"
++ " commands %u, rx_procs %u, hw_pm_mode_changes %u\n"
++ " host_acks %u, pci_pm %u, acm_wakeups %u\n",
++ part_str,
++ irq->cmd_cplt,
++ irq->fiq,
++ irq->rx_hdrs,
++ irq->rx_cmplt,
++ irq->rx_mem_of,
++ irq->rx_rdys,
++ irq->irqs,
++ irq->tx_procs,
++ irq->decrypt_done,
++ irq->dma_0_done,
++ irq->dma_1_done,
++ irq->tx_exch_complet,
++ irq->commands,
++ irq->rx_procs,
++ irq->hw_pm_mode_changes,
++ irq->host_acks,
++ irq->pci_pm,
++ irq->acm_wakeups);
++
++ part_str = "WEP";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ wep = (fw_stats_wep_t *)st;
++ partlen = sizeof(fw_stats_wep_t);
++ st += partlen;
++
++ if (
++ (IS_PCI(adev) && IS_ACX100(adev))
++ || (IS_USB(adev) && IS_ACX100(adev))
++ || (IS_MEM(adev) && IS_ACX100(adev))
++ ) {
++ /* at least ACX100 PCI F/W 1.9.8.b,
++ * ACX100 USB F/W 1.0.7-USB
++ * and ACX100 Generic Slave F/W 1.10.7.K
++ * don't have those two fields...
++ */
++ st -= 2*sizeof(u32);
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = temp2 = 999999999;
++ } else {
++ if (st > st_end)
++ goto fw_stats_fail;
++ temp1 = wep->wep_pkt_decrypt;
++ temp2 = wep->wep_decrypt_irqs;
++ }
++
++ p += sprintf(p,
++ "%s:\n"
++ " wep_key_count %u, wep_default_key_count %u, dot11_def_key_mib %u\n"
++ " wep_key_not_found %u, wep_decrypt_fail %u\n"
++ " wep_pkt_decrypt %u, wep_decrypt_irqs %u\n",
++ part_str,
++ wep->wep_key_count,
++ wep->wep_default_key_count,
++ wep->dot11_def_key_mib,
++ wep->wep_key_not_found,
++ wep->wep_decrypt_fail,
++ temp1,
++ temp2);
++
++ part_str = "power";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ pwr = (fw_stats_pwr_t *)st;
++ partlen = sizeof(fw_stats_pwr_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " tx_start_ctr %u, no_ps_tx_too_short %u\n"
++ " rx_start_ctr %u, no_ps_rx_too_short %u\n"
++ " lppd_started %u\n"
++ " no_lppd_too_noisy %u, no_lppd_too_short %u, no_lppd_matching_frame %u\n",
++ part_str,
++ pwr->tx_start_ctr,
++ pwr->no_ps_tx_too_short,
++ pwr->rx_start_ctr,
++ pwr->no_ps_rx_too_short,
++ pwr->lppd_started,
++ pwr->no_lppd_too_noisy,
++ pwr->no_lppd_too_short,
++ pwr->no_lppd_matching_frame);
++
++ part_str = "MIC";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ mic = (fw_stats_mic_t *)st;
++ partlen = sizeof(fw_stats_mic_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " mic_rx_pkts %u, mic_calc_fail %u\n",
++ part_str,
++ mic->mic_rx_pkts,
++ mic->mic_calc_fail);
++
++ part_str = "AES";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ aes = (fw_stats_aes_t *)st;
++ partlen = sizeof(fw_stats_aes_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " aes_enc_fail %u, aes_dec_fail %u\n"
++ " aes_enc_pkts %u, aes_dec_pkts %u\n"
++ " aes_enc_irq %u, aes_dec_irq %u\n",
++ part_str,
++ aes->aes_enc_fail,
++ aes->aes_dec_fail,
++ aes->aes_enc_pkts,
++ aes->aes_dec_pkts,
++ aes->aes_enc_irq,
++ aes->aes_dec_irq);
++
++ part_str = "event";
++
++ if (st == st_end)
++ goto fw_stats_end;
++
++ evt = (fw_stats_event_t *)st;
++ partlen = sizeof(fw_stats_event_t);
++ st += partlen;
++
++ if (st > st_end)
++ goto fw_stats_fail;
++
++ p += sprintf(p,
++ "%s:\n"
++ " heartbeat %u, calibration %u\n"
++ " rx_mismatch %u, rx_mem_empty %u, rx_pool %u\n"
++ " oom_late %u\n"
++ " phy_tx_err %u, tx_stuck %u\n",
++ part_str,
++ evt->heartbeat,
++ evt->calibration,
++ evt->rx_mismatch,
++ evt->rx_mem_empty,
++ evt->rx_pool,
++ evt->oom_late,
++ evt->phy_tx_err,
++ evt->tx_stuck);
++
++ if (st < st_end)
++ goto fw_stats_bigger;
++
++ goto fw_stats_end;
++
++fw_stats_fail:
++ st -= partlen;
++ p += sprintf(p,
++ "failed at %s part (size %u), offset %u (struct size %u), "
++ "please report\n", part_str, partlen,
++ (int)st - (int)fw_stats, len);
++
++fw_stats_bigger:
++ for (; st < st_end; st += 4)
++ p += sprintf(p,
++ "UNKN%3d: %u\n", (int)st - (int)fw_stats, *(u32 *)st);
++
++fw_stats_end:
++ kfree(fw_stats);
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_proc_phy_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ /*
++ if (RADIO_RFMD_11 != adev->radio_type) {
++ printk("sorry, not yet adapted for radio types "
++ "other than RFMD, please verify "
++ "PHY size etc. first!\n");
++ goto end;
++ }
++ */
++
++ /* The PHY area is only 0x80 bytes long; further pages after that
++ * only have some page number registers with altered value,
++ * all other registers remain the same. */
++ for (i = 0; i < 0x80; i++) {
++ acx_s_read_phy_reg(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++** acx_e_read_proc_XXXX
++** Handle our /proc entry
++**
++** Arguments:
++** standard kernel read_proc interface
++** Returns:
++** number of bytes written to buf
++** Side effects:
++** none
++*/
++static int
++acx_e_read_proc(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ unsigned long flags;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++ /* fill buf */
++ length = acx_l_proc_output(buf, adev);
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static char _buf[32768];
++static int
++acx_e_read_proc_diag(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ /* fill buf */
++ length = acx_s_proc_diag_output(_buf, adev);
++ acx_sem_unlock(adev);
++
++ memcpy(buf, _buf + offset, count);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = count;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static int
++acx_e_read_proc_eeprom(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ /* fill buf */
++ length = 0;
++#if defined (ACX_MEM)
++ acx_sem_lock(adev);
++ length = acxmem_proc_eeprom_output(buf, adev);
++ acx_sem_unlock(adev);
++#else
++ if (IS_PCI(adev)) {
++ acx_sem_lock(adev);
++ length = acxpci_proc_eeprom_output(buf, adev);
++ acx_sem_unlock(adev);
++ }
++#endif
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++static int
++acx_e_read_proc_phy(char *buf, char **start, off_t offset, int count,
++ int *eof, void *data)
++{
++ acx_device_t *adev = (acx_device_t*)data;
++ int length;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ /* fill buf */
++ length = acx_s_proc_phy_output(buf, adev);
++ acx_sem_unlock(adev);
++
++ /* housekeeping */
++ if (length <= offset + count)
++ *eof = 1;
++ *start = buf + offset;
++ length -= offset;
++ if (length > count)
++ length = count;
++ if (length < 0)
++ length = 0;
++ FN_EXIT1(length);
++ return length;
++}
++
++
++/***********************************************************************
++** /proc files registration
++*/
++static const char * const
++proc_files[] = { "", "_diag", "_eeprom", "_phy" };
++
++static read_proc_t * const
++proc_funcs[] = {
++ acx_e_read_proc,
++ acx_e_read_proc_diag,
++ acx_e_read_proc_eeprom,
++ acx_e_read_proc_phy
++};
++
++static int
++manage_proc_entries(const struct net_device *ndev, int remove)
++{
++ acx_device_t *adev = ndev2adev((struct net_device *)ndev);
++ char procbuf[80];
++ int i;
++
++ for (i = 0; i < VEC_SIZE(proc_files); i++) {
++ snprintf(procbuf, sizeof(procbuf),
++ "driver/acx_%s%s", ndev->name, proc_files[i]);
++ log(L_INIT, "%sing /proc entry %s\n",
++ remove ? "remov" : "creat", procbuf);
++ if (!remove) {
++ if (!create_proc_read_entry(procbuf, 0, 0, proc_funcs[i], adev)) {
++ printk("acx: cannot register /proc entry %s\n", procbuf);
++ return NOT_OK;
++ }
++ } else {
++ remove_proc_entry(procbuf, NULL);
++ }
++ }
++ return OK;
++}
++
++int
++acx_proc_register_entries(const struct net_device *ndev)
++{
++ return manage_proc_entries(ndev, 0);
++}
++
++int
++acx_proc_unregister_entries(const struct net_device *ndev)
++{
++ return manage_proc_entries(ndev, 1);
++}
++#endif /* CONFIG_PROC_FS */
++
++
++/***********************************************************************
++** acx_cmd_join_bssid
++**
++** Common code for both acx100 and acx111.
++*/
++/* NB: does NOT match RATE100_nn but matches ACX[111]_SCAN_RATE_n */
++static const u8
++bitpos2genframe_txrate[] = {
++ 10, /* 0. 1 Mbit/s */
++ 20, /* 1. 2 Mbit/s */
++ 55, /* 2. 5.5 Mbit/s */
++ 0x0B, /* 3. 6 Mbit/s */
++ 0x0F, /* 4. 9 Mbit/s */
++ 110, /* 5. 11 Mbit/s */
++ 0x0A, /* 6. 12 Mbit/s */
++ 0x0E, /* 7. 18 Mbit/s */
++ 220, /* 8. 22 Mbit/s */
++ 0x09, /* 9. 24 Mbit/s */
++ 0x0D, /* 10. 36 Mbit/s */
++ 0x08, /* 11. 48 Mbit/s */
++ 0x0C, /* 12. 54 Mbit/s */
++ 10, /* 13. 1 Mbit/s, should never happen */
++ 10, /* 14. 1 Mbit/s, should never happen */
++ 10, /* 15. 1 Mbit/s, should never happen */
++};
++
++/* Looks scary, eh?
++** Actually, each one compiled into one AND and one SHIFT,
++** 31 bytes in x86 asm (more if uints are replaced by u16/u8) */
++static inline unsigned int
++rate111to5bits(unsigned int rate)
++{
++ return (rate & 0x7)
++ | ( (rate & RATE111_11) / (RATE111_11/JOINBSS_RATES_11) )
++ | ( (rate & RATE111_22) / (RATE111_22/JOINBSS_RATES_22) )
++ ;
++}
++
++static void
++acx_s_cmd_join_bssid(acx_device_t *adev, const u8 *bssid)
++{
++ acx_joinbss_t tmp;
++ int dtim_interval;
++ int i;
++
++ if (mac_is_zero(bssid))
++ return;
++
++ FN_ENTER;
++
++ dtim_interval = (ACX_MODE_0_ADHOC == adev->mode) ?
++ 1 : adev->dtim_interval;
++
++ memset(&tmp, 0, sizeof(tmp));
++
++ for (i = 0; i < ETH_ALEN; i++) {
++ tmp.bssid[i] = bssid[ETH_ALEN-1 - i];
++ }
++
++ tmp.beacon_interval = cpu_to_le16(adev->beacon_interval);
++
++ /* Basic rate set. Control frame responses (such as ACK or CTS frames)
++ ** are sent with one of these rates */
++ if (IS_ACX111(adev)) {
++ /* It was experimentally determined that rates_basic
++ ** can take 11g rates as well, not only rates
++ ** defined with JOINBSS_RATES_BASIC111_nnn.
++ ** Just use RATE111_nnn constants... */
++ tmp.u.acx111.dtim_interval = dtim_interval;
++ tmp.u.acx111.rates_basic = cpu_to_le16(adev->rate_basic);
++ log(L_ASSOC, "rates_basic:%04X, rates_supported:%04X\n",
++ adev->rate_basic, adev->rate_oper);
++ } else {
++ tmp.u.acx100.dtim_interval = dtim_interval;
++ tmp.u.acx100.rates_basic = rate111to5bits(adev->rate_basic);
++ tmp.u.acx100.rates_supported = rate111to5bits(adev->rate_oper);
++ log(L_ASSOC, "rates_basic:%04X->%02X, "
++ "rates_supported:%04X->%02X\n",
++ adev->rate_basic, tmp.u.acx100.rates_basic,
++ adev->rate_oper, tmp.u.acx100.rates_supported);
++ }
++
++ /* Setting up how Beacon, Probe Response, RTS, and PS-Poll frames
++ ** will be sent (rate/modulation/preamble) */
++ tmp.u.txrate.genfrm_txrate = bitpos2genframe_txrate[lowest_bit(adev->rate_basic)];
++ tmp.genfrm_mod_pre = 0; /* FIXME: was = adev->capab_short (which was always 0); */
++ /* we can use short pre *if* all peers can understand it */
++ /* FIXME #2: we need to correctly set PBCC/OFDM bits here too */
++
++ /* we switch fw to STA mode in MONITOR mode, it seems to be
++ ** the only mode where fw does not emit beacons by itself
++ ** but allows us to send anything (we really want to retain
++ ** ability to tx arbitrary frames in MONITOR mode)
++ */
++ tmp.macmode = (adev->mode != ACX_MODE_MONITOR ? adev->mode : ACX_MODE_2_STA);
++ tmp.channel = adev->channel;
++ tmp.essid_len = adev->essid_len;
++ /* NOTE: the code memcpy'd essid_len + 1 before, which is WRONG! */
++ memcpy(tmp.essid, adev->essid, tmp.essid_len);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_JOIN, &tmp, tmp.essid_len + 0x11);
++
++ log(L_ASSOC|L_DEBUG, "BSS_Type = %u\n", tmp.macmode);
++ acxlog_mac(L_ASSOC|L_DEBUG, "JoinBSSID MAC:", adev->bssid, "\n");
++
++ acx_update_capabilities(adev);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_s_cmd_start_scan
++**
++** Issue scan command to the hardware
++**
++** unified function for both ACX111 and ACX100
++*/
++static void
++acx_s_scan_chan(acx_device_t *adev)
++{
++ union {
++ acx111_scan_t acx111;
++ acx100_scan_t acx100;
++ } s;
++
++ FN_ENTER;
++
++ memset(&s, 0, sizeof(s));
++
++ /* first common positions... */
++
++ s.acx111.count = cpu_to_le16(adev->scan_count);
++ s.acx111.rate = adev->scan_rate;
++ s.acx111.options = adev->scan_mode;
++ s.acx111.chan_duration = cpu_to_le16(adev->scan_duration);
++ s.acx111.max_probe_delay = cpu_to_le16(adev->scan_probe_delay);
++
++ /* ...then differences */
++
++ if (IS_ACX111(adev)) {
++ s.acx111.channel_list_select = 0; /* scan every allowed channel */
++ /*s.acx111.channel_list_select = 1;*/ /* scan given channels */
++ /*s.acx111.modulation = 0x40;*/ /* long preamble? OFDM? -> only for active scan */
++ s.acx111.modulation = 0;
++ /*s.acx111.channel_list[0] = 6;
++ s.acx111.channel_list[1] = 4;*/
++ } else {
++ s.acx100.start_chan = cpu_to_le16(1);
++ s.acx100.flags = cpu_to_le16(0x8000);
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SCAN, &s, sizeof(s));
++ FN_EXIT0;
++}
++
++
++void
++acx_s_cmd_start_scan(acx_device_t *adev)
++{
++ /* time_before check is 'just in case' thing */
++ if (!(adev->irq_status & HOST_INT_SCAN_COMPLETE)
++ && time_before(jiffies, adev->scan_start + 10*HZ)
++ ) {
++ log(L_INIT, "start_scan: seems like previous scan "
++ "is still running. Not starting anew. Please report\n");
++ return;
++ }
++
++ log(L_INIT, "starting radio scan\n");
++ /* remember that fw is commanded to do scan */
++ adev->scan_start = jiffies;
++ CLEAR_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ /* issue it */
++ acx_s_scan_chan(adev);
++}
++
++
++/***********************************************************************
++** acx111 feature config
++*/
++static int
++acx111_s_get_feature_config(acx_device_t *adev,
++ u32 *feature_options, u32 *data_flow_options)
++{
++ struct acx111_ie_feature_config feat;
++
++ if (!IS_ACX111(adev)) {
++ return NOT_OK;
++ }
++
++ memset(&feat, 0, sizeof(feat));
++
++ if (OK != acx_s_interrogate(adev, &feat, ACX1xx_IE_FEATURE_CONFIG)) {
++ return NOT_OK;
++ }
++ log(L_DEBUG,
++ "got Feature option:0x%X, DataFlow option: 0x%X\n",
++ feat.feature_options,
++ feat.data_flow_options);
++
++ if (feature_options)
++ *feature_options = le32_to_cpu(feat.feature_options);
++ if (data_flow_options)
++ *data_flow_options = le32_to_cpu(feat.data_flow_options);
++
++ return OK;
++}
++
++static int
++acx111_s_set_feature_config(acx_device_t *adev,
++ u32 feature_options, u32 data_flow_options,
++ unsigned int mode /* 0 == remove, 1 == add, 2 == set */)
++{
++ struct acx111_ie_feature_config feat;
++
++ if (!IS_ACX111(adev)) {
++ return NOT_OK;
++ }
++
++ if ((mode < 0) || (mode > 2))
++ return NOT_OK;
++
++ if (mode != 2)
++ /* need to modify old data */
++ acx111_s_get_feature_config(adev, &feat.feature_options, &feat.data_flow_options);
++ else {
++ /* need to set a completely new value */
++ feat.feature_options = 0;
++ feat.data_flow_options = 0;
++ }
++
++ if (mode == 0) { /* remove */
++ CLEAR_BIT(feat.feature_options, cpu_to_le32(feature_options));
++ CLEAR_BIT(feat.data_flow_options, cpu_to_le32(data_flow_options));
++ } else { /* add or set */
++ SET_BIT(feat.feature_options, cpu_to_le32(feature_options));
++ SET_BIT(feat.data_flow_options, cpu_to_le32(data_flow_options));
++ }
++
++ log(L_DEBUG,
++ "old: feature 0x%08X dataflow 0x%08X. mode: %u\n"
++ "new: feature 0x%08X dataflow 0x%08X\n",
++ feature_options, data_flow_options, mode,
++ le32_to_cpu(feat.feature_options),
++ le32_to_cpu(feat.data_flow_options));
++
++ if (OK != acx_s_configure(adev, &feat, ACX1xx_IE_FEATURE_CONFIG)) {
++ return NOT_OK;
++ }
++
++ return OK;
++}
++
++static inline int
++acx111_s_feature_off(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 0);
++}
++static inline int
++acx111_s_feature_on(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 1);
++}
++static inline int
++acx111_s_feature_set(acx_device_t *adev, u32 f, u32 d)
++{
++ return acx111_s_set_feature_config(adev, f, d, 2);
++}
++
++
++/***********************************************************************
++** acx100_s_init_memory_pools
++*/
++static int
++acx100_s_init_memory_pools(acx_device_t *adev, const acx_ie_memmap_t *mmt)
++{
++ acx100_ie_memblocksize_t MemoryBlockSize;
++ acx100_ie_memconfigoption_t MemoryConfigOption;
++ int TotalMemoryBlocks;
++ int RxBlockNum;
++ int TotalRxBlockSize;
++ int TxBlockNum;
++ int TotalTxBlockSize;
++
++ FN_ENTER;
++
++ /* Let's see if we can follow this:
++ first we select our memory block size (which I think is
++ completely arbitrary) */
++ MemoryBlockSize.size = cpu_to_le16(adev->memblocksize);
++
++ /* Then we alert the card to our decision of block size */
++ if (OK != acx_s_configure(adev, &MemoryBlockSize, ACX100_IE_BLOCK_SIZE)) {
++ goto bad;
++ }
++
++ /* We figure out how many total blocks we can create, using
++ the block size we chose, and the beginning and ending
++ memory pointers, i.e.: end-start/size */
++ TotalMemoryBlocks = (le32_to_cpu(mmt->PoolEnd) - le32_to_cpu(mmt->PoolStart)) / adev->memblocksize;
++
++ log(L_DEBUG, "TotalMemoryBlocks=%u (%u bytes)\n",
++ TotalMemoryBlocks, TotalMemoryBlocks*adev->memblocksize);
++
++ /* MemoryConfigOption.DMA_config bitmask:
++ access to ACX memory is to be done:
++ 0x00080000 using PCI conf space?!
++ 0x00040000 using IO instructions?
++ 0x00000000 using memory access instructions
++ 0x00020000 using local memory block linked list (else what?)
++ 0x00010000 using host indirect descriptors (else host must access ACX memory?)
++ */
++#if defined (ACX_MEM)
++ /*
++ * ACX ignores DMA_config for generic slave mode.
++ */
++ MemoryConfigOption.DMA_config = 0;
++ /* Declare start of the Rx host pool */
++ MemoryConfigOption.pRxHostDesc = cpu2acx(0);
++ log(L_DEBUG, "pRxHostDesc 0x%08X, rxhostdesc_startphy 0x%lX\n",
++ acx2cpu(MemoryConfigOption.pRxHostDesc),
++ (long)adev->rxhostdesc_startphy);
++#else
++ if (IS_PCI(adev)) {
++ MemoryConfigOption.DMA_config = cpu_to_le32(0x30000);
++ /* Declare start of the Rx host pool */
++ MemoryConfigOption.pRxHostDesc = cpu2acx(adev->rxhostdesc_startphy);
++ log(L_DEBUG, "pRxHostDesc 0x%08X, rxhostdesc_startphy 0x%lX\n",
++ acx2cpu(MemoryConfigOption.pRxHostDesc),
++ (long)adev->rxhostdesc_startphy);
++ } else {
++ MemoryConfigOption.DMA_config = cpu_to_le32(0x20000);
++ }
++#endif
++
++ /* 50% of the allotment of memory blocks go to tx descriptors */
++ TxBlockNum = TotalMemoryBlocks / 2;
++ MemoryConfigOption.TxBlockNum = cpu_to_le16(TxBlockNum);
++
++ /* and 50% go to the rx descriptors */
++ RxBlockNum = TotalMemoryBlocks - TxBlockNum;
++ MemoryConfigOption.RxBlockNum = cpu_to_le16(RxBlockNum);
++
++ /* size of the tx and rx descriptor queues */
++ TotalTxBlockSize = TxBlockNum * adev->memblocksize;
++ TotalRxBlockSize = RxBlockNum * adev->memblocksize;
++ log(L_DEBUG, "TxBlockNum %u RxBlockNum %u TotalTxBlockSize %u "
++ "TotalTxBlockSize %u\n", TxBlockNum, RxBlockNum,
++ TotalTxBlockSize, TotalRxBlockSize);
++
++
++ /* align the tx descriptor queue to an alignment of 0x20 (32 bytes) */
++ MemoryConfigOption.rx_mem =
++ cpu_to_le32((le32_to_cpu(mmt->PoolStart) + 0x1f) & ~0x1f);
++
++ /* align the rx descriptor queue to units of 0x20
++ * and offset it by the tx descriptor queue */
++ MemoryConfigOption.tx_mem =
++ cpu_to_le32((le32_to_cpu(mmt->PoolStart) + TotalRxBlockSize + 0x1f) & ~0x1f);
++ log(L_DEBUG, "rx_mem %08X rx_mem %08X\n",
++ MemoryConfigOption.tx_mem, MemoryConfigOption.rx_mem);
++
++ /* alert the device to our decision */
++ if (OK != acx_s_configure(adev, &MemoryConfigOption, ACX1xx_IE_MEMORY_CONFIG_OPTIONS)) {
++ goto bad;
++ }
++
++ /* and tell the device to kick it into gear */
++ if (OK != acx_s_issue_cmd(adev, ACX100_CMD_INIT_MEMORY, NULL, 0)) {
++ goto bad;
++ }
++#ifdef ACX_MEM
++ /*
++ * slave memory interface has to manage the transmit pools for the ACX,
++ * so it needs to know what we chose here.
++ */
++ adev->acx_txbuf_start = MemoryConfigOption.tx_mem;
++ adev->acx_txbuf_numblocks = MemoryConfigOption.TxBlockNum;
++#endif
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx100_s_create_dma_regions
++**
++** Note that this fn messes up heavily with hardware, but we cannot
++** lock it (we need to sleep). Not a problem since IRQs can't happen
++*/
++static int
++acx100_s_create_dma_regions(acx_device_t *adev)
++{
++ acx100_ie_queueconfig_t queueconf;
++ acx_ie_memmap_t memmap;
++ int res = NOT_OK;
++ u32 tx_queue_start, rx_queue_start;
++
++ FN_ENTER;
++
++ /* read out the acx100 physical start address for the queues */
++ if (OK != acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ tx_queue_start = le32_to_cpu(memmap.QueueStart);
++ rx_queue_start = tx_queue_start + TX_CNT * sizeof(txdesc_t);
++
++ log(L_DEBUG, "initializing Queue Indicator\n");
++
++ memset(&queueconf, 0, sizeof(queueconf));
++
++ /* Not needed for PCI or slave memory, so we can avoid setting them altogether */
++ if (IS_USB(adev)) {
++ queueconf.NumTxDesc = USB_TX_CNT;
++ queueconf.NumRxDesc = USB_RX_CNT;
++ }
++
++ /* calculate size of queues */
++ queueconf.AreaSize = cpu_to_le32(
++ TX_CNT * sizeof(txdesc_t) +
++ RX_CNT * sizeof(rxdesc_t) + 8
++ );
++ queueconf.NumTxQueues = 1; /* number of tx queues */
++ /* sets the beginning of the tx descriptor queue */
++ queueconf.TxQueueStart = memmap.QueueStart;
++ /* done by memset: queueconf.TxQueuePri = 0; */
++ queueconf.RxQueueStart = cpu_to_le32(rx_queue_start);
++ queueconf.QueueOptions = 1; /* auto reset descriptor */
++ /* sets the end of the rx descriptor queue */
++ queueconf.QueueEnd = cpu_to_le32(
++ rx_queue_start + RX_CNT * sizeof(rxdesc_t)
++ );
++ /* sets the beginning of the next queue */
++ queueconf.HostQueueEnd = cpu_to_le32(le32_to_cpu(queueconf.QueueEnd) + 8);
++ if (OK != acx_s_configure(adev, &queueconf, ACX1xx_IE_QUEUE_CONFIG)) {
++ goto fail;
++ }
++
++#if defined (ACX_MEM)
++ /* sets the beginning of the rx descriptor queue, after the tx descrs */
++ adev->acx_queue_indicator =
++ (queueindicator_t *) le32_to_cpu (queueconf.QueueEnd);
++ if (OK != acxmem_s_create_hostdesc_queues(adev))
++ goto fail;
++
++ acxmem_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#else
++ if (IS_PCI(adev)) {
++ /* sets the beginning of the rx descriptor queue, after the tx descrs */
++ if (OK != acxpci_s_create_hostdesc_queues(adev))
++ goto fail;
++ acxpci_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++ }
++#endif
++
++ if (OK != acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ /*
++ * Have to make sure we skip past the Queue Indicator (QueueEnd) and Host Queue Indicator
++ * maps, each of which are 8 bytes and follow immediately after the transmit and
++ * receive queues.
++ */
++ memmap.PoolStart = cpu_to_le32(
++ (le32_to_cpu(memmap.QueueEnd) + 4 + 0x1f) & ~0x1f
++ );
++
++ if (OK != acx_s_configure(adev, &memmap, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ if (OK != acx100_s_init_memory_pools(adev, &memmap)) {
++ goto fail;
++ }
++
++ res = OK;
++ goto end;
++
++fail:
++ acx_s_msleep(1000); /* ? */
++#if defined (ACX_MEM)
++ acxmem_free_desc_queues(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_free_desc_queues(adev);
++#endif
++end:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acx111_s_create_dma_regions
++**
++** Note that this fn messes heavily with hardware, but we cannot
++** lock it (we need to sleep). Not a problem since IRQs can't happen
++*/
++#define ACX111_PERCENT(percent) ((percent)/5)
++
++static int
++acx111_s_create_dma_regions(acx_device_t *adev)
++{
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ u32 tx_queue_start, rx_queue_start;
++
++ FN_ENTER;
++
++ /* Calculate memory positions and queue sizes */
++
++ /* Set up our host descriptor pool + data pool */
++#if defined (ACX_MEM)
++ if (OK != acxmem_s_create_hostdesc_queues(adev))
++ goto fail;
++#else
++ if (IS_PCI(adev)) {
++ if (OK != acxpci_s_create_hostdesc_queues(adev))
++ goto fail;
++ }
++#endif
++
++ memset(&memconf, 0, sizeof(memconf));
++ /* the number of STAs (STA contexts) to support
++ ** NB: was set to 1 and everything seemed to work nevertheless... */
++ memconf.no_of_stations = cpu_to_le16(VEC_SIZE(adev->sta_list));
++ /* specify the memory block size. Default is 256 */
++ memconf.memory_block_size = cpu_to_le16(adev->memblocksize);
++ /* let's use 50%/50% for tx/rx (specify percentage, units of 5%) */
++ memconf.tx_rx_memory_block_allocation = ACX111_PERCENT(50);
++ /* set the count of our queues
++ ** NB: struct acx111_ie_memoryconfig shall be modified
++ ** if we ever will switch to more than one rx and/or tx queue */
++ memconf.count_rx_queues = 1;
++ memconf.count_tx_queues = 1;
++ /* 0 == Busmaster Indirect Memory Organization, which is what we want
++ * (using linked host descs with their allocated mem).
++ * 2 == Generic Bus Slave */
++ /* done by memset: memconf.options = 0; */
++ /* let's use 25% for fragmentations and 75% for frame transfers
++ * (specified in units of 5%) */
++ memconf.fragmentation = ACX111_PERCENT(75);
++ /* Rx descriptor queue config */
++ memconf.rx_queue1_count_descs = RX_CNT;
++ memconf.rx_queue1_type = 7; /* must be set to 7 */
++ /* done by memset: memconf.rx_queue1_prio = 0; low prio */
++#if defined (ACX_MEM)
++ memconf.rx_queue1_host_rx_start = cpu2acx(adev->rxhostdesc_startphy);
++#else
++ if (IS_PCI(adev)) {
++ memconf.rx_queue1_host_rx_start = cpu2acx(adev->rxhostdesc_startphy);
++ }
++#endif
++ /* Tx descriptor queue config */
++ memconf.tx_queue1_count_descs = TX_CNT;
++ /* done by memset: memconf.tx_queue1_attributes = 0; lowest priority */
++
++ /* NB1: this looks wrong: (memconf,ACX1xx_IE_QUEUE_CONFIG),
++ ** (queueconf,ACX1xx_IE_MEMORY_CONFIG_OPTIONS) look swapped, eh?
++ ** But it is actually correct wrt IE numbers.
++ ** NB2: sizeof(memconf) == 28 == 0x1c but configure(ACX1xx_IE_QUEUE_CONFIG)
++ ** writes 0x20 bytes (because same IE for acx100 uses struct acx100_ie_queueconfig
++ ** which is 4 bytes larger. what a mess. TODO: clean it up) */
++ if (OK != acx_s_configure(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG)) {
++ goto fail;
++ }
++
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++
++ tx_queue_start = le32_to_cpu(queueconf.tx1_queue_address);
++ rx_queue_start = le32_to_cpu(queueconf.rx1_queue_address);
++
++ log(L_INIT, "dump queue head (from card):\n"
++ "len: %u\n"
++ "tx_memory_block_address: %X\n"
++ "rx_memory_block_address: %X\n"
++ "tx1_queue address: %X\n"
++ "rx1_queue address: %X\n",
++ le16_to_cpu(queueconf.len),
++ le32_to_cpu(queueconf.tx_memory_block_address),
++ le32_to_cpu(queueconf.rx_memory_block_address),
++ tx_queue_start,
++ rx_queue_start);
++
++#if defined (ACX_MEM)
++ acxmem_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#else
++ if (IS_PCI(adev))
++ acxpci_create_desc_queues(adev, tx_queue_start, rx_queue_start);
++#endif
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++#if defined (ACX_MEM)
++ acxmem_free_desc_queues(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_free_desc_queues(adev);
++#endif
++
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++static void
++acx_s_initialize_rx_config(acx_device_t *adev)
++{
++ struct {
++ u16 id;
++ u16 len;
++ u16 rx_cfg1;
++ u16 rx_cfg2;
++ } ACX_PACKED cfg;
++
++ switch (adev->mode) {
++ case ACX_MODE_OFF:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ /* | RX_CFG1_FILTER_MAC */
++ /* | RX_CFG1_RCV_PROMISCUOUS */
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ /*| RX_CFG2_RCV_ASSOC_REQ */
++ /*| RX_CFG2_RCV_AUTH_FRAMES */
++ /*| RX_CFG2_RCV_BEACON_FRAMES */
++ /*| RX_CFG2_RCV_CONTENTION_FREE */
++ /*| RX_CFG2_RCV_CTRL_FRAMES */
++ /*| RX_CFG2_RCV_DATA_FRAMES */
++ /*| RX_CFG2_RCV_BROKEN_FRAMES */
++ /*| RX_CFG2_RCV_MGMT_FRAMES */
++ /*| RX_CFG2_RCV_PROBE_REQ */
++ /*| RX_CFG2_RCV_PROBE_RESP */
++ /*| RX_CFG2_RCV_ACK_FRAMES */
++ /*| RX_CFG2_RCV_OTHER */
++ );
++ break;
++ case ACX_MODE_MONITOR:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ /* | RX_CFG1_FILTER_MAC */
++ | RX_CFG1_RCV_PROMISCUOUS
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ | RX_CFG2_RCV_ASSOC_REQ
++ | RX_CFG2_RCV_AUTH_FRAMES
++ | RX_CFG2_RCV_BEACON_FRAMES
++ | RX_CFG2_RCV_CONTENTION_FREE
++ | RX_CFG2_RCV_CTRL_FRAMES
++ | RX_CFG2_RCV_DATA_FRAMES
++ | RX_CFG2_RCV_BROKEN_FRAMES
++ | RX_CFG2_RCV_MGMT_FRAMES
++ | RX_CFG2_RCV_PROBE_REQ
++ | RX_CFG2_RCV_PROBE_RESP
++ | RX_CFG2_RCV_ACK_FRAMES
++ | RX_CFG2_RCV_OTHER
++ );
++ break;
++ default:
++ adev->rx_config_1 = (u16) (0
++ /* | RX_CFG1_INCLUDE_RXBUF_HDR */
++ /* | RX_CFG1_FILTER_SSID */
++ /* | RX_CFG1_FILTER_BCAST */
++ /* | RX_CFG1_RCV_MC_ADDR1 */
++ /* | RX_CFG1_RCV_MC_ADDR0 */
++ /* | RX_CFG1_FILTER_ALL_MULTI */
++ /* | RX_CFG1_FILTER_BSSID */
++ | RX_CFG1_FILTER_MAC
++ /* | RX_CFG1_RCV_PROMISCUOUS */
++ /* | RX_CFG1_INCLUDE_FCS */
++ /* | RX_CFG1_INCLUDE_PHY_HDR */
++ );
++ adev->rx_config_2 = (u16) (0
++ | RX_CFG2_RCV_ASSOC_REQ
++ | RX_CFG2_RCV_AUTH_FRAMES
++ | RX_CFG2_RCV_BEACON_FRAMES
++ | RX_CFG2_RCV_CONTENTION_FREE
++ | RX_CFG2_RCV_CTRL_FRAMES
++ | RX_CFG2_RCV_DATA_FRAMES
++ /*| RX_CFG2_RCV_BROKEN_FRAMES */
++ | RX_CFG2_RCV_MGMT_FRAMES
++ | RX_CFG2_RCV_PROBE_REQ
++ | RX_CFG2_RCV_PROBE_RESP
++ /*| RX_CFG2_RCV_ACK_FRAMES */
++ | RX_CFG2_RCV_OTHER
++ );
++ break;
++ }
++ adev->rx_config_1 |= RX_CFG1_INCLUDE_RXBUF_HDR;
++
++ if ((adev->rx_config_1 & RX_CFG1_INCLUDE_PHY_HDR)
++ || (adev->firmware_numver >= 0x02000000))
++ adev->phy_header_len = IS_ACX111(adev) ? 8 : 4;
++ else
++ adev->phy_header_len = 0;
++
++ log(L_INIT, "setting RXconfig to %04X:%04X\n",
++ adev->rx_config_1, adev->rx_config_2);
++ cfg.rx_cfg1 = cpu_to_le16(adev->rx_config_1);
++ cfg.rx_cfg2 = cpu_to_le16(adev->rx_config_2);
++ acx_s_configure(adev, &cfg, ACX1xx_IE_RXCONFIG);
++}
++
++
++/***********************************************************************
++** acx_s_set_defaults
++*/
++void
++acx_s_set_defaults(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* do it before getting settings, prevent bogus channel 0 warning */
++ adev->channel = 1;
++
++ /* query some settings from the card.
++ * NOTE: for some settings, e.g. CCA and ED (ACX100!), an initial
++ * query is REQUIRED, otherwise the card won't work correctly! */
++ adev->get_mask = GETSET_ANTENNA|GETSET_SENSITIVITY|GETSET_STATION_ID|GETSET_REG_DOMAIN;
++ /* Only ACX100 supports ED and CCA */
++ if (IS_ACX100(adev))
++ adev->get_mask |= GETSET_CCA|GETSET_ED_THRESH;
++
++ acx_s_update_card_settings(adev);
++
++ acx_lock(adev, flags);
++
++ /* set our global interrupt mask */
++#if defined (ACX_MEM)
++ acxmem_set_interrupt_mask(adev);
++#else
++ if (IS_PCI(adev))
++ acxpci_set_interrupt_mask(adev);
++#endif
++
++ adev->led_power = 1; /* LED is active on startup */
++ adev->brange_max_quality = 60; /* LED blink max quality is 60 */
++ adev->brange_time_last_state_change = jiffies;
++
++ /* copy the MAC address we just got from the card
++ * into our MAC address used during current 802.11 session */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ MAC_BCAST(adev->ap);
++
++ adev->essid_len =
++ snprintf(adev->essid, sizeof(adev->essid), "STA%02X%02X%02X",
++ adev->dev_addr[3], adev->dev_addr[4], adev->dev_addr[5]);
++ adev->essid_active = 1;
++
++ /* we have a nick field to waste, so why not abuse it
++ * to announce the driver version? ;-) */
++ strncpy(adev->nick, "acx " ACX_RELEASE, IW_ESSID_MAX_SIZE);
++
++#if defined (ACX_MEM)
++ adev->reg_dom_id = adev->cfgopt_domains.list[0];
++#else
++ if (IS_PCI(adev)) { /* FIXME: this should be made to apply to USB, too! */
++ /* first regulatory domain entry in EEPROM == default reg. domain */
++ adev->reg_dom_id = adev->cfgopt_domains.list[0];
++ }
++#endif
++
++ /* 0xffff would be better, but then we won't get a "scan complete"
++ * interrupt, so our current infrastructure will fail: */
++ adev->scan_count = 1;
++ adev->scan_mode = ACX_SCAN_OPT_ACTIVE;
++ adev->scan_duration = 100;
++ adev->scan_probe_delay = 200;
++ /* reported to break scanning: adev->scan_probe_delay = adev->cfgopt_probe_delay; */
++ adev->scan_rate = ACX_SCAN_RATE_1;
++
++ adev->mode = ACX_MODE_2_STA;
++ adev->auth_alg = WLAN_AUTH_ALG_OPENSYSTEM;
++ adev->listen_interval = 100;
++ adev->beacon_interval = DEFAULT_BEACON_INTERVAL;
++ adev->dtim_interval = DEFAULT_DTIM_INTERVAL;
++
++ adev->msdu_lifetime = DEFAULT_MSDU_LIFETIME;
++
++ adev->rts_threshold = DEFAULT_RTS_THRESHOLD;
++ adev->frag_threshold = 2346;
++
++ /* use standard default values for retry limits */
++ adev->short_retry = 7; /* max. retries for (short) non-RTS packets */
++ adev->long_retry = 4; /* max. retries for long (RTS) packets */
++
++ adev->preamble_mode = 2; /* auto */
++ adev->fallback_threshold = 3;
++ adev->stepup_threshold = 10;
++ adev->rate_bcast = RATE111_1;
++ adev->rate_bcast100 = RATE100_1;
++ adev->rate_basic = RATE111_1 | RATE111_2;
++ adev->rate_auto = 1;
++ if (IS_ACX111(adev)) {
++ adev->rate_oper = RATE111_ALL;
++ } else {
++ adev->rate_oper = RATE111_ACX100_COMPAT;
++ }
++
++ /* Supported Rates element - the rates here are given in units of
++ * 500 kbit/s, plus 0x80 added. See 802.11-1999.pdf item 7.3.2.2 */
++ acx_l_update_ratevector(adev);
++
++ /* set some more defaults */
++ if (IS_ACX111(adev)) {
++ /* 30mW (15dBm) is default, at least in my acx111 card: */
++ adev->tx_level_dbm = 15;
++ } else {
++ /* don't use max. level, since it might be dangerous
++ * (e.g. WRT54G people experience
++ * excessive Tx power damage!) */
++ adev->tx_level_dbm = 18;
++ /*
++ * Lower power for the iPaq hx4700
++ */
++ if (IS_MEM(adev)) {
++ adev->tx_level_dbm = 14;
++ }
++ }
++ /* adev->tx_level_auto = 1; */
++ if (IS_ACX111(adev)) {
++ /* start with sensitivity level 1 out of 3: */
++ adev->sensitivity = 1;
++ }
++
++/* #define ENABLE_POWER_SAVE */
++#ifdef ENABLE_POWER_SAVE
++ adev->ps_wakeup_cfg = PS_CFG_ENABLE | PS_CFG_WAKEUP_ALL_BEAC;
++ adev->ps_listen_interval = 1;
++ adev->ps_options = PS_OPT_ENA_ENHANCED_PS | PS_OPT_TX_PSPOLL | PS_OPT_STILL_RCV_BCASTS;
++ adev->ps_hangover_period = 30;
++ adev->ps_enhanced_transition_time = 0;
++#else
++ adev->ps_wakeup_cfg = 0;
++ adev->ps_listen_interval = 0;
++ adev->ps_options = 0;
++ adev->ps_hangover_period = 0;
++ adev->ps_enhanced_transition_time = 0;
++#endif
++
++ /* These settings will be set in fw on ifup */
++ adev->set_mask = 0
++ | GETSET_RETRY
++ | SET_MSDU_LIFETIME
++ /* configure card to do rate fallback when in auto rate mode */
++ | SET_RATE_FALLBACK
++ | SET_RXCONFIG
++ | GETSET_TXPOWER
++ /* better re-init the antenna value we got above */
++ | GETSET_ANTENNA
++#if POWER_SAVE_80211
++ | GETSET_POWER_80211
++#endif
++ ;
++
++ acx_unlock(adev, flags);
++ acx_lock_unhold(); /* hold time 844814 CPU ticks @2GHz */
++
++ acx_s_initialize_rx_config(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** FIXME: this should be solved in a general way for all radio types
++** by decoding the radio firmware module,
++** since it probably has some standard structure describing how to
++** set the power level of the radio module which it controls.
++** Or maybe not, since the radio module probably has a function interface
++** instead which then manages Tx level programming :-\
++*/
++static int
++acx111_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* my acx111 card has two power levels in its configoptions (== EEPROM):
++ * 1 (30mW) [15dBm]
++ * 2 (10mW) [10dBm]
++ * For now, just assume all other acx111 cards have the same.
++ * FIXME: Ideally we would query it here, but we first need a
++ * standard way to query individual configoptions easily.
++ * Well, now we have proper cfgopt txpower variables, but this still
++ * hasn't been done yet, since it also requires dBm <-> mW conversion here... */
++ if (level_dbm <= 12) {
++ tx_level.level = 2; /* 10 dBm */
++ adev->tx_level_dbm = 10;
++ } else {
++ tx_level.level = 1; /* 15 dBm */
++ adev->tx_level_dbm = 15;
++ }
++ if (level_dbm != adev->tx_level_dbm)
++ log(L_INIT, "acx111 firmware has specific "
++ "power levels only: adjusted %d dBm to %d dBm!\n",
++ level_dbm, adev->tx_level_dbm);
++
++ return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++}
++
++static int
++acx_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ if (IS_ACX111(adev)) {
++ return acx111_s_set_tx_level(adev, level_dbm);
++ }
++#if defined (ACX_MEM)
++ return acx100mem_s_set_tx_level(adev, level_dbm);
++#else
++ if (IS_PCI(adev)) {
++ return acx100pci_s_set_tx_level(adev, level_dbm);
++ }
++#endif
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++#ifdef UNUSED
++/* Returns the current tx level (ACX111) */
++static u8
++acx111_s_get_tx_level(acx_device_t *adev)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ tx_level.level = 0;
++ acx_s_interrogate(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++ return tx_level.level;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_rxmonitor
++** Called from IRQ context only
++*/
++static void
++acx_l_rxmonitor(acx_device_t *adev, const rxbuffer_t *rxbuf)
++{
++ wlansniffrm_t *msg;
++ struct sk_buff *skb;
++ void *datap;
++ unsigned int skb_len;
++ int payload_offset;
++
++ FN_ENTER;
++
++ /* we are in big luck: the acx100 doesn't modify any of the fields */
++ /* in the 802.11 frame. just pass this packet into the PF_PACKET */
++ /* subsystem. yeah. */
++ payload_offset = ((u8*)acx_get_wlan_hdr(adev, rxbuf) - (u8*)rxbuf);
++ skb_len = RXBUF_BYTES_USED(rxbuf) - payload_offset;
++
++ /* sanity check */
++ if (unlikely(skb_len > WLAN_A4FR_MAXLEN_WEP)) {
++ printk("%s: monitor mode panic: oversized frame!\n",
++ adev->ndev->name);
++ goto end;
++ }
++
++ if (adev->ndev->type == ARPHRD_IEEE80211_PRISM)
++ skb_len += sizeof(*msg);
++
++ /* allocate skb */
++ skb = dev_alloc_skb(skb_len);
++ if (unlikely(!skb)) {
++ printk("%s: no memory for skb (%u bytes)\n",
++ adev->ndev->name, skb_len);
++ goto end;
++ }
++
++ skb_put(skb, skb_len);
++
++ if (adev->ndev->type == ARPHRD_IEEE80211) {
++ /* when in raw 802.11 mode, just copy frame as-is */
++ datap = skb->data;
++ } else if (adev->ndev->type == ARPHRD_IEEE80211_PRISM) {
++ /* emulate prism header */
++ msg = (wlansniffrm_t*)skb->data;
++ datap = msg + 1;
++
++ msg->msgcode = WLANSNIFFFRM;
++ msg->msglen = sizeof(*msg);
++ strncpy(msg->devname, adev->ndev->name, sizeof(msg->devname)-1);
++ msg->devname[sizeof(msg->devname)-1] = '\0';
++
++ msg->hosttime.did = WLANSNIFFFRM_hosttime;
++ msg->hosttime.status = WLANITEM_STATUS_data_ok;
++ msg->hosttime.len = 4;
++ msg->hosttime.data = jiffies;
++
++ msg->mactime.did = WLANSNIFFFRM_mactime;
++ msg->mactime.status = WLANITEM_STATUS_data_ok;
++ msg->mactime.len = 4;
++ msg->mactime.data = rxbuf->time;
++
++ msg->channel.did = WLANSNIFFFRM_channel;
++ msg->channel.status = WLANITEM_STATUS_data_ok;
++ msg->channel.len = 4;
++ msg->channel.data = adev->channel;
++
++ msg->rssi.did = WLANSNIFFFRM_rssi;
++ msg->rssi.status = WLANITEM_STATUS_no_value;
++ msg->rssi.len = 4;
++ msg->rssi.data = 0;
++
++ msg->sq.did = WLANSNIFFFRM_sq;
++ msg->sq.status = WLANITEM_STATUS_no_value;
++ msg->sq.len = 4;
++ msg->sq.data = 0;
++
++ msg->signal.did = WLANSNIFFFRM_signal;
++ msg->signal.status = WLANITEM_STATUS_data_ok;
++ msg->signal.len = 4;
++ msg->signal.data = rxbuf->phy_snr;
++
++ msg->noise.did = WLANSNIFFFRM_noise;
++ msg->noise.status = WLANITEM_STATUS_data_ok;
++ msg->noise.len = 4;
++ msg->noise.data = rxbuf->phy_level;
++
++ msg->rate.did = WLANSNIFFFRM_rate;
++ msg->rate.status = WLANITEM_STATUS_data_ok;
++ msg->rate.len = 4;
++ msg->rate.data = rxbuf->phy_plcp_signal / 5;
++
++ msg->istx.did = WLANSNIFFFRM_istx;
++ msg->istx.status = WLANITEM_STATUS_data_ok;
++ msg->istx.len = 4;
++ msg->istx.data = 0; /* tx=0: it's not a tx packet */
++
++ skb_len -= sizeof(*msg);
++
++ msg->frmlen.did = WLANSNIFFFRM_signal;
++ msg->frmlen.status = WLANITEM_STATUS_data_ok;
++ msg->frmlen.len = 4;
++ msg->frmlen.data = skb_len;
++ } else {
++ printk("acx: unsupported netdev type %d!\n", adev->ndev->type);
++ dev_kfree_skb(skb);
++ return;
++ }
++
++ /* sanity check (keep it here) */
++ if (unlikely((int)skb_len < 0)) {
++ printk("acx: skb_len=%d. Driver bug, please report\n", (int)skb_len);
++ dev_kfree_skb(skb);
++ return;
++ }
++ memcpy(datap, ((unsigned char*)rxbuf)+payload_offset, skb_len);
++
++ skb->dev = adev->ndev;
++ skb->dev->last_rx = jiffies;
++
++ skb_reset_mac_header(skb);
++ skb->ip_summed = CHECKSUM_NONE;
++ skb->pkt_type = PACKET_OTHERHOST;
++ skb->protocol = htons(ETH_P_80211_RAW);
++ netif_rx(skb);
++
++ adev->stats.rx_packets++;
++ adev->stats.rx_bytes += skb->len;
++
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_rx_ieee802_11_frame
++**
++** Called from IRQ context only
++*/
++
++/* All these contortions are for saner dup logging
++**
++** We want: (a) to know about excessive dups
++** (b) to not spam kernel log about occasional dups
++**
++** 1/64 threshold was chosen by running "ping -A"
++** It gave "rx: 59 DUPs in 2878 packets" only with 4 parallel
++** "ping -A" streams running. */
++/* 2005-10-11: bumped up to 1/8
++** subtract a $smallint from dup_count in order to
++** avoid "2 DUPs in 19 packets" messages */
++static inline int
++acx_l_handle_dup(acx_device_t *adev, u16 seq)
++{
++ if (adev->dup_count) {
++ adev->nondup_count++;
++ if (time_after(jiffies, adev->dup_msg_expiry)) {
++ /* Log only if more than 1 dup in 64 packets */
++ if (adev->nondup_count/8 < adev->dup_count-5) {
++ printk(KERN_INFO "%s: rx: %d DUPs in "
++ "%d packets received in 10 secs\n",
++ adev->ndev->name,
++ adev->dup_count,
++ adev->nondup_count);
++ }
++ adev->dup_count = 0;
++ adev->nondup_count = 0;
++ }
++ }
++ if (unlikely(seq == adev->last_seq_ctrl)) {
++ if (!adev->dup_count++)
++ adev->dup_msg_expiry = jiffies + 10*HZ;
++ adev->stats.rx_errors++;
++ return 1; /* a dup */
++ }
++ adev->last_seq_ctrl = seq;
++ return 0;
++}
++
++static int
++acx_l_rx_ieee802_11_frame(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ unsigned int ftype, fstype;
++ const wlan_hdr_t *hdr;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ /* see IEEE 802.11-1999.pdf chapter 7 "MAC frame formats" */
++ if (unlikely((hdr->fc & WF_FC_PVERi) != 0)) {
++ printk_ratelimited(KERN_INFO "rx: unsupported 802.11 protocol\n");
++ goto end;
++ }
++
++ ftype = hdr->fc & WF_FC_FTYPEi;
++ fstype = hdr->fc & WF_FC_FSTYPEi;
++
++ switch (ftype) {
++ /* check data frames first, for speed */
++ case WF_FTYPE_DATAi:
++ switch (fstype) {
++ case WF_FSTYPE_DATAONLYi:
++ if (acx_l_handle_dup(adev, hdr->seq))
++ break; /* a dup, simply discard it */
++
++ /* TODO:
++ if (WF_FC_FROMTODSi == (hdr->fc & WF_FC_FROMTODSi)) {
++ result = acx_l_process_data_frame_wds(adev, rxbuf);
++ break;
++ }
++ */
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++ result = acx_l_process_data_frame_master(adev, rxbuf);
++ break;
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ result = acx_l_process_data_frame_client(adev, rxbuf);
++ break;
++ }
++ case WF_FSTYPE_DATA_CFACKi:
++ case WF_FSTYPE_DATA_CFPOLLi:
++ case WF_FSTYPE_DATA_CFACK_CFPOLLi:
++ case WF_FSTYPE_CFPOLLi:
++ case WF_FSTYPE_CFACK_CFPOLLi:
++ /* see above.
++ acx_process_class_frame(adev, rxbuf, 3); */
++ break;
++ case WF_FSTYPE_NULLi:
++ /* acx_l_process_NULL_frame(adev, rxbuf, 3); */
++ break;
++ /* FIXME: same here, see above */
++ case WF_FSTYPE_CFACKi:
++ default:
++ break;
++ }
++ break;
++ case WF_FTYPE_MGMTi:
++ result = acx_l_process_mgmt_frame(adev, rxbuf);
++ break;
++ case WF_FTYPE_CTLi:
++ if (fstype == WF_FSTYPE_PSPOLLi)
++ result = OK;
++ /* this call is irrelevant, since
++ * acx_process_class_frame is a stub, so return
++ * immediately instead.
++ * return acx_process_class_frame(adev, rxbuf, 3); */
++ break;
++ default:
++ break;
++ }
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_rxbuf
++**
++** NB: used by USB code also
++*/
++void
++acx_l_process_rxbuf(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *hdr;
++ unsigned int qual;
++ int buf_len;
++ u16 fc;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++ fc = le16_to_cpu(hdr->fc);
++ /* length of frame from control field to first byte of FCS */
++ buf_len = RXBUF_BYTES_RCVD(adev, rxbuf);
++
++ if ( ((WF_FC_FSTYPE & fc) != WF_FSTYPE_BEACON)
++ || (acx_debug & L_XFER_BEACON)
++ ) {
++ log(L_XFER|L_DATA, "rx: %s "
++ "time:%u len:%u signal:%u SNR:%u macstat:%02X "
++ "phystat:%02X phyrate:%u status:%u\n",
++ acx_get_packet_type_string(fc),
++ le32_to_cpu(rxbuf->time),
++ buf_len,
++ acx_signal_to_winlevel(rxbuf->phy_level),
++ acx_signal_to_winlevel(rxbuf->phy_snr),
++ rxbuf->mac_status,
++ rxbuf->phy_stat_baseband,
++ rxbuf->phy_plcp_signal,
++ adev->status);
++ }
++
++ if (unlikely(acx_debug & L_DATA)) {
++ printk("rx: 802.11 buf[%u]: ", buf_len);
++ acx_dump_bytes(hdr, buf_len);
++ }
++
++ /* FIXME: should check for Rx errors (rxbuf->mac_status?
++ * discard broken packets - but NOT for monitor!)
++ * and update Rx packet statistics here */
++
++ if (unlikely(adev->mode == ACX_MODE_MONITOR)) {
++ acx_l_rxmonitor(adev, rxbuf);
++ } else if (likely(buf_len >= WLAN_HDR_A3_LEN)) {
++ acx_l_rx_ieee802_11_frame(adev, rxbuf);
++ } else {
++ log(L_DEBUG|L_XFER|L_DATA,
++ "rx: NOT receiving packet (%s): "
++ "size too small (%u)\n",
++ acx_get_packet_type_string(fc),
++ buf_len);
++ }
++
++ /* Now check Rx quality level, AFTER processing packet.
++ * I tried to figure out how to map these levels to dBm
++ * values, but for the life of me I really didn't
++ * manage to get it. Either these values are not meant to
++ * be expressed in dBm, or it's some pretty complicated
++ * calculation. */
++
++#ifdef FROM_SCAN_SOURCE_ONLY
++ /* only consider packets originating from the MAC
++ * address of the device that's managing our BSSID.
++ * Disable it for now, since it removes information (levels
++ * from different peers) and slows the Rx path. */
++ if (adev->ap_client
++ && mac_is_equal(hdr->a2, adev->ap_client->address)) {
++#endif
++ adev->wstats.qual.level = acx_signal_to_winlevel(rxbuf->phy_level);
++ adev->wstats.qual.noise = acx_signal_to_winlevel(rxbuf->phy_snr);
++#ifndef OLD_QUALITY
++ qual = acx_signal_determine_quality(adev->wstats.qual.level,
++ adev->wstats.qual.noise);
++#else
++ qual = (adev->wstats.qual.noise <= 100) ?
++ 100 - adev->wstats.qual.noise : 0;
++#endif
++ adev->wstats.qual.qual = qual;
++ adev->wstats.qual.updated = 7; /* all 3 indicators updated */
++#ifdef FROM_SCAN_SOURCE_ONLY
++ }
++#endif
++}
++
++
++/***********************************************************************
++** acx_l_handle_txrate_auto
++**
++** Theory of operation:
++** client->rate_cap is a bitmask of rates client is capable of.
++** client->rate_cfg is a bitmask of allowed (configured) rates.
++** It is set as a result of iwconfig rate N [auto]
++** or iwpriv set_rates "N,N,N N,N,N" commands.
++** It can be fixed (e.g. 0x0080 == 18Mbit only),
++** auto (0x00ff == 18Mbit or any lower value),
++** and code handles any bitmask (0x1081 == try 54Mbit,18Mbit,1Mbit _only_).
++**
++** client->rate_cur is a value for rate111 field in tx descriptor.
++** It is always set to txrate_cfg sans zero or more most significant
++** bits. This routine handles selection of new rate_cur value depending on
++** outcome of last tx event.
++**
++** client->rate_100 is a precalculated rate value for acx100
++** (we can do without it, but will need to calculate it on each tx).
++**
++** You cannot configure mixed usage of 5.5 and/or 11Mbit rate
++** with PBCC and CCK modulation. Either both at CCK or both at PBCC.
++** In theory you can implement it, but so far it is considered not worth doing.
++**
++** 22Mbit, of course, is PBCC always. */
++
++/* maps acx100 tx descr rate field to acx111 one */
++static u16
++rate100to111(u8 r)
++{
++ switch (r) {
++ case RATE100_1: return RATE111_1;
++ case RATE100_2: return RATE111_2;
++ case RATE100_5:
++ case (RATE100_5 | RATE100_PBCC511): return RATE111_5;
++ case RATE100_11:
++ case (RATE100_11 | RATE100_PBCC511): return RATE111_11;
++ case RATE100_22: return RATE111_22;
++ default:
++ printk("acx: unexpected acx100 txrate: %u! "
++ "Please report\n", r);
++ return RATE111_1;
++ }
++}
++
++
++void
++acx_l_handle_txrate_auto(acx_device_t *adev, struct client *txc,
++ u16 cur, u8 rate100, u16 rate111,
++ u8 error, int pkts_to_ignore)
++{
++ u16 sent_rate;
++ int slower_rate_was_used;
++
++ /* vda: hmm. current code will do this:
++ ** 1. send packets at 11 Mbit, stepup++
++ ** 2. will try to send at 22Mbit. hardware will see no ACK,
++ ** retries at 11Mbit, success. code notes that used rate
++ ** is lower. stepup = 0, fallback++
++ ** 3. repeat step 2 fallback_count times. Fall back to
++ ** 11Mbit. go to step 1.
++ ** If stepup_count is large (say, 16) and fallback_count
++ ** is small (3), this wouldn't be too bad wrt throughput */
++
++ if (unlikely(!cur)) {
++ printk("acx: BUG! ratemask is empty\n");
++ return; /* or else we may lock up the box */
++ }
++
++ /* do some preparations, i.e. calculate the one rate that was
++ * used to send this packet */
++ if (IS_ACX111(adev)) {
++ sent_rate = 1 << highest_bit(rate111 & RATE111_ALL);
++ } else {
++ sent_rate = rate100to111(rate100);
++ }
++ /* sent_rate has only one bit set now, corresponding to tx rate
++ * which was used by hardware to tx this particular packet */
++
++ /* now do the actual auto rate management */
++ log(L_XFER, "tx: %sclient=%p/"MACSTR" used=%04X cur=%04X cfg=%04X "
++ "__=%u/%u ^^=%u/%u\n",
++ (txc->ignore_count > 0) ? "[IGN] " : "",
++ txc, MAC(txc->address), sent_rate, cur, txc->rate_cfg,
++ txc->fallback_count, adev->fallback_threshold,
++ txc->stepup_count, adev->stepup_threshold
++ );
++
++ /* we need to ignore old packets already in the tx queue since
++ * they use older rate bytes configured before our last rate change,
++ * otherwise our mechanism will get confused by interpreting old data.
++ * Do it after logging above */
++ if (txc->ignore_count) {
++ txc->ignore_count--;
++ return;
++ }
++
++ /* true only if the only nonzero bit in sent_rate is
++ ** less significant than highest nonzero bit in cur */
++ slower_rate_was_used = ( cur > ((sent_rate<<1)-1) );
++
++ if (slower_rate_was_used || error) {
++ txc->stepup_count = 0;
++ if (++txc->fallback_count <= adev->fallback_threshold)
++ return;
++ txc->fallback_count = 0;
++
++ /* clear highest 1 bit in cur */
++ sent_rate = RATE111_54;
++ while (!(cur & sent_rate)) sent_rate >>= 1;
++ CLEAR_BIT(cur, sent_rate);
++ if (!cur) /* we can't disable all rates! */
++ cur = sent_rate;
++ log(L_XFER, "tx: falling back to ratemask %04X\n", cur);
++
++ } else { /* there was neither lower rate nor error */
++ txc->fallback_count = 0;
++ if (++txc->stepup_count <= adev->stepup_threshold)
++ return;
++ txc->stepup_count = 0;
++
++ /* Sanitize. Sort of not needed, but I dont trust hw that much...
++ ** what if it can report bogus tx rates sometimes? */
++ while (!(cur & sent_rate)) sent_rate >>= 1;
++
++ /* try to find a higher sent_rate that isn't yet in our
++ * current set, but is an allowed cfg */
++ while (1) {
++ sent_rate <<= 1;
++ if (sent_rate > txc->rate_cfg)
++ /* no higher rates allowed by config */
++ return;
++ if (!(cur & sent_rate) && (txc->rate_cfg & sent_rate))
++ /* found */
++ break;
++ /* not found, try higher one */
++ }
++ SET_BIT(cur, sent_rate);
++ log(L_XFER, "tx: stepping up to ratemask %04X\n", cur);
++ }
++
++ txc->rate_cur = cur;
++ txc->ignore_count = pkts_to_ignore;
++ /* calculate acx100 style rate byte if needed */
++ if (IS_ACX100(adev)) {
++ txc->rate_100 = acx_bitpos2rate100[highest_bit(cur)];
++ }
++}
++
++
++/***********************************************************************
++** acx_i_start_xmit
++**
++** Called by network core. Can be called outside of process context.
++*/
++int
++acx_i_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ tx_t *tx;
++ void *txbuf;
++ unsigned long flags;
++ int txresult = NOT_OK;
++ int len;
++
++ FN_ENTER;
++
++ if (unlikely(!skb)) {
++ /* indicate success */
++ txresult = OK;
++ goto end_no_unlock;
++ }
++ if (unlikely(!adev)) {
++ goto end_no_unlock;
++ }
++
++ acx_lock(adev, flags);
++
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ goto end;
++ }
++ if (unlikely(adev->mode == ACX_MODE_OFF)) {
++ goto end;
++ }
++ if (unlikely(acx_queue_stopped(ndev))) {
++ log(L_DEBUG, "%s: called when queue stopped\n", __func__);
++ goto end;
++ }
++ if (unlikely(ACX_STATUS_4_ASSOCIATED != adev->status)) {
++ log(L_XFER, "trying to xmit, but not associated yet: "
++ "aborting...\n");
++ /* silently drop the packet, since we're not connected yet */
++ txresult = OK;
++ /* ...but indicate an error nevertheless */
++ adev->stats.tx_errors++;
++ goto end;
++ }
++
++ tx = acx_l_alloc_tx(adev);
++ if (unlikely(!tx)) {
++#ifndef ACX_MEM
++ /*
++ * generic slave interface has to make do with the tiny amount, around
++ * 7k, of transmit buffer space on the ACX itself. It is likely this will
++ * frequently be full.
++ */
++ printk_ratelimited("%s: start_xmit: txdesc ring is full, "
++ "dropping tx\n", ndev->name);
++#endif
++ txresult = NOT_OK;
++ goto end;
++ }
++
++ txbuf = acx_l_get_txbuf(adev, tx);
++ if (unlikely(!txbuf)) {
++ /* Card was removed */
++ txresult = NOT_OK;
++ acx_l_dealloc_tx(adev, tx);
++ goto end;
++ }
++ len = acx_ether_to_txbuf(adev, txbuf, skb);
++ if (unlikely(len < 0)) {
++ /* Error in packet conversion */
++ txresult = NOT_OK;
++ acx_l_dealloc_tx(adev, tx);
++ goto end;
++ }
++ acx_l_tx_data(adev, tx, len);
++ ndev->trans_start = jiffies;
++
++ txresult = OK;
++ adev->stats.tx_packets++;
++ adev->stats.tx_bytes += skb->len;
++
++end:
++ acx_unlock(adev, flags);
++
++end_no_unlock:
++ if ((txresult == OK) && skb)
++ dev_kfree_skb_any(skb);
++
++ FN_EXIT1(txresult);
++ return txresult;
++}
++
++
++/***********************************************************************
++** acx_l_update_ratevector
++**
++** Updates adev->rate_supported[_len] according to rate_{basic,oper}
++*/
++const u8
++acx_bitpos2ratebyte[] = {
++ DOT11RATEBYTE_1,
++ DOT11RATEBYTE_2,
++ DOT11RATEBYTE_5_5,
++ DOT11RATEBYTE_6_G,
++ DOT11RATEBYTE_9_G,
++ DOT11RATEBYTE_11,
++ DOT11RATEBYTE_12_G,
++ DOT11RATEBYTE_18_G,
++ DOT11RATEBYTE_22,
++ DOT11RATEBYTE_24_G,
++ DOT11RATEBYTE_36_G,
++ DOT11RATEBYTE_48_G,
++ DOT11RATEBYTE_54_G,
++};
++
++void
++acx_l_update_ratevector(acx_device_t *adev)
++{
++ u16 bcfg = adev->rate_basic;
++ u16 ocfg = adev->rate_oper;
++ u8 *supp = adev->rate_supported;
++ const u8 *dot11 = acx_bitpos2ratebyte;
++
++ FN_ENTER;
++
++ while (ocfg) {
++ if (ocfg & 1) {
++ *supp = *dot11;
++ if (bcfg & 1) {
++ *supp |= 0x80;
++ }
++ supp++;
++ }
++ dot11++;
++ ocfg >>= 1;
++ bcfg >>= 1;
++ }
++ adev->rate_supported_len = supp - adev->rate_supported;
++ if (acx_debug & L_ASSOC) {
++ printk("new ratevector: ");
++ acx_dump_bytes(adev->rate_supported, adev->rate_supported_len);
++ }
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_init
++*/
++static void
++acx_l_sta_list_init(acx_device_t *adev)
++{
++ FN_ENTER;
++ memset(adev->sta_hash_tab, 0, sizeof(adev->sta_hash_tab));
++ memset(adev->sta_list, 0, sizeof(adev->sta_list));
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get_from_hash
++*/
++static inline client_t*
++acx_l_sta_list_get_from_hash(acx_device_t *adev, const u8 *address)
++{
++ return adev->sta_hash_tab[address[5] % VEC_SIZE(adev->sta_hash_tab)];
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get
++*/
++client_t*
++acx_l_sta_list_get(acx_device_t *adev, const u8 *address)
++{
++ client_t *client;
++ FN_ENTER;
++ client = acx_l_sta_list_get_from_hash(adev, address);
++ while (client) {
++ if (mac_is_equal(address, client->address)) {
++ client->mtime = jiffies;
++ break;
++ }
++ client = client->next;
++ }
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_del
++*/
++void
++acx_l_sta_list_del(acx_device_t *adev, client_t *victim)
++{
++ client_t *client, *next;
++
++ client = acx_l_sta_list_get_from_hash(adev, victim->address);
++ next = client;
++ /* tricky. next = client on first iteration only,
++ ** on all other iters next = client->next */
++ while (next) {
++ if (next == victim) {
++ client->next = victim->next;
++ /* Overkill */
++ memset(victim, 0, sizeof(*victim));
++ break;
++ }
++ client = next;
++ next = client->next;
++ }
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_alloc
++**
++** Never fails - will evict oldest client if needed
++*/
++static client_t*
++acx_l_sta_list_alloc(acx_device_t *adev)
++{
++ int i;
++ unsigned long age, oldest_age;
++ client_t *client, *oldest;
++
++ FN_ENTER;
++
++ oldest = &adev->sta_list[0];
++ oldest_age = 0;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client = &adev->sta_list[i];
++
++ if (!client->used) {
++ goto found;
++ } else {
++ age = jiffies - client->mtime;
++ if (oldest_age < age) {
++ oldest_age = age;
++ oldest = client;
++ }
++ }
++ }
++ acx_l_sta_list_del(adev, oldest);
++ client = oldest;
++found:
++ memset(client, 0, sizeof(*client));
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_add
++**
++** Never fails - will evict oldest client if needed
++*/
++/* In case we will reimplement it differently... */
++#define STA_LIST_ADD_CAN_FAIL 0
++
++static client_t*
++acx_l_sta_list_add(acx_device_t *adev, const u8 *address)
++{
++ client_t *client;
++ int index;
++
++ FN_ENTER;
++
++ client = acx_l_sta_list_alloc(adev);
++
++ client->mtime = jiffies;
++ MAC_COPY(client->address, address);
++ client->used = CLIENT_EXIST_1;
++ client->auth_alg = WLAN_AUTH_ALG_SHAREDKEY;
++ client->auth_step = 1;
++ /* give some tentative peer rate values
++ ** (needed because peer may do auth without probing us first,
++ ** thus we'll have no idea of peer's ratevector yet).
++ ** Will be overwritten by scanning or assoc code */
++ client->rate_cap = adev->rate_basic;
++ client->rate_cfg = adev->rate_basic;
++ client->rate_cur = 1 << lowest_bit(adev->rate_basic);
++
++ index = address[5] % VEC_SIZE(adev->sta_hash_tab);
++ client->next = adev->sta_hash_tab[index];
++ adev->sta_hash_tab[index] = client;
++
++ acxlog_mac(L_ASSOC, "sta_list_add: sta=", address, "\n");
++
++ FN_EXIT0;
++ return client;
++}
++
++
++/***********************************************************************
++** acx_l_sta_list_get_or_add
++**
++** Never fails - will evict oldest client if needed
++*/
++static client_t*
++acx_l_sta_list_get_or_add(acx_device_t *adev, const u8 *address)
++{
++ client_t *client = acx_l_sta_list_get(adev, address);
++ if (!client)
++ client = acx_l_sta_list_add(adev, address);
++ return client;
++}
++
++
++/***********************************************************************
++** acx_set_status
++**
++** This function is called in many atomic regions, must not sleep
++**
++** This function does not need locking UNLESS you call it
++** as acx_set_status(ACX_STATUS_4_ASSOCIATED), bacause this can
++** wake queue. This can race with stop_queue elsewhere.
++** See acx_stop_queue comment. */
++void
++acx_set_status(acx_device_t *adev, u16 new_status)
++{
++#define QUEUE_OPEN_AFTER_ASSOC 1 /* this really seems to be needed now */
++ u16 old_status = adev->status;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "%s(%d):%s\n",
++ __func__, new_status, acx_get_status_name(new_status));
++
++ /* wireless_send_event never sleeps */
++ if (ACX_STATUS_4_ASSOCIATED == new_status) {
++ union iwreq_data wrqu;
++
++ wrqu.data.length = 0;
++ wrqu.data.flags = 0;
++ wireless_send_event(adev->ndev, SIOCGIWSCAN, &wrqu, NULL);
++
++ wrqu.data.length = 0;
++ wrqu.data.flags = 0;
++ MAC_COPY(wrqu.ap_addr.sa_data, adev->bssid);
++ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
++ wireless_send_event(adev->ndev, SIOCGIWAP, &wrqu, NULL);
++ } else {
++ union iwreq_data wrqu;
++
++ /* send event with empty BSSID to indicate we're not associated */
++ MAC_ZERO(wrqu.ap_addr.sa_data);
++ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
++ wireless_send_event(adev->ndev, SIOCGIWAP, &wrqu, NULL);
++ }
++
++ adev->status = new_status;
++
++ switch (new_status) {
++ case ACX_STATUS_1_SCANNING:
++ adev->scan_retries = 0;
++ /* 1.0 s initial scan time */
++ acx_set_timer(adev, 1000000);
++ break;
++ case ACX_STATUS_2_WAIT_AUTH:
++ case ACX_STATUS_3_AUTHENTICATED:
++ adev->auth_or_assoc_retries = 0;
++ acx_set_timer(adev, 1500000); /* 1.5 s */
++ break;
++ }
++
++#if QUEUE_OPEN_AFTER_ASSOC
++ if (new_status == ACX_STATUS_4_ASSOCIATED) {
++ if (old_status < ACX_STATUS_4_ASSOCIATED) {
++ /* ah, we're newly associated now,
++ * so let's indicate carrier */
++ acx_carrier_on(adev->ndev, "after association");
++ acx_wake_queue(adev->ndev, "after association");
++ }
++ } else {
++ /* not associated any more, so let's kill carrier */
++ if (old_status >= ACX_STATUS_4_ASSOCIATED) {
++ acx_carrier_off(adev->ndev, "after losing association");
++ acx_stop_queue(adev->ndev, "after losing association");
++ }
++ }
++#endif
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_i_timer
++**
++** Fires up periodically. Used to kick scan/auth/assoc if something goes wrong
++*/
++void
++acx_i_timer(unsigned long address)
++{
++ unsigned long flags;
++ acx_device_t *adev = (acx_device_t*)address;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ log(L_DEBUG|L_ASSOC, "%s: adev->status=%d (%s)\n",
++ __func__, adev->status, acx_get_status_name(adev->status));
++
++ switch (adev->status) {
++ case ACX_STATUS_1_SCANNING:
++ /* was set to 0 by set_status() */
++ if (++adev->scan_retries < 7) {
++ acx_set_timer(adev, 1000000);
++ /* used to interrogate for scan status.
++ ** We rely on SCAN_COMPLETE IRQ instead */
++ log(L_ASSOC, "continuing scan (%d sec)\n",
++ adev->scan_retries);
++ } else {
++ log(L_ASSOC, "stopping scan\n");
++ /* send stop_scan cmd when we leave the interrupt context,
++ * and make a decision what to do next (COMPLETE_SCAN) */
++ acx_schedule_task(adev,
++ ACX_AFTER_IRQ_CMD_STOP_SCAN + ACX_AFTER_IRQ_COMPLETE_SCAN);
++ }
++ break;
++ case ACX_STATUS_2_WAIT_AUTH:
++ /* was set to 0 by set_status() */
++ if (++adev->auth_or_assoc_retries < 10) {
++ log(L_ASSOC, "resend authen1 request (attempt %d)\n",
++ adev->auth_or_assoc_retries + 1);
++ acx_l_transmit_authen1(adev);
++ } else {
++ /* time exceeded: fall back to scanning mode */
++ log(L_ASSOC,
++ "authen1 request reply timeout, giving up\n");
++ /* we are a STA, need to find AP anyhow */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ /* used to be 1500000, but some other driver uses 2.5s */
++ acx_set_timer(adev, 2500000);
++ break;
++ case ACX_STATUS_3_AUTHENTICATED:
++ /* was set to 0 by set_status() */
++ if (++adev->auth_or_assoc_retries < 10) {
++ log(L_ASSOC, "resend assoc request (attempt %d)\n",
++ adev->auth_or_assoc_retries + 1);
++ acx_l_transmit_assoc_req(adev);
++ } else {
++ /* time exceeded: give up */
++ log(L_ASSOC,
++ "association request reply timeout, giving up\n");
++ /* we are a STA, need to find AP anyhow */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ acx_set_timer(adev, 2500000); /* see above */
++ break;
++ case ACX_STATUS_4_ASSOCIATED:
++ default:
++ break;
++ }
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_set_timer
++**
++** Sets the 802.11 state management timer's timeout.
++*/
++void
++acx_set_timer(acx_device_t *adev, int timeout_us)
++{
++ FN_ENTER;
++
++ log(L_DEBUG|L_IRQ, "%s(%u ms)\n", __func__, timeout_us/1000);
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ printk("attempt to set the timer "
++ "when the card interface is not up!\n");
++ goto end;
++ }
++
++ /* first check if the timer was already initialized, THEN modify it */
++ if (adev->mgmt_timer.function) {
++ mod_timer(&adev->mgmt_timer,
++ jiffies + (timeout_us * HZ / 1000000));
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_assocresp
++**
++** We are an AP here
++*/
++static const u8
++dot11ratebyte[] = {
++ DOT11RATEBYTE_1,
++ DOT11RATEBYTE_2,
++ DOT11RATEBYTE_5_5,
++ DOT11RATEBYTE_6_G,
++ DOT11RATEBYTE_9_G,
++ DOT11RATEBYTE_11,
++ DOT11RATEBYTE_12_G,
++ DOT11RATEBYTE_18_G,
++ DOT11RATEBYTE_22,
++ DOT11RATEBYTE_24_G,
++ DOT11RATEBYTE_36_G,
++ DOT11RATEBYTE_48_G,
++ DOT11RATEBYTE_54_G,
++};
++
++static inline int
++find_pos(const u8 *p, int size, u8 v)
++{
++ int i;
++ for (i = 0; i < size; i++)
++ if (p[i] == v)
++ return i;
++ /* printk a message about strange byte? */
++ return 0;
++}
++
++static void
++add_bits_to_ratemasks(u8* ratevec, int len, u16* brate, u16* orate)
++{
++ while (len--) {
++ int n = 1 << find_pos(dot11ratebyte,
++ sizeof(dot11ratebyte), *ratevec & 0x7f);
++ if (*ratevec & 0x80)
++ *brate |= n;
++ *orate |= n;
++ ratevec++;
++ }
++}
++
++static int
++acx_l_transmit_assocresp(acx_device_t *adev, const wlan_fr_assocreq_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct assocresp_frame_body *body;
++ u8 *p;
++ const u8 *da;
++ /* const u8 *sa; */
++ const u8 *bssid;
++ client_t *clt;
++
++ FN_ENTER;
++
++ /* sa = req->hdr->a1; */
++ da = req->hdr->a2;
++ bssid = req->hdr->a3;
++
++ clt = acx_l_sta_list_get(adev, da);
++ if (!clt)
++ goto ok;
++
++ /* Assoc without auth is a big no-no */
++ /* Let's be liberal: if already assoc'ed STA sends assoc req again,
++ ** we won't be rude */
++ if (clt->used != CLIENT_AUTHENTICATED_2
++ && clt->used != CLIENT_ASSOCIATED_3) {
++ acx_l_transmit_deauthen(adev, da, WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ goto bad;
++ }
++
++ clt->used = CLIENT_ASSOCIATED_3;
++
++ if (clt->aid == 0)
++ clt->aid = ++adev->aid;
++ clt->cap_info = ieee2host16(*(req->cap_info));
++
++ /* We cheat here a bit. We don't really care which rates are flagged
++ ** as basic by the client, so we stuff them in single ratemask */
++ clt->rate_cap = 0;
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &clt->rate_cap, &clt->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &clt->rate_cap, &clt->rate_cap);
++ /* We can check that client supports all basic rates,
++ ** and deny assoc if not. But let's be liberal, right? ;) */
++ clt->rate_cfg = clt->rate_cap & adev->rate_oper;
++ if (!clt->rate_cfg) clt->rate_cfg = 1 << lowest_bit(adev->rate_oper);
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[lowest_bit(clt->rate_cfg)];
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_ASSOCRESPi;
++ head->dur = req->hdr->dur;
++ MAC_COPY(head->da, da);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, bssid);
++ head->seq = req->hdr->seq;
++
++ body->cap_info = host2ieee16(adev->capabilities);
++ body->status = host2ieee16(0);
++ body->aid = host2ieee16(clt->aid);
++ p = wlan_fill_ie_rates((u8*)&body->rates, adev->rate_supported_len,
++ adev->rate_supported);
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len,
++ adev->rate_supported);
++
++ acx_l_tx_data(adev, tx, p - (u8*)head);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++* acx_l_transmit_reassocresp
++
++You may be wondering, just like me, what the hell ReAuth is.
++In practice it was seen sent by STA when STA feels like losing connection.
++
++[802.11]
++
++5.4.2.3 Reassociation
++
++Association is sufficient for no-transition message delivery between
++IEEE 802.11 stations. Additional functionality is needed to support
++BSS-transition mobility. The additional required functionality
++is provided by the reassociation service. Reassociation is a DSS.
++The reassociation service is invoked to 'move' a current association
++from one AP to another. This keeps the DS informed of the current
++mapping between AP and STA as the station moves from BSS to BSS within
++an ESS. Reassociation also enables changing association attributes
++of an established association while the STA remains associated with
++the same AP. Reassociation is always initiated by the mobile STA.
++
++5.4.3.1 Authentication
++...
++A STA may be authenticated with many other STAs at any given instant.
++
++5.4.3.1.1 Preauthentication
++
++Because the authentication process could be time-consuming (depending
++on the authentication protocol in use), the authentication service can
++be invoked independently of the association service. Preauthentication
++is typically done by a STA while it is already associated with an AP
++(with which it previously authenticated). IEEE 802.11 does not require
++that STAs preauthenticate with APs. However, authentication is required
++before an association can be established. If the authentication is left
++until reassociation time, this may impact the speed with which a STA can
++reassociate between APs, limiting BSS-transition mobility performance.
++The use of preauthentication takes the authentication service overhead
++out of the time-critical reassociation process.
++
++5.7.3 Reassociation
++
++For a STA to reassociate, the reassociation service causes the following
++message to occur:
++
++ Reassociation request
++
++* Message type: Management
++* Message subtype: Reassociation request
++* Information items:
++ - IEEE address of the STA
++ - IEEE address of the AP with which the STA will reassociate
++ - IEEE address of the AP with which the STA is currently associated
++ - ESSID
++* Direction of message: From STA to 'new' AP
++
++The address of the current AP is included for efficiency. The inclusion
++of the current AP address facilitates MAC reassociation to be independent
++of the DS implementation.
++
++ Reassociation response
++* Message type: Management
++* Message subtype: Reassociation response
++* Information items:
++ - Result of the requested reassociation. (success/failure)
++ - If the reassociation is successful, the response shall include the AID.
++* Direction of message: From AP to STA
++
++7.2.3.6 Reassociation Request frame format
++
++The frame body of a management frame of subtype Reassociation Request
++contains the information shown in Table 9.
++
++Table 9 Reassociation Request frame body
++Order Information
++1 Capability information
++2 Listen interval
++3 Current AP address
++4 SSID
++5 Supported rates
++
++7.2.3.7 Reassociation Response frame format
++
++The frame body of a management frame of subtype Reassociation Response
++contains the information shown in Table 10.
++
++Table 10 Reassociation Response frame body
++Order Information
++1 Capability information
++2 Status code
++3 Association ID (AID)
++4 Supported rates
++
++*/
++static int
++acx_l_transmit_reassocresp(acx_device_t *adev, const wlan_fr_reassocreq_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct reassocresp_frame_body *body;
++ u8 *p;
++ const u8 *da;
++ /* const u8 *sa; */
++ const u8 *bssid;
++ client_t *clt;
++
++ FN_ENTER;
++
++ /* sa = req->hdr->a1; */
++ da = req->hdr->a2;
++ bssid = req->hdr->a3;
++
++ /* Must be already authenticated, so it must be in the list */
++ clt = acx_l_sta_list_get(adev, da);
++ if (!clt)
++ goto ok;
++
++ /* Assoc without auth is a big no-no */
++ /* Already assoc'ed STAs sending ReAssoc req are ok per 802.11 */
++ if (clt->used != CLIENT_AUTHENTICATED_2
++ && clt->used != CLIENT_ASSOCIATED_3) {
++ acx_l_transmit_deauthen(adev, da, WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ goto bad;
++ }
++
++ clt->used = CLIENT_ASSOCIATED_3;
++ if (clt->aid == 0) {
++ clt->aid = ++adev->aid;
++ }
++ if (req->cap_info)
++ clt->cap_info = ieee2host16(*(req->cap_info));
++
++ /* We cheat here a bit. We don't really care which rates are flagged
++ ** as basic by the client, so we stuff them in single ratemask */
++ clt->rate_cap = 0;
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &clt->rate_cap, &clt->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &clt->rate_cap, &clt->rate_cap);
++ /* We can check that client supports all basic rates,
++ ** and deny assoc if not. But let's be liberal, right? ;) */
++ clt->rate_cfg = clt->rate_cap & adev->rate_oper;
++ if (!clt->rate_cfg) clt->rate_cfg = 1 << lowest_bit(adev->rate_oper);
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[lowest_bit(clt->rate_cfg)];
++
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_REASSOCRESPi;
++ head->dur = req->hdr->dur;
++ MAC_COPY(head->da, da);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, bssid);
++ head->seq = req->hdr->seq;
++
++ /* IEs: 1. caps */
++ body->cap_info = host2ieee16(adev->capabilities);
++ /* 2. status code */
++ body->status = host2ieee16(0);
++ /* 3. AID */
++ body->aid = host2ieee16(clt->aid);
++ /* 4. supp rates */
++ p = wlan_fill_ie_rates((u8*)&body->rates, adev->rate_supported_len,
++ adev->rate_supported);
++ /* 5. ext supp rates */
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len,
++ adev->rate_supported);
++
++ acx_l_tx_data(adev, tx, p - (u8*)head);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_process_disassoc_from_sta
++*/
++static void
++acx_l_process_disassoc_from_sta(acx_device_t *adev, const wlan_fr_disassoc_t *req)
++{
++ const u8 *ta;
++ client_t *clt;
++
++ FN_ENTER;
++
++ ta = req->hdr->a2;
++ clt = acx_l_sta_list_get(adev, ta);
++ if (!clt)
++ goto end;
++
++ if (clt->used != CLIENT_ASSOCIATED_3
++ && clt->used != CLIENT_AUTHENTICATED_2) {
++ /* it's disassociating, but it's
++ ** not even authenticated! Let it know that */
++ acxlog_mac(L_ASSOC|L_XFER, "peer ", ta, "has sent disassoc "
++ "req but it is not even auth'ed! sending deauth\n");
++ acx_l_transmit_deauthen(adev, ta,
++ WLAN_MGMT_REASON_CLASS2_NONAUTH);
++ clt->used = CLIENT_EXIST_1;
++ } else {
++ /* mark it as auth'ed only */
++ clt->used = CLIENT_AUTHENTICATED_2;
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_deauthen_from_sta
++*/
++static void
++acx_l_process_deauth_from_sta(acx_device_t *adev, const wlan_fr_deauthen_t *req)
++{
++ const wlan_hdr_t *hdr;
++ client_t *client;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (acx_debug & L_ASSOC) {
++ acx_print_mac("got deauth from sta:", hdr->a2, " ");
++ acx_print_mac("a1:", hdr->a1, " ");
++ acx_print_mac("a3:", hdr->a3, " ");
++ acx_print_mac("adev->addr:", adev->dev_addr, " ");
++ acx_print_mac("adev->bssid:", adev->bssid, "\n");
++ }
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)) {
++ goto end;
++ }
++
++ client = acx_l_sta_list_get(adev, hdr->a2);
++ if (!client) {
++ goto end;
++ }
++ client->used = CLIENT_EXIST_1;
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_disassoc_from_ap
++*/
++static void
++acx_l_process_disassoc_from_ap(acx_device_t *adev, const wlan_fr_disassoc_t *req)
++{
++ FN_ENTER;
++
++ if (!adev->ap_client) {
++ /* Hrm, we aren't assoc'ed yet anyhow... */
++ goto end;
++ }
++
++ printk("%s: got disassoc frame with reason %d (%s)\n",
++ adev->ndev->name, *req->reason,
++ acx_wlan_reason_str(*req->reason));
++
++ if (mac_is_equal(adev->dev_addr, req->hdr->a1)) {
++ acx_l_transmit_deauthen(adev, adev->bssid,
++ WLAN_MGMT_REASON_DEAUTH_LEAVING);
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_deauth_from_ap
++*/
++static void
++acx_l_process_deauth_from_ap(acx_device_t *adev, const wlan_fr_deauthen_t *req)
++{
++ FN_ENTER;
++
++ if (!adev->ap_client) {
++ /* Hrm, we aren't assoc'ed yet anyhow... */
++ goto end;
++ }
++
++ printk("%s: got deauth frame with reason %d (%s)\n",
++ adev->ndev->name, *req->reason,
++ acx_wlan_reason_str(*req->reason));
++
++ /* Chk: is ta verified to be from our AP? */
++ if (mac_is_equal(adev->dev_addr, req->hdr->a1)) {
++ log(L_DEBUG, "AP sent us deauth packet\n");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_rx
++**
++** The end of the Rx path. Pulls data from a rxhostdesc into a socket
++** buffer and feeds it to the network stack via netif_rx().
++*/
++static void
++acx_l_rx(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ FN_ENTER;
++ if (likely(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ struct sk_buff *skb;
++ skb = acx_rxbuf_to_ether(adev, rxbuf);
++ if (likely(skb)) {
++ netif_rx(skb);
++ adev->ndev->last_rx = jiffies;
++ adev->stats.rx_packets++;
++ adev->stats.rx_bytes += skb->len;
++ }
++ }
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_process_data_frame_master
++*/
++static int
++acx_l_process_data_frame_master(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *hdr;
++ struct tx *tx;
++ void *txbuf;
++ int len;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ case WF_FC_FROMDSi:
++ log(L_DEBUG, "ap->sta or adhoc->adhoc data frame ignored\n");
++ goto done;
++ case WF_FC_TODSi:
++ break;
++ default: /* WF_FC_FROMTODSi */
++ log(L_DEBUG, "wds data frame ignored (TODO)\n");
++ goto done;
++ }
++
++ /* check if it is our BSSID, if not, leave */
++ if (!mac_is_equal(adev->bssid, hdr->a1)) {
++ goto done;
++ }
++
++ if (mac_is_equal(adev->dev_addr, hdr->a3)) {
++ /* this one is for us */
++ acx_l_rx(adev, rxbuf);
++ } else {
++ if (mac_is_bcast(hdr->a3)) {
++ /* this one is bcast, rx it too */
++ acx_l_rx(adev, rxbuf);
++ }
++ tx = acx_l_alloc_tx(adev);
++ if (!tx) {
++ goto fail;
++ }
++ /* repackage, tx, and hope it someday reaches its destination */
++ /* order is important, we do it in-place */
++ MAC_COPY(hdr->a1, hdr->a3);
++ MAC_COPY(hdr->a3, hdr->a2);
++ MAC_COPY(hdr->a2, adev->bssid);
++ /* To_DS = 0, From_DS = 1 */
++ hdr->fc = WF_FC_FROMDSi + WF_FTYPE_DATAi;
++
++ txbuf = acx_l_get_txbuf(adev, tx);
++ if (txbuf) {
++ len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ memcpy(txbuf, hdr, len);
++ acx_l_tx_data(adev, tx, len);
++ } else {
++ acx_l_dealloc_tx(adev, tx);
++ }
++ }
++done:
++ result = OK;
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_data_frame_client
++*/
++static int
++acx_l_process_data_frame_client(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ const u8 *da, *bssid;
++ const wlan_hdr_t *hdr;
++ struct net_device *ndev = adev->ndev;
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ if (ACX_STATUS_4_ASSOCIATED != adev->status)
++ goto drop;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ if (adev->mode != ACX_MODE_0_ADHOC) {
++ log(L_DEBUG, "adhoc->adhoc data frame ignored\n");
++ goto drop;
++ }
++ bssid = hdr->a3;
++ break;
++ case WF_FC_FROMDSi:
++ if (adev->mode != ACX_MODE_2_STA) {
++ log(L_DEBUG, "ap->sta data frame ignored\n");
++ goto drop;
++ }
++ bssid = hdr->a2;
++ break;
++ case WF_FC_TODSi:
++ log(L_DEBUG, "sta->ap data frame ignored\n");
++ goto drop;
++ default: /* WF_FC_FROMTODSi: wds->wds */
++ log(L_DEBUG, "wds data frame ignored (todo)\n");
++ goto drop;
++ }
++
++ da = hdr->a1;
++
++ if (unlikely(acx_debug & L_DEBUG)) {
++ acx_print_mac("rx: da=", da, "");
++ acx_print_mac(" bssid=", bssid, "");
++ acx_print_mac(" adev->bssid=", adev->bssid, "");
++ acx_print_mac(" adev->addr=", adev->dev_addr, "\n");
++ }
++
++ /* promiscuous mode --> receive all packets */
++ if (unlikely(ndev->flags & IFF_PROMISC))
++ goto process;
++
++ /* FIRST, check if it is our BSSID */
++ if (!mac_is_equal(adev->bssid, bssid)) {
++ /* is not our BSSID, so bail out */
++ goto drop;
++ }
++
++ /* then, check if it is our address */
++ if (mac_is_equal(adev->dev_addr, da)) {
++ goto process;
++ }
++
++ /* then, check if it is broadcast */
++ if (mac_is_bcast(da)) {
++ goto process;
++ }
++
++ if (mac_is_mcast(da)) {
++ /* unconditionally receive all multicasts */
++ if (ndev->flags & IFF_ALLMULTI)
++ goto process;
++
++ /* FIXME: need to check against the list of
++ * multicast addresses that are configured
++ * for the interface (ifconfig) */
++ log(L_XFER, "FIXME: multicast packet, need to check "
++ "against a list of multicast addresses "
++ "(to be created!); accepting packet for now\n");
++ /* for now, just accept it here */
++ goto process;
++ }
++
++ log(L_DEBUG, "rx: foreign packet, dropping\n");
++ goto drop;
++process:
++ /* receive packet */
++ acx_l_rx(adev, rxbuf);
++
++ result = OK;
++drop:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_mgmt_frame
++**
++** Theory of operation: mgmt packet gets parsed (to make it easy
++** to access variable-sized IEs), results stored in 'parsed'.
++** Then we react to the packet.
++*/
++typedef union parsed_mgmt_req {
++ wlan_fr_mgmt_t mgmt;
++ wlan_fr_assocreq_t assocreq;
++ wlan_fr_reassocreq_t reassocreq;
++ wlan_fr_assocresp_t assocresp;
++ wlan_fr_reassocresp_t reassocresp;
++ wlan_fr_beacon_t beacon;
++ wlan_fr_disassoc_t disassoc;
++ wlan_fr_authen_t authen;
++ wlan_fr_deauthen_t deauthen;
++ wlan_fr_proberesp_t proberesp;
++} parsed_mgmt_req_t;
++
++void BUG_excessive_stack_usage(void);
++
++static int
++acx_l_process_mgmt_frame(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ parsed_mgmt_req_t parsed; /* takes ~100 bytes of stack */
++ wlan_hdr_t *hdr;
++ int adhoc, sta_scan, sta, ap;
++ int len;
++
++ if (sizeof(parsed) > 256)
++ BUG_excessive_stack_usage();
++
++ FN_ENTER;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ /* Management frames never have these set */
++ if (WF_FC_FROMTODSi & hdr->fc) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ if (WF_FC_ISWEPi & hdr->fc)
++ len -= 0x10;
++
++ adhoc = (adev->mode == ACX_MODE_0_ADHOC);
++ sta_scan = ((adev->mode == ACX_MODE_2_STA)
++ && (adev->status != ACX_STATUS_4_ASSOCIATED));
++ sta = ((adev->mode == ACX_MODE_2_STA)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED));
++ ap = (adev->mode == ACX_MODE_3_AP);
++
++ switch (WF_FC_FSTYPEi & hdr->fc) {
++ /* beacons first, for speed */
++ case WF_FSTYPE_BEACONi:
++ memset(&parsed.beacon, 0, sizeof(parsed.beacon));
++ parsed.beacon.hdr = hdr;
++ parsed.beacon.len = len;
++ if (acx_debug & L_DATA) {
++ printk("beacon len:%d fc:%04X dur:%04X seq:%04X",
++ len, hdr->fc, hdr->dur, hdr->seq);
++ acx_print_mac(" a1:", hdr->a1, "");
++ acx_print_mac(" a2:", hdr->a2, "");
++ acx_print_mac(" a3:", hdr->a3, "\n");
++ }
++ wlan_mgmt_decode_beacon(&parsed.beacon);
++ /* beacon and probe response are very similar, so... */
++ acx_l_process_probe_response(adev, &parsed.beacon, rxbuf);
++ break;
++ case WF_FSTYPE_ASSOCREQi:
++ if (!ap)
++ break;
++ memset(&parsed.assocreq, 0, sizeof(parsed.assocreq));
++ parsed.assocreq.hdr = hdr;
++ parsed.assocreq.len = len;
++ wlan_mgmt_decode_assocreq(&parsed.assocreq);
++ if (mac_is_equal(hdr->a1, adev->bssid)
++ && mac_is_equal(hdr->a3, adev->bssid)) {
++ acx_l_transmit_assocresp(adev, &parsed.assocreq);
++ }
++ break;
++ case WF_FSTYPE_REASSOCREQi:
++ if (!ap)
++ break;
++ memset(&parsed.assocreq, 0, sizeof(parsed.assocreq));
++ parsed.assocreq.hdr = hdr;
++ parsed.assocreq.len = len;
++ wlan_mgmt_decode_assocreq(&parsed.assocreq);
++ /* reassocreq and assocreq are equivalent */
++ acx_l_transmit_reassocresp(adev, &parsed.reassocreq);
++ break;
++ case WF_FSTYPE_ASSOCRESPi:
++ if (!sta_scan)
++ break;
++ memset(&parsed.assocresp, 0, sizeof(parsed.assocresp));
++ parsed.assocresp.hdr = hdr;
++ parsed.assocresp.len = len;
++ wlan_mgmt_decode_assocresp(&parsed.assocresp);
++ acx_l_process_assocresp(adev, &parsed.assocresp);
++ break;
++ case WF_FSTYPE_REASSOCRESPi:
++ if (!sta_scan)
++ break;
++ memset(&parsed.assocresp, 0, sizeof(parsed.assocresp));
++ parsed.assocresp.hdr = hdr;
++ parsed.assocresp.len = len;
++ wlan_mgmt_decode_assocresp(&parsed.assocresp);
++ acx_l_process_reassocresp(adev, &parsed.reassocresp);
++ break;
++ case WF_FSTYPE_PROBEREQi:
++ if (ap || adhoc) {
++ /* FIXME: since we're supposed to be an AP,
++ ** we need to return a Probe Response packet.
++ ** Currently firmware is doing it for us,
++ ** but firmware is buggy! See comment elsewhere --vda */
++ }
++ break;
++ case WF_FSTYPE_PROBERESPi:
++ memset(&parsed.proberesp, 0, sizeof(parsed.proberesp));
++ parsed.proberesp.hdr = hdr;
++ parsed.proberesp.len = len;
++ wlan_mgmt_decode_proberesp(&parsed.proberesp);
++ acx_l_process_probe_response(adev, &parsed.proberesp, rxbuf);
++ break;
++ case 6:
++ case 7:
++ /* exit */
++ break;
++ case WF_FSTYPE_ATIMi:
++ /* exit */
++ break;
++ case WF_FSTYPE_DISASSOCi:
++ if (!sta && !ap)
++ break;
++ memset(&parsed.disassoc, 0, sizeof(parsed.disassoc));
++ parsed.disassoc.hdr = hdr;
++ parsed.disassoc.len = len;
++ wlan_mgmt_decode_disassoc(&parsed.disassoc);
++ if (sta)
++ acx_l_process_disassoc_from_ap(adev, &parsed.disassoc);
++ else
++ acx_l_process_disassoc_from_sta(adev, &parsed.disassoc);
++ break;
++ case WF_FSTYPE_AUTHENi:
++ if (!sta_scan && !ap)
++ break;
++ memset(&parsed.authen, 0, sizeof(parsed.authen));
++ parsed.authen.hdr = hdr;
++ parsed.authen.len = len;
++ wlan_mgmt_decode_authen(&parsed.authen);
++ acx_l_process_authen(adev, &parsed.authen);
++ break;
++ case WF_FSTYPE_DEAUTHENi:
++ if (!sta && !ap)
++ break;
++ memset(&parsed.deauthen, 0, sizeof(parsed.deauthen));
++ parsed.deauthen.hdr = hdr;
++ parsed.deauthen.len = len;
++ wlan_mgmt_decode_deauthen(&parsed.deauthen);
++ if (sta)
++ acx_l_process_deauth_from_ap(adev, &parsed.deauthen);
++ else
++ acx_l_process_deauth_from_sta(adev, &parsed.deauthen);
++ break;
++ }
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#ifdef UNUSED
++/***********************************************************************
++** acx_process_class_frame
++**
++** Called from IRQ context only
++*/
++static int
++acx_process_class_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala)
++{
++ return OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_process_NULL_frame
++*/
++#ifdef BOGUS_ITS_NOT_A_NULL_FRAME_HANDLER_AT_ALL
++static int
++acx_l_process_NULL_frame(acx_device_t *adev, rxbuffer_t *rxbuf, int vala)
++{
++ const signed char *esi;
++ const u8 *ebx;
++ const wlan_hdr_t *hdr;
++ const client_t *client;
++ int result = NOT_OK;
++
++ hdr = acx_get_wlan_hdr(adev, rxbuf);
++
++ switch (WF_FC_FROMTODSi & hdr->fc) {
++ case 0:
++ esi = hdr->a1;
++ ebx = hdr->a2;
++ break;
++ case WF_FC_FROMDSi:
++ esi = hdr->a1;
++ ebx = hdr->a3;
++ break;
++ case WF_FC_TODSi:
++ esi = hdr->a1;
++ ebx = hdr->a2;
++ break;
++ default: /* WF_FC_FROMTODSi */
++ esi = hdr->a1; /* added by me! --vda */
++ ebx = hdr->a2;
++ }
++
++ if (esi[0x0] < 0) {
++ result = OK;
++ goto done;
++ }
++
++ client = acx_l_sta_list_get(adev, ebx);
++ if (client)
++ result = NOT_OK;
++ else {
++#ifdef IS_IT_BROKEN
++ log(L_DEBUG|L_XFER, "<transmit_deauth 7>\n");
++ acx_l_transmit_deauthen(adev, ebx,
++ WLAN_MGMT_REASON_CLASS2_NONAUTH);
++#else
++ log(L_DEBUG, "received NULL frame from unknown client! "
++ "We really shouldn't send deauthen here, right?\n");
++#endif
++ result = OK;
++ }
++done:
++ return result;
++}
++#endif
++
++
++/***********************************************************************
++** acx_l_process_probe_response
++*/
++static int
++acx_l_process_probe_response(acx_device_t *adev, wlan_fr_proberesp_t *req,
++ const rxbuffer_t *rxbuf)
++{
++ struct client *bss;
++ wlan_hdr_t *hdr;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (mac_is_equal(hdr->a3, adev->dev_addr)) {
++ log(L_ASSOC, "huh, scan found our own MAC!?\n");
++ goto ok; /* just skip this one silently */
++ }
++
++ bss = acx_l_sta_list_get_or_add(adev, hdr->a2);
++
++ /* NB: be careful modifying bss data! It may be one
++ ** of the already known clients (like our AP if we are a STA)
++ ** Thus do not blindly modify e.g. current ratemask! */
++
++ if (STA_LIST_ADD_CAN_FAIL && !bss) {
++ /* uh oh, we found more sites/stations than we can handle with
++ * our current setup: pull the emergency brake and stop scanning! */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_STOP_SCAN);
++ /* TODO: a nice comment what below call achieves --vda */
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ goto ok;
++ }
++ /* NB: get_or_add already filled bss->address = hdr->a2 */
++ MAC_COPY(bss->bssid, hdr->a3);
++
++ /* copy the ESSID element */
++ if (req->ssid && req->ssid->len <= IW_ESSID_MAX_SIZE) {
++ bss->essid_len = req->ssid->len;
++ memcpy(bss->essid, req->ssid->ssid, req->ssid->len);
++ bss->essid[req->ssid->len] = '\0';
++ } else {
++ /* Either no ESSID IE or oversized one */
++ printk("%s: received packet has bogus ESSID\n",
++ adev->ndev->name);
++ }
++
++ if (req->ds_parms)
++ bss->channel = req->ds_parms->curr_ch;
++ if (req->cap_info)
++ bss->cap_info = ieee2host16(*req->cap_info);
++
++ bss->sir = acx_signal_to_winlevel(rxbuf->phy_level);
++ bss->snr = acx_signal_to_winlevel(rxbuf->phy_snr);
++
++ bss->rate_cap = 0; /* operational mask */
++ bss->rate_bas = 0; /* basic mask */
++ if (req->supp_rates)
++ add_bits_to_ratemasks(req->supp_rates->rates,
++ req->supp_rates->len, &bss->rate_bas, &bss->rate_cap);
++ if (req->ext_rates)
++ add_bits_to_ratemasks(req->ext_rates->rates,
++ req->ext_rates->len, &bss->rate_bas, &bss->rate_cap);
++ /* Fix up any possible bogosity - code elsewhere
++ * is not expecting empty masks */
++ if (!bss->rate_cap)
++ bss->rate_cap = adev->rate_basic;
++ if (!bss->rate_bas)
++ bss->rate_bas = 1 << lowest_bit(bss->rate_cap);
++ if (!bss->rate_cur)
++ bss->rate_cur = 1 << lowest_bit(bss->rate_bas);
++
++ /* People moan about this being too noisy at L_ASSOC */
++ log(L_DEBUG,
++ "found %s: ESSID=\"%s\" ch=%d "
++ "BSSID="MACSTR" caps=0x%04X SIR=%d SNR=%d\n",
++ (bss->cap_info & WF_MGMT_CAP_IBSS) ? "Ad-Hoc peer" : "AP",
++ bss->essid, bss->channel, MAC(bss->bssid), bss->cap_info,
++ bss->sir, bss->snr);
++ok:
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_process_assocresp
++*/
++static int
++acx_l_process_assocresp(acx_device_t *adev, const wlan_fr_assocresp_t *req)
++{
++ const wlan_hdr_t *hdr;
++ int res = OK;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if ((ACX_MODE_2_STA == adev->mode)
++ && mac_is_equal(adev->dev_addr, hdr->a1)) {
++ u16 st = ieee2host16(*(req->status));
++ if (WLAN_MGMT_STATUS_SUCCESS == st) {
++ adev->aid = ieee2host16(*(req->aid));
++ /* tell the card we are associated when
++ ** we are out of interrupt context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_ASSOCIATE);
++ } else {
++
++ /* TODO: we shall delete peer from sta_list, and try
++ ** other candidates... */
++
++ printk("%s: association FAILED: peer sent "
++ "Status Code %d (%s)\n",
++ adev->ndev->name, st, get_status_string(st));
++ res = NOT_OK;
++ }
++ }
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acx_l_process_reassocresp
++*/
++static int
++acx_l_process_reassocresp(acx_device_t *adev, const wlan_fr_reassocresp_t *req)
++{
++ const wlan_hdr_t *hdr;
++ int result = NOT_OK;
++ u16 st;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)) {
++ goto end;
++ }
++ st = ieee2host16(*(req->status));
++ if (st == WLAN_MGMT_STATUS_SUCCESS) {
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ result = OK;
++ } else {
++ printk("%s: reassociation FAILED: peer sent "
++ "response code %d (%s)\n",
++ adev->ndev->name, st, get_status_string(st));
++ }
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_l_process_authen
++**
++** Called only in STA_SCAN or AP mode
++*/
++static int
++acx_l_process_authen(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ const wlan_hdr_t *hdr;
++ client_t *clt;
++ wlan_ie_challenge_t *chal;
++ u16 alg, seq, status;
++ int ap, result;
++
++ FN_ENTER;
++
++ hdr = req->hdr;
++
++ if (acx_debug & L_ASSOC) {
++ acx_print_mac("AUTHEN adev->addr=", adev->dev_addr, " ");
++ acx_print_mac("a1=", hdr->a1, " ");
++ acx_print_mac("a2=", hdr->a2, " ");
++ acx_print_mac("a3=", hdr->a3, " ");
++ acx_print_mac("adev->bssid=", adev->bssid, "\n");
++ }
++
++ if (!mac_is_equal(adev->dev_addr, hdr->a1)
++ || !mac_is_equal(adev->bssid, hdr->a3)) {
++ result = OK;
++ goto end;
++ }
++
++ alg = ieee2host16(*(req->auth_alg));
++ seq = ieee2host16(*(req->auth_seq));
++ status = ieee2host16(*(req->status));
++
++ log(L_ASSOC, "auth algorithm %d, auth sequence %d, status %d\n", alg, seq, status);
++
++ ap = (adev->mode == ACX_MODE_3_AP);
++
++ if (adev->auth_alg <= 1) {
++ if (adev->auth_alg != alg) {
++ log(L_ASSOC, "auth algorithm mismatch: "
++ "our:%d peer:%d\n", adev->auth_alg, alg);
++ result = NOT_OK;
++ goto end;
++ }
++ }
++ if (ap) {
++ clt = acx_l_sta_list_get_or_add(adev, hdr->a2);
++ if (STA_LIST_ADD_CAN_FAIL && !clt) {
++ log(L_ASSOC, "could not allocate room for client\n");
++ result = NOT_OK;
++ goto end;
++ }
++ } else {
++ clt = adev->ap_client;
++ if (!mac_is_equal(clt->address, hdr->a2)) {
++ printk("%s: malformed auth frame from AP?!\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto end;
++ }
++ }
++
++ /* now check which step in the authentication sequence we are
++ * currently in, and act accordingly */
++ switch (seq) {
++ case 1:
++ if (!ap)
++ break;
++ acx_l_transmit_authen2(adev, req, clt);
++ break;
++ case 2:
++ if (ap)
++ break;
++ if (status == WLAN_MGMT_STATUS_SUCCESS) {
++ if (alg == WLAN_AUTH_ALG_OPENSYSTEM) {
++ acx_set_status(adev, ACX_STATUS_3_AUTHENTICATED);
++ acx_l_transmit_assoc_req(adev);
++ } else
++ if (alg == WLAN_AUTH_ALG_SHAREDKEY) {
++ acx_l_transmit_authen3(adev, req);
++ }
++ } else {
++ printk("%s: auth FAILED: peer sent "
++ "response code %d (%s), "
++ "still waiting for authentication\n",
++ adev->ndev->name,
++ status, get_status_string(status));
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ }
++ break;
++ case 3:
++ if (!ap)
++ break;
++ if ((clt->auth_alg != WLAN_AUTH_ALG_SHAREDKEY)
++ || (alg != WLAN_AUTH_ALG_SHAREDKEY)
++ || (clt->auth_step != 2))
++ break;
++ chal = req->challenge;
++ if (!chal
++ || memcmp(chal->challenge, clt->challenge_text, WLAN_CHALLENGE_LEN)
++ || (chal->eid != WLAN_EID_CHALLENGE)
++ || (chal->len != WLAN_CHALLENGE_LEN)
++ )
++ break;
++ acx_l_transmit_authen4(adev, req);
++ MAC_COPY(clt->address, hdr->a2);
++ clt->used = CLIENT_AUTHENTICATED_2;
++ clt->auth_step = 4;
++ clt->seq = ieee2host16(hdr->seq);
++ break;
++ case 4:
++ if (ap)
++ break;
++ /* ok, we're through: we're authenticated. Woohoo!! */
++ acx_set_status(adev, ACX_STATUS_3_AUTHENTICATED);
++ log(L_ASSOC, "Authenticated!\n");
++ /* now that we're authenticated, request association */
++ acx_l_transmit_assoc_req(adev);
++ break;
++ }
++ result = OK;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_gen_challenge
++*/
++static inline void
++acx_gen_challenge(wlan_ie_challenge_t* d)
++{
++ FN_ENTER;
++ d->eid = WLAN_EID_CHALLENGE;
++ d->len = WLAN_CHALLENGE_LEN;
++ get_random_bytes(d->challenge, WLAN_CHALLENGE_LEN);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_deauthen
++*/
++static int
++acx_l_transmit_deauthen(acx_device_t *adev, const u8 *addr, u16 reason)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct deauthen_frame_body *body;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = (WF_FTYPE_MGMTi | WF_FSTYPE_DEAUTHENi);
++ head->dur = 0;
++ MAC_COPY(head->da, addr);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ log(L_DEBUG|L_ASSOC|L_XFER,
++ "sending deauthen to "MACSTR" for %d\n",
++ MAC(addr), reason);
++
++ body->reason = host2ieee16(reason);
++
++ /* body is fixed size here, but beware of cutting-and-pasting this -
++ ** do not use sizeof(*body) for variable sized mgmt packets! */
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + sizeof(*body));
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen1
++*/
++static int
++acx_l_transmit_authen1(acx_device_t *adev)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "sending authentication1 request (auth algo %d), "
++ "awaiting response\n", adev->auth_alg);
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi;
++ /* duration should be 0 instead of 0x8000 to have
++ * the firmware calculate the value, right? */
++ head->dur = 0;
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ body->auth_alg = host2ieee16(adev->auth_alg);
++ body->auth_seq = host2ieee16(1);
++ body->status = host2ieee16(0);
++
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + 2 + 2 + 2);
++
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen2
++*/
++static int
++acx_l_transmit_authen2(acx_device_t *adev, const wlan_fr_authen_t *req,
++ client_t *clt)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++ unsigned int packet_len;
++
++ FN_ENTER;
++
++ if (!clt)
++ goto ok;
++
++ MAC_COPY(clt->address, req->hdr->a2);
++#ifdef UNUSED
++ clt->ps = ((WF_FC_PWRMGTi & req->hdr->fc) != 0);
++#endif
++ clt->auth_alg = ieee2host16(*(req->auth_alg));
++ clt->auth_step = 2;
++ clt->seq = ieee2host16(req->hdr->seq);
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi;
++ head->dur = 0 /* req->hdr->dur */;
++ MAC_COPY(head->da, req->hdr->a2);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, req->hdr->a3);
++ head->seq = 0 /* req->hdr->seq */;
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(2);
++ body->status = host2ieee16(0);
++
++ packet_len = WLAN_HDR_A3_LEN + 2 + 2 + 2;
++ if (ieee2host16(*(req->auth_alg)) == WLAN_AUTH_ALG_OPENSYSTEM) {
++ clt->used = CLIENT_AUTHENTICATED_2;
++ } else { /* shared key */
++ acx_gen_challenge(&body->challenge);
++ memcpy(&clt->challenge_text, body->challenge.challenge, WLAN_CHALLENGE_LEN);
++ packet_len += 2 + 2 + 2 + 1+1+WLAN_CHALLENGE_LEN;
++ }
++
++ acxlog_mac(L_ASSOC|L_XFER,
++ "transmit_auth2: BSSID=", head->bssid, "\n");
++
++ acx_l_tx_data(adev, tx, packet_len);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen3
++*/
++static int
++acx_l_transmit_authen3(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++ unsigned int packet_len;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ /* add WF_FC_ISWEPi: auth step 3 needs to be encrypted */
++ head->fc = WF_FC_ISWEPi + WF_FSTYPE_AUTHENi;
++ /* FIXME: is this needed?? authen4 does it...
++ * I think it's even wrong since we shouldn't re-use old
++ * values but instead let the firmware calculate proper ones
++ head->dur = req->hdr->dur;
++ head->seq = req->hdr->seq;
++ */
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(3);
++ body->status = host2ieee16(0);
++ memcpy(&body->challenge, req->challenge, req->challenge->len + 2);
++ packet_len = WLAN_HDR_A3_LEN + 8 + req->challenge->len;
++
++ log(L_ASSOC|L_XFER, "transmit_authen3!\n");
++
++ acx_l_tx_data(adev, tx, packet_len);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_authen4
++*/
++static int
++acx_l_transmit_authen4(acx_device_t *adev, const wlan_fr_authen_t *req)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct auth_frame_body *body;
++
++ FN_ENTER;
++
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto ok;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto ok;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_AUTHENi; /* 0xb0 */
++ head->dur = 0 /* req->hdr->dur */;
++ MAC_COPY(head->da, req->hdr->a2);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, req->hdr->a3);
++ head->seq = 0 /* req->hdr->seq */;
++
++ /* already in IEEE format, no endianness conversion */
++ body->auth_alg = *(req->auth_alg);
++ body->auth_seq = host2ieee16(4);
++ body->status = host2ieee16(0);
++
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + 2 + 2 + 2);
++ok:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_assoc_req
++**
++** adev->ap_client is a current candidate AP here
++*/
++static int
++acx_l_transmit_assoc_req(acx_device_t *adev)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ u8 *body, *p, *prate;
++ unsigned int packet_len;
++ u16 cap;
++
++ FN_ENTER;
++
++ log(L_ASSOC, "sending association request, "
++ "awaiting response. NOT ASSOCIATED YET\n");
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++ head->fc = WF_FSTYPE_ASSOCREQi;
++ head->dur = host2ieee16(0x8000);
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->bssid);
++ head->seq = 0;
++
++ p = body;
++ /* now start filling the AssocReq frame body */
++
++ /* since this assoc request will most likely only get
++ * sent in the STA to AP case (and not when Ad-Hoc IBSS),
++ * the cap combination indicated here will thus be
++ * WF_MGMT_CAP_ESSi *always* (no IBSS ever)
++ * The specs are more than non-obvious on all that:
++ *
++ * 802.11 7.3.1.4 Capability Information field
++ ** APs set the ESS subfield to 1 and the IBSS subfield to 0 within
++ ** Beacon or Probe Response management frames. STAs within an IBSS
++ ** set the ESS subfield to 0 and the IBSS subfield to 1 in transmitted
++ ** Beacon or Probe Response management frames
++ **
++ ** APs set the Privacy subfield to 1 within transmitted Beacon,
++ ** Probe Response, Association Response, and Reassociation Response
++ ** if WEP is required for all data type frames within the BSS.
++ ** STAs within an IBSS set the Privacy subfield to 1 in Beacon
++ ** or Probe Response management frames if WEP is required
++ ** for all data type frames within the IBSS */
++
++ /* note that returning 0 will be refused by several APs...
++ * (so this indicates that you're probably supposed to
++ * "confirm" the ESS mode) */
++ cap = WF_MGMT_CAP_ESSi;
++
++ /* this one used to be a check on wep_restricted,
++ * but more likely it's wep_enabled instead */
++ if (adev->wep_enabled)
++ SET_BIT(cap, WF_MGMT_CAP_PRIVACYi);
++
++ /* Probably we can just set these always, because our hw is
++ ** capable of shortpre and PBCC --vda */
++ /* only ask for short preamble if the peer station supports it */
++ if (adev->ap_client->cap_info & WF_MGMT_CAP_SHORT)
++ SET_BIT(cap, WF_MGMT_CAP_SHORTi);
++ /* only ask for PBCC support if the peer station supports it */
++ if (adev->ap_client->cap_info & WF_MGMT_CAP_PBCC)
++ SET_BIT(cap, WF_MGMT_CAP_PBCCi);
++
++ /* IEs: 1. caps */
++ *(u16*)p = cap; p += 2;
++ /* 2. listen interval */
++ *(u16*)p = host2ieee16(adev->listen_interval); p += 2;
++ /* 3. ESSID */
++ p = wlan_fill_ie_ssid(p,
++ strlen(adev->essid_for_assoc), adev->essid_for_assoc);
++ /* 4. supp rates */
++ prate = p;
++ p = wlan_fill_ie_rates(p,
++ adev->rate_supported_len, adev->rate_supported);
++ /* 5. ext supp rates */
++ p = wlan_fill_ie_rates_ext(p,
++ adev->rate_supported_len, adev->rate_supported);
++
++ if (acx_debug & L_DEBUG) {
++ printk("association: rates element\n");
++ acx_dump_bytes(prate, p - prate);
++ }
++
++ /* calculate lengths */
++ packet_len = WLAN_HDR_A3_LEN + (p - body);
++
++ log(L_ASSOC, "association: requesting caps 0x%04X, ESSID \"%s\"\n",
++ cap, adev->essid_for_assoc);
++
++ acx_l_tx_data(adev, tx, packet_len);
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acx_l_transmit_disassoc
++**
++** FIXME: looks like incomplete implementation of a helper:
++** acx_l_transmit_disassoc(adev, clt) - kick this client (we're an AP)
++** acx_l_transmit_disassoc(adev, NULL) - leave BSSID (we're a STA)
++*/
++#ifdef BROKEN
++int
++acx_l_transmit_disassoc(acx_device_t *adev, client_t *clt)
++{
++ struct tx *tx;
++ struct wlan_hdr_mgmt *head;
++ struct disassoc_frame_body *body;
++
++ FN_ENTER;
++/* if (clt != NULL) { */
++ tx = acx_l_alloc_tx(adev);
++ if (!tx)
++ goto bad;
++ head = acx_l_get_txbuf(adev, tx);
++ if (!head) {
++ acx_l_dealloc_tx(adev, tx);
++ goto bad;
++ }
++ body = (void*)(head + 1);
++
++/* clt->used = CLIENT_AUTHENTICATED_2; - not (yet?) associated */
++
++ head->fc = WF_FSTYPE_DISASSOCi;
++ head->dur = 0;
++ /* huh? It muchly depends on whether we're STA or AP...
++ ** sta->ap: da=bssid, sa=own, bssid=bssid
++ ** ap->sta: da=sta, sa=bssid, bssid=bssid. FIXME! */
++ MAC_COPY(head->da, adev->bssid);
++ MAC_COPY(head->sa, adev->dev_addr);
++ MAC_COPY(head->bssid, adev->dev_addr);
++ head->seq = 0;
++
++ /* "Class 3 frame received from nonassociated station." */
++ body->reason = host2ieee16(7);
++
++ /* fixed size struct, ok to sizeof */
++ acx_l_tx_data(adev, tx, WLAN_HDR_A3_LEN + sizeof(*body));
++/* } */
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_complete_scan
++**
++** Called either from after_interrupt_task() if:
++** 1) there was Scan_Complete IRQ, or
++** 2) scanning expired in timer()
++** We need to decide which ESS or IBSS to join.
++** Iterates thru adev->sta_list:
++** if adev->ap is not bcast, will join only specified
++** ESS or IBSS with this bssid
++** checks peers' caps for ESS/IBSS bit
++** checks peers' SSID, allows exact match or hidden SSID
++** If station to join is chosen:
++** points adev->ap_client to the chosen struct client
++** sets adev->essid_for_assoc for future assoc attempt
++** Auth/assoc is not yet performed
++** Returns OK if there is no need to restart scan
++*/
++int
++acx_s_complete_scan(acx_device_t *adev)
++{
++ struct client *bss;
++ unsigned long flags;
++ u16 needed_cap;
++ int i;
++ int idx_found = -1;
++ int result = OK;
++
++ FN_ENTER;
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ needed_cap = WF_MGMT_CAP_IBSS; /* 2, we require Ad-Hoc */
++ break;
++ case ACX_MODE_2_STA:
++ needed_cap = WF_MGMT_CAP_ESS; /* 1, we require Managed */
++ break;
++ default:
++ printk("acx: driver bug: mode=%d in complete_scan()\n", adev->mode);
++ dump_stack();
++ goto end;
++ }
++
++ acx_lock(adev, flags);
++
++ /* TODO: sta_iterator hiding implementation would be nice here... */
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++
++
++ log(L_ASSOC, "scan table: SSID=\"%s\" CH=%d SIR=%d SNR=%d\n",
++ bss->essid, bss->channel, bss->sir, bss->snr);
++
++ if (!mac_is_bcast(adev->ap))
++ if (!mac_is_equal(bss->bssid, adev->ap))
++ continue; /* keep looking */
++
++ /* broken peer with no mode flags set? */
++ if (unlikely(!(bss->cap_info & (WF_MGMT_CAP_ESS | WF_MGMT_CAP_IBSS)))) {
++ printk("%s: strange peer "MACSTR" found with "
++ "neither ESS (AP) nor IBSS (Ad-Hoc) "
++ "capability - skipped\n",
++ adev->ndev->name, MAC(bss->address));
++ continue;
++ }
++ log(L_ASSOC, "peer_cap 0x%04X, needed_cap 0x%04X\n",
++ bss->cap_info, needed_cap);
++
++ /* does peer station support what we need? */
++ if ((bss->cap_info & needed_cap) != needed_cap)
++ continue; /* keep looking */
++
++ /* strange peer with NO basic rates?! */
++ if (unlikely(!bss->rate_bas)) {
++ printk("%s: strange peer "MACSTR" with empty rate set "
++ "- skipped\n",
++ adev->ndev->name, MAC(bss->address));
++ continue;
++ }
++
++ /* do we support all basic rates of this peer? */
++ if ((bss->rate_bas & adev->rate_oper) != bss->rate_bas) {
++/* we probably need to have all rates as operational rates,
++ even in case of an 11M-only configuration */
++#ifdef THIS_IS_TROUBLESOME
++ printk("%s: peer "MACSTR": incompatible basic rates "
++ "(AP requests 0x%04X, we have 0x%04X) "
++ "- skipped\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->rate_bas, adev->rate_oper);
++ continue;
++#else
++ printk("%s: peer "MACSTR": incompatible basic rates "
++ "(AP requests 0x%04X, we have 0x%04X). "
++ "Considering anyway...\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->rate_bas, adev->rate_oper);
++#endif
++ }
++
++ if ( !(adev->reg_dom_chanmask & (1<<(bss->channel-1))) ) {
++ printk("%s: warning: peer "MACSTR" is on channel %d "
++ "outside of channel range of current "
++ "regulatory domain - couldn't join "
++ "even if other settings match. "
++ "You might want to adapt your config\n",
++ adev->ndev->name, MAC(bss->address),
++ bss->channel);
++ continue; /* keep looking */
++ }
++
++ if (!adev->essid_active || !strcmp(bss->essid, adev->essid)) {
++ log(L_ASSOC,
++ "found station with matching ESSID! ('%s' "
++ "station, '%s' config)\n",
++ bss->essid,
++ (adev->essid_active) ? adev->essid : "[any]");
++ /* TODO: continue looking for peer with better SNR */
++ bss->used = CLIENT_JOIN_CANDIDATE;
++ idx_found = i;
++
++ /* stop searching if this station is
++ * on the current channel, otherwise
++ * keep looking for an even better match */
++ if (bss->channel == adev->channel)
++ break;
++ } else
++ if (is_hidden_essid(bss->essid)) {
++ /* hmm, station with empty or single-space SSID:
++ * using hidden SSID broadcast?
++ */
++ /* This behaviour is broken: which AP from zillion
++ ** of APs with hidden SSID you'd try?
++ ** We should use Probe requests to get Probe responses
++ ** and check for real SSID (are those never hidden?) */
++ bss->used = CLIENT_JOIN_CANDIDATE;
++ if (idx_found == -1)
++ idx_found = i;
++ log(L_ASSOC, "found station with empty or "
++ "single-space (hidden) SSID, considering "
++ "for assoc attempt\n");
++ /* ...and keep looking for better matches */
++ } else {
++ log(L_ASSOC, "ESSID doesn't match! ('%s' "
++ "station, '%s' config)\n",
++ bss->essid,
++ (adev->essid_active) ? adev->essid : "[any]");
++ }
++ }
++
++ /* TODO: iterate thru join candidates instead */
++ /* TODO: rescan if not associated within some timeout */
++ if (idx_found != -1) {
++ char *essid_src;
++ size_t essid_len;
++
++ bss = &adev->sta_list[idx_found];
++ adev->ap_client = bss;
++
++ if (is_hidden_essid(bss->essid)) {
++ /* if the ESSID of the station we found is empty
++ * (no broadcast), then use user-configured ESSID
++ * instead */
++ essid_src = adev->essid;
++ essid_len = adev->essid_len;
++ } else {
++ essid_src = bss->essid;
++ essid_len = strlen(bss->essid);
++ }
++
++ acx_update_capabilities(adev);
++
++ memcpy(adev->essid_for_assoc, essid_src, essid_len);
++ adev->essid_for_assoc[essid_len] = '\0';
++ adev->channel = bss->channel;
++ MAC_COPY(adev->bssid, bss->bssid);
++
++ bss->rate_cfg = (bss->rate_cap & adev->rate_oper);
++ bss->rate_cur = 1 << lowest_bit(bss->rate_cfg);
++ bss->rate_100 = acx_rate111to100(bss->rate_cur);
++
++ acxlog_mac(L_ASSOC,
++ "matching station found: ", adev->bssid, ", joining\n");
++
++ /* TODO: do we need to switch to the peer's channel first? */
++
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ } else {
++ acx_l_transmit_authen1(adev);
++ acx_set_status(adev, ACX_STATUS_2_WAIT_AUTH);
++ }
++ } else { /* idx_found == -1 */
++ /* uh oh, no station found in range */
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ printk("%s: no matching station found in range, "
++ "generating our own IBSS instead\n",
++ adev->ndev->name);
++ /* we do it the HostAP way: */
++ MAC_COPY(adev->bssid, adev->dev_addr);
++ adev->bssid[0] |= 0x02; /* 'local assigned addr' bit */
++ /* add IBSS bit to our caps... */
++ acx_update_capabilities(adev);
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ /* In order to cmd_join be called below */
++ idx_found = 0;
++ } else {
++ /* we shall scan again, AP can be
++ ** just temporarily powered off */
++ log(L_ASSOC,
++ "no matching station found in range yet\n");
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ result = NOT_OK;
++ }
++ }
++
++ acx_unlock(adev, flags);
++
++ if (idx_found != -1) {
++ if (ACX_MODE_0_ADHOC == adev->mode) {
++ /* need to update channel in beacon template */
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ }
++ /* Inform firmware on our decision to start or join BSS */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ }
++
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_read_fw
++**
++** Loads a firmware image
++**
++** Returns:
++** 0 unable to load file
++** pointer to firmware success
++*/
++firmware_image_t*
++acx_s_read_fw(struct device *dev, const char *file, u32 *size)
++{
++ firmware_image_t *res;
++ const struct firmware *fw_entry;
++
++ res = NULL;
++ log(L_INIT, "requesting firmware image '%s'\n", file);
++ if (!request_firmware(&fw_entry, file, dev)) {
++ *size = 8;
++ if (fw_entry->size >= 8)
++ *size = 8 + le32_to_cpu(*(u32 *)(fw_entry->data + 4));
++ if (fw_entry->size != *size) {
++ printk("acx: firmware size does not match "
++ "firmware header: %d != %d, "
++ "aborting fw upload\n",
++ (int) fw_entry->size, (int) *size);
++ goto release_ret;
++ }
++ res = vmalloc(*size);
++ if (!res) {
++ printk("acx: no memory for firmware "
++ "(%u bytes)\n", *size);
++ goto release_ret;
++ }
++ memcpy(res, fw_entry->data, fw_entry->size);
++release_ret:
++ release_firmware(fw_entry);
++ return res;
++ }
++ printk("acx: firmware image '%s' was not provided. "
++ "Check your hotplug scripts\n", file);
++
++ /* checksum will be verified in write_fw, so don't bother here */
++ return res;
++}
++
++
++/***********************************************************************
++** acx_s_set_wepkey
++*/
++static void
++acx100_s_set_wepkey(acx_device_t *adev)
++{
++ ie_dot11WEPDefaultKey_t dk;
++ int i;
++
++ for (i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++) {
++ if (adev->wep_keys[i].size != 0) {
++ log(L_INIT, "setting WEP key: %d with "
++ "total size: %d\n", i, (int) adev->wep_keys[i].size);
++ dk.action = 1;
++ dk.keySize = adev->wep_keys[i].size;
++ dk.defaultKeyNum = i;
++ memcpy(dk.key, adev->wep_keys[i].key, dk.keySize);
++ acx_s_configure(adev, &dk, ACX100_IE_DOT11_WEP_DEFAULT_KEY_WRITE);
++ }
++ }
++}
++
++static void
++acx111_s_set_wepkey(acx_device_t *adev)
++{
++ acx111WEPDefaultKey_t dk;
++ int i;
++
++ for (i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++) {
++ if (adev->wep_keys[i].size != 0) {
++ log(L_INIT, "setting WEP key: %d with "
++ "total size: %d\n", i, (int) adev->wep_keys[i].size);
++ memset(&dk, 0, sizeof(dk));
++ dk.action = cpu_to_le16(1); /* "add key"; yes, that's a 16bit value */
++ dk.keySize = adev->wep_keys[i].size;
++
++ /* are these two lines necessary? */
++ dk.type = 0; /* default WEP key */
++ dk.index = 0; /* ignored when setting default key */
++
++ dk.defaultKeyNum = i;
++ memcpy(dk.key, adev->wep_keys[i].key, dk.keySize);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WEP_MGMT, &dk, sizeof(dk));
++ }
++ }
++}
++
++static void
++acx_s_set_wepkey(acx_device_t *adev)
++{
++ if (IS_ACX111(adev))
++ acx111_s_set_wepkey(adev);
++ else
++ acx100_s_set_wepkey(adev);
++}
++
++
++/***********************************************************************
++** acx100_s_init_wep
++**
++** FIXME: this should probably be moved into the new card settings
++** management, but since we're also modifying the memory map layout here
++** due to the WEP key space we want, we should take care...
++*/
++static int
++acx100_s_init_wep(acx_device_t *adev)
++{
++ acx100_ie_wep_options_t options;
++ ie_dot11WEPDefaultKeyID_t dk;
++ acx_ie_memmap_t pt;
++ int res = NOT_OK;
++
++ FN_ENTER;
++
++ if (OK != acx_s_interrogate(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ log(L_DEBUG, "CodeEnd:%X\n", pt.CodeEnd);
++
++ pt.WEPCacheStart = cpu_to_le32(le32_to_cpu(pt.CodeEnd) + 0x4);
++ pt.WEPCacheEnd = cpu_to_le32(le32_to_cpu(pt.CodeEnd) + 0x4);
++
++ if (OK != acx_s_configure(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ goto fail;
++ }
++
++ /* let's choose maximum setting: 4 default keys, plus 10 other keys: */
++ options.NumKeys = cpu_to_le16(DOT11_MAX_DEFAULT_WEP_KEYS + 10);
++ options.WEPOption = 0x00;
++
++ log(L_ASSOC, "%s: writing WEP options\n", __func__);
++ acx_s_configure(adev, &options, ACX100_IE_WEP_OPTIONS);
++
++ acx100_s_set_wepkey(adev);
++
++ if (adev->wep_keys[adev->wep_current_index].size != 0) {
++ log(L_ASSOC, "setting active default WEP key number: %d\n",
++ adev->wep_current_index);
++ dk.KeyID = adev->wep_current_index;
++ acx_s_configure(adev, &dk, ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET); /* 0x1010 */
++ }
++ /* FIXME!!! wep_key_struct is filled nowhere! But adev
++ * is initialized to 0, and we don't REALLY need those keys either */
++/* for (i = 0; i < 10; i++) {
++ if (adev->wep_key_struct[i].len != 0) {
++ MAC_COPY(wep_mgmt.MacAddr, adev->wep_key_struct[i].addr);
++ wep_mgmt.KeySize = cpu_to_le16(adev->wep_key_struct[i].len);
++ memcpy(&wep_mgmt.Key, adev->wep_key_struct[i].key, le16_to_cpu(wep_mgmt.KeySize));
++ wep_mgmt.Action = cpu_to_le16(1);
++ log(L_ASSOC, "writing WEP key %d (len %d)\n", i, le16_to_cpu(wep_mgmt.KeySize));
++ if (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_WEP_MGMT, &wep_mgmt, sizeof(wep_mgmt))) {
++ adev->wep_key_struct[i].index = i;
++ }
++ }
++ }
++*/
++
++ /* now retrieve the updated WEPCacheEnd pointer... */
++ if (OK != acx_s_interrogate(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ printk("%s: ACX1xx_IE_MEMORY_MAP read #2 FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ /* ...and tell it to start allocating templates at that location */
++ /* (no endianness conversion needed) */
++ pt.PacketTemplateStart = pt.WEPCacheEnd;
++
++ if (OK != acx_s_configure(adev, &pt, ACX1xx_IE_MEMORY_MAP)) {
++ printk("%s: ACX1xx_IE_MEMORY_MAP write #2 FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ res = OK;
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++static int
++acx_s_init_max_template_generic(acx_device_t *adev, unsigned int len, unsigned int cmd)
++{
++ int res;
++ union {
++ acx_template_nullframe_t null;
++ acx_template_beacon_t b;
++ acx_template_tim_t tim;
++ acx_template_probereq_t preq;
++ acx_template_proberesp_t presp;
++ } templ;
++
++ memset(&templ, 0, len);
++ templ.null.size = cpu_to_le16(len - 2);
++ res = acx_s_issue_cmd(adev, cmd, &templ, len);
++ return res;
++}
++
++static inline int
++acx_s_init_max_null_data_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_nullframe_t), ACX1xx_CMD_CONFIG_NULL_DATA
++ );
++}
++
++static inline int
++acx_s_init_max_beacon_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_beacon_t), ACX1xx_CMD_CONFIG_BEACON
++ );
++}
++
++static inline int
++acx_s_init_max_tim_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_tim_t), ACX1xx_CMD_CONFIG_TIM
++ );
++}
++
++static inline int
++acx_s_init_max_probe_response_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_proberesp_t), ACX1xx_CMD_CONFIG_PROBE_RESPONSE
++ );
++}
++
++static inline int
++acx_s_init_max_probe_request_template(acx_device_t *adev)
++{
++ return acx_s_init_max_template_generic(
++ adev, sizeof(acx_template_probereq_t), ACX1xx_CMD_CONFIG_PROBE_REQUEST
++ );
++}
++
++/***********************************************************************
++** acx_s_set_tim_template
++**
++** FIXME: In full blown driver we will regularly update partial virtual bitmap
++** by calling this function
++** (it can be done by irq handler on each DTIM irq or by timer...)
++
++[802.11 7.3.2.6] TIM information element:
++- 1 EID
++- 1 Length
++1 1 DTIM Count
++ indicates how many beacons (including this) appear before next DTIM
++ (0=this one is a DTIM)
++2 1 DTIM Period
++ number of beacons between successive DTIMs
++ (0=reserved, 1=all TIMs are DTIMs, 2=every other, etc)
++3 1 Bitmap Control
++ bit0: Traffic Indicator bit associated with Assoc ID 0 (Bcast AID?)
++ set to 1 in TIM elements with a value of 0 in the DTIM Count field
++ when one or more broadcast or multicast frames are buffered at the AP.
++ bit1-7: Bitmap Offset (logically Bitmap_Offset = Bitmap_Control & 0xFE).
++4 n Partial Virtual Bitmap
++ Visible part of traffic-indication bitmap.
++ Full bitmap consists of 2008 bits (251 octets) such that bit number N
++ (0<=N<=2007) in the bitmap corresponds to bit number (N mod 8)
++ in octet number N/8 where the low-order bit of each octet is bit0,
++ and the high order bit is bit7.
++ Each set bit in virtual bitmap corresponds to traffic buffered by AP
++ for a specific station (with corresponding AID?).
++ Partial Virtual Bitmap shows a part of bitmap which has non-zero.
++ Bitmap Offset is a number of skipped zero octets (see above).
++ 'Missing' octets at the tail are also assumed to be zero.
++ Example: Length=6, Bitmap_Offset=2, Partial_Virtual_Bitmap=55 55 55
++ This means that traffic-indication bitmap is:
++ 00000000 00000000 01010101 01010101 01010101 00000000 00000000...
++ (is bit0 in the map is always 0 and real value is in Bitmap Control bit0?)
++*/
++static int
++acx_s_set_tim_template(acx_device_t *adev)
++{
++/* For now, configure smallish test bitmap, all zero ("no pending data") */
++ enum { bitmap_size = 5 };
++
++ acx_template_tim_t t;
++ int result;
++
++ FN_ENTER;
++
++ memset(&t, 0, sizeof(t));
++ t.size = 5 + bitmap_size; /* eid+len+count+period+bmap_ctrl + bmap */
++ t.tim_eid = WLAN_EID_TIM;
++ t.len = 3 + bitmap_size; /* count+period+bmap_ctrl + bmap */
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_TIM, &t, sizeof(t));
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_fill_beacon_or_proberesp_template
++**
++** For frame format info, please see 802.11-1999.pdf item 7.2.3.9 and below!!
++**
++** NB: we use the fact that
++** struct acx_template_proberesp and struct acx_template_beacon are the same
++** (well, almost...)
++**
++** [802.11] Beacon's body consist of these IEs:
++** 1 Timestamp
++** 2 Beacon interval
++** 3 Capability information
++** 4 SSID
++** 5 Supported rates (up to 8 rates)
++** 6 FH Parameter Set (frequency-hopping PHYs only)
++** 7 DS Parameter Set (direct sequence PHYs only)
++** 8 CF Parameter Set (only if PCF is supported)
++** 9 IBSS Parameter Set (ad-hoc only)
++**
++** Beacon only:
++** 10 TIM (AP only) (see 802.11 7.3.2.6)
++** 11 Country Information (802.11d)
++** 12 FH Parameters (802.11d)
++** 13 FH Pattern Table (802.11d)
++** ... (?!! did not yet find relevant PDF file... --vda)
++** 19 ERP Information (extended rate PHYs)
++** 20 Extended Supported Rates (if more than 8 rates)
++**
++** Proberesp only:
++** 10 Country information (802.11d)
++** 11 FH Parameters (802.11d)
++** 12 FH Pattern Table (802.11d)
++** 13-n Requested information elements (802.11d)
++** ????
++** 18 ERP Information (extended rate PHYs)
++** 19 Extended Supported Rates (if more than 8 rates)
++*/
++static int
++acx_fill_beacon_or_proberesp_template(acx_device_t *adev,
++ struct acx_template_beacon *templ,
++ u16 fc /* in host order! */)
++{
++ int len;
++ u8 *p;
++
++ FN_ENTER;
++
++ memset(templ, 0, sizeof(*templ));
++ MAC_BCAST(templ->da);
++ MAC_COPY(templ->sa, adev->dev_addr);
++ MAC_COPY(templ->bssid, adev->bssid);
++
++ templ->beacon_interval = cpu_to_le16(adev->beacon_interval);
++ acx_update_capabilities(adev);
++ templ->cap = cpu_to_le16(adev->capabilities);
++
++ p = templ->variable;
++ p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
++ p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
++ p = wlan_fill_ie_ds_parms(p, adev->channel);
++ /* NB: should go AFTER tim, but acx seem to keep tim last always */
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ /* ATIM window */
++ p = wlan_fill_ie_ibss_parms(p, 0); break;
++ case ACX_MODE_3_AP:
++ /* TIM IE is set up as separate template */
++ break;
++ }
++
++ len = p - (u8*)templ;
++ templ->fc = cpu_to_le16(WF_FTYPE_MGMT | fc);
++ /* - 2: do not count 'u16 size' field */
++ templ->size = cpu_to_le16(len - 2);
++
++ FN_EXIT1(len);
++ return len;
++}
++
++
++#if POWER_SAVE_80211
++/***********************************************************************
++** acx_s_set_null_data_template
++*/
++static int
++acx_s_set_null_data_template(acx_device_t *adev)
++{
++ struct acx_template_nullframe b;
++ int result;
++
++ FN_ENTER;
++
++ /* memset(&b, 0, sizeof(b)); not needed, setting all members */
++
++ b.size = cpu_to_le16(sizeof(b) - 2);
++ b.hdr.fc = WF_FTYPE_MGMTi | WF_FSTYPE_NULLi;
++ b.hdr.dur = 0;
++ MAC_BCAST(b.hdr.a1);
++ MAC_COPY(b.hdr.a2, adev->dev_addr);
++ MAC_COPY(b.hdr.a3, adev->bssid);
++ b.hdr.seq = 0;
++
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_NULL_DATA, &b, sizeof(b));
++
++ FN_EXIT1(result);
++ return result;
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_set_beacon_template
++*/
++static int
++acx_s_set_beacon_template(acx_device_t *adev)
++{
++ struct acx_template_beacon bcn;
++ int len, result;
++
++ FN_ENTER;
++
++ len = acx_fill_beacon_or_proberesp_template(adev, &bcn, WF_FSTYPE_BEACON);
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_BEACON, &bcn, len);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_set_probe_response_template
++*/
++static int
++acx_s_set_probe_response_template(acx_device_t *adev)
++{
++ struct acx_template_proberesp pr;
++ int len, result;
++
++ FN_ENTER;
++
++ len = acx_fill_beacon_or_proberesp_template(adev, &pr, WF_FSTYPE_PROBERESP);
++ result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_PROBE_RESPONSE, &pr, len);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_init_packet_templates()
++**
++** NOTE: order is very important here, to have a correct memory layout!
++** init templates: max Probe Request (station mode), max NULL data,
++** max Beacon, max TIM, max Probe Response.
++*/
++static int
++acx_s_init_packet_templates(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm; /* ACX100 only */
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ log(L_DEBUG|L_INIT, "initializing max packet templates\n");
++
++ if (OK != acx_s_init_max_probe_request_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_null_data_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_beacon_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_tim_template(adev))
++ goto failed;
++
++ if (OK != acx_s_init_max_probe_response_template(adev))
++ goto failed;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 doesn't need the memory map magic below,
++ * and the other templates will be set later (acx_start) */
++ result = OK;
++ goto success;
++ }
++
++ /* ACX100 will have its TIM template set,
++ * and we also need to update the memory map */
++
++ if (OK != acx_s_set_tim_template(adev))
++ goto failed_acx100;
++
++ log(L_DEBUG, "sizeof(memmap)=%d bytes\n", (int)sizeof(mm));
++
++ if (OK != acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP))
++ goto failed_acx100;
++
++ mm.QueueStart = cpu_to_le32(le32_to_cpu(mm.PacketTemplateEnd) + 4);
++ if (OK != acx_s_configure(adev, &mm, ACX1xx_IE_MEMORY_MAP))
++ goto failed_acx100;
++
++ result = OK;
++ goto success;
++
++failed_acx100:
++ log(L_DEBUG|L_INIT,
++ /* "cb=0x%X\n" */
++ "ACXMemoryMap:\n"
++ ".CodeStart=0x%X\n"
++ ".CodeEnd=0x%X\n"
++ ".WEPCacheStart=0x%X\n"
++ ".WEPCacheEnd=0x%X\n"
++ ".PacketTemplateStart=0x%X\n"
++ ".PacketTemplateEnd=0x%X\n",
++ /* len, */
++ le32_to_cpu(mm.CodeStart),
++ le32_to_cpu(mm.CodeEnd),
++ le32_to_cpu(mm.WEPCacheStart),
++ le32_to_cpu(mm.WEPCacheEnd),
++ le32_to_cpu(mm.PacketTemplateStart),
++ le32_to_cpu(mm.PacketTemplateEnd));
++
++failed:
++ printk("%s: %s() FAILED\n", adev->ndev->name, __func__);
++
++success:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_s_set_probe_request_template(acx_device_t *adev)
++{
++ struct acx_template_probereq probereq;
++ char *p;
++ int res;
++ int frame_len;
++
++ FN_ENTER;
++
++ memset(&probereq, 0, sizeof(probereq));
++
++ probereq.fc = WF_FTYPE_MGMTi | WF_FSTYPE_PROBEREQi;
++ MAC_BCAST(probereq.da);
++ MAC_COPY(probereq.sa, adev->dev_addr);
++ MAC_BCAST(probereq.bssid);
++
++ p = probereq.variable;
++ p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
++ p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
++ p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
++ frame_len = p - (char*)&probereq;
++ probereq.size = cpu_to_le16(frame_len - 2);
++
++ res = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_PROBE_REQUEST, &probereq, frame_len);
++ FN_EXIT0;
++ return res;
++}
++
++
++/***********************************************************************
++** acx_s_init_mac
++*/
++int
++acx_s_init_mac(acx_device_t *adev)
++{
++ int result = NOT_OK;
++
++ FN_ENTER;
++
++ if (IS_ACX111(adev)) {
++ adev->ie_len = acx111_ie_len;
++ adev->ie_len_dot11 = acx111_ie_len_dot11;
++ } else {
++ adev->ie_len = acx100_ie_len;
++ adev->ie_len_dot11 = acx100_ie_len_dot11;
++ }
++
++#if defined (ACX_MEM)
++ adev->memblocksize = 256; /* 256 is default */
++ /* try to load radio for both ACX100 and ACX111, since both
++ * chips have at least some firmware versions making use of an
++ * external radio module */
++ acxmem_s_upload_radio(adev);
++#else
++ if (IS_PCI(adev)) {
++ adev->memblocksize = 256; /* 256 is default */
++ /* try to load radio for both ACX100 and ACX111, since both
++ * chips have at least some firmware versions making use of an
++ * external radio module */
++ acxpci_s_upload_radio(adev);
++ } else {
++ adev->memblocksize = 128;
++ }
++#endif
++
++ if (IS_ACX111(adev)) {
++ /* for ACX111, the order is different from ACX100
++ 1. init packet templates
++ 2. create station context and create dma regions
++ 3. init wep default keys
++ */
++ if (OK != acx_s_init_packet_templates(adev))
++ goto fail;
++ if (OK != acx111_s_create_dma_regions(adev)) {
++ printk("%s: acx111_create_dma_regions FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ } else {
++ if (OK != acx100_s_init_wep(adev))
++ goto fail;
++ if (OK != acx_s_init_packet_templates(adev))
++ goto fail;
++ if (OK != acx100_s_create_dma_regions(adev)) {
++ printk("%s: acx100_create_dma_regions FAILED\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ }
++
++ MAC_COPY(adev->ndev->dev_addr, adev->dev_addr);
++ result = OK;
++
++fail:
++ if (result)
++ printk("acx: init_mac() FAILED\n");
++ FN_EXIT1(result);
++ return result;
++}
++
++
++void
++acx_s_set_sane_reg_domain(acx_device_t *adev, int do_set)
++{
++ unsigned mask;
++
++ unsigned int i;
++
++ for (i = 0; i < sizeof(acx_reg_domain_ids); i++)
++ if (acx_reg_domain_ids[i] == adev->reg_dom_id)
++ break;
++
++ if (sizeof(acx_reg_domain_ids) == i) {
++ log(L_INIT, "Invalid or unsupported regulatory domain"
++ " 0x%02X specified, falling back to FCC (USA)!"
++ " Please report if this sounds fishy!\n",
++ adev->reg_dom_id);
++ i = 0;
++ adev->reg_dom_id = acx_reg_domain_ids[i];
++
++ /* since there was a mismatch, we need to force updating */
++ do_set = 1;
++ }
++
++ if (do_set) {
++ acx_ie_generic_t dom;
++ dom.m.bytes[0] = adev->reg_dom_id;
++ acx_s_configure(adev, &dom, ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN);
++ }
++
++ adev->reg_dom_chanmask = reg_domain_channel_masks[i];
++
++ mask = (1 << (adev->channel - 1));
++ if (!(adev->reg_dom_chanmask & mask)) {
++ /* hmm, need to adjust our channel to reside within domain */
++ mask = 1;
++ for (i = 1; i <= 14; i++) {
++ if (adev->reg_dom_chanmask & mask) {
++ printk("%s: adjusting selected channel from %d "
++ "to %d due to new regulatory domain\n",
++ adev->ndev->name, adev->channel, i);
++ adev->channel = i;
++ break;
++ }
++ mask <<= 1;
++ }
++ }
++}
++
++
++#if POWER_SAVE_80211
++static void
++acx_s_update_80211_powersave_mode(acx_device_t *adev)
++{
++ /* merge both structs in a union to be able to have common code */
++ union {
++ acx111_ie_powersave_t acx111;
++ acx100_ie_powersave_t acx100;
++ } pm;
++
++ /* change 802.11 power save mode settings */
++ log(L_INIT, "updating 802.11 power save mode settings: "
++ "wakeup_cfg 0x%02X, listen interval %u, "
++ "options 0x%02X, hangover period %u, "
++ "enhanced_ps_transition_time %u\n",
++ adev->ps_wakeup_cfg, adev->ps_listen_interval,
++ adev->ps_options, adev->ps_hangover_period,
++ adev->ps_enhanced_transition_time);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "Previous PS mode settings: wakeup_cfg 0x%02X, "
++ "listen interval %u, options 0x%02X, "
++ "hangover period %u, "
++ "enhanced_ps_transition_time %u, beacon_rx_time %u\n",
++ pm.acx111.wakeup_cfg,
++ pm.acx111.listen_interval,
++ pm.acx111.options,
++ pm.acx111.hangover_period,
++ IS_ACX111(adev) ?
++ pm.acx111.enhanced_ps_transition_time
++ : pm.acx100.enhanced_ps_transition_time,
++ IS_ACX111(adev) ?
++ pm.acx111.beacon_rx_time
++ : (u32)-1
++ );
++ pm.acx111.wakeup_cfg = adev->ps_wakeup_cfg;
++ pm.acx111.listen_interval = adev->ps_listen_interval;
++ pm.acx111.options = adev->ps_options;
++ pm.acx111.hangover_period = adev->ps_hangover_period;
++ if (IS_ACX111(adev)) {
++ pm.acx111.beacon_rx_time = cpu_to_le32(adev->ps_beacon_rx_time);
++ pm.acx111.enhanced_ps_transition_time = cpu_to_le32(adev->ps_enhanced_transition_time);
++ } else {
++ pm.acx100.enhanced_ps_transition_time = cpu_to_le16(adev->ps_enhanced_transition_time);
++ }
++ acx_s_configure(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "wakeup_cfg: 0x%02X\n", pm.acx111.wakeup_cfg);
++ acx_s_msleep(40);
++ acx_s_interrogate(adev, &pm, ACX1xx_IE_POWER_MGMT);
++ log(L_INIT, "wakeup_cfg: 0x%02X\n", pm.acx111.wakeup_cfg);
++ log(L_INIT, "power save mode change %s\n",
++ (pm.acx111.wakeup_cfg & PS_CFG_PENDING) ? "FAILED" : "was successful");
++ /* FIXME: maybe verify via PS_CFG_PENDING bit here
++ * that power save mode change was successful. */
++ /* FIXME: we shouldn't trigger a scan immediately after
++ * fiddling with power save mode (since the firmware is sending
++ * a NULL frame then). */
++}
++#endif
++
++
++/***********************************************************************
++** acx_s_update_card_settings
++**
++** Applies accumulated changes in various adev->xxxx members
++** Called by ioctl commit handler, acx_start, acx_set_defaults,
++** acx_s_after_interrupt_task (if IRQ_CMD_UPDATE_CARD_CFG),
++*/
++static void
++acx111_s_sens_radio_16_17(acx_device_t *adev)
++{
++ u32 feature1, feature2;
++
++ if ((adev->sensitivity < 1) || (adev->sensitivity > 3)) {
++ printk("%s: invalid sensitivity setting (1..3), "
++ "setting to 1\n", adev->ndev->name);
++ adev->sensitivity = 1;
++ }
++ acx111_s_get_feature_config(adev, &feature1, &feature2);
++ CLEAR_BIT(feature1, FEATURE1_LOW_RX|FEATURE1_EXTRA_LOW_RX);
++ if (adev->sensitivity > 1)
++ SET_BIT(feature1, FEATURE1_LOW_RX);
++ if (adev->sensitivity > 2)
++ SET_BIT(feature1, FEATURE1_EXTRA_LOW_RX);
++ acx111_s_feature_set(adev, feature1, feature2);
++}
++
++
++void
++acx_s_update_card_settings(acx_device_t *adev)
++{
++ unsigned long flags;
++ unsigned int start_scan = 0;
++ int i;
++
++ FN_ENTER;
++
++ log(L_INIT, "get_mask 0x%08X, set_mask 0x%08X\n",
++ adev->get_mask, adev->set_mask);
++
++ /* Track dependencies betweed various settings */
++
++ if (adev->set_mask & (GETSET_MODE|GETSET_RESCAN|GETSET_WEP)) {
++ log(L_INIT, "important setting has been changed. "
++ "Need to update packet templates, too\n");
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ if (adev->set_mask & GETSET_CHANNEL) {
++ /* This will actually tune RX/TX to the channel */
++ SET_BIT(adev->set_mask, GETSET_RX|GETSET_TX);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ /* Beacons contain channel# - update them */
++ SET_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ start_scan = 1;
++ }
++ }
++
++ /* Apply settings */
++
++#ifdef WHY_SHOULD_WE_BOTHER /* imagine we were just powered off */
++ /* send a disassoc request in case it's required */
++ if (adev->set_mask & (GETSET_MODE|GETSET_RESCAN|GETSET_CHANNEL|GETSET_WEP)) {
++ if (ACX_MODE_2_STA == adev->mode) {
++ if (ACX_STATUS_4_ASSOCIATED == adev->status) {
++ log(L_ASSOC, "we were ASSOCIATED - "
++ "sending disassoc request\n");
++ acx_lock(adev, flags);
++ acx_l_transmit_disassoc(adev, NULL);
++ /* FIXME: deauth? */
++ acx_unlock(adev, flags);
++ }
++ /* need to reset some other stuff as well */
++ log(L_DEBUG, "resetting bssid\n");
++ MAC_ZERO(adev->bssid);
++ SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST);
++ start_scan = 1;
++ }
++ }
++#endif
++
++ if (adev->get_mask & GETSET_STATION_ID) {
++ u8 stationID[4 + ACX1xx_IE_DOT11_STATION_ID_LEN];
++ const u8 *paddr;
++
++ acx_s_interrogate(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
++ paddr = &stationID[4];
++ for (i = 0; i < ETH_ALEN; i++) {
++ /* we copy the MAC address (reversed in
++ * the card) to the netdevice's MAC
++ * address, and on ifup it will be
++ * copied into iwadev->dev_addr */
++ adev->ndev->dev_addr[ETH_ALEN - 1 - i] = paddr[i];
++ }
++ CLEAR_BIT(adev->get_mask, GETSET_STATION_ID);
++ }
++
++ if (adev->get_mask & GETSET_SENSITIVITY) {
++ if ((RADIO_RFMD_11 == adev->radio_type)
++ || (RADIO_MAXIM_0D == adev->radio_type)
++ || (RADIO_RALINK_15 == adev->radio_type)) {
++ acx_s_read_phy_reg(adev, 0x30, &adev->sensitivity);
++ } else {
++ log(L_INIT, "don't know how to get sensitivity "
++ "for radio type 0x%02X\n", adev->radio_type);
++ adev->sensitivity = 0;
++ }
++ log(L_INIT, "got sensitivity value %u\n", adev->sensitivity);
++
++ CLEAR_BIT(adev->get_mask, GETSET_SENSITIVITY);
++ }
++
++ if (adev->get_mask & GETSET_ANTENNA) {
++ u8 antenna[4 + ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN];
++
++ memset(antenna, 0, sizeof(antenna));
++ acx_s_interrogate(adev, antenna, ACX1xx_IE_DOT11_CURRENT_ANTENNA);
++ adev->antenna = antenna[4];
++ log(L_INIT, "got antenna value 0x%02X\n", adev->antenna);
++ CLEAR_BIT(adev->get_mask, GETSET_ANTENNA);
++ }
++
++ if (adev->get_mask & GETSET_ED_THRESH) {
++ if (IS_ACX100(adev)) {
++ u8 ed_threshold[4 + ACX100_IE_DOT11_ED_THRESHOLD_LEN];
++
++ memset(ed_threshold, 0, sizeof(ed_threshold));
++ acx_s_interrogate(adev, ed_threshold, ACX100_IE_DOT11_ED_THRESHOLD);
++ adev->ed_threshold = ed_threshold[4];
++ } else {
++ log(L_INIT, "acx111 doesn't support ED\n");
++ adev->ed_threshold = 0;
++ }
++ log(L_INIT, "got Energy Detect (ED) threshold %u\n", adev->ed_threshold);
++ CLEAR_BIT(adev->get_mask, GETSET_ED_THRESH);
++ }
++
++ if (adev->get_mask & GETSET_CCA) {
++ if (IS_ACX100(adev)) {
++ u8 cca[4 + ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN];
++
++ memset(cca, 0, sizeof(adev->cca));
++ acx_s_interrogate(adev, cca, ACX1xx_IE_DOT11_CURRENT_CCA_MODE);
++ adev->cca = cca[4];
++ } else {
++ log(L_INIT, "acx111 doesn't support CCA\n");
++ adev->cca = 0;
++ }
++ log(L_INIT, "got Channel Clear Assessment (CCA) value %u\n", adev->cca);
++ CLEAR_BIT(adev->get_mask, GETSET_CCA);
++ }
++
++ if (adev->get_mask & GETSET_REG_DOMAIN) {
++ acx_ie_generic_t dom;
++
++ acx_s_interrogate(adev, &dom, ACX1xx_IE_DOT11_CURRENT_REG_DOMAIN);
++ adev->reg_dom_id = dom.m.bytes[0];
++ acx_s_set_sane_reg_domain(adev, 0);
++ log(L_INIT, "got regulatory domain 0x%02X\n", adev->reg_dom_id);
++ CLEAR_BIT(adev->get_mask, GETSET_REG_DOMAIN);
++ }
++
++ if (adev->set_mask & GETSET_STATION_ID) {
++ u8 stationID[4 + ACX1xx_IE_DOT11_STATION_ID_LEN];
++ u8 *paddr;
++
++ paddr = &stationID[4];
++ memcpy(adev->dev_addr, adev->ndev->dev_addr, ETH_ALEN);
++ for (i = 0; i < ETH_ALEN; i++) {
++ /* copy the MAC address we obtained when we noticed
++ * that the ethernet iface's MAC changed
++ * to the card (reversed in
++ * the card!) */
++ paddr[i] = adev->dev_addr[ETH_ALEN - 1 - i];
++ }
++ acx_s_configure(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
++ CLEAR_BIT(adev->set_mask, GETSET_STATION_ID);
++ }
++
++ if (adev->set_mask & SET_TEMPLATES) {
++ log(L_INIT, "updating packet templates\n");
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ acx_s_set_probe_request_template(adev);
++#if POWER_SAVE_80211
++ acx_s_set_null_data_template(adev);
++#endif
++ break;
++ case ACX_MODE_0_ADHOC:
++ acx_s_set_probe_request_template(adev);
++#if POWER_SAVE_80211
++ /* maybe power save functionality is somehow possible
++ * for Ad-Hoc mode, too... FIXME: verify it somehow? firmware debug fields? */
++ acx_s_set_null_data_template(adev);
++#endif
++ /* fall through */
++ case ACX_MODE_3_AP:
++ acx_s_set_beacon_template(adev);
++ acx_s_set_tim_template(adev);
++ /* BTW acx111 firmware would not send probe responses
++ ** if probe request does not have all basic rates flagged
++ ** by 0x80! Thus firmware does not conform to 802.11,
++ ** it should ignore 0x80 bit in ratevector from STA.
++ ** We can 'fix' it by not using this template and
++ ** sending probe responses by hand. TODO --vda */
++ acx_s_set_probe_response_template(adev);
++ }
++ /* Needed if generated frames are to be emitted at different tx rate now */
++ log(L_IRQ, "redoing cmd_join_bssid() after template cfg\n");
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ CLEAR_BIT(adev->set_mask, SET_TEMPLATES);
++ }
++ if (adev->set_mask & SET_STA_LIST) {
++ acx_lock(adev, flags);
++ acx_l_sta_list_init(adev);
++ CLEAR_BIT(adev->set_mask, SET_STA_LIST);
++ acx_unlock(adev, flags);
++ }
++ if (adev->set_mask & SET_RATE_FALLBACK) {
++ u8 rate[4 + ACX1xx_IE_RATE_FALLBACK_LEN];
++
++ /* configure to not do fallbacks when not in auto rate mode */
++ rate[4] = (adev->rate_auto) ? /* adev->txrate_fallback_retries */ 1 : 0;
++ log(L_INIT, "updating Tx fallback to %u retries\n", rate[4]);
++ acx_s_configure(adev, &rate, ACX1xx_IE_RATE_FALLBACK);
++ CLEAR_BIT(adev->set_mask, SET_RATE_FALLBACK);
++ }
++ if (adev->set_mask & GETSET_TXPOWER) {
++ log(L_INIT, "updating transmit power: %u dBm\n",
++ adev->tx_level_dbm);
++ acx_s_set_tx_level(adev, adev->tx_level_dbm);
++ CLEAR_BIT(adev->set_mask, GETSET_TXPOWER);
++ }
++
++ if (adev->set_mask & GETSET_SENSITIVITY) {
++ log(L_INIT, "updating sensitivity value: %u\n",
++ adev->sensitivity);
++ switch (adev->radio_type) {
++ case RADIO_RFMD_11:
++ case RADIO_MAXIM_0D:
++ case RADIO_RALINK_15:
++ acx_s_write_phy_reg(adev, 0x30, adev->sensitivity);
++ break;
++ case RADIO_RADIA_16:
++ case RADIO_UNKNOWN_17:
++ acx111_s_sens_radio_16_17(adev);
++ break;
++ default:
++ log(L_INIT, "don't know how to modify sensitivity "
++ "for radio type 0x%02X\n", adev->radio_type);
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_SENSITIVITY);
++ }
++
++ if (adev->set_mask & GETSET_ANTENNA) {
++ /* antenna */
++ u8 antenna[4 + ACX1xx_IE_DOT11_CURRENT_ANTENNA_LEN];
++
++ memset(antenna, 0, sizeof(antenna));
++ antenna[4] = adev->antenna;
++ log(L_INIT, "updating antenna value: 0x%02X\n",
++ adev->antenna);
++ acx_s_configure(adev, &antenna, ACX1xx_IE_DOT11_CURRENT_ANTENNA);
++ CLEAR_BIT(adev->set_mask, GETSET_ANTENNA);
++ }
++
++ if (adev->set_mask & GETSET_ED_THRESH) {
++ /* ed_threshold */
++ log(L_INIT, "updating Energy Detect (ED) threshold: %u\n",
++ adev->ed_threshold);
++ if (IS_ACX100(adev)) {
++ u8 ed_threshold[4 + ACX100_IE_DOT11_ED_THRESHOLD_LEN];
++
++ memset(ed_threshold, 0, sizeof(ed_threshold));
++ ed_threshold[4] = adev->ed_threshold;
++ acx_s_configure(adev, &ed_threshold, ACX100_IE_DOT11_ED_THRESHOLD);
++ }
++ else
++ log(L_INIT, "acx111 doesn't support ED!\n");
++ CLEAR_BIT(adev->set_mask, GETSET_ED_THRESH);
++ }
++
++ if (adev->set_mask & GETSET_CCA) {
++ /* CCA value */
++ log(L_INIT, "updating Channel Clear Assessment "
++ "(CCA) value: 0x%02X\n", adev->cca);
++ if (IS_ACX100(adev)) {
++ u8 cca[4 + ACX1xx_IE_DOT11_CURRENT_CCA_MODE_LEN];
++
++ memset(cca, 0, sizeof(cca));
++ cca[4] = adev->cca;
++ acx_s_configure(adev, &cca, ACX1xx_IE_DOT11_CURRENT_CCA_MODE);
++ }
++ else
++ log(L_INIT, "acx111 doesn't support CCA!\n");
++ CLEAR_BIT(adev->set_mask, GETSET_CCA);
++ }
++
++ if (adev->set_mask & GETSET_LED_POWER) {
++ /* Enable Tx */
++ log(L_INIT, "updating power LED status: %u\n", adev->led_power);
++
++ acx_lock(adev, flags);
++#if defined (ACX_MEM)
++ acxmem_l_power_led(adev, adev->led_power);
++#else
++ if (IS_PCI(adev))
++ acxpci_l_power_led(adev, adev->led_power);
++#endif
++ CLEAR_BIT(adev->set_mask, GETSET_LED_POWER);
++ acx_unlock(adev, flags);
++ }
++
++ if (adev->set_mask & GETSET_POWER_80211) {
++#if POWER_SAVE_80211
++ acx_s_update_80211_powersave_mode(adev);
++#endif
++ CLEAR_BIT(adev->set_mask, GETSET_POWER_80211);
++ }
++
++ if (adev->set_mask & GETSET_CHANNEL) {
++ /* channel */
++ log(L_INIT, "updating channel to: %u\n", adev->channel);
++ CLEAR_BIT(adev->set_mask, GETSET_CHANNEL);
++ }
++
++ if (adev->set_mask & GETSET_TX) {
++ /* set Tx */
++ log(L_INIT, "updating: %s Tx\n",
++ adev->tx_disabled ? "disable" : "enable");
++ if (adev->tx_disabled)
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ else
++ acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_TX, &adev->channel, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_TX);
++ }
++
++ if (adev->set_mask & GETSET_RX) {
++ /* Enable Rx */
++ log(L_INIT, "updating: enable Rx on channel: %u\n",
++ adev->channel);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_RX, &adev->channel, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_RX);
++ }
++
++ if (adev->set_mask & GETSET_RETRY) {
++ u8 short_retry[4 + ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT_LEN];
++ u8 long_retry[4 + ACX1xx_IE_DOT11_LONG_RETRY_LIMIT_LEN];
++
++ log(L_INIT, "updating short retry limit: %u, long retry limit: %u\n",
++ adev->short_retry, adev->long_retry);
++ short_retry[0x4] = adev->short_retry;
++ long_retry[0x4] = adev->long_retry;
++ acx_s_configure(adev, &short_retry, ACX1xx_IE_DOT11_SHORT_RETRY_LIMIT);
++ acx_s_configure(adev, &long_retry, ACX1xx_IE_DOT11_LONG_RETRY_LIMIT);
++ CLEAR_BIT(adev->set_mask, GETSET_RETRY);
++ }
++
++ if (adev->set_mask & SET_MSDU_LIFETIME) {
++ u8 xmt_msdu_lifetime[4 + ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN];
++
++ log(L_INIT, "updating tx MSDU lifetime: %u\n",
++ adev->msdu_lifetime);
++ *(u32 *)&xmt_msdu_lifetime[4] = cpu_to_le32((u32)adev->msdu_lifetime);
++ acx_s_configure(adev, &xmt_msdu_lifetime, ACX1xx_IE_DOT11_MAX_XMIT_MSDU_LIFETIME);
++ CLEAR_BIT(adev->set_mask, SET_MSDU_LIFETIME);
++ }
++
++ if (adev->set_mask & GETSET_REG_DOMAIN) {
++ log(L_INIT, "updating regulatory domain: 0x%02X\n",
++ adev->reg_dom_id);
++ acx_s_set_sane_reg_domain(adev, 1);
++ CLEAR_BIT(adev->set_mask, GETSET_REG_DOMAIN);
++ }
++
++ if (adev->set_mask & GETSET_MODE) {
++ adev->ndev->type = (adev->mode == ACX_MODE_MONITOR) ?
++ adev->monitor_type : ARPHRD_ETHER;
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++
++ acx_lock(adev, flags);
++ acx_l_sta_list_init(adev);
++ adev->aid = 0;
++ adev->ap_client = NULL;
++ MAC_COPY(adev->bssid, adev->dev_addr);
++ /* this basically says "we're connected" */
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ acx_unlock(adev, flags);
++
++ acx111_s_feature_off(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++ /* start sending beacons */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ break;
++ case ACX_MODE_MONITOR:
++ acx111_s_feature_on(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++ /* this stops beacons */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ /* this basically says "we're connected" */
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ SET_BIT(adev->set_mask, SET_RXCONFIG|SET_WEP_OPTIONS);
++ break;
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ acx111_s_feature_off(adev, 0, FEATURE2_NO_TXCRYPT|FEATURE2_SNIFFER);
++
++ acx_lock(adev, flags);
++ adev->aid = 0;
++ adev->ap_client = NULL;
++ acx_unlock(adev, flags);
++
++ /* we want to start looking for peer or AP */
++ start_scan = 1;
++ break;
++ case ACX_MODE_OFF:
++ /* TODO: disable RX/TX, stop any scanning activity etc: */
++ /* adev->tx_disabled = 1; */
++ /* SET_BIT(adev->set_mask, GETSET_RX|GETSET_TX); */
++
++ /* This stops beacons (invalid macmode...) */
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ break;
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_MODE);
++ }
++
++ if (adev->set_mask & SET_RXCONFIG) {
++ acx_s_initialize_rx_config(adev);
++ CLEAR_BIT(adev->set_mask, SET_RXCONFIG);
++ }
++
++ if (adev->set_mask & GETSET_RESCAN) {
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ start_scan = 1;
++ break;
++ }
++ CLEAR_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++
++ if (adev->set_mask & GETSET_WEP) {
++ /* encode */
++
++ ie_dot11WEPDefaultKeyID_t dkey;
++#ifdef DEBUG_WEP
++ struct {
++ u16 type;
++ u16 len;
++ u8 val;
++ } ACX_PACKED keyindic;
++#endif
++ log(L_INIT, "updating WEP key settings\n");
++
++ acx_s_set_wepkey(adev);
++
++ dkey.KeyID = adev->wep_current_index;
++ log(L_INIT, "setting WEP key %u as default\n", dkey.KeyID);
++ acx_s_configure(adev, &dkey, ACX1xx_IE_DOT11_WEP_DEFAULT_KEY_SET);
++#ifdef DEBUG_WEP
++ keyindic.val = 3;
++ acx_s_configure(adev, &keyindic, ACX111_IE_KEY_CHOOSE);
++#endif
++ start_scan = 1;
++ CLEAR_BIT(adev->set_mask, GETSET_WEP);
++ }
++
++ if (adev->set_mask & SET_WEP_OPTIONS) {
++ acx100_ie_wep_options_t options;
++ if (IS_ACX111(adev)) {
++ log(L_DEBUG, "setting WEP Options for acx111 is not supported\n");
++ } else {
++ log(L_INIT, "setting WEP Options\n");
++ acx100_s_init_wep(adev);
++#if 0
++ /* let's choose maximum setting: 4 default keys,
++ * plus 10 other keys: */
++ options.NumKeys = cpu_to_le16(DOT11_MAX_DEFAULT_WEP_KEYS + 10);
++ /* don't decrypt default key only,
++ * don't override decryption: */
++ options.WEPOption = 0;
++ if (adev->mode == ACX_MODE_MONITOR) {
++ /* don't decrypt default key only,
++ * override decryption mechanism: */
++ options.WEPOption = 2;
++ }
++
++ acx_s_configure(adev, &options, ACX100_IE_WEP_OPTIONS);
++#endif
++ }
++ CLEAR_BIT(adev->set_mask, SET_WEP_OPTIONS);
++ }
++
++ /* Rescan was requested */
++ if (start_scan) {
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* We can avoid clearing list if join code
++ ** will be a bit more clever about not picking
++ ** 'bad' AP over and over again */
++ acx_lock(adev, flags);
++ adev->ap_client = NULL;
++ acx_l_sta_list_init(adev);
++ acx_set_status(adev, ACX_STATUS_1_SCANNING);
++ acx_unlock(adev, flags);
++
++ acx_s_cmd_start_scan(adev);
++ }
++ }
++
++ /* debug, rate, and nick don't need any handling */
++ /* what about sniffing mode?? */
++
++ log(L_INIT, "get_mask 0x%08X, set_mask 0x%08X - after update\n",
++ adev->get_mask, adev->set_mask);
++
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_e_after_interrupt_task
++*/
++static int
++acx_s_recalib_radio(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ acx111_cmd_radiocalib_t cal;
++
++ printk("%s: recalibrating radio\n", adev->ndev->name);
++ /* automatic recalibration, choose all methods: */
++ cal.methods = cpu_to_le32(0x8000000f);
++ /* automatic recalibration every 60 seconds (value in TUs)
++ * I wonder what the firmware default here is? */
++ cal.interval = cpu_to_le32(58594);
++ return acx_s_issue_cmd_timeo(adev, ACX111_CMD_RADIOCALIB,
++ &cal, sizeof(cal), CMD_TIMEOUT_MS(100));
++ } else {
++ /* On ACX100, we need to recalibrate the radio
++ * by issuing a GETSET_TX|GETSET_RX */
++ if (/* (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0)) &&
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0)) && */
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_TX, &adev->channel, 1)) &&
++ (OK == acx_s_issue_cmd(adev, ACX1xx_CMD_ENABLE_RX, &adev->channel, 1)) )
++ return OK;
++ return NOT_OK;
++ }
++}
++
++static void
++acx_s_after_interrupt_recalib(acx_device_t *adev)
++{
++ int res;
++
++ /* this helps with ACX100 at least;
++ * hopefully ACX111 also does a
++ * recalibration here */
++
++ /* clear flag beforehand, since we want to make sure
++ * it's cleared; then only set it again on specific circumstances */
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* better wait a bit between recalibrations to
++ * prevent overheating due to torturing the card
++ * into working too long despite high temperature
++ * (just a safety measure) */
++ if (adev->recalib_time_last_success
++ && time_before(jiffies, adev->recalib_time_last_success
++ + RECALIB_PAUSE * 60 * HZ)) {
++ if (adev->recalib_msg_ratelimit <= 4) {
++ printk("%s: less than " STRING(RECALIB_PAUSE)
++ " minutes since last radio recalibration, "
++ "not recalibrating (maybe card is too hot?)\n",
++ adev->ndev->name);
++ adev->recalib_msg_ratelimit++;
++ if (adev->recalib_msg_ratelimit == 5)
++ printk("disabling above message until next recalib\n");
++ }
++ return;
++ }
++
++ adev->recalib_msg_ratelimit = 0;
++
++ /* note that commands sometimes fail (card busy),
++ * so only clear flag if we were fully successful */
++ res = acx_s_recalib_radio(adev);
++ if (res == OK) {
++ printk("%s: successfully recalibrated radio\n",
++ adev->ndev->name);
++ adev->recalib_time_last_success = jiffies;
++ adev->recalib_failure_count = 0;
++ } else {
++ /* failed: resubmit, but only limited
++ * amount of times within some time range
++ * to prevent endless loop */
++
++ adev->recalib_time_last_success = 0; /* we failed */
++
++ /* if some time passed between last
++ * attempts, then reset failure retry counter
++ * to be able to do next recalib attempt */
++ if (time_after(jiffies, adev->recalib_time_last_attempt + 5*HZ))
++ adev->recalib_failure_count = 0;
++
++ if (adev->recalib_failure_count < 5) {
++ /* increment inside only, for speedup of outside path */
++ adev->recalib_failure_count++;
++ adev->recalib_time_last_attempt = jiffies;
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ }
++}
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
++static void
++acx_e_after_interrupt_task(struct work_struct *work)
++{
++ acx_device_t *adev = container_of(work, acx_device_t, after_interrupt_task);
++#else
++ static void
++ acx_e_after_interrupt_task(void *data)
++ {
++ struct net_device *ndev = (struct net_device*)data;
++ acx_device_t *adev = ndev2adev(ndev);
++#endif
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ if (!adev->after_interrupt_jobs)
++ goto end; /* no jobs to do */
++
++#if TX_CLEANUP_IN_SOFTIRQ
++ /* can happen only on PCI */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_TX_CLEANUP) {
++ acx_lock(adev, flags);
++ acxpci_l_clean_txdesc(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_TX_CLEANUP);
++ acx_unlock(adev, flags);
++ }
++#endif
++ /* we see lotsa tx errors */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_RADIO_RECALIB) {
++ acx_s_after_interrupt_recalib(adev);
++ }
++
++ /* a poor interrupt code wanted to do update_card_settings() */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_UPDATE_CARD_CFG) {
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++ }
++
++ /* 1) we detected that no Scan_Complete IRQ came from fw, or
++ ** 2) we found too many STAs */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_STOP_SCAN) {
++ log(L_IRQ, "sending a stop scan cmd...\n");
++ acx_s_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0);
++ /* HACK: set the IRQ bit, since we won't get a
++ * scan complete IRQ any more on ACX111 (works on ACX100!),
++ * since _we_, not a fw, have stopped the scan */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_STOP_SCAN);
++ }
++
++ /* either fw sent Scan_Complete or we detected that
++ ** no Scan_Complete IRQ came from fw. Finish scanning,
++ ** pick join partner if any */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_COMPLETE_SCAN) {
++ if (adev->status == ACX_STATUS_1_SCANNING) {
++ if (OK != acx_s_complete_scan(adev)) {
++ SET_BIT(adev->after_interrupt_jobs,
++ ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++ } else {
++ /* + scan kills current join status - restore it
++ ** (do we need it for STA?) */
++ /* + does it happen only with active scans?
++ ** active and passive scans? ALL scans including
++ ** background one? */
++ /* + was not verified that everything is restored
++ ** (but at least we start to emit beacons again) */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ log(L_IRQ, "redoing cmd_join_bssid() after scan\n");
++ acx_s_cmd_join_bssid(adev, adev->bssid);
++ }
++ }
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ }
++
++ /* STA auth or assoc timed out, start over again */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_RESTART_SCAN) {
++ log(L_IRQ, "sending a start_scan cmd...\n");
++ acx_s_cmd_start_scan(adev);
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_RESTART_SCAN);
++ }
++
++ /* whee, we got positive assoc response! 8) */
++ if (adev->after_interrupt_jobs & ACX_AFTER_IRQ_CMD_ASSOCIATE) {
++ acx_ie_generic_t pdr;
++ /* tiny race window exists, checking that we still a STA */
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ pdr.m.aid = cpu_to_le16(adev->aid);
++ acx_s_configure(adev, &pdr, ACX1xx_IE_ASSOC_ID);
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED);
++ log(L_ASSOC|L_DEBUG, "ASSOCIATED!\n");
++ CLEAR_BIT(adev->after_interrupt_jobs, ACX_AFTER_IRQ_CMD_ASSOCIATE);
++ }
++ }
++end:
++ acx_sem_unlock(adev);
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_schedule_task
++**
++** Schedule the call of the after_interrupt method after leaving
++** the interrupt context.
++*/
++void
++acx_schedule_task(acx_device_t *adev, unsigned int set_flag)
++{
++ SET_BIT(adev->after_interrupt_jobs, set_flag);
++ SCHEDULE_WORK(&adev->after_interrupt_task);
++}
++
++
++/***********************************************************************
++*/
++void
++acx_init_task_scheduler(acx_device_t *adev)
++{
++ /* configure task scheduler */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
++ INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task);
++#else
++ INIT_WORK(&adev->after_interrupt_task, acx_e_after_interrupt_task,
++ adev->ndev);
++#endif
++}
++
++
++/***********************************************************************
++** acx_s_start
++*/
++void
++acx_s_start(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /*
++ * Ok, now we do everything that can possibly be done with ioctl
++ * calls to make sure that when it was called before the card
++ * was up we get the changes asked for
++ */
++
++ SET_BIT(adev->set_mask, SET_TEMPLATES|SET_STA_LIST|GETSET_WEP
++ |GETSET_TXPOWER|GETSET_ANTENNA|GETSET_ED_THRESH|GETSET_CCA
++ |GETSET_REG_DOMAIN|GETSET_MODE|GETSET_CHANNEL
++ |GETSET_TX|GETSET_RX|GETSET_STATION_ID);
++
++ log(L_INIT, "updating initial settings on iface activation\n");
++ acx_s_update_card_settings(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acx_update_capabilities
++*/
++void
++acx_update_capabilities(acx_device_t *adev)
++{
++ u16 cap = 0;
++
++ switch (adev->mode) {
++ case ACX_MODE_3_AP:
++ SET_BIT(cap, WF_MGMT_CAP_ESS); break;
++ case ACX_MODE_0_ADHOC:
++ SET_BIT(cap, WF_MGMT_CAP_IBSS); break;
++ /* other types of stations do not emit beacons */
++ }
++
++ if (adev->wep_restricted) {
++ SET_BIT(cap, WF_MGMT_CAP_PRIVACY);
++ }
++ if (adev->cfgopt_dot11ShortPreambleOption) {
++ SET_BIT(cap, WF_MGMT_CAP_SHORT);
++ }
++ if (adev->cfgopt_dot11PBCCOption) {
++ SET_BIT(cap, WF_MGMT_CAP_PBCC);
++ }
++ if (adev->cfgopt_dot11ChannelAgility) {
++ SET_BIT(cap, WF_MGMT_CAP_AGILITY);
++ }
++ log(L_DEBUG, "caps updated from 0x%04X to 0x%04X\n",
++ adev->capabilities, cap);
++ adev->capabilities = cap;
++}
++
++/***********************************************************************
++** Common function to parse ALL configoption struct formats
++** (ACX100 and ACX111; FIXME: how to make it work with ACX100 USB!?!?).
++** FIXME: logging should be removed here and added to a /proc file instead
++*/
++void
++acx_s_parse_configoption(acx_device_t *adev, const acx111_ie_configoption_t *pcfg)
++{
++ const u8 *pEle;
++ int i;
++ int is_acx111 = IS_ACX111(adev);
++
++ if (acx_debug & L_DEBUG) {
++ printk("configoption struct content:\n");
++ acx_dump_bytes(pcfg, sizeof(*pcfg));
++ }
++
++ if (( is_acx111 && (adev->eeprom_version == 5))
++ || (!is_acx111 && (adev->eeprom_version == 4))
++ || (!is_acx111 && (adev->eeprom_version == 5))) {
++ /* these versions are known to be supported */
++ } else {
++ printk("unknown chip and EEPROM version combination (%s, v%d), "
++ "don't know how to parse config options yet. "
++ "Please report\n", is_acx111 ? "ACX111" : "ACX100",
++ adev->eeprom_version);
++ return;
++ }
++
++ /* first custom-parse the first part which has chip-specific layout */
++
++ pEle = (const u8 *) pcfg;
++
++ pEle += 4; /* skip (type,len) header */
++
++ memcpy(adev->cfgopt_NVSv, pEle, sizeof(adev->cfgopt_NVSv));
++ pEle += sizeof(adev->cfgopt_NVSv);
++
++ if (is_acx111) {
++ adev->cfgopt_NVS_vendor_offs = le16_to_cpu(*(u16 *)pEle);
++ pEle += sizeof(adev->cfgopt_NVS_vendor_offs);
++
++ adev->cfgopt_probe_delay = 200; /* good default value? */
++ pEle += 2; /* FIXME: unknown, value 0x0001 */
++ } else {
++ memcpy(adev->cfgopt_MAC, pEle, sizeof(adev->cfgopt_MAC));
++ pEle += sizeof(adev->cfgopt_MAC);
++
++ adev->cfgopt_probe_delay = le16_to_cpu(*(u16 *)pEle);
++ pEle += sizeof(adev->cfgopt_probe_delay);
++ if ((adev->cfgopt_probe_delay < 100) || (adev->cfgopt_probe_delay > 500)) {
++ printk("strange probe_delay value %d, "
++ "tweaking to 200\n", adev->cfgopt_probe_delay);
++ adev->cfgopt_probe_delay = 200;
++ }
++ }
++
++ adev->cfgopt_eof_memory = le32_to_cpu(*(u32 *)pEle);
++ pEle += sizeof(adev->cfgopt_eof_memory);
++
++ printk("NVS_vendor_offs:%04X probe_delay:%d eof_memory:%d\n",
++ adev->cfgopt_NVS_vendor_offs,
++ adev->cfgopt_probe_delay,
++ adev->cfgopt_eof_memory);
++
++ adev->cfgopt_dot11CCAModes = *pEle++;
++ adev->cfgopt_dot11Diversity = *pEle++;
++ adev->cfgopt_dot11ShortPreambleOption = *pEle++;
++ adev->cfgopt_dot11PBCCOption = *pEle++;
++ adev->cfgopt_dot11ChannelAgility = *pEle++;
++ adev->cfgopt_dot11PhyType = *pEle++;
++ adev->cfgopt_dot11TempType = *pEle++;
++ printk("CCAModes:%02X Diversity:%02X ShortPreOpt:%02X "
++ "PBCC:%02X ChanAgil:%02X PHY:%02X Temp:%02X\n",
++ adev->cfgopt_dot11CCAModes,
++ adev->cfgopt_dot11Diversity,
++ adev->cfgopt_dot11ShortPreambleOption,
++ adev->cfgopt_dot11PBCCOption,
++ adev->cfgopt_dot11ChannelAgility,
++ adev->cfgopt_dot11PhyType,
++ adev->cfgopt_dot11TempType);
++
++ /* then use common parsing for next part which has common layout */
++
++ pEle++; /* skip table_count (6) */
++
++ if (IS_MEM(adev) && IS_ACX100(adev))
++ {
++ /*
++ * For iPaq hx4700 Generic Slave F/W 1.10.7.K. I'm not sure if these
++ * 4 extra bytes are before the dot11 things above or after, so I'm just
++ * going to guess after. If someone sees these aren't reasonable numbers,
++ * please fix this.
++ * The area from which the dot11 values above are read contains:
++ * 04 01 01 01 00 05 01 06 00 02 01 02
++ * the 8 dot11 reads above take care of 8 of them, but which 8...
++ */
++ pEle += 4;
++ }
++
++ adev->cfgopt_antennas.type = pEle[0];
++ adev->cfgopt_antennas.len = pEle[1];
++ printk("AntennaID:%02X Len:%02X Data:",
++ adev->cfgopt_antennas.type, adev->cfgopt_antennas.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_antennas.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_power_levels.type = pEle[0];
++ adev->cfgopt_power_levels.len = pEle[1];
++ printk("PowerLevelID:%02X Len:%02X Data:",
++ adev->cfgopt_power_levels.type, adev->cfgopt_power_levels.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_power_levels.list[i] = le16_to_cpu(*(u16 *)&pEle[i*2+2]);
++ printk("%04X ", adev->cfgopt_power_levels.list[i]);
++ }
++ printk("\n");
++
++ pEle += pEle[1]*2 + 2;
++ adev->cfgopt_data_rates.type = pEle[0];
++ adev->cfgopt_data_rates.len = pEle[1];
++ printk("DataRatesID:%02X Len:%02X Data:",
++ adev->cfgopt_data_rates.type, adev->cfgopt_data_rates.len);
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_data_rates.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_domains.type = pEle[0];
++ adev->cfgopt_domains.len = pEle[1];
++ if (IS_MEM(adev) && IS_ACX100(adev))
++ {
++ /*
++ * For iPaq hx4700 Generic Slave F/W 1.10.7.K.
++ * There's an extra byte between this structure and the next
++ * that is not accounted for with this structure's length. It's
++ * most likely a bug in the firmware, but we can fix it here
++ * by bumping the length of this field by 1.
++ */
++ adev->cfgopt_domains.len++;
++ }
++ printk("DomainID:%02X Len:%02X Data:",
++ adev->cfgopt_domains.type, adev->cfgopt_domains.len);
++ for (i = 0; i < adev->cfgopt_domains.len; i++) {
++ adev->cfgopt_domains.list[i] = pEle[i+2];
++ printk("%02X ", pEle[i+2]);
++ }
++ printk("\n");
++
++ pEle += adev->cfgopt_domains.len + 2;
++
++ adev->cfgopt_product_id.type = pEle[0];
++ adev->cfgopt_product_id.len = pEle[1];
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_product_id.list[i] = pEle[i+2];
++ }
++ printk("ProductID:%02X Len:%02X Data:%.*s\n",
++ adev->cfgopt_product_id.type, adev->cfgopt_product_id.len,
++ adev->cfgopt_product_id.len, (char *)adev->cfgopt_product_id.list);
++
++ pEle += pEle[1] + 2;
++ adev->cfgopt_manufacturer.type = pEle[0];
++ adev->cfgopt_manufacturer.len = pEle[1];
++ for (i = 0; i < pEle[1]; i++) {
++ adev->cfgopt_manufacturer.list[i] = pEle[i+2];
++ }
++ printk("ManufacturerID:%02X Len:%02X Data:%.*s\n",
++ adev->cfgopt_manufacturer.type, adev->cfgopt_manufacturer.len,
++ adev->cfgopt_manufacturer.len, (char *)adev->cfgopt_manufacturer.list);
++/*
++ printk("EEPROM part:\n");
++ for (i=0; i<58; i++) {
++ printk("%02X =======> 0x%02X\n",
++ i, (u8 *)adev->cfgopt_NVSv[i-2]);
++ }
++*/
++}
++
++
++/***********************************************************************
++*/
++static int __init
++acx_e_init_module(void)
++{
++ int r1,r2,r3,r4;
++
++ acx_struct_size_check();
++
++ printk("acx: this driver is still EXPERIMENTAL\n"
++ "acx: reading README file and/or Craig's HOWTO is "
++ "recommended, visit http://acx100.sf.net in case "
++ "of further questions/discussion\n");
++
++#if defined(CONFIG_ACX_PCI)
++ r1 = acxpci_e_init_module();
++#else
++ r1 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_MEM)
++ r2 = acxmem_e_init_module();
++#else
++ r2 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_USB)
++ r3 = acxusb_e_init_module();
++#else
++ r3 = -EINVAL;
++#endif
++#if defined(CONFIG_ACX_CS)
++ r4 = acx_cs_init();
++#else
++ r4 = -EINVAL;
++#endif
++ if (r2 && r1 && r3 && r4) { /* all failed! */
++ if (r3 || r1)
++ return r3 ? r3 : r1;
++ else
++ return r2;
++ }
++ /* return success if at least one succeeded */
++ return 0;
++
++}
++
++static void __exit
++acx_e_cleanup_module(void)
++{
++#if defined(CONFIG_ACX_PCI)
++ acxpci_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_MEM)
++ acxmem_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_USB)
++ acxusb_e_cleanup_module();
++#endif
++#if defined(CONFIG_ACX_CS)
++ acx_cs_cleanup();
++#endif
++}
++
++module_init(acx_e_init_module)
++module_exit(acx_e_cleanup_module)
+Index: linux-2.6.23/drivers/net/wireless/acx/conv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/conv.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,504 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/skbuff.h>
++#include <linux/if_arp.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++** proto_is_stt
++**
++** Searches the 802.1h Selective Translation Table for a given
++** protocol.
++**
++** prottype - protocol number (in host order) to search for.
++**
++** Returns:
++** 1 - if the table is empty or a match is found.
++** 0 - if the table is non-empty and a match is not found.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++static inline int
++proto_is_stt(unsigned int proto)
++{
++ /* Always return found for now. This is the behavior used by the */
++ /* Zoom Win95 driver when 802.1h mode is selected */
++ /* TODO: If necessary, add an actual search we'll probably
++ need this to match the CMAC's way of doing things.
++ Need to do some testing to confirm.
++ */
++
++ if (proto == 0x80f3) /* APPLETALK */
++ return 1;
++
++ return 0;
++/* return ((prottype == ETH_P_AARP) || (prottype == ETH_P_IPX)); */
++}
++
++/* Helpers */
++
++static inline void
++store_llc_snap(struct wlan_llc *llc)
++{
++ llc->dsap = 0xaa; /* SNAP, see IEEE 802 */
++ llc->ssap = 0xaa;
++ llc->ctl = 0x03;
++}
++static inline int
++llc_is_snap(const struct wlan_llc *llc)
++{
++ return (llc->dsap == 0xaa)
++ && (llc->ssap == 0xaa)
++ && (llc->ctl == 0x03);
++}
++static inline void
++store_oui_rfc1042(struct wlan_snap *snap)
++{
++ snap->oui[0] = 0;
++ snap->oui[1] = 0;
++ snap->oui[2] = 0;
++}
++static inline int
++oui_is_rfc1042(const struct wlan_snap *snap)
++{
++ return (snap->oui[0] == 0)
++ && (snap->oui[1] == 0)
++ && (snap->oui[2] == 0);
++}
++static inline void
++store_oui_8021h(struct wlan_snap *snap)
++{
++ snap->oui[0] = 0;
++ snap->oui[1] = 0;
++ snap->oui[2] = 0xf8;
++}
++static inline int
++oui_is_8021h(const struct wlan_snap *snap)
++{
++ return (snap->oui[0] == 0)
++ && (snap->oui[1] == 0)
++ && (snap->oui[2] == 0xf8);
++}
++
++
++/***********************************************************************
++** acx_ether_to_txbuf
++**
++** Uses the contents of the ether frame to build the elements of
++** the 802.11 frame.
++**
++** We don't actually set up the frame header here. That's the
++** MAC's job. We're only handling conversion of DIXII or 802.3+LLC
++** frames to something that works with 802.11.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++int
++acx_ether_to_txbuf(acx_device_t *adev, void *txbuf, const struct sk_buff *skb)
++{
++ struct wlan_hdr_a3 *w_hdr;
++ struct wlan_ethhdr *e_hdr;
++ struct wlan_llc *e_llc;
++ struct wlan_snap *e_snap;
++ const u8 *a1, *a3;
++ int header_len, payload_len = -1;
++ /* protocol type or data length, depending on whether
++ * DIX or 802.3 ethernet format */
++ u16 proto;
++ u16 fc;
++
++ FN_ENTER;
++
++ if (unlikely(!skb->len)) {
++ log(L_DEBUG, "zero-length skb!\n");
++ goto end;
++ }
++
++ w_hdr = (struct wlan_hdr_a3*)txbuf;
++
++ switch (adev->mode) {
++ case ACX_MODE_MONITOR:
++ /* NB: one day we might want to play with DESC_CTL2_FCS
++ ** Will need to stop doing "- WLAN_FCS_LEN" here then */
++ if (unlikely(skb->len >= WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_FCS_LEN)) {
++ printk("%s: can't tx oversized frame (%d bytes)\n",
++ adev->ndev->name, skb->len);
++ goto end;
++ }
++ memcpy(w_hdr, skb->data, skb->len);
++ payload_len = skb->len;
++ goto end;
++ }
++
++ /* step 1: classify ether frame, DIX or 802.3? */
++ e_hdr = (wlan_ethhdr_t *)skb->data;
++ proto = ntohs(e_hdr->type);
++ if (proto <= 1500) {
++ log(L_DEBUG, "tx: 802.3 len: %d\n", skb->len);
++ /* codes <= 1500 reserved for 802.3 lengths */
++ /* it's 802.3, pass ether payload unchanged, */
++ /* trim off ethernet header and copy payload to txdesc */
++ header_len = WLAN_HDR_A3_LEN;
++ } else {
++ /* it's DIXII, time for some conversion */
++ /* Create 802.11 packet. Header also contains llc and snap. */
++
++ log(L_DEBUG, "tx: DIXII len: %d\n", skb->len);
++
++ /* size of header is 802.11 header + llc + snap */
++ header_len = WLAN_HDR_A3_LEN + sizeof(wlan_llc_t) + sizeof(wlan_snap_t);
++ /* llc is located behind the 802.11 header */
++ e_llc = (wlan_llc_t*)(w_hdr + 1);
++ /* snap is located behind the llc */
++ e_snap = (wlan_snap_t*)(e_llc + 1);
++
++ /* setup the LLC header */
++ store_llc_snap(e_llc);
++
++ /* setup the SNAP header */
++ e_snap->type = htons(proto);
++ if (proto_is_stt(proto)) {
++ store_oui_8021h(e_snap);
++ } else {
++ store_oui_rfc1042(e_snap);
++ }
++ }
++ /* trim off ethernet header and copy payload to txbuf */
++ payload_len = skb->len - sizeof(wlan_ethhdr_t);
++ /* TODO: can we just let acx DMA payload from skb instead? */
++ memcpy((u8*)txbuf + header_len, skb->data + sizeof(wlan_ethhdr_t), payload_len);
++ payload_len += header_len;
++
++ /* Set up the 802.11 header */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi);
++ a1 = e_hdr->daddr;
++ a3 = adev->bssid;
++ break;
++ case ACX_MODE_2_STA:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi | WF_FC_TODSi);
++ a1 = adev->bssid;
++ a3 = e_hdr->daddr;
++ break;
++ case ACX_MODE_3_AP:
++ fc = (WF_FTYPE_DATAi | WF_FSTYPE_DATAONLYi | WF_FC_FROMDSi);
++ a1 = e_hdr->daddr;
++ a3 = e_hdr->saddr;
++ break;
++ default:
++ printk("%s: error - converting eth to wlan in unknown mode\n",
++ adev->ndev->name);
++ payload_len = -1;
++ goto end;
++ }
++ if (adev->wep_enabled)
++ SET_BIT(fc, WF_FC_ISWEPi);
++
++ w_hdr->fc = fc;
++ w_hdr->dur = 0;
++ MAC_COPY(w_hdr->a1, a1);
++ MAC_COPY(w_hdr->a2, adev->dev_addr);
++ MAC_COPY(w_hdr->a3, a3);
++ w_hdr->seq = 0;
++
++#ifdef DEBUG_CONVERT
++ if (acx_debug & L_DATA) {
++ printk("original eth frame [%d]: ", skb->len);
++ acx_dump_bytes(skb->data, skb->len);
++ printk("802.11 frame [%d]: ", payload_len);
++ acx_dump_bytes(w_hdr, payload_len);
++ }
++#endif
++
++end:
++ FN_EXIT1(payload_len);
++ return payload_len;
++}
++
++
++/***********************************************************************
++** acx_rxbuf_to_ether
++**
++** Uses the contents of a received 802.11 frame to build an ether
++** frame.
++**
++** This function extracts the src and dest address from the 802.11
++** frame to use in the construction of the eth frame.
++**
++** Based largely on p80211conv.c of the linux-wlan-ng project
++*/
++struct sk_buff*
++acx_rxbuf_to_ether(acx_device_t *adev, rxbuffer_t *rxbuf)
++{
++ struct wlan_hdr *w_hdr;
++ struct wlan_ethhdr *e_hdr;
++ struct wlan_llc *e_llc;
++ struct wlan_snap *e_snap;
++ struct sk_buff *skb;
++ const u8 *daddr;
++ const u8 *saddr;
++ const u8 *e_payload;
++ int buflen, payload_length;
++ unsigned int payload_offset, mtu;
++ u16 fc;
++
++ FN_ENTER;
++
++ /* This looks complex because it must handle possible
++ ** phy header in rxbuff */
++ w_hdr = acx_get_wlan_hdr(adev, rxbuf);
++ payload_offset = WLAN_HDR_A3_LEN; /* it is relative to w_hdr */
++ payload_length = RXBUF_BYTES_USED(rxbuf) /* entire rxbuff... */
++ - ((u8*)w_hdr - (u8*)rxbuf) /* minus space before 802.11 frame */
++ - WLAN_HDR_A3_LEN; /* minus 802.11 header */
++
++ /* setup some vars for convenience */
++ fc = w_hdr->fc;
++ switch (WF_FC_FROMTODSi & fc) {
++ case 0:
++ daddr = w_hdr->a1;
++ saddr = w_hdr->a2;
++ break;
++ case WF_FC_FROMDSi:
++ daddr = w_hdr->a1;
++ saddr = w_hdr->a3;
++ break;
++ case WF_FC_TODSi:
++ daddr = w_hdr->a3;
++ saddr = w_hdr->a2;
++ break;
++ default: /* WF_FC_FROMTODSi */
++ payload_offset += (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
++ payload_length -= (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
++ daddr = w_hdr->a3;
++ saddr = w_hdr->a4;
++ }
++
++ if ((WF_FC_ISWEPi & fc) && IS_ACX100(adev)) {
++ /* chop off the IV+ICV WEP header and footer */
++ log(L_DATA|L_DEBUG, "rx: WEP packet, "
++ "chopping off IV and ICV\n");
++ payload_offset += WLAN_WEP_IV_LEN;
++ payload_length -= WLAN_WEP_IV_LEN + WLAN_WEP_ICV_LEN;
++ }
++
++ if (unlikely(payload_length < 0)) {
++ printk("%s: rx frame too short, ignored\n", adev->ndev->name);
++ goto ret_null;
++ }
++
++ e_hdr = (wlan_ethhdr_t*) ((u8*) w_hdr + payload_offset);
++ e_llc = (wlan_llc_t*) e_hdr;
++ e_snap = (wlan_snap_t*) (e_llc + 1);
++ mtu = adev->ndev->mtu;
++ e_payload = (u8*) (e_snap + 1);
++
++ log(L_DATA, "rx: payload_offset %d, payload_length %d\n",
++ payload_offset, payload_length);
++ log(L_XFER|L_DATA,
++ "rx: frame info: llc=%02X%02X%02X "
++ "snap.oui=%02X%02X%02X snap.type=%04X\n",
++ e_llc->dsap, e_llc->ssap, e_llc->ctl,
++ e_snap->oui[0], e_snap->oui[1], e_snap->oui[2],
++ ntohs(e_snap->type));
++
++ /* Test for the various encodings */
++ if ((payload_length >= sizeof(wlan_ethhdr_t))
++ && ((e_llc->dsap != 0xaa) || (e_llc->ssap != 0xaa))
++ && ( (mac_is_equal(daddr, e_hdr->daddr))
++ || (mac_is_equal(saddr, e_hdr->saddr))
++ )
++ ) {
++ /* 802.3 Encapsulated: */
++ /* wlan frame body contains complete eth frame (header+body) */
++ log(L_DEBUG|L_DATA, "rx: 802.3 ENCAP len=%d\n", payload_length);
++
++ if (unlikely(payload_length > (mtu + ETH_HLEN))) {
++ printk("%s: rx: ENCAP frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu + ETH_HLEN);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length;
++ /* Attempt to align IP header (14 bytes eth header + 2 = 16) */
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* now copy the data from the 80211 frame */
++ memcpy(skb->data, e_hdr, payload_length);
++
++ } else if ( (payload_length >= sizeof(wlan_llc_t)+sizeof(wlan_snap_t))
++ && llc_is_snap(e_llc) ) {
++ /* wlan frame body contains: AA AA 03 ... (it's a SNAP) */
++
++ if ( !oui_is_rfc1042(e_snap)
++ || (proto_is_stt(ieee2host16(e_snap->type)) /* && (ethconv == WLAN_ETHCONV_8021h) */)) {
++ log(L_DEBUG|L_DATA, "rx: SNAP+RFC1042 len=%d\n", payload_length);
++ /* wlan frame body contains: AA AA 03 !(00 00 00) ... -or- */
++ /* wlan frame body contains: AA AA 03 00 00 00 0x80f3 ... */
++ /* build eth hdr, type = len, copy AA AA 03... as eth body */
++ /* it's a SNAP + RFC1042 frame && protocol is in STT */
++
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: SNAP frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* create 802.3 header */
++ e_hdr = (wlan_ethhdr_t*) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = htons(payload_length);
++
++ /* Now copy the data from the 80211 frame.
++ Make room in front for the eth header, and keep the
++ llc and snap from the 802.11 payload */
++ memcpy(skb->data + ETH_HLEN,
++ e_llc, payload_length);
++
++ } else {
++ /* wlan frame body contains: AA AA 03 00 00 00 [type] [tail] */
++ /* build eth hdr, type=[type], copy [tail] as eth body */
++ log(L_DEBUG|L_DATA, "rx: 802.1h/RFC1042 len=%d\n",
++ payload_length);
++ /* it's an 802.1h frame (an RFC1042 && protocol is not in STT) */
++ /* build a DIXII + RFC894 */
++
++ payload_length -= sizeof(wlan_llc_t) + sizeof(wlan_snap_t);
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: DIXII frame too large (%d > %d)\n",
++ adev->ndev->name,
++ payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* create 802.3 header */
++ e_hdr = (wlan_ethhdr_t *) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = e_snap->type;
++
++ /* Now copy the data from the 80211 frame.
++ Make room in front for the eth header, and cut off the
++ llc and snap from the 802.11 payload */
++ memcpy(skb->data + ETH_HLEN,
++ e_payload, payload_length);
++ }
++
++ } else {
++ log(L_DEBUG|L_DATA, "rx: NON-ENCAP len=%d\n", payload_length);
++ /* build eth hdr, type=len, copy wlan body as eth body */
++ /* any NON-ENCAP */
++ /* it's a generic 80211+LLC or IPX 'Raw 802.3' */
++ /* build an 802.3 frame */
++
++ if (unlikely(payload_length > mtu)) {
++ printk("%s: rx: OTHER frame too large (%d > %d)\n",
++ adev->ndev->name, payload_length, mtu);
++ goto ret_null;
++ }
++
++ /* allocate space and setup host buffer */
++ buflen = payload_length + ETH_HLEN;
++ skb = dev_alloc_skb(buflen + 2);
++ if (unlikely(!skb))
++ goto no_skb;
++ skb_reserve(skb, 2);
++ skb_put(skb, buflen); /* make room */
++
++ /* set up the 802.3 header */
++ e_hdr = (wlan_ethhdr_t *) skb->data;
++ MAC_COPY(e_hdr->daddr, daddr);
++ MAC_COPY(e_hdr->saddr, saddr);
++ e_hdr->type = htons(payload_length);
++
++ /* now copy the data from the 80211 frame */
++ memcpy(skb->data + ETH_HLEN, e_llc, payload_length);
++ }
++
++ skb->dev = adev->ndev;
++ skb->protocol = eth_type_trans(skb, adev->ndev);
++
++#ifdef DEBUG_CONVERT
++ if (acx_debug & L_DATA) {
++ int len = RXBUF_BYTES_RCVD(adev, rxbuf);
++ printk("p802.11 frame [%d]: ", len);
++ acx_dump_bytes(w_hdr, len);
++ printk("eth frame [%d]: ", skb->len);
++ acx_dump_bytes(skb->data, skb->len);
++ }
++#endif
++
++ FN_EXIT0;
++ return skb;
++
++no_skb:
++ printk("%s: rx: no memory for skb (%d bytes)\n",
++ adev->ndev->name, buflen + 2);
++ret_null:
++ FN_EXIT1((int)NULL);
++ return NULL;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/cs.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/cs.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,5703 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++**
++** Slave memory interface support:
++**
++** Todd Blumer - SDG Systems
++** Bill Reese - HP
++** Eric McCorkle - Shadowsun
++**
++** CF support, (c) Fabrice Crohas, Paul Sokolovsky
++*/
++#define ACX_MEM 1
++
++/*
++ * non-zero makes it dump the ACX memory to the console then
++ * panic when you cat /proc/driver/acx_wlan0_diag
++ */
++#define DUMP_MEM_DEFINED 1
++
++#define DUMP_MEM_DURING_DIAG 0
++#define DUMP_IF_SLOW 0
++
++#define PATCH_AROUND_BAD_SPOTS 1
++#define HX4700_FIRMWARE_CHECKSUM 0x0036862e
++#define HX4700_ALTERNATE_FIRMWARE_CHECKSUM 0x00368a75
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/irq.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/inetdevice.h>
++
++#define PCMCIA_DEBUG 1
++
++/*
++ All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
++ you do not define PCMCIA_DEBUG at all, all the debug code will be
++ left out. If you compile with PCMCIA_DEBUG=0, the debug code will
++ be present but disabled -- but it can then be enabled for specific
++ modules at load time with a 'pc_debug=#' option to insmod.
++
++*/
++#include <pcmcia/cs_types.h>
++#include <pcmcia/cs.h>
++#include <pcmcia/cistpl.h>
++#include <pcmcia/cisreg.h>
++#include <pcmcia/ds.h>
++#include "acx.h"
++#include "acx_hw.h"
++
++#ifdef PCMCIA_DEBUG
++static int pc_debug = PCMCIA_DEBUG;
++module_param(pc_debug, int, 0);
++static char *version = "$Revision: 1.10 $";
++#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
++#else
++#define DEBUG(n, args...)
++#endif
++
++
++static win_req_t memwin;
++
++typedef struct local_info_t {
++ dev_node_t node;
++ struct net_device *ndev;
++} local_info_t;
++
++static struct net_device *resume_ndev;
++
++
++/***********************************************************************
++*/
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#include <asm/io.h>
++
++#define REG_ACX_VENDOR_ID 0x900
++/*
++ * This is the vendor id on the HX4700, anyway
++ */
++#define ACX_VENDOR_ID 0x8400104c
++
++typedef enum {
++ ACX_SOFT_RESET = 0,
++
++ ACX_SLV_REG_ADDR,
++ ACX_SLV_REG_DATA,
++ ACX_SLV_REG_ADATA,
++
++ ACX_SLV_MEM_CP,
++ ACX_SLV_MEM_ADDR,
++ ACX_SLV_MEM_DATA,
++ ACX_SLV_MEM_CTL,
++} acxreg_t;
++
++/***********************************************************************
++*/
++static void acxmem_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxmem_i_set_multicast_list(struct net_device *ndev);
++
++static int acxmem_e_open(struct net_device *ndev);
++static int acxmem_e_close(struct net_device *ndev);
++static void acxmem_s_up(struct net_device *ndev);
++static void acxmem_s_down(struct net_device *ndev);
++
++static void dump_acxmem (acx_device_t *adev, u32 start, int length);
++static int acxmem_complete_hw_reset (acx_device_t *adev);
++static void acxmem_s_delete_dma_regions(acx_device_t *adev);
++
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend( struct net_device *ndev, pm_message_t state);
++#else
++acxmem_e_suspend( struct net_device *ndev, u32 state);
++#endif
++static void
++fw_resumer(struct work_struct *notused);
++//fw_resumer( void *data );
++
++static int acx_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++ struct net_device *ndev = ptr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /*
++ * Upper level ioctl() handlers send a NETDEV_CHANGEADDR if the MAC address changes.
++ */
++
++ if (NETDEV_CHANGEADDR == event) {
++ /*
++ * the upper layers put the new MAC address in ndev->dev_addr; we just copy
++ * it over and update the ACX with it.
++ */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ adev->set_mask |= GETSET_STATION_ID;
++ acx_s_update_card_settings (adev);
++ }
++
++ return 0;
++}
++
++static struct notifier_block acx_netdev_notifier = {
++ .notifier_call = acx_netdev_event,
++};
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_id_register (acx_device_t *adev)
++{
++ writel (0x24, &adev->iobase[ACX_SLV_REG_ADDR]);
++ return readl (&adev->iobase[ACX_SLV_REG_DATA]);
++}
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++ u32 val;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readl(((u8*)adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ val = readl( &adev->iobase[ACX_SLV_REG_DATA] );
++
++ return val;
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ u16 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readw(((u8 *) adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u16 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return lo;
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ u8 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20)
++ return readb(((u8 *)adev->iobase) + addr);
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return (u8)lo;
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writel(val, ((u8*)adev->iobase) + addr);
++ return;
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writel( val, &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writew(val, ((u8 *)adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writew( val, (u16 *) &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writeb(val, ((u8 *) adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writeb( val, (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ (void) readl(adev->iobase);
++}
++
++INLINE_IO void
++set_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp | bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++INLINE_IO void
++clear_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp & ~bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++/*
++ * Copy from PXA memory to the ACX memory. This assumes both the PXA and ACX
++ * addresses are 32 bit aligned. Count is in bytes.
++ */
++INLINE_IO void
++write_slavemem32 (acx_device_t *adev, u32 slave_address, u32 val)
++{
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, val);
++}
++
++INLINE_IO u32
++read_slavemem32 (acx_device_t *adev, u32 slave_address)
++{
++ u32 val;
++
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ val = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++
++ return val;
++}
++
++INLINE_IO void
++write_slavemem8 (acx_device_t *adev, u32 slave_address, u8 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++INLINE_IO u8
++read_slavemem8 (acx_device_t *adev, u32 slave_address)
++{
++ u8 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xff;
++
++ return val;
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO void
++write_slavemem16 (acx_device_t *adev, u32 slave_address, u16 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xffff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO u16
++read_slavemem16 (acx_device_t *adev, u32 slave_address)
++{
++ u16 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xffff;
++
++ return val;
++}
++
++/*
++ * Copy from slave memory
++ *
++ * TODO - rewrite using address autoincrement, handle partial words
++ */
++void
++copy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count) {
++ u32 tmp = 0;
++ u8 *ptmp = (u8 *) &tmp;
++
++ /*
++ * Right now I'm making the assumption that the destination is aligned, but
++ * I'd better check.
++ */
++ if ((u32) destination & 3) {
++ printk ("acx copy_from_slavemem: warning! destination not word-aligned!\n");
++ }
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ *((u32 *) destination) = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If the word reads above didn't satisfy the count, read one more word
++ * and transfer a byte at a time until the request is satisfied.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *destination++ = *ptmp++;
++ }
++ }
++}
++
++/*
++ * Copy to slave memory
++ *
++ * TODO - rewrite using autoincrement, handle partial words
++ */
++void
++copy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 tmp = 0;
++ u8* ptmp = (u8 *) &tmp;
++ static u8 src[512]; /* make static to avoid huge stack objects */
++
++ /*
++ * For now, make sure the source is word-aligned by copying it to a word-aligned
++ * buffer. Someday rewrite to avoid the extra copy.
++ */
++ if (count > sizeof (src)) {
++ printk ("acx copy_to_slavemem: Warning! buffer overflow!\n");
++ count = sizeof (src);
++ }
++ memcpy (src, source, count);
++ source = src;
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, *((u32 *) source));
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If there are leftovers read the next word from the acx and merge in
++ * what they want to write.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *ptmp++ = *source++;
++ }
++ /*
++ * reset address in case we're currently in auto-increment mode
++ */
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, tmp);
++ udelay (10);
++ }
++
++}
++
++/*
++ * Block copy to slave buffers using memory block chain mode. Copies to the ACX
++ * transmit buffer structure with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) source;
++ static u8 aligned_source[WLAN_A4FR_MAXLEN_WEP_FCS];
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * This should never happen since we're in control of both, but I want to know about
++ * it if it does.
++ */
++ if ((destination & 0x00ffffe0) != destination) {
++ printk ("acx chaincopy: destination block 0x%04x not aligned!\n", destination);
++ }
++ if (count > sizeof aligned_source) {
++ printk( KERN_ERR "chaincopy_to_slavemem overflow!\n" );
++ count = sizeof aligned_source;
++ }
++ if ((u32) source & 3) {
++ memcpy (aligned_source, source, count);
++ data = (u32 *) aligned_source;
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = 2 << 16 | 1 << 2;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = destination & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (destination & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Write the data to the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ writel (*data++, &adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++}
++
++
++/*
++ * Block copy from slave buffers using memory block chain mode. Copies from the ACX
++ * receive buffer structures with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) destination;
++ static u8 aligned_destination[WLAN_A4FR_MAXLEN_WEP_FCS];
++ int saved_count = count;
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * Turns out the network stack sends unaligned things, so fix them before
++ * copying to the ACX.
++ */
++ if ((source & 0x00ffffe0) != source) {
++ printk ("acx chaincopy: source block 0x%04x not aligned!\n", source);
++ dump_acxmem (adev, 0, 0x10000);
++ }
++ if ((u32) destination & 3) {
++ //printk ("acx chaincopy: data destination not word aligned!\n");
++ data = (u32 *) aligned_destination;
++ if (count > sizeof aligned_destination) {
++ printk( KERN_ERR "chaincopy_from_slavemem overflow!\n" );
++ count = sizeof aligned_destination;
++ }
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = (2 << 16) | (1 << 2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = source & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (source & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Read the data from the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ *data++ = readl (&adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++
++ /*
++ * If the destination wasn't aligned, we would have saved it in
++ * the aligned buffer, so copy it where it should go.
++ */
++ if ((u32) destination & 3) {
++ memcpy (destination, aligned_destination, saved_count);
++ }
++}
++
++char
++printable (char c)
++{
++ return ((c >= 20) && (c < 127)) ? c : '.';
++}
++
++#if DUMP_MEM_DEFINED > 0
++static void
++dump_acxmem (acx_device_t *adev, u32 start, int length)
++{
++ int i;
++ u8 buf[16];
++
++ while (length > 0) {
++ printk ("%04x ", start);
++ copy_from_slavemem (adev, buf, start, 16);
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%02x ", buf[i]);
++ }
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%c", printable (buf[i]));
++ }
++ printk ("\n");
++ start += 16;
++ length -= 16;
++ }
++}
++#endif
++
++static void
++enable_acx_irq(acx_device_t *adev);
++static void
++disable_acx_irq(acx_device_t *adev);
++
++/*
++ * Return an acx pointer to the next transmit data block.
++ */
++u32
++allocate_acx_txbuf_space (acx_device_t *adev, int count) {
++ u32 block, next, last_block;
++ int blocks_needed;
++ unsigned long flags;
++
++ spin_lock_irqsave(&adev->txbuf_lock, flags);
++ /*
++ * Take 4 off the memory block size to account for the reserved word at the start of
++ * the block.
++ */
++ blocks_needed = count / (adev->memblocksize - 4);
++ if (count % (adev->memblocksize - 4))
++ blocks_needed++;
++
++ if (blocks_needed <= adev->acx_txbuf_blocks_free) {
++ /*
++ * Take blocks at the head of the free list.
++ */
++ last_block = block = adev->acx_txbuf_free;
++
++ /*
++ * Follow block pointers through the requested number of blocks both to
++ * find the new head of the free list and to set the flags for the blocks
++ * appropriately.
++ */
++ while (blocks_needed--) {
++ /*
++ * Keep track of the last block of the allocation
++ */
++ last_block = adev->acx_txbuf_free;
++
++ /*
++ * Make sure the end control flag is not set.
++ */
++ next = read_slavemem32 (adev, adev->acx_txbuf_free) & 0x7ffff;
++ write_slavemem32 (adev, adev->acx_txbuf_free, next);
++
++ /*
++ * Update the new head of the free list
++ */
++ adev->acx_txbuf_free = next << 5;
++ adev->acx_txbuf_blocks_free--;
++
++ }
++
++ /*
++ * Flag the last block both by clearing out the next pointer
++ * and marking the control field.
++ */
++ write_slavemem32 (adev, last_block, 0x02000000);
++
++ /*
++ * If we're out of buffers make sure the free list pointer is NULL
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ adev->acx_txbuf_free = 0;
++ }
++ }
++ else {
++ block = 0;
++ }
++ spin_unlock_irqrestore (&adev->txbuf_lock, flags);
++ return block;
++}
++
++/*
++ * Return buffer space back to the pool by following the next pointers until we find
++ * the block marked as the end. Point the last block to the head of the free list,
++ * then update the head of the free list to point to the newly freed memory.
++ * This routine gets called in interrupt context, so it shouldn't block to protect
++ * the integrity of the linked list. The ISR already holds the lock.
++ */
++void
++reclaim_acx_txbuf_space (acx_device_t *adev, u32 blockptr) {
++ u32 cur, last, next;
++ unsigned long flags;
++
++ spin_lock_irqsave (&adev->txbuf_lock, flags);
++ if ((blockptr >= adev->acx_txbuf_start) &&
++ (blockptr <= adev->acx_txbuf_start +
++ (adev->acx_txbuf_numblocks - 1) * adev->memblocksize)) {
++ cur = blockptr;
++ do {
++ last = cur;
++ next = read_slavemem32 (adev, cur);
++
++ /*
++ * Advance to the next block in this allocation
++ */
++ cur = (next & 0x7ffff) << 5;
++
++ /*
++ * This block now counts as free.
++ */
++ adev->acx_txbuf_blocks_free++;
++ } while (!(next & 0x02000000));
++
++ /*
++ * last now points to the last block of that allocation. Update the pointer
++ * in that block to point to the free list and reset the free list to the
++ * first block of the free call. If there were no free blocks, make sure
++ * the new end of the list marks itself as truly the end.
++ */
++ if (adev->acx_txbuf_free) {
++ write_slavemem32 (adev, last, adev->acx_txbuf_free >> 5);
++ }
++ else {
++ write_slavemem32 (adev, last, 0x02000000);
++ }
++ adev->acx_txbuf_free = blockptr;
++ }
++ spin_unlock_irqrestore(&adev->txbuf_lock, flags);
++}
++
++/*
++ * Initialize the pieces managing the transmit buffer pool on the ACX. The transmit
++ * buffer is a circular queue with one 32 bit word reserved at the beginning of each
++ * block. The upper 13 bits are a control field, of which only 0x02000000 has any
++ * meaning. The lower 19 bits are the address of the next block divided by 32.
++ */
++void
++init_acx_txbuf (acx_device_t *adev) {
++
++ /*
++ * acx100_s_init_memory_pools set up txbuf_start and txbuf_numblocks for us.
++ * All we need to do is reset the rest of the bookeeping.
++ */
++
++ adev->acx_txbuf_free = adev->acx_txbuf_start;
++ adev->acx_txbuf_blocks_free = adev->acx_txbuf_numblocks;
++
++ /*
++ * Initialization leaves the last transmit pool block without a pointer back to
++ * the head of the list, but marked as the end of the list. That's how we want
++ * to see it, too, so leave it alone. This is only ever called after a firmware
++ * reset, so the ACX memory is in the state we want.
++ */
++
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxmem_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxmem_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxmem_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxmem_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ int count;
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++ fail:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxmem_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxmem_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size, checkMismatch = -1;
++ u32 sum, v32, tmp, id;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++#endif
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ write_flush(adev);
++#endif
++ write_slavemem32 (adev, offset + len - 4, v32);
++
++ id = read_id_register (adev);
++
++ /*
++ * check the data written
++ */
++ tmp = read_slavemem32 (adev, offset + len - 4);
++ if (checkMismatch && (tmp != v32)) {
++ printk ("first data mismatch at 0x%08x good 0x%08x bad 0x%08x id 0x%08x\n",
++ offset + len - 4, v32, tmp, id);
++ checkMismatch = 0;
++ }
++ }
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxmem_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxmem_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ udelay(10);
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++#endif
++ w32 = read_slavemem32 (adev, offset + len - 4);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match\n(0x%08X vs. 0x%08X)!\n"
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxmem_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char *filename = "WLANGEN.BIN";
++#ifdef PATCH_AROUND_BAD_SPOTS
++ u32 offset;
++ int i;
++ /*
++ * arm-linux-objdump -d patch.bin, or
++ * od -Ax -t x4 patch.bin after finding the bounds
++ * of the .text section with arm-linux-objdump -s patch.bin
++ */
++ u32 patch[] = {
++ 0xe584c030, 0xe59fc008,
++ 0xe92d1000, 0xe59fc004, 0xe8bd8000, 0x0000080c,
++ 0x0000aa68, 0x605a2200, 0x2c0a689c, 0x2414d80a,
++ 0x2f00689f, 0x1c27d007, 0x06241e7c, 0x2f000e24,
++ 0xe000d1f6, 0x602e6018, 0x23036468, 0x480203db,
++ 0x60ca6003, 0xbdf0750a, 0xffff0808
++ };
++#endif
++
++ FN_ENTER;
++ /* No combined image; tell common we need the radio firmware, too */
++ adev->need_radio_fw = 1;
++
++ fw_image = acx_s_read_fw(adev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++#ifdef PATCH_AROUND_BAD_SPOTS
++ /*
++ * Only want to do this if the firmware is exactly what we expect for an
++ * iPaq 4700; otherwise, bad things would ensue.
++ */
++ if ((HX4700_FIRMWARE_CHECKSUM == fw_image->chksum) ||
++ (HX4700_ALTERNATE_FIRMWARE_CHECKSUM == fw_image->chksum)) {
++ /*
++ * Put the patch after the main firmware image. 0x950c contains
++ * the ACX's idea of the end of the firmware. Use that location to
++ * load ours (which depends on that location being 0xab58) then
++ * update that location to point to after ours.
++ */
++
++ offset = read_slavemem32 (adev, 0x950c);
++
++ log (L_DEBUG, "acx: patching in at 0x%04x\n", offset);
++
++ for (i = 0; i < sizeof(patch) / sizeof(patch[0]); i++) {
++ write_slavemem32 (adev, offset, patch[i]);
++ offset += sizeof(u32);
++ }
++
++ /*
++ * Patch the instruction at 0x0804 to branch to our ARM patch at 0xab58
++ */
++ write_slavemem32 (adev, 0x0804, 0xea000000 + (0xab58-0x0804-8)/4);
++
++ /*
++ * Patch the instructions at 0x1f40 to branch to our Thumb patch at 0xab74
++ *
++ * 4a00 ldr r2, [pc, #0]
++ * 4710 bx r2
++ * .data 0xab74+1
++ */
++ write_slavemem32 (adev, 0x1f40, 0x47104a00);
++ write_slavemem32 (adev, 0x1f44, 0x0000ab74+1);
++
++ /*
++ * Bump the end of the firmware up to beyond our patch.
++ */
++ write_slavemem32 (adev, 0x950c, offset);
++
++ }
++#endif
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxmem_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("RADIONN.BIN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "RADIO%02x.BIN",
++ adev->radio_type);
++ radio_image = acx_s_read_fw(adev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++/***********************************************************************
++** acxmem_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxmem_l_reset_mac(acx_device_t *adev)
++{
++ int count;
++ FN_ENTER;
++
++ /* halt eCPU */
++ set_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++
++ /* now do soft reset of eCPU, set bit */
++ set_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++
++ /* Windows driver sleeps here for a while with this sequence */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ clear_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++
++ /* now start a burst read from initial EEPROM */
++ set_regbits (adev, IO_ACX_EE_START, 0x1);
++
++ /*
++ * Windows driver sleeps here for a while with this sequence
++ */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* Windows driver writes 0x10000 to register 0x808 here */
++
++ write_reg32 (adev, 0x808, 0x10000);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_verify_init
++*/
++static int
++acxmem_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u32 irqstat = read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if ((irqstat != 0xFFFFFFFF) && (irqstat & HOST_INT_FCS_THRESHOLD)) {
++ result = OK;
++ write_reg32(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxmem_write_cmd_type_status
++*/
++
++static inline void
++acxmem_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ write_slavemem32 (adev, (u32) adev->cmd_area, type | (status << 16));
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxmem_read_cmd_type_status
++*/
++static u32
++acxmem_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = read_slavemem32 (adev, (u32) adev->cmd_area);
++
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxmem_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxmem_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8*) cmd_offs;
++ adev->info_area = (u8*) info_offs;
++ /*
++ log(L_DEBUG, "iobase2=%p\n"
++ */
++ log( L_DEBUG, "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxmem_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++static int
++acxmem_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++ u32 tmp;
++
++ FN_ENTER;
++ /*
++ write_reg32 (adev, IO_ACX_SLV_MEM_CP, 0);
++ */
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ /* Windows driver does some funny things here */
++ /*
++ * clear bit 0x200 in register 0x2A0
++ */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /*
++ * Set bit 0x200 in ACX_GPIO_OUT
++ */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++
++ /*
++ * read register 0x900 until its value is 0x8400104C, sleeping
++ * in between reads if it's not immediate
++ */
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ count = 500;
++ while (count-- && (tmp != ACX_VENDOR_ID)) {
++ mdelay (10);
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ }
++
++ /* end what Windows driver does */
++
++ acxmem_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg32(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++ printk("ACX radio type 0x%02x\n", (hardware_info >> 8) & 0xff);
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxmem_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ clear_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* Windows driver clears bit 0x200 in register 0x2A0 here */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /* Windows driver sets bit 0x200 in ACX_GPIO_OUT here */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++ /* wait for eCPU bootup */
++ if (OK != acxmem_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++ init_mboxes(adev);
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxmem_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxmem_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ int i, j;
++ u8 *p;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxmem_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++#if DUMP_IF_SLOW > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("not idle");
++#endif
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /*
++ * slave memory version
++ */
++ copy_to_slavemem (adev, (u32) (adev->cmd_area + 4), buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxmem_write_cmd_type_status(adev, cmd, 0);
++
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxmem_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ printk("%s: "FUNC"(): device irq status 0x%04x\n",
++ devname, read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES));
++ printk("%s: "FUNC"(): IO_ACX_IRQ_MASK 0x%04x IO_ACX_FEMR 0x%04x\n",
++ devname,
++ read_reg16 (adev, IO_ACX_IRQ_MASK),
++ read_reg16 (adev, IO_ACX_FEMR));
++ if (read_reg16 (adev, IO_ACX_IRQ_MASK) == 0xffff) {
++ printk ("acxmem: firmware probably hosed - reloading\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ {
++ pm_message_t state;
++ /* acxmem_e_suspend (resume_pdev, state); */
++ acxmem_e_suspend (adev->ndev , state);
++ }
++#else
++ acxmem_e_suspend (adev, 0);
++#endif
++ {
++ resume_ndev = adev->ndev;
++ fw_resumer (NULL);
++ }
++ }
++
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buflen > 388) {
++ /*
++ * 388 is maximum command length
++ */
++ printk ("invalid length 0x%08x\n", buflen);
++ buflen = 388;
++ }
++ p = (u8 *) buffer;
++ for (i = 0; i < buflen; i+= 16) {
++ printk ("%04x:", i);
++ for (j = 0; (j < 16) && (i+j < buflen); j++) {
++ printk (" %02x", *p++);
++ }
++ printk ("\n");
++ }
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ copy_from_slavemem (adev, buffer, (u32) (adev->cmd_area + 4), buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#if defined(NONESSENTIAL_FEATURES)
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxmem_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++/***********************************************************************
++** acxmem_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++void
++acxmem_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ kfree(ptr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_delete_dma_regions
++*/
++static void
++acxmem_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ /*
++ * slave memory interface really doesn't like this.
++ */
++ /*
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++ */
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxmem_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_MEM_CP */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++/*
++ * Most of the acx specific pieces of hardware reset.
++ */
++static int
++acxmem_complete_hw_reset (acx_device_t *adev)
++{
++ acx111_ie_configoption_t co;
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxmem_s_reset_dev (adev))
++ return -1;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ copy_from_slavemem (adev, (u8*) &co, (u32) adev->cmd_area, sizeof (co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ return -3;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++ /*
++ * Set up transmit buffer administration
++ */
++ init_acx_txbuf (adev);
++
++ /*
++ * Windows driver writes 0x01000000 to register 0x288, RADIO_CTL, if the form factor
++ * is 3. It also write protects the EEPROM by writing 1<<9 to GPIO_OUT
++ */
++ if (adev->form_factor == 3) {
++ set_regbits (adev, 0x288, 0x01000000);
++ set_regbits (adev, 0x298, 1<<9);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxmem_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ return -2;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ return 0;
++}
++
++static int acx_init_netdev(struct net_device *ndev, struct device *dev, int base_addr, int addr_size, int irq)
++{
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ u8 chip_type;
++ acx_device_t *adev = NULL;
++
++ FN_ENTER;
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = CHIPTYPE_ACX100;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ printk("acx: found %s-based wireless network card\n", chip_name);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++
++ dev_set_drvdata(dev, ndev);
++
++ ether_setup(ndev);
++
++ ndev->irq = irq;
++
++ ndev->base_addr = base_addr;
++printk (KERN_INFO "memwinbase=%lx memwinsize=%u\n",memwin.Base,memwin.Size);
++ if (addr_size == 0 || ndev->irq == 0)
++ goto fail_hw_params;
++ ndev->open = &acxmem_e_open;
++ ndev->stop = &acxmem_e_close;
++ //pdev->dev.release = &acxmem_e_release;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxmem_i_set_multicast_list;
++ ndev->tx_timeout = &acxmem_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ spin_lock_init(&adev->txbuf_lock);
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->dev = dev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_MEM;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = (volatile u32 *) ndev->base_addr;
++ adev->iobase = (volatile u32 *) ioremap_nocache (ndev->base_addr, addr_size);
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#if defined(NONESSENTIAL_FEATURES)
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ // need to fix that @@
++ SET_NETDEV_DEV(ndev, dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", ndev->irq);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ if (OK != acxmem_complete_hw_reset (adev))
++ goto fail_reset;
++
++ /*
++ * Set up default things for most of the card settings.
++ */
++ acx_s_set_defaults(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /*
++ * Set up a default monitor type so that poor combinations of initialization
++ * sequences in monitor mode don't end up destroying the hardware type.
++ */
++ adev->monitor_type = ARPHRD_ETHER;
++
++ /*
++ * Register to receive inetaddr notifier changes. This will allow us to
++ * catch if the user changes the MAC address of the interface.
++ */
++ register_netdevice_notifier(&acx_netdev_notifier);
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxmem_s_delete_dma_regions(adev);
++
++fail_reset:
++fail_hw_params:
++ free_netdev(ndev);
++fail_unknown_chiptype:
++
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static int __devexit
++acxmem_e_remove(struct pcmcia_device *link)
++{
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = ((local_info_t*)link->priv)->ndev;
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxmem_l_power_led(adev, 0);
++
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxmem_l_reset_mac(adev);
++ } else {
++ u16 temp;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++
++ /*
++ * Unregister the notifier chain
++ */
++ unregister_netdevice_notifier(&acx_netdev_notifier);
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxmem_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxmem_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ acxmem_s_delete_dma_regions(adev);
++
++ /* finally, clean up PCI bus state */
++ if (adev->iobase) iounmap((void *)adev->iobase);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ printk ("e_remove done\n");
++end:
++ FN_EXIT0;
++
++ return 0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend( struct net_device *ndev, pm_message_t state)
++#else
++acxmem_e_suspend( struct net_device *ndev, u32 state)
++#endif
++{
++ FN_ENTER;
++ acx_device_t *adev;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++ // @@ need to get it from link or something like that
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(adev->ndev); /* this one cannot sleep */
++ acxmem_s_down(adev->ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxmem_s_delete_dma_regions(adev);
++
++ /*
++ * Turn the ACX chip off.
++ */
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++static void
++fw_resumer(struct work_struct *notused)
++{
++ acx_device_t *adev;
++ struct net_device *ndev = resume_ndev;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ return;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ /*
++ * Turn on the ACX.
++ */
++
++ acxmem_complete_hw_reset (adev);
++
++ /*
++ * done by acx_s_set_defaults for initial startup
++ */
++ acxmem_set_interrupt_mask(adev);
++
++ printk ("rsm: bringing up interface\n");
++ SET_BIT (adev->set_mask, GETSET_ALL);
++ acxmem_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-)
++ */
++ /* - most settings updated in acxmem_s_up()
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ */
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++ acx_sem_unlock(adev);
++}
++
++DECLARE_WORK( fw_resume_work, fw_resumer );
++
++static int
++acxmem_e_resume(struct pcmcia_device *link)
++{
++ FN_ENTER;
++
++ //resume_pdev = pdev;
++ schedule_work( &fw_resume_work );
++
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxmem_s_up
++**
++** This function is called by acxmem_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_down
++**
++** This disables the netdevice
++**
++** Side effects:
++** - disables on-card interrupt request
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++#if 0
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxmem_i_interrupt, SA_INTERRUPT, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ set_irq_type (ndev->irq, IRQT_FALLING);
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++#endif
++
++ /* ifup device */
++ acxmem_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxmem_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxmem_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxmem_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxmem_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxmem_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxmem_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxmem_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ register rxdesc_t *rxdesc;
++ unsigned count, tail;
++ u32 addr;
++ u8 Ctl_8;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ /*
++ * Unlike the PCI interface, where the ACX can write directly to
++ * the host descriptors, on the slave memory interface we have to
++ * pull these. All we really need to do is check the Ctl_8 field
++ * in the rx descriptor on the ACX, which should be 0x11000000 if
++ * we should process it.
++ */
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_HOSTOWN) &&
++ (Ctl_8 & DESC_CTL_ACXDONE))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_8=%02X\n", tail, Ctl_8);
++ /*
++ * If the ACX has CTL_RECLAIM set on this descriptor there
++ * is no buffer associated; it just wants us to tell it to
++ * reclaim the memory.
++ */
++ if (!(Ctl_8 & DESC_CTL_RECLAIM)) {
++
++ /*
++ * slave interface - pull data now
++ */
++ hostdesc->length = read_slavemem16 (adev, (u32) &(rxdesc->total_length));
++
++ /*
++ * hostdesc->data is an rxbuffer_t, which includes header information,
++ * but the length in the data packet doesn't. The header information
++ * takes up an additional 12 bytes, so add that to the length we copy.
++ */
++ addr = read_slavemem32 (adev, (u32) &(rxdesc->ACXMemPtr));
++ if (addr) {
++ /*
++ * How can &(rxdesc->ACXMemPtr) above ever be zero? Looks like we
++ * get that now and then - try to trap it for debug.
++ */
++ if (addr & 0xffff0000) {
++ printk("rxdesc 0x%08x\n", (u32) rxdesc);
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("Bad access!");
++ }
++ chaincopy_from_slavemem (adev, (u8 *) hostdesc->data, addr,
++ hostdesc->length +
++ (u32) &((rxbuffer_t *)0)->hdr_a3);
++ acx_l_process_rxbuf(adev, hostdesc->data);
++ }
++ }
++ else {
++ printk ("rx reclaim only!\n");
++ }
++
++ hostdesc->Status = 0;
++
++ /*
++ * Let the ACX know we're done.
++ */
++ CLEAR_BIT (Ctl_8, DESC_CTL_HOSTOWN);
++ SET_BIT (Ctl_8, DESC_CTL_HOSTDONE);
++ SET_BIT (Ctl_8, DESC_CTL_RECLAIM);
++ write_slavemem8 (adev, (u32) &rxdesc->Ctl_8, Ctl_8);
++
++ /*
++ * Now tell the ACX we've finished with the receive buffer so
++ * it can finish the reclaim.
++ */
++ write_reg16 (adev, IO_ACX_INT_TRIG, INT_TRIG_RXPRC);
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++
++ /* if next descriptor is empty, then bail out */
++ if (!(Ctl_8 & DESC_CTL_HOSTOWN) || !(Ctl_8 & DESC_CTL_ACXDONE))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = read_slavemem32 (adev, (u32) adev->info_area);
++
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ write_slavemem32(adev, (u32) adev->info_area, info_type | 0x00010000);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ printk(" Rx_Complete");
++ }
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxmem_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxmem_i_interrupt(int irq, void *dev_id)
++#else
++acxmwm_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_DATA) {
++ log(L_IRQ, "got Rx_Data IRQ\n");
++ acxmem_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxmem_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxmem_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ /* | HOST_INT_RX_DATA */
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ | HOST_INT_RX_COMPLETE
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxmem_l_power_led
++*/
++void
++acxmem_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ printk ("Interrogating queue config\n");
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++ printk ("done with queue config\n");
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ printk ("Interrogating mem config options\n");
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++ printk ("done with mem config options\n");
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ printk ("Interrogating mem map\n");
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++ printk ("done with mem map\n");
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ printk ("Interrogating rxconfig\n");
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++ printk ("done with queue rxconfig\n");
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ printk ("Interrogating fcs err count\n");
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++ printk ("done with err count\n");
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ printk ("Interrogating rate fallback\n");
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++ printk ("done with rate fallback\n");
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++/***************************************************************
++** acxmem_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxmem_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++ static int txattempts = 0;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ /*
++ * Probably the ACX ignored a transmit attempt and now there's a packet
++ * sitting in the queue we think should be transmitting but the ACX doesn't
++ * know about.
++ * On the first pass, send the ACX a TxProc interrupt to try moving
++ * things along, and if that doesn't work (ie, we get called again) completely
++ * flush the transmit queue.
++ */
++ if (txattempts < 10) {
++ txattempts++;
++ printk ("acx: trying to wake up ACX\n");
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev); }
++ else {
++ txattempts = 0;
++ printk ("acx: flushing transmit queue.\n");
++ acxmem_l_clean_txdesc_emergency (adev);
++ }
++ txdesc = NULL;
++ goto end;
++ }
++
++ /*
++ * Make a quick check to see if there is transmit buffer space on
++ * the ACX. This can't guarantee there is enough space for the packet
++ * since we don't yet know how big it is, but it will prevent at least some
++ * annoyances.
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ /*
++ * txdesc points to ACX memory
++ */
++ txdesc = get_txdesc(adev, head);
++ ctl8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++
++ /*
++ * If we don't own the buffer (HOSTOWN) it is certainly not free; however,
++ * we may have previously thought we had enough memory to send
++ * a packet, allocated the buffer then gave up when we found not enough
++ * transmit buffer space on the ACX. In that case, HOSTOWN and
++ * ACXDONE will both be set.
++ */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_ACXDONE_HOSTOWN);
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***************************************************************
++** acxmem_l_dealloc_tx
++** Clears out a previously allocatedvoid acxmem_l_dealloc_tx(tx_t *tx_opaque);
++ transmit descriptor. The ACX
++** can get confused if we skip transmit descriptors in the queue,
++** so when we don't need a descriptor return it to its original
++** state and move the queue head pointer back.
++**
++*/
++void
++acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++ /*
++ * txdesc is the address of the descriptor on the ACX.
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txdesc_t tmptxdesc;
++ int index;
++
++ memset (&tmptxdesc, 0, sizeof(tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ /*
++ * Clear out all of the transmit descriptor except for the next pointer
++ */
++ copy_to_slavemem (adev, (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc));
++
++ /*
++ * This is only called immediately after we've allocated, so we should
++ * be able to set the head back to this descriptor.
++ */
++ index = ((u8*) txdesc - (u8*)adev->txdesc_start) / adev->txdesc_size;
++ printk ("acx_dealloc: moving head from %d to %d\n", adev->tx_head, index);
++ adev->tx_head = index;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxmem_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxmem_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxmem_update_queue_indicator (acx_device_t *adev, int txqueue)
++{
++#ifdef USING_MORE_THAN_ONE_TRANSMIT_QUEUE
++ u32 indicator;
++ unsigned long flags;
++ int count;
++
++ /*
++ * Can't handle an interrupt while we're fiddling with the ACX's lock,
++ * according to TI. The ACX is supposed to hold fw_lock for at most
++ * 500ns.
++ */
++ local_irq_save (flags);
++
++ /*
++ * Wait for ACX to release the lock (at most 500ns).
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++ if (count < 50) {
++
++ /*
++ * Take out the host lock - anything non-zero will work, so don't worry about
++ * be/le
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 1);
++
++ /*
++ * Avoid a race condition
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++
++ if (count < 50) {
++ /*
++ * Mark the queue active
++ */
++ indicator = read_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator));
++ indicator |= cpu_to_le32 (1 << txqueue);
++ write_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator), indicator);
++ }
++
++ /*
++ * Release the host lock
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 0);
++
++ }
++
++ /*
++ * Restore interrupts
++ */
++ local_irq_restore (flags);
++#endif
++}
++
++void
++acxmem_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ /*
++ * txdesc is the address on the ACX
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++ u32 addr;
++
++ FN_ENTER;
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), cpu_to_le16(len));
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ write_slavemem8 (adev, (u32) &(txdesc->u.r1.rate), rate_100);
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_FIRSTFRAG);
++
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++
++ /*
++ * Since we're not using autodma copy the packet data to the acx now.
++ * Even host descriptors point to the packet header, and the odd indexed
++ * descriptor following points to the packet data.
++ *
++ * The first step is to find free memory in the ACX transmit buffers.
++ * They don't necessarily map one to one with the transmit queue entries,
++ * so search through them starting just after the last one used.
++ */
++ addr = allocate_acx_txbuf_space (adev, len);
++ if (addr) {
++ chaincopy_to_slavemem (adev, addr, hostdesc1->data, len);
++ }
++ else {
++ /*
++ * Bummer. We thought we might have enough room in the transmit
++ * buffers to send this packet, but it turns out we don't. alloc_tx
++ * has already marked this transmit descriptor as HOSTOWN and ACXDONE,
++ * which means the ACX will hang when it gets to this descriptor unless
++ * we do something about it. Having a bubble in the transmit queue just
++ * doesn't seem to work, so we have to reset this transmit queue entry's
++ * state to its original value and back up our head pointer to point
++ * back to this entry.
++ */
++ hostdesc1->length = 0;
++ hostdesc2->length = 0;
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG);
++ adev->tx_head = ((u8*) txdesc - (u8*) adev->txdesc_start) / adev->txdesc_size;
++ goto end;
++ }
++ /*
++ * Tell the ACX where the packet is.
++ */
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), addr);
++
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ //wmb();
++
++ /* write back modified flags */
++ /*
++ * At this point Ctl_8 should just be FIRSTFRAG
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl2_8),Ctl2_8);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), Ctl_8);
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /*
++ * Update the queue indicator to say there's data on the first queue.
++ */
++ acxmem_update_queue_indicator (adev, 0);
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate)),
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u8 Ctl_8;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ printk(" %02X", Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxmem_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100, Ctl_8;
++ u32 acxmem;
++ txdesc_t tmptxdesc;
++
++ FN_ENTER;
++
++ /*
++ * Set up a template descriptor for re-initialization. The only
++ * things that get set are Ctl_8 and the rate, and the rate defaults
++ * to 1Mbps.
++ */
++ memset (&tmptxdesc, 0, sizeof (tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = read_slavemem8 (adev, (u32) &(txdesc->error));
++ ack_failures = read_slavemem8 (adev, (u32) &(txdesc->ack_failures));
++ rts_failures = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures));
++ rts_ok = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok));
++ r100 = read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate));
++ r111 = le16_to_cpu(read_slavemem16 (adev, (u32) &(txdesc->u.r2.rate111)));
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /*
++ * Free up the transmit data buffers
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ /* ...and free the desc by clearing all the fields
++ except the next pointer */
++ copy_to_slavemem (adev,
++ (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc)
++ );
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxmem_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u32 acxmem;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ write_slavemem8 (adev, (u32) &(txdesc->ack_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->error), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN);
++
++ /*
++ * Clean up the memory allocated on the ACX for this transmit descriptor.
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), 0);
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++ ptr = kmalloc (size, GFP_KERNEL);
++ /*
++ * The ACX can't use the physical address, so we'll have to fake it
++ * later and it might be handy to have the virtual address.
++ */
++ *phy = (dma_addr_t) NULL;
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++/*
++ * In the generic slave memory access mode, most of the stuff in
++ * the txhostdesc_t is unused. It's only here because the rest of
++ * the ACX driver expects it to be since the PCI version uses indirect
++ * host memory organization with DMA. Since we're not using DMA the
++ * only use we have for the host descriptors is to store the packets
++ * on the way out.
++ */
++static int
++acxmem_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ txbuf = adev->txbuf_start;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxmem_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ hostdesc = adev->rxhostdesc_start;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ rxbuf++;
++ hostdesc++;
++ }
++ hostdesc--;
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_hostdesc_queues
++*/
++int
++acxmem_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxmem_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxmem_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxmem_create_tx_desc_queue
++*/
++static void
++acxmem_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ u32 clr;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ /*
++ * This refers to an ACX address, not one of ours
++ */
++ adev->txdesc_start = (txdesc_t *) tx_queue_start;
++
++ log(L_DEBUG, "adev->txdesc_start=%p\n",
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++
++ /*
++ * adev->txdesc_start refers to device memory, so we can't write
++ * directly to it.
++ */
++ clr = (u32) adev->txdesc_start;
++ while (clr < (u32) adev->txdesc_start + (TX_CNT * sizeof(*txdesc))) {
++ write_slavemem32 (adev, clr, 0);
++ clr += 4;
++ }
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* initialise ctl */
++ /*
++ * No auto DMA here
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8),
++ (u8) (DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG));
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++
++ /* point to next txdesc */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) txdesc + adev->txdesc_size));
++
++ /* go to the next one */
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 (tx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_rx_desc_queue
++*/
++static void
++acxmem_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) rx_queue_start;
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ acx2cpu(rxdesc->pNextDesc);
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ mem_offs = (u32) adev->rxdesc_start;
++ while (mem_offs < (u32) adev->rxdesc_start + (RX_CNT * sizeof (*rxdesc))) {
++ write_slavemem32 (adev, mem_offs, 0);
++ mem_offs += 4;
++ }
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ /* point to next rxdesc */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) rxdesc + sizeof(*rxdesc)));
++ /* go to the next one */
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 (rx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_desc_queues
++*/
++void
++acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ u32 *p;
++ int i;
++
++ acxmem_create_tx_desc_queue(adev, tx_queue_start);
++ acxmem_create_rx_desc_queue(adev, rx_queue_start);
++ p = (u32 *) adev->acx_queue_indicator;
++ for (i = 0; i < 4; i++) {
++ write_slavemem32 (adev, (u32) p, 0);
++ p++;
++ }
++}
++
++
++/***************************************************************
++** acxmem_s_proc_diag_output
++*/
++char*
++acxmem_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ txdesc_t *txdesc;
++ u8 Ctl_8;
++ rxdesc_t *rxdesc;
++ int i;
++ u32 tmp;
++ txdesc_t txd;
++ u8 buf[0x200];
++ int j, k;
++
++ FN_ENTER;
++
++#if DUMP_MEM_DURING_DIAG > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("dump finished");
++#endif
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxdesc = adev->rxdesc_start;
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ Ctl_8 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u (%02x) FULL%s\n", i, Ctl_8, rtl);
++ else
++ p += sprintf(p, "%02u (%02x) empty%s\n", i, Ctl_8, rtl);
++ rxdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++
++ p += sprintf(p, "** Tx buf %d blocks total, %d available, free list head %04x\n",
++ adev->acx_txbuf_numblocks, adev->acx_txbuf_blocks_free, adev->acx_txbuf_free);
++ txdesc = adev->txdesc_start;
++ if (txdesc) {
++ for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ copy_from_slavemem (adev, (u8 *) &txd, (u32) txdesc, sizeof (txd));
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u ready to free (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u available (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u busy (%02X)%s%s", i, Ctl_8, thd, ttl);
++ tmp = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (tmp) {
++ p += sprintf (p, " %04x", tmp);
++ while ((tmp = read_slavemem32 (adev, (u32) tmp)) != 0x02000000) {
++ tmp <<= 5;
++ p += sprintf (p, " %04x", tmp);
++ }
++ }
++ p += sprintf (p, "\n");
++ p += sprintf (p, " %04x: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x\n"
++ "%02x %02x %02x %02x %04x\n",
++ (u32) txdesc,
++ txd.pNextDesc.v, txd.HostMemPtr.v, txd.AcxMemPtr.v, txd.tx_time,
++ txd.total_length, txd.Reserved,
++ txd.dummy[0], txd.dummy[1], txd.dummy[2], txd.dummy[3],
++ txd.Ctl_8, txd.Ctl2_8, txd.error, txd.ack_failures,
++ txd.u.rts.rts_failures, txd.u.rts.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl,
++ txd.queue_info
++ );
++ if (txd.AcxMemPtr.v) {
++ copy_from_slavemem (adev, buf, txd.AcxMemPtr.v, sizeof (buf));
++ for (j = 0; (j < txd.total_length) && (j<(sizeof(buf)-4)); j+=16) {
++ p += sprintf (p, " ");
++ for (k = 0; (k < 16) && (j+k < txd.total_length); k++) {
++ p += sprintf (p, " %02x", buf[j+k+4]);
++ }
++ p += sprintf (p, "\n");
++ }
++ }
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ }
++
++ p += sprintf(p,
++ "\n"
++ "** Generic slave data **\n"
++ "irq_mask 0x%04x irq_status 0x%04x irq on acx 0x%04x\n"
++ "txbuf_start 0x%p, txbuf_area_size %u\n"
++ "txdesc_size %u, txdesc_start 0x%p\n"
++ "txhostdesc_start 0x%p, txhostdesc_area_size %u\n"
++ "txbuf start 0x%04x, txbuf size %d\n"
++ "rxdesc_start 0x%p\n"
++ "rxhostdesc_start 0x%p, rxhostdesc_area_size %u\n"
++ "rxbuf_start 0x%p, rxbuf_area_size %u\n",
++ adev->irq_mask, adev->irq_status, read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES),
++ adev->txbuf_start, adev->txbuf_area_size,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ adev->acx_txbuf_start, adev->acx_txbuf_numblocks * adev->memblocksize,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ adev->rxbuf_start, adev->rxbuf_area_size);
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxmem_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxmem_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_OVERFLOW
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_BEACON_MISSED */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ /*
++ * The hx4700 EEPROM, at least, only supports 1 power setting. The configure
++ * routine matches the PA bias with the gain, so just use its default value.
++ * The values are: 0x2b for the gain and 0x03 for the PA bias. The firmware
++ * writes the gain level to the Tx gain control DAC and the PA bias to the Maxim
++ * radio's PA bias register. The firmware limits itself to 0 - 64 when writing to the
++ * gain control DAC.
++ *
++ * Physically between the ACX and the radio, higher Tx gain control DAC values result
++ * in less power output; 0 volts to the Maxim radio results in the highest output power
++ * level, which I'm assuming matches up with 0 in the Tx Gain DAC register.
++ *
++ * Although there is only the 1 power setting, one of the radio firmware functions adjusts
++ * the transmit power level up and down. That function is called by the ACX FIQ handler
++ * under certain conditions.
++ */
++ tx_level.level = 1;
++ //return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxmem_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++
++ return 0;
++}
++
++void acxmem_e_release(struct device *dev) {
++}
++
++/***********************************************************************
++** acx_cs part
++**
++** called by pcmcia card service
++*/
++
++/*
++ The event() function is this driver's Card Services event handler.
++ It will be called by Card Services when an appropriate card status
++ event is received. The config() and release() entry points are
++ used to configure or release a socket, in response to card
++ insertion and ejection events. They are invoked from the acx_cs
++ event handler.
++*/
++
++static int acx_cs_config(struct pcmcia_device *link);
++static void acx_cs_release(struct pcmcia_device *link);
++
++/*
++ The attach() and detach() entry points are used to create and destroy
++ "instances" of the driver, where each instance represents everything
++ needed to manage one actual PCMCIA card.
++*/
++
++static void acx_cs_detach(struct pcmcia_device *p_dev);
++
++/*
++ You'll also need to prototype all the functions that will actually
++ be used to talk to your device. See 'pcmem_cs' for a good example
++ of a fully self-sufficient driver; the other drivers rely more or
++ less on other parts of the kernel.
++*/
++
++/*
++ A linked list of "instances" of the acxnet device. Each actual
++ PCMCIA card corresponds to one device instance, and is described
++ by one struct pcmcia_device structure (defined in ds.h).
++
++ You may not want to use a linked list for this -- for example, the
++ memory card driver uses an array of struct pcmcia_device pointers, where minor
++ device numbers are used to derive the corresponding array index.
++*/
++
++/*
++ A driver needs to provide a dev_node_t structure for each device
++ on a card. In some cases, there is only one device per card (for
++ example, ethernet cards, modems). In other cases, there may be
++ many actual or logical devices (SCSI adapters, memory cards with
++ multiple partitions). The dev_node_t structures need to be kept
++ in a linked list starting at the 'dev' field of a struct pcmcia_device
++ structure. We allocate them in the card's private data structure,
++ because they generally shouldn't be allocated dynamically.
++
++ In this case, we also provide a flag to indicate if a device is
++ "stopped" due to a power management event, or card ejection. The
++ device IO routines can use a flag like this to throttle IO to a
++ card that is not ready to accept it.
++*/
++
++
++/*======================================================================
++
++ acx_attach() creates an "instance" of the driver, allocating
++ local data structures for one device. The device is registered
++ with Card Services.
++
++ The dev_link structure is initialized, but we don't actually
++ configure the card at this point -- we wait until we receive a
++ card insertion event.
++
++ ======================================================================*/
++
++static int acx_cs_probe(struct pcmcia_device *link)
++{
++ local_info_t *local;
++ struct net_device *ndev;
++
++ DEBUG(0, "acx_attach()\n");
++
++ ndev = alloc_netdev(sizeof(acx_device_t), "wlan%d", dummy_netdev_init);
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ return -ENOMEM;
++ }
++
++ /* Interrupt setup */
++ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
++ link->irq.IRQInfo1 = IRQ_LEVEL_ID;
++ link->irq.Handler = acxmem_i_interrupt;
++ link->irq.Instance = ndev;
++
++ /*
++ General socket configuration defaults can go here. In this
++ client, we assume very little, and rely on the CIS for almost
++ everything. In most clients, many details (i.e., number, sizes,
++ and attributes of IO windows) are fixed by the nature of the
++ device, and can be hard-wired here.
++ */
++ link->conf.Attributes = CONF_ENABLE_IRQ;
++ link->conf.IntType = INT_MEMORY_AND_IO;
++ link->conf.Present = PRESENT_OPTION | PRESENT_COPY;
++
++ /* Allocate space for private device-specific data */
++ local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
++ if (!local) {
++ printk(KERN_ERR "acx_cs: no memory for new device\n");
++ return -ENOMEM;
++ }
++ local->ndev = ndev;
++
++ link->priv = local;
++
++ return acx_cs_config(link);
++} /* acx_attach */
++
++/*======================================================================
++
++ This deletes a driver "instance". The device is de-registered
++ with Card Services. If it has been released, all local data
++ structures are freed. Otherwise, the structures will be freed
++ when the device is released.
++
++ ======================================================================*/
++
++static void acx_cs_detach(struct pcmcia_device *link)
++{
++ DEBUG(0, "acx_detach(0x%p)\n", link);
++
++
++ if ( ((local_info_t*)link->priv)->ndev ) {
++ acxmem_e_close( ((local_info_t*)link->priv)->ndev );
++ }
++
++ acx_cs_release(link);
++
++ ((local_info_t*)link->priv)->ndev = NULL;
++
++ kfree(link->priv);
++} /* acx_detach */
++
++/*======================================================================
++
++ acx_config() is scheduled to run after a CARD_INSERTION event
++ is received, to configure the PCMCIA socket, and to make the
++ device available to the system.
++
++ ======================================================================*/
++
++#define CS_CHECK(fn, ret) \
++do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
++
++static int acx_cs_config(struct pcmcia_device *link)
++{
++ tuple_t tuple;
++ cisparse_t parse;
++ local_info_t *local = link->priv;
++ int last_fn, last_ret;
++ u_char buf[64];
++ win_req_t req;
++ memreq_t map;
++// int i;
++// acx_device_t *adev;
++
++// adev = (acx_device_t *)link->priv;
++
++ DEBUG(0, "acx_cs_config(0x%p)\n", link);
++
++ /*
++ In this loop, we scan the CIS for configuration table entries,
++ each of which describes a valid card configuration, including
++ voltage, IO window, memory window, and interrupt settings.
++
++ We make no assumptions about the card to be configured: we use
++ just the information available in the CIS. In an ideal world,
++ this would work for any PCMCIA card, but it requires a complete
++ and accurate CIS. In practice, a driver usually "knows" most of
++ these things without consulting the CIS, and most client drivers
++ will only use the CIS to fill in implementation-defined details.
++ */
++ tuple.Attributes = 0;
++ tuple.TupleData = (cisdata_t *)buf;
++ tuple.TupleDataMax = sizeof(buf);
++ tuple.TupleOffset = 0;
++ tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
++
++ /* don't trust the CIS on this; Linksys got it wrong */
++ //link->conf.Present = 0x63;
++
++ CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
++ while (1) {
++ cistpl_cftable_entry_t dflt = { 0 };
++ cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
++ if (pcmcia_get_tuple_data(link, &tuple) != 0 ||
++ pcmcia_parse_tuple(link, &tuple, &parse) != 0)
++ goto next_entry;
++
++ if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
++ if (cfg->index == 0) goto next_entry;
++ link->conf.ConfigIndex = cfg->index;
++
++ /* Does this card need audio output? */
++ if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
++ link->conf.Attributes |= CONF_ENABLE_SPKR;
++ link->conf.Status = CCSR_AUDIO_ENA;
++ }
++
++ /* Use power settings for Vcc and Vpp if present */
++ /* Note that the CIS values need to be rescaled */
++ if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
++ link->conf.Vpp =
++ cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
++ else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
++ link->conf.Vpp =
++ dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
++
++ /* Do we need to allocate an interrupt? */
++ if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1)
++ link->conf.Attributes |= CONF_ENABLE_IRQ;
++ if ((cfg->mem.nwin > 0) || (dflt.mem.nwin > 0)) {
++ cistpl_mem_t *mem =
++ (cfg->mem.nwin) ? &cfg->mem : &dflt.mem;
++// req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_AM|WIN_ENABLE|WIN_USE_WAIT;
++ req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM|WIN_ENABLE|WIN_USE_WAIT;
++ req.Base = mem->win[0].host_addr;
++ req.Size = mem->win[0].len;
++ req.Size=0x1000;
++ req.AccessSpeed = 0;
++ if (pcmcia_request_window(&link, &req, &link->win) != 0)
++ goto next_entry;
++ map.Page = 0; map.CardOffset = mem->win[0].card_addr;
++ if (pcmcia_map_mem_page(link->win, &map) != 0)
++ goto next_entry;
++ else
++ printk(KERN_INFO "MEMORY WINDOW FOUND!!!\n");
++ }
++ /* If we got this far, we're cool! */
++ break;
++
++ next_entry:
++ CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(link, &tuple));
++ }
++
++ if (link->conf.Attributes & CONF_ENABLE_IRQ) {
++ printk(KERN_INFO "requesting Irq...\n");
++ CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
++ }
++
++ /*
++ This actually configures the PCMCIA socket -- setting up
++ the I/O windows and the interrupt mapping, and putting the
++ card and host interface into "Memory and IO" mode.
++ */
++ CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
++ DEBUG(0,"RequestConfiguration OK\n");
++
++
++ memwin.Base=req.Base;
++ memwin.Size=req.Size;
++
++ acx_init_netdev(local->ndev, &link->dev, memwin.Base, memwin.Size, link->irq.AssignedIRQ);
++
++#if 1
++ /*
++ At this point, the dev_node_t structure(s) need to be
++ initialized and arranged in a linked list at link->dev_node.
++ */
++ strcpy(local->node.dev_name, local->ndev->name );
++ local->node.major = local->node.minor = 0;
++ link->dev_node = &local->node;
++
++ /* Finally, report what we've done */
++ printk(KERN_INFO "%s: index 0x%02x: ",
++ local->ndev->name, link->conf.ConfigIndex);
++#endif
++ if (link->conf.Attributes & CONF_ENABLE_IRQ)
++ printk("irq %d", link->irq.AssignedIRQ);
++ if (link->io.NumPorts1)
++ printk(", io 0x%04x-0x%04x", link->io.BasePort1,
++ link->io.BasePort1+link->io.NumPorts1-1);
++ if (link->io.NumPorts2)
++ printk(" & 0x%04x-0x%04x", link->io.BasePort2,
++ link->io.BasePort2+link->io.NumPorts2-1);
++ if (link->win)
++ printk(", mem 0x%06lx-0x%06lx\n", req.Base,
++ req.Base+req.Size-1);
++ return 0;
++
++ cs_failed:
++ cs_error(link, last_fn, last_ret);
++ acx_cs_release(link);
++ return -ENODEV;
++} /* acx_config */
++
++/*======================================================================
++
++ After a card is removed, acx_release() will unregister the
++ device, and release the PCMCIA configuration. If the device is
++ still open, this will be postponed until it is closed.
++
++ ======================================================================*/
++
++static void acx_cs_release(struct pcmcia_device *link)
++{
++ DEBUG(0, "acx_release(0x%p)\n", link);
++ acxmem_e_remove(link);
++ pcmcia_disable_device(link);
++}
++
++static int acx_cs_suspend(struct pcmcia_device *link)
++{
++ local_info_t *local = link->priv;
++
++ pm_message_t state;
++ acxmem_e_suspend ( local->ndev, state);
++ /* Already done in suspend
++ * netif_device_detach(local->ndev); */
++
++ return 0;
++}
++
++static int acx_cs_resume(struct pcmcia_device *link)
++{
++ local_info_t *local = link->priv;
++
++ FN_ENTER;
++ resume_ndev = local->ndev;
++
++ schedule_work( &fw_resume_work );
++
++ /* Already done in suspend
++ if (link->open) {
++ // do we need reset for ACX, if so what function nane is ?
++ //reset_acx_card(local->eth_dev);
++ netif_device_attach(local->ndev);
++ } */
++
++ FN_EXIT0;
++ return 0;
++}
++
++static struct pcmcia_device_id acx_ids[] = {
++ PCMCIA_DEVICE_MANF_CARD(0x0097, 0x8402),
++ PCMCIA_DEVICE_MANF_CARD(0x0250, 0xb001),
++ PCMCIA_DEVICE_NULL,
++};
++MODULE_DEVICE_TABLE(pcmcia, acx_ids);
++
++static struct pcmcia_driver acx_driver = {
++ .owner = THIS_MODULE,
++ .drv = {
++ .name = "acx_cs",
++ },
++ .probe = acx_cs_probe,
++ .remove = acx_cs_detach,
++ .id_table = acx_ids,
++ .suspend = acx_cs_suspend,
++ .resume = acx_cs_resume,
++};
++
++int acx_cs_init(void)
++{
++ /* return success if at least one succeeded */
++ DEBUG(0, "acxcs_init()\n");
++ return pcmcia_register_driver(&acx_driver);
++}
++
++void acx_cs_cleanup(void)
++{
++ pcmcia_unregister_driver(&acx_driver);
++}
++
++/*
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License
++ as published by the Free Software Foundation; either version 2
++ of the License, or (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ In addition:
++
++ Redistribution and use in source and binary forms, with or without
++ modification, are permitted provided that the following conditions
++ are met:
++
++ 1. Redistributions of source code must retain the above copyright
++ notice, this list of conditions and the following disclaimer.
++ 2. Redistributions in binary form must reproduce the above copyright
++ notice, this list of conditions and the following disclaimer in the
++ documentation and/or other materials provided with the distribution.
++ 3. The name of the author may not be used to endorse or promote
++ products derived from this software without specific prior written
++ permission.
++
++ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
++ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
++ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
++ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
++ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ POSSIBILITY OF SUCH DAMAGE.
++*/
++
++MODULE_DESCRIPTION( "ACX Cardbus Driver" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/htcsable_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/htcsable_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,118 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HTC Sable
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <linux/mfd/asic3_base.h>
++#include <asm/arch/htcsable-gpio.h>
++#include <asm/arch/htcsable-asic.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_BASE PXA_CS2_PHYS
++
++/*
++off: b15 c8 d3
++on: d3 c8 b5 b5-
++*/
++
++#define GPIO_NR_HTCSABLE_ACX111 111
++
++static int
++htcsable_wlan_stop( void );
++
++static int
++htcsable_wlan_start( void )
++{
++ printk( "htcsable_wlan_start\n" );
++
++ /*asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 0);*/
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_PWR_3, 1<<GPIOC_ACX_PWR_3); /* related to acx */
++ SET_HTCSABLE_GPIO(ACX111, 1);
++ asic3_set_gpio_out_b(&htcsable_asic3.dev, 1<<GPIOB_ACX_PWR_1, 1<<GPIOB_ACX_PWR_1);
++ asic3_set_gpio_out_d(&htcsable_asic3.dev, 1<<GPIOD_ACX_PWR_2, 1<<GPIOD_ACX_PWR_2);
++ mdelay(260);
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 1<<GPIOC_ACX_RESET);
++
++ return 0;
++}
++
++static int
++htcsable_wlan_stop( void )
++{
++ printk( "htcsable_wlan_stop\n" );
++ asic3_set_gpio_out_b(&htcsable_asic3.dev, 1<<GPIOB_ACX_PWR_1, 0);
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_RESET, 0);
++ asic3_set_gpio_out_d(&htcsable_asic3.dev, 1<<GPIOD_ACX_PWR_2, 0);
++ SET_HTCSABLE_GPIO(ACX111, 0); /* not necessary to power down this one? */
++ asic3_set_gpio_out_c(&htcsable_asic3.dev, 1<<GPIOC_ACX_PWR_3, 0); /* not necessary to power down this one? */
++
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++// .start = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++// .end = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = htcsable_wlan_start,
++ .stop_hw = htcsable_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++htcsable_wlan_init( void )
++{
++ printk( "htcsable_wlan_init: acx-mem platform_device_register\n" );
++ acx_device.resource[1].start = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOB_IRQ_BASE+GPIOB_ACX_IRQ_N;
++ acx_device.resource[1].end = asic3_irq_base(&htcsable_asic3.dev) + ASIC3_GPIOB_IRQ_BASE+GPIOB_ACX_IRQ_N;
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++htcsable_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( htcsable_wlan_init );
++module_exit( htcsable_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for HTC Sable" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/htcuniversal_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/htcuniversal_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,108 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HTC Universal
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_BASE PXA_CS2_PHYS
++
++
++static int
++htcuniversal_wlan_start( void )
++{
++ htcuniversal_egpio_enable(1<<EGPIO6_WIFI_ON);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_PWR1_ON, 1<<GPIOC_WIFI_PWR1_ON);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR3_ON, 1<<GPIOD_WIFI_PWR3_ON);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR2_ON, 1<<GPIOD_WIFI_PWR2_ON);
++ mdelay(100);
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 0);
++ mdelay(100);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 1<<GPIOC_WIFI_RESET);
++ mdelay(100);
++ return 0;
++}
++
++static int
++htcuniversal_wlan_stop( void )
++{
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_RESET, 0);
++
++ htcuniversal_egpio_disable(1<<EGPIO6_WIFI_ON);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_WIFI_PWR1_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR2_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_WIFI_PWR3_ON, 0);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++// .start = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++// .end = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = htcuniversal_wlan_start,
++ .stop_hw = htcuniversal_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++htcuniversal_wlan_init( void )
++{
++ printk( "htcuniversal_wlan_init: acx-mem platform_device_register\n" );
++ acx_device.resource[1].start = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N;
++ acx_device.resource[1].end = asic3_irq_base(&htcuniversal_asic3.dev) + ASIC3_GPIOC_IRQ_BASE+GPIOC_WIFI_IRQ_N;
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++htcuniversal_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( htcuniversal_wlan_init );
++module_exit( htcuniversal_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for HTC Universal" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/hx4700_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/hx4700_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,108 @@
++/*
++ * WLAN (TI TNETW1100B) support in the hx470x.
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/leds.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/hx4700-gpio.h>
++#include <asm/arch/hx4700-core.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++#define WLAN_OFFSET 0x1000000
++#define WLAN_BASE (PXA_CS5_PHYS+WLAN_OFFSET)
++
++
++static int
++hx4700_wlan_start( void )
++{
++ SET_HX4700_GPIO( WLAN_RESET_N, 0 );
++ mdelay(5);
++ hx4700_egpio_enable( EGPIO0_VCC_3V3_EN );
++ mdelay(100);
++ hx4700_egpio_enable( EGPIO7_VCC_3V3_WL_EN );
++ mdelay(150);
++ hx4700_egpio_enable( EGPIO1_WL_VREG_EN | EGPIO2_VCC_2V1_WL_EN |
++ EGPIO6_WL1V8_EN );
++ mdelay(10);
++ SET_HX4700_GPIO( WLAN_RESET_N, 1 );
++ mdelay(50);
++ led_trigger_event_shared(hx4700_radio_trig, LED_FULL);
++ return 0;
++}
++
++static int
++hx4700_wlan_stop( void )
++{
++ hx4700_egpio_disable( EGPIO0_VCC_3V3_EN | EGPIO1_WL_VREG_EN |
++ EGPIO7_VCC_3V3_WL_EN | EGPIO2_VCC_2V1_WL_EN |
++ EGPIO6_WL1V8_EN );
++ SET_HX4700_GPIO( WLAN_RESET_N, 0 );
++ led_trigger_event_shared(hx4700_radio_trig, LED_OFF);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = WLAN_BASE,
++ .end = WLAN_BASE + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = HX4700_IRQ(WLAN_IRQ_N),
++ .end = HX4700_IRQ(WLAN_IRQ_N),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = hx4700_wlan_start,
++ .stop_hw = hx4700_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE( acx_resources ),
++ .resource = acx_resources,
++};
++
++static int __init
++hx4700_wlan_init( void )
++{
++ printk( "hx4700_wlan_init: acx-mem platform_device_register\n" );
++ return platform_device_register( &acx_device );
++}
++
++
++static void __exit
++hx4700_wlan_exit( void )
++{
++ platform_device_unregister( &acx_device );
++}
++
++module_init( hx4700_wlan_init );
++module_exit( hx4700_wlan_exit );
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "WLAN driver for iPAQ hx4700" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/ioctl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/ioctl.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,2748 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/kernel.h>
++#include <linux/types.h>
++#include <asm/io.h>
++/* #include <asm/uaccess.h> */ /* required for 2.4.x kernels; verify_write() */
++#include <linux/if_arp.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++
++/* channel frequencies
++ * TODO: Currently, every other 802.11 driver keeps its own copy of this. In
++ * the long run this should be integrated into ieee802_11.h or wireless.h or
++ * whatever IEEE802.11x framework evolves */
++static const u16 acx_channel_freq[] = {
++ 2412, 2417, 2422, 2427, 2432, 2437, 2442,
++ 2447, 2452, 2457, 2462, 2467, 2472, 2484,
++};
++
++
++/***********************************************************************
++** acx_ioctl_commit
++*/
++static int
++acx_ioctl_commit(struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask)
++ acx_s_update_card_settings(adev);
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_name(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ static const char * const names[] = { "IEEE 802.11b+/g+", "IEEE 802.11b+" };
++
++ strcpy(wrqu->name, names[IS_ACX111(adev) ? 0 : 1]);
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_freq
++*/
++static int
++acx_ioctl_set_freq(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int channel = -1;
++ unsigned int mult = 1;
++ int result;
++
++ FN_ENTER;
++
++ if (wrqu->freq.e == 0 && wrqu->freq.m <= 1000) {
++ /* Setting by channel number */
++ channel = wrqu->freq.m;
++ } else {
++ /* If setting by frequency, convert to a channel */
++ int i;
++
++ for (i = 0; i < (6 - wrqu->freq.e); i++)
++ mult *= 10;
++
++ for (i = 1; i <= 14; i++)
++ if (wrqu->freq.m == acx_channel_freq[i - 1] * mult)
++ channel = i;
++ }
++
++ if (channel > 14) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->channel = channel;
++ /* hmm, the following code part is strange, but this is how
++ * it was being done before... */
++ log(L_IOCTL, "Changing to channel %d\n", channel);
++ SET_BIT(adev->set_mask, GETSET_CHANNEL);
++
++ result = -EINPROGRESS; /* need to call commit handler */
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static inline int
++acx_ioctl_get_freq(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ wrqu->freq.e = 0;
++ wrqu->freq.m = adev->channel;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_mode
++*/
++static int
++acx_ioctl_set_mode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ switch (wrqu->mode) {
++ case IW_MODE_AUTO:
++ adev->mode = ACX_MODE_OFF;
++ break;
++ case IW_MODE_MONITOR:
++ adev->mode = ACX_MODE_MONITOR;
++ break;
++ case IW_MODE_ADHOC:
++ adev->mode = ACX_MODE_0_ADHOC;
++ break;
++ case IW_MODE_INFRA:
++ adev->mode = ACX_MODE_2_STA;
++ break;
++ case IW_MODE_MASTER:
++ printk("acx: master mode (HostAP) is very, very "
++ "experimental! It might work partially, but "
++ "better get prepared for nasty surprises "
++ "at any time\n");
++ adev->mode = ACX_MODE_3_AP;
++ break;
++ case IW_MODE_REPEAT:
++ case IW_MODE_SECOND:
++ default:
++ result = -EOPNOTSUPP;
++ goto end_unlock;
++ }
++
++ log(L_ASSOC, "new adev->mode=%d\n", adev->mode);
++ SET_BIT(adev->set_mask, GETSET_MODE);
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_mode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = 0;
++
++ switch (adev->mode) {
++ case ACX_MODE_OFF:
++ wrqu->mode = IW_MODE_AUTO; break;
++ case ACX_MODE_MONITOR:
++ wrqu->mode = IW_MODE_MONITOR; break;
++ case ACX_MODE_0_ADHOC:
++ wrqu->mode = IW_MODE_ADHOC; break;
++ case ACX_MODE_2_STA:
++ wrqu->mode = IW_MODE_INFRA; break;
++ case ACX_MODE_3_AP:
++ wrqu->mode = IW_MODE_MASTER; break;
++ default:
++ result = -EOPNOTSUPP;
++ }
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_sens(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->sens;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ adev->sensitivity = (1 == vwrq->disabled) ? 0 : vwrq->value;
++ SET_BIT(adev->set_mask, GETSET_SENSITIVITY);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_sens(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->sens;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ if (IS_USB(adev))
++ /* setting the PHY reg via fw cmd doesn't work yet */
++ return -EOPNOTSUPP;
++
++ /* acx_sem_lock(adev); */
++
++ vwrq->value = adev->sensitivity;
++ vwrq->disabled = (vwrq->value == 0);
++ vwrq->fixed = 1;
++
++ /* acx_sem_unlock(adev); */
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_ap
++**
++** Sets the MAC address of the AP to associate with
++*/
++static int
++acx_ioctl_set_ap(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct sockaddr *awrq = &wrqu->ap_addr;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = 0;
++ const u8 *ap;
++
++ FN_ENTER;
++ if (NULL == awrq) {
++ result = -EFAULT;
++ goto end;
++ }
++ if (ARPHRD_ETHER != awrq->sa_family) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ ap = awrq->sa_data;
++ acxlog_mac(L_IOCTL, "set AP=", ap, "\n");
++
++ MAC_COPY(adev->ap, ap);
++
++ /* We want to start rescan in managed or ad-hoc mode,
++ ** otherwise just set adev->ap.
++ ** "iwconfig <if> ap <mac> mode managed": we must be able
++ ** to set ap _first_ and _then_ set mode */
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* FIXME: if there is a convention on what zero AP means,
++ ** please add a comment about that. I don't know of any --vda */
++ if (mac_is_zero(ap)) {
++ /* "off" == 00:00:00:00:00:00 */
++ MAC_BCAST(adev->ap);
++ log(L_IOCTL, "Not reassociating\n");
++ } else {
++ log(L_IOCTL, "Forcing reassociation\n");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ break;
++ }
++ result = -EINPROGRESS;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_ap(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct sockaddr *awrq = &wrqu->ap_addr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ if (ACX_STATUS_4_ASSOCIATED == adev->status) {
++ /* as seen in Aironet driver, airo.c */
++ MAC_COPY(awrq->sa_data, adev->bssid);
++ } else {
++ MAC_ZERO(awrq->sa_data);
++ }
++ awrq->sa_family = ARPHRD_ETHER;
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_aplist
++**
++** Deprecated in favor of iwscan.
++** We simply return the list of currently available stations in range,
++** don't do a new scan.
++*/
++static int
++acx_ioctl_get_aplist(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ struct sockaddr *address = (struct sockaddr *) extra;
++ struct iw_quality qual[IW_MAX_AP];
++ int i, cur;
++ int result = OK;
++
++ FN_ENTER;
++
++ /* we have AP list only in STA mode */
++ if (ACX_MODE_2_STA != adev->mode) {
++ result = -EOPNOTSUPP;
++ goto end;
++ }
++
++ cur = 0;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ MAC_COPY(address[cur].sa_data, bss->bssid);
++ address[cur].sa_family = ARPHRD_ETHER;
++ qual[cur].level = bss->sir;
++ qual[cur].noise = bss->snr;
++#ifndef OLD_QUALITY
++ qual[cur].qual = acx_signal_determine_quality(qual[cur].level,
++ qual[cur].noise);
++#else
++ qual[cur].qual = (qual[cur].noise <= 100) ?
++ 100 - qual[cur].noise : 0;
++#endif
++ /* no scan: level/noise/qual not updated: */
++ qual[cur].updated = 0;
++ cur++;
++ }
++ if (cur) {
++ dwrq->flags = 1;
++ memcpy(extra + sizeof(struct sockaddr)*cur, &qual,
++ sizeof(struct iw_quality)*cur);
++ }
++ dwrq->length = cur;
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_scan(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* don't start scan if device is not up yet */
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ result = -EAGAIN;
++ goto end_unlock;
++ }
++
++ /* This is NOT a rescan for new AP!
++ ** Do not use SET_BIT(GETSET_RESCAN); */
++ acx_s_cmd_start_scan(adev);
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++/* end: */
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_s_scan_add_station
++*/
++/* helper. not sure whether it's really a _s_leeping fn */
++static char*
++acx_s_scan_add_station(
++ acx_device_t *adev,
++ char *ptr,
++ char *end_buf,
++ struct client *bss)
++{
++ struct iw_event iwe;
++ char *ptr_rate;
++
++ FN_ENTER;
++
++ /* MAC address has to be added first */
++ iwe.cmd = SIOCGIWAP;
++ iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
++ MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
++ acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
++
++ /* Add ESSID */
++ iwe.cmd = SIOCGIWESSID;
++ iwe.u.data.length = bss->essid_len;
++ iwe.u.data.flags = 1;
++ log(L_IOCTL, "scan, essid: %s\n", bss->essid);
++ ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
++
++ /* Add mode */
++ iwe.cmd = SIOCGIWMODE;
++ if (bss->cap_info & (WF_MGMT_CAP_ESS | WF_MGMT_CAP_IBSS)) {
++ if (bss->cap_info & WF_MGMT_CAP_ESS)
++ iwe.u.mode = IW_MODE_MASTER;
++ else
++ iwe.u.mode = IW_MODE_ADHOC;
++ log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
++ }
++
++ /* Add frequency */
++ iwe.cmd = SIOCGIWFREQ;
++ iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
++ iwe.u.freq.e = 1;
++ log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
++
++ /* Add link quality */
++ iwe.cmd = IWEVQUAL;
++ /* FIXME: these values should be expressed in dBm, but we don't know
++ * how to calibrate it yet */
++ iwe.u.qual.level = bss->sir;
++ iwe.u.qual.noise = bss->snr;
++#ifndef OLD_QUALITY
++ iwe.u.qual.qual = acx_signal_determine_quality(iwe.u.qual.level,
++ iwe.u.qual.noise);
++#else
++ iwe.u.qual.qual = (iwe.u.qual.noise <= 100) ?
++ 100 - iwe.u.qual.noise : 0;
++#endif
++ iwe.u.qual.updated = 7;
++ log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
++ iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
++ ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
++
++ /* Add encryption */
++ iwe.cmd = SIOCGIWENCODE;
++ if (bss->cap_info & WF_MGMT_CAP_PRIVACY)
++ iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
++ else
++ iwe.u.data.flags = IW_ENCODE_DISABLED;
++ iwe.u.data.length = 0;
++ log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
++ ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
++
++ /* add rates */
++ iwe.cmd = SIOCGIWRATE;
++ iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
++ ptr_rate = ptr + IW_EV_LCP_LEN;
++
++ {
++ u16 rate = bss->rate_cap;
++ const u8* p = acx_bitpos2ratebyte;
++ while (rate) {
++ if (rate & 1) {
++ iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
++ log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
++ ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
++ &iwe, IW_EV_PARAM_LEN);
++ }
++ rate >>= 1;
++ p++;
++ }}
++
++ if ((ptr_rate - ptr) > (ptrdiff_t)IW_EV_LCP_LEN)
++ ptr = ptr_rate;
++
++ /* drop remaining station data items for now */
++
++ FN_EXIT0;
++ return ptr;
++}
++
++
++/***********************************************************************
++ * acx_ioctl_get_scan
++ */
++static int
++acx_ioctl_get_scan(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ char *ptr = extra;
++ int i;
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* no scan available if device is not up yet */
++ if (!(adev->dev_state_mask & ACX_STATE_IFACE_UP)) {
++ log(L_IOCTL, "iface not up yet\n");
++ result = -EAGAIN;
++ goto end_unlock;
++ }
++
++#ifdef ENODATA_TO_BE_USED_AFTER_SCAN_ERROR_ONLY
++ if (adev->bss_table_count == 0) {
++ /* no stations found */
++ result = -ENODATA;
++ goto end_unlock;
++ }
++#endif
++
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ struct client *bss = &adev->sta_list[i];
++ if (!bss->used) continue;
++ ptr = acx_s_scan_add_station(adev, ptr,
++ extra + IW_SCAN_MAX_DATA, bss);
++ }
++ dwrq->length = ptr - extra;
++ dwrq->flags = 0;
++
++end_unlock:
++ acx_sem_unlock(adev);
++/* end: */
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_essid
++*/
++static int
++acx_ioctl_set_essid(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->essid;
++ acx_device_t *adev = ndev2adev(ndev);
++ int len = dwrq->length;
++ int result;
++
++ FN_ENTER;
++
++ if (len < 0) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ log(L_IOCTL, "set ESSID '%*s', length %d, flags 0x%04X\n",
++ len, extra, len, dwrq->flags);
++
++#if WIRELESS_EXT >= 21
++ /* WE 21 gives real ESSID strlen, not +1 (trailing zero):
++ * see LKML "[patch] drivers/net/wireless: correct reported ssid lengths" */
++ len += 1;
++#endif
++
++ acx_sem_lock(adev);
++
++ /* ESSID disabled? */
++ if (0 == dwrq->flags) {
++ adev->essid_active = 0;
++
++ } else {
++ if (len > IW_ESSID_MAX_SIZE) {
++ result = -E2BIG;
++ goto end_unlock;
++ }
++
++ if (len >= sizeof(adev->essid))
++ len = sizeof(adev->essid) - 1;
++ memcpy(adev->essid, extra, len);
++ adev->essid[len] = '\0';
++ /* Paranoia: just in case there is a '\0'... */
++ adev->essid_len = strlen(adev->essid);
++ adev->essid_active = 1;
++ }
++
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_essid(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->essid;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ dwrq->flags = adev->essid_active;
++ if (adev->essid_active) {
++ memcpy(extra, adev->essid, adev->essid_len);
++ extra[adev->essid_len] = '\0';
++ dwrq->length = adev->essid_len + 1;
++ dwrq->flags = 1;
++ }
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_l_update_client_rates
++*/
++static void
++acx_l_update_client_rates(acx_device_t *adev, u16 rate)
++{
++ int i;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ clt->rate_cfg = (clt->rate_cap & rate);
++ if (!clt->rate_cfg) {
++ /* no compatible rates left: kick client */
++ acxlog_mac(L_ASSOC, "client ",clt->address," kicked: "
++ "rates are not compatible anymore\n");
++ acx_l_sta_list_del(adev, clt);
++ continue;
++ }
++ clt->rate_cur &= clt->rate_cfg;
++ if (!clt->rate_cur) {
++ /* current rate become invalid, choose a valid one */
++ clt->rate_cur = 1 << lowest_bit(clt->rate_cfg);
++ }
++ if (IS_ACX100(adev))
++ clt->rate_100 = acx_bitpos2rate100[highest_bit(clt->rate_cur)];
++ clt->fallback_count = clt->stepup_count = 0;
++ clt->ignore_count = 16;
++ }
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ if (adev->ap_client && !adev->ap_client->used) {
++ /* Owwww... we kicked our AP!! :) */
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ }
++}
++
++
++/***********************************************************************
++*/
++/* maps bits from acx111 rate to rate in Mbits */
++static const unsigned int
++acx111_rate_tbl[] = {
++ 1000000, /* 0 */
++ 2000000, /* 1 */
++ 5500000, /* 2 */
++ 6000000, /* 3 */
++ 9000000, /* 4 */
++ 11000000, /* 5 */
++ 12000000, /* 6 */
++ 18000000, /* 7 */
++ 22000000, /* 8 */
++ 24000000, /* 9 */
++ 36000000, /* 10 */
++ 48000000, /* 11 */
++ 54000000, /* 12 */
++ 500000, /* 13, should not happen */
++ 500000, /* 14, should not happen */
++ 500000, /* 15, should not happen */
++};
++
++/***********************************************************************
++ * acx_ioctl_set_rate
++ */
++static int
++acx_ioctl_set_rate(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ u16 txrate_cfg = 1;
++ unsigned long flags;
++ int autorate;
++ int result = -EINVAL;
++
++ FN_ENTER;
++ log(L_IOCTL, "rate %d fixed 0x%X disabled 0x%X flags 0x%X\n",
++ vwrq->value, vwrq->fixed, vwrq->disabled, vwrq->flags);
++
++ if ((0 == vwrq->fixed) || (1 == vwrq->fixed)) {
++ int i = VEC_SIZE(acx111_rate_tbl)-1;
++ if (vwrq->value == -1)
++ /* "iwconfig rate auto" --> choose highest */
++ vwrq->value = IS_ACX100(adev) ? 22000000 : 54000000;
++ while (i >= 0) {
++ if (vwrq->value == acx111_rate_tbl[i]) {
++ txrate_cfg <<= i;
++ i = 0;
++ break;
++ }
++ i--;
++ }
++ if (i == -1) { /* no matching rate */
++ result = -EINVAL;
++ goto end;
++ }
++ } else { /* rate N, N<1000 (driver specific): we don't use this */
++ result = -EOPNOTSUPP;
++ goto end;
++ }
++ /* now: only one bit is set in txrate_cfg, corresponding to
++ ** indicated rate */
++
++ autorate = (vwrq->fixed == 0) && (RATE111_1 != txrate_cfg);
++ if (autorate) {
++ /* convert 00100000 -> 00111111 */
++ txrate_cfg = (txrate_cfg<<1)-1;
++ }
++
++ if (IS_ACX100(adev)) {
++ txrate_cfg &= RATE111_ACX100_COMPAT;
++ if (!txrate_cfg) {
++ result = -ENOTSUPP; /* rate is not supported by acx100 */
++ goto end;
++ }
++ }
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ adev->rate_auto = autorate;
++ adev->rate_oper = txrate_cfg;
++ adev->rate_basic = txrate_cfg;
++ /* only do that in auto mode, non-auto will be able to use
++ * one specific Tx rate only anyway */
++ if (autorate) {
++ /* only use 802.11b base rates, for standard 802.11b H/W
++ * compatibility */
++ adev->rate_basic &= RATE111_80211B_COMPAT;
++ }
++ adev->rate_bcast = 1 << lowest_bit(txrate_cfg);
++ if (IS_ACX100(adev))
++ adev->rate_bcast100 = acx_rate111to100(adev->rate_bcast);
++ acx_l_update_ratevector(adev);
++ acx_l_update_client_rates(adev, txrate_cfg);
++
++ /* Do/don't do tx rate fallback; beacon contents and rate */
++ SET_BIT(adev->set_mask, SET_RATE_FALLBACK|SET_TEMPLATES);
++ result = -EINPROGRESS;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_rate
++*/
++static int
++acx_ioctl_get_rate(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 rate;
++
++ acx_lock(adev, flags);
++ rate = adev->rate_oper;
++ if (adev->ap_client)
++ rate = adev->ap_client->rate_cur;
++ vwrq->value = acx111_rate_tbl[highest_bit(rate)];
++ vwrq->fixed = !adev->rate_auto;
++ vwrq->disabled = 0;
++ acx_unlock(adev, flags);
++
++ return OK;
++}
++
++static int
++acx_ioctl_set_rts(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->rts;
++ acx_device_t *adev = ndev2adev(ndev);
++ int val = vwrq->value;
++
++ if (vwrq->disabled)
++ val = 2312;
++ if ((val < 0) || (val > 2312))
++ return -EINVAL;
++
++ adev->rts_threshold = val;
++ return OK;
++}
++
++static inline int
++acx_ioctl_get_rts(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->rts;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ vwrq->value = adev->rts_threshold;
++ vwrq->disabled = (vwrq->value >= 2312);
++ vwrq->fixed = 1;
++ return OK;
++}
++
++
++#if ACX_FRAGMENTATION
++static int
++acx_ioctl_set_frag(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int val = vwrq->value;
++
++ if (vwrq->disabled)
++ val = 32767;
++ else
++ if ((val < 256) || (val > 2347))
++ return -EINVAL;
++
++ adev->frag_threshold = val;
++ return OK;
++}
++
++static inline int
++acx_ioctl_get_frag(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->frag;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ vwrq->value = adev->frag_threshold;
++ vwrq->disabled = (vwrq->value >= 2347);
++ vwrq->fixed = 1;
++ return OK;
++}
++#endif
++
++
++/***********************************************************************
++** acx_ioctl_set_encode
++*/
++static int
++acx_ioctl_set_encode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->encoding;
++ acx_device_t *adev = ndev2adev(ndev);
++ int index;
++ int result;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set encoding flags=0x%04X, size=%d, key: %s\n",
++ dwrq->flags, dwrq->length, extra ? "set" : "No key");
++
++ acx_sem_lock(adev);
++
++ index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
++
++ if (dwrq->length > 0) {
++ /* if index is 0 or invalid, use default key */
++ if ((index < 0) || (index > 3))
++ index = (int)adev->wep_current_index;
++
++ if (0 == (dwrq->flags & IW_ENCODE_NOKEY)) {
++ if (dwrq->length > 29)
++ dwrq->length = 29; /* restrict it */
++
++ if (dwrq->length > 13) {
++ /* 29*8 == 232, WEP256 */
++ adev->wep_keys[index].size = 29;
++ } else if (dwrq->length > 5) {
++ /* 13*8 == 104bit, WEP128 */
++ adev->wep_keys[index].size = 13;
++ } else if (dwrq->length > 0) {
++ /* 5*8 == 40bit, WEP64 */
++ adev->wep_keys[index].size = 5;
++ } else {
++ /* disable key */
++ adev->wep_keys[index].size = 0;
++ }
++
++ memset(adev->wep_keys[index].key, 0,
++ sizeof(adev->wep_keys[index].key));
++ memcpy(adev->wep_keys[index].key, extra, dwrq->length);
++ }
++ } else {
++ /* set transmit key */
++ if ((index >= 0) && (index <= 3))
++ adev->wep_current_index = index;
++ else if (0 == (dwrq->flags & IW_ENCODE_MODE)) {
++ /* complain if we were not just setting
++ * the key mode */
++ result = -EINVAL;
++ goto end_unlock;
++ }
++ }
++
++ adev->wep_enabled = !(dwrq->flags & IW_ENCODE_DISABLED);
++
++ if (dwrq->flags & IW_ENCODE_OPEN) {
++ adev->auth_alg = WLAN_AUTH_ALG_OPENSYSTEM;
++ adev->wep_restricted = 0;
++
++ } else if (dwrq->flags & IW_ENCODE_RESTRICTED) {
++ adev->auth_alg = WLAN_AUTH_ALG_SHAREDKEY;
++ adev->wep_restricted = 1;
++ }
++
++ /* set flag to make sure the card WEP settings get updated */
++ SET_BIT(adev->set_mask, GETSET_WEP);
++
++ log(L_IOCTL, "len=%d, key at 0x%p, flags=0x%X\n",
++ dwrq->length, extra, dwrq->flags);
++
++ for (index = 0; index <= 3; index++) {
++ if (adev->wep_keys[index].size) {
++ log(L_IOCTL, "index=%d, size=%d, key at 0x%p\n",
++ adev->wep_keys[index].index,
++ (int) adev->wep_keys[index].size,
++ adev->wep_keys[index].key);
++ }
++ }
++ result = -EINPROGRESS;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_encode
++*/
++static int
++acx_ioctl_get_encode(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->encoding;
++ acx_device_t *adev = ndev2adev(ndev);
++ int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
++
++ FN_ENTER;
++
++ if (adev->wep_enabled == 0) {
++ dwrq->flags = IW_ENCODE_DISABLED;
++ } else {
++ if ((index < 0) || (index > 3))
++ index = (int)adev->wep_current_index;
++
++ dwrq->flags = (adev->wep_restricted == 1) ?
++ IW_ENCODE_RESTRICTED : IW_ENCODE_OPEN;
++ dwrq->length = adev->wep_keys[index].size;
++
++ memcpy(extra, adev->wep_keys[index].key,
++ adev->wep_keys[index].size);
++ }
++
++ /* set the current index */
++ SET_BIT(dwrq->flags, index + 1);
++
++ log(L_IOCTL, "len=%d, key=%p, flags=0x%X\n",
++ dwrq->length, dwrq->pointer,
++ dwrq->flags);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_set_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = -EINPROGRESS;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set 802.11 powersave flags=0x%04X\n", vwrq->flags);
++
++ acx_sem_lock(adev);
++
++ if (vwrq->disabled) {
++ CLEAR_BIT(adev->ps_wakeup_cfg, PS_CFG_ENABLE);
++ SET_BIT(adev->set_mask, GETSET_POWER_80211);
++ goto end;
++ }
++ if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
++ u16 ps_timeout = (vwrq->value * 1024) / 1000;
++
++ if (ps_timeout > 255)
++ ps_timeout = 255;
++ log(L_IOCTL, "setting PS timeout value to %d time units "
++ "due to %dus\n", ps_timeout, vwrq->value);
++ adev->ps_hangover_period = ps_timeout;
++ } else if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
++ u16 ps_periods = vwrq->value / 1000000;
++
++ if (ps_periods > 255)
++ ps_periods = 255;
++ log(L_IOCTL, "setting PS period value to %d periods "
++ "due to %dus\n", ps_periods, vwrq->value);
++ adev->ps_listen_interval = ps_periods;
++ CLEAR_BIT(adev->ps_wakeup_cfg, PS_CFG_WAKEUP_MODE_MASK);
++ SET_BIT(adev->ps_wakeup_cfg, PS_CFG_WAKEUP_EACH_ITVL);
++ }
++
++ switch (vwrq->flags & IW_POWER_MODE) {
++ /* FIXME: are we doing the right thing here? */
++ case IW_POWER_UNICAST_R:
++ CLEAR_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_MULTICAST_R:
++ SET_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_ALL_R:
++ SET_BIT(adev->ps_options, PS_OPT_STILL_RCV_BCASTS);
++ break;
++ case IW_POWER_ON:
++ break;
++ default:
++ log(L_IOCTL, "unknown PS mode\n");
++ result = -EINVAL;
++ goto end;
++ }
++
++ SET_BIT(adev->ps_wakeup_cfg, PS_CFG_ENABLE);
++ SET_BIT(adev->set_mask, GETSET_POWER_80211);
++end:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx_ioctl_get_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ log(L_IOCTL, "Get 802.11 Power Save flags = 0x%04X\n", vwrq->flags);
++ vwrq->disabled = ((adev->ps_wakeup_cfg & PS_CFG_ENABLE) == 0);
++ if (vwrq->disabled)
++ goto end;
++
++ if ((vwrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
++ vwrq->value = adev->ps_hangover_period * 1000 / 1024;
++ vwrq->flags = IW_POWER_TIMEOUT;
++ } else {
++ vwrq->value = adev->ps_listen_interval * 1000000;
++ vwrq->flags = IW_POWER_PERIOD|IW_POWER_RELATIVE;
++ }
++ if (adev->ps_options & PS_OPT_STILL_RCV_BCASTS)
++ SET_BIT(vwrq->flags, IW_POWER_ALL_R);
++ else
++ SET_BIT(vwrq->flags, IW_POWER_UNICAST_R);
++end:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_txpow
++*/
++static inline int
++acx_ioctl_get_txpow(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ vwrq->flags = IW_TXPOW_DBM;
++ vwrq->disabled = 0;
++ vwrq->fixed = 1;
++ vwrq->value = adev->tx_level_dbm;
++
++ log(L_IOCTL, "get txpower:%d dBm\n", adev->tx_level_dbm);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_txpow
++*/
++static int
++acx_ioctl_set_txpow(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->power;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set txpower:%d, disabled:%d, flags:0x%04X\n",
++ vwrq->value, vwrq->disabled, vwrq->flags);
++
++ acx_sem_lock(adev);
++
++ if (vwrq->disabled != adev->tx_disabled) {
++ SET_BIT(adev->set_mask, GETSET_TX);
++ }
++
++ adev->tx_disabled = vwrq->disabled;
++ if (vwrq->value == -1) {
++ if (vwrq->disabled) {
++ adev->tx_level_dbm = 0;
++ log(L_IOCTL, "disable radio tx\n");
++ } else {
++ /* adev->tx_level_auto = 1; */
++ log(L_IOCTL, "set tx power auto (NIY)\n");
++ }
++ } else {
++ adev->tx_level_dbm = vwrq->value <= 20 ? vwrq->value : 20;
++ /* adev->tx_level_auto = 0; */
++ log(L_IOCTL, "set txpower=%d dBm\n", adev->tx_level_dbm);
++ }
++ SET_BIT(adev->set_mask, GETSET_TXPOWER);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_range
++*/
++static int
++acx_ioctl_get_range(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ struct iw_range *range = (struct iw_range *)extra;
++ acx_device_t *adev = ndev2adev(ndev);
++ int i,n;
++
++ FN_ENTER;
++
++ if (!dwrq->pointer)
++ goto end;
++
++ dwrq->length = sizeof(struct iw_range);
++ memset(range, 0, sizeof(struct iw_range));
++ n = 0;
++ for (i = 1; i <= 14; i++) {
++ if (adev->reg_dom_chanmask & (1 << (i - 1))) {
++ range->freq[n].i = i;
++ range->freq[n].m = acx_channel_freq[i - 1] * 100000;
++ range->freq[n].e = 1; /* units are MHz */
++ n++;
++ }
++ }
++ range->num_channels = n;
++ range->num_frequency = n;
++
++ range->min_rts = 0;
++ range->max_rts = 2312;
++
++#if ACX_FRAGMENTATION
++ range->min_frag = 256;
++ range->max_frag = 2312;
++#endif
++
++ range->encoding_size[0] = 5;
++ range->encoding_size[1] = 13;
++ range->encoding_size[2] = 29;
++ range->num_encoding_sizes = 3;
++ range->max_encoding_tokens = 4;
++
++ range->min_pmp = 0;
++ range->max_pmp = 5000000;
++ range->min_pmt = 0;
++ range->max_pmt = 65535 * 1000;
++ range->pmp_flags = IW_POWER_PERIOD;
++ range->pmt_flags = IW_POWER_TIMEOUT;
++ range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R;
++
++ if (IS_ACX100(adev)) { /* ACX100 has direct radio programming - arbitrary levels, so offer a lot */
++ for (i = 0; i <= IW_MAX_TXPOWER - 1; i++)
++ range->txpower[i] = 20 * i / (IW_MAX_TXPOWER - 1);
++ range->num_txpower = IW_MAX_TXPOWER;
++ range->txpower_capa = IW_TXPOW_DBM;
++ }
++ else {
++ int count = min(IW_MAX_TXPOWER, (int)adev->cfgopt_power_levels.len);
++ for (i = 0; i <= count; i++)
++ range->txpower[i] = adev->cfgopt_power_levels.list[i];
++ range->num_txpower = count;
++ /* this list is given in mW */
++ range->txpower_capa = IW_TXPOW_MWATT;
++ }
++
++ range->we_version_compiled = WIRELESS_EXT;
++ range->we_version_source = 0x9;
++
++ range->retry_capa = IW_RETRY_LIMIT;
++ range->retry_flags = IW_RETRY_LIMIT;
++ range->min_retry = 1;
++ range->max_retry = 255;
++
++ range->r_time_flags = IW_RETRY_LIFETIME;
++ range->min_r_time = 0;
++ /* FIXME: lifetime ranges and orders of magnitude are strange?? */
++ range->max_r_time = 65535;
++
++ if (IS_USB(adev))
++ range->sensitivity = 0;
++ else if (IS_ACX111(adev))
++ range->sensitivity = 3;
++ else
++ range->sensitivity = 255;
++
++ for (i=0; i < adev->rate_supported_len; i++) {
++ range->bitrate[i] = (adev->rate_supported[i] & ~0x80) * 500000;
++ /* never happens, but keep it, to be safe: */
++ if (range->bitrate[i] == 0)
++ break;
++ }
++ range->num_bitrates = i;
++
++ range->max_qual.qual = 100;
++ range->max_qual.level = 100;
++ range->max_qual.noise = 100;
++ /* TODO: better values */
++ range->avg_qual.qual = 90;
++ range->avg_qual.level = 80;
++ range->avg_qual.noise = 2;
++
++end:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** Private functions
++*/
++
++/***********************************************************************
++** acx_ioctl_get_nick
++*/
++static inline int
++acx_ioctl_get_nick(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ strcpy(extra, adev->nick);
++ dwrq->length = strlen(extra) + 1;
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_nick
++*/
++static int
++acx_ioctl_set_nick(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_point *dwrq = &wrqu->data;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ if (dwrq->length > IW_ESSID_MAX_SIZE + 1) {
++ result = -E2BIG;
++ goto end_unlock;
++ }
++
++ /* extra includes trailing \0, so it's ok */
++ strcpy(adev->nick, extra);
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_retry
++*/
++static int
++acx_ioctl_get_retry(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->retry;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned int type = vwrq->flags & IW_RETRY_TYPE;
++ unsigned int modifier = vwrq->flags & IW_RETRY_MODIFIER;
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* return the short retry number by default */
++ if (type == IW_RETRY_LIFETIME) {
++ vwrq->flags = IW_RETRY_LIFETIME;
++ vwrq->value = adev->msdu_lifetime;
++ } else if (modifier == IW_RETRY_MAX) {
++ vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
++ vwrq->value = adev->long_retry;
++ } else {
++ vwrq->flags = IW_RETRY_LIMIT;
++ if (adev->long_retry != adev->short_retry)
++ SET_BIT(vwrq->flags, IW_RETRY_MIN);
++ vwrq->value = adev->short_retry;
++ }
++
++ /* can't be disabled */
++ vwrq->disabled = (u8)0;
++ result = OK;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_retry
++*/
++static int
++acx_ioctl_set_retry(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->retry;
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (!vwrq) {
++ result = -EFAULT;
++ goto end;
++ }
++ if (vwrq->disabled) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ result = -EINVAL;
++ if (IW_RETRY_LIMIT == (vwrq->flags & IW_RETRY_TYPE)) {
++ printk("old retry limits: short %d long %d\n",
++ adev->short_retry, adev->long_retry);
++ if (vwrq->flags & IW_RETRY_MAX) {
++ adev->long_retry = vwrq->value;
++ } else if (vwrq->flags & IW_RETRY_MIN) {
++ adev->short_retry = vwrq->value;
++ } else {
++ /* no modifier: set both */
++ adev->long_retry = vwrq->value;
++ adev->short_retry = vwrq->value;
++ }
++ printk("new retry limits: short %d long %d\n",
++ adev->short_retry, adev->long_retry);
++ SET_BIT(adev->set_mask, GETSET_RETRY);
++ result = -EINPROGRESS;
++ }
++ else if (vwrq->flags & IW_RETRY_LIFETIME) {
++ adev->msdu_lifetime = vwrq->value;
++ printk("new MSDU lifetime: %d\n", adev->msdu_lifetime);
++ SET_BIT(adev->set_mask, SET_MSDU_LIFETIME);
++ result = -EINPROGRESS;
++ }
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/************************ private ioctls ******************************/
++
++
++/***********************************************************************
++** acx_ioctl_set_debug
++*/
++#if ACX_DEBUG
++static int
++acx_ioctl_set_debug(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ unsigned int debug_new = *((unsigned int *)extra);
++ int result = -EINVAL;
++
++ log(L_ANY, "setting debug from %04X to %04X\n", acx_debug, debug_new);
++ acx_debug = debug_new;
++
++ result = OK;
++ return result;
++
++}
++#endif
++
++
++/***********************************************************************
++** acx_ioctl_list_reg_domain
++*/
++static int
++acx_ioctl_list_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ int i = 1;
++ const char * const *entry = acx_reg_domain_strings;
++
++ printk("dom# chan# domain/country\n");
++ while (*entry)
++ printk("%4d %s\n", i++, *entry++);
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_reg_domain
++*/
++static int
++acx_ioctl_set_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if ((*extra < 1) || ((size_t)*extra > acx_reg_domain_ids_len)) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->reg_dom_id = acx_reg_domain_ids[*extra - 1];
++ SET_BIT(adev->set_mask, GETSET_REG_DOMAIN);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_reg_domain
++*/
++static int
++acx_ioctl_get_reg_domain(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int dom,i;
++
++ /* no locking */
++ dom = adev->reg_dom_id;
++
++ for (i = 1; i <= acx_reg_domain_ids_len; i++) {
++ if (acx_reg_domain_ids[i-1] == dom) {
++ log(L_IOCTL, "regulatory domain is currently set "
++ "to %d (0x%X): %s\n", i, dom,
++ acx_reg_domain_strings[i-1]);
++ *extra = i;
++ break;
++ }
++ }
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_short_preamble
++*/
++static const char * const
++preamble_modes[] = {
++ "off",
++ "on",
++ "auto (peer capability dependent)",
++ "unknown mode, error"
++};
++
++static int
++acx_ioctl_set_short_preamble(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int i;
++ int result;
++
++ FN_ENTER;
++
++ if ((unsigned char)*extra > 2) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ acx_sem_lock(adev);
++
++ adev->preamble_mode = (u8)*extra;
++ switch (adev->preamble_mode) {
++ case 0: /* long */
++ adev->preamble_cur = 0;
++ break;
++ case 1:
++ /* short, kick incapable peers */
++ adev->preamble_cur = 1;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ if (!(clt->cap_info & WF_MGMT_CAP_SHORT)) {
++ clt->used = CLIENT_EMPTY_SLOT_0;
++ }
++ }
++ switch (adev->mode) {
++ case ACX_MODE_2_STA:
++ if (adev->ap_client && !adev->ap_client->used) {
++ /* We kicked our AP :) */
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ }
++ }
++ break;
++ case 2: /* auto. short only if all peers are short-capable */
++ adev->preamble_cur = 1;
++ for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
++ client_t *clt = &adev->sta_list[i];
++ if (!clt->used) continue;
++ if (!(clt->cap_info & WF_MGMT_CAP_SHORT)) {
++ adev->preamble_cur = 0;
++ break;
++ }
++ }
++ break;
++ }
++ printk("new short preamble setting: configured %s, active %s\n",
++ preamble_modes[adev->preamble_mode],
++ preamble_modes[adev->preamble_cur]);
++ result = OK;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_short_preamble
++*/
++static int
++acx_ioctl_get_short_preamble(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("current short preamble setting: configured %s, active %s\n",
++ preamble_modes[adev->preamble_mode],
++ preamble_modes[adev->preamble_cur]);
++
++ *extra = (char)adev->preamble_mode;
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_antenna
++**
++** TX and RX antenna can be set separately but this function good
++** for testing 0-4 bits
++*/
++static int
++acx_ioctl_set_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("old antenna value: 0x%02X (COMBINED bit mask)\n"
++ "Rx antenna selection:\n"
++ "0x00 ant. 1\n"
++ "0x40 ant. 2\n"
++ "0x80 full diversity\n"
++ "0xc0 partial diversity\n"
++ "0x0f dwell time mask (in units of us)\n"
++ "Tx antenna selection:\n"
++ "0x00 ant. 2\n" /* yep, those ARE reversed! */
++ "0x20 ant. 1\n"
++ "new antenna value: 0x%02X\n",
++ adev->antenna, (u8)*extra);
++
++ adev->antenna = (u8)*extra;
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_antenna
++*/
++static int
++acx_ioctl_get_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /* no locking. it's pointless to lock a single load */
++ printk("current antenna value: 0x%02X (COMBINED bit mask)\n"
++ "Rx antenna selection:\n"
++ "0x00 ant. 1\n"
++ "0x40 ant. 2\n"
++ "0x80 full diversity\n"
++ "0xc0 partial diversity\n"
++ "Tx antenna selection:\n"
++ "0x00 ant. 2\n" /* yep, those ARE reversed! */
++ "0x20 ant. 1\n", adev->antenna);
++
++ return 0;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_rx_antenna
++**
++** 0 = antenna1; 1 = antenna2; 2 = full diversity; 3 = partial diversity
++** Could anybody test which antenna is the external one?
++*/
++static int
++acx_ioctl_set_rx_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (*extra > 3) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ printk("old antenna value: 0x%02X\n", adev->antenna);
++
++ acx_sem_lock(adev);
++
++ adev->antenna &= 0x3f;
++ SET_BIT(adev->antenna, (*extra << 6));
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++ printk("new antenna value: 0x%02X\n", adev->antenna);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_tx_antenna
++**
++** Arguments: 0 == antenna2; 1 == antenna1;
++** Could anybody test which antenna is the external one?
++*/
++static int
++acx_ioctl_set_tx_antenna(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ FN_ENTER;
++
++ if (*extra > 1) {
++ result = -EINVAL;
++ goto end;
++ }
++
++ printk("old antenna value: 0x%02X\n", adev->antenna);
++
++ acx_sem_lock(adev);
++
++ adev->antenna &= ~0x30;
++ SET_BIT(adev->antenna, ((*extra & 0x01) << 5));
++ SET_BIT(adev->set_mask, GETSET_ANTENNA);
++ printk("new antenna value: 0x%02X\n", adev->antenna);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_wlansniff
++**
++** can we just remove this in favor of monitor mode? --vda
++*/
++static int
++acx_ioctl_wlansniff(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned int *params = (unsigned int*)extra;
++ unsigned int enable = (unsigned int)(params[0] > 0);
++ int result;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* not using printk() here, since it distorts kismet display
++ * when printk messages activated */
++ log(L_IOCTL, "setting monitor to: 0x%02X\n", params[0]);
++
++ switch (params[0]) {
++ case 0:
++ /* no monitor mode. hmm, should we simply ignore it
++ * or go back to enabling adev->netdev->type ARPHRD_ETHER? */
++ break;
++ case 1:
++ adev->monitor_type = ARPHRD_IEEE80211_PRISM;
++ break;
++ case 2:
++ adev->monitor_type = ARPHRD_IEEE80211;
++ break;
++ }
++
++ if (params[0]) {
++ adev->mode = ACX_MODE_MONITOR;
++ SET_BIT(adev->set_mask, GETSET_MODE);
++ }
++
++ if (enable) {
++ adev->channel = params[1];
++ SET_BIT(adev->set_mask, GETSET_RX);
++ }
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_unknown11
++** FIXME: looks like some sort of "iwpriv kick_sta MAC" but it's broken
++*/
++static int
++acx_ioctl_unknown11(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++#ifdef BROKEN
++ struct iw_param *vwrq = &wrqu->param;
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ client_t client;
++ int result;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ acx_l_transmit_disassoc(adev, &client);
++ result = OK;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ return result;
++#endif
++ return -EINVAL;
++}
++
++
++/***********************************************************************
++** debug helper function to be able to debug various issues relatively easily
++*/
++static int
++acx_ioctl_dbg_set_masks(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ const unsigned int *params = (unsigned int*)extra;
++ int result;
++
++ acx_sem_lock(adev);
++
++ log(L_IOCTL, "setting flags in settings mask: "
++ "get_mask %08X set_mask %08X\n"
++ "before: get_mask %08X set_mask %08X\n",
++ params[0], params[1],
++ adev->get_mask, adev->set_mask);
++ SET_BIT(adev->get_mask, params[0]);
++ SET_BIT(adev->set_mask, params[1]);
++ log(L_IOCTL, "after: get_mask %08X set_mask %08X\n",
++ adev->get_mask, adev->set_mask);
++ result = -EINPROGRESS; /* immediately call commit handler */
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++* acx_ioctl_set_rates
++*
++* This ioctl takes string parameter. Examples:
++* iwpriv wlan0 SetRates "1,2"
++* use 1 and 2 Mbit rates, both are in basic rate set
++* iwpriv wlan0 SetRates "1,2 5,11"
++* use 1,2,5.5,11 Mbit rates. 1 and 2 are basic
++* iwpriv wlan0 SetRates "1,2 5c,11c"
++* same ('c' means 'CCK modulation' and it is a default for 5 and 11)
++* iwpriv wlan0 SetRates "1,2 5p,11p"
++* use 1,2,5.5,11 Mbit, 1,2 are basic. 5 and 11 are using PBCC
++* iwpriv wlan0 SetRates "1,2,5,11 22p"
++* use 1,2,5.5,11,22 Mbit. 1,2,5.5 and 11 are basic. 22 is using PBCC
++* (this is the maximum acx100 can do (modulo x4 mode))
++* iwpriv wlan0 SetRates "1,2,5,11 22"
++* same. 802.11 defines only PBCC modulation
++* for 22 and 33 Mbit rates, so there is no ambiguity
++* iwpriv wlan0 SetRates "1,2,5,11 6o,9o,12o,18o,24o,36o,48o,54o"
++* 1,2,5.5 and 11 are basic. 11g OFDM rates are enabled but
++* they are not in basic rate set. 22 Mbit is disabled.
++* iwpriv wlan0 SetRates "1,2,5,11 6,9,12,18,24,36,48,54"
++* same. OFDM is default for 11g rates except 22 and 33 Mbit,
++* thus 'o' is optional
++* iwpriv wlan0 SetRates "1,2,5,11 6d,9d,12d,18d,24d,36d,48d,54d"
++* 1,2,5.5 and 11 are basic. 11g CCK-OFDM rates are enabled
++* (acx111 does not support CCK-OFDM, driver will reject this cmd)
++* iwpriv wlan0 SetRates "6,9,12 18,24,36,48,54"
++* 6,9,12 are basic, rest of 11g rates is enabled. Using OFDM
++*/
++#include "setrate.c"
++
++/* disallow: 33Mbit (unsupported by hw) */
++/* disallow: CCKOFDM (unsupported by hw) */
++static int
++acx111_supported(int mbit, int modulation, void *opaque)
++{
++ if (mbit==33) return -ENOTSUPP;
++ if (modulation==DOT11_MOD_CCKOFDM) return -ENOTSUPP;
++ return OK;
++}
++
++static const u16
++acx111mask[] = {
++ [DOT11_RATE_1 ] = RATE111_1 ,
++ [DOT11_RATE_2 ] = RATE111_2 ,
++ [DOT11_RATE_5 ] = RATE111_5 ,
++ [DOT11_RATE_11] = RATE111_11,
++ [DOT11_RATE_22] = RATE111_22,
++ /* [DOT11_RATE_33] = */
++ [DOT11_RATE_6 ] = RATE111_6 ,
++ [DOT11_RATE_9 ] = RATE111_9 ,
++ [DOT11_RATE_12] = RATE111_12,
++ [DOT11_RATE_18] = RATE111_18,
++ [DOT11_RATE_24] = RATE111_24,
++ [DOT11_RATE_36] = RATE111_36,
++ [DOT11_RATE_48] = RATE111_48,
++ [DOT11_RATE_54] = RATE111_54,
++};
++
++static u32
++acx111_gen_mask(int mbit, int modulation, void *opaque)
++{
++ /* lower 16 bits show selected 1, 2, CCK and OFDM rates */
++ /* upper 16 bits show selected PBCC rates */
++ u32 m = acx111mask[rate_mbit2enum(mbit)];
++ if (modulation==DOT11_MOD_PBCC)
++ return m<<16;
++ return m;
++}
++
++static int
++verify_rate(u32 rate, int chip_type)
++{
++ /* never happens. be paranoid */
++ if (!rate) return -EINVAL;
++
++ /* disallow: mixing PBCC and CCK at 5 and 11Mbit
++ ** (can be supported, but needs complicated handling in tx code) */
++ if (( rate & ((RATE111_11+RATE111_5)<<16) )
++ && ( rate & (RATE111_11+RATE111_5) )
++ ) {
++ return -ENOTSUPP;
++ }
++ if (CHIPTYPE_ACX100 == chip_type) {
++ if ( rate & ~(RATE111_ACX100_COMPAT+(RATE111_ACX100_COMPAT<<16)) )
++ return -ENOTSUPP;
++ }
++ return 0;
++}
++
++static int
++acx_ioctl_set_rates(struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int result;
++ u32 brate = 0, orate = 0; /* basic, operational rate set */
++
++ FN_ENTER;
++
++ log(L_IOCTL, "set_rates %s\n", extra);
++ result = fill_ratemasks(extra, &brate, &orate,
++ acx111_supported, acx111_gen_mask, 0);
++ if (result) goto end;
++ SET_BIT(orate, brate);
++ log(L_IOCTL, "brate %08X orate %08X\n", brate, orate);
++
++ result = verify_rate(brate, adev->chip_type);
++ if (result) goto end;
++ result = verify_rate(orate, adev->chip_type);
++ if (result) goto end;
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++
++ adev->rate_basic = brate;
++ adev->rate_oper = orate;
++ /* TODO: ideally, we shall monitor highest basic rate
++ ** which was successfully sent to every peer
++ ** (say, last we checked, everybody could hear 5.5 Mbits)
++ ** and use that for bcasts when we want to reach all peers.
++ ** For beacons, we probably shall use lowest basic rate
++ ** because we want to reach all *potential* new peers too */
++ adev->rate_bcast = 1 << lowest_bit(brate);
++ if (IS_ACX100(adev))
++ adev->rate_bcast100 = acx_rate111to100(adev->rate_bcast);
++ adev->rate_auto = !has_only_one_bit(orate);
++ acx_l_update_client_rates(adev, orate);
++ /* TODO: get rid of ratevector, build it only when needed */
++ acx_l_update_ratevector(adev);
++
++ /* Do/don't do tx rate fallback; beacon contents and rate */
++ SET_BIT(adev->set_mask, SET_RATE_FALLBACK|SET_TEMPLATES);
++ result = -EINPROGRESS;
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_get_phy_chan_busy_percentage
++*/
++static int
++acx_ioctl_get_phy_chan_busy_percentage(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ struct {
++ u16 type;
++ u16 len;
++ u32 busytime;
++ u32 totaltime;
++ } ACX_PACKED usage;
++ int result;
++
++ acx_sem_lock(adev);
++
++ if (OK != acx_s_interrogate(adev, &usage, ACX1xx_IE_MEDIUM_USAGE)) {
++ result = NOT_OK;
++ goto end_unlock;
++ }
++
++ usage.busytime = le32_to_cpu(usage.busytime);
++ usage.totaltime = le32_to_cpu(usage.totaltime);
++
++ /* yes, this is supposed to be "Medium" (singular of media),
++ not "average"! OK, reword the message to make it obvious... */
++ printk("%s: busy percentage of medium (since last invocation): %d%% "
++ "(%u of %u microseconds)\n",
++ ndev->name,
++ usage.busytime / ((usage.totaltime / 100) + 1),
++ usage.busytime, usage.totaltime);
++
++ result = OK;
++
++end_unlock:
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_ed_threshold
++*/
++static inline int
++acx_ioctl_set_ed_threshold(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ printk("old ED threshold value: %d\n", adev->ed_threshold);
++ adev->ed_threshold = (unsigned char)*extra;
++ printk("new ED threshold value: %d\n", (unsigned char)*extra);
++ SET_BIT(adev->set_mask, GETSET_ED_THRESH);
++
++ acx_sem_unlock(adev);
++
++ return -EINPROGRESS;
++}
++
++
++/***********************************************************************
++** acx_ioctl_set_cca
++*/
++static inline int
++acx_ioctl_set_cca(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ acx_sem_lock(adev);
++
++ printk("old CCA value: 0x%02X\n", adev->cca);
++ adev->cca = (unsigned char)*extra;
++ printk("new CCA value: 0x%02X\n", (unsigned char)*extra);
++ SET_BIT(adev->set_mask, GETSET_CCA);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static const char * const
++scan_modes[] = { "active", "passive", "background" };
++
++static void
++acx_print_scan_params(acx_device_t *adev, const char* head)
++{
++ printk("%s: %smode %d (%s), min chan time %dTU, "
++ "max chan time %dTU, max scan rate byte: %d\n",
++ adev->ndev->name, head,
++ adev->scan_mode, scan_modes[adev->scan_mode],
++ adev->scan_probe_delay, adev->scan_duration, adev->scan_rate);
++}
++
++static int
++acx_ioctl_set_scan_params(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++ const int *params = (int *)extra;
++
++ acx_sem_lock(adev);
++
++ acx_print_scan_params(adev, "old scan parameters: ");
++ if ((params[0] != -1) && (params[0] >= 0) && (params[0] <= 2))
++ adev->scan_mode = params[0];
++ if (params[1] != -1)
++ adev->scan_probe_delay = params[1];
++ if (params[2] != -1)
++ adev->scan_duration = params[2];
++ if ((params[3] != -1) && (params[3] <= 255))
++ adev->scan_rate = params[3];
++ acx_print_scan_params(adev, "new scan parameters: ");
++ SET_BIT(adev->set_mask, GETSET_RESCAN);
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++static int
++acx_ioctl_get_scan_params(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++ int *params = (int *)extra;
++
++ acx_sem_lock(adev);
++
++ acx_print_scan_params(adev, "current scan parameters: ");
++ params[0] = adev->scan_mode;
++ params[1] = adev->scan_probe_delay;
++ params[2] = adev->scan_duration;
++ params[3] = adev->scan_rate;
++ result = OK;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx100_ioctl_set_led_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ static const char * const led_modes[] = { "off", "on", "LinkQuality" };
++
++ acx_device_t *adev = ndev2adev(ndev);
++ int result;
++
++ acx_sem_lock(adev);
++
++ printk("%s: power LED status: old %d (%s), ",
++ ndev->name,
++ adev->led_power,
++ led_modes[adev->led_power]);
++ adev->led_power = extra[0];
++ if (adev->led_power > 2) adev->led_power = 2;
++ printk("new %d (%s)\n",
++ adev->led_power,
++ led_modes[adev->led_power]);
++
++ if (adev->led_power == 2) {
++ printk("%s: max link quality setting: old %d, ",
++ ndev->name, adev->brange_max_quality);
++ if (extra[1])
++ adev->brange_max_quality = extra[1];
++ printk("new %d\n", adev->brange_max_quality);
++ }
++
++ SET_BIT(adev->set_mask, GETSET_LED_POWER);
++
++ result = -EINPROGRESS;
++
++ acx_sem_unlock(adev);
++
++ return result;
++}
++
++
++/***********************************************************************
++*/
++static inline int
++acx100_ioctl_get_led_power(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ acx_sem_lock(adev);
++
++ extra[0] = adev->led_power;
++ if (adev->led_power == 2)
++ extra[1] = adev->brange_max_quality;
++ else
++ extra[1] = -1;
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++static int
++acx111_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ if (!IS_PCI(ndev2adev(ndev)))
++ return OK;
++ return acx111pci_ioctl_info(ndev, info, vwrq, extra);
++}
++
++
++/***********************************************************************
++*/
++static int
++acx100_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ union iwreq_data *wrqu,
++ char *extra)
++{
++ struct iw_param *vwrq = &wrqu->param;
++ if (IS_USB(ndev2adev(ndev))) {
++ printk("acx: set_phy_amp_bias() is not supported on USB\n");
++ return OK;
++ }
++#ifdef ACX_MEM
++ return acx100mem_ioctl_set_phy_amp_bias(ndev, info, vwrq, extra);
++#else
++ return acx100pci_ioctl_set_phy_amp_bias(ndev, info, vwrq, extra);
++#endif
++}
++
++
++/***********************************************************************
++*/
++static const iw_handler acx_ioctl_handler[] =
++{
++ acx_ioctl_commit, /* SIOCSIWCOMMIT */
++ acx_ioctl_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ acx_ioctl_set_freq, /* SIOCSIWFREQ */
++ acx_ioctl_get_freq, /* SIOCGIWFREQ */
++ acx_ioctl_set_mode, /* SIOCSIWMODE */
++ acx_ioctl_get_mode, /* SIOCGIWMODE */
++ acx_ioctl_set_sens, /* SIOCSIWSENS */
++ acx_ioctl_get_sens, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ acx_ioctl_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
++#if IW_HANDLER_VERSION > 4
++ iw_handler_set_spy, /* SIOCSIWSPY */
++ iw_handler_get_spy, /* SIOCGIWSPY */
++ iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
++ iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
++#else /* IW_HANDLER_VERSION > 4 */
++#ifdef WIRELESS_SPY
++ NULL /* acx_ioctl_set_spy FIXME */, /* SIOCSIWSPY */
++ NULL /* acx_ioctl_get_spy */, /* SIOCGIWSPY */
++#else /* WSPY */
++ NULL, /* SIOCSIWSPY */
++ NULL, /* SIOCGIWSPY */
++#endif /* WSPY */
++ NULL, /* [nothing] */
++ NULL, /* [nothing] */
++#endif /* IW_HANDLER_VERSION > 4 */
++ acx_ioctl_set_ap, /* SIOCSIWAP */
++ acx_ioctl_get_ap, /* SIOCGIWAP */
++ NULL, /* [nothing] */
++ acx_ioctl_get_aplist, /* SIOCGIWAPLIST */
++ acx_ioctl_set_scan, /* SIOCSIWSCAN */
++ acx_ioctl_get_scan, /* SIOCGIWSCAN */
++ acx_ioctl_set_essid, /* SIOCSIWESSID */
++ acx_ioctl_get_essid, /* SIOCGIWESSID */
++ acx_ioctl_set_nick, /* SIOCSIWNICKN */
++ acx_ioctl_get_nick, /* SIOCGIWNICKN */
++ NULL, /* [nothing] */
++ NULL, /* [nothing] */
++ acx_ioctl_set_rate, /* SIOCSIWRATE */
++ acx_ioctl_get_rate, /* SIOCGIWRATE */
++ acx_ioctl_set_rts, /* SIOCSIWRTS */
++ acx_ioctl_get_rts, /* SIOCGIWRTS */
++#if ACX_FRAGMENTATION
++ acx_ioctl_set_frag, /* SIOCSIWFRAG */
++ acx_ioctl_get_frag, /* SIOCGIWFRAG */
++#else
++ NULL, /* SIOCSIWFRAG */
++ NULL, /* SIOCGIWFRAG */
++#endif
++ acx_ioctl_set_txpow, /* SIOCSIWTXPOW */
++ acx_ioctl_get_txpow, /* SIOCGIWTXPOW */
++ acx_ioctl_set_retry, /* SIOCSIWRETRY */
++ acx_ioctl_get_retry, /* SIOCGIWRETRY */
++ acx_ioctl_set_encode, /* SIOCSIWENCODE */
++ acx_ioctl_get_encode, /* SIOCGIWENCODE */
++ acx_ioctl_set_power, /* SIOCSIWPOWER */
++ acx_ioctl_get_power, /* SIOCGIWPOWER */
++};
++
++
++/***********************************************************************
++*/
++
++/* if you plan to reorder something, make sure to reorder all other places
++ * accordingly! */
++/* SET/GET convention: SETs must have even position, GETs odd */
++#define ACX100_IOCTL SIOCIWFIRSTPRIV
++enum {
++ ACX100_IOCTL_DEBUG = ACX100_IOCTL,
++ ACX100_IOCTL_GET__________UNUSED1,
++ ACX100_IOCTL_SET_PLED,
++ ACX100_IOCTL_GET_PLED,
++ ACX100_IOCTL_SET_RATES,
++ ACX100_IOCTL_LIST_DOM,
++ ACX100_IOCTL_SET_DOM,
++ ACX100_IOCTL_GET_DOM,
++ ACX100_IOCTL_SET_SCAN_PARAMS,
++ ACX100_IOCTL_GET_SCAN_PARAMS,
++ ACX100_IOCTL_SET_PREAMB,
++ ACX100_IOCTL_GET_PREAMB,
++ ACX100_IOCTL_SET_ANT,
++ ACX100_IOCTL_GET_ANT,
++ ACX100_IOCTL_RX_ANT,
++ ACX100_IOCTL_TX_ANT,
++ ACX100_IOCTL_SET_PHY_AMP_BIAS,
++ ACX100_IOCTL_GET_PHY_CHAN_BUSY,
++ ACX100_IOCTL_SET_ED,
++ ACX100_IOCTL_GET__________UNUSED3,
++ ACX100_IOCTL_SET_CCA,
++ ACX100_IOCTL_GET__________UNUSED4,
++ ACX100_IOCTL_MONITOR,
++ ACX100_IOCTL_TEST,
++ ACX100_IOCTL_DBG_SET_MASKS,
++ ACX111_IOCTL_INFO,
++ ACX100_IOCTL_DBG_SET_IO,
++ ACX100_IOCTL_DBG_GET_IO
++};
++
++
++static const iw_handler acx_ioctl_private_handler[] =
++{
++#if ACX_DEBUG
++[ACX100_IOCTL_DEBUG - ACX100_IOCTL] = acx_ioctl_set_debug,
++#endif
++[ACX100_IOCTL_SET_PLED - ACX100_IOCTL] = acx100_ioctl_set_led_power,
++[ACX100_IOCTL_GET_PLED - ACX100_IOCTL] = acx100_ioctl_get_led_power,
++[ACX100_IOCTL_SET_RATES - ACX100_IOCTL] = acx_ioctl_set_rates,
++[ACX100_IOCTL_LIST_DOM - ACX100_IOCTL] = acx_ioctl_list_reg_domain,
++[ACX100_IOCTL_SET_DOM - ACX100_IOCTL] = acx_ioctl_set_reg_domain,
++[ACX100_IOCTL_GET_DOM - ACX100_IOCTL] = acx_ioctl_get_reg_domain,
++[ACX100_IOCTL_SET_SCAN_PARAMS - ACX100_IOCTL] = acx_ioctl_set_scan_params,
++[ACX100_IOCTL_GET_SCAN_PARAMS - ACX100_IOCTL] = acx_ioctl_get_scan_params,
++[ACX100_IOCTL_SET_PREAMB - ACX100_IOCTL] = acx_ioctl_set_short_preamble,
++[ACX100_IOCTL_GET_PREAMB - ACX100_IOCTL] = acx_ioctl_get_short_preamble,
++[ACX100_IOCTL_SET_ANT - ACX100_IOCTL] = acx_ioctl_set_antenna,
++[ACX100_IOCTL_GET_ANT - ACX100_IOCTL] = acx_ioctl_get_antenna,
++[ACX100_IOCTL_RX_ANT - ACX100_IOCTL] = acx_ioctl_set_rx_antenna,
++[ACX100_IOCTL_TX_ANT - ACX100_IOCTL] = acx_ioctl_set_tx_antenna,
++[ACX100_IOCTL_SET_PHY_AMP_BIAS - ACX100_IOCTL] = acx100_ioctl_set_phy_amp_bias,
++[ACX100_IOCTL_GET_PHY_CHAN_BUSY - ACX100_IOCTL] = acx_ioctl_get_phy_chan_busy_percentage,
++[ACX100_IOCTL_SET_ED - ACX100_IOCTL] = acx_ioctl_set_ed_threshold,
++[ACX100_IOCTL_SET_CCA - ACX100_IOCTL] = acx_ioctl_set_cca,
++[ACX100_IOCTL_MONITOR - ACX100_IOCTL] = acx_ioctl_wlansniff,
++[ACX100_IOCTL_TEST - ACX100_IOCTL] = acx_ioctl_unknown11,
++[ACX100_IOCTL_DBG_SET_MASKS - ACX100_IOCTL] = acx_ioctl_dbg_set_masks,
++[ACX111_IOCTL_INFO - ACX100_IOCTL] = acx111_ioctl_info,
++};
++
++
++static const struct iw_priv_args acx_ioctl_private_args[] = {
++#if ACX_DEBUG
++{ cmd : ACX100_IOCTL_DEBUG,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetDebug" },
++#endif
++{ cmd : ACX100_IOCTL_SET_PLED,
++ set_args : IW_PRIV_TYPE_BYTE | 2,
++ get_args : 0,
++ name : "SetLEDPower" },
++{ cmd : ACX100_IOCTL_GET_PLED,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 2,
++ name : "GetLEDPower" },
++{ cmd : ACX100_IOCTL_SET_RATES,
++ set_args : IW_PRIV_TYPE_CHAR | 256,
++ get_args : 0,
++ name : "SetRates" },
++{ cmd : ACX100_IOCTL_LIST_DOM,
++ set_args : 0,
++ get_args : 0,
++ name : "ListRegDomain" },
++{ cmd : ACX100_IOCTL_SET_DOM,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetRegDomain" },
++{ cmd : ACX100_IOCTL_GET_DOM,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ name : "GetRegDomain" },
++{ cmd : ACX100_IOCTL_SET_SCAN_PARAMS,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ get_args : 0,
++ name : "SetScanParams" },
++{ cmd : ACX100_IOCTL_GET_SCAN_PARAMS,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ name : "GetScanParams" },
++{ cmd : ACX100_IOCTL_SET_PREAMB,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetSPreamble" },
++{ cmd : ACX100_IOCTL_GET_PREAMB,
++ set_args : 0,
++ get_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ name : "GetSPreamble" },
++{ cmd : ACX100_IOCTL_SET_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetAntenna" },
++{ cmd : ACX100_IOCTL_GET_ANT,
++ set_args : 0,
++ get_args : 0,
++ name : "GetAntenna" },
++{ cmd : ACX100_IOCTL_RX_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetRxAnt" },
++{ cmd : ACX100_IOCTL_TX_ANT,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetTxAnt" },
++{ cmd : ACX100_IOCTL_SET_PHY_AMP_BIAS,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetPhyAmpBias"},
++{ cmd : ACX100_IOCTL_GET_PHY_CHAN_BUSY,
++ set_args : 0,
++ get_args : 0,
++ name : "GetPhyChanBusy" },
++{ cmd : ACX100_IOCTL_SET_ED,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetED" },
++{ cmd : ACX100_IOCTL_SET_CCA,
++ set_args : IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
++ get_args : 0,
++ name : "SetCCA" },
++{ cmd : ACX100_IOCTL_MONITOR,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
++ get_args : 0,
++ name : "monitor" },
++{ cmd : ACX100_IOCTL_TEST,
++ set_args : 0,
++ get_args : 0,
++ name : "Test" },
++{ cmd : ACX100_IOCTL_DBG_SET_MASKS,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
++ get_args : 0,
++ name : "DbgSetMasks" },
++{ cmd : ACX111_IOCTL_INFO,
++ set_args : 0,
++ get_args : 0,
++ name : "GetAcx111Info" },
++{ cmd : ACX100_IOCTL_DBG_SET_IO,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 4,
++ get_args : 0,
++ name : "DbgSetIO" },
++{ cmd : ACX100_IOCTL_DBG_GET_IO,
++ set_args : IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3,
++ get_args : 0,
++ name : "DbgGetIO" },
++};
++
++
++const struct iw_handler_def acx_ioctl_handler_def =
++{
++ .num_standard = VEC_SIZE(acx_ioctl_handler),
++ .num_private = VEC_SIZE(acx_ioctl_private_handler),
++ .num_private_args = VEC_SIZE(acx_ioctl_private_args),
++ .standard = (iw_handler *) acx_ioctl_handler,
++ .private = (iw_handler *) acx_ioctl_private_handler,
++ .private_args = (struct iw_priv_args *) acx_ioctl_private_args,
++#if IW_HANDLER_VERSION > 5
++ .get_wireless_stats = acx_e_get_wireless_stats
++#endif /* IW > 5 */
++};
+Index: linux-2.6.23/drivers/net/wireless/acx/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/Kconfig 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,113 @@
++config ACX
++ tristate "TI acx100/acx111 802.11b/g wireless chipsets"
++ depends on NET_RADIO && EXPERIMENTAL
++ select FW_LOADER
++ ---help---
++ A driver for 802.11b/g wireless cards based on
++ Texas Instruments acx100 and acx111 chipsets.
++
++ This driver supports Host AP mode that allows
++ your computer to act as an IEEE 802.11 access point.
++ This driver is new and experimental.
++
++ Texas Instruments did not take part in development of this driver
++ in any way, shape or form.
++
++ The driver can be compiled as a module and will be named "acx".
++
++config ACX_PCI
++ bool "TI acx100/acx111 802.11b/g PCI"
++ depends on ACX && PCI
++ ---help---
++ Include PCI and CardBus support in acx.
++
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware may be in a form of single image 40-100kb in size
++ (a 'combined' firmware) or two images - main image
++ (again 40-100kb) and radio image (~10kb or less).
++
++ Firmware images are requested from hotplug using following names:
++
++ tiacx100 - main firmware image for acx100 chipset
++ tiacx100rNN - radio acx100 firmware for radio type NN
++ tiacx100cNN - combined acx100 firmware for radio type NN
++ tiacx111 - main acx111 firmware
++ tiacx111rNN - radio acx111 firmware for radio type NN
++ tiacx111cNN - combined acx111 firmware for radio type NN
++
++ Driver will attempt to load combined image first.
++ If no such image is found, it will try to load main image
++ and radio image instead.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_USB
++ bool "TI acx100/acx111 802.11b/g USB"
++ depends on ACX && (USB=y || USB=ACX)
++ ---help---
++ Include USB support in acx.
++
++ There is only one currently known device in this category,
++ D-Link DWL-120+, but newer devices seem to be on the horizon.
++
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware for USB device is requested from hotplug
++ by the 'tiacx100usb' name.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_MEM
++ bool "TI acx100/acx111 802.11b/g memory mapped slave 16 interface"
++ depends on ACX
++ ---help---
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ Firmware for USB device is requested from hotplug
++ by the 'tiacx100usb' name.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_CS
++ bool "TI acx100/acx111 802.11b/g cardbus interface"
++ depends on ACX
++ ---help---
++ acx chipsets need their firmware loaded at startup.
++ You will need to provide a firmware image via hotplug.
++
++ This driver is based on memory mapped driver.
++
++ Firmware files are not covered by GPL and are not distributed
++ with this driver for legal reasons.
++
++config ACX_HX4700
++ tristate "ACX support for the iPAQ hx4700 using ACX_MEM"
++ depends on HX4700_CORE && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the iPAQ hx4700.
++
++config ACX_HTCUNIVERSAL
++ tristate "ACX support for the HTC Universal using ACX_MEM"
++ depends on HTCUNIVERSAL_CORE && HTC_ASIC3 && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the HTC Universal.
++
++config ACX_HTCSABLE
++ tristate "ACX support for the HTC Sable (IPAQ hw6915) using ACX_MEM"
++ depends on MACH_HW6900 && HTC_ASIC3 && ACX_MEM
++ ---help---
++ Include memory interface support in acx for the HTC Sable (IPAQ hw6915).
++
++config ACX_RX3000
++ tristate "ACX support for the iPAQ RX3000 using ACX_MEM"
++ depends on MACH_RX3715 && ACX_MEM && LEDS_ASIC3
++ ---help---
++ Include memory interface support in acx for the IPAQ RX3000.
++
+Index: linux-2.6.23/drivers/net/wireless/acx/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/Makefile 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,21 @@
++#obj-m += acx.o
++
++#acx-obj-y += pci.o
++#acx-obj-y += usb.o
++
++#acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
++
++# Use this if you have proper Kconfig integration:
++
++obj-$(CONFIG_ACX) += acx.o
++obj-$(CONFIG_ACX_HX4700) += hx4700_acx.o
++obj-$(CONFIG_ACX_HTCUNIVERSAL) += htcuniversal_acx.o
++obj-$(CONFIG_ACX_HTCSABLE) += htcsable_acx.o
++obj-$(CONFIG_ACX_RX3000) += rx3000_acx.o
++#
++acx-obj-$(CONFIG_ACX_PCI) += pci.o
++acx-obj-$(CONFIG_ACX_USB) += usb.o
++acx-obj-$(CONFIG_ACX_MEM) += mem.o
++acx-obj-$(CONFIG_ACX_CS) += cs.o
++#
++acx-objs := wlan.o conv.o ioctl.o common.o $(acx-obj-y)
+Index: linux-2.6.23/drivers/net/wireless/acx/mem.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/mem.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,5363 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++**
++** Slave memory interface support:
++**
++** Todd Blumer - SDG Systems
++** Bill Reese - HP
++** Eric McCorkle - Shadowsun
++*/
++#define ACX_MEM 1
++
++/*
++ * non-zero makes it dump the ACX memory to the console then
++ * panic when you cat /proc/driver/acx_wlan0_diag
++ */
++#define DUMP_MEM_DEFINED 1
++
++#define DUMP_MEM_DURING_DIAG 0
++#define DUMP_IF_SLOW 0
++
++#define PATCH_AROUND_BAD_SPOTS 1
++#define HX4700_FIRMWARE_CHECKSUM 0x0036862e
++#define HX4700_ALTERNATE_FIRMWARE_CHECKSUM 0x00368a75
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/irq.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/inetdevice.h>
++
++#include "acx.h"
++#include "acx_hw.h"
++
++/***********************************************************************
++*/
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#include <asm/io.h>
++
++#define REG_ACX_VENDOR_ID 0x900
++/*
++ * This is the vendor id on the HX4700, anyway
++ */
++#define ACX_VENDOR_ID 0x8400104c
++
++typedef enum {
++ ACX_SOFT_RESET = 0,
++
++ ACX_SLV_REG_ADDR,
++ ACX_SLV_REG_DATA,
++ ACX_SLV_REG_ADATA,
++
++ ACX_SLV_MEM_CP,
++ ACX_SLV_MEM_ADDR,
++ ACX_SLV_MEM_DATA,
++ ACX_SLV_MEM_CTL,
++} acxreg_t;
++
++/***********************************************************************
++*/
++static void acxmem_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxmem_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxmem_i_set_multicast_list(struct net_device *ndev);
++
++static int acxmem_e_open(struct net_device *ndev);
++static int acxmem_e_close(struct net_device *ndev);
++static void acxmem_s_up(struct net_device *ndev);
++static void acxmem_s_down(struct net_device *ndev);
++
++static void dump_acxmem (acx_device_t *adev, u32 start, int length);
++static int acxmem_complete_hw_reset (acx_device_t *adev);
++static void acxmem_s_delete_dma_regions(acx_device_t *adev);
++
++static struct platform_device *resume_pdev;
++
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend(struct platform_device *pdev, pm_message_t state);
++#else
++acxmem_e_suspend(struct device *pdev, u32 state);
++#endif
++static void
++fw_resumer(struct work_struct *notused);
++//fw_resumer( void *data );
++
++static int acx_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++ struct net_device *ndev = ptr;
++ acx_device_t *adev = ndev2adev(ndev);
++
++ /*
++ * Upper level ioctl() handlers send a NETDEV_CHANGEADDR if the MAC address changes.
++ */
++
++ if (NETDEV_CHANGEADDR == event) {
++ /*
++ * the upper layers put the new MAC address in ndev->dev_addr; we just copy
++ * it over and update the ACX with it.
++ */
++ MAC_COPY(adev->dev_addr, adev->ndev->dev_addr);
++ adev->set_mask |= GETSET_STATION_ID;
++ acx_s_update_card_settings (adev);
++ }
++
++ return 0;
++}
++
++static struct notifier_block acx_netdev_notifier = {
++ .notifier_call = acx_netdev_event,
++};
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_id_register (acx_device_t *adev)
++{
++ writel (0x24, &adev->iobase[ACX_SLV_REG_ADDR]);
++ return readl (&adev->iobase[ACX_SLV_REG_DATA]);
++}
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++ u32 val;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readl(((u8*)adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ val = readl( &adev->iobase[ACX_SLV_REG_DATA] );
++
++ return val;
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ u16 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ return readw(((u8 *) adev->iobase) + addr);
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u16 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return lo;
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ u8 lo;
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20)
++ return readb(((u8 *)adev->iobase) + addr);
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ lo = readw( (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++
++ return (u8)lo;
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writel(val, ((u8*)adev->iobase) + addr);
++ return;
++ }
++
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writel( val, &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writew(val, ((u8 *)adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writew( val, (u16 *) &adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ u32 addr;
++
++ if (offset > IO_ACX_ECPU_CTRL)
++ addr = offset;
++ else
++ addr = adev->io[offset];
++
++ if (addr < 0x20) {
++ writeb(val, ((u8 *) adev->iobase) + addr);
++ return;
++ }
++ writel( addr, &adev->iobase[ACX_SLV_REG_ADDR] );
++ writeb( val, (u8 *)&adev->iobase[ACX_SLV_REG_DATA] );
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ (void) readl(adev->iobase);
++}
++
++INLINE_IO void
++set_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp | bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++INLINE_IO void
++clear_regbits (acx_device_t *adev, unsigned int offset, u32 bits) {
++ u32 tmp;
++
++ tmp = read_reg32 (adev, offset);
++ tmp = tmp & ~bits;
++ write_reg32 (adev, offset, tmp);
++ write_flush (adev);
++}
++
++/*
++ * Copy from PXA memory to the ACX memory. This assumes both the PXA and ACX
++ * addresses are 32 bit aligned. Count is in bytes.
++ */
++INLINE_IO void
++write_slavemem32 (acx_device_t *adev, u32 slave_address, u32 val)
++{
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, val);
++}
++
++INLINE_IO u32
++read_slavemem32 (acx_device_t *adev, u32 slave_address)
++{
++ u32 val;
++
++ write_reg32 (adev, IO_ACX_SLV_MEM_CTL, 0x0);
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, slave_address);
++ udelay (10);
++ val = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++
++ return val;
++}
++
++INLINE_IO void
++write_slavemem8 (acx_device_t *adev, u32 slave_address, u8 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++INLINE_IO u8
++read_slavemem8 (acx_device_t *adev, u32 slave_address)
++{
++ u8 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xff;
++
++ return val;
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO void
++write_slavemem16 (acx_device_t *adev, u32 slave_address, u16 val)
++{
++ u32 data;
++ u32 base;
++ int offset;
++
++ /*
++ * Get the word containing the target address and the byte offset in that word.
++ */
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++ data &= ~(0xffff << offset);
++ data |= val << offset;
++ write_slavemem32 (adev, base, data);
++}
++
++/*
++ * doesn't split across word boundaries
++ */
++INLINE_IO u16
++read_slavemem16 (acx_device_t *adev, u32 slave_address)
++{
++ u16 val;
++ u32 base;
++ u32 data;
++ int offset;
++
++ base = slave_address & ~3;
++ offset = (slave_address & 3) * 8;
++
++ data = read_slavemem32 (adev, base);
++
++ val = (data >> offset) & 0xffff;
++
++ return val;
++}
++
++/*
++ * Copy from slave memory
++ *
++ * TODO - rewrite using address autoincrement, handle partial words
++ */
++void
++copy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count) {
++ u32 tmp = 0;
++ u8 *ptmp = (u8 *) &tmp;
++
++ /*
++ * Right now I'm making the assumption that the destination is aligned, but
++ * I'd better check.
++ */
++ if ((u32) destination & 3) {
++ printk ("acx copy_from_slavemem: warning! destination not word-aligned!\n");
++ }
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ *((u32 *) destination) = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If the word reads above didn't satisfy the count, read one more word
++ * and transfer a byte at a time until the request is satisfied.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, source);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *destination++ = *ptmp++;
++ }
++ }
++}
++
++/*
++ * Copy to slave memory
++ *
++ * TODO - rewrite using autoincrement, handle partial words
++ */
++void
++copy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 tmp = 0;
++ u8* ptmp = (u8 *) &tmp;
++ static u8 src[512]; /* make static to avoid huge stack objects */
++
++ /*
++ * For now, make sure the source is word-aligned by copying it to a word-aligned
++ * buffer. Someday rewrite to avoid the extra copy.
++ */
++ if (count > sizeof (src)) {
++ printk ("acx copy_to_slavemem: Warning! buffer overflow!\n");
++ count = sizeof (src);
++ }
++ memcpy (src, source, count);
++ source = src;
++
++ while (count >= 4) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, *((u32 *) source));
++ count -= 4;
++ source += 4;
++ destination += 4;
++ }
++
++ /*
++ * If there are leftovers read the next word from the acx and merge in
++ * what they want to write.
++ */
++ if (count) {
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ tmp = read_reg32 (adev, IO_ACX_SLV_MEM_DATA);
++ while (count--) {
++ *ptmp++ = *source++;
++ }
++ /*
++ * reset address in case we're currently in auto-increment mode
++ */
++ write_reg32 (adev, IO_ACX_SLV_MEM_ADDR, destination);
++ udelay (10);
++ write_reg32 (adev, IO_ACX_SLV_MEM_DATA, tmp);
++ udelay (10);
++ }
++
++}
++
++/*
++ * Block copy to slave buffers using memory block chain mode. Copies to the ACX
++ * transmit buffer structure with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_to_slavemem (acx_device_t *adev, u32 destination, u8 *source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) source;
++ static u8 aligned_source[WLAN_A4FR_MAXLEN_WEP_FCS];
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * This should never happen since we're in control of both, but I want to know about
++ * it if it does.
++ */
++ if ((destination & 0x00ffffe0) != destination) {
++ printk ("acx chaincopy: destination block 0x%04x not aligned!\n", destination);
++ }
++ if (count > sizeof aligned_source) {
++ printk( KERN_ERR "chaincopy_to_slavemem overflow!\n" );
++ count = sizeof aligned_source;
++ }
++ if ((u32) source & 3) {
++ memcpy (aligned_source, source, count);
++ data = (u32 *) aligned_source;
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = 2 << 16 | 1 << 2;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = destination & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (destination & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Write the data to the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ writel (*data++, &adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++}
++
++
++/*
++ * Block copy from slave buffers using memory block chain mode. Copies from the ACX
++ * receive buffer structures with minimal intervention on our part.
++ * Interrupts should be disabled when calling this.
++ */
++void
++chaincopy_from_slavemem (acx_device_t *adev, u8 *destination, u32 source, int count)
++{
++ u32 val;
++ u32 *data = (u32 *) destination;
++ static u8 aligned_destination[WLAN_A4FR_MAXLEN_WEP_FCS];
++ int saved_count = count;
++
++ /*
++ * Warn if the pointers don't look right. Destination must fit in [23:5] with
++ * zero elsewhere and source should be 32 bit aligned.
++ * Turns out the network stack sends unaligned things, so fix them before
++ * copying to the ACX.
++ */
++ if ((source & 0x00ffffe0) != source) {
++ printk ("acx chaincopy: source block 0x%04x not aligned!\n", source);
++ dump_acxmem (adev, 0, 0x10000);
++ }
++ if ((u32) destination & 3) {
++ //printk ("acx chaincopy: data destination not word aligned!\n");
++ data = (u32 *) aligned_destination;
++ if (count > sizeof aligned_destination) {
++ printk( KERN_ERR "chaincopy_from_slavemem overflow!\n" );
++ count = sizeof aligned_destination;
++ }
++ }
++
++ /*
++ * SLV_MEM_CTL[17:16] = memory block chain mode with auto-increment
++ * SLV_MEM_CTL[5:2] = offset to data portion = 1 word
++ */
++ val = (2 << 16) | (1 << 2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_CTL]);
++
++ /*
++ * SLV_MEM_CP[23:5] = start of 1st block
++ * SLV_MEM_CP[3:2] = offset to memblkptr = 0
++ */
++ val = source & 0x00ffffe0;
++ writel (val, &adev->iobase[ACX_SLV_MEM_CP]);
++
++ /*
++ * SLV_MEM_ADDR[23:2] = SLV_MEM_CTL[5:2] + SLV_MEM_CP[23:5]
++ */
++ val = (source & 0x00ffffe0) + (1<<2);
++ writel (val, &adev->iobase[ACX_SLV_MEM_ADDR]);
++
++ /*
++ * Read the data from the slave data register, rounding up to the end
++ * of the word containing the last byte (hence the > 0)
++ */
++ while (count > 0) {
++ *data++ = readl (&adev->iobase[ACX_SLV_MEM_DATA]);
++ count -= 4;
++ }
++
++ /*
++ * If the destination wasn't aligned, we would have saved it in
++ * the aligned buffer, so copy it where it should go.
++ */
++ if ((u32) destination & 3) {
++ memcpy (destination, aligned_destination, saved_count);
++ }
++}
++
++char
++printable (char c)
++{
++ return ((c >= 20) && (c < 127)) ? c : '.';
++}
++
++#if DUMP_MEM_DEFINED > 0
++static void
++dump_acxmem (acx_device_t *adev, u32 start, int length)
++{
++ int i;
++ u8 buf[16];
++
++ while (length > 0) {
++ printk ("%04x ", start);
++ copy_from_slavemem (adev, buf, start, 16);
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%02x ", buf[i]);
++ }
++ for (i = 0; (i < 16) && (i < length); i++) {
++ printk ("%c", printable (buf[i]));
++ }
++ printk ("\n");
++ start += 16;
++ length -= 16;
++ }
++}
++#endif
++
++static void
++enable_acx_irq(acx_device_t *adev);
++static void
++disable_acx_irq(acx_device_t *adev);
++
++/*
++ * Return an acx pointer to the next transmit data block.
++ */
++u32
++allocate_acx_txbuf_space (acx_device_t *adev, int count) {
++ u32 block, next, last_block;
++ int blocks_needed;
++ unsigned long flags;
++
++ spin_lock_irqsave(&adev->txbuf_lock, flags);
++ /*
++ * Take 4 off the memory block size to account for the reserved word at the start of
++ * the block.
++ */
++ blocks_needed = count / (adev->memblocksize - 4);
++ if (count % (adev->memblocksize - 4))
++ blocks_needed++;
++
++ if (blocks_needed <= adev->acx_txbuf_blocks_free) {
++ /*
++ * Take blocks at the head of the free list.
++ */
++ last_block = block = adev->acx_txbuf_free;
++
++ /*
++ * Follow block pointers through the requested number of blocks both to
++ * find the new head of the free list and to set the flags for the blocks
++ * appropriately.
++ */
++ while (blocks_needed--) {
++ /*
++ * Keep track of the last block of the allocation
++ */
++ last_block = adev->acx_txbuf_free;
++
++ /*
++ * Make sure the end control flag is not set.
++ */
++ next = read_slavemem32 (adev, adev->acx_txbuf_free) & 0x7ffff;
++ write_slavemem32 (adev, adev->acx_txbuf_free, next);
++
++ /*
++ * Update the new head of the free list
++ */
++ adev->acx_txbuf_free = next << 5;
++ adev->acx_txbuf_blocks_free--;
++
++ }
++
++ /*
++ * Flag the last block both by clearing out the next pointer
++ * and marking the control field.
++ */
++ write_slavemem32 (adev, last_block, 0x02000000);
++
++ /*
++ * If we're out of buffers make sure the free list pointer is NULL
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ adev->acx_txbuf_free = 0;
++ }
++ }
++ else {
++ block = 0;
++ }
++ spin_unlock_irqrestore (&adev->txbuf_lock, flags);
++ return block;
++}
++
++/*
++ * Return buffer space back to the pool by following the next pointers until we find
++ * the block marked as the end. Point the last block to the head of the free list,
++ * then update the head of the free list to point to the newly freed memory.
++ * This routine gets called in interrupt context, so it shouldn't block to protect
++ * the integrity of the linked list. The ISR already holds the lock.
++ */
++void
++reclaim_acx_txbuf_space (acx_device_t *adev, u32 blockptr) {
++ u32 cur, last, next;
++ unsigned long flags;
++
++ spin_lock_irqsave (&adev->txbuf_lock, flags);
++ if ((blockptr >= adev->acx_txbuf_start) &&
++ (blockptr <= adev->acx_txbuf_start +
++ (adev->acx_txbuf_numblocks - 1) * adev->memblocksize)) {
++ cur = blockptr;
++ do {
++ last = cur;
++ next = read_slavemem32 (adev, cur);
++
++ /*
++ * Advance to the next block in this allocation
++ */
++ cur = (next & 0x7ffff) << 5;
++
++ /*
++ * This block now counts as free.
++ */
++ adev->acx_txbuf_blocks_free++;
++ } while (!(next & 0x02000000));
++
++ /*
++ * last now points to the last block of that allocation. Update the pointer
++ * in that block to point to the free list and reset the free list to the
++ * first block of the free call. If there were no free blocks, make sure
++ * the new end of the list marks itself as truly the end.
++ */
++ if (adev->acx_txbuf_free) {
++ write_slavemem32 (adev, last, adev->acx_txbuf_free >> 5);
++ }
++ else {
++ write_slavemem32 (adev, last, 0x02000000);
++ }
++ adev->acx_txbuf_free = blockptr;
++ }
++ spin_unlock_irqrestore(&adev->txbuf_lock, flags);
++}
++
++/*
++ * Initialize the pieces managing the transmit buffer pool on the ACX. The transmit
++ * buffer is a circular queue with one 32 bit word reserved at the beginning of each
++ * block. The upper 13 bits are a control field, of which only 0x02000000 has any
++ * meaning. The lower 19 bits are the address of the next block divided by 32.
++ */
++void
++init_acx_txbuf (acx_device_t *adev) {
++
++ /*
++ * acx100_s_init_memory_pools set up txbuf_start and txbuf_numblocks for us.
++ * All we need to do is reset the rest of the bookeeping.
++ */
++
++ adev->acx_txbuf_free = adev->acx_txbuf_start;
++ adev->acx_txbuf_blocks_free = adev->acx_txbuf_numblocks;
++
++ /*
++ * Initialization leaves the last transmit pool block without a pointer back to
++ * the head of the list, but marked as the end of the list. That's how we want
++ * to see it, too, so leave it alone. This is only ever called after a firmware
++ * reset, so the ACX memory is in the state we want.
++ */
++
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxmem_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxmem_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxmem_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxmem_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxmem_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxmem_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ int count;
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++ fail:
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxmem_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxmem_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size, checkMismatch = -1;
++ u32 sum, v32, tmp, id;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++#endif
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ write_flush(adev);
++#endif
++ write_slavemem32 (adev, offset + len - 4, v32);
++
++ id = read_id_register (adev);
++
++ /*
++ * check the data written
++ */
++ tmp = read_slavemem32 (adev, offset + len - 4);
++ if (checkMismatch && (tmp != v32)) {
++ printk ("first data mismatch at 0x%08x good 0x%08x bad 0x%08x id 0x%08x\n",
++ offset + len - 4, v32, tmp, id);
++ checkMismatch = 0;
++ }
++ }
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxmem_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxmem_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#ifdef NOPE
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ udelay(10);
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++#endif
++ w32 = read_slavemem32 (adev, offset + len - 4);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match\n(0x%08X vs. 0x%08X)!\n"
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxmem_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char *filename = "WLANGEN.BIN";
++#ifdef PATCH_AROUND_BAD_SPOTS
++ u32 offset;
++ int i;
++ /*
++ * arm-linux-objdump -d patch.bin, or
++ * od -Ax -t x4 patch.bin after finding the bounds
++ * of the .text section with arm-linux-objdump -s patch.bin
++ */
++ u32 patch[] = {
++ 0xe584c030, 0xe59fc008,
++ 0xe92d1000, 0xe59fc004, 0xe8bd8000, 0x0000080c,
++ 0x0000aa68, 0x605a2200, 0x2c0a689c, 0x2414d80a,
++ 0x2f00689f, 0x1c27d007, 0x06241e7c, 0x2f000e24,
++ 0xe000d1f6, 0x602e6018, 0x23036468, 0x480203db,
++ 0x60ca6003, 0xbdf0750a, 0xffff0808
++ };
++#endif
++
++ FN_ENTER;
++ /* No combined image; tell common we need the radio firmware, too */
++ adev->need_radio_fw = 1;
++
++ fw_image = acx_s_read_fw(adev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++#ifdef PATCH_AROUND_BAD_SPOTS
++ /*
++ * Only want to do this if the firmware is exactly what we expect for an
++ * iPaq 4700; otherwise, bad things would ensue.
++ */
++ if ((HX4700_FIRMWARE_CHECKSUM == fw_image->chksum) ||
++ (HX4700_ALTERNATE_FIRMWARE_CHECKSUM == fw_image->chksum)) {
++ /*
++ * Put the patch after the main firmware image. 0x950c contains
++ * the ACX's idea of the end of the firmware. Use that location to
++ * load ours (which depends on that location being 0xab58) then
++ * update that location to point to after ours.
++ */
++
++ offset = read_slavemem32 (adev, 0x950c);
++
++ log (L_DEBUG, "acx: patching in at 0x%04x\n", offset);
++
++ for (i = 0; i < sizeof(patch) / sizeof(patch[0]); i++) {
++ write_slavemem32 (adev, offset, patch[i]);
++ offset += sizeof(u32);
++ }
++
++ /*
++ * Patch the instruction at 0x0804 to branch to our ARM patch at 0xab58
++ */
++ write_slavemem32 (adev, 0x0804, 0xea000000 + (0xab58-0x0804-8)/4);
++
++ /*
++ * Patch the instructions at 0x1f40 to branch to our Thumb patch at 0xab74
++ *
++ * 4a00 ldr r2, [pc, #0]
++ * 4710 bx r2
++ * .data 0xab74+1
++ */
++ write_slavemem32 (adev, 0x1f40, 0x47104a00);
++ write_slavemem32 (adev, 0x1f44, 0x0000ab74+1);
++
++ /*
++ * Bump the end of the firmware up to beyond our patch.
++ */
++ write_slavemem32 (adev, 0x950c, offset);
++
++ }
++#endif
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxmem_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("RADIONN.BIN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "RADIO%02x.BIN",
++ adev->radio_type);
++ radio_image = acx_s_read_fw(adev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxmem_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxmem_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++/***********************************************************************
++** acxmem_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxmem_l_reset_mac(acx_device_t *adev)
++{
++ int count;
++ FN_ENTER;
++
++ /* halt eCPU */
++ set_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++
++ /* now do soft reset of eCPU, set bit */
++ set_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++
++ /* Windows driver sleeps here for a while with this sequence */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ clear_regbits (adev, IO_ACX_SOFT_RESET, 0x1);
++
++ /* now start a burst read from initial EEPROM */
++ set_regbits (adev, IO_ACX_EE_START, 0x1);
++
++ /*
++ * Windows driver sleeps here for a while with this sequence
++ */
++ for (count = 0; count < 200; count++) {
++ udelay (50);
++ }
++
++ /* Windows driver writes 0x10000 to register 0x808 here */
++
++ write_reg32 (adev, 0x808, 0x10000);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_verify_init
++*/
++static int
++acxmem_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u32 irqstat = read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if ((irqstat != 0xFFFFFFFF) && (irqstat & HOST_INT_FCS_THRESHOLD)) {
++ result = OK;
++ write_reg32(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxmem_write_cmd_type_status
++*/
++
++static inline void
++acxmem_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ write_slavemem32 (adev, (u32) adev->cmd_area, type | (status << 16));
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxmem_read_cmd_type_status
++*/
++static u32
++acxmem_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = read_slavemem32 (adev, (u32) adev->cmd_area);
++
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxmem_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxmem_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8*) cmd_offs;
++ adev->info_area = (u8*) info_offs;
++ /*
++ log(L_DEBUG, "iobase2=%p\n"
++ */
++ log( L_DEBUG, "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxmem_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++static int
++acxmem_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++ u32 tmp;
++
++ FN_ENTER;
++ /*
++ write_reg32 (adev, IO_ACX_SLV_MEM_CP, 0);
++ */
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ /* Windows driver does some funny things here */
++ /*
++ * clear bit 0x200 in register 0x2A0
++ */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /*
++ * Set bit 0x200 in ACX_GPIO_OUT
++ */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++
++ /*
++ * read register 0x900 until its value is 0x8400104C, sleeping
++ * in between reads if it's not immediate
++ */
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ count = 500;
++ while (count-- && (tmp != ACX_VENDOR_ID)) {
++ mdelay (10);
++ tmp = read_reg32 (adev, REG_ACX_VENDOR_ID);
++ }
++
++ /* end what Windows driver does */
++
++ acxmem_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg32(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++ printk("ACX radio type 0x%02x\n", (hardware_info >> 8) & 0xff);
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxmem_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ clear_regbits (adev, IO_ACX_ECPU_CTRL, 0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* Windows driver clears bit 0x200 in register 0x2A0 here */
++ clear_regbits (adev, 0x2A0, 0x200);
++
++ /* Windows driver sets bit 0x200 in ACX_GPIO_OUT here */
++ set_regbits (adev, IO_ACX_GPIO_OUT, 0x200);
++ /* wait for eCPU bootup */
++ if (OK != acxmem_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++ init_mboxes(adev);
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxmem_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxmem_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ int i, j;
++ u8 *p;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxmem_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++#if DUMP_IF_SLOW > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("not idle");
++#endif
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /*
++ * slave memory version
++ */
++ copy_to_slavemem (adev, (u32) (adev->cmd_area + 4), buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxmem_write_cmd_type_status(adev, cmd, 0);
++
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxmem_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxmem_write_cmd_type_status(adev, ACX1xx_CMD_RESET, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ printk("%s: "FUNC"(): device irq status 0x%04x\n",
++ devname, read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES));
++ printk("%s: "FUNC"(): IO_ACX_IRQ_MASK 0x%04x IO_ACX_FEMR 0x%04x\n",
++ devname,
++ read_reg16 (adev, IO_ACX_IRQ_MASK),
++ read_reg16 (adev, IO_ACX_FEMR));
++ if (read_reg16 (adev, IO_ACX_IRQ_MASK) == 0xffff) {
++ printk ("acxmem: firmware probably hosed - reloading\n");
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ {
++ pm_message_t state;
++ acxmem_e_suspend (resume_pdev, state);
++ }
++#else
++ acxmem_e_suspend (adev->dev, 0);
++#endif
++ {
++ struct work_struct *notused;
++ fw_resumer (notused);
++ }
++ }
++
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buflen > 388) {
++ /*
++ * 388 is maximum command length
++ */
++ printk ("invalid length 0x%08x\n", buflen);
++ buflen = 388;
++ }
++ p = (u8 *) buffer;
++ for (i = 0; i < buflen; i+= 16) {
++ printk ("%04x:", i);
++ for (j = 0; (j < 16) && (i+j < buflen); j++) {
++ printk (" %02x", *p++);
++ }
++ printk ("\n");
++ }
++
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ copy_from_slavemem (adev, buffer, (u32) (adev->cmd_area + 4), buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#if defined(NONESSENTIAL_FEATURES)
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxmem_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++/***********************************************************************
++** acxmem_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++void
++acxmem_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ kfree(ptr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_delete_dma_regions
++*/
++static void
++acxmem_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ /*
++ * slave memory interface really doesn't like this.
++ */
++ /*
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++ */
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxmem_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_MEM_CP */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++/*
++ * Most of the acx specific pieces of hardware reset.
++ */
++static int
++acxmem_complete_hw_reset (acx_device_t *adev)
++{
++ acx111_ie_configoption_t co;
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxmem_s_reset_dev (adev))
++ return -1;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ copy_from_slavemem (adev, (u8*) &co, (u32) adev->cmd_area, sizeof (co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ return -3;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++ /*
++ * Set up transmit buffer administration
++ */
++ init_acx_txbuf (adev);
++
++ /*
++ * Windows driver writes 0x01000000 to register 0x288, RADIO_CTL, if the form factor
++ * is 3. It also write protects the EEPROM by writing 1<<9 to GPIO_OUT
++ */
++ if (adev->form_factor == 3) {
++ set_regbits (adev, 0x288, 0x01000000);
++ set_regbits (adev, 0x298, 1<<9);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxmem_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ return -2;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ return 0;
++}
++
++static int __devinit
++acxmem_e_probe(struct platform_device *pdev)
++{
++ struct acx_hardware_data *hwdata = pdev->dev.platform_data;
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ int i;
++ unsigned long addr_size=0;
++ u8 chip_type;
++
++ FN_ENTER;
++ (void) hwdata->start_hw();
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = CHIPTYPE_ACX100;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ printk("acx: found %s-based wireless network card\n", chip_name);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ goto fail_alloc_netdev;
++ }
++
++ platform_set_drvdata (pdev, ndev);
++
++ ether_setup(ndev);
++
++ /*
++ * use platform_data resources that were provided
++ */
++ ndev->irq = 0;
++ for (i=0; i<pdev->num_resources; i++) {
++ if (pdev->resource[i].flags == IORESOURCE_IRQ) {
++ ndev->irq = pdev->resource[i].start;
++ }
++ else if (pdev->resource[i].flags == IORESOURCE_MEM) {
++ ndev->base_addr = pdev->resource[i].start;
++ addr_size = pdev->resource[i].end - pdev->resource[i].start;
++ }
++ }
++ if (addr_size == 0 || ndev->irq == 0)
++ goto fail_hw_params;
++ ndev->open = &acxmem_e_open;
++ ndev->stop = &acxmem_e_close;
++ pdev->dev.release = &acxmem_e_release;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxmem_i_set_multicast_list;
++ ndev->tx_timeout = &acxmem_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ spin_lock_init(&adev->txbuf_lock);
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->dev = &pdev->dev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_MEM;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = (volatile u32 *) ndev->base_addr;
++ adev->iobase = (volatile u32 *) ioremap_nocache (ndev->base_addr, addr_size);
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#if defined(NONESSENTIAL_FEATURES)
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ SET_NETDEV_DEV(ndev, &pdev->dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", ndev->irq);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ if (OK != acxmem_complete_hw_reset (adev))
++ goto fail_reset;
++
++ /*
++ * Set up default things for most of the card settings.
++ */
++ acx_s_set_defaults(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /*
++ * Set up a default monitor type so that poor combinations of initialization
++ * sequences in monitor mode don't end up destroying the hardware type.
++ */
++ adev->monitor_type = ARPHRD_ETHER;
++
++ /*
++ * Register to receive inetaddr notifier changes. This will allow us to
++ * catch if the user changes the MAC address of the interface.
++ */
++ register_netdevice_notifier(&acx_netdev_notifier);
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxmem_s_delete_dma_regions(adev);
++
++fail_reset:
++fail_hw_params:
++ free_netdev(ndev);
++fail_alloc_netdev:
++fail_unknown_chiptype:
++
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static int __devexit
++acxmem_e_remove(struct platform_device *pdev)
++{
++ struct acx_hardware_data *hwdata = pdev->dev.platform_data;
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = (struct net_device*) platform_get_drvdata(pdev);
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxmem_l_power_led(adev, 0);
++
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxmem_l_reset_mac(adev);
++ } else {
++ u16 temp;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++
++ /*
++ * Unregister the notifier chain
++ */
++ unregister_netdevice_notifier(&acx_netdev_notifier);
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxmem_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxmem_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ acxmem_s_delete_dma_regions(adev);
++
++ /* finally, clean up PCI bus state */
++ if (adev->iobase) iounmap((void *)adev->iobase);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ (void) hwdata->stop_hw();
++
++ printk ("e_remove done\n");
++end:
++ FN_EXIT0;
++
++ return 0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxmem_e_suspend(struct platform_device *pdev, pm_message_t state)
++#else
++acxmem_e_suspend(struct device *pdev, u32 state)
++#endif
++{
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ acx_device_t *adev;
++ struct acx_hardware_data *hwdata;
++
++ FN_ENTER;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ hwdata = adev->dev->platform_data;
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(ndev); /* this one cannot sleep */
++ acxmem_s_down(ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxmem_s_delete_dma_regions(adev);
++
++ /*
++ * Turn the ACX chip off.
++ */
++ hwdata->stop_hw();
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++
++static void
++fw_resumer(struct work_struct *notused)
++{
++ struct platform_device *pdev = resume_pdev;
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ acx_device_t *adev;
++ struct acx_hardware_data *hwdata;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ return;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ hwdata = adev->dev->platform_data;
++
++ /*
++ * Turn on the ACX.
++ */
++ hwdata->start_hw();
++
++ acxmem_complete_hw_reset (adev);
++
++ /*
++ * done by acx_s_set_defaults for initial startup
++ */
++ acxmem_set_interrupt_mask(adev);
++
++ printk ("rsm: bringing up interface\n");
++ SET_BIT (adev->set_mask, GETSET_ALL);
++ acxmem_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-)
++ */
++ /* - most settings updated in acxmem_s_up()
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ */
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++ acx_sem_unlock(adev);
++}
++
++DECLARE_WORK( fw_resume_work, fw_resumer );
++
++static int
++acxmem_e_resume(struct platform_device *pdev)
++{
++ FN_ENTER;
++
++ resume_pdev = pdev;
++ schedule_work( &fw_resume_work );
++
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxmem_s_up
++**
++** This function is called by acxmem_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_down
++**
++** This disables the netdevice
++**
++** Side effects:
++** - disables on-card interrupt request
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxmem_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxmem_i_interrupt, SA_INTERRUPT, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ set_irq_type (ndev->irq, IRQT_FALLING);
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++
++ /* ifup device */
++ acxmem_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxmem_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxmem_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxmem_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxmem_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxmem_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxmem_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxmem_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxmem_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxmem_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ register rxdesc_t *rxdesc;
++ unsigned count, tail;
++ u32 addr;
++ u8 Ctl_8;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ /*
++ * Unlike the PCI interface, where the ACX can write directly to
++ * the host descriptors, on the slave memory interface we have to
++ * pull these. All we really need to do is check the Ctl_8 field
++ * in the rx descriptor on the ACX, which should be 0x11000000 if
++ * we should process it.
++ */
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_HOSTOWN) &&
++ (Ctl_8 & DESC_CTL_ACXDONE))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_8=%02X\n", tail, Ctl_8);
++ /*
++ * If the ACX has CTL_RECLAIM set on this descriptor there
++ * is no buffer associated; it just wants us to tell it to
++ * reclaim the memory.
++ */
++ if (!(Ctl_8 & DESC_CTL_RECLAIM)) {
++
++ /*
++ * slave interface - pull data now
++ */
++ hostdesc->length = read_slavemem16 (adev, (u32) &(rxdesc->total_length));
++
++ /*
++ * hostdesc->data is an rxbuffer_t, which includes header information,
++ * but the length in the data packet doesn't. The header information
++ * takes up an additional 12 bytes, so add that to the length we copy.
++ */
++ addr = read_slavemem32 (adev, (u32) &(rxdesc->ACXMemPtr));
++ if (addr) {
++ /*
++ * How can &(rxdesc->ACXMemPtr) above ever be zero? Looks like we
++ * get that now and then - try to trap it for debug.
++ */
++ if (addr & 0xffff0000) {
++ printk("rxdesc 0x%08x\n", (u32) rxdesc);
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("Bad access!");
++ }
++ chaincopy_from_slavemem (adev, (u8 *) hostdesc->data, addr,
++ hostdesc->length +
++ (u32) &((rxbuffer_t *)0)->hdr_a3);
++ acx_l_process_rxbuf(adev, hostdesc->data);
++ }
++ }
++ else {
++ printk ("rx reclaim only!\n");
++ }
++
++ hostdesc->Status = 0;
++
++ /*
++ * Let the ACX know we're done.
++ */
++ CLEAR_BIT (Ctl_8, DESC_CTL_HOSTOWN);
++ SET_BIT (Ctl_8, DESC_CTL_HOSTDONE);
++ SET_BIT (Ctl_8, DESC_CTL_RECLAIM);
++ write_slavemem8 (adev, (u32) &rxdesc->Ctl_8, Ctl_8);
++
++ /*
++ * Now tell the ACX we've finished with the receive buffer so
++ * it can finish the reclaim.
++ */
++ write_reg16 (adev, IO_ACX_INT_TRIG, INT_TRIG_RXPRC);
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++ rxdesc = &adev->rxdesc_start[tail];
++
++ Ctl_8 = hostdesc->Ctl_16 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++
++ /* if next descriptor is empty, then bail out */
++ if (!(Ctl_8 & DESC_CTL_HOSTOWN) || !(Ctl_8 & DESC_CTL_ACXDONE))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = read_slavemem32 (adev, (u32) adev->info_area);
++
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ write_slavemem32(adev, (u32) adev->info_area, info_type | 0x00010000);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ printk(" Rx_Complete");
++ }
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxmem_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxmem_i_interrupt(int irq, void *dev_id)
++#else
++acxmwm_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_DATA) {
++ log(L_IRQ, "got Rx_Data IRQ\n");
++ acxmem_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxmem_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxmem_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ /* | HOST_INT_RX_DATA */
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ | HOST_INT_RX_COMPLETE
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxmem_l_power_led
++*/
++void
++acxmem_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ printk ("Interrogating queue config\n");
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++ printk ("done with queue config\n");
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ printk ("Interrogating mem config options\n");
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++ printk ("done with mem config options\n");
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ printk ("Interrogating mem map\n");
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++ printk ("done with mem map\n");
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ printk ("Interrogating rxconfig\n");
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++ printk ("done with queue rxconfig\n");
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ printk ("Interrogating fcs err count\n");
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++ printk ("done with err count\n");
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ printk ("Interrogating rate fallback\n");
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++ printk ("done with rate fallback\n");
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++/***************************************************************
++** acxmem_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxmem_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++ static int txattempts = 0;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ /*
++ * Probably the ACX ignored a transmit attempt and now there's a packet
++ * sitting in the queue we think should be transmitting but the ACX doesn't
++ * know about.
++ * On the first pass, send the ACX a TxProc interrupt to try moving
++ * things along, and if that doesn't work (ie, we get called again) completely
++ * flush the transmit queue.
++ */
++ if (txattempts < 10) {
++ txattempts++;
++ printk ("acx: trying to wake up ACX\n");
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev); }
++ else {
++ txattempts = 0;
++ printk ("acx: flushing transmit queue.\n");
++ acxmem_l_clean_txdesc_emergency (adev);
++ }
++ txdesc = NULL;
++ goto end;
++ }
++
++ /*
++ * Make a quick check to see if there is transmit buffer space on
++ * the ACX. This can't guarantee there is enough space for the packet
++ * since we don't yet know how big it is, but it will prevent at least some
++ * annoyances.
++ */
++ if (!adev->acx_txbuf_blocks_free) {
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ /*
++ * txdesc points to ACX memory
++ */
++ txdesc = get_txdesc(adev, head);
++ ctl8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++
++ /*
++ * If we don't own the buffer (HOSTOWN) it is certainly not free; however,
++ * we may have previously thought we had enough memory to send
++ * a packet, allocated the buffer then gave up when we found not enough
++ * transmit buffer space on the ACX. In that case, HOSTOWN and
++ * ACXDONE will both be set.
++ */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_ACXDONE_HOSTOWN);
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***************************************************************
++** acxmem_l_dealloc_tx
++** Clears out a previously allocatedvoid acxmem_l_dealloc_tx(tx_t *tx_opaque);
++ transmit descriptor. The ACX
++** can get confused if we skip transmit descriptors in the queue,
++** so when we don't need a descriptor return it to its original
++** state and move the queue head pointer back.
++**
++*/
++void
++acxmem_l_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque)
++{
++ /*
++ * txdesc is the address of the descriptor on the ACX.
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txdesc_t tmptxdesc;
++ int index;
++
++ memset (&tmptxdesc, 0, sizeof(tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ /*
++ * Clear out all of the transmit descriptor except for the next pointer
++ */
++ copy_to_slavemem (adev, (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc));
++
++ /*
++ * This is only called immediately after we've allocated, so we should
++ * be able to set the head back to this descriptor.
++ */
++ index = ((u8*) txdesc - (u8*)adev->txdesc_start) / adev->txdesc_size;
++ printk ("acx_dealloc: moving head from %d to %d\n", adev->tx_head, index);
++ adev->tx_head = index;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxmem_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxmem_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxmem_update_queue_indicator (acx_device_t *adev, int txqueue)
++{
++#ifdef USING_MORE_THAN_ONE_TRANSMIT_QUEUE
++ u32 indicator;
++ unsigned long flags;
++ int count;
++
++ /*
++ * Can't handle an interrupt while we're fiddling with the ACX's lock,
++ * according to TI. The ACX is supposed to hold fw_lock for at most
++ * 500ns.
++ */
++ local_irq_save (flags);
++
++ /*
++ * Wait for ACX to release the lock (at most 500ns).
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++ if (count < 50) {
++
++ /*
++ * Take out the host lock - anything non-zero will work, so don't worry about
++ * be/le
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 1);
++
++ /*
++ * Avoid a race condition
++ */
++ count = 0;
++ while (read_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->fw_lock))
++ && (count++ < 50)) {
++ ndelay (10);
++ }
++
++ if (count < 50) {
++ /*
++ * Mark the queue active
++ */
++ indicator = read_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator));
++ indicator |= cpu_to_le32 (1 << txqueue);
++ write_slavemem32 (adev, (u32) &(adev->acx_queue_indicator->indicator), indicator);
++ }
++
++ /*
++ * Release the host lock
++ */
++ write_slavemem16 (adev, (u32) &(adev->acx_queue_indicator->host_lock), 0);
++
++ }
++
++ /*
++ * Restore interrupts
++ */
++ local_irq_restore (flags);
++#endif
++}
++
++void
++acxmem_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ /*
++ * txdesc is the address on the ACX
++ */
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++ u32 addr;
++
++ FN_ENTER;
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), cpu_to_le16(len));
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ write_slavemem8 (adev, (u32) &(txdesc->u.r1.rate), rate_100);
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_FIRSTFRAG);
++
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++
++ /*
++ * Since we're not using autodma copy the packet data to the acx now.
++ * Even host descriptors point to the packet header, and the odd indexed
++ * descriptor following points to the packet data.
++ *
++ * The first step is to find free memory in the ACX transmit buffers.
++ * They don't necessarily map one to one with the transmit queue entries,
++ * so search through them starting just after the last one used.
++ */
++ addr = allocate_acx_txbuf_space (adev, len);
++ if (addr) {
++ chaincopy_to_slavemem (adev, addr, hostdesc1->data, len);
++ }
++ else {
++ /*
++ * Bummer. We thought we might have enough room in the transmit
++ * buffers to send this packet, but it turns out we don't. alloc_tx
++ * has already marked this transmit descriptor as HOSTOWN and ACXDONE,
++ * which means the ACX will hang when it gets to this descriptor unless
++ * we do something about it. Having a bubble in the transmit queue just
++ * doesn't seem to work, so we have to reset this transmit queue entry's
++ * state to its original value and back up our head pointer to point
++ * back to this entry.
++ */
++ hostdesc1->length = 0;
++ hostdesc2->length = 0;
++ write_slavemem16 (adev, (u32) &(txdesc->total_length), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG);
++ adev->tx_head = ((u8*) txdesc - (u8*) adev->txdesc_start) / adev->txdesc_size;
++ goto end;
++ }
++ /*
++ * Tell the ACX where the packet is.
++ */
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), addr);
++
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ //wmb();
++
++ /* write back modified flags */
++ /*
++ * At this point Ctl_8 should just be FIRSTFRAG
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl2_8),Ctl2_8);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), Ctl_8);
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /*
++ * Update the queue indicator to say there's data on the first queue.
++ */
++ acxmem_update_queue_indicator (adev, 0);
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate)),
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u8 Ctl_8;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ printk(" %02X", Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxmem_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100, Ctl_8;
++ u32 acxmem;
++ txdesc_t tmptxdesc;
++
++ FN_ENTER;
++
++ /*
++ * Set up a template descriptor for re-initialization. The only
++ * things that get set are Ctl_8 and the rate, and the rate defaults
++ * to 1Mbps.
++ */
++ memset (&tmptxdesc, 0, sizeof (tmptxdesc));
++ tmptxdesc.Ctl_8 = DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG;
++ tmptxdesc.u.r1.rate = 0x0a;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if ((Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = read_slavemem8 (adev, (u32) &(txdesc->error));
++ ack_failures = read_slavemem8 (adev, (u32) &(txdesc->ack_failures));
++ rts_failures = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures));
++ rts_ok = read_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok));
++ r100 = read_slavemem8 (adev, (u32) &(txdesc->u.r1.rate));
++ r111 = le16_to_cpu(read_slavemem16 (adev, (u32) &(txdesc->u.r2.rate111)));
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /*
++ * Free up the transmit data buffers
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ /* ...and free the desc by clearing all the fields
++ except the next pointer */
++ copy_to_slavemem (adev,
++ (u32) &(txdesc->HostMemPtr),
++ (u8 *) &(tmptxdesc.HostMemPtr),
++ sizeof (tmptxdesc) - sizeof(tmptxdesc.pNextDesc)
++ );
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxmem_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++ u32 acxmem;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ write_slavemem8 (adev, (u32) &(txdesc->ack_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_failures), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->u.rts.rts_ok), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->error), 0);
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8), DESC_CTL_HOSTOWN);
++
++ /*
++ * Clean up the memory allocated on the ACX for this transmit descriptor.
++ */
++ acxmem = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (acxmem) {
++ reclaim_acx_txbuf_space (adev, acxmem);
++ }
++
++ write_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr), 0);
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxmem_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++ ptr = kmalloc (size, GFP_KERNEL);
++ /*
++ * The ACX can't use the physical address, so we'll have to fake it
++ * later and it might be handy to have the virtual address.
++ */
++ *phy = (dma_addr_t) NULL;
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++/*
++ * In the generic slave memory access mode, most of the stuff in
++ * the txhostdesc_t is unused. It's only here because the rest of
++ * the ACX driver expects it to be since the PCI version uses indirect
++ * host memory organization with DMA. Since we're not using DMA the
++ * only use we have for the host descriptors is to store the packets
++ * on the way out.
++ */
++static int
++acxmem_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ txbuf = adev->txbuf_start;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxmem_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ hostdesc = adev->rxhostdesc_start;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ rxbuf++;
++ hostdesc++;
++ }
++ hostdesc--;
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxmem_s_create_hostdesc_queues
++*/
++int
++acxmem_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxmem_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxmem_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxmem_create_tx_desc_queue
++*/
++static void
++acxmem_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ u32 clr;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ /*
++ * This refers to an ACX address, not one of ours
++ */
++ adev->txdesc_start = (txdesc_t *) tx_queue_start;
++
++ log(L_DEBUG, "adev->txdesc_start=%p\n",
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++
++ /*
++ * adev->txdesc_start refers to device memory, so we can't write
++ * directly to it.
++ */
++ clr = (u32) adev->txdesc_start;
++ while (clr < (u32) adev->txdesc_start + (TX_CNT * sizeof(*txdesc))) {
++ write_slavemem32 (adev, clr, 0);
++ clr += 4;
++ }
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* initialise ctl */
++ /*
++ * No auto DMA here
++ */
++ write_slavemem8 (adev, (u32) &(txdesc->Ctl_8),
++ (u8) (DESC_CTL_HOSTOWN | DESC_CTL_FIRSTFRAG));
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++
++ /* point to next txdesc */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) txdesc + adev->txdesc_size));
++
++ /* go to the next one */
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(txdesc->pNextDesc),
++ (u32) cpu_to_le32 (tx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_rx_desc_queue
++*/
++static void
++acxmem_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) rx_queue_start;
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ acx2cpu(rxdesc->pNextDesc);
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ mem_offs = (u32) adev->rxdesc_start;
++ while (mem_offs < (u32) adev->rxdesc_start + (RX_CNT * sizeof (*rxdesc))) {
++ write_slavemem32 (adev, mem_offs, 0);
++ mem_offs += 4;
++ }
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ /* point to next rxdesc */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 ((u8 *) rxdesc + sizeof(*rxdesc)));
++ /* go to the next one */
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ write_slavemem32 (adev, (u32) &(rxdesc->pNextDesc),
++ (u32) cpu_to_le32 (rx_queue_start));
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxmem_create_desc_queues
++*/
++void
++acxmem_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ u32 *p;
++ int i;
++
++ acxmem_create_tx_desc_queue(adev, tx_queue_start);
++ acxmem_create_rx_desc_queue(adev, rx_queue_start);
++ p = (u32 *) adev->acx_queue_indicator;
++ for (i = 0; i < 4; i++) {
++ write_slavemem32 (adev, (u32) p, 0);
++ p++;
++ }
++}
++
++
++/***************************************************************
++** acxmem_s_proc_diag_output
++*/
++char*
++acxmem_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ txdesc_t *txdesc;
++ u8 Ctl_8;
++ rxdesc_t *rxdesc;
++ int i;
++ u32 tmp;
++ txdesc_t txd;
++ u8 buf[0x200];
++ int j, k;
++
++ FN_ENTER;
++
++#if DUMP_MEM_DURING_DIAG > 0
++ dump_acxmem (adev, 0, 0x10000);
++ panic ("dump finished");
++#endif
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxdesc = adev->rxdesc_start;
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ Ctl_8 = read_slavemem8 (adev, (u32) &(rxdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u (%02x) FULL%s\n", i, Ctl_8, rtl);
++ else
++ p += sprintf(p, "%02u (%02x) empty%s\n", i, Ctl_8, rtl);
++ rxdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++
++ p += sprintf(p, "** Tx buf %d blocks total, %d available, free list head %04x\n",
++ adev->acx_txbuf_numblocks, adev->acx_txbuf_blocks_free, adev->acx_txbuf_free);
++ txdesc = adev->txdesc_start;
++ if (txdesc) {
++ for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ copy_from_slavemem (adev, (u8 *) &txd, (u32) txdesc, sizeof (txd));
++ Ctl_8 = read_slavemem8 (adev, (u32) &(txdesc->Ctl_8));
++ if (Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u ready to free (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else if (Ctl_8 & DESC_CTL_HOSTOWN)
++ p += sprintf(p, "%02u available (%02X)%s%s", i, Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u busy (%02X)%s%s", i, Ctl_8, thd, ttl);
++ tmp = read_slavemem32 (adev, (u32) &(txdesc->AcxMemPtr));
++ if (tmp) {
++ p += sprintf (p, " %04x", tmp);
++ while ((tmp = read_slavemem32 (adev, (u32) tmp)) != 0x02000000) {
++ tmp <<= 5;
++ p += sprintf (p, " %04x", tmp);
++ }
++ }
++ p += sprintf (p, "\n");
++ p += sprintf (p, " %04x: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x\n"
++ "%02x %02x %02x %02x %04x\n",
++ (u32) txdesc,
++ txd.pNextDesc.v, txd.HostMemPtr.v, txd.AcxMemPtr.v, txd.tx_time,
++ txd.total_length, txd.Reserved,
++ txd.dummy[0], txd.dummy[1], txd.dummy[2], txd.dummy[3],
++ txd.Ctl_8, txd.Ctl2_8, txd.error, txd.ack_failures,
++ txd.u.rts.rts_failures, txd.u.rts.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl,
++ txd.queue_info
++ );
++ if (txd.AcxMemPtr.v) {
++ copy_from_slavemem (adev, buf, txd.AcxMemPtr.v, sizeof (buf));
++ for (j = 0; (j < txd.total_length) && (j<(sizeof(buf)-4)); j+=16) {
++ p += sprintf (p, " ");
++ for (k = 0; (k < 16) && (j+k < txd.total_length); k++) {
++ p += sprintf (p, " %02x", buf[j+k+4]);
++ }
++ p += sprintf (p, "\n");
++ }
++ }
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ }
++
++ p += sprintf(p,
++ "\n"
++ "** Generic slave data **\n"
++ "irq_mask 0x%04x irq_status 0x%04x irq on acx 0x%04x\n"
++ "txbuf_start 0x%p, txbuf_area_size %u\n"
++ "txdesc_size %u, txdesc_start 0x%p\n"
++ "txhostdesc_start 0x%p, txhostdesc_area_size %u\n"
++ "txbuf start 0x%04x, txbuf size %d\n"
++ "rxdesc_start 0x%p\n"
++ "rxhostdesc_start 0x%p, rxhostdesc_area_size %u\n"
++ "rxbuf_start 0x%p, rxbuf_area_size %u\n",
++ adev->irq_mask, adev->irq_status, read_reg32(adev, IO_ACX_IRQ_STATUS_NON_DES),
++ adev->txbuf_start, adev->txbuf_area_size,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ adev->acx_txbuf_start, adev->acx_txbuf_numblocks * adev->memblocksize,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ adev->rxbuf_start, adev->rxbuf_area_size);
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxmem_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxmem_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxmem_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_OVERFLOW
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ | HOST_INT_RX_DATA
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ /* | HOST_INT_RX_COMPLETE */
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_BEACON_MISSED */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100mem_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ struct acx111_ie_tx_level tx_level;
++
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ /*
++ * The hx4700 EEPROM, at least, only supports 1 power setting. The configure
++ * routine matches the PA bias with the gain, so just use its default value.
++ * The values are: 0x2b for the gain and 0x03 for the PA bias. The firmware
++ * writes the gain level to the Tx gain control DAC and the PA bias to the Maxim
++ * radio's PA bias register. The firmware limits itself to 0 - 64 when writing to the
++ * gain control DAC.
++ *
++ * Physically between the ACX and the radio, higher Tx gain control DAC values result
++ * in less power output; 0 volts to the Maxim radio results in the highest output power
++ * level, which I'm assuming matches up with 0 in the Tx Gain DAC register.
++ *
++ * Although there is only the 1 power setting, one of the radio firmware functions adjusts
++ * the transmit power level up and down. That function is called by the ACX FIQ handler
++ * under certain conditions.
++ */
++ tx_level.level = 1;
++ //return acx_s_configure(adev, &tx_level, ACX1xx_IE_DOT11_TX_POWER_LEVEL);
++
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxmem_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++
++ return 0;
++}
++
++
++static struct platform_driver
++acxmem_drv_id = {
++ .driver = {
++ .name = "acx-mem",
++ },
++ .probe = acxmem_e_probe,
++ .remove = __devexit_p(acxmem_e_remove),
++#ifdef CONFIG_PM
++ .suspend = acxmem_e_suspend,
++ .resume = acxmem_e_resume
++#endif /* CONFIG_PM */
++};
++
++
++/***********************************************************************
++** acxmem_e_init_module
++**
++** Module initialization routine, called once at module load time
++*/
++int __init
++acxmem_e_init_module(void)
++{
++ int res;
++
++ FN_ENTER;
++
++#if (ACX_IO_WIDTH==32)
++ printk("acx: compiled to use 32bit I/O access. "
++ "I/O timing issues might occur, such as "
++ "non-working firmware upload. Report them\n");
++#else
++ printk("acx: compiled to use 16bit I/O access only "
++ "(compatibility mode)\n");
++#endif
++
++#ifdef __LITTLE_ENDIAN
++#define ENDIANNESS_STRING "running on a little-endian CPU\n"
++#else
++#define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
++#endif
++ log(L_INIT,
++ ENDIANNESS_STRING
++ "PCI module " ACX_RELEASE " initialized, "
++ "waiting for cards to probe...\n"
++ );
++
++ res = platform_driver_register (&acxmem_drv_id);
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxmem_e_cleanup_module
++**
++** Called at module unload time. This is our last chance to
++** clean up after ourselves.
++*/
++void __exit
++acxmem_e_cleanup_module(void)
++{
++ FN_ENTER;
++
++ printk ("cleanup_module\n");
++ platform_driver_unregister( &acxmem_drv_id );
++
++ FN_EXIT0;
++}
++
++void acxmem_e_release(struct device *dev) {
++}
++
++MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
++MODULE_DESCRIPTION( "ACX Slave Memory Driver" );
++MODULE_LICENSE( "GPL" );
++
+Index: linux-2.6.23/drivers/net/wireless/acx/pci.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/pci.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,4234 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++#define ACX_PCI 1
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++
++/* Linux 2.6.18+ uses <linux/utsrelease.h> */
++#ifndef UTS_RELEASE
++#include <linux/utsrelease.h>
++#endif
++
++#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <linux/types.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/if_arp.h>
++#include <linux/rtnetlink.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/netdevice.h>
++#include <linux/ioport.h>
++#include <linux/pci.h>
++#include <linux/pm.h>
++#include <linux/vmalloc.h>
++#include <linux/dma-mapping.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++#define PCI_TYPE (PCI_USES_MEM | PCI_ADDR0 | PCI_NO_ACPI_WAKE)
++#define PCI_ACX100_REGION1 0x01
++#define PCI_ACX100_REGION1_SIZE 0x1000 /* Memory size - 4K bytes */
++#define PCI_ACX100_REGION2 0x02
++#define PCI_ACX100_REGION2_SIZE 0x10000 /* Memory size - 64K bytes */
++
++#define PCI_ACX111_REGION1 0x00
++#define PCI_ACX111_REGION1_SIZE 0x2000 /* Memory size - 8K bytes */
++#define PCI_ACX111_REGION2 0x01
++#define PCI_ACX111_REGION2_SIZE 0x20000 /* Memory size - 128K bytes */
++
++/* Texas Instruments Vendor ID */
++#define PCI_VENDOR_ID_TI 0x104c
++
++/* ACX100 22Mb/s WLAN controller */
++#define PCI_DEVICE_ID_TI_TNETW1100A 0x8400
++#define PCI_DEVICE_ID_TI_TNETW1100B 0x8401
++
++/* ACX111 54Mb/s WLAN controller */
++#define PCI_DEVICE_ID_TI_TNETW1130 0x9066
++
++/* PCI Class & Sub-Class code, Network-'Other controller' */
++#define PCI_CLASS_NETWORK_OTHERS 0x0280
++
++#define CARD_EEPROM_ID_SIZE 6
++
++#ifndef PCI_D0
++/* From include/linux/pci.h */
++#define PCI_D0 0
++#define PCI_D1 1
++#define PCI_D2 2
++#define PCI_D3hot 3
++#define PCI_D3cold 4
++#define PCI_UNKNOWN 5
++#define PCI_POWER_ERROR -1
++#endif
++
++
++/***********************************************************************
++*/
++static void acxpci_i_tx_timeout(struct net_device *ndev);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id);
++#else
++static irqreturn_t acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs);
++#endif
++static void acxpci_i_set_multicast_list(struct net_device *ndev);
++
++static int acxpci_e_open(struct net_device *ndev);
++static int acxpci_e_close(struct net_device *ndev);
++static void acxpci_s_up(struct net_device *ndev);
++static void acxpci_s_down(struct net_device *ndev);
++
++
++/***********************************************************************
++** Register access
++*/
++
++/* Pick one */
++/* #define INLINE_IO static */
++#define INLINE_IO static inline
++
++INLINE_IO u32
++read_reg32(acx_device_t *adev, unsigned int offset)
++{
++#if ACX_IO_WIDTH == 32
++ return readl((u8 *)adev->iobase + adev->io[offset]);
++#else
++ return readw((u8 *)adev->iobase + adev->io[offset])
++ + (readw((u8 *)adev->iobase + adev->io[offset] + 2) << 16);
++#endif
++}
++
++INLINE_IO u16
++read_reg16(acx_device_t *adev, unsigned int offset)
++{
++ return readw((u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO u8
++read_reg8(acx_device_t *adev, unsigned int offset)
++{
++ return readb((u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO void
++write_reg32(acx_device_t *adev, unsigned int offset, u32 val)
++{
++#if ACX_IO_WIDTH == 32
++ writel(val, (u8 *)adev->iobase + adev->io[offset]);
++#else
++ writew(val & 0xffff, (u8 *)adev->iobase + adev->io[offset]);
++ writew(val >> 16, (u8 *)adev->iobase + adev->io[offset] + 2);
++#endif
++}
++
++INLINE_IO void
++write_reg16(acx_device_t *adev, unsigned int offset, u16 val)
++{
++ writew(val, (u8 *)adev->iobase + adev->io[offset]);
++}
++
++INLINE_IO void
++write_reg8(acx_device_t *adev, unsigned int offset, u8 val)
++{
++ writeb(val, (u8 *)adev->iobase + adev->io[offset]);
++}
++
++/* Handle PCI posting properly:
++ * Make sure that writes reach the adapter in case they require to be executed
++ * *before* the next write, by reading a random (and safely accessible) register.
++ * This call has to be made if there is no read following (which would flush the data
++ * to the adapter), yet the written data has to reach the adapter immediately. */
++INLINE_IO void
++write_flush(acx_device_t *adev)
++{
++ /* readb(adev->iobase + adev->io[IO_ACX_INFO_MAILBOX_OFFS]); */
++ /* faster version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should also be safe): */
++ readb(adev->iobase);
++}
++
++INLINE_IO int
++adev_present(acx_device_t *adev)
++{
++ /* fast version (accesses the first register, IO_ACX_SOFT_RESET,
++ * which should be safe): */
++ return readl(adev->iobase) != 0xffffffff;
++}
++
++
++/***********************************************************************
++*/
++static inline txdesc_t*
++get_txdesc(acx_device_t *adev, int index)
++{
++ return (txdesc_t*) (((u8*)adev->txdesc_start) + index * adev->txdesc_size);
++}
++
++static inline txdesc_t*
++advance_txdesc(acx_device_t *adev, txdesc_t* txdesc, int inc)
++{
++ return (txdesc_t*) (((u8*)txdesc) + inc * adev->txdesc_size);
++}
++
++static txhostdesc_t*
++get_txhostdesc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return &adev->txhostdesc_start[index*2];
++}
++
++static inline client_t*
++get_txc(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return NULL;
++ }
++ return adev->txc[index];
++}
++
++static inline u16
++get_txr(acx_device_t *adev, txdesc_t* txdesc)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ index /= adev->txdesc_size;
++ return adev->txr[index];
++}
++
++static inline void
++put_txcr(acx_device_t *adev, txdesc_t* txdesc, client_t* c, u16 r111)
++{
++ int index = (u8*)txdesc - (u8*)adev->txdesc_start;
++ if (unlikely(ACX_DEBUG && (index % adev->txdesc_size))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ index /= adev->txdesc_size;
++ if (unlikely(ACX_DEBUG && (index >= TX_CNT))) {
++ printk("bad txdesc ptr %p\n", txdesc);
++ return;
++ }
++ adev->txc[index] = c;
++ adev->txr[index] = r111;
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxpci_read_eeprom_byte
++**
++** Function called to read an octet in the EEPROM.
++**
++** This function is used by acxpci_e_probe to check if the
++** connected card is a legal one or not.
++**
++** Arguments:
++** adev ptr to acx_device structure
++** addr address to read in the EEPROM
++** charbuf ptr to a char. This is where the read octet
++** will be stored
++*/
++int
++acxpci_read_eeprom_byte(acx_device_t *adev, u32 addr, u8 *charbuf)
++{
++ int result;
++ int count;
++
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for EEPROM read\n",
++ adev->ndev->name);
++ result = NOT_OK;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ *charbuf = read_reg8(adev, IO_ACX_EEPROM_DATA);
++ log(L_DEBUG, "EEPROM at 0x%04X = 0x%02X\n", addr, *charbuf);
++ result = OK;
++
++fail:
++ return result;
++}
++
++
++/***********************************************************************
++** We don't lock hw accesses here since we never r/w eeprom in IRQ
++** Note: this function sleeps only because of GFP_KERNEL alloc
++*/
++#ifdef UNUSED
++int
++acxpci_s_write_eeprom(acx_device_t *adev, u32 addr, u32 len, const u8 *charbuf)
++{
++ u8 *data_verify = NULL;
++ unsigned long flags;
++ int count, i;
++ int result = NOT_OK;
++ u16 gpio_orig;
++
++ printk("acx: WARNING! I would write to EEPROM now. "
++ "Since I really DON'T want to unless you know "
++ "what you're doing (THIS CODE WILL PROBABLY "
++ "NOT WORK YET!), I will abort that now. And "
++ "definitely make sure to make a "
++ "/proc/driver/acx_wlan0_eeprom backup copy first!!! "
++ "(the EEPROM content includes the PCI config header!! "
++ "If you kill important stuff, then you WILL "
++ "get in trouble and people DID get in trouble already)\n");
++ return OK;
++
++ FN_ENTER;
++
++ data_verify = kmalloc(len, GFP_KERNEL);
++ if (!data_verify) {
++ goto end;
++ }
++
++ /* first we need to enable the OE (EEPROM Output Enable) GPIO line
++ * to be able to write to the EEPROM.
++ * NOTE: an EEPROM writing success has been reported,
++ * but you probably have to modify GPIO_OUT, too,
++ * and you probably need to activate a different GPIO
++ * line instead! */
++ gpio_orig = read_reg16(adev, IO_ACX_GPIO_OE);
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig & ~1);
++ write_flush(adev);
++
++ /* ok, now start writing the data out */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_reg32(adev, IO_ACX_EEPROM_DATA, *(charbuf + i));
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 1);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("WARNING, DANGER!!! "
++ "Timeout waiting for EEPROM write\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++ }
++
++ /* disable EEPROM writing */
++ write_reg16(adev, IO_ACX_GPIO_OE, gpio_orig);
++ write_flush(adev);
++
++ /* now start a verification run */
++ for (i = 0; i < len; i++) {
++ write_reg32(adev, IO_ACX_EEPROM_CFG, 0);
++ write_reg32(adev, IO_ACX_EEPROM_ADDR, addr + i);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_EEPROM_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg16(adev, IO_ACX_EEPROM_CTL)) {
++ if (unlikely(!--count)) {
++ printk("timeout waiting for EEPROM read\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ data_verify[i] = read_reg16(adev, IO_ACX_EEPROM_DATA);
++ }
++
++ if (0 == memcmp(charbuf, data_verify, len))
++ result = OK; /* read data matches, success */
++
++end:
++ kfree(data_verify);
++ FN_EXIT1(result);
++ return result;
++}
++#endif /* UNUSED */
++
++
++/***********************************************************************
++** acxpci_s_read_phy_reg
++**
++** Messing with rx/tx disabling and enabling here
++** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
++*/
++int
++acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ int result = NOT_OK;
++ int count;
++
++ FN_ENTER;
++
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 2);
++
++ count = 0xffff;
++ while (read_reg32(adev, IO_ACX_PHY_CTL)) {
++ /* scheduling away instead of CPU burning loop
++ * doesn't seem to work here at all:
++ * awful delay, sometimes also failure.
++ * Doesn't matter anyway (only small delay). */
++ if (unlikely(!--count)) {
++ printk("%s: timeout waiting for phy read\n",
++ adev->ndev->name);
++ *charbuf = 0;
++ goto fail;
++ }
++ cpu_relax();
++ }
++
++ log(L_DEBUG, "count was %u\n", count);
++ *charbuf = read_reg8(adev, IO_ACX_PHY_DATA);
++
++ log(L_DEBUG, "radio PHY at 0x%04X = 0x%02X\n", *charbuf, reg);
++ result = OK;
++ goto fail; /* silence compiler warning */
++fail:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++*/
++int
++acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ FN_ENTER;
++
++ /* mprusko said that 32bit accesses result in distorted sensitivity
++ * on his card. Unconfirmed, looks like it's not true (most likely since we
++ * now properly flush writes). */
++ write_reg32(adev, IO_ACX_PHY_DATA, value);
++ write_reg32(adev, IO_ACX_PHY_ADDR, reg);
++ write_flush(adev);
++ write_reg32(adev, IO_ACX_PHY_CTL, 1);
++ write_flush(adev);
++ log(L_DEBUG, "radio PHY write 0x%02X at 0x%04X\n", value, reg);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++#define NO_AUTO_INCREMENT 1
++
++/***********************************************************************
++** acxpci_s_write_fw
++**
++** Write the firmware image into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** 1 firmware image corrupted
++** 0 success
++*/
++static int
++acxpci_s_write_fw(acx_device_t *adev, const firmware_image_t *fw_image, u32 offset)
++{
++ int len, size;
++ u32 sum, v32;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++ write_flush(adev);
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ sum += p[0]+p[1]+p[2]+p[3];
++ p += 4;
++ len += 4;
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++ write_flush(adev);
++#endif
++ write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
++ }
++
++ log(L_DEBUG, "firmware written, size:%d sum1:%x sum2:%x\n",
++ size, sum, le32_to_cpu(fw_image->chksum));
++
++ /* compare our checksum with the stored image checksum */
++ return (sum != le32_to_cpu(fw_image->chksum));
++}
++
++
++/***********************************************************************
++** acxpci_s_validate_fw
++**
++** Compare the firmware image given with
++** the firmware image written into the card.
++**
++** Arguments:
++** adev wlan device structure
++** fw_image firmware image.
++**
++** Returns:
++** NOT_OK firmware image corrupted or not correctly written
++** OK success
++*/
++static int
++acxpci_s_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
++ u32 offset)
++{
++ u32 sum, v32, w32;
++ int len, size;
++ int result = OK;
++ /* we skip the first four bytes which contain the control sum */
++ const u8 *p = (u8*)fw_image + 4;
++
++ /* start the image checksum by adding the image size value */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ write_reg32(adev, IO_ACX_SLV_END_CTL, 0);
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
++#else
++ write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
++#endif
++
++ len = 0;
++ size = le32_to_cpu(fw_image->size) & (~3);
++
++ while (likely(len < size)) {
++ v32 = be32_to_cpu(*(u32*)p);
++ p += 4;
++ len += 4;
++
++#if NO_AUTO_INCREMENT
++ write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
++#endif
++ w32 = read_reg32(adev, IO_ACX_SLV_MEM_DATA);
++
++ if (unlikely(w32 != v32)) {
++ printk("acx: FATAL: firmware upload: "
++ "data parts at offset %d don't match (0x%08X vs. 0x%08X)! "
++ "I/O timing issues or defective memory, with DWL-xx0+? "
++ "ACX_IO_WIDTH=16 may help. Please report\n",
++ len, v32, w32);
++ result = NOT_OK;
++ break;
++ }
++
++ sum += (u8)w32 + (u8)(w32>>8) + (u8)(w32>>16) + (u8)(w32>>24);
++ }
++
++ /* sum control verification */
++ if (result != NOT_OK) {
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match!\n");
++ result = NOT_OK;
++ }
++ }
++
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_s_upload_fw
++**
++** Called from acx_reset_dev
++*/
++static int
++acxpci_s_upload_fw(acx_device_t *adev)
++{
++ firmware_image_t *fw_image = NULL;
++ int res = NOT_OK;
++ int try;
++ u32 file_size;
++ char filename[sizeof("tiacx1NNcNN")];
++
++ FN_ENTER;
++
++ /* print exact chipset and radio ID to make sure people really get a clue on which files exactly they are supposed to provide,
++ * since firmware loading is the biggest enduser PITA with these chipsets.
++ * Not printing radio ID in 0xHEX in order to not confuse them into wrong file naming */
++ printk( "acx: need to load firmware for acx1%02d chipset with radio ID %02x, please provide via firmware hotplug:\n"
++ "acx: either one file only (<c>ombined firmware image file, radio-specific) or two files (radio-less base image file *plus* separate <r>adio-specific extension file)\n",
++ IS_ACX111(adev)*11, adev->radio_type);
++
++ /* Try combined, then main image */
++ adev->need_radio_fw = 0;
++ snprintf(filename, sizeof(filename), "tiacx1%02dc%02X",
++ IS_ACX111(adev)*11, adev->radio_type);
++
++ fw_image = acx_s_read_fw(&adev->pdev->dev, filename, &file_size);
++ if (!fw_image) {
++ adev->need_radio_fw = 1;
++ filename[sizeof("tiacx1NN")-1] = '\0';
++ fw_image = acx_s_read_fw(&adev->pdev->dev, filename, &file_size);
++ if (!fw_image) {
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++ }
++ }
++
++ for (try = 1; try <= 5; try++) {
++ res = acxpci_s_write_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_write_fw (main/combined): %d\n", res);
++ if (OK == res) {
++ res = acxpci_s_validate_fw(adev, fw_image, 0);
++ log(L_DEBUG|L_INIT, "acx_validate_fw "
++ "(main/combined): %d\n", res);
++ }
++
++ if (OK == res) {
++ SET_BIT(adev->dev_state_mask, ACX_STATE_FW_LOADED);
++ break;
++ }
++ printk("acx: firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ vfree(fw_image);
++
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_s_upload_radio
++**
++** Uploads the appropriate radio module firmware into the card.
++*/
++int
++acxpci_s_upload_radio(acx_device_t *adev)
++{
++ acx_ie_memmap_t mm;
++ firmware_image_t *radio_image;
++ acx_cmd_radioinit_t radioinit;
++ int res = NOT_OK;
++ int try;
++ u32 offset;
++ u32 size;
++ char filename[sizeof("tiacx1NNrNN")];
++
++ if (!adev->need_radio_fw) return OK;
++
++ FN_ENTER;
++
++ acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++ offset = le32_to_cpu(mm.CodeEnd);
++
++ snprintf(filename, sizeof(filename), "tiacx1%02dr%02X",
++ IS_ACX111(adev)*11,
++ adev->radio_type);
++ radio_image = acx_s_read_fw(&adev->pdev->dev, filename, &size);
++ if (!radio_image) {
++ printk("acx: can't load radio module '%s'\n", filename);
++ goto fail;
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ for (try = 1; try <= 5; try++) {
++ res = acxpci_s_write_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_write_fw (radio): %d\n", res);
++ if (OK == res) {
++ res = acxpci_s_validate_fw(adev, radio_image, offset);
++ log(L_DEBUG|L_INIT, "acx_validate_fw (radio): %d\n", res);
++ }
++
++ if (OK == res)
++ break;
++ printk("acx: radio firmware upload attempt #%d FAILED, "
++ "retrying...\n", try);
++ acx_s_msleep(1000); /* better wait for a while... */
++ }
++
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++ radioinit.offset = cpu_to_le32(offset);
++ /* no endian conversion needed, remains in card CPU area: */
++ radioinit.len = radio_image->size;
++
++ vfree(radio_image);
++
++ if (OK != res)
++ goto fail;
++
++ /* will take a moment so let's have a big timeout */
++ acx_s_issue_cmd_timeo(adev, ACX1xx_CMD_RADIOINIT,
++ &radioinit, sizeof(radioinit), CMD_TIMEOUT_MS(1000));
++
++ res = acx_s_interrogate(adev, &mm, ACX1xx_IE_MEMORY_MAP);
++fail:
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_l_reset_mac
++**
++** MAC will be reset
++** Call context: reset_dev
++*/
++static void
++acxpci_l_reset_mac(acx_device_t *adev)
++{
++ u16 temp;
++
++ FN_ENTER;
++
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++
++ /* now do soft reset of eCPU, set bit */
++ temp = read_reg16(adev, IO_ACX_SOFT_RESET) | 0x1;
++ log(L_DEBUG, "%s: enable soft reset...\n", __func__);
++ write_reg16(adev, IO_ACX_SOFT_RESET, temp);
++ write_flush(adev);
++
++ /* now clear bit again: deassert eCPU reset */
++ log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
++ write_reg16(adev, IO_ACX_SOFT_RESET, temp & ~0x1);
++
++ /* now start a burst read from initial EEPROM */
++ temp = read_reg16(adev, IO_ACX_EE_START) | 0x1;
++ write_reg16(adev, IO_ACX_EE_START, temp);
++ write_flush(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_verify_init
++*/
++static int
++acxpci_s_verify_init(acx_device_t *adev)
++{
++ int result = NOT_OK;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ timeout = jiffies + 2*HZ;
++ for (;;) {
++ u16 irqstat = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqstat & HOST_INT_FCS_THRESHOLD) {
++ result = OK;
++ write_reg16(adev, IO_ACX_IRQ_ACK, HOST_INT_FCS_THRESHOLD);
++ break;
++ }
++ if (time_after(jiffies, timeout))
++ break;
++ /* Init may take up to ~0.5 sec total */
++ acx_s_msleep(50);
++ }
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** A few low-level helpers
++**
++** Note: these functions are not protected by lock
++** and thus are never allowed to be called from IRQ.
++** Also they must not race with fw upload which uses same hw regs
++*/
++
++/***********************************************************************
++** acxpci_write_cmd_type_status
++*/
++
++static inline void
++acxpci_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
++{
++ writel(type | (status << 16), adev->cmd_area);
++ write_flush(adev);
++}
++
++
++/***********************************************************************
++** acxpci_read_cmd_type_status
++*/
++static u32
++acxpci_read_cmd_type_status(acx_device_t *adev)
++{
++ u32 cmd_type, cmd_status;
++
++ cmd_type = readl(adev->cmd_area);
++ cmd_status = (cmd_type >> 16);
++ cmd_type = (u16)cmd_type;
++
++ log(L_CTL, "cmd_type:%04X cmd_status:%04X [%s]\n",
++ cmd_type, cmd_status,
++ acx_cmd_status_str(cmd_status));
++
++ return cmd_status;
++}
++
++
++/***********************************************************************
++** acxpci_s_reset_dev
++**
++** Arguments:
++** netdevice that contains the adev variable
++** Returns:
++** NOT_OK on fail
++** OK on success
++** Side effects:
++** device is hard reset
++** Call context:
++** acxpci_e_probe
++** Comment:
++** This resets the device using low level hardware calls
++** as well as uploads and verifies the firmware to the card
++*/
++
++static inline void
++init_mboxes(acx_device_t *adev)
++{
++ u32 cmd_offs, info_offs;
++
++ cmd_offs = read_reg32(adev, IO_ACX_CMD_MAILBOX_OFFS);
++ info_offs = read_reg32(adev, IO_ACX_INFO_MAILBOX_OFFS);
++ adev->cmd_area = (u8 *)adev->iobase2 + cmd_offs;
++ adev->info_area = (u8 *)adev->iobase2 + info_offs;
++ log(L_DEBUG, "iobase2=%p\n"
++ "cmd_mbox_offset=%X cmd_area=%p\n"
++ "info_mbox_offset=%X info_area=%p\n",
++ adev->iobase2,
++ cmd_offs, adev->cmd_area,
++ info_offs, adev->info_area);
++}
++
++
++static inline void
++read_eeprom_area(acx_device_t *adev)
++{
++#if ACX_DEBUG > 1
++ int offs;
++ u8 tmp;
++
++ for (offs = 0x8c; offs < 0xb9; offs++)
++ acxpci_read_eeprom_byte(adev, offs, &tmp);
++#endif
++}
++
++
++static int
++acxpci_s_reset_dev(acx_device_t *adev)
++{
++ const char* msg = "";
++ unsigned long flags;
++ int result = NOT_OK;
++ u16 hardware_info;
++ u16 ecpu_ctrl;
++ int count;
++
++ FN_ENTER;
++
++ /* reset the device to make sure the eCPU is stopped
++ * to upload the firmware correctly */
++
++ acx_lock(adev, flags);
++
++ acxpci_l_reset_mac(adev);
++
++ ecpu_ctrl = read_reg16(adev, IO_ACX_ECPU_CTRL) & 1;
++ if (!ecpu_ctrl) {
++ msg = "eCPU is already running. ";
++ goto end_unlock;
++ }
++
++#ifdef WE_DONT_NEED_THAT_DO_WE
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
++ /* eCPU most likely means "embedded CPU" */
++ msg = "eCPU did not start after boot from flash. ";
++ goto end_unlock;
++ }
++
++ /* check sense on reset flags */
++ if (read_reg16(adev, IO_ACX_SOR_CFG) & 0x10) {
++ printk("%s: eCPU did not start after boot (SOR), "
++ "is this fatal?\n", adev->ndev->name);
++ }
++#endif
++ /* scan, if any, is stopped now, setting corresponding IRQ bit */
++ adev->irq_status |= HOST_INT_SCAN_COMPLETE;
++
++ acx_unlock(adev, flags);
++
++ /* need to know radio type before fw load */
++ /* Need to wait for arrival of this information in a loop,
++ * most probably since eCPU runs some init code from EEPROM
++ * (started burst read in reset_mac()) which also
++ * sets the radio type ID */
++
++ count = 0xffff;
++ do {
++ hardware_info = read_reg16(adev, IO_ACX_EEPROM_INFORMATION);
++ if (!--count) {
++ msg = "eCPU didn't indicate radio type";
++ goto end_fail;
++ }
++ cpu_relax();
++ } while (!(hardware_info & 0xff00)); /* radio type still zero? */
++
++ /* printk("DEBUG: count %d\n", count); */
++ adev->form_factor = hardware_info & 0xff;
++ adev->radio_type = hardware_info >> 8;
++
++ /* load the firmware */
++ if (OK != acxpci_s_upload_fw(adev))
++ goto end_fail;
++
++ /* acx_s_msleep(10); this one really shouldn't be required */
++
++ /* now start eCPU by clearing bit */
++ write_reg16(adev, IO_ACX_ECPU_CTRL, ecpu_ctrl & ~0x1);
++ log(L_DEBUG, "booted eCPU up and waiting for completion...\n");
++
++ /* wait for eCPU bootup */
++ if (OK != acxpci_s_verify_init(adev)) {
++ msg = "timeout waiting for eCPU. ";
++ goto end_fail;
++ }
++ log(L_DEBUG, "eCPU has woken up, card is ready to be configured\n");
++
++ init_mboxes(adev);
++ acxpci_write_cmd_type_status(adev, 0, 0);
++
++ /* test that EEPROM is readable */
++ read_eeprom_area(adev);
++
++ result = OK;
++ goto end;
++
++/* Finish error message. Indicate which function failed */
++end_unlock:
++ acx_unlock(adev, flags);
++end_fail:
++ printk("acx: %sreset_dev() FAILED\n", msg);
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_s_issue_cmd_timeo
++**
++** Sends command to fw, extract result
++**
++** NB: we do _not_ take lock inside, so be sure to not touch anything
++** which may interfere with IRQ handler operation
++**
++** TODO: busy wait is a bit silly, so:
++** 1) stop doing many iters - go to sleep after first
++** 2) go to waitqueue based approach: wait, not poll!
++*/
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxpci_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned int cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout)
++{
++#else
++int
++acxpci_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned cmd_timeout,
++ const char* cmdstr)
++{
++ unsigned long start = jiffies;
++#endif
++ const char *devname;
++ unsigned counter;
++ u16 irqtype;
++ u16 cmd_status;
++ unsigned long timeout;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,timeout:%ums,type:0x%04X)\n",
++ cmdstr, buflen, cmd_timeout,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ if (!(adev->dev_state_mask & ACX_STATE_FW_LOADED)) {
++ printk("%s: "FUNC"(): firmware is not loaded yet, "
++ "cannot execute commands!\n", devname);
++ goto bad;
++ }
++
++ if ((acx_debug & L_DEBUG) && (cmd != ACX1xx_CMD_INTERROGATE)) {
++ printk("input buffer (len=%u):\n", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++
++ /* wait for firmware to become idle for our command submission */
++ timeout = HZ/5;
++ counter = (timeout * 1000 / HZ) - 1; /* in ms */
++ timeout += jiffies;
++ do {
++ cmd_status = acxpci_read_cmd_type_status(adev);
++ /* Test for IDLE state */
++ if (!cmd_status)
++ break;
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ if (!counter) {
++ /* the card doesn't get idle, we're in trouble */
++ printk("%s: "FUNC"(): cmd_status is not IDLE: 0x%04X!=0\n",
++ devname, cmd_status);
++ goto bad;
++ } else if (counter < 190) { /* if waited >10ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): waited for IDLE %dms. "
++ "Please report\n", 199 - counter);
++ }
++
++ /* now write the parameters of the command if needed */
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++#if CMD_DISCOVERY
++ if (cmd == ACX1xx_CMD_INTERROGATE)
++ memset_io(adev->cmd_area + 4, 0xAA, buflen);
++#endif
++ /* adev->cmd_area points to PCI device's memory, not to RAM! */
++ memcpy_toio(adev->cmd_area + 4, buffer,
++ (cmd == ACX1xx_CMD_INTERROGATE) ? 4 : buflen);
++ }
++ /* now write the actual command type */
++ acxpci_write_cmd_type_status(adev, cmd, 0);
++ /* execute command */
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_CMD);
++ write_flush(adev);
++
++ /* wait for firmware to process command */
++
++ /* Ensure nonzero and not too large timeout.
++ ** Also converts e.g. 100->99, 200->199
++ ** which is nice but not essential */
++ cmd_timeout = (cmd_timeout-1) | 1;
++ if (unlikely(cmd_timeout > 1199))
++ cmd_timeout = 1199;
++ /* clear CMD_COMPLETE bit. can be set only by IRQ handler: */
++ adev->irq_status &= ~HOST_INT_CMD_COMPLETE;
++
++ /* we schedule away sometimes (timeout can be large) */
++ counter = cmd_timeout;
++ timeout = jiffies + cmd_timeout * HZ / 1000;
++ do {
++ if (!adev->irqs_active) { /* IRQ disabled: poll */
++ irqtype = read_reg16(adev, IO_ACX_IRQ_STATUS_NON_DES);
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ write_reg16(adev, IO_ACX_IRQ_ACK,
++ HOST_INT_CMD_COMPLETE);
++ break;
++ }
++ } else { /* Wait when IRQ will set the bit */
++ irqtype = adev->irq_status;
++ if (irqtype & HOST_INT_CMD_COMPLETE)
++ break;
++ }
++
++ if (counter % 8 == 0) {
++ if (time_after(jiffies, timeout)) {
++ counter = 0;
++ break;
++ }
++ /* we waited 8 iterations, no luck. Sleep 8 ms */
++ acx_s_msleep(8);
++ }
++ } while (likely(--counter));
++
++ /* save state for debugging */
++ cmd_status = acxpci_read_cmd_type_status(adev);
++
++ /* put the card in IDLE state */
++ acxpci_write_cmd_type_status(adev, 0, 0);
++
++ if (!counter) { /* timed out! */
++ printk("%s: "FUNC"(): timed out %s for CMD_COMPLETE. "
++ "irq bits:0x%04X irq_status:0x%04X timeout:%dms "
++ "cmd_status:%d (%s)\n",
++ devname, (adev->irqs_active) ? "waiting" : "polling",
++ irqtype, adev->irq_status, cmd_timeout,
++ cmd_status, acx_cmd_status_str(cmd_status));
++ goto bad;
++ } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */
++ log(L_CTL|L_DEBUG, FUNC"(): %s for CMD_COMPLETE %dms. "
++ "count:%d. Please report\n",
++ (adev->irqs_active) ? "waited" : "polled",
++ cmd_timeout - counter, counter);
++ }
++
++ if (1 != cmd_status) { /* it is not a 'Success' */
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s). "
++ "Took %dms of %d\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status),
++ cmd_timeout - counter, cmd_timeout);
++ /* zero out result buffer
++ * WARNING: this will trash stack in case of illegally large input
++ * length! */
++ if (buffer && buflen)
++ memset(buffer, 0, buflen);
++ goto bad;
++ }
++
++ /* read in result parameters if needed */
++ if (buffer && buflen && (cmd == ACX1xx_CMD_INTERROGATE)) {
++ /* adev->cmd_area points to PCI device's memory, not to RAM! */
++ memcpy_fromio(buffer, adev->cmd_area + 4, buflen);
++ if (acx_debug & L_DEBUG) {
++ printk("output buffer (len=%u): ", buflen);
++ acx_dump_bytes(buffer, buflen);
++ }
++ }
++/* ok: */
++ log(L_CTL, FUNC"(%s): took %ld jiffies to complete\n",
++ cmdstr, jiffies - start);
++ FN_EXIT1(OK);
++ return OK;
++
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++*/
++#ifdef NONESSENTIAL_FEATURES
++typedef struct device_id {
++ unsigned char id[6];
++ char *descr;
++ char *type;
++} device_id_t;
++
++static const device_id_t
++device_ids[] =
++{
++ {
++ {'G', 'l', 'o', 'b', 'a', 'l'},
++ NULL,
++ NULL,
++ },
++ {
++ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
++ "uninitialized",
++ "SpeedStream SS1021 or Gigafast WF721-AEX"
++ },
++ {
++ {0x80, 0x81, 0x82, 0x83, 0x84, 0x85},
++ "non-standard",
++ "DrayTek Vigor 520"
++ },
++ {
++ {'?', '?', '?', '?', '?', '?'},
++ "non-standard",
++ "Level One WPC-0200"
++ },
++ {
++ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
++ "empty",
++ "DWL-650+ variant"
++ }
++};
++
++static void
++acx_show_card_eeprom_id(acx_device_t *adev)
++{
++ unsigned char buffer[CARD_EEPROM_ID_SIZE];
++ int i;
++
++ memset(&buffer, 0, CARD_EEPROM_ID_SIZE);
++ /* use direct EEPROM access */
++ for (i = 0; i < CARD_EEPROM_ID_SIZE; i++) {
++ if (OK != acxpci_read_eeprom_byte(adev,
++ ACX100_EEPROM_ID_OFFSET + i,
++ &buffer[i])) {
++ printk("acx: reading EEPROM FAILED\n");
++ break;
++ }
++ }
++
++ for (i = 0; i < VEC_SIZE(device_ids); i++) {
++ if (!memcmp(&buffer, device_ids[i].id, CARD_EEPROM_ID_SIZE)) {
++ if (device_ids[i].descr) {
++ printk("acx: EEPROM card ID string check "
++ "found %s card ID: is this %s?\n",
++ device_ids[i].descr, device_ids[i].type);
++ }
++ break;
++ }
++ }
++ if (i == VEC_SIZE(device_ids)) {
++ printk("acx: EEPROM card ID string check found "
++ "unknown card: expected 'Global', got '%.*s\'. "
++ "Please report\n", CARD_EEPROM_ID_SIZE, buffer);
++ }
++}
++#endif /* NONESSENTIAL_FEATURES */
++
++
++/***********************************************************************
++** acxpci_free_desc_queues
++**
++** Releases the queues that have been allocated, the
++** others have been initialised to NULL so this
++** function can be used if only part of the queues were allocated.
++*/
++
++static inline void
++free_coherent(struct pci_dev *hwdev, size_t size,
++ void *vaddr, dma_addr_t dma_handle)
++{
++ dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev,
++ size, vaddr, dma_handle);
++}
++
++void
++acxpci_free_desc_queues(acx_device_t *adev)
++{
++#define ACX_FREE_QUEUE(size, ptr, phyaddr) \
++ if (ptr) { \
++ free_coherent(0, size, ptr, phyaddr); \
++ ptr = NULL; \
++ size = 0; \
++ }
++
++ FN_ENTER;
++
++ ACX_FREE_QUEUE(adev->txhostdesc_area_size, adev->txhostdesc_start, adev->txhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->txbuf_area_size, adev->txbuf_start, adev->txbuf_startphy);
++
++ adev->txdesc_start = NULL;
++
++ ACX_FREE_QUEUE(adev->rxhostdesc_area_size, adev->rxhostdesc_start, adev->rxhostdesc_startphy);
++ ACX_FREE_QUEUE(adev->rxbuf_area_size, adev->rxbuf_start, adev->rxbuf_startphy);
++
++ adev->rxdesc_start = NULL;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_delete_dma_regions
++*/
++static void
++acxpci_s_delete_dma_regions(acx_device_t *adev)
++{
++ unsigned long flags;
++
++ FN_ENTER;
++ /* disable radio Tx/Rx. Shouldn't we use the firmware commands
++ * here instead? Or are we that much down the road that it's no
++ * longer possible here? */
++ write_reg16(adev, IO_ACX_ENABLE, 0);
++
++ acx_s_msleep(100);
++
++ acx_lock(adev, flags);
++ acxpci_free_desc_queues(adev);
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_e_probe
++**
++** Probe routine called when a PCI device w/ matching ID is found.
++** Here's the sequence:
++** - Allocate the PCI resources.
++** - Read the PCMCIA attribute memory to make sure we have a WLAN card
++** - Reset the MAC
++** - Initialize the dev and wlan data
++** - Initialize the MAC
++**
++** pdev - ptr to pci device structure containing info about pci configuration
++** id - ptr to the device id entry that matched this device
++*/
++static const u16
++IO_ACX100[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x007c, /* IO_ACX_INT_TRIG */
++ 0x0098, /* IO_ACX_IRQ_MASK */
++ 0x00a4, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00a8, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00ac, /* IO_ACX_IRQ_ACK */
++ 0x00b0, /* IO_ACX_HINT_TRIG */
++
++ 0x0104, /* IO_ACX_ENABLE */
++
++ 0x0250, /* IO_ACX_EEPROM_CTL */
++ 0x0254, /* IO_ACX_EEPROM_ADDR */
++ 0x0258, /* IO_ACX_EEPROM_DATA */
++ 0x025c, /* IO_ACX_EEPROM_CFG */
++
++ 0x0268, /* IO_ACX_PHY_ADDR */
++ 0x026c, /* IO_ACX_PHY_DATA */
++ 0x0270, /* IO_ACX_PHY_CTL */
++
++ 0x0290, /* IO_ACX_GPIO_OE */
++
++ 0x0298, /* IO_ACX_GPIO_OUT */
++
++ 0x02a4, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x02a8, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x02ac, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x02d0, /* IO_ACX_EE_START */
++ 0x02d4, /* IO_ACX_SOR_CFG */
++ 0x02d8 /* IO_ACX_ECPU_CTRL */
++};
++
++static const u16
++IO_ACX111[] =
++{
++ 0x0000, /* IO_ACX_SOFT_RESET */
++
++ 0x0014, /* IO_ACX_SLV_MEM_ADDR */
++ 0x0018, /* IO_ACX_SLV_MEM_DATA */
++ 0x001c, /* IO_ACX_SLV_MEM_CTL */
++ 0x0020, /* IO_ACX_SLV_END_CTL */
++
++ 0x0034, /* IO_ACX_FEMR */
++
++ 0x00b4, /* IO_ACX_INT_TRIG */
++ 0x00d4, /* IO_ACX_IRQ_MASK */
++ /* we do mean NON_DES (0xf0), not NON_DES_MASK which is at 0xe0: */
++ 0x00f0, /* IO_ACX_IRQ_STATUS_NON_DES */
++ 0x00e4, /* IO_ACX_IRQ_STATUS_CLEAR */
++ 0x00e8, /* IO_ACX_IRQ_ACK */
++ 0x00ec, /* IO_ACX_HINT_TRIG */
++
++ 0x01d0, /* IO_ACX_ENABLE */
++
++ 0x0338, /* IO_ACX_EEPROM_CTL */
++ 0x033c, /* IO_ACX_EEPROM_ADDR */
++ 0x0340, /* IO_ACX_EEPROM_DATA */
++ 0x0344, /* IO_ACX_EEPROM_CFG */
++
++ 0x0350, /* IO_ACX_PHY_ADDR */
++ 0x0354, /* IO_ACX_PHY_DATA */
++ 0x0358, /* IO_ACX_PHY_CTL */
++
++ 0x0374, /* IO_ACX_GPIO_OE */
++
++ 0x037c, /* IO_ACX_GPIO_OUT */
++
++ 0x0388, /* IO_ACX_CMD_MAILBOX_OFFS */
++ 0x038c, /* IO_ACX_INFO_MAILBOX_OFFS */
++ 0x0390, /* IO_ACX_EEPROM_INFORMATION */
++
++ 0x0100, /* IO_ACX_EE_START */
++ 0x0104, /* IO_ACX_SOR_CFG */
++ 0x0108, /* IO_ACX_ECPU_CTRL */
++};
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++static int __devinit
++acxpci_e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
++{
++ acx111_ie_configoption_t co;
++ unsigned long mem_region1 = 0;
++ unsigned long mem_region2 = 0;
++ unsigned long mem_region1_size;
++ unsigned long mem_region2_size;
++ unsigned long phymem1;
++ unsigned long phymem2;
++ void *mem1 = NULL;
++ void *mem2 = NULL;
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ const char *chip_name;
++ int result = -EIO;
++ int err;
++ u8 chip_type;
++
++ FN_ENTER;
++
++ /* Enable the PCI device */
++ if (pci_enable_device(pdev)) {
++ printk("acx: pci_enable_device() FAILED\n");
++ result = -ENODEV;
++ goto fail_pci_enable_device;
++ }
++
++ /* enable busmastering (required for CardBus) */
++ pci_set_master(pdev);
++
++ /* FIXME: prism54 calls pci_set_mwi() here,
++ * should we do/support the same? */
++
++ /* chiptype is u8 but id->driver_data is ulong
++ ** Works for now (possible values are 1 and 2) */
++ chip_type = (u8)id->driver_data;
++ /* acx100 and acx111 have different PCI memory regions */
++ if (chip_type == CHIPTYPE_ACX100) {
++ chip_name = "ACX100";
++ mem_region1 = PCI_ACX100_REGION1;
++ mem_region1_size = PCI_ACX100_REGION1_SIZE;
++
++ mem_region2 = PCI_ACX100_REGION2;
++ mem_region2_size = PCI_ACX100_REGION2_SIZE;
++ } else if (chip_type == CHIPTYPE_ACX111) {
++ chip_name = "ACX111";
++ mem_region1 = PCI_ACX111_REGION1;
++ mem_region1_size = PCI_ACX111_REGION1_SIZE;
++
++ mem_region2 = PCI_ACX111_REGION2;
++ mem_region2_size = PCI_ACX111_REGION2_SIZE;
++ } else {
++ printk("acx: unknown chip type 0x%04X\n", chip_type);
++ goto fail_unknown_chiptype;
++ }
++
++ /* Figure out our resources */
++ phymem1 = pci_resource_start(pdev, mem_region1);
++ phymem2 = pci_resource_start(pdev, mem_region2);
++ if (!request_mem_region(phymem1, pci_resource_len(pdev, mem_region1), "acx_1")) {
++ printk("acx: cannot reserve PCI memory region 1 (are you sure "
++ "you have CardBus support in kernel?)\n");
++ goto fail_request_mem_region1;
++ }
++ if (!request_mem_region(phymem2, pci_resource_len(pdev, mem_region2), "acx_2")) {
++ printk("acx: cannot reserve PCI memory region 2\n");
++ goto fail_request_mem_region2;
++ }
++
++ /* this used to be ioremap(), but ioremap_nocache()
++ * is much less risky, right? (and slower?)
++ * FIXME: we may want to go back to cached variant if it's
++ * certain that our code really properly handles
++ * cached operation (memory barriers, volatile?, ...)
++ * (but always keep this comment here regardless!)
++ * Possibly make this a driver config setting? */
++
++ mem1 = ioremap_nocache(phymem1, mem_region1_size);
++ if (!mem1) {
++ printk("acx: ioremap() FAILED\n");
++ goto fail_ioremap1;
++ }
++ mem2 = ioremap_nocache(phymem2, mem_region2_size);
++ if (!mem2) {
++ printk("acx: ioremap() #2 FAILED\n");
++ goto fail_ioremap2;
++ }
++
++ printk("acx: found %s-based wireless network card at %s, irq:%d, "
++ "phymem1:0x%lX, phymem2:0x%lX, mem1:0x%p, mem1_size:%ld, "
++ "mem2:0x%p, mem2_size:%ld\n",
++ chip_name, pci_name(pdev), pdev->irq, phymem1, phymem2,
++ mem1, mem_region1_size,
++ mem2, mem_region2_size);
++ log(L_ANY, "initial debug setting is 0x%04X\n", acx_debug);
++
++ if (0 == pdev->irq) {
++ printk("acx: can't use IRQ 0\n");
++ goto fail_irq;
++ }
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ printk("acx: no memory for netdevice struct\n");
++ goto fail_alloc_netdev;
++ }
++
++ ether_setup(ndev);
++ ndev->open = &acxpci_e_open;
++ ndev->stop = &acxpci_e_close;
++ ndev->hard_start_xmit = &acx_i_start_xmit;
++ ndev->get_stats = &acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = &acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
++ ndev->tx_timeout = &acxpci_i_tx_timeout;
++ ndev->change_mtu = &acx_e_change_mtu;
++ ndev->watchdog_timeo = 4 * HZ;
++ ndev->irq = pdev->irq;
++ ndev->base_addr = pci_resource_start(pdev, 0);
++
++ adev = ndev2adev(ndev);
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ /* We do not start with downed sem: we want PARANOID_LOCKING to work */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++ /* since nobody can see new netdev yet, we can as well
++ ** just _presume_ that we're under sem (instead of actually taking it): */
++ /* acx_sem_lock(adev); */
++ adev->pdev = pdev;
++ adev->ndev = ndev;
++ adev->dev_type = DEVTYPE_PCI;
++ adev->chip_type = chip_type;
++ adev->chip_name = chip_name;
++ adev->io = (CHIPTYPE_ACX100 == chip_type) ? IO_ACX100 : IO_ACX111;
++ adev->membase = phymem1;
++ adev->iobase = mem1;
++ adev->membase2 = phymem2;
++ adev->iobase2 = mem2;
++ /* to find crashes due to weird driver access
++ * to unconfigured interface (ifup) */
++ adev->mgmt_timer.function = (void (*)(unsigned long))0x0000dead;
++
++#ifdef NONESSENTIAL_FEATURES
++ acx_show_card_eeprom_id(adev);
++#endif /* NONESSENTIAL_FEATURES */
++
++#ifdef SET_MODULE_OWNER
++ SET_MODULE_OWNER(ndev);
++#endif
++ SET_NETDEV_DEV(ndev, &pdev->dev);
++
++ log(L_IRQ|L_INIT, "using IRQ %d\n", pdev->irq);
++
++ /* need to be able to restore PCI state after a suspend */
++ pci_save_state(pdev);
++ pci_set_drvdata(pdev, ndev);
++
++ /* ok, pci setup is finished, now start initializing the card */
++
++ /* NB: read_reg() reads may return bogus data before reset_dev(),
++ * since the firmware which directly controls large parts of the I/O
++ * registers isn't initialized yet.
++ * acx100 seems to be more affected than acx111 */
++ if (OK != acxpci_s_reset_dev(adev))
++ goto fail_reset;
++
++ if (IS_ACX100(adev)) {
++ /* ACX100: configopt struct in cmd mailbox - directly after reset */
++ memcpy_fromio(&co, adev->cmd_area, sizeof(co));
++ }
++
++ if (OK != acx_s_init_mac(adev))
++ goto fail_init_mac;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111: configopt struct needs to be queried after full init */
++ acx_s_interrogate(adev, &co, ACX111_IE_CONFIG_OPTIONS);
++ }
++
++/* TODO: merge them into one function, they are called just once and are the same for pci & usb */
++ if (OK != acxpci_read_eeprom_byte(adev, 0x05, &adev->eeprom_version))
++ goto fail_read_eeprom_version;
++
++ acx_s_parse_configoption(adev, &co);
++ acx_s_set_defaults(adev);
++ acx_s_get_firmware_version(adev); /* needs to be after acx_s_init_mac() */
++ acx_display_hardware_details(adev);
++
++ /* Register the card, AFTER everything else has been set up,
++ * since otherwise an ioctl could step on our feet due to
++ * firmware operations happening in parallel or uninitialized data */
++ err = register_netdev(ndev);
++ if (OK != err) {
++ printk("acx: register_netdev() FAILED: %d\n", err);
++ goto fail_register_netdev;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ /* Now we have our device, so make sure the kernel doesn't try
++ * to send packets even though we're not associated to a network yet */
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ /* after register_netdev() userspace may start working with dev
++ * (in particular, on other CPUs), we only need to up the sem */
++ /* acx_sem_unlock(adev); */
++
++ printk("acx "ACX_RELEASE": net device %s, driver compiled "
++ "against wireless extensions %d and Linux %s\n",
++ ndev->name, WIRELESS_EXT, UTS_RELEASE);
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ result = OK;
++ goto done;
++
++ /* error paths: undo everything in reverse order... */
++
++fail_register_netdev:
++
++ acxpci_s_delete_dma_regions(adev);
++ pci_set_drvdata(pdev, NULL);
++
++fail_init_mac:
++fail_read_eeprom_version:
++fail_reset:
++
++ free_netdev(ndev);
++fail_alloc_netdev:
++fail_irq:
++
++ iounmap(mem2);
++fail_ioremap2:
++
++ iounmap(mem1);
++fail_ioremap1:
++
++ release_mem_region(pci_resource_start(pdev, mem_region2),
++ pci_resource_len(pdev, mem_region2));
++fail_request_mem_region2:
++
++ release_mem_region(pci_resource_start(pdev, mem_region1),
++ pci_resource_len(pdev, mem_region1));
++fail_request_mem_region1:
++fail_unknown_chiptype:
++
++ pci_disable_device(pdev);
++fail_pci_enable_device:
++
++ pci_set_power_state(pdev, PCI_D3hot);
++
++done:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_e_remove
++**
++** Shut device down (if not hot unplugged)
++** and deallocate PCI resources for the acx chip.
++**
++** pdev - ptr to PCI device structure containing info about pci configuration
++*/
++static void __devexit
++acxpci_e_remove(struct pci_dev *pdev)
++{
++ struct net_device *ndev;
++ acx_device_t *adev;
++ unsigned long mem_region1, mem_region2;
++ unsigned long flags;
++
++ FN_ENTER;
++
++ ndev = (struct net_device*) pci_get_drvdata(pdev);
++ if (!ndev) {
++ log(L_DEBUG, "%s: card is unused. Skipping any release code\n",
++ __func__);
++ goto end;
++ }
++
++ adev = ndev2adev(ndev);
++
++ /* If device wasn't hot unplugged... */
++ if (adev_present(adev)) {
++
++ acx_sem_lock(adev);
++
++ /* disable both Tx and Rx to shut radio down properly */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++
++#ifdef REDUNDANT
++ /* put the eCPU to sleep to save power
++ * Halting is not possible currently,
++ * since not supported by all firmware versions */
++ acx_s_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
++#endif
++ acx_lock(adev, flags);
++ /* disable power LED to save power :-) */
++ log(L_INIT, "switching off power LED to save power\n");
++ acxpci_l_power_led(adev, 0);
++ /* stop our eCPU */
++ if (IS_ACX111(adev)) {
++ /* FIXME: does this actually keep halting the eCPU?
++ * I don't think so...
++ */
++ acxpci_l_reset_mac(adev);
++ } else {
++ u16 temp;
++ /* halt eCPU */
++ temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
++ write_reg16(adev, IO_ACX_ECPU_CTRL, temp);
++ write_flush(adev);
++ }
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++ }
++
++ /* unregister the device to not let the kernel
++ * (e.g. ioctls) access a half-deconfigured device
++ * NB: this will cause acxpci_e_close() to be called,
++ * thus we shouldn't call it under sem! */
++ log(L_INIT, "removing device %s\n", ndev->name);
++ unregister_netdev(ndev);
++
++ /* unregister_netdev ensures that no references to us left.
++ * For paranoid reasons we continue to follow the rules */
++ acx_sem_lock(adev);
++
++ if (adev->dev_state_mask & ACX_STATE_IFACE_UP) {
++ acxpci_s_down(ndev);
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ }
++
++ acx_proc_unregister_entries(ndev);
++
++ if (IS_ACX100(adev)) {
++ mem_region1 = PCI_ACX100_REGION1;
++ mem_region2 = PCI_ACX100_REGION2;
++ } else {
++ mem_region1 = PCI_ACX111_REGION1;
++ mem_region2 = PCI_ACX111_REGION2;
++ }
++
++ /* finally, clean up PCI bus state */
++ acxpci_s_delete_dma_regions(adev);
++ if (adev->iobase) iounmap(adev->iobase);
++ if (adev->iobase2) iounmap(adev->iobase2);
++ release_mem_region(pci_resource_start(pdev, mem_region1),
++ pci_resource_len(pdev, mem_region1));
++ release_mem_region(pci_resource_start(pdev, mem_region2),
++ pci_resource_len(pdev, mem_region2));
++ pci_disable_device(pdev);
++
++ /* remove dev registration */
++ pci_set_drvdata(pdev, NULL);
++
++ acx_sem_unlock(adev);
++
++ /* Free netdev (quite late,
++ * since otherwise we might get caught off-guard
++ * by a netdev timeout handler execution
++ * expecting to see a working dev...) */
++ free_netdev(ndev);
++
++ /* put device into ACPI D3 mode (shutdown) */
++ pci_set_power_state(pdev, PCI_D3hot);
++
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** TODO: PM code needs to be fixed / debugged / tested.
++*/
++#ifdef CONFIG_PM
++static int
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++acxpci_e_suspend(struct pci_dev *pdev, pm_message_t state)
++#else
++acxpci_e_suspend(struct pci_dev *pdev, u32 state)
++#endif
++{
++ struct net_device *ndev = pci_get_drvdata(pdev);
++ acx_device_t *adev;
++
++ FN_ENTER;
++ printk("acx: suspend handler is experimental!\n");
++ printk("sus: dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("sus: adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ netif_device_detach(ndev); /* this one cannot sleep */
++ acxpci_s_down(ndev);
++ /* down() does not set it to 0xffff, but here we really want that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ acxpci_s_delete_dma_regions(adev);
++ pci_save_state(pdev);
++ pci_set_power_state(pdev, PCI_D3hot);
++
++ acx_sem_unlock(adev);
++end:
++ FN_EXIT0;
++ return OK;
++}
++
++
++static int
++acxpci_e_resume(struct pci_dev *pdev)
++{
++ struct net_device *ndev = pci_get_drvdata(pdev);
++ acx_device_t *adev;
++
++ FN_ENTER;
++
++ printk("acx: resume handler is experimental!\n");
++ printk("rsm: got dev %p\n", ndev);
++
++ if (!netif_running(ndev))
++ goto end;
++
++ adev = ndev2adev(ndev);
++ printk("rsm: got adev %p\n", adev);
++
++ acx_sem_lock(adev);
++
++ pci_set_power_state(pdev, PCI_D0);
++ printk("rsm: power state PCI_D0 set\n");
++ pci_restore_state(pdev);
++ printk("rsm: PCI state restored\n");
++
++ if (OK != acxpci_s_reset_dev(adev))
++ goto end_unlock;
++ printk("rsm: device reset done\n");
++ if (OK != acx_s_init_mac(adev))
++ goto end_unlock;
++ printk("rsm: init MAC done\n");
++
++ acxpci_s_up(ndev);
++ printk("rsm: acx up done\n");
++
++ /* now even reload all card parameters as they were before suspend,
++ * and possibly be back in the network again already :-) */
++ if (ACX_STATE_IFACE_UP & adev->dev_state_mask) {
++ adev->set_mask = GETSET_ALL;
++ acx_s_update_card_settings(adev);
++ printk("rsm: settings updated\n");
++ }
++ netif_device_attach(ndev);
++ printk("rsm: device attached\n");
++
++end_unlock:
++ acx_sem_unlock(adev);
++end:
++ /* we need to return OK here anyway, right? */
++ FN_EXIT0;
++ return OK;
++}
++#endif /* CONFIG_PM */
++
++
++/***********************************************************************
++** acxpci_s_up
++**
++** This function is called by acxpci_e_open (when ifconfig sets the device as up)
++**
++** Side effects:
++** - Enables on-card interrupt requests
++** - calls acx_s_start
++*/
++
++static void
++enable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask);
++ write_reg16(adev, IO_ACX_FEMR, 0x8000);
++ adev->irqs_active = 1;
++ FN_EXIT0;
++}
++
++static void
++acxpci_s_up(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ enable_acx_irq(adev);
++ acx_unlock(adev, flags);
++
++ /* acx fw < 1.9.3.e has a hardware timer, and older drivers
++ ** used to use it. But we don't do that anymore, our OS
++ ** has reliable software timers */
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* Need to set ACX_STATE_IFACE_UP first, or else
++ ** timer won't be started by acx_set_status() */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_2_STA:
++ /* actual scan cmd will happen in start() */
++ acx_set_status(adev, ACX_STATUS_1_SCANNING); break;
++ case ACX_MODE_3_AP:
++ case ACX_MODE_MONITOR:
++ acx_set_status(adev, ACX_STATUS_4_ASSOCIATED); break;
++ }
++
++ acx_s_start(adev);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_down
++**
++** NB: device may be already hot unplugged if called from acxpci_e_remove()
++**
++** Disables on-card interrupt request, stops softirq and timer, stops queue,
++** sets status == STOPPED
++*/
++
++static void
++disable_acx_irq(acx_device_t *adev)
++{
++ FN_ENTER;
++
++ /* I guess mask is not 0xffff because acx100 won't signal
++ ** cmd completion then (needed for ifup).
++ ** Someone with acx100 please confirm */
++ write_reg16(adev, IO_ACX_IRQ_MASK, adev->irq_mask_off);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ adev->irqs_active = 0;
++ FN_EXIT0;
++}
++
++static void
++acxpci_s_down(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ /* Disable IRQs first, so that IRQs cannot race with us */
++ /* then wait until interrupts have finished executing on other CPUs */
++ acx_lock(adev, flags);
++ disable_acx_irq(adev);
++ synchronize_irq(adev->pdev->irq);
++ acx_unlock(adev, flags);
++
++ /* we really don't want to have an asynchronous tasklet disturb us
++ ** after something vital for its job has been shut down, so
++ ** end all remaining work now.
++ **
++ ** NB: carrier_off (done by set_status below) would lead to
++ ** not yet fully understood deadlock in FLUSH_SCHEDULED_WORK().
++ ** That's why we do FLUSH first.
++ **
++ ** NB2: we have a bad locking bug here: FLUSH_SCHEDULED_WORK()
++ ** waits for acx_e_after_interrupt_task to complete if it is running
++ ** on another CPU, but acx_e_after_interrupt_task
++ ** will sleep on sem forever, because it is taken by us!
++ ** Work around that by temporary sem unlock.
++ ** This will fail miserably if we'll be hit by concurrent
++ ** iwconfig or something in between. TODO! */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* This is possible:
++ ** FLUSH_SCHEDULED_WORK -> acx_e_after_interrupt_task ->
++ ** -> set_status(ASSOCIATED) -> wake_queue()
++ ** That's why we stop queue _after_ FLUSH_SCHEDULED_WORK
++ ** lock/unlock is just paranoia, maybe not needed */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ acx_unlock(adev, flags);
++
++ /* kernel/timer.c says it's illegal to del_timer_sync()
++ ** a timer which restarts itself. We guarantee this cannot
++ ** ever happen because acx_i_timer() never does this if
++ ** status is ACX_STATUS_0_STOPPED */
++ del_timer_sync(&adev->mgmt_timer);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_e_open
++**
++** Called as a result of SIOCSIFFLAGS ioctl changing the flags bit IFF_UP
++** from clear to set. In other words: ifconfig up.
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxpci_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ int result = OK;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ acx_init_task_scheduler(adev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D0); ? */
++
++ /* request shared IRQ handler */
++ if (request_irq(ndev->irq, acxpci_i_interrupt, SA_SHIRQ, ndev->name, ndev)) {
++ printk("%s: request_irq FAILED\n", ndev->name);
++ result = -EAGAIN;
++ goto done;
++ }
++ log(L_DEBUG|L_IRQ, "request_irq %d successful\n", ndev->irq);
++
++ /* ifup device */
++ acxpci_s_up(ndev);
++
++ /* We don't currently have to do anything else.
++ * The setup of the MAC should be subsequently completed via
++ * the mlme commands.
++ * Higher layers know we're ready from dev->start==1 and
++ * dev->tbusy==0. Our rx path knows to pass up received/
++ * frames because of dev->flags&IFF_UP is true.
++ */
++done:
++ acx_sem_unlock(adev);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxpci_e_close
++**
++** Called as a result of SIOCSIIFFLAGS ioctl changing the flags bit IFF_UP
++** from set to clear. I.e. called by "ifconfig DEV down"
++**
++** Returns:
++** 0 success
++** >0 f/w reported error
++** <0 driver reported error
++*/
++static int
++acxpci_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* ifdown device */
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ if (netif_device_present(ndev)) {
++ acxpci_s_down(ndev);
++ }
++
++ /* disable all IRQs, release shared IRQ handler */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ write_reg16(adev, IO_ACX_FEMR, 0x0);
++ free_irq(ndev->irq, ndev);
++
++/* TODO: pci_set_power_state(pdev, PCI_D3hot); ? */
++
++ /* We currently don't have to do anything else.
++ * Higher layers know we're not ready from dev->start==0 and
++ * dev->tbusy==1. Our rx path knows to not pass up received
++ * frames because of dev->flags&IFF_UP is false.
++ */
++ acx_sem_unlock(adev);
++
++ log(L_INIT, "closed device\n");
++ FN_EXIT0;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxpci_i_tx_timeout
++**
++** Called from network core. Must not sleep!
++*/
++static void
++acxpci_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ unsigned int tx_num_cleaned;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* clean processed tx descs, they may have been completely full */
++ tx_num_cleaned = acxpci_l_clean_txdesc(adev);
++
++ /* nothing cleaned, yet (almost) no free buffers available?
++ * --> clean all tx descs, no matter which status!!
++ * Note that I strongly suspect that doing emergency cleaning
++ * may confuse the firmware. This is a last ditch effort to get
++ * ANYTHING to work again...
++ *
++ * TODO: it's best to simply reset & reinit hw from scratch...
++ */
++ if ((adev->tx_free <= TX_EMERG_CLEAN) && (tx_num_cleaned == 0)) {
++ printk("%s: FAILED to free any of the many full tx buffers. "
++ "Switching to emergency freeing. "
++ "Please report!\n", ndev->name);
++ acxpci_l_clean_txdesc_emergency(adev);
++ }
++
++ if (acx_queue_stopped(ndev) && (ACX_STATUS_4_ASSOCIATED == adev->status))
++ acx_wake_queue(ndev, "after tx timeout");
++
++ /* stall may have happened due to radio drift, so recalib radio */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++
++ /* do unimportant work last */
++ printk("%s: tx timeout!\n", ndev->name);
++ adev->stats.tx_errors++;
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_i_set_multicast_list
++** FIXME: most likely needs refinement
++*/
++static void
++acxpci_i_set_multicast_list(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++
++ /* firmwares don't have allmulti capability,
++ * so just use promiscuous mode instead in this case. */
++ if (ndev->flags & (IFF_PROMISC|IFF_ALLMULTI)) {
++ SET_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ /* let kernel know in case *we* needed to set promiscuous */
++ ndev->flags |= (IFF_PROMISC|IFF_ALLMULTI);
++ } else {
++ CLEAR_BIT(adev->rx_config_1, RX_CFG1_RCV_PROMISCUOUS);
++ SET_BIT(adev->rx_config_1, RX_CFG1_FILTER_ALL_MULTI);
++ SET_BIT(adev->set_mask, SET_RXCONFIG);
++ ndev->flags &= ~(IFF_PROMISC|IFF_ALLMULTI);
++ }
++
++ /* cannot update card settings directly here, atomic context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_UPDATE_CARD_CFG);
++
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_l_process_rxdesc
++**
++** Called directly and only from the IRQ handler
++*/
++
++#if !ACX_DEBUG
++static inline void log_rxbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_rxbuffer(const acx_device_t *adev)
++{
++ register const struct rxhostdesc *rxhostdesc;
++ int i;
++ /* no FN_ENTER here, we don't want that */
++
++ rxhostdesc = adev->rxhostdesc_start;
++ if (unlikely(!rxhostdesc)) return;
++ for (i = 0; i < RX_CNT; i++) {
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ printk("rx: buf %d full\n", i);
++ rxhostdesc++;
++ }
++}
++#endif
++
++static void
++acxpci_l_process_rxdesc(acx_device_t *adev)
++{
++ register rxhostdesc_t *hostdesc;
++ unsigned count, tail;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_BUFR))
++ log_rxbuffer(adev);
++
++ /* First, have a loop to determine the first descriptor that's
++ * full, just in case there's a mismatch between our current
++ * rx_tail and the full descriptor we're supposed to handle. */
++ tail = adev->rx_tail;
++ count = RX_CNT;
++ while (1) {
++ hostdesc = &adev->rxhostdesc_start[tail];
++ /* advance tail regardless of outcome of the below test */
++ tail = (tail + 1) % RX_CNT;
++
++ if ((hostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (hostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ break; /* found it! */
++
++ if (unlikely(!--count)) /* hmm, no luck: all descs empty, bail out */
++ goto end;
++ }
++
++ /* now process descriptors, starting with the first we figured out */
++ while (1) {
++ log(L_BUFR, "rx: tail=%u Ctl_16=%04X Status=%08X\n",
++ tail, hostdesc->Ctl_16, hostdesc->Status);
++
++ acx_l_process_rxbuf(adev, hostdesc->data);
++
++ hostdesc->Status = 0;
++ /* flush all writes before adapter sees CTL_HOSTOWN change */
++ wmb();
++ /* Host no longer owns this, needs to be LAST */
++ CLEAR_BIT(hostdesc->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++
++ /* ok, descriptor is handled, now check the next descriptor */
++ hostdesc = &adev->rxhostdesc_start[tail];
++
++ /* if next descriptor is empty, then bail out */
++ if (!(hostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ || !(hostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)))
++ break;
++
++ tail = (tail + 1) % RX_CNT;
++ }
++end:
++ adev->rx_tail = tail;
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_i_interrupt
++**
++** IRQ handler (atomic context, must not sleep, blah, blah)
++*/
++
++/* scan is complete. all frames now on the receive queue are valid */
++#define INFO_SCAN_COMPLETE 0x0001
++#define INFO_WEP_KEY_NOT_FOUND 0x0002
++/* hw has been reset as the result of a watchdog timer timeout */
++#define INFO_WATCH_DOG_RESET 0x0003
++/* failed to send out NULL frame from PS mode notification to AP */
++/* recommended action: try entering 802.11 PS mode again */
++#define INFO_PS_FAIL 0x0004
++/* encryption/decryption process on a packet failed */
++#define INFO_IV_ICV_FAILURE 0x0005
++
++/* Info mailbox format:
++2 bytes: type
++2 bytes: status
++more bytes may follow
++ rumors say about status:
++ 0x0000 info available (set by hw)
++ 0x0001 information received (must be set by host)
++ 0x1000 info available, mailbox overflowed (messages lost) (set by hw)
++ but in practice we've seen:
++ 0x9000 when we did not set status to 0x0001 on prev message
++ 0x1001 when we did set it
++ 0x0000 was never seen
++ conclusion: this is really a bitfield:
++ 0x1000 is 'info available' bit
++ 'mailbox overflowed' bit is 0x8000, not 0x1000
++ value of 0x0000 probably means that there are no messages at all
++ P.S. I dunno how in hell hw is supposed to notice that messages are lost -
++ it does NOT clear bit 0x0001, and this bit will probably stay forever set
++ after we set it once. Let's hope this will be fixed in firmware someday
++*/
++
++static void
++handle_info_irq(acx_device_t *adev)
++{
++#if ACX_DEBUG
++ static const char * const info_type_msg[] = {
++ "(unknown)",
++ "scan complete",
++ "WEP key not found",
++ "internal watchdog reset was done",
++ "failed to send powersave (NULL frame) notification to AP",
++ "encrypt/decrypt on a packet has failed",
++ "TKIP tx keys disabled",
++ "TKIP rx keys disabled",
++ "TKIP rx: key ID not found",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "???",
++ "TKIP IV value exceeds thresh"
++ };
++#endif
++ u32 info_type, info_status;
++
++ info_type = readl(adev->info_area);
++ info_status = (info_type >> 16);
++ info_type = (u16)info_type;
++
++ /* inform fw that we have read this info message */
++ writel(info_type | 0x00010000, adev->info_area);
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_INFOACK);
++ write_flush(adev);
++
++ log(L_CTL, "info_type:%04X info_status:%04X\n",
++ info_type, info_status);
++
++ log(L_IRQ, "got Info IRQ: status %04X type %04X: %s\n",
++ info_status, info_type,
++ info_type_msg[(info_type >= VEC_SIZE(info_type_msg)) ?
++ 0 : info_type]
++ );
++}
++
++
++static void
++log_unusual_irq(u16 irqtype) {
++ /*
++ if (!printk_ratelimit())
++ return;
++ */
++
++ printk("acx: got");
++ if (irqtype & HOST_INT_RX_DATA) {
++ printk(" Rx_Data");
++ }
++ /* HOST_INT_TX_COMPLETE */
++ if (irqtype & HOST_INT_TX_XFER) {
++ printk(" Tx_Xfer");
++ }
++ /* HOST_INT_RX_COMPLETE */
++ if (irqtype & HOST_INT_DTIM) {
++ printk(" DTIM");
++ }
++ if (irqtype & HOST_INT_BEACON) {
++ printk(" Beacon");
++ }
++ if (irqtype & HOST_INT_TIMER) {
++ log(L_IRQ, " Timer");
++ }
++ if (irqtype & HOST_INT_KEY_NOT_FOUND) {
++ printk(" Key_Not_Found");
++ }
++ if (irqtype & HOST_INT_IV_ICV_FAILURE) {
++ printk(" IV_ICV_Failure (crypto)");
++ }
++ /* HOST_INT_CMD_COMPLETE */
++ /* HOST_INT_INFO */
++ if (irqtype & HOST_INT_OVERFLOW) {
++ printk(" Overflow");
++ }
++ if (irqtype & HOST_INT_PROCESS_ERROR) {
++ printk(" Process_Error");
++ }
++ /* HOST_INT_SCAN_COMPLETE */
++ if (irqtype & HOST_INT_FCS_THRESHOLD) {
++ printk(" FCS_Threshold");
++ }
++ if (irqtype & HOST_INT_UNKNOWN) {
++ printk(" Unknown");
++ }
++ printk(" IRQ(s)\n");
++}
++
++
++static void
++update_link_quality_led(acx_device_t *adev)
++{
++ int qual;
++
++ qual = acx_signal_determine_quality(adev->wstats.qual.level, adev->wstats.qual.noise);
++ if (qual > adev->brange_max_quality)
++ qual = adev->brange_max_quality;
++
++ if (time_after(jiffies, adev->brange_time_last_state_change +
++ (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) {
++ acxpci_l_power_led(adev, (adev->brange_last_state == 0));
++ adev->brange_last_state ^= 1; /* toggle */
++ adev->brange_time_last_state_change = jiffies;
++ }
++}
++
++
++#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* a la orinoco.c */
++
++static irqreturn_t
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxpci_i_interrupt(int irq, void *dev_id)
++#else
++acxpci_i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ unsigned long flags;
++ unsigned int irqcount = MAX_IRQLOOPS_PER_JIFFY;
++ register u16 irqtype;
++ u16 unmasked;
++
++ adev = ndev2adev((struct net_device*)dev_id);
++
++ /* LOCKING: can just spin_lock() since IRQs are disabled anyway.
++ * I am paranoid */
++ acx_lock(adev, flags);
++
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ if (unlikely(0xffff == unmasked)) {
++ /* 0xffff value hints at missing hardware,
++ * so don't do anything.
++ * Not very clean, but other drivers do the same... */
++ log(L_IRQ, "IRQ type:FFFF - device removed? IRQ_NONE\n");
++ goto none;
++ }
++
++ /* We will check only "interesting" IRQ types */
++ irqtype = unmasked & ~adev->irq_mask;
++ if (!irqtype) {
++ /* We are on a shared IRQ line and it wasn't our IRQ */
++ log(L_IRQ, "IRQ type:%04X, mask:%04X - all are masked, IRQ_NONE\n",
++ unmasked, adev->irq_mask);
++ goto none;
++ }
++
++ /* Done here because IRQ_NONEs taking three lines of log
++ ** drive me crazy */
++ FN_ENTER;
++
++#define IRQ_ITERATE 1
++#if IRQ_ITERATE
++if (jiffies != adev->irq_last_jiffies) {
++ adev->irq_loops_this_jiffy = 0;
++ adev->irq_last_jiffies = jiffies;
++}
++
++/* safety condition; we'll normally abort loop below
++ * in case no IRQ type occurred */
++while (likely(--irqcount)) {
++#endif
++ /* ACK all IRQs ASAP */
++ write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
++
++ log(L_IRQ, "IRQ type:%04X, mask:%04X, type & ~mask:%04X\n",
++ unmasked, adev->irq_mask, irqtype);
++
++ /* Handle most important IRQ types first */
++ if (irqtype & HOST_INT_RX_COMPLETE) {
++ log(L_IRQ, "got Rx_Complete IRQ\n");
++ acxpci_l_process_rxdesc(adev);
++ }
++ if (irqtype & HOST_INT_TX_COMPLETE) {
++ log(L_IRQ, "got Tx_Complete IRQ\n");
++ /* don't clean up on each Tx complete, wait a bit
++ * unless we're going towards full, in which case
++ * we do it immediately, too (otherwise we might lockup
++ * with a full Tx buffer if we go into
++ * acxpci_l_clean_txdesc() at a time when we won't wakeup
++ * the net queue in there for some reason...) */
++ if (adev->tx_free <= TX_START_CLEAN) {
++#if TX_CLEANUP_IN_SOFTIRQ
++ acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
++#else
++ acxpci_l_clean_txdesc(adev);
++#endif
++ }
++ }
++
++ /* Less frequent ones */
++ if (irqtype & (0
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ | HOST_INT_SCAN_COMPLETE
++ )) {
++ if (irqtype & HOST_INT_CMD_COMPLETE) {
++ log(L_IRQ, "got Command_Complete IRQ\n");
++ /* save the state for the running issue_cmd() */
++ SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
++ }
++ if (irqtype & HOST_INT_INFO) {
++ handle_info_irq(adev);
++ }
++ if (irqtype & HOST_INT_SCAN_COMPLETE) {
++ log(L_IRQ, "got Scan_Complete IRQ\n");
++ /* need to do that in process context */
++ acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
++ /* remember that fw is not scanning anymore */
++ SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
++ }
++ }
++
++ /* These we just log, but either they happen rarely
++ * or we keep them masked out */
++ if (irqtype & (0
++ | HOST_INT_RX_DATA
++ /* | HOST_INT_TX_COMPLETE */
++ | HOST_INT_TX_XFER
++ /* | HOST_INT_RX_COMPLETE */
++ | HOST_INT_DTIM
++ | HOST_INT_BEACON
++ | HOST_INT_TIMER
++ | HOST_INT_KEY_NOT_FOUND
++ | HOST_INT_IV_ICV_FAILURE
++ /* | HOST_INT_CMD_COMPLETE */
++ /* | HOST_INT_INFO */
++ | HOST_INT_OVERFLOW
++ | HOST_INT_PROCESS_ERROR
++ /* | HOST_INT_SCAN_COMPLETE */
++ | HOST_INT_FCS_THRESHOLD
++ | HOST_INT_UNKNOWN
++ )) {
++ log_unusual_irq(irqtype);
++ }
++
++#if IRQ_ITERATE
++ unmasked = read_reg16(adev, IO_ACX_IRQ_STATUS_CLEAR);
++ irqtype = unmasked & ~adev->irq_mask;
++ /* Bail out if no new IRQ bits or if all are masked out */
++ if (!irqtype)
++ break;
++
++ if (unlikely(++adev->irq_loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY)) {
++ printk(KERN_ERR "acx: too many interrupts per jiffy!\n");
++ /* Looks like card floods us with IRQs! Try to stop that */
++ write_reg16(adev, IO_ACX_IRQ_MASK, 0xffff);
++ /* This will short-circuit all future attempts to handle IRQ.
++ * We cant do much more... */
++ adev->irq_mask = 0;
++ break;
++ }
++}
++#endif
++ /* Routine to perform blink with range */
++ if (unlikely(adev->led_power == 2))
++ update_link_quality_led(adev);
++
++/* handled: */
++ /* write_flush(adev); - not needed, last op was read anyway */
++ acx_unlock(adev, flags);
++ FN_EXIT0;
++ return IRQ_HANDLED;
++
++none:
++ acx_unlock(adev, flags);
++ return IRQ_NONE;
++}
++
++
++/***********************************************************************
++** acxpci_l_power_led
++*/
++void
++acxpci_l_power_led(acx_device_t *adev, int enable)
++{
++ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800;
++
++ /* A hack. Not moving message rate limiting to adev->xxx
++ * (it's only a debug message after all) */
++ static int rate_limit = 0;
++
++ if (rate_limit++ < 3)
++ log(L_IOCTL, "Please report in case toggling the power "
++ "LED doesn't work for your card!\n");
++ if (enable)
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled);
++ else
++ write_reg16(adev, IO_ACX_GPIO_OUT,
++ read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled);
++}
++
++
++/***********************************************************************
++** Ioctls
++*/
++
++/***********************************************************************
++*/
++int
++acx111pci_ioctl_info(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++#if ACX_DEBUG > 1
++ acx_device_t *adev = ndev2adev(ndev);
++ rxdesc_t *rxdesc;
++ txdesc_t *txdesc;
++ rxhostdesc_t *rxhostdesc;
++ txhostdesc_t *txhostdesc;
++ struct acx111_ie_memoryconfig memconf;
++ struct acx111_ie_queueconfig queueconf;
++ unsigned long flags;
++ int i;
++ char memmap[0x34];
++ char rxconfig[0x8];
++ char fcserror[0x8];
++ char ratefallback[0x5];
++
++ if ( !(acx_debug & (L_IOCTL|L_DEBUG)) )
++ return OK;
++ /* using printk() since we checked debug flag already */
++
++ acx_sem_lock(adev);
++
++ if (!IS_ACX111(adev)) {
++ printk("acx111-specific function called "
++ "with non-acx111 chip, aborting\n");
++ goto end_ok;
++ }
++
++ /* get Acx111 Memory Configuration */
++ memset(&memconf, 0, sizeof(memconf));
++ /* BTW, fails with 12 (Write only) error code.
++ ** Retained for easy testing of issue_cmd error handling :) */
++ acx_s_interrogate(adev, &memconf, ACX1xx_IE_QUEUE_CONFIG);
++
++ /* get Acx111 Queue Configuration */
++ memset(&queueconf, 0, sizeof(queueconf));
++ acx_s_interrogate(adev, &queueconf, ACX1xx_IE_MEMORY_CONFIG_OPTIONS);
++
++ /* get Acx111 Memory Map */
++ memset(memmap, 0, sizeof(memmap));
++ acx_s_interrogate(adev, &memmap, ACX1xx_IE_MEMORY_MAP);
++
++ /* get Acx111 Rx Config */
++ memset(rxconfig, 0, sizeof(rxconfig));
++ acx_s_interrogate(adev, &rxconfig, ACX1xx_IE_RXCONFIG);
++
++ /* get Acx111 fcs error count */
++ memset(fcserror, 0, sizeof(fcserror));
++ acx_s_interrogate(adev, &fcserror, ACX1xx_IE_FCS_ERROR_COUNT);
++
++ /* get Acx111 rate fallback */
++ memset(ratefallback, 0, sizeof(ratefallback));
++ acx_s_interrogate(adev, &ratefallback, ACX1xx_IE_RATE_FALLBACK);
++
++ /* force occurrence of a beacon interrupt */
++ /* TODO: comment why is this necessary */
++ write_reg16(adev, IO_ACX_HINT_TRIG, HOST_INT_BEACON);
++
++ /* dump Acx111 Mem Configuration */
++ printk("dump mem config:\n"
++ "data read: %d, struct size: %d\n"
++ "Number of stations: %1X\n"
++ "Memory block size: %1X\n"
++ "tx/rx memory block allocation: %1X\n"
++ "count rx: %X / tx: %X queues\n"
++ "options %1X\n"
++ "fragmentation %1X\n"
++ "Rx Queue 1 Count Descriptors: %X\n"
++ "Rx Queue 1 Host Memory Start: %X\n"
++ "Tx Queue 1 Count Descriptors: %X\n"
++ "Tx Queue 1 Attributes: %X\n",
++ memconf.len, (int) sizeof(memconf),
++ memconf.no_of_stations,
++ memconf.memory_block_size,
++ memconf.tx_rx_memory_block_allocation,
++ memconf.count_rx_queues, memconf.count_tx_queues,
++ memconf.options,
++ memconf.fragmentation,
++ memconf.rx_queue1_count_descs,
++ acx2cpu(memconf.rx_queue1_host_rx_start),
++ memconf.tx_queue1_count_descs,
++ memconf.tx_queue1_attributes);
++
++ /* dump Acx111 Queue Configuration */
++ printk("dump queue head:\n"
++ "data read: %d, struct size: %d\n"
++ "tx_memory_block_address (from card): %X\n"
++ "rx_memory_block_address (from card): %X\n"
++ "rx1_queue address (from card): %X\n"
++ "tx1_queue address (from card): %X\n"
++ "tx1_queue attributes (from card): %X\n",
++ queueconf.len, (int) sizeof(queueconf),
++ queueconf.tx_memory_block_address,
++ queueconf.rx_memory_block_address,
++ queueconf.rx1_queue_address,
++ queueconf.tx1_queue_address,
++ queueconf.tx1_attributes);
++
++ /* dump Acx111 Mem Map */
++ printk("dump mem map:\n"
++ "data read: %d, struct size: %d\n"
++ "Code start: %X\n"
++ "Code end: %X\n"
++ "WEP default key start: %X\n"
++ "WEP default key end: %X\n"
++ "STA table start: %X\n"
++ "STA table end: %X\n"
++ "Packet template start: %X\n"
++ "Packet template end: %X\n"
++ "Queue memory start: %X\n"
++ "Queue memory end: %X\n"
++ "Packet memory pool start: %X\n"
++ "Packet memory pool end: %X\n"
++ "iobase: %p\n"
++ "iobase2: %p\n",
++ *((u16 *)&memmap[0x02]), (int) sizeof(memmap),
++ *((u32 *)&memmap[0x04]),
++ *((u32 *)&memmap[0x08]),
++ *((u32 *)&memmap[0x0C]),
++ *((u32 *)&memmap[0x10]),
++ *((u32 *)&memmap[0x14]),
++ *((u32 *)&memmap[0x18]),
++ *((u32 *)&memmap[0x1C]),
++ *((u32 *)&memmap[0x20]),
++ *((u32 *)&memmap[0x24]),
++ *((u32 *)&memmap[0x28]),
++ *((u32 *)&memmap[0x2C]),
++ *((u32 *)&memmap[0x30]),
++ adev->iobase,
++ adev->iobase2);
++
++ /* dump Acx111 Rx Config */
++ printk("dump rx config:\n"
++ "data read: %d, struct size: %d\n"
++ "rx config: %X\n"
++ "rx filter config: %X\n",
++ *((u16 *)&rxconfig[0x02]), (int) sizeof(rxconfig),
++ *((u16 *)&rxconfig[0x04]),
++ *((u16 *)&rxconfig[0x06]));
++
++ /* dump Acx111 fcs error */
++ printk("dump fcserror:\n"
++ "data read: %d, struct size: %d\n"
++ "fcserrors: %X\n",
++ *((u16 *)&fcserror[0x02]), (int) sizeof(fcserror),
++ *((u32 *)&fcserror[0x04]));
++
++ /* dump Acx111 rate fallback */
++ printk("dump rate fallback:\n"
++ "data read: %d, struct size: %d\n"
++ "ratefallback: %X\n",
++ *((u16 *)&ratefallback[0x02]), (int) sizeof(ratefallback),
++ *((u8 *)&ratefallback[0x04]));
++
++ /* protect against IRQ */
++ acx_lock(adev, flags);
++
++ /* dump acx111 internal rx descriptor ring buffer */
++ rxdesc = adev->rxdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump internal rxdesc %d:\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n"
++ "RxStatus (dynamic) 0x%X\n"
++ "Mod/Pre (dynamic) 0x%X\n",
++ i,
++ rxdesc,
++ acx2cpu(rxdesc->pNextDesc),
++ acx2cpu(rxdesc->ACXMemPtr),
++ rxdesc->Ctl_8,
++ rxdesc->rate,
++ rxdesc->error,
++ rxdesc->SNR);
++ rxdesc++;
++ }
++
++ /* dump host rx descriptor ring buffer */
++
++ rxhostdesc = adev->rxhostdesc_start;
++
++ /* loop over complete receive pool */
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ printk("\ndump host rxdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ rxhostdesc,
++ acx2cpu(rxhostdesc->data_phy),
++ rxhostdesc->data_offset,
++ le16_to_cpu(rxhostdesc->Ctl_16),
++ le16_to_cpu(rxhostdesc->length),
++ acx2cpu(rxhostdesc->desc_phy_next),
++ rxhostdesc->Status);
++ rxhostdesc++;
++ }
++
++ /* dump acx111 internal tx descriptor ring buffer */
++ txdesc = adev->txdesc_start;
++
++ /* loop over complete transmit pool */
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ printk("\ndump internal txdesc %d:\n"
++ "size 0x%X\n"
++ "mem pos %p\n"
++ "next 0x%X\n"
++ "acx mem pointer (dynamic) 0x%X\n"
++ "host mem pointer (dynamic) 0x%X\n"
++ "length (dynamic) 0x%X\n"
++ "CTL (dynamic) 0x%X\n"
++ "CTL2 (dynamic) 0x%X\n"
++ "Status (dynamic) 0x%X\n"
++ "Rate (dynamic) 0x%X\n",
++ i,
++ (int) sizeof(struct txdesc),
++ txdesc,
++ acx2cpu(txdesc->pNextDesc),
++ acx2cpu(txdesc->AcxMemPtr),
++ acx2cpu(txdesc->HostMemPtr),
++ le16_to_cpu(txdesc->total_length),
++ txdesc->Ctl_8,
++ txdesc->Ctl2_8, txdesc->error,
++ txdesc->u.r1.rate);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++
++ /* dump host tx descriptor ring buffer */
++
++ txhostdesc = adev->txhostdesc_start;
++
++ /* loop over complete host send pool */
++ if (txhostdesc) for (i = 0; i < TX_CNT * 2; i++) {
++ printk("\ndump host txdesc %d:\n"
++ "mem pos %p\n"
++ "buffer mem pos 0x%X\n"
++ "buffer mem offset 0x%X\n"
++ "CTL 0x%X\n"
++ "Length 0x%X\n"
++ "next 0x%X\n"
++ "Status 0x%X\n",
++ i,
++ txhostdesc,
++ acx2cpu(txhostdesc->data_phy),
++ txhostdesc->data_offset,
++ le16_to_cpu(txhostdesc->Ctl_16),
++ le16_to_cpu(txhostdesc->length),
++ acx2cpu(txhostdesc->desc_phy_next),
++ le32_to_cpu(txhostdesc->Status));
++ txhostdesc++;
++ }
++
++ /* write_reg16(adev, 0xb4, 0x4); */
++
++ acx_unlock(adev, flags);
++end_ok:
++
++ acx_sem_unlock(adev);
++#endif /* ACX_DEBUG */
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acx100pci_ioctl_set_phy_amp_bias(
++ struct net_device *ndev,
++ struct iw_request_info *info,
++ struct iw_param *vwrq,
++ char *extra)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ u16 gpio_old;
++
++ if (!IS_ACX100(adev)) {
++ /* WARNING!!!
++ * Removing this check *might* damage
++ * hardware, since we're tweaking GPIOs here after all!!!
++ * You've been warned...
++ * WARNING!!! */
++ printk("acx: sorry, setting bias level for non-acx100 "
++ "is not supported yet\n");
++ return OK;
++ }
++
++ if (*extra > 7) {
++ printk("acx: invalid bias parameter, range is 0-7\n");
++ return -EINVAL;
++ }
++
++ acx_sem_lock(adev);
++
++ /* Need to lock accesses to [IO_ACX_GPIO_OUT]:
++ * IRQ handler uses it to update LED */
++ acx_lock(adev, flags);
++ gpio_old = read_reg16(adev, IO_ACX_GPIO_OUT);
++ write_reg16(adev, IO_ACX_GPIO_OUT, (gpio_old & 0xf8ff) | ((u16)*extra << 8));
++ acx_unlock(adev, flags);
++
++ log(L_DEBUG, "gpio_old: 0x%04X\n", gpio_old);
++ printk("%s: PHY power amplifier bias: old:%d, new:%d\n",
++ ndev->name,
++ (gpio_old & 0x0700) >> 8, (unsigned char)*extra);
++
++ acx_sem_unlock(adev);
++
++ return OK;
++}
++
++
++/***************************************************************
++** acxpci_l_alloc_tx
++** Actually returns a txdesc_t* ptr
++**
++** FIXME: in case of fragments, should allocate multiple descrs
++** after figuring out how many we need and whether we still have
++** sufficiently many.
++*/
++tx_t*
++acxpci_l_alloc_tx(acx_device_t *adev)
++{
++ struct txdesc *txdesc;
++ unsigned head;
++ u8 ctl8;
++
++ FN_ENTER;
++
++ if (unlikely(!adev->tx_free)) {
++ printk("acx: BUG: no free txdesc left\n");
++ txdesc = NULL;
++ goto end;
++ }
++
++ head = adev->tx_head;
++ txdesc = get_txdesc(adev, head);
++ ctl8 = txdesc->Ctl_8;
++
++ /* 2005-10-11: there were several bug reports on this happening
++ ** but now cause seems to be understood & fixed */
++ if (unlikely(DESC_CTL_HOSTOWN != (ctl8 & DESC_CTL_ACXDONE_HOSTOWN))) {
++ /* whoops, descr at current index is not free, so probably
++ * ring buffer already full */
++ printk("acx: BUG: tx_head:%d Ctl8:0x%02X - failed to find "
++ "free txdesc\n", head, ctl8);
++ txdesc = NULL;
++ goto end;
++ }
++
++ /* Needed in case txdesc won't be eventually submitted for tx */
++ txdesc->Ctl_8 = DESC_CTL_ACXDONE_HOSTOWN;
++
++ adev->tx_free--;
++ log(L_BUFT, "tx: got desc %u, %u remain\n",
++ head, adev->tx_free);
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "stop queue (%u tx desc left)\n",
++ adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++
++ /* returning current descriptor, so advance to next free one */
++ adev->tx_head = (head + 1) % TX_CNT;
++end:
++ FN_EXIT0;
++
++ return (tx_t*)txdesc;
++}
++
++
++/***********************************************************************
++*/
++void*
++acxpci_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
++}
++
++
++/***********************************************************************
++** acxpci_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++**
++** FIXME: in case of fragments, should loop over the number of
++** pre-allocated tx descrs, properly setting up transfer data and
++** CTL_xxx flags according to fragment number.
++*/
++void
++acxpci_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
++{
++ txdesc_t *txdesc = (txdesc_t*)tx_opaque;
++ txhostdesc_t *hostdesc1, *hostdesc2;
++ client_t *clt;
++ u16 rate_cur;
++ u8 Ctl_8, Ctl2_8;
++
++ FN_ENTER;
++
++ /* fw doesn't tx such packets anyhow */
++ if (unlikely(len < WLAN_HDR_A3_LEN))
++ goto end;
++
++ hostdesc1 = get_txhostdesc(adev, txdesc);
++ /* modify flag status in separate variable to be able to write it back
++ * in one big swoop later (also in order to have less device memory
++ * accesses) */
++ Ctl_8 = txdesc->Ctl_8;
++ Ctl2_8 = 0; /* really need to init it to 0, not txdesc->Ctl2_8, it seems */
++
++ hostdesc2 = hostdesc1 + 1;
++
++ /* DON'T simply set Ctl field to 0 here globally,
++ * it needs to maintain a consistent flag status (those are state flags!!),
++ * otherwise it may lead to severe disruption. Only set or reset particular
++ * flags at the exact moment this is needed... */
++
++ /* let chip do RTS/CTS handshaking before sending
++ * in case packet size exceeds threshold */
++ if (len > adev->rts_threshold)
++ SET_BIT(Ctl2_8, DESC_CTL2_RTS);
++ else
++ CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, ((wlan_hdr_t*)hostdesc1->data)->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++#if 0
++/* testing was done on acx111: */
++ case ACX_MODE_MONITOR:
++ SET_BIT(Ctl2_8, 0
++/* sends CTS to self before packet */
++ + DESC_CTL2_SEQ /* don't increase sequence field */
++/* not working (looks like good fcs is still added) */
++ + DESC_CTL2_FCS /* don't add the FCS */
++/* not tested */
++ + DESC_CTL2_MORE_FRAG
++/* not tested */
++ + DESC_CTL2_RETRY /* don't increase retry field */
++/* not tested */
++ + DESC_CTL2_POWER /* don't increase power mgmt. field */
++/* no effect */
++ + DESC_CTL2_WEP /* encrypt this frame */
++/* not tested */
++ + DESC_CTL2_DUR /* don't increase duration field */
++ );
++ /* fallthrough */
++#endif
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ rate_cur = clt ? clt->rate_cur : adev->rate_bcast;
++ if (unlikely(!rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* used in tx cleanup routine for auto rate and accounting: */
++ put_txcr(adev, txdesc, clt, rate_cur);
++
++ txdesc->total_length = cpu_to_le16(len);
++ hostdesc2->length = cpu_to_le16(len - WLAN_HDR_A3_LEN);
++ if (IS_ACX111(adev)) {
++ /* note that if !txdesc->do_auto, txrate->cur
++ ** has only one nonzero bit */
++ txdesc->u.r2.rate111 = cpu_to_le16(
++ rate_cur
++ /* WARNING: I was never able to make it work with prism54 AP.
++ ** It was falling down to 1Mbit where shortpre is not applicable,
++ ** and not working at all at "5,11 basic rates only" setting.
++ ** I even didn't see tx packets in radio packet capture.
++ ** Disabled for now --vda */
++ /*| ((clt->shortpre && clt->cur!=RATE111_1) ? RATE111_SHORTPRE : 0) */
++ );
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ /* should add this to rate111 above as necessary */
++ | (clt->pbcc511 ? RATE111_PBCC511 : 0)
++#endif
++ hostdesc1->length = cpu_to_le16(len);
++ } else { /* ACX100 */
++ u8 rate_100 = clt ? clt->rate_100 : adev->rate_bcast100;
++ txdesc->u.r1.rate = rate_100;
++#ifdef TODO_FIGURE_OUT_WHEN_TO_SET_THIS
++ if (clt->pbcc511) {
++ if (n == RATE100_5 || n == RATE100_11)
++ n |= RATE100_PBCC511;
++ }
++
++ if (clt->shortpre && (clt->cur != RATE111_1))
++ SET_BIT(Ctl_8, DESC_CTL_SHORT_PREAMBLE); /* set Short Preamble */
++#endif
++ /* set autodma and reclaim and 1st mpdu */
++ SET_BIT(Ctl_8, DESC_CTL_AUTODMA | DESC_CTL_RECLAIM | DESC_CTL_FIRSTFRAG);
++#if ACX_FRAGMENTATION
++ /* SET_BIT(Ctl2_8, DESC_CTL2_MORE_FRAG); cannot set it unconditionally, needs to be set for all non-last fragments */
++#endif
++ hostdesc1->length = cpu_to_le16(WLAN_HDR_A3_LEN);
++ }
++ /* don't need to clean ack/rts statistics here, already
++ * done on descr cleanup */
++
++ /* clears HOSTOWN and ACXDONE bits, thus telling that the descriptors
++ * are now owned by the acx100; do this as LAST operation */
++ CLEAR_BIT(Ctl_8, DESC_CTL_ACXDONE_HOSTOWN);
++ /* flush writes before we release hostdesc to the adapter here */
++ wmb();
++ CLEAR_BIT(hostdesc1->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++ CLEAR_BIT(hostdesc2->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++
++ /* write back modified flags */
++ txdesc->Ctl2_8 = Ctl2_8;
++ txdesc->Ctl_8 = Ctl_8;
++ /* unused: txdesc->tx_time = cpu_to_le32(jiffies); */
++
++ /* flush writes before we tell the adapter that it's its turn now */
++ mmiowb();
++ write_reg16(adev, IO_ACX_INT_TRIG, INT_TRIG_TXPRC);
++ write_flush(adev);
++
++ /* log the packet content AFTER sending it,
++ * in order to not delay sending any further than absolutely needed
++ * Do separate logs for acx100/111 to have human-readable rates */
++ if (unlikely(acx_debug & (L_XFER|L_DATA))) {
++ u16 fc = ((wlan_hdr_t*)hostdesc1->data)->fc;
++ if (IS_ACX111(adev))
++ printk("tx: pkt (%s): len %d "
++ "rate %04X%s status %u\n",
++ acx_get_packet_type_string(le16_to_cpu(fc)), len,
++ le16_to_cpu(txdesc->u.r2.rate111),
++ (le16_to_cpu(txdesc->u.r2.rate111) & RATE111_SHORTPRE) ? "(SPr)" : "",
++ adev->status);
++ else
++ printk("tx: pkt (%s): len %d rate %03u%s status %u\n",
++ acx_get_packet_type_string(fc), len,
++ txdesc->u.r1.rate,
++ (Ctl_8 & DESC_CTL_SHORT_PREAMBLE) ? "(SPr)" : "",
++ adev->status);
++
++ if (acx_debug & L_DATA) {
++ printk("tx: 802.11 [%d]: ", len);
++ acx_dump_bytes(hostdesc1->data, len);
++ }
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_l_clean_txdesc
++**
++** This function resets the txdescs' status when the ACX100
++** signals the TX done IRQ (txdescs have been processed), starting with
++** the pool index of the descriptor which we would use next,
++** in order to make sure that we can be as fast as possible
++** in filling new txdescs.
++** Everytime we get called we know where the next packet to be cleaned is.
++*/
++
++#if !ACX_DEBUG
++static inline void log_txbuffer(const acx_device_t *adev) {}
++#else
++static void
++log_txbuffer(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++
++ /* no FN_ENTER here, we don't want that */
++ /* no locks here, since it's entirely non-critical code */
++ txdesc = adev->txdesc_start;
++ if (unlikely(!txdesc)) return;
++ printk("tx: desc->Ctl8's:");
++ for (i = 0; i < TX_CNT; i++) {
++ printk(" %02X", txdesc->Ctl_8);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ printk("\n");
++}
++#endif
++
++
++static void
++handle_tx_error(acx_device_t *adev, u8 error, unsigned int finger)
++{
++ const char *err = "unknown error";
++
++ /* hmm, should we handle this as a mask
++ * of *several* bits?
++ * For now I think only caring about
++ * individual bits is ok... */
++ switch (error) {
++ case 0x01:
++ err = "no Tx due to error in other fragment";
++ adev->wstats.discard.fragment++;
++ break;
++ case 0x02:
++ err = "Tx aborted";
++ adev->stats.tx_aborted_errors++;
++ break;
++ case 0x04:
++ err = "Tx desc wrong parameters";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x08:
++ err = "WEP key not found";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x10:
++ err = "MSDU lifetime timeout? - try changing "
++ "'iwconfig retry lifetime XXX'";
++ adev->wstats.discard.misc++;
++ break;
++ case 0x20:
++ err = "excessive Tx retries due to either distance "
++ "too high or unable to Tx or Tx frame error - "
++ "try changing 'iwconfig txpower XXX' or "
++ "'sens'itivity or 'retry'";
++ adev->wstats.discard.retries++;
++ /* Tx error 0x20 also seems to occur on
++ * overheating, so I'm not sure whether we
++ * actually want to do aggressive radio recalibration,
++ * since people maybe won't notice then that their hardware
++ * is slowly getting cooked...
++ * Or is it still a safe long distance from utter
++ * radio non-functionality despite many radio recalibs
++ * to final destructive overheating of the hardware?
++ * In this case we really should do recalib here...
++ * I guess the only way to find out is to do a
++ * potentially fatal self-experiment :-\
++ * Or maybe only recalib in case we're using Tx
++ * rate auto (on errors switching to lower speed
++ * --> less heat?) or 802.11 power save mode?
++ *
++ * ok, just do it. */
++ if (++adev->retry_errors_msg_ratelimit % 4 == 0) {
++ if (adev->retry_errors_msg_ratelimit <= 20) {
++ printk("%s: several excessive Tx "
++ "retry errors occurred, attempting "
++ "to recalibrate radio. Radio "
++ "drift might be caused by increasing "
++ "card temperature, please check the card "
++ "before it's too late!\n",
++ adev->ndev->name);
++ if (adev->retry_errors_msg_ratelimit == 20)
++ printk("disabling above message\n");
++ }
++
++ acx_schedule_task(adev, ACX_AFTER_IRQ_CMD_RADIO_RECALIB);
++ }
++ break;
++ case 0x40:
++ err = "Tx buffer overflow";
++ adev->stats.tx_fifo_errors++;
++ break;
++ case 0x80:
++ /* possibly ACPI C-state powersaving related!!!
++ * (DMA timeout due to excessively high wakeup
++ * latency after C-state activation!?)
++ * Disable C-State powersaving and try again,
++ * then PLEASE REPORT, I'm VERY interested in
++ * whether my theory is correct that this is
++ * actually the problem here.
++ * In that case, use new Linux idle wakeup latency
++ * requirements kernel API to prevent this issue. */
++ err = "DMA error";
++ adev->wstats.discard.misc++;
++ break;
++ }
++ adev->stats.tx_errors++;
++ if (adev->stats.tx_errors <= 20)
++ printk("%s: tx error 0x%02X, buf %02u! (%s)\n",
++ adev->ndev->name, error, finger, err);
++ else
++ printk("%s: tx error 0x%02X, buf %02u!\n",
++ adev->ndev->name, error, finger);
++}
++
++
++unsigned int
++acxpci_l_clean_txdesc(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ unsigned finger;
++ int num_cleaned;
++ u16 r111;
++ u8 error, ack_failures, rts_failures, rts_ok, r100;
++
++ FN_ENTER;
++
++ if (unlikely(acx_debug & L_DEBUG))
++ log_txbuffer(adev);
++
++ log(L_BUFT, "tx: cleaning up bufs from %u\n", adev->tx_tail);
++
++ /* We know first descr which is not free yet. We advance it as far
++ ** as we see correct bits set in following descs (if next desc
++ ** is NOT free, we shouldn't advance at all). We know that in
++ ** front of tx_tail may be "holes" with isolated free descs.
++ ** We will catch up when all intermediate descs will be freed also */
++
++ finger = adev->tx_tail;
++ num_cleaned = 0;
++ while (likely(finger != adev->tx_head)) {
++ txdesc = get_txdesc(adev, finger);
++
++ /* If we allocated txdesc on tx path but then decided
++ ** to NOT use it, then it will be left as a free "bubble"
++ ** in the "allocated for tx" part of the ring.
++ ** We may meet it on the next ring pass here. */
++
++ /* stop if not marked as "tx finished" and "host owned" */
++ if ((txdesc->Ctl_8 & DESC_CTL_ACXDONE_HOSTOWN)
++ != DESC_CTL_ACXDONE_HOSTOWN) {
++ if (unlikely(!num_cleaned)) { /* maybe remove completely */
++ log(L_BUFT, "clean_txdesc: tail isn't free. "
++ "tail:%d head:%d\n",
++ adev->tx_tail, adev->tx_head);
++ }
++ break;
++ }
++
++ /* remember desc values... */
++ error = txdesc->error;
++ ack_failures = txdesc->ack_failures;
++ rts_failures = txdesc->rts_failures;
++ rts_ok = txdesc->rts_ok;
++ r100 = txdesc->u.r1.rate;
++ r111 = le16_to_cpu(txdesc->u.r2.rate111);
++
++ /* need to check for certain error conditions before we
++ * clean the descriptor: we still need valid descr data here */
++ if (unlikely(0x30 & error)) {
++ /* only send IWEVTXDROP in case of retry or lifetime exceeded;
++ * all other errors mean we screwed up locally */
++ union iwreq_data wrqu;
++ wlan_hdr_t *hdr;
++ txhostdesc_t *hostdesc;
++
++ hostdesc = get_txhostdesc(adev, txdesc);
++ hdr = (wlan_hdr_t *)hostdesc->data;
++ MAC_COPY(wrqu.addr.sa_data, hdr->a1);
++ wireless_send_event(adev->ndev, IWEVTXDROP, &wrqu, NULL);
++ }
++
++ /* ...and free the desc */
++ txdesc->error = 0;
++ txdesc->ack_failures = 0;
++ txdesc->rts_failures = 0;
++ txdesc->rts_ok = 0;
++ /* signal host owning it LAST, since ACX already knows that this
++ ** descriptor is finished since it set Ctl_8 accordingly. */
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++
++ adev->tx_free++;
++ num_cleaned++;
++
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (avail. Tx desc %u)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++ /* do error checking, rate handling and logging
++ * AFTER having done the work, it's faster */
++
++ /* do rate handling */
++ if (adev->rate_auto) {
++ struct client *clt = get_txc(adev, txdesc);
++ if (clt) {
++ u16 cur = get_txr(adev, txdesc);
++ if (clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ r100, r111, /* actually used rate */
++ (error & 0x30), /* was there an error? */
++ TX_CNT + TX_CLEAN_BACKLOG - adev->tx_free);
++ }
++ }
++ }
++
++ if (unlikely(error))
++ handle_tx_error(adev, error, finger);
++
++ if (IS_ACX111(adev))
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u r111=%04X\n",
++ finger, ack_failures, rts_failures, rts_ok, r111);
++ else
++ log(L_BUFT, "tx: cleaned %u: !ACK=%u !RTS=%u RTS=%u rate=%u\n",
++ finger, ack_failures, rts_failures, rts_ok, r100);
++
++ /* update pointer for descr to be cleaned next */
++ finger = (finger + 1) % TX_CNT;
++ }
++
++ /* remember last position */
++ adev->tx_tail = finger;
++/* end: */
++ FN_EXIT1(num_cleaned);
++ return num_cleaned;
++}
++
++/* clean *all* Tx descriptors, and regardless of their previous state.
++ * Used for brute-force reset handling. */
++void
++acxpci_l_clean_txdesc_emergency(acx_device_t *adev)
++{
++ txdesc_t *txdesc;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc = get_txdesc(adev, i);
++
++ /* free it */
++ txdesc->ack_failures = 0;
++ txdesc->rts_failures = 0;
++ txdesc->rts_ok = 0;
++ txdesc->error = 0;
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ }
++
++ adev->tx_free = TX_CNT;
++
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxpci_s_create_tx_host_desc_queue
++*/
++
++static void*
++allocate(acx_device_t *adev, size_t size, dma_addr_t *phy, const char *msg)
++{
++ void *ptr;
++
++ ptr = dma_alloc_coherent(adev->pdev ? &adev->pdev->dev : NULL,
++ size, phy, GFP_KERNEL);
++
++ if (ptr) {
++ log(L_DEBUG, "%s sz=%d adr=0x%p phy=0x%08llx\n",
++ msg, (int)size, ptr, (unsigned long long)*phy);
++ memset(ptr, 0, size);
++ return ptr;
++ }
++ printk(KERN_ERR "acx: %s allocation FAILED (%d bytes)\n",
++ msg, (int)size);
++ return NULL;
++}
++
++
++static int
++acxpci_s_create_tx_host_desc_queue(acx_device_t *adev)
++{
++ txhostdesc_t *hostdesc;
++ u8 *txbuf;
++ dma_addr_t hostdesc_phy;
++ dma_addr_t txbuf_phy;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate TX buffer */
++ adev->txbuf_area_size = TX_CNT * WLAN_A4FR_MAXLEN_WEP_FCS;
++ adev->txbuf_start = allocate(adev, adev->txbuf_area_size,
++ &adev->txbuf_startphy, "txbuf_start");
++ if (!adev->txbuf_start)
++ goto fail;
++
++ /* allocate the TX host descriptor queue pool */
++ adev->txhostdesc_area_size = TX_CNT * 2*sizeof(*hostdesc);
++ adev->txhostdesc_start = allocate(adev, adev->txhostdesc_area_size,
++ &adev->txhostdesc_startphy, "txhostdesc_start");
++ if (!adev->txhostdesc_start)
++ goto fail;
++ /* check for proper alignment of TX host descriptor pool */
++ if ((long) adev->txhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ hostdesc = adev->txhostdesc_start;
++ hostdesc_phy = adev->txhostdesc_startphy;
++ txbuf = adev->txbuf_start;
++ txbuf_phy = adev->txbuf_startphy;
++
++#if 0
++/* Each tx buffer is accessed by hardware via
++** txdesc -> txhostdesc(s) -> txbuffer(s).
++** We use only one txhostdesc per txdesc, but it looks like
++** acx111 is buggy: it accesses second txhostdesc
++** (via hostdesc.desc_phy_next field) even if
++** txdesc->length == hostdesc->length and thus
++** entire packet was placed into first txhostdesc.
++** Due to this bug acx111 hangs unless second txhostdesc
++** has le16_to_cpu(hostdesc.length) = 3 (or larger)
++** Storing NULL into hostdesc.desc_phy_next
++** doesn't seem to help.
++**
++** Update: although it worked on Xterasys XN-2522g
++** with len=3 trick, WG311v2 is even more bogus, doesn't work.
++** Keeping this code (#ifdef'ed out) for documentational purposes.
++*/
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++ if (!(i & 1)) {
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc->pNext = ptr2acx(NULL);
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ hostdesc->data = txbuf;
++
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS;
++ } else {
++ /* hostdesc->data_phy = ... */
++ /* hostdesc->data_offset = ... */
++ /* hostdesc->reserved = ... */
++ /* hostdesc->Ctl_16 = ... */
++ hostdesc->length = cpu_to_le16(3); /* bug workaround */
++ /* hostdesc->desc_phy_next = ... */
++ /* hostdesc->pNext = ... */
++ /* hostdesc->Status = ... */
++ /* below: non-hardware fields */
++ /* hostdesc->data = ... */
++ }
++ hostdesc++;
++ }
++#endif
++/* We initialize two hostdescs so that they point to adjacent
++** memory areas. Thus txbuf is really just a contiguous memory area */
++ for (i = 0; i < TX_CNT*2; i++) {
++ hostdesc_phy += sizeof(*hostdesc);
++
++ hostdesc->data_phy = cpu2acx(txbuf_phy);
++ /* done by memset(0): hostdesc->data_offset = 0; */
++ /* hostdesc->reserved = ... */
++ hostdesc->Ctl_16 = cpu_to_le16(DESC_CTL_HOSTOWN);
++ /* hostdesc->length = ... */
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ /* done by memset(0): hostdesc->pNext = ptr2acx(NULL); */
++ /* hostdesc->Status = ... */
++ /* ->data is a non-hardware field: */
++ hostdesc->data = txbuf;
++
++ if (!(i & 1)) {
++ txbuf += WLAN_HDR_A3_LEN;
++ txbuf_phy += WLAN_HDR_A3_LEN;
++ } else {
++ txbuf += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ txbuf_phy += WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN;
++ }
++ hostdesc++;
++ }
++ hostdesc--;
++ hostdesc->desc_phy_next = cpu2acx(adev->txhostdesc_startphy);
++
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_tx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxpci_s_create_rx_host_desc_queue
++*/
++/* the whole size of a data buffer (header plus data body)
++ * plus 32 bytes safety offset at the end */
++#define RX_BUFFER_SIZE (sizeof(rxbuffer_t) + 32)
++
++static int
++acxpci_s_create_rx_host_desc_queue(acx_device_t *adev)
++{
++ rxhostdesc_t *hostdesc;
++ rxbuffer_t *rxbuf;
++ dma_addr_t hostdesc_phy;
++ dma_addr_t rxbuf_phy;
++ int i;
++
++ FN_ENTER;
++
++ /* allocate the RX host descriptor queue pool */
++ adev->rxhostdesc_area_size = RX_CNT * sizeof(*hostdesc);
++ adev->rxhostdesc_start = allocate(adev, adev->rxhostdesc_area_size,
++ &adev->rxhostdesc_startphy, "rxhostdesc_start");
++ if (!adev->rxhostdesc_start)
++ goto fail;
++ /* check for proper alignment of RX host descriptor pool */
++ if ((long) adev->rxhostdesc_start & 3) {
++ printk("acx: driver bug: dma alloc returns unaligned address\n");
++ goto fail;
++ }
++
++ /* allocate Rx buffer pool which will be used by the acx
++ * to store the whole content of the received frames in it */
++ adev->rxbuf_area_size = RX_CNT * RX_BUFFER_SIZE;
++ adev->rxbuf_start = allocate(adev, adev->rxbuf_area_size,
++ &adev->rxbuf_startphy, "rxbuf_start");
++ if (!adev->rxbuf_start)
++ goto fail;
++
++ rxbuf = adev->rxbuf_start;
++ rxbuf_phy = adev->rxbuf_startphy;
++ hostdesc = adev->rxhostdesc_start;
++ hostdesc_phy = adev->rxhostdesc_startphy;
++
++ /* don't make any popular C programming pointer arithmetic mistakes
++ * here, otherwise I'll kill you...
++ * (and don't dare asking me why I'm warning you about that...) */
++ for (i = 0; i < RX_CNT; i++) {
++ hostdesc->data = rxbuf;
++ hostdesc->data_phy = cpu2acx(rxbuf_phy);
++ hostdesc->length = cpu_to_le16(RX_BUFFER_SIZE);
++ CLEAR_BIT(hostdesc->Ctl_16, cpu_to_le16(DESC_CTL_HOSTOWN));
++ rxbuf++;
++ rxbuf_phy += sizeof(*rxbuf);
++ hostdesc_phy += sizeof(*hostdesc);
++ hostdesc->desc_phy_next = cpu2acx(hostdesc_phy);
++ hostdesc++;
++ }
++ hostdesc--;
++ hostdesc->desc_phy_next = cpu2acx(adev->rxhostdesc_startphy);
++ FN_EXIT1(OK);
++ return OK;
++fail:
++ printk("acx: create_rx_host_desc_queue FAILED\n");
++ /* dealloc will be done by free function on error case */
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***************************************************************
++** acxpci_s_create_hostdesc_queues
++*/
++int
++acxpci_s_create_hostdesc_queues(acx_device_t *adev)
++{
++ int result;
++ result = acxpci_s_create_tx_host_desc_queue(adev);
++ if (OK != result) return result;
++ result = acxpci_s_create_rx_host_desc_queue(adev);
++ return result;
++}
++
++
++/***************************************************************
++** acxpci_create_tx_desc_queue
++*/
++static void
++acxpci_create_tx_desc_queue(acx_device_t *adev, u32 tx_queue_start)
++{
++ txdesc_t *txdesc;
++ txhostdesc_t *hostdesc;
++ dma_addr_t hostmemptr;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ if (IS_ACX100(adev))
++ adev->txdesc_size = sizeof(*txdesc);
++ else
++ /* the acx111 txdesc is 4 bytes larger */
++ adev->txdesc_size = sizeof(*txdesc) + 4;
++
++ adev->txdesc_start = (txdesc_t *) (adev->iobase2 + tx_queue_start);
++
++ log(L_DEBUG, "adev->iobase2=%p\n"
++ "tx_queue_start=%08X\n"
++ "adev->txdesc_start=%p\n",
++ adev->iobase2,
++ tx_queue_start,
++ adev->txdesc_start);
++
++ adev->tx_free = TX_CNT;
++ /* done by memset: adev->tx_head = 0; */
++ /* done by memset: adev->tx_tail = 0; */
++ txdesc = adev->txdesc_start;
++ mem_offs = tx_queue_start;
++ hostmemptr = adev->txhostdesc_startphy;
++ hostdesc = adev->txhostdesc_start;
++
++ if (IS_ACX111(adev)) {
++ /* ACX111 has a preinitialized Tx buffer! */
++ /* loop over whole send pool */
++ /* FIXME: do we have to do the hostmemptr stuff here?? */
++ for (i = 0; i < TX_CNT; i++) {
++ txdesc->HostMemPtr = ptr2acx(hostmemptr);
++ txdesc->Ctl_8 = DESC_CTL_HOSTOWN;
++ /* reserve two (hdr desc and payload desc) */
++ hostdesc += 2;
++ hostmemptr += 2 * sizeof(*hostdesc);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ } else {
++ /* ACX100 Tx buffer needs to be initialized by us */
++ /* clear whole send pool. sizeof is safe here (we are acx100) */
++ memset(adev->txdesc_start, 0, TX_CNT * sizeof(*txdesc));
++
++ /* loop over whole send pool */
++ for (i = 0; i < TX_CNT; i++) {
++ log(L_DEBUG, "configure card tx descriptor: 0x%p, "
++ "size: 0x%X\n", txdesc, adev->txdesc_size);
++
++ /* pointer to hostdesc memory */
++ txdesc->HostMemPtr = ptr2acx(hostmemptr);
++ /* initialise ctl */
++ txdesc->Ctl_8 = ( DESC_CTL_HOSTOWN | DESC_CTL_RECLAIM
++ | DESC_CTL_AUTODMA | DESC_CTL_FIRSTFRAG);
++ /* done by memset(0): txdesc->Ctl2_8 = 0; */
++ /* point to next txdesc */
++ txdesc->pNextDesc = cpu2acx(mem_offs + adev->txdesc_size);
++ /* reserve two (hdr desc and payload desc) */
++ hostdesc += 2;
++ hostmemptr += 2 * sizeof(*hostdesc);
++ /* go to the next one */
++ mem_offs += adev->txdesc_size;
++ /* ++ is safe here (we are acx100) */
++ txdesc++;
++ }
++ /* go back to the last one */
++ txdesc--;
++ /* and point to the first making it a ring buffer */
++ txdesc->pNextDesc = cpu2acx(tx_queue_start);
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_create_rx_desc_queue
++*/
++static void
++acxpci_create_rx_desc_queue(acx_device_t *adev, u32 rx_queue_start)
++{
++ rxdesc_t *rxdesc;
++ u32 mem_offs;
++ int i;
++
++ FN_ENTER;
++
++ /* done by memset: adev->rx_tail = 0; */
++
++ /* ACX111 doesn't need any further config: preconfigures itself.
++ * Simply print ring buffer for debugging */
++ if (IS_ACX111(adev)) {
++ /* rxdesc_start already set here */
++
++ adev->rxdesc_start = (rxdesc_t *) ((u8 *)adev->iobase2 + rx_queue_start);
++
++ rxdesc = adev->rxdesc_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor %d @ 0x%p\n", i, rxdesc);
++ rxdesc = adev->rxdesc_start = (rxdesc_t *)
++ (adev->iobase2 + acx2cpu(rxdesc->pNextDesc));
++ }
++ } else {
++ /* we didn't pre-calculate rxdesc_start in case of ACX100 */
++ /* rxdesc_start should be right AFTER Tx pool */
++ adev->rxdesc_start = (rxdesc_t *)
++ ((u8 *) adev->txdesc_start + (TX_CNT * sizeof(txdesc_t)));
++ /* NB: sizeof(txdesc_t) above is valid because we know
++ ** we are in if (acx100) block. Beware of cut-n-pasting elsewhere!
++ ** acx111's txdesc is larger! */
++
++ memset(adev->rxdesc_start, 0, RX_CNT * sizeof(*rxdesc));
++
++ /* loop over whole receive pool */
++ rxdesc = adev->rxdesc_start;
++ mem_offs = rx_queue_start;
++ for (i = 0; i < RX_CNT; i++) {
++ log(L_DEBUG, "rx descriptor @ 0x%p\n", rxdesc);
++ rxdesc->Ctl_8 = DESC_CTL_RECLAIM | DESC_CTL_AUTODMA;
++ /* point to next rxdesc */
++ rxdesc->pNextDesc = cpu2acx(mem_offs + sizeof(*rxdesc));
++ /* go to the next one */
++ mem_offs += sizeof(*rxdesc);
++ rxdesc++;
++ }
++ /* go to the last one */
++ rxdesc--;
++
++ /* and point to the first making it a ring buffer */
++ rxdesc->pNextDesc = cpu2acx(rx_queue_start);
++ }
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxpci_create_desc_queues
++*/
++void
++acxpci_create_desc_queues(acx_device_t *adev, u32 tx_queue_start, u32 rx_queue_start)
++{
++ acxpci_create_tx_desc_queue(adev, tx_queue_start);
++ acxpci_create_rx_desc_queue(adev, rx_queue_start);
++}
++
++
++/***************************************************************
++** acxpci_s_proc_diag_output
++*/
++char*
++acxpci_s_proc_diag_output(char *p, acx_device_t *adev)
++{
++ const char *rtl, *thd, *ttl;
++ rxhostdesc_t *rxhostdesc;
++ txdesc_t *txdesc;
++ int i;
++
++ FN_ENTER;
++
++ p += sprintf(p, "** Rx buf **\n");
++ rxhostdesc = adev->rxhostdesc_start;
++ if (rxhostdesc) for (i = 0; i < RX_CNT; i++) {
++ rtl = (i == adev->rx_tail) ? " [tail]" : "";
++ if ((rxhostdesc->Ctl_16 & cpu_to_le16(DESC_CTL_HOSTOWN))
++ && (rxhostdesc->Status & cpu_to_le32(DESC_STATUS_FULL)) )
++ p += sprintf(p, "%02u FULL%s\n", i, rtl);
++ else
++ p += sprintf(p, "%02u empty%s\n", i, rtl);
++ rxhostdesc++;
++ }
++ p += sprintf(p, "** Tx buf (free %d, Linux netqueue %s) **\n", adev->tx_free,
++ acx_queue_stopped(adev->ndev) ? "STOPPED" : "running");
++ txdesc = adev->txdesc_start;
++ if (txdesc) for (i = 0; i < TX_CNT; i++) {
++ thd = (i == adev->tx_head) ? " [head]" : "";
++ ttl = (i == adev->tx_tail) ? " [tail]" : "";
++ if (txdesc->Ctl_8 & DESC_CTL_ACXDONE)
++ p += sprintf(p, "%02u free (%02X)%s%s\n", i, txdesc->Ctl_8, thd, ttl);
++ else
++ p += sprintf(p, "%02u tx (%02X)%s%s\n", i, txdesc->Ctl_8, thd, ttl);
++ txdesc = advance_txdesc(adev, txdesc, 1);
++ }
++ p += sprintf(p,
++ "\n"
++ "** PCI data **\n"
++ "txbuf_start %p, txbuf_area_size %u, txbuf_startphy %08llx\n"
++ "txdesc_size %u, txdesc_start %p\n"
++ "txhostdesc_start %p, txhostdesc_area_size %u, txhostdesc_startphy %08llx\n"
++ "rxdesc_start %p\n"
++ "rxhostdesc_start %p, rxhostdesc_area_size %u, rxhostdesc_startphy %08llx\n"
++ "rxbuf_start %p, rxbuf_area_size %u, rxbuf_startphy %08llx\n",
++ adev->txbuf_start, adev->txbuf_area_size,
++ (unsigned long long)adev->txbuf_startphy,
++ adev->txdesc_size, adev->txdesc_start,
++ adev->txhostdesc_start, adev->txhostdesc_area_size,
++ (unsigned long long)adev->txhostdesc_startphy,
++ adev->rxdesc_start,
++ adev->rxhostdesc_start, adev->rxhostdesc_area_size,
++ (unsigned long long)adev->rxhostdesc_startphy,
++ adev->rxbuf_start, adev->rxbuf_area_size,
++ (unsigned long long)adev->rxbuf_startphy);
++
++ FN_EXIT0;
++ return p;
++}
++
++
++/***********************************************************************
++*/
++int
++acxpci_proc_eeprom_output(char *buf, acx_device_t *adev)
++{
++ char *p = buf;
++ int i;
++
++ FN_ENTER;
++
++ for (i = 0; i < 0x400; i++) {
++ acxpci_read_eeprom_byte(adev, i, p++);
++ }
++
++ FN_EXIT1(p - buf);
++ return p - buf;
++}
++
++
++/***********************************************************************
++*/
++void
++acxpci_set_interrupt_mask(acx_device_t *adev)
++{
++ if (IS_ACX111(adev)) {
++ adev->irq_mask = (u16) ~(0
++ /* | HOST_INT_RX_DATA */
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ | HOST_INT_RX_COMPLETE
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ | HOST_INT_IV_ICV_FAILURE
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ | HOST_INT_FCS_THRESHOLD
++ /* | HOST_INT_UNKNOWN */
++ );
++ /* Or else acx100 won't signal cmd completion, right? */
++ adev->irq_mask_off = (u16)~( HOST_INT_CMD_COMPLETE ); /* 0xfdff */
++ } else {
++ adev->irq_mask = (u16) ~(0
++ /* | HOST_INT_RX_DATA */
++ | HOST_INT_TX_COMPLETE
++ /* | HOST_INT_TX_XFER */
++ | HOST_INT_RX_COMPLETE
++ /* | HOST_INT_DTIM */
++ /* | HOST_INT_BEACON */
++ /* | HOST_INT_TIMER */
++ /* | HOST_INT_KEY_NOT_FOUND */
++ /* | HOST_INT_IV_ICV_FAILURE */
++ | HOST_INT_CMD_COMPLETE
++ | HOST_INT_INFO
++ /* | HOST_INT_OVERFLOW */
++ /* | HOST_INT_PROCESS_ERROR */
++ | HOST_INT_SCAN_COMPLETE
++ /* | HOST_INT_FCS_THRESHOLD */
++ /* | HOST_INT_UNKNOWN */
++ );
++ adev->irq_mask_off = (u16)~( HOST_INT_UNKNOWN ); /* 0x7fff */
++ }
++}
++
++
++/***********************************************************************
++*/
++int
++acx100pci_s_set_tx_level(acx_device_t *adev, u8 level_dbm)
++{
++ /* since it can be assumed that at least the Maxim radio has a
++ * maximum power output of 20dBm and since it also can be
++ * assumed that these values drive the DAC responsible for
++ * setting the linear Tx level, I'd guess that these values
++ * should be the corresponding linear values for a dBm value,
++ * in other words: calculate the values from that formula:
++ * Y [dBm] = 10 * log (X [mW])
++ * then scale the 0..63 value range onto the 1..100mW range (0..20 dBm)
++ * and you're done...
++ * Hopefully that's ok, but you never know if we're actually
++ * right... (especially since Windows XP doesn't seem to show
++ * actual Tx dBm values :-P) */
++
++ /* NOTE: on Maxim, value 30 IS 30mW, and value 10 IS 10mW - so the
++ * values are EXACTLY mW!!! Not sure about RFMD and others,
++ * though... */
++ static const u8 dbm2val_maxim[21] = {
++ 63, 63, 63, 62,
++ 61, 61, 60, 60,
++ 59, 58, 57, 55,
++ 53, 50, 47, 43,
++ 38, 31, 23, 13,
++ 0
++ };
++ static const u8 dbm2val_rfmd[21] = {
++ 0, 0, 0, 1,
++ 2, 2, 3, 3,
++ 4, 5, 6, 8,
++ 10, 13, 16, 20,
++ 25, 32, 41, 50,
++ 63
++ };
++ const u8 *table;
++
++ switch (adev->radio_type) {
++ case RADIO_MAXIM_0D:
++ table = &dbm2val_maxim[0];
++ break;
++ case RADIO_RFMD_11:
++ case RADIO_RALINK_15:
++ table = &dbm2val_rfmd[0];
++ break;
++ default:
++ printk("%s: unknown/unsupported radio type, "
++ "cannot modify tx power level yet!\n",
++ adev->ndev->name);
++ return NOT_OK;
++ }
++ printk("%s: changing radio power level to %u dBm (%u)\n",
++ adev->ndev->name, level_dbm, table[level_dbm]);
++ acxpci_s_write_phy_reg(adev, 0x11, table[level_dbm]);
++ return OK;
++}
++
++
++/***********************************************************************
++** Data for init_module/cleanup_module
++*/
++static const struct pci_device_id
++acxpci_id_tbl[] __devinitdata = {
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1100A,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX100,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1100B,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX100,
++ },
++ {
++ .vendor = PCI_VENDOR_ID_TI,
++ .device = PCI_DEVICE_ID_TI_TNETW1130,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = CHIPTYPE_ACX111,
++ },
++ {
++ .vendor = 0,
++ .device = 0,
++ .subvendor = 0,
++ .subdevice = 0,
++ .driver_data = 0,
++ }
++};
++
++MODULE_DEVICE_TABLE(pci, acxpci_id_tbl);
++
++/* FIXME: checks should be removed once driver is included in the kernel */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
++/* pci_name() got introduced at start of 2.6.x,
++ * got mandatory (slot_name member removed) in 2.6.11-bk1 */
++#define pci_name(x) x->slot_name
++#endif
++
++static struct pci_driver
++acxpci_drv_id = {
++ .name = "acx_pci",
++ .id_table = acxpci_id_tbl,
++ .probe = acxpci_e_probe,
++ .remove = __devexit_p(acxpci_e_remove),
++#ifdef CONFIG_PM
++ .suspend = acxpci_e_suspend,
++ .resume = acxpci_e_resume
++#endif /* CONFIG_PM */
++};
++
++
++/***********************************************************************
++** acxpci_e_init_module
++**
++** Module initialization routine, called once at module load time
++*/
++int __init
++acxpci_e_init_module(void)
++{
++ int res;
++
++ FN_ENTER;
++
++#if (ACX_IO_WIDTH==32)
++ printk("acx: compiled to use 32bit I/O access. "
++ "I/O timing issues might occur, such as "
++ "non-working firmware upload. Report them\n");
++#else
++ printk("acx: compiled to use 16bit I/O access only "
++ "(compatibility mode)\n");
++#endif
++
++#ifdef __LITTLE_ENDIAN
++#define ENDIANNESS_STRING "running on a little-endian CPU\n"
++#else
++#define ENDIANNESS_STRING "running on a BIG-ENDIAN CPU\n"
++#endif
++ log(L_INIT,
++ ENDIANNESS_STRING
++ "PCI module " ACX_RELEASE " initialized, "
++ "waiting for cards to probe...\n"
++ );
++
++ res = pci_register_driver(&acxpci_drv_id);
++ FN_EXIT1(res);
++ return res;
++}
++
++
++/***********************************************************************
++** acxpci_e_cleanup_module
++**
++** Called at module unload time. This is our last chance to
++** clean up after ourselves.
++*/
++void __exit
++acxpci_e_cleanup_module(void)
++{
++ FN_ENTER;
++
++ pci_unregister_driver(&acxpci_drv_id);
++
++ FN_EXIT0;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/rx3000_acx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/rx3000_acx.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,110 @@
++/*
++ * WLAN (TI TNETW1100B) support in the HP iPAQ RX3000
++ *
++ * Copyright (c) 2006 SDG Systems, LLC
++ * Copyright (c) 2006 Roman Moravcik
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * Based on hx4700_acx.c
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/dpm.h>
++#include <linux/leds.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/regs-gpio.h>
++#include <linux/mfd/asic3_base.h>
++#include <asm/arch/rx3000.h>
++#include <asm/arch/rx3000-asic3.h>
++#include <asm/io.h>
++
++#include "acx_hw.h"
++
++extern struct platform_device s3c_device_asic3;
++
++static int rx3000_wlan_start(void)
++{
++ DPM_DEBUG("rx3000_acx: Turning on\n");
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, ASIC3_GPB3);
++ mdelay(20);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC13, ASIC3_GPC13);
++ mdelay(20);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC11, ASIC3_GPC11);
++ mdelay(100);
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, ASIC3_GPB3);
++ mdelay(20);
++ s3c2410_gpio_cfgpin(S3C2410_GPA15, S3C2410_GPA15_nGCS4);
++ mdelay(100);
++ s3c2410_gpio_setpin(S3C2410_GPA11, 0);
++ mdelay(50);
++ s3c2410_gpio_setpin(S3C2410_GPA11, 1);
++ led_trigger_event_shared(rx3000_radio_trig, LED_FULL);
++ return 0;
++}
++
++static int rx3000_wlan_stop(void)
++{
++ DPM_DEBUG("rx3000_acx: Turning off\n");
++ s3c2410_gpio_setpin(S3C2410_GPA15, 1);
++ s3c2410_gpio_cfgpin(S3C2410_GPA15, S3C2410_GPA15_OUT);
++ asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB3, 0);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC13, 0);
++ asic3_set_gpio_out_c(&s3c_device_asic3.dev, ASIC3_GPC11, 0);
++ led_trigger_event_shared(rx3000_radio_trig, LED_OFF);
++ return 0;
++}
++
++static struct resource acx_resources[] = {
++ [0] = {
++ .start = RX3000_PA_WLAN,
++ .end = RX3000_PA_WLAN + 0x20,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_EINT16,
++ .end = IRQ_EINT16,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct acx_hardware_data acx_data = {
++ .start_hw = rx3000_wlan_start,
++ .stop_hw = rx3000_wlan_stop,
++};
++
++static struct platform_device acx_device = {
++ .name = "acx-mem",
++ .dev = {
++ .platform_data = &acx_data,
++ },
++ .num_resources = ARRAY_SIZE(acx_resources),
++ .resource = acx_resources,
++};
++
++static int __init rx3000_wlan_init(void)
++{
++ printk("rx3000_wlan_init: acx-mem platform_device_register\n");
++ return platform_device_register(&acx_device);
++}
++
++
++static void __exit rx3000_wlan_exit(void)
++{
++ platform_device_unregister(&acx_device);
++}
++
++module_init(rx3000_wlan_init);
++module_exit(rx3000_wlan_exit);
++
++MODULE_AUTHOR("Todd Blumer <todd@sdgsystems.com>, Roman Moravcik <roman.moravcik@gmail.com>");
++MODULE_DESCRIPTION("WLAN driver for HP iPAQ RX3000");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.23/drivers/net/wireless/acx/setrate.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/setrate.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,213 @@
++/* TODO: stop #including, move into wireless.c
++ * until then, keep in sync copies in prism54/ and acx/ dirs
++ * code+data size: less than 1k */
++
++enum {
++ DOT11_RATE_1,
++ DOT11_RATE_2,
++ DOT11_RATE_5,
++ DOT11_RATE_11,
++ DOT11_RATE_22,
++ DOT11_RATE_33,
++ DOT11_RATE_6,
++ DOT11_RATE_9,
++ DOT11_RATE_12,
++ DOT11_RATE_18,
++ DOT11_RATE_24,
++ DOT11_RATE_36,
++ DOT11_RATE_48,
++ DOT11_RATE_54
++};
++enum {
++ DOT11_MOD_DBPSK,
++ DOT11_MOD_DQPSK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_CCKOFDM,
++ DOT11_MOD_PBCC
++};
++static const u8 ratelist[] = { 1,2,5,11,22,33,6,9,12,18,24,36,48,54 };
++static const u8 dot11ratebyte[] = { 1*2,2*2,11,11*2,22*2,33*2,6*2,9*2,12*2,18*2,24*2,36*2,48*2,54*2 };
++static const u8 default_modulation[] = {
++ DOT11_MOD_DBPSK,
++ DOT11_MOD_DQPSK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_CCK,
++ DOT11_MOD_PBCC,
++ DOT11_MOD_PBCC,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM,
++ DOT11_MOD_OFDM
++};
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++rate_mbit2enum(int n) {
++ int i=0;
++ while(i<sizeof(ratelist)) {
++ if(n==ratelist[i]) return i;
++ i++;
++ }
++ return -EINVAL;
++}
++
++static int
++get_modulation(int r_enum, char suffix) {
++ if(suffix==',' || suffix==' ' || suffix=='\0') {
++ /* could shorten default_mod by 8 bytes:
++ if(r_enum>=DOT11_RATE_6) return DOT11_MOD_OFDM; */
++ return default_modulation[r_enum];
++ }
++ if(suffix=='c') {
++ if(r_enum<DOT11_RATE_5 || r_enum>DOT11_RATE_11) return -EINVAL;
++ return DOT11_MOD_CCK;
++ }
++ if(suffix=='p') {
++ if(r_enum<DOT11_RATE_5 || r_enum>DOT11_RATE_33) return -EINVAL;
++ return DOT11_MOD_PBCC;
++ }
++ if(suffix=='o') {
++ if(r_enum<DOT11_RATE_6) return -EINVAL;
++ return DOT11_MOD_OFDM;
++ }
++ if(suffix=='d') {
++ if(r_enum<DOT11_RATE_6) return -EINVAL;
++ return DOT11_MOD_CCKOFDM;
++ }
++ return -EINVAL;
++}
++
++#ifdef UNUSED
++static int
++fill_ratevector(const char **pstr, u8 *vector, int size,
++ int (*supported)(int mbit, int mod, void *opaque), void *opaque, int or_mask)
++{
++ unsigned long rate_mbit;
++ int rate_enum,mod;
++ const char *str = *pstr;
++ char c;
++
++ do {
++ rate_mbit = simple_strtoul(str, (char**)&str, 10);
++ if(rate_mbit>INT_MAX) return -EINVAL;
++
++ rate_enum = rate_mbit2enum(rate_mbit);
++ if(rate_enum<0) return rate_enum;
++
++ c = *str;
++ mod = get_modulation(rate_enum, c);
++ if(mod<0) return mod;
++
++ if(c>='a' && c<='z') c = *++str;
++ if(c!=',' && c!=' ' && c!='\0') return -EINVAL;
++
++ if(supported) {
++ int r = supported(rate_mbit, mod, opaque);
++ if(r) return r;
++ }
++
++ *vector++ = dot11ratebyte[rate_enum] | or_mask;
++
++ size--;
++ str++;
++ } while(size>0 && c==',');
++
++ if(size<1) return -E2BIG;
++ *vector=0; /* TODO: sort, remove dups? */
++
++ *pstr = str-1;
++ return 0;
++}
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++fill_ratevectors(const char *str, u8 *brate, u8 *orate, int size,
++ int (*supported)(int mbit, int mod, void *opaque), void *opaque)
++{
++ int r;
++
++ r = fill_ratevector(&str, brate, size, supported, opaque, 0x80);
++ if(r) return r;
++
++ orate[0] = 0;
++ if(*str==' ') {
++ str++;
++ r = fill_ratevector(&str, orate, size, supported, opaque, 0);
++ if(r) return r;
++ /* TODO: sanitize, e.g. remove/error on rates already in basic rate set? */
++ }
++ if(*str)
++ return -EINVAL;
++
++ return 0;
++}
++#endif
++
++/* TODO: use u64 masks? */
++
++static int
++fill_ratemask(const char **pstr, u32* mask,
++ int (*supported)(int mbit, int mod,void *opaque),
++ u32 (*gen_mask)(int mbit, int mod,void *opaque),
++ void *opaque)
++{
++ unsigned long rate_mbit;
++ int rate_enum,mod;
++ u32 m = 0;
++ const char *str = *pstr;
++ char c;
++
++ do {
++ rate_mbit = simple_strtoul(str, (char**)&str, 10);
++ if(rate_mbit>INT_MAX) return -EINVAL;
++
++ rate_enum = rate_mbit2enum(rate_mbit);
++ if(rate_enum<0) return rate_enum;
++
++ c = *str;
++ mod = get_modulation(rate_enum, c);
++ if(mod<0) return mod;
++
++ if(c>='a' && c<='z') c = *++str;
++ if(c!=',' && c!=' ' && c!='\0') return -EINVAL;
++
++ if(supported) {
++ int r = supported(rate_mbit, mod, opaque);
++ if(r) return r;
++ }
++
++ m |= gen_mask(rate_mbit, mod, opaque);
++ str++;
++ } while(c==',');
++
++ *pstr = str-1;
++ *mask |= m;
++ return 0;
++}
++
++static /* TODO: remove 'static' when moved to wireless.c */
++int
++fill_ratemasks(const char *str, u32 *bmask, u32 *omask,
++ int (*supported)(int mbit, int mod,void *opaque),
++ u32 (*gen_mask)(int mbit, int mod,void *opaque),
++ void *opaque)
++{
++ int r;
++
++ r = fill_ratemask(&str, bmask, supported, gen_mask, opaque);
++ if(r) return r;
++
++ if(*str==' ') {
++ str++;
++ r = fill_ratemask(&str, omask, supported, gen_mask, opaque);
++ if(r) return r;
++ }
++ if(*str)
++ return -EINVAL;
++ return 0;
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/usb.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/usb.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,1922 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** USB support for TI ACX100 based devices. Many parts are taken from
++** the PCI driver.
++**
++** Authors:
++** Martin Wawro <martin.wawro AT uni-dortmund.de>
++** Andreas Mohr <andi AT lisas.de>
++**
++** LOCKING
++** callback functions called by USB core are running in interrupt context
++** and thus have names with _i_.
++*/
++#define ACX_USB 1
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/types.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/kernel.h>
++#include <linux/usb.h>
++#include <linux/netdevice.h>
++#include <linux/rtnetlink.h>
++#include <linux/etherdevice.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++#include <linux/vmalloc.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++/* number of endpoints of an interface */
++#define NUM_EP(intf) (intf)->altsetting[0].desc.bNumEndpoints
++#define EP(intf, nr) (intf)->altsetting[0].endpoint[(nr)].desc
++#define GET_DEV(udev) usb_get_dev((udev))
++#define PUT_DEV(udev) usb_put_dev((udev))
++#define SET_NETDEV_OWNER(ndev, owner) /* not needed anymore ??? */
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
++/* removed in 2.6.14. We will use fake value for now */
++#define URB_ASYNC_UNLINK 0
++#endif
++
++
++/***********************************************************************
++*/
++/* ACX100 (TNETW1100) USB device: D-Link DWL-120+ */
++#define ACX100_VENDOR_ID 0x2001
++#define ACX100_PRODUCT_ID_UNBOOTED 0x3B01
++#define ACX100_PRODUCT_ID_BOOTED 0x3B00
++
++/* TNETW1450 USB devices */
++#define VENDOR_ID_DLINK 0x07b8 /* D-Link Corp. */
++#define PRODUCT_ID_WUG2400 0xb21a /* AboCom WUG2400 or SafeCom SWLUT-54125 */
++#define VENDOR_ID_AVM_GMBH 0x057c
++#define PRODUCT_ID_AVM_WLAN_USB 0x5601
++#define PRODUCT_ID_AVM_WLAN_USB_si 0x6201 /* "self install" named Version: driver kills kernel on inbound scans from fritz box ??? */
++#define VENDOR_ID_ZCOM 0x0cde
++#define PRODUCT_ID_ZCOM_XG750 0x0017 /* not tested yet */
++#define VENDOR_ID_TI 0x0451
++#define PRODUCT_ID_TI_UNKNOWN 0x60c5 /* not tested yet */
++
++#define ACX_USB_CTRL_TIMEOUT 5500 /* steps in ms */
++
++/* Buffer size for fw upload, same for both ACX100 USB and TNETW1450 */
++#define USB_RWMEM_MAXLEN 2048
++
++/* The number of bulk URBs to use */
++#define ACX_TX_URB_CNT 8
++#define ACX_RX_URB_CNT 2
++
++/* Should be sent to the bulkout endpoint */
++#define ACX_USB_REQ_UPLOAD_FW 0x10
++#define ACX_USB_REQ_ACK_CS 0x11
++#define ACX_USB_REQ_CMD 0x12
++
++/***********************************************************************
++** Prototypes
++*/
++static int acxusb_e_probe(struct usb_interface *, const struct usb_device_id *);
++static void acxusb_e_disconnect(struct usb_interface *);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++static void acxusb_i_complete_tx(struct urb *);
++static void acxusb_i_complete_rx(struct urb *);
++#else
++static void acxusb_i_complete_tx(struct urb *, struct pt_regs *);
++static void acxusb_i_complete_rx(struct urb *, struct pt_regs *);
++#endif
++static int acxusb_e_open(struct net_device *);
++static int acxusb_e_close(struct net_device *);
++static void acxusb_i_set_rx_mode(struct net_device *);
++static int acxusb_boot(struct usb_device *, int is_tnetw1450, int *radio_type);
++
++static void acxusb_l_poll_rx(acx_device_t *adev, usb_rx_t* rx);
++
++static void acxusb_i_tx_timeout(struct net_device *);
++
++/* static void dump_device(struct usb_device *); */
++/* static void dump_device_descriptor(struct usb_device_descriptor *); */
++/* static void dump_config_descriptor(struct usb_config_descriptor *); */
++
++/***********************************************************************
++** Module Data
++*/
++#define TXBUFSIZE sizeof(usb_txbuffer_t)
++/*
++ * Now, this is just plain lying, but the device insists in giving us
++ * huge packets. We supply extra space after rxbuffer. Need to understand
++ * it better...
++ */
++#define RXBUFSIZE (sizeof(rxbuffer_t) + \
++ (sizeof(usb_rx_t) - sizeof(struct usb_rx_plain)))
++
++static const struct usb_device_id
++acxusb_ids[] = {
++ { USB_DEVICE(ACX100_VENDOR_ID, ACX100_PRODUCT_ID_BOOTED) },
++ { USB_DEVICE(ACX100_VENDOR_ID, ACX100_PRODUCT_ID_UNBOOTED) },
++ { USB_DEVICE(VENDOR_ID_DLINK, PRODUCT_ID_WUG2400) },
++ { USB_DEVICE(VENDOR_ID_AVM_GMBH, PRODUCT_ID_AVM_WLAN_USB) },
++ { USB_DEVICE(VENDOR_ID_AVM_GMBH, PRODUCT_ID_AVM_WLAN_USB_si) },
++ { USB_DEVICE(VENDOR_ID_ZCOM, PRODUCT_ID_ZCOM_XG750) },
++ { USB_DEVICE(VENDOR_ID_TI, PRODUCT_ID_TI_UNKNOWN) },
++ {}
++};
++
++MODULE_DEVICE_TABLE(usb, acxusb_ids);
++
++/* USB driver data structure as required by the kernel's USB core */
++static struct usb_driver
++acxusb_driver = {
++ .name = "acx_usb",
++ .probe = acxusb_e_probe,
++ .disconnect = acxusb_e_disconnect,
++ .id_table = acxusb_ids
++};
++
++
++/***********************************************************************
++** USB helper
++**
++** ldd3 ch13 says:
++** When the function is usb_kill_urb, the urb lifecycle is stopped. This
++** function is usually used when the device is disconnected from the system,
++** in the disconnect callback. For some drivers, the usb_unlink_urb function
++** should be used to tell the USB core to stop an urb. This function does not
++** wait for the urb to be fully stopped before returning to the caller.
++** This is useful for stoppingthe urb while in an interrupt handler or when
++** a spinlock is held, as waiting for a urb to fully stop requires the ability
++** for the USB core to put the calling process to sleep. This function requires
++** that the URB_ASYNC_UNLINK flag value be set in the urb that is being asked
++** to be stopped in order to work properly.
++**
++** (URB_ASYNC_UNLINK is obsolete, usb_unlink_urb will always be
++** asynchronous while usb_kill_urb is synchronous and should be called
++** directly (drivers/usb/core/urb.c))
++**
++** In light of this, timeout is just for paranoid reasons...
++*
++* Actually, it's useful for debugging. If we reach timeout, we're doing
++* something wrong with the urbs.
++*/
++static void
++acxusb_unlink_urb(struct urb* urb)
++{
++ if (!urb)
++ return;
++
++ if (urb->status == -EINPROGRESS) {
++ int timeout = 10;
++
++ usb_unlink_urb(urb);
++ while (--timeout && urb->status == -EINPROGRESS) {
++ mdelay(1);
++ }
++ if (!timeout) {
++ printk("acx_usb: urb unlink timeout!\n");
++ }
++ }
++}
++
++
++/***********************************************************************
++** EEPROM and PHY read/write helpers
++*/
++/***********************************************************************
++** acxusb_s_read_phy_reg
++*/
++int
++acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
++{
++ /* mem_read_write_t mem; */
++
++ FN_ENTER;
++
++ printk("%s doesn't seem to work yet, disabled.\n", __func__);
++
++ /*
++ mem.addr = cpu_to_le16(reg);
++ mem.type = cpu_to_le16(0x82);
++ mem.len = cpu_to_le32(4);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_MEM_READ, &mem, sizeof(mem));
++ *charbuf = mem.data;
++ log(L_DEBUG, "read radio PHY[0x%04X]=0x%02X\n", reg, *charbuf);
++ */
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++*/
++int
++acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
++{
++ mem_read_write_t mem;
++
++ FN_ENTER;
++
++ mem.addr = cpu_to_le16(reg);
++ mem.type = cpu_to_le16(0x82);
++ mem.len = cpu_to_le32(4);
++ mem.data = value;
++ acx_s_issue_cmd(adev, ACX1xx_CMD_MEM_WRITE, &mem, sizeof(mem));
++ log(L_DEBUG, "write radio PHY[0x%04X]=0x%02X\n", reg, value);
++
++ FN_EXIT1(OK);
++ return OK;
++}
++
++
++/***********************************************************************
++** acxusb_s_issue_cmd_timeo
++** Excecutes a command in the command mailbox
++**
++** buffer = a pointer to the data.
++** The data must not include 4 byte command header
++*/
++
++/* TODO: ideally we shall always know how much we need
++** and this shall be 0 */
++#define BOGUS_SAFETY_PADDING 0x40
++
++#undef FUNC
++#define FUNC "issue_cmd"
++
++#if !ACX_DEBUG
++int
++acxusb_s_issue_cmd_timeo(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned timeout)
++{
++#else
++int
++acxusb_s_issue_cmd_timeo_debug(
++ acx_device_t *adev,
++ unsigned cmd,
++ void *buffer,
++ unsigned buflen,
++ unsigned timeout,
++ const char* cmdstr)
++{
++#endif
++ /* USB ignores timeout param */
++
++ struct usb_device *usbdev;
++ struct {
++ u16 cmd;
++ u16 status;
++ u8 data[1];
++ } ACX_PACKED *loc;
++ const char *devname;
++ int acklen, blocklen, inpipe, outpipe;
++ int cmd_status;
++ int result;
++
++ FN_ENTER;
++
++ devname = adev->ndev->name;
++ /* no "wlan%%d: ..." please */
++ if (!devname || !devname[0] || devname[4]=='%')
++ devname = "acx";
++
++ log(L_CTL, FUNC"(cmd:%s,buflen:%u,type:0x%04X)\n",
++ cmdstr, buflen,
++ buffer ? le16_to_cpu(((acx_ie_generic_t *)buffer)->type) : -1);
++
++ loc = kmalloc(buflen + 4 + BOGUS_SAFETY_PADDING, GFP_KERNEL);
++ if (!loc) {
++ printk("%s: "FUNC"(): no memory for data buffer\n", devname);
++ goto bad;
++ }
++
++ /* get context from acx_device */
++ usbdev = adev->usbdev;
++
++ /* check which kind of command was issued */
++ loc->cmd = cpu_to_le16(cmd);
++ loc->status = 0;
++
++/* NB: buflen == frmlen + 4
++**
++** Interrogate: write 8 bytes: (cmd,status,rid,frmlen), then
++** read (cmd,status,rid,frmlen,data[frmlen]) back
++**
++** Configure: write (cmd,status,rid,frmlen,data[frmlen])
++**
++** Possibly bogus special handling of ACX1xx_IE_SCAN_STATUS removed
++*/
++
++ /* now write the parameters of the command if needed */
++ acklen = buflen + 4 + BOGUS_SAFETY_PADDING;
++ blocklen = buflen;
++ if (buffer && buflen) {
++ /* if it's an INTERROGATE command, just pass the length
++ * of parameters to read, as data */
++ if (cmd == ACX1xx_CMD_INTERROGATE) {
++ blocklen = 4;
++ acklen = buflen + 4;
++ }
++ memcpy(loc->data, buffer, blocklen);
++ }
++ blocklen += 4; /* account for cmd,status */
++
++ /* obtain the I/O pipes */
++ outpipe = usb_sndctrlpipe(usbdev, 0);
++ inpipe = usb_rcvctrlpipe(usbdev, 0);
++ log(L_CTL, "ctrl inpipe=0x%X outpipe=0x%X\n", inpipe, outpipe);
++ log(L_CTL, "sending USB control msg (out) (blocklen=%d)\n", blocklen);
++ if (acx_debug & L_DATA)
++ acx_dump_bytes(loc, blocklen);
++
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_CMD, /* request */
++ USB_TYPE_VENDOR|USB_DIR_OUT, /* requesttype */
++ 0, /* value */
++ 0, /* index */
++ loc, /* dataptr */
++ blocklen, /* size */
++ ACX_USB_CTRL_TIMEOUT /* timeout in ms */
++ );
++
++ if (result == -ENODEV) {
++ log(L_CTL, "no device present (unplug?)\n");
++ goto good;
++ }
++
++ log(L_CTL, "wrote %d bytes\n", result);
++ if (result < 0) {
++ goto bad;
++ }
++
++ /* check for device acknowledge */
++ log(L_CTL, "sending USB control msg (in) (acklen=%d)\n", acklen);
++ loc->status = 0; /* delete old status flag -> set to IDLE */
++ /* shall we zero out the rest? */
++ result = usb_control_msg(usbdev, inpipe,
++ ACX_USB_REQ_CMD, /* request */
++ USB_TYPE_VENDOR|USB_DIR_IN, /* requesttype */
++ 0, /* value */
++ 0, /* index */
++ loc, /* dataptr */
++ acklen, /* size */
++ ACX_USB_CTRL_TIMEOUT /* timeout in ms */
++ );
++ if (result < 0) {
++ printk("%s: "FUNC"(): USB read error %d\n", devname, result);
++ goto bad;
++ }
++ if (acx_debug & L_CTL) {
++ printk("read %d bytes: ", result);
++ acx_dump_bytes(loc, result);
++ }
++
++/*
++ check for result==buflen+4? Was seen:
++
++interrogate(type:ACX100_IE_DOT11_ED_THRESHOLD,len:4)
++issue_cmd(cmd:ACX1xx_CMD_INTERROGATE,buflen:8,type:4111)
++ctrl inpipe=0x80000280 outpipe=0x80000200
++sending USB control msg (out) (blocklen=8)
++01 00 00 00 0F 10 04 00
++wrote 8 bytes
++sending USB control msg (in) (acklen=12) sizeof(loc->data
++read 4 bytes <==== MUST BE 12!!
++*/
++
++ cmd_status = le16_to_cpu(loc->status);
++ if (cmd_status != 1) {
++ printk("%s: "FUNC"(): cmd_status is not SUCCESS: %d (%s)\n",
++ devname, cmd_status, acx_cmd_status_str(cmd_status));
++ /* TODO: goto bad; ? */
++ }
++ if ((cmd == ACX1xx_CMD_INTERROGATE) && buffer && buflen) {
++ memcpy(buffer, loc->data, buflen);
++ log(L_CTL, "response frame: cmd=0x%04X status=%d\n",
++ le16_to_cpu(loc->cmd),
++ cmd_status);
++ }
++good:
++ kfree(loc);
++ FN_EXIT1(OK);
++ return OK;
++bad:
++ /* Give enough info so that callers can avoid
++ ** printing their own diagnostic messages */
++#if ACX_DEBUG
++ printk("%s: "FUNC"(cmd:%s) FAILED\n", devname, cmdstr);
++#else
++ printk("%s: "FUNC"(cmd:0x%04X) FAILED\n", devname, cmd);
++#endif
++ dump_stack();
++ kfree(loc);
++ FN_EXIT1(NOT_OK);
++ return NOT_OK;
++}
++
++
++/***********************************************************************
++** acxusb_boot()
++** Inputs:
++** usbdev -> Pointer to kernel's usb_device structure
++**
++** Returns:
++** (int) Errorcode or 0 on success
++**
++** This function triggers the loading of the firmware image from harddisk
++** and then uploads the firmware to the USB device. After uploading the
++** firmware and transmitting the checksum, the device resets and appears
++** as a new device on the USB bus (the device we can finally deal with)
++*/
++static inline int
++acxusb_fw_needs_padding(firmware_image_t *fw_image, unsigned int usb_maxlen)
++{
++ unsigned int num_xfers = ((fw_image->size - 1) / usb_maxlen) + 1;
++
++ return ((num_xfers % 2) == 0);
++}
++
++static int
++acxusb_boot(struct usb_device *usbdev, int is_tnetw1450, int *radio_type)
++{
++ char filename[sizeof("tiacx1NNusbcRR")];
++
++ firmware_image_t *fw_image = NULL;
++ char *usbbuf;
++ unsigned int offset;
++ unsigned int blk_len, inpipe, outpipe;
++ u32 num_processed;
++ u32 img_checksum, sum;
++ u32 file_size;
++ int result = -EIO;
++ int i;
++
++ FN_ENTER;
++
++ /* dump_device(usbdev); */
++
++ usbbuf = kmalloc(USB_RWMEM_MAXLEN, GFP_KERNEL);
++ if (!usbbuf) {
++ printk(KERN_ERR "acx: no memory for USB transfer buffer (%d bytes)\n", USB_RWMEM_MAXLEN);
++ result = -ENOMEM;
++ goto end;
++ }
++ if (is_tnetw1450) {
++ /* Obtain the I/O pipes */
++ outpipe = usb_sndbulkpipe(usbdev, 1);
++ inpipe = usb_rcvbulkpipe(usbdev, 2);
++
++ printk(KERN_DEBUG "wait for device ready\n");
++ for (i = 0; i <= 2; i++) {
++ result = usb_bulk_msg(usbdev, inpipe,
++ usbbuf,
++ USB_RWMEM_MAXLEN,
++ &num_processed,
++ 2000
++ );
++
++ if ((*(u32 *)&usbbuf[4] == 0x40000001)
++ && (*(u16 *)&usbbuf[2] == 0x1)
++ && ((*(u16 *)usbbuf & 0x3fff) == 0)
++ && ((*(u16 *)usbbuf & 0xc000) == 0xc000))
++ break;
++ msleep(10);
++ }
++ if (i == 2)
++ goto fw_end;
++
++ *radio_type = usbbuf[8];
++ } else {
++ /* Obtain the I/O pipes */
++ outpipe = usb_sndctrlpipe(usbdev, 0);
++ inpipe = usb_rcvctrlpipe(usbdev, 0);
++
++ /* FIXME: shouldn't be hardcoded */
++ *radio_type = RADIO_MAXIM_0D;
++ }
++
++ snprintf(filename, sizeof(filename), "tiacx1%02dusbc%02X",
++ is_tnetw1450 * 11, *radio_type);
++
++ fw_image = acx_s_read_fw(&usbdev->dev, filename, &file_size);
++ if (!fw_image) {
++ result = -EIO;
++ goto end;
++ }
++ log(L_INIT, "firmware size: %d bytes\n", file_size);
++
++ img_checksum = le32_to_cpu(fw_image->chksum);
++
++ if (is_tnetw1450) {
++ u8 cmdbuf[20];
++ const u8 *p;
++ u8 need_padding;
++ u32 tmplen, val;
++
++ memset(cmdbuf, 0, 16);
++
++ need_padding = acxusb_fw_needs_padding(fw_image, USB_RWMEM_MAXLEN);
++ tmplen = need_padding ? file_size-4 : file_size-8;
++ *(u16 *)&cmdbuf[0] = 0xc000;
++ *(u16 *)&cmdbuf[2] = 0x000b;
++ *(u32 *)&cmdbuf[4] = tmplen;
++ *(u32 *)&cmdbuf[8] = file_size-8;
++ *(u32 *)&cmdbuf[12] = img_checksum;
++
++ result = usb_bulk_msg(usbdev, outpipe, cmdbuf, 16, &num_processed, HZ);
++ if (result < 0)
++ goto fw_end;
++
++ p = (const u8 *)&fw_image->size;
++
++ /* first calculate checksum for image size part */
++ sum = p[0]+p[1]+p[2]+p[3];
++ p += 4;
++
++ /* now continue checksum for firmware data part */
++ tmplen = le32_to_cpu(fw_image->size);
++ for (i = 0; i < tmplen /* image size */; i++) {
++ sum += *p++;
++ }
++
++ if (sum != le32_to_cpu(fw_image->chksum)) {
++ printk("acx: FATAL: firmware upload: "
++ "checksums don't match! "
++ "(0x%08x vs. 0x%08x)\n",
++ sum, fw_image->chksum);
++ goto fw_end;
++ }
++
++ offset = 8;
++ while (offset < file_size) {
++ blk_len = file_size - offset;
++ if (blk_len > USB_RWMEM_MAXLEN) {
++ blk_len = USB_RWMEM_MAXLEN;
++ }
++
++ log(L_INIT, "uploading firmware (%d bytes, offset=%d)\n",
++ blk_len, offset);
++ memcpy(usbbuf, ((u8 *)fw_image) + offset, blk_len);
++
++ p = usbbuf;
++ for (i = 0; i < blk_len; i += 4) {
++ *(u32 *)p = be32_to_cpu(*(u32 *)p);
++ p += 4;
++ }
++
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, blk_len, &num_processed, HZ);
++ if ((result < 0) || (num_processed != blk_len))
++ goto fw_end;
++ offset += blk_len;
++ }
++ if (need_padding) {
++ printk(KERN_DEBUG "send padding\n");
++ memset(usbbuf, 0, 4);
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, 4, &num_processed, HZ);
++ if ((result < 0) || (num_processed != 4))
++ goto fw_end;
++ }
++ printk(KERN_DEBUG "read firmware upload result\n");
++ memset(cmdbuf, 0, 20); /* additional memset */
++ result = usb_bulk_msg(usbdev, inpipe, cmdbuf, 20, &num_processed, 2000);
++ if (result < 0)
++ goto fw_end;
++ if (*(u32 *)&cmdbuf[4] == 0x40000003)
++ goto fw_end;
++ if (*(u32 *)&cmdbuf[4])
++ goto fw_end;
++ if (*(u16 *)&cmdbuf[16] != 1)
++ goto fw_end;
++
++ val = *(u32 *)&cmdbuf[0];
++ if ((val & 0x3fff)
++ || ((val & 0xc000) != 0xc000))
++ goto fw_end;
++
++ val = *(u32 *)&cmdbuf[8];
++ if (val & 2) {
++ result = usb_bulk_msg(usbdev, inpipe, cmdbuf, 20, &num_processed, 2000);
++ if (result < 0)
++ goto fw_end;
++ val = *(u32 *)&cmdbuf[8];
++ }
++ /* yup, no "else" here! */
++ if (val & 1) {
++ memset(usbbuf, 0, 4);
++ result = usb_bulk_msg(usbdev, outpipe, usbbuf, 4, &num_processed, HZ);
++ if ((result < 0) || (!num_processed))
++ goto fw_end;
++ }
++
++ printk("TNETW1450 firmware upload successful!\n");
++ result = 0;
++ goto end;
++fw_end:
++ result = -EIO;
++ goto end;
++ } else {
++ /* ACX100 USB */
++
++ /* now upload the firmware, slice the data into blocks */
++ offset = 8;
++ while (offset < file_size) {
++ blk_len = file_size - offset;
++ if (blk_len > USB_RWMEM_MAXLEN) {
++ blk_len = USB_RWMEM_MAXLEN;
++ }
++ log(L_INIT, "uploading firmware (%d bytes, offset=%d)\n",
++ blk_len, offset);
++ memcpy(usbbuf, ((u8 *)fw_image) + offset, blk_len);
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_UPLOAD_FW,
++ USB_TYPE_VENDOR|USB_DIR_OUT,
++ (file_size - 8) & 0xffff, /* value */
++ (file_size - 8) >> 16, /* index */
++ usbbuf, /* dataptr */
++ blk_len, /* size */
++ 3000 /* timeout in ms */
++ );
++ offset += blk_len;
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during upload "
++ "of firmware, aborting\n", result);
++ goto end;
++ }
++ }
++
++ /* finally, send the checksum and reboot the device */
++ /* does this trigger the reboot? */
++ result = usb_control_msg(usbdev, outpipe,
++ ACX_USB_REQ_UPLOAD_FW,
++ USB_TYPE_VENDOR|USB_DIR_OUT,
++ img_checksum & 0xffff, /* value */
++ img_checksum >> 16, /* index */
++ NULL, /* dataptr */
++ 0, /* size */
++ 3000 /* timeout in ms */
++ );
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during tx of checksum, "
++ "aborting\n", result);
++ goto end;
++ }
++ result = usb_control_msg(usbdev, inpipe,
++ ACX_USB_REQ_ACK_CS,
++ USB_TYPE_VENDOR|USB_DIR_IN,
++ img_checksum & 0xffff, /* value */
++ img_checksum >> 16, /* index */
++ usbbuf, /* dataptr */
++ 8, /* size */
++ 3000 /* timeout in ms */
++ );
++ if (result < 0) {
++ printk(KERN_ERR "acx: error %d during ACK of checksum, "
++ "aborting\n", result);
++ goto end;
++ }
++ if (*usbbuf != 0x10) {
++ printk(KERN_ERR "acx: invalid checksum?\n");
++ result = -EINVAL;
++ goto end;
++ }
++ result = 0;
++ }
++
++end:
++ vfree(fw_image);
++ kfree(usbbuf);
++
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/* FIXME: maybe merge it with usual eeprom reading, into common code? */
++static void
++acxusb_s_read_eeprom_version(acx_device_t *adev)
++{
++ u8 eeprom_ver[0x8];
++
++ memset(eeprom_ver, 0, sizeof(eeprom_ver));
++ acx_s_interrogate(adev, &eeprom_ver, ACX1FF_IE_EEPROM_VER);
++
++ /* FIXME: which one of those values to take? */
++ adev->eeprom_version = eeprom_ver[5];
++}
++
++
++/*
++ * temporary helper function to at least fill important cfgopt members with
++ * useful replacement values until we figure out how one manages to fetch
++ * the configoption struct in the USB device case...
++ */
++static int
++acxusb_s_fill_configoption(acx_device_t *adev)
++{
++ adev->cfgopt_probe_delay = 200;
++ adev->cfgopt_dot11CCAModes = 4;
++ adev->cfgopt_dot11Diversity = 1;
++ adev->cfgopt_dot11ShortPreambleOption = 1;
++ adev->cfgopt_dot11PBCCOption = 1;
++ adev->cfgopt_dot11ChannelAgility = 0;
++ adev->cfgopt_dot11PhyType = 5;
++ adev->cfgopt_dot11TempType = 1;
++ return OK;
++}
++
++
++/***********************************************************************
++** acxusb_e_probe()
++**
++** This function is invoked by the kernel's USB core whenever a new device is
++** attached to the system or the module is loaded. It is presented a usb_device
++** structure from which information regarding the device is obtained and evaluated.
++** In case this driver is able to handle one of the offered devices, it returns
++** a non-null pointer to a driver context and thereby claims the device.
++*/
++
++static void
++dummy_netdev_init(struct net_device *ndev) {}
++
++static int
++acxusb_e_probe(struct usb_interface *intf, const struct usb_device_id *devID)
++{
++ struct usb_device *usbdev = interface_to_usbdev(intf);
++ acx_device_t *adev = NULL;
++ struct net_device *ndev = NULL;
++ struct usb_config_descriptor *config;
++ struct usb_endpoint_descriptor *epdesc;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ struct usb_host_endpoint *ep;
++#endif
++ struct usb_interface_descriptor *ifdesc;
++ const char* msg;
++ int numconfigs, numfaces, numep;
++ int result = OK;
++ int i;
++ int radio_type;
++ /* this one needs to be more precise in case there appears a TNETW1450 from the same vendor */
++ int is_tnetw1450 = (usbdev->descriptor.idVendor != ACX100_VENDOR_ID);
++
++ FN_ENTER;
++
++ if (is_tnetw1450) {
++ /* Boot the device (i.e. upload the firmware) */
++ acxusb_boot(usbdev, is_tnetw1450, &radio_type);
++
++ /* TNETW1450-based cards will continue right away with
++ * the same USB ID after booting */
++ } else {
++ /* First check if this is the "unbooted" hardware */
++ if (usbdev->descriptor.idProduct == ACX100_PRODUCT_ID_UNBOOTED) {
++
++ /* Boot the device (i.e. upload the firmware) */
++ acxusb_boot(usbdev, is_tnetw1450, &radio_type);
++
++ /* DWL-120+ will first boot the firmware,
++ * then later have a *separate* probe() run
++ * since its USB ID will have changed after
++ * firmware boot!
++ * Since the first probe() run has no
++ * other purpose than booting the firmware,
++ * simply return immediately.
++ */
++ log(L_INIT, "finished booting, returning from probe()\n");
++ result = OK; /* success */
++ goto end;
++ }
++ else
++ /* device not unbooted, but invalid USB ID!? */
++ if (usbdev->descriptor.idProduct != ACX100_PRODUCT_ID_BOOTED)
++ goto end_nodev;
++ }
++
++/* Ok, so it's our device and it has already booted */
++
++ /* Allocate memory for a network device */
++
++ ndev = alloc_netdev(sizeof(*adev), "wlan%d", dummy_netdev_init);
++ /* (NB: memsets to 0 entire area) */
++ if (!ndev) {
++ msg = "acx: no memory for netdev\n";
++ goto end_nomem;
++ }
++
++ /* Register the callbacks for the network device functions */
++
++ ether_setup(ndev);
++ ndev->open = &acxusb_e_open;
++ ndev->stop = &acxusb_e_close;
++ ndev->hard_start_xmit = (void *)&acx_i_start_xmit;
++ ndev->get_stats = (void *)&acx_e_get_stats;
++#if IW_HANDLER_VERSION <= 5
++ ndev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
++#endif
++ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
++ ndev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
++#ifdef HAVE_TX_TIMEOUT
++ ndev->tx_timeout = &acxusb_i_tx_timeout;
++ ndev->watchdog_timeo = 4 * HZ;
++#endif
++ ndev->change_mtu = &acx_e_change_mtu;
++ SET_MODULE_OWNER(ndev);
++
++ /* Setup private driver context */
++
++ adev = ndev2adev(ndev);
++ adev->ndev = ndev;
++
++ adev->dev_type = DEVTYPE_USB;
++ adev->radio_type = radio_type;
++ if (is_tnetw1450) {
++ /* well, actually it's a TNETW1450, but since it
++ * seems to be sufficiently similar to TNETW1130,
++ * I don't want to change large amounts of code now */
++ adev->chip_type = CHIPTYPE_ACX111;
++ } else {
++ adev->chip_type = CHIPTYPE_ACX100;
++ }
++
++ adev->usbdev = usbdev;
++ spin_lock_init(&adev->lock); /* initial state: unlocked */
++ sema_init(&adev->sem, 1); /* initial state: 1 (upped) */
++
++ /* Check that this is really the hardware we know about.
++ ** If not sure, at least notify the user that he
++ ** may be in trouble...
++ */
++ numconfigs = (int)usbdev->descriptor.bNumConfigurations;
++ if (numconfigs != 1)
++ printk("acx: number of configurations is %d, "
++ "this driver only knows how to handle 1, "
++ "be prepared for surprises\n", numconfigs);
++
++ config = &usbdev->config->desc;
++ numfaces = config->bNumInterfaces;
++ if (numfaces != 1)
++ printk("acx: number of interfaces is %d, "
++ "this driver only knows how to handle 1, "
++ "be prepared for surprises\n", numfaces);
++
++ ifdesc = &intf->altsetting->desc;
++ numep = ifdesc->bNumEndpoints;
++ log(L_DEBUG, "# of endpoints: %d\n", numep);
++
++ if (is_tnetw1450) {
++ adev->bulkoutep = 1;
++ adev->bulkinep = 2;
++ } else {
++ /* obtain information about the endpoint
++ ** addresses, begin with some default values
++ */
++ adev->bulkoutep = 1;
++ adev->bulkinep = 1;
++ for (i = 0; i < numep; i++) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ ep = usbdev->ep_in[i];
++ if (!ep)
++ continue;
++ epdesc = &ep->desc;
++#else
++ epdesc = usb_epnum_to_ep_desc(usbdev, i);
++ if (!epdesc)
++ continue;
++#endif
++ if (epdesc->bmAttributes & USB_ENDPOINT_XFER_BULK) {
++ if (epdesc->bEndpointAddress & 0x80)
++ adev->bulkinep = epdesc->bEndpointAddress & 0xF;
++ else
++ adev->bulkoutep = epdesc->bEndpointAddress & 0xF;
++ }
++ }
++ }
++ log(L_DEBUG, "bulkout ep: 0x%X\n", adev->bulkoutep);
++ log(L_DEBUG, "bulkin ep: 0x%X\n", adev->bulkinep);
++
++ /* already done by memset: adev->rxtruncsize = 0; */
++ log(L_DEBUG, "TXBUFSIZE=%d RXBUFSIZE=%d\n",
++ (int) TXBUFSIZE, (int) RXBUFSIZE);
++
++ /* Allocate the RX/TX containers. */
++ adev->usb_tx = kmalloc(sizeof(usb_tx_t) * ACX_TX_URB_CNT, GFP_KERNEL);
++ if (!adev->usb_tx) {
++ msg = "acx: no memory for tx container";
++ goto end_nomem;
++ }
++ adev->usb_rx = kmalloc(sizeof(usb_rx_t) * ACX_RX_URB_CNT, GFP_KERNEL);
++ if (!adev->usb_rx) {
++ msg = "acx: no memory for rx container";
++ goto end_nomem;
++ }
++
++ /* Setup URBs for bulk-in/out messages */
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ adev->usb_rx[i].urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!adev->usb_rx[i].urb) {
++ msg = "acx: no memory for input URB\n";
++ goto end_nomem;
++ }
++ adev->usb_rx[i].urb->status = 0;
++ adev->usb_rx[i].adev = adev;
++ adev->usb_rx[i].busy = 0;
++ }
++
++ for (i = 0; i< ACX_TX_URB_CNT; i++) {
++ adev->usb_tx[i].urb = usb_alloc_urb(0, GFP_KERNEL);
++ if (!adev->usb_tx[i].urb) {
++ msg = "acx: no memory for output URB\n";
++ goto end_nomem;
++ }
++ adev->usb_tx[i].urb->status = 0;
++ adev->usb_tx[i].adev = adev;
++ adev->usb_tx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++
++ usb_set_intfdata(intf, adev);
++ SET_NETDEV_DEV(ndev, &intf->dev);
++
++ /* TODO: move all of fw cmds to open()? But then we won't know our MAC addr
++ until ifup (it's available via reading ACX1xx_IE_DOT11_STATION_ID)... */
++
++ /* put acx out of sleep mode and initialize it */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++
++ result = acx_s_init_mac(adev);
++ if (result)
++ goto end;
++
++ /* TODO: see similar code in pci.c */
++ acxusb_s_read_eeprom_version(adev);
++ acxusb_s_fill_configoption(adev);
++ acx_s_set_defaults(adev);
++ acx_s_get_firmware_version(adev);
++ acx_display_hardware_details(adev);
++
++ /* Register the network device */
++ log(L_INIT, "registering network device\n");
++ result = register_netdev(ndev);
++ if (result) {
++ msg = "acx: failed to register USB network device "
++ "(error %d)\n";
++ goto end_nomem;
++ }
++
++ acx_proc_register_entries(ndev);
++
++ acx_stop_queue(ndev, "on probe");
++ acx_carrier_off(ndev, "on probe");
++
++ printk("acx: USB module " ACX_RELEASE " loaded successfully\n");
++
++#if CMD_DISCOVERY
++ great_inquisitor(adev);
++#endif
++
++ /* Everything went OK, we are happy now */
++ result = OK;
++ goto end;
++
++end_nomem:
++ printk(msg, result);
++
++ if (ndev) {
++ if (adev->usb_rx) {
++ for (i = 0; i < ACX_RX_URB_CNT; i++)
++ usb_free_urb(adev->usb_rx[i].urb);
++ kfree(adev->usb_rx);
++ }
++ if (adev->usb_tx) {
++ for (i = 0; i < ACX_TX_URB_CNT; i++)
++ usb_free_urb(adev->usb_tx[i].urb);
++ kfree(adev->usb_tx);
++ }
++ free_netdev(ndev);
++ }
++
++ result = -ENOMEM;
++ goto end;
++
++end_nodev:
++ /* no device we could handle, return error. */
++ result = -EIO;
++
++end:
++ FN_EXIT1(result);
++ return result;
++}
++
++
++/***********************************************************************
++** acxusb_e_disconnect()
++**
++** This function is invoked whenever the user pulls the plug from the USB
++** device or the module is removed from the kernel. In these cases, the
++** network devices have to be taken down and all allocated memory has
++** to be freed.
++*/
++static void
++acxusb_e_disconnect(struct usb_interface *intf)
++{
++ acx_device_t *adev = usb_get_intfdata(intf);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ /* No WLAN device... no sense */
++ if (!adev)
++ goto end;
++
++ /* Unregister network device
++ *
++ * If the interface is up, unregister_netdev() will take
++ * care of calling our close() function, which takes
++ * care of unlinking the urbs, sending the device to
++ * sleep, etc...
++ * This can't be called with sem or lock held because
++ * _close() will try to grab it as well if it's called,
++ * deadlocking the machine.
++ */
++ unregister_netdev(adev->ndev);
++
++ acx_sem_lock(adev);
++ acx_lock(adev, flags);
++ /* This device exists no more */
++ usb_set_intfdata(intf, NULL);
++ acx_proc_unregister_entries(adev->ndev);
++
++ /*
++ * Here we only free them. _close() took care of
++ * unlinking them.
++ */
++ for (i = 0; i < ACX_RX_URB_CNT; ++i) {
++ usb_free_urb(adev->usb_rx[i].urb);
++ }
++ for (i = 0; i< ACX_TX_URB_CNT; ++i) {
++ usb_free_urb(adev->usb_tx[i].urb);
++ }
++
++ /* Freeing containers */
++ kfree(adev->usb_rx);
++ kfree(adev->usb_tx);
++
++ acx_unlock(adev, flags);
++ acx_sem_unlock(adev);
++
++ free_netdev(adev->ndev);
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_e_open()
++** This function is called when the user sets up the network interface.
++** It initializes a management timer, sets up the USB card and starts
++** the network tx queue and USB receive.
++*/
++static int
++acxusb_e_open(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ acx_sem_lock(adev);
++
++ /* put the ACX100 out of sleep mode */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_WAKE, NULL, 0);
++
++ acx_init_task_scheduler(adev);
++
++ init_timer(&adev->mgmt_timer);
++ adev->mgmt_timer.function = acx_i_timer;
++ adev->mgmt_timer.data = (unsigned long)adev;
++
++ /* acx_s_start needs it */
++ SET_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++ acx_s_start(adev);
++
++ /* don't acx_start_queue() here, we need to associate first */
++
++ acx_lock(adev, flags);
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ adev->usb_rx[i].urb->status = 0;
++ }
++
++ acxusb_l_poll_rx(adev, &adev->usb_rx[0]);
++
++ acx_unlock(adev, flags);
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return 0;
++}
++
++
++/***********************************************************************
++** acxusb_e_close()
++**
++** This function stops the network functionality of the interface (invoked
++** when the user calls ifconfig <wlan> down). The tx queue is halted and
++** the device is marked as down. In case there were any pending USB bulk
++** transfers, these are unlinked (asynchronously). The module in-use count
++** is also decreased in this function.
++*/
++static int
++acxusb_e_close(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++#ifdef WE_STILL_DONT_CARE_ABOUT_IT
++ /* Transmit a disassociate frame */
++ lock
++ acx_l_transmit_disassoc(adev, &client);
++ unlock
++#endif
++
++ acx_sem_lock(adev);
++
++ CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
++
++/* Code below is remarkably similar to acxpci_s_down(). Maybe we can merge them? */
++
++ /* Make sure we don't get any more rx requests */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_RX, NULL, 0);
++ acx_s_issue_cmd(adev, ACX1xx_CMD_DISABLE_TX, NULL, 0);
++
++ /*
++ * We must do FLUSH *without* holding sem to avoid a deadlock.
++ * See pci.c:acxpci_s_down() for deails.
++ */
++ acx_sem_unlock(adev);
++ FLUSH_SCHEDULED_WORK();
++ acx_sem_lock(adev);
++
++ /* Power down the device */
++ acx_s_issue_cmd(adev, ACX1xx_CMD_SLEEP, NULL, 0);
++
++ /* Stop the transmit queue, mark the device as DOWN */
++ acx_lock(adev, flags);
++ acx_stop_queue(ndev, "on ifdown");
++ acx_set_status(adev, ACX_STATUS_0_STOPPED);
++ /* stop pending rx/tx urb transfers */
++ for (i = 0; i < ACX_TX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_tx[i].urb);
++ adev->usb_tx[i].busy = 0;
++ }
++ for (i = 0; i < ACX_RX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_rx[i].urb);
++ adev->usb_rx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++ acx_unlock(adev, flags);
++
++ /* Must do this outside of lock */
++ del_timer_sync(&adev->mgmt_timer);
++
++ acx_sem_unlock(adev);
++
++ FN_EXIT0;
++ return 0;
++}
++
++
++/***********************************************************************
++** acxusb_l_poll_rx
++** This function (re)initiates a bulk-in USB transfer on a given urb
++*/
++static void
++acxusb_l_poll_rx(acx_device_t *adev, usb_rx_t* rx)
++{
++ struct usb_device *usbdev;
++ struct urb *rxurb;
++ int errcode, rxnum;
++ unsigned int inpipe;
++
++ FN_ENTER;
++
++ rxurb = rx->urb;
++ usbdev = adev->usbdev;
++
++ rxnum = rx - adev->usb_rx;
++
++ inpipe = usb_rcvbulkpipe(usbdev, adev->bulkinep);
++ if (unlikely(rxurb->status == -EINPROGRESS)) {
++ printk(KERN_ERR "acx: error, rx triggered while rx urb in progress\n");
++ /* FIXME: this is nasty, receive is being cancelled by this code
++ * on the other hand, this should not happen anyway...
++ */
++ usb_unlink_urb(rxurb);
++ } else
++ if (unlikely(rxurb->status == -ECONNRESET)) {
++ log(L_USBRXTX, "acx_usb: _poll_rx: connection reset\n");
++ goto end;
++ }
++ rxurb->actual_length = 0;
++ usb_fill_bulk_urb(rxurb, usbdev, inpipe,
++ &rx->bulkin, /* dataptr */
++ RXBUFSIZE, /* size */
++ acxusb_i_complete_rx, /* handler */
++ rx /* handler param */
++ );
++ rxurb->transfer_flags = URB_ASYNC_UNLINK;
++
++ /* ATOMIC: we may be called from complete_rx() usb callback */
++ errcode = usb_submit_urb(rxurb, GFP_ATOMIC);
++ /* FIXME: evaluate the error code! */
++ log(L_USBRXTX, "SUBMIT RX (%d) inpipe=0x%X size=%d errcode=%d\n",
++ rxnum, inpipe, (int) RXBUFSIZE, errcode);
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_i_complete_rx()
++** Inputs:
++** urb -> pointer to USB request block
++** regs -> pointer to register-buffer for syscalls (see asm/ptrace.h)
++**
++** This function is invoked by USB subsystem whenever a bulk receive
++** request returns.
++** The received data is then committed to the network stack and the next
++** USB receive is triggered.
++*/
++static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxusb_i_complete_rx(struct urb *urb)
++#else
++acxusb_i_complete_rx(struct urb *urb, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ rxbuffer_t *ptr;
++ rxbuffer_t *inbuf;
++ usb_rx_t *rx;
++ unsigned long flags;
++ int size, remsize, packetsize, rxnum;
++
++ FN_ENTER;
++
++ BUG_ON(!urb->context);
++
++ rx = (usb_rx_t *)urb->context;
++ adev = rx->adev;
++
++ acx_lock(adev, flags);
++
++ /*
++ * Happens on disconnect or close. Don't play with the urb.
++ * Don't resubmit it. It will get unlinked by close()
++ */
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ log(L_USBRXTX, "rx: device is down, not doing anything\n");
++ goto end_unlock;
++ }
++
++ inbuf = &rx->bulkin;
++ size = urb->actual_length;
++ remsize = size;
++ rxnum = rx - adev->usb_rx;
++
++ log(L_USBRXTX, "RETURN RX (%d) status=%d size=%d\n",
++ rxnum, urb->status, size);
++
++ /* Send the URB that's waiting. */
++ log(L_USBRXTX, "rxnum=%d, sending=%d\n", rxnum, rxnum^1);
++ acxusb_l_poll_rx(adev, &adev->usb_rx[rxnum^1]);
++
++ if (unlikely(size > sizeof(rxbuffer_t)))
++ printk("acx_usb: rx too large: %d, please report\n", size);
++
++ /* check if the transfer was aborted */
++ switch (urb->status) {
++ case 0: /* No error */
++ break;
++ case -EOVERFLOW:
++ printk(KERN_ERR "acx: rx data overrun\n");
++ adev->rxtruncsize = 0; /* Not valid anymore. */
++ goto end_unlock;
++ case -ECONNRESET:
++ adev->rxtruncsize = 0;
++ goto end_unlock;
++ case -ESHUTDOWN: /* rmmod */
++ adev->rxtruncsize = 0;
++ goto end_unlock;
++ default:
++ adev->rxtruncsize = 0;
++ adev->stats.rx_errors++;
++ printk("acx: rx error (urb status=%d)\n", urb->status);
++ goto end_unlock;
++ }
++
++ if (unlikely(!size))
++ printk("acx: warning, encountered zerolength rx packet\n");
++
++ if (urb->transfer_buffer != inbuf)
++ goto end_unlock;
++
++ /* check if previous frame was truncated
++ ** FIXME: this code can only handle truncation
++ ** of consecutive packets!
++ */
++ ptr = inbuf;
++ if (adev->rxtruncsize) {
++ int tail_size;
++
++ ptr = &adev->rxtruncbuf;
++ packetsize = RXBUF_BYTES_USED(ptr);
++ if (acx_debug & L_USBRXTX) {
++ printk("handling truncated frame (truncsize=%d size=%d "
++ "packetsize(from trunc)=%d)\n",
++ adev->rxtruncsize, size, packetsize);
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ acx_dump_bytes(inbuf, RXBUF_HDRSIZE);
++ }
++
++ /* bytes needed for rxtruncbuf completion: */
++ tail_size = packetsize - adev->rxtruncsize;
++
++ if (size < tail_size) {
++ /* there is not enough data to complete this packet,
++ ** simply append the stuff to the truncation buffer
++ */
++ memcpy(((char *)ptr) + adev->rxtruncsize, inbuf, size);
++ adev->rxtruncsize += size;
++ remsize = 0;
++ } else {
++ /* ok, this data completes the previously
++ ** truncated packet. copy it into a descriptor
++ ** and give it to the rest of the stack */
++
++ /* append tail to previously truncated part
++ ** NB: adev->rxtruncbuf (pointed to by ptr) can't
++ ** overflow because this is already checked before
++ ** truncation buffer was filled. See below,
++ ** "if (packetsize > sizeof(rxbuffer_t))..." code */
++ memcpy(((char *)ptr) + adev->rxtruncsize, inbuf, tail_size);
++
++ if (acx_debug & L_USBRXTX) {
++ printk("full trailing packet + 12 bytes:\n");
++ acx_dump_bytes(inbuf, tail_size + RXBUF_HDRSIZE);
++ }
++ acx_l_process_rxbuf(adev, ptr);
++ adev->rxtruncsize = 0;
++ ptr = (rxbuffer_t *) (((char *)inbuf) + tail_size);
++ remsize -= tail_size;
++ }
++ log(L_USBRXTX, "post-merge size=%d remsize=%d\n",
++ size, remsize);
++ }
++
++ /* size = USB data block size
++ ** remsize = unprocessed USB bytes left
++ ** ptr = current pos in USB data block
++ */
++ while (remsize) {
++ if (remsize < RXBUF_HDRSIZE) {
++ printk("acx: truncated rx header (%d bytes)!\n",
++ remsize);
++ if (ACX_DEBUG)
++ acx_dump_bytes(ptr, remsize);
++ break;
++ }
++
++ packetsize = RXBUF_BYTES_USED(ptr);
++ log(L_USBRXTX, "packet with packetsize=%d\n", packetsize);
++
++ if (RXBUF_IS_TXSTAT(ptr)) {
++ /* do rate handling */
++ usb_txstatus_t *stat = (void*)ptr;
++ u16 client_no = (u16)stat->hostdata;
++
++ log(L_USBRXTX, "tx: stat: mac_cnt_rcvd:%04X "
++ "queue_index:%02X mac_status:%02X hostdata:%08X "
++ "rate:%u ack_failures:%02X rts_failures:%02X "
++ "rts_ok:%02X\n",
++ stat->mac_cnt_rcvd,
++ stat->queue_index, stat->mac_status, stat->hostdata,
++ stat->rate, stat->ack_failures, stat->rts_failures,
++ stat->rts_ok);
++
++ if (adev->rate_auto && client_no < VEC_SIZE(adev->sta_list)) {
++ client_t *clt = &adev->sta_list[client_no];
++ u16 cur = stat->hostdata >> 16;
++
++ if (clt && clt->rate_cur == cur) {
++ acx_l_handle_txrate_auto(adev, clt,
++ cur, /* intended rate */
++ stat->rate, 0, /* actually used rate */
++ stat->mac_status, /* error? */
++ ACX_TX_URB_CNT - adev->tx_free);
++ }
++ }
++ goto next;
++ }
++
++ if (packetsize > sizeof(rxbuffer_t)) {
++ printk("acx: packet exceeds max wlan "
++ "frame size (%d > %d). size=%d\n",
++ packetsize, (int) sizeof(rxbuffer_t), size);
++ if (ACX_DEBUG)
++ acx_dump_bytes(ptr, 16);
++ /* FIXME: put some real error-handling in here! */
++ break;
++ }
++
++ if (packetsize > remsize) {
++ /* frame truncation handling */
++ if (acx_debug & L_USBRXTX) {
++ printk("need to truncate packet, "
++ "packetsize=%d remsize=%d "
++ "size=%d bytes:",
++ packetsize, remsize, size);
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ }
++ memcpy(&adev->rxtruncbuf, ptr, remsize);
++ adev->rxtruncsize = remsize;
++ break;
++ }
++
++ /* packetsize <= remsize */
++ /* now handle the received data */
++ acx_l_process_rxbuf(adev, ptr);
++next:
++ ptr = (rxbuffer_t *)(((char *)ptr) + packetsize);
++ remsize -= packetsize;
++ if ((acx_debug & L_USBRXTX) && remsize) {
++ printk("more than one packet in buffer, "
++ "second packet hdr:");
++ acx_dump_bytes(ptr, RXBUF_HDRSIZE);
++ }
++ }
++
++end_unlock:
++ acx_unlock(adev, flags);
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++** acxusb_i_complete_tx()
++** Inputs:
++** urb -> pointer to USB request block
++** regs -> pointer to register-buffer for syscalls (see asm/ptrace.h)
++**
++** This function is invoked upon termination of a USB transfer.
++*/
++static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
++acxusb_i_complete_tx(struct urb *urb)
++#else
++acxusb_i_complete_tx(struct urb *urb, struct pt_regs *regs)
++#endif
++{
++ acx_device_t *adev;
++ usb_tx_t *tx;
++ unsigned long flags;
++ int txnum;
++
++ FN_ENTER;
++
++ BUG_ON(!urb->context);
++
++ tx = (usb_tx_t *)urb->context;
++ adev = tx->adev;
++
++ txnum = tx - adev->usb_tx;
++
++ acx_lock(adev, flags);
++
++ /*
++ * If the iface isn't up, we don't have any right
++ * to play with them. The urb may get unlinked.
++ */
++ if (unlikely(!(adev->dev_state_mask & ACX_STATE_IFACE_UP))) {
++ log(L_USBRXTX, "tx: device is down, not doing anything\n");
++ goto end_unlock;
++ }
++
++ log(L_USBRXTX, "RETURN TX (%d): status=%d size=%d\n",
++ txnum, urb->status, urb->actual_length);
++
++ /* handle USB transfer errors */
++ switch (urb->status) {
++ case 0: /* No error */
++ break;
++ case -ESHUTDOWN:
++ goto end_unlock;
++ break;
++ case -ECONNRESET:
++ goto end_unlock;
++ break;
++ /* FIXME: real error-handling code here please */
++ default:
++ printk(KERN_ERR "acx: tx error, urb status=%d\n", urb->status);
++ /* FIXME: real error-handling code here please */
++ }
++
++ /* free the URB and check for more data */
++ tx->busy = 0;
++ adev->tx_free++;
++ if ((adev->tx_free >= TX_START_QUEUE)
++ && (adev->status == ACX_STATUS_4_ASSOCIATED)
++ && (acx_queue_stopped(adev->ndev))
++ ) {
++ log(L_BUF, "tx: wake queue (%u free txbufs)\n",
++ adev->tx_free);
++ acx_wake_queue(adev->ndev, NULL);
++ }
++
++end_unlock:
++ acx_unlock(adev, flags);
++/* end: */
++ FN_EXIT0;
++}
++
++
++/***************************************************************
++** acxusb_l_alloc_tx
++** Actually returns a usb_tx_t* ptr
++*/
++tx_t*
++acxusb_l_alloc_tx(acx_device_t *adev)
++{
++ usb_tx_t *tx;
++ unsigned head;
++
++ FN_ENTER;
++
++ head = adev->tx_head;
++ do {
++ head = (head + 1) % ACX_TX_URB_CNT;
++ if (!adev->usb_tx[head].busy) {
++ log(L_USBRXTX, "allocated tx %d\n", head);
++ tx = &adev->usb_tx[head];
++ tx->busy = 1;
++ adev->tx_free--;
++ /* Keep a few free descs between head and tail of tx ring.
++ ** It is not absolutely needed, just feels safer */
++ if (adev->tx_free < TX_STOP_QUEUE) {
++ log(L_BUF, "tx: stop queue "
++ "(%u free txbufs)\n", adev->tx_free);
++ acx_stop_queue(adev->ndev, NULL);
++ }
++ goto end;
++ }
++ } while (likely(head!=adev->tx_head));
++ tx = NULL;
++ printk_ratelimited("acx: tx buffers full\n");
++end:
++ adev->tx_head = head;
++ FN_EXIT0;
++ return (tx_t*)tx;
++}
++
++
++/***************************************************************
++** Used if alloc_tx()'ed buffer needs to be cancelled without doing tx
++*/
++void
++acxusb_l_dealloc_tx(tx_t *tx_opaque)
++{
++ usb_tx_t* tx = (usb_tx_t*)tx_opaque;
++ tx->busy = 0;
++}
++
++
++/***************************************************************
++*/
++void*
++acxusb_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
++{
++ usb_tx_t* tx = (usb_tx_t*)tx_opaque;
++ return &tx->bulkout.data;
++}
++
++
++/***************************************************************
++** acxusb_l_tx_data
++**
++** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
++** Can be called from acx_i_start_xmit (data frames from net core).
++*/
++void
++acxusb_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int wlanpkt_len)
++{
++ struct usb_device *usbdev;
++ struct urb* txurb;
++ usb_tx_t* tx;
++ usb_txbuffer_t* txbuf;
++ client_t *clt;
++ wlan_hdr_t* whdr;
++ unsigned int outpipe;
++ int ucode, txnum;
++
++ FN_ENTER;
++
++ tx = ((usb_tx_t *)tx_opaque);
++ txurb = tx->urb;
++ txbuf = &tx->bulkout;
++ whdr = (wlan_hdr_t *)txbuf->data;
++ txnum = tx - adev->usb_tx;
++
++ log(L_DEBUG, "using buf#%d free=%d len=%d\n",
++ txnum, adev->tx_free, wlanpkt_len);
++
++ switch (adev->mode) {
++ case ACX_MODE_0_ADHOC:
++ case ACX_MODE_3_AP:
++ clt = acx_l_sta_list_get(adev, whdr->a1);
++ break;
++ case ACX_MODE_2_STA:
++ clt = adev->ap_client;
++ break;
++ default: /* ACX_MODE_OFF, ACX_MODE_MONITOR */
++ clt = NULL;
++ break;
++ }
++
++ if (unlikely(clt && !clt->rate_cur)) {
++ printk("acx: driver bug! bad ratemask\n");
++ goto end;
++ }
++
++ /* fill the USB transfer header */
++ txbuf->desc = cpu_to_le16(USB_TXBUF_TXDESC);
++ txbuf->mpdu_len = cpu_to_le16(wlanpkt_len);
++ txbuf->queue_index = 1;
++ if (clt) {
++ txbuf->rate = clt->rate_100;
++ txbuf->hostdata = (clt - adev->sta_list) | (clt->rate_cur << 16);
++ } else {
++ txbuf->rate = adev->rate_bcast100;
++ txbuf->hostdata = ((u16)-1) | (adev->rate_bcast << 16);
++ }
++ txbuf->ctrl1 = DESC_CTL_FIRSTFRAG;
++ if (1 == adev->preamble_cur)
++ SET_BIT(txbuf->ctrl1, DESC_CTL_SHORT_PREAMBLE);
++ txbuf->ctrl2 = 0;
++ txbuf->data_len = cpu_to_le16(wlanpkt_len);
++
++ if (unlikely(acx_debug & L_DATA)) {
++ printk("dump of bulk out urb:\n");
++ acx_dump_bytes(txbuf, wlanpkt_len + USB_TXBUF_HDRSIZE);
++ }
++
++ if (unlikely(txurb->status == -EINPROGRESS)) {
++ printk("acx: trying to submit tx urb while already in progress\n");
++ }
++
++ /* now schedule the USB transfer */
++ usbdev = adev->usbdev;
++ outpipe = usb_sndbulkpipe(usbdev, adev->bulkoutep);
++
++ usb_fill_bulk_urb(txurb, usbdev, outpipe,
++ txbuf, /* dataptr */
++ wlanpkt_len + USB_TXBUF_HDRSIZE, /* size */
++ acxusb_i_complete_tx, /* handler */
++ tx /* handler param */
++ );
++
++ txurb->transfer_flags = URB_ASYNC_UNLINK|URB_ZERO_PACKET;
++ ucode = usb_submit_urb(txurb, GFP_ATOMIC);
++ log(L_USBRXTX, "SUBMIT TX (%d): outpipe=0x%X buf=%p txsize=%d "
++ "rate=%u errcode=%d\n", txnum, outpipe, txbuf,
++ wlanpkt_len + USB_TXBUF_HDRSIZE, txbuf->rate, ucode);
++
++ if (unlikely(ucode)) {
++ printk(KERN_ERR "acx: submit_urb() error=%d txsize=%d\n",
++ ucode, wlanpkt_len + USB_TXBUF_HDRSIZE);
++
++ /* on error, just mark the frame as done and update
++ ** the statistics
++ */
++ adev->stats.tx_errors++;
++ tx->busy = 0;
++ adev->tx_free++;
++ /* needed? if (adev->tx_free > TX_START_QUEUE) acx_wake_queue(...) */
++ }
++end:
++ FN_EXIT0;
++}
++
++
++/***********************************************************************
++*/
++static void
++acxusb_i_set_rx_mode(struct net_device *ndev)
++{
++}
++
++
++/***********************************************************************
++*/
++#ifdef HAVE_TX_TIMEOUT
++static void
++acxusb_i_tx_timeout(struct net_device *ndev)
++{
++ acx_device_t *adev = ndev2adev(ndev);
++ unsigned long flags;
++ int i;
++
++ FN_ENTER;
++
++ acx_lock(adev, flags);
++ /* unlink the URBs */
++ for (i = 0; i < ACX_TX_URB_CNT; i++) {
++ acxusb_unlink_urb(adev->usb_tx[i].urb);
++ adev->usb_tx[i].busy = 0;
++ }
++ adev->tx_free = ACX_TX_URB_CNT;
++ /* TODO: stats update */
++ acx_unlock(adev, flags);
++
++ FN_EXIT0;
++}
++#endif
++
++
++/***********************************************************************
++** init_module()
++**
++** This function is invoked upon loading of the kernel module.
++** It registers itself at the kernel's USB subsystem.
++**
++** Returns: Errorcode on failure, 0 on success
++*/
++int __init
++acxusb_e_init_module(void)
++{
++ log(L_INIT, "USB module " ACX_RELEASE " initialized, "
++ "probing for devices...\n");
++ return usb_register(&acxusb_driver);
++}
++
++
++
++/***********************************************************************
++** cleanup_module()
++**
++** This function is invoked as last step of the module unloading. It simply
++** deregisters this module at the kernel's USB subsystem.
++*/
++void __exit
++acxusb_e_cleanup_module()
++{
++ usb_deregister(&acxusb_driver);
++}
++
++
++/***********************************************************************
++** DEBUG STUFF
++*/
++#if ACX_DEBUG
++
++#ifdef UNUSED
++static void
++dump_device(struct usb_device *usbdev)
++{
++ int i;
++ struct usb_config_descriptor *cd;
++
++ printk("acx device dump:\n");
++ printk(" devnum: %d\n", usbdev->devnum);
++ printk(" speed: %d\n", usbdev->speed);
++ printk(" tt: 0x%X\n", (unsigned int)(usbdev->tt));
++ printk(" ttport: %d\n", (unsigned int)(usbdev->ttport));
++ printk(" toggle[0]: 0x%X toggle[1]: 0x%X\n", (unsigned int)(usbdev->toggle[0]), (unsigned int)(usbdev->toggle[1]));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++ /* This saw a change after 2.6.10 */
++ printk(" ep_in wMaxPacketSize: ");
++ for (i = 0; i < 16; ++i)
++ if (usbdev->ep_in[i] != NULL)
++ printk("%d:%d ", i, usbdev->ep_in[i]->desc.wMaxPacketSize);
++ printk("\n");
++ printk(" ep_out wMaxPacketSize: ");
++ for (i = 0; i < VEC_SIZE(usbdev->ep_out); ++i)
++ if (usbdev->ep_out[i] != NULL)
++ printk("%d:%d ", i, usbdev->ep_out[i]->desc.wMaxPacketSize);
++ printk("\n");
++#else
++ printk(" epmaxpacketin: ");
++ for (i = 0; i < 16; i++)
++ printk("%d ", usbdev->epmaxpacketin[i]);
++ printk("\n");
++ printk(" epmaxpacketout: ");
++ for (i = 0; i < 16; i++)
++ printk("%d ", usbdev->epmaxpacketout[i]);
++ printk("\n");
++#endif
++ printk(" parent: 0x%X\n", (unsigned int)usbdev->parent);
++ printk(" bus: 0x%X\n", (unsigned int)usbdev->bus);
++#ifdef NO_DATATYPE
++ printk(" configs: ");
++ for (i = 0; i < usbdev->descriptor.bNumConfigurations; i++)
++ printk("0x%X ", usbdev->config[i]);
++ printk("\n");
++#endif
++ printk(" actconfig: %p\n", usbdev->actconfig);
++ dump_device_descriptor(&usbdev->descriptor);
++
++ cd = &usbdev->config->desc;
++ dump_config_descriptor(cd);
++}
++
++
++/***********************************************************************
++*/
++static void
++dump_config_descriptor(struct usb_config_descriptor *cd)
++{
++ printk("Configuration Descriptor:\n");
++ if (!cd) {
++ printk("NULL\n");
++ return;
++ }
++ printk(" bLength: %d (0x%X)\n", cd->bLength, cd->bLength);
++ printk(" bDescriptorType: %d (0x%X)\n", cd->bDescriptorType, cd->bDescriptorType);
++ printk(" bNumInterfaces: %d (0x%X)\n", cd->bNumInterfaces, cd->bNumInterfaces);
++ printk(" bConfigurationValue: %d (0x%X)\n", cd->bConfigurationValue, cd->bConfigurationValue);
++ printk(" iConfiguration: %d (0x%X)\n", cd->iConfiguration, cd->iConfiguration);
++ printk(" bmAttributes: %d (0x%X)\n", cd->bmAttributes, cd->bmAttributes);
++ /* printk(" MaxPower: %d (0x%X)\n", cd->bMaxPower, cd->bMaxPower); */
++}
++
++
++static void
++dump_device_descriptor(struct usb_device_descriptor *dd)
++{
++ printk("Device Descriptor:\n");
++ if (!dd) {
++ printk("NULL\n");
++ return;
++ }
++ printk(" bLength: %d (0x%X)\n", dd->bLength, dd->bLength);
++ printk(" bDescriptortype: %d (0x%X)\n", dd->bDescriptorType, dd->bDescriptorType);
++ printk(" bcdUSB: %d (0x%X)\n", dd->bcdUSB, dd->bcdUSB);
++ printk(" bDeviceClass: %d (0x%X)\n", dd->bDeviceClass, dd->bDeviceClass);
++ printk(" bDeviceSubClass: %d (0x%X)\n", dd->bDeviceSubClass, dd->bDeviceSubClass);
++ printk(" bDeviceProtocol: %d (0x%X)\n", dd->bDeviceProtocol, dd->bDeviceProtocol);
++ printk(" bMaxPacketSize0: %d (0x%X)\n", dd->bMaxPacketSize0, dd->bMaxPacketSize0);
++ printk(" idVendor: %d (0x%X)\n", dd->idVendor, dd->idVendor);
++ printk(" idProduct: %d (0x%X)\n", dd->idProduct, dd->idProduct);
++ printk(" bcdDevice: %d (0x%X)\n", dd->bcdDevice, dd->bcdDevice);
++ printk(" iManufacturer: %d (0x%X)\n", dd->iManufacturer, dd->iManufacturer);
++ printk(" iProduct: %d (0x%X)\n", dd->iProduct, dd->iProduct);
++ printk(" iSerialNumber: %d (0x%X)\n", dd->iSerialNumber, dd->iSerialNumber);
++ printk(" bNumConfigurations: %d (0x%X)\n", dd->bNumConfigurations, dd->bNumConfigurations);
++}
++#endif /* UNUSED */
++
++#endif /* ACX_DEBUG */
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan.c 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,424 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
++#include <linux/config.h>
++#endif
++#include <linux/types.h>
++#include <linux/if_arp.h>
++#include <linux/wireless.h>
++#include <net/iw_handler.h>
++
++#include "acx.h"
++
++
++/***********************************************************************
++*/
++#define LOG_BAD_EID(hdr,len,ie_ptr) acx_log_bad_eid(hdr, len, ((wlan_ie_t*)ie_ptr))
++
++#define IE_EID(ie_ptr) (((wlan_ie_t*)(ie_ptr))->eid)
++#define IE_LEN(ie_ptr) (((wlan_ie_t*)(ie_ptr))->len)
++#define OFFSET(hdr,off) (WLAN_HDR_A3_DATAP(hdr) + (off))
++
++
++/***********************************************************************
++** wlan_mgmt_decode_XXX
++**
++** Given a complete frame in f->hdr, sets the pointers in f to
++** the areas that correspond to the parts of the frame.
++**
++** Assumptions:
++** 1) f->len and f->hdr are already set
++** 2) f->len is the length of the MAC header + data, the FCS
++** is NOT included
++** 3) all members except len and hdr are zero
++** Arguments:
++** f frame structure
++**
++** Returns:
++** nothing
++**
++** Side effects:
++** frame structure members are pointing at their
++** respective portions of the frame buffer.
++*/
++void
++wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_BEACON;
++
++ /*-- Fixed Fields ----*/
++ f->ts = (u64 *) OFFSET(f->hdr, WLAN_BEACON_OFF_TS);
++ f->bcn_int = (u16 *) OFFSET(f->hdr, WLAN_BEACON_OFF_BCN_INT);
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_BEACON_OFF_CAPINFO);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_BEACON_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_FH_PARMS:
++ f->fh_parms = (wlan_ie_fh_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_DS_PARMS:
++ f->ds_parms = (wlan_ie_ds_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_CF_PARMS:
++ f->cf_parms = (wlan_ie_cf_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_IBSS_PARMS:
++ f->ibss_parms = (wlan_ie_ibss_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_TIM:
++ f->tim = (wlan_ie_tim_t *) ie_ptr;
++ break;
++ case WLAN_EID_ERP_INFO:
++ f->erp = (wlan_ie_erp_t *) ie_ptr;
++ break;
++
++ case WLAN_EID_COUNTRY:
++ /* was seen: 07 06 47 42 20 01 0D 14 */
++ case WLAN_EID_PWR_CONSTRAINT:
++ /* was seen by Ashwin Mansinghka <ashwin_man@yahoo.com> from
++ Atheros-based PCI card in AP mode using madwifi drivers: */
++ /* 20 01 00 */
++ case WLAN_EID_NONERP:
++ /* was seen from WRT54GS with OpenWrt: 2F 01 07 */
++ case WLAN_EID_UNKNOWN128:
++ /* was seen by Jacek Jablonski <conexion2000@gmail.com> from Orinoco AP */
++ /* 80 06 00 60 1D 2C 3B 00 */
++ case WLAN_EID_UNKNOWN133:
++ /* was seen by David Bronaugh <dbronaugh@linuxboxen.org> from ???? */
++ /* 85 1E 00 00 84 12 07 00 FF 00 11 00 61 70 63 31 */
++ /* 63 73 72 30 34 32 00 00 00 00 00 00 00 00 00 25 */
++ case WLAN_EID_UNKNOWN223:
++ /* was seen by Carlos Martin <carlosmn@gmail.com> from ???? */
++ /* DF 20 01 1E 04 00 00 00 06 63 09 02 FF 0F 30 30 */
++ /* 30 42 36 42 33 34 30 39 46 31 00 00 00 00 00 00 00 00 */
++ case WLAN_EID_GENERIC:
++ /* WPA: hostap code:
++ if (pos[1] >= 4 &&
++ pos[2] == 0x00 && pos[3] == 0x50 &&
++ pos[4] == 0xf2 && pos[5] == 1) {
++ wpa = pos;
++ wpa_len = pos[1] + 2;
++ }
++ TI x4 mode: seen DD 04 08 00 28 00
++ (08 00 28 is TI's OUI)
++ last byte is probably 0/1 - disabled/enabled
++ */
++ case WLAN_EID_RSN:
++ /* hostap does something with it:
++ rsn = pos;
++ rsn_len = pos[1] + 2;
++ */
++ break;
++
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++#ifdef UNUSED
++void wlan_mgmt_decode_ibssatim(wlan_fr_ibssatim_t * f)
++{
++ f->type = WLAN_FSTYPE_ATIM;
++ /*-- Fixed Fields ----*/
++ /*-- Information elements */
++}
++#endif /* UNUSED */
++
++void
++wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f)
++{
++ f->type = WLAN_FSTYPE_DISASSOC;
++
++ /*-- Fixed Fields ----*/
++ f->reason = (u16 *) OFFSET(f->hdr, WLAN_DISASSOC_OFF_REASON);
++
++ /*-- Information elements */
++}
++
++
++void
++wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++
++ f->type = WLAN_FSTYPE_ASSOCREQ;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_CAP_INFO);
++ f->listen_int = (u16 *) OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_LISTEN_INT);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_ASSOCREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f)
++{
++ f->type = WLAN_FSTYPE_ASSOCRESP;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_CAP_INFO);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_STATUS);
++ f->aid = (u16 *) OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_AID);
++
++ /*-- Information elements */
++ f->supp_rates = (wlan_ie_supp_rates_t *)
++ OFFSET(f->hdr, WLAN_ASSOCRESP_OFF_SUPP_RATES);
++}
++
++
++#ifdef UNUSED
++void
++wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_REASSOCREQ;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_CAP_INFO);
++ f->listen_int = (u16 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_LISTEN_INT);
++ f->curr_ap = (u8 *) OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_CURR_AP);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_REASSOCREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f)
++{
++ f->type = WLAN_FSTYPE_REASSOCRESP;
++
++ /*-- Fixed Fields ----*/
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_CAP_INFO);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_STATUS);
++ f->aid = (u16 *) OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_AID);
++
++ /*-- Information elements */
++ f->supp_rates = (wlan_ie_supp_rates_t *)
++ OFFSET(f->hdr, WLAN_REASSOCRESP_OFF_SUPP_RATES);
++}
++
++
++void
++wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_PROBEREQ;
++
++ /*-- Fixed Fields ----*/
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_PROBEREQ_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++#endif /* UNUSED */
++
++
++/* TODO: decoding of beacon and proberesp can be merged (similar structure) */
++void
++wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_PROBERESP;
++
++ /*-- Fixed Fields ----*/
++ f->ts = (u64 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_TS);
++ f->bcn_int = (u16 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_BCN_INT);
++ f->cap_info = (u16 *) OFFSET(f->hdr, WLAN_PROBERESP_OFF_CAP_INFO);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_PROBERESP_OFF_SSID);
++ while (ie_ptr < end) {
++ switch (IE_EID(ie_ptr)) {
++ case WLAN_EID_SSID:
++ f->ssid = (wlan_ie_ssid_t *) ie_ptr;
++ break;
++ case WLAN_EID_SUPP_RATES:
++ f->supp_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_EXT_RATES:
++ f->ext_rates = (wlan_ie_supp_rates_t *) ie_ptr;
++ break;
++ case WLAN_EID_FH_PARMS:
++ f->fh_parms = (wlan_ie_fh_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_DS_PARMS:
++ f->ds_parms = (wlan_ie_ds_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_CF_PARMS:
++ f->cf_parms = (wlan_ie_cf_parms_t *) ie_ptr;
++ break;
++ case WLAN_EID_IBSS_PARMS:
++ f->ibss_parms = (wlan_ie_ibss_parms_t *) ie_ptr;
++ break;
++#ifdef DONT_DO_IT_ADD_REAL_HANDLING_INSTEAD
++ case WLAN_EID_COUNTRY:
++ break;
++ ...
++#endif
++#ifdef SENT_HERE_BY_OPENWRT
++ /* should those be trapped or handled?? */
++ case WLAN_EID_ERP_INFO:
++ break;
++ case WLAN_EID_NONERP:
++ break;
++ case WLAN_EID_GENERIC:
++ break;
++#endif
++ default:
++ LOG_BAD_EID(f->hdr, f->len, ie_ptr);
++ break;
++ }
++
++ ie_ptr = ie_ptr + 2 + IE_LEN(ie_ptr);
++ }
++}
++
++
++void
++wlan_mgmt_decode_authen(wlan_fr_authen_t * f)
++{
++ u8 *ie_ptr;
++ u8 *end = (u8*)f->hdr + f->len;
++
++ f->type = WLAN_FSTYPE_AUTHEN;
++
++ /*-- Fixed Fields ----*/
++ f->auth_alg = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_AUTH_ALG);
++ f->auth_seq = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_AUTH_SEQ);
++ f->status = (u16 *) OFFSET(f->hdr, WLAN_AUTHEN_OFF_STATUS);
++
++ /*-- Information elements */
++ ie_ptr = OFFSET(f->hdr, WLAN_AUTHEN_OFF_CHALLENGE);
++ if ((ie_ptr < end) && (IE_EID(ie_ptr) == WLAN_EID_CHALLENGE)) {
++ f->challenge = (wlan_ie_challenge_t *) ie_ptr;
++ }
++}
++
++
++void
++wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f)
++{
++ f->type = WLAN_FSTYPE_DEAUTHEN;
++
++ /*-- Fixed Fields ----*/
++ f->reason = (u16 *) OFFSET(f->hdr, WLAN_DEAUTHEN_OFF_REASON);
++
++ /*-- Information elements */
++}
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_compat.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_compat.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,260 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/*=============================================================*/
++/*------ Establish Platform Identity --------------------------*/
++/*=============================================================*/
++/* Key macros: */
++/* WLAN_CPU_FAMILY */
++#define WLAN_Ix86 1
++#define WLAN_PPC 2
++#define WLAN_Ix96 3
++#define WLAN_ARM 4
++#define WLAN_ALPHA 5
++#define WLAN_MIPS 6
++#define WLAN_HPPA 7
++#define WLAN_SPARC 8
++#define WLAN_SH 9
++#define WLAN_x86_64 10
++/* WLAN_CPU_CORE */
++#define WLAN_I386CORE 1
++#define WLAN_PPCCORE 2
++#define WLAN_I296 3
++#define WLAN_ARMCORE 4
++#define WLAN_ALPHACORE 5
++#define WLAN_MIPSCORE 6
++#define WLAN_HPPACORE 7
++/* WLAN_CPU_PART */
++#define WLAN_I386PART 1
++#define WLAN_MPC860 2
++#define WLAN_MPC823 3
++#define WLAN_I296SA 4
++#define WLAN_PPCPART 5
++#define WLAN_ARMPART 6
++#define WLAN_ALPHAPART 7
++#define WLAN_MIPSPART 8
++#define WLAN_HPPAPART 9
++/* WLAN_SYSARCH */
++#define WLAN_PCAT 1
++#define WLAN_MBX 2
++#define WLAN_RPX 3
++#define WLAN_LWARCH 4
++#define WLAN_PMAC 5
++#define WLAN_SKIFF 6
++#define WLAN_BITSY 7
++#define WLAN_ALPHAARCH 7
++#define WLAN_MIPSARCH 9
++#define WLAN_HPPAARCH 10
++/* WLAN_HOSTIF (generally set on the command line, not detected) */
++#define WLAN_PCMCIA 1
++#define WLAN_ISA 2
++#define WLAN_PCI 3
++#define WLAN_USB 4
++#define WLAN_PLX 5
++
++/* Note: the PLX HOSTIF above refers to some vendors implementations for */
++/* PCI. It's a PLX chip that is a PCI to PCMCIA adapter, but it */
++/* isn't a real PCMCIA host interface adapter providing all the */
++/* card&socket services. */
++
++#ifdef __powerpc__
++#ifndef __ppc__
++#define __ppc__
++#endif
++#endif
++
++#if (defined(CONFIG_PPC) || defined(CONFIG_8xx))
++#ifndef __ppc__
++#define __ppc__
++#endif
++#endif
++
++#if defined(__x86_64__)
++ #define WLAN_CPU_FAMILY WLAN_x86_64
++ #define WLAN_SYSARCH WLAN_PCAT
++#elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
++ #define WLAN_CPU_FAMILY WLAN_Ix86
++ #define WLAN_CPU_CORE WLAN_I386CORE
++ #define WLAN_CPU_PART WLAN_I386PART
++ #define WLAN_SYSARCH WLAN_PCAT
++#elif defined(__ppc__)
++ #define WLAN_CPU_FAMILY WLAN_PPC
++ #define WLAN_CPU_CORE WLAN_PPCCORE
++ #if defined(CONFIG_MBX)
++ #define WLAN_CPU_PART WLAN_MPC860
++ #define WLAN_SYSARCH WLAN_MBX
++ #elif defined(CONFIG_RPXLITE)
++ #define WLAN_CPU_PART WLAN_MPC823
++ #define WLAN_SYSARCH WLAN_RPX
++ #elif defined(CONFIG_RPXCLASSIC)
++ #define WLAN_CPU_PART WLAN_MPC860
++ #define WLAN_SYSARCH WLAN_RPX
++ #else
++ #define WLAN_CPU_PART WLAN_PPCPART
++ #define WLAN_SYSARCH WLAN_PMAC
++ #endif
++#elif defined(__arm__)
++ #define WLAN_CPU_FAMILY WLAN_ARM
++ #define WLAN_CPU_CORE WLAN_ARMCORE
++ #define WLAN_CPU_PART WLAN_ARM_PART
++ #define WLAN_SYSARCH WLAN_SKIFF
++#elif defined(__alpha__)
++ #define WLAN_CPU_FAMILY WLAN_ALPHA
++ #define WLAN_CPU_CORE WLAN_ALPHACORE
++ #define WLAN_CPU_PART WLAN_ALPHAPART
++ #define WLAN_SYSARCH WLAN_ALPHAARCH
++#elif defined(__mips__)
++ #define WLAN_CPU_FAMILY WLAN_MIPS
++ #define WLAN_CPU_CORE WLAN_MIPSCORE
++ #define WLAN_CPU_PART WLAN_MIPSPART
++ #define WLAN_SYSARCH WLAN_MIPSARCH
++#elif defined(__hppa__)
++ #define WLAN_CPU_FAMILY WLAN_HPPA
++ #define WLAN_CPU_CORE WLAN_HPPACORE
++ #define WLAN_CPU_PART WLAN_HPPAPART
++ #define WLAN_SYSARCH WLAN_HPPAARCH
++#elif defined(__sparc__)
++ #define WLAN_CPU_FAMILY WLAN_SPARC
++ #define WLAN_SYSARCH WLAN_SPARC
++#elif defined(__sh__)
++ #define WLAN_CPU_FAMILY WLAN_SH
++ #define WLAN_SYSARCH WLAN_SHARCH
++ #ifndef __LITTLE_ENDIAN__
++ #define __LITTLE_ENDIAN__
++ #endif
++#else
++ #error "No CPU identified!"
++#endif
++
++/*
++ Some big endian machines implicitly do all I/O in little endian mode.
++
++ In particular:
++ Linux/PPC on PowerMacs (PCI)
++ Arm/Intel Xscale (PCI)
++
++ This may also affect PLX boards and other BE &| PPC platforms;
++ as new ones are discovered, add them below.
++*/
++
++#if ((WLAN_SYSARCH == WLAN_SKIFF) || (WLAN_SYSARCH == WLAN_PMAC))
++#define REVERSE_ENDIAN
++#endif
++
++/*=============================================================*/
++/*------ Hardware Portability Macros --------------------------*/
++/*=============================================================*/
++#if (WLAN_CPU_FAMILY == WLAN_PPC)
++#define wlan_inw(a) in_be16((unsigned short *)((a)+_IO_BASE))
++#define wlan_inw_le16_to_cpu(a) inw((a))
++#define wlan_outw(v,a) out_be16((unsigned short *)((a)+_IO_BASE), (v))
++#define wlan_outw_cpu_to_le16(v,a) outw((v),(a))
++#else
++#define wlan_inw(a) inw((a))
++#define wlan_inw_le16_to_cpu(a) __cpu_to_le16(inw((a)))
++#define wlan_outw(v,a) outw((v),(a))
++#define wlan_outw_cpu_to_le16(v,a) outw(__cpu_to_le16((v)),(a))
++#endif
++
++/*=============================================================*/
++/*------ Bit settings -----------------------------------------*/
++/*=============================================================*/
++#define ieee2host16(n) __le16_to_cpu(n)
++#define ieee2host32(n) __le32_to_cpu(n)
++#define host2ieee16(n) __cpu_to_le16(n)
++#define host2ieee32(n) __cpu_to_le32(n)
++
++/* for constants */
++#ifdef __LITTLE_ENDIAN
++ #define IEEE16(a,n) a = n, a##i = n,
++#else
++ #ifdef __BIG_ENDIAN
++ /* shifts would produce gcc warnings. Oh well... */
++ #define IEEE16(a,n) a = n, a##i = ((n&0xff)*256 + ((n&0xff00)/256)),
++ #else
++ #error give me endianness or give me death
++ #endif
++#endif
++
++/*=============================================================*/
++/*------ Compiler Portability Macros --------------------------*/
++/*=============================================================*/
++#define WLAN_PACKED __attribute__ ((packed))
++
++/* Interrupt handler backwards compatibility stuff */
++#ifndef IRQ_NONE
++#define IRQ_NONE
++#define IRQ_HANDLED
++typedef void irqreturn_t;
++#endif
++
++#ifndef ARPHRD_IEEE80211_PRISM
++#define ARPHRD_IEEE80211_PRISM 802
++#endif
++
++#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
++
++/*============================================================================*
++ * Constants *
++ *============================================================================*/
++#define WLAN_IEEE_OUI_LEN 3
++
++/*============================================================================*
++ * Types *
++ *============================================================================*/
++
++/* local ether header type */
++typedef struct wlan_ethhdr {
++ u8 daddr[ETH_ALEN];
++ u8 saddr[ETH_ALEN];
++ u16 type;
++} WLAN_PACKED wlan_ethhdr_t;
++
++/* local llc header type */
++typedef struct wlan_llc {
++ u8 dsap;
++ u8 ssap;
++ u8 ctl;
++} WLAN_PACKED wlan_llc_t;
++
++/* local snap header type */
++typedef struct wlan_snap {
++ u8 oui[WLAN_IEEE_OUI_LEN];
++ u16 type;
++} WLAN_PACKED wlan_snap_t;
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_hdr.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_hdr.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,497 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/* mini-doc
++
++Here are all 11b/11g/11a rates and modulations:
++
++ 11b 11g 11a
++ --- --- ---
++ 1 |B |B |
++ 2 |Q |Q |
++ 5.5|Cp |C p|
++ 6 | |Od |O
++ 9 | |od |o
++11 |Cp |C p|
++12 | |Od |O
++18 | |od |o
++22 | | p|
++24 | |Od |O
++33 | | p|
++36 | |od |o
++48 | |od |o
++54 | |od |o
++
++Mandatory:
++ B - DBPSK (Differential Binary Phase Shift Keying)
++ Q - DQPSK (Differential Quaternary Phase Shift Keying)
++ C - CCK (Complementary Code Keying, a form of DSSS
++ (Direct Sequence Spread Spectrum) modulation)
++ O - OFDM (Orthogonal Frequency Division Multiplexing)
++Optional:
++ o - OFDM
++ d - CCK-OFDM (also known as DSSS-OFDM)
++ p - PBCC (Packet Binary Convolutional Coding)
++
++The term CCK-OFDM may be used interchangeably with DSSS-OFDM
++(the IEEE 802.11g-2003 standard uses the latter terminology).
++In the CCK-OFDM, the PLCP header of the frame uses the CCK form of DSSS,
++while the PLCP payload (the MAC frame) is modulated using OFDM.
++
++Basically, you must use CCK-OFDM if you have mixed 11b/11g environment,
++or else (pure OFDM) 11b equipment may not realize that AP
++is sending a packet and start sending its own one.
++Sadly, looks like acx111 does not support CCK-OFDM, only pure OFDM.
++
++Re PBCC: avoid using it. It makes sense only if you have
++TI "11b+" hardware. You _must_ use PBCC in order to reach 22Mbps on it.
++
++Preambles:
++
++Long preamble (at 1Mbit rate, takes 144 us):
++ 16 bytes ones
++ 2 bytes 0xF3A0 (lsb sent first)
++PLCP header follows (at 1Mbit also):
++ 1 byte Signal: speed, in 0.1Mbit units, except for:
++ 33Mbit: 33 (instead of 330 - doesn't fit in octet)
++ all CCK-OFDM rates: 30
++ 1 byte Service
++ 0,1,4: reserved
++ 2: 1=locked clock
++ 3: 1=PBCC
++ 5: Length Extension (PBCC 22,33Mbit (11g only)) <-
++ 6: Length Extension (PBCC 22,33Mbit (11g only)) <- BLACK MAGIC HERE
++ 7: Length Extension <-
++ 2 bytes Length (time needed to tx this frame)
++ a) 5.5 Mbit/s CCK
++ Length = octets*8/5.5, rounded up to integer
++ b) 11 Mbit/s CCK
++ Length = octets*8/11, rounded up to integer
++ Service bit 7:
++ 0 = rounding took less than 8/11
++ 1 = rounding took more than or equal to 8/11
++ c) 5.5 Mbit/s PBCC
++ Length = (octets+1)*8/5.5, rounded up to integer
++ d) 11 Mbit/s PBCC
++ Length = (octets+1)*8/11, rounded up to integer
++ Service bit 7:
++ 0 = rounding took less than 8/11
++ 1 = rounding took more than or equal to 8/11
++ e) 22 Mbit/s PBCC
++ Length = (octets+1)*8/22, rounded up to integer
++ Service bits 6,7:
++ 00 = rounding took less than 8/22ths
++ 01 = rounding took 8/22...15/22ths
++ 10 = rounding took 16/22ths or more.
++ f) 33 Mbit/s PBCC
++ Length = (octets+1)*8/33, rounded up to integer
++ Service bits 5,6,7:
++ 000 rounding took less than 8/33
++ 001 rounding took 8/33...15/33
++ 010 rounding took 16/33...23/33
++ 011 rounding took 24/33...31/33
++ 100 rounding took 32/33 or more
++ 2 bytes CRC
++
++PSDU follows (up to 2346 bytes at selected rate)
++
++While Signal value alone is not enough to determine rate and modulation,
++Signal+Service is always sufficient.
++
++Short preamble (at 1Mbit rate, takes 72 us):
++ 7 bytes zeroes
++ 2 bytes 0x05CF (lsb sent first)
++PLCP header follows *at 2Mbit/s*. Format is the same as in long preamble.
++PSDU follows (up to 2346 bytes at selected rate)
++
++OFDM preamble is completely different, uses OFDM
++modulation from the start and thus easily identifiable.
++Not shown here.
++*/
++
++
++/***********************************************************************
++** Constants
++*/
++
++#define WLAN_HDR_A3_LEN 24
++#define WLAN_HDR_A4_LEN 30
++/* IV structure:
++** 3 bytes: Initialization Vector (24 bits)
++** 1 byte: 0..5: padding, must be 0; 6..7: key selector (0-3)
++*/
++#define WLAN_WEP_IV_LEN 4
++/* 802.11 says 2312 but looks like 2312 is a max size of _WEPed data_ */
++#define WLAN_DATA_MAXLEN 2304
++#define WLAN_WEP_ICV_LEN 4
++#define WLAN_FCS_LEN 4
++#define WLAN_A3FR_MAXLEN (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN)
++#define WLAN_A4FR_MAXLEN (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN)
++#define WLAN_A3FR_MAXLEN_FCS (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + 4)
++#define WLAN_A4FR_MAXLEN_FCS (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + 4)
++#define WLAN_A3FR_MAXLEN_WEP (WLAN_A3FR_MAXLEN + 8)
++#define WLAN_A4FR_MAXLEN_WEP (WLAN_A4FR_MAXLEN + 8)
++#define WLAN_A3FR_MAXLEN_WEP_FCS (WLAN_A3FR_MAXLEN_FCS + 8)
++#define WLAN_A4FR_MAXLEN_WEP_FCS (WLAN_A4FR_MAXLEN_FCS + 8)
++
++#define WLAN_BSS_TS_LEN 8
++#define WLAN_SSID_MAXLEN 32
++#define WLAN_BEACON_FR_MAXLEN (WLAN_HDR_A3_LEN + 334)
++#define WLAN_ATIM_FR_MAXLEN (WLAN_HDR_A3_LEN + 0)
++#define WLAN_DISASSOC_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
++#define WLAN_ASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 48)
++#define WLAN_ASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
++#define WLAN_REASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 54)
++#define WLAN_REASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
++#define WLAN_PROBEREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 44)
++#define WLAN_PROBERESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 78)
++#define WLAN_AUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 261)
++#define WLAN_DEAUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
++#define WLAN_CHALLENGE_IE_LEN 130
++#define WLAN_CHALLENGE_LEN 128
++#define WLAN_WEP_MAXKEYLEN 13
++#define WLAN_WEP_NKEYS 4
++
++/*--- Frame Control Field -------------------------------------*/
++/* Frame Types */
++#define WLAN_FTYPE_MGMT 0x00
++#define WLAN_FTYPE_CTL 0x01
++#define WLAN_FTYPE_DATA 0x02
++
++/* Frame subtypes */
++/* Management */
++#define WLAN_FSTYPE_ASSOCREQ 0x00
++#define WLAN_FSTYPE_ASSOCRESP 0x01
++#define WLAN_FSTYPE_REASSOCREQ 0x02
++#define WLAN_FSTYPE_REASSOCRESP 0x03
++#define WLAN_FSTYPE_PROBEREQ 0x04
++#define WLAN_FSTYPE_PROBERESP 0x05
++#define WLAN_FSTYPE_BEACON 0x08
++#define WLAN_FSTYPE_ATIM 0x09
++#define WLAN_FSTYPE_DISASSOC 0x0a
++#define WLAN_FSTYPE_AUTHEN 0x0b
++#define WLAN_FSTYPE_DEAUTHEN 0x0c
++
++/* Control */
++#define WLAN_FSTYPE_PSPOLL 0x0a
++#define WLAN_FSTYPE_RTS 0x0b
++#define WLAN_FSTYPE_CTS 0x0c
++#define WLAN_FSTYPE_ACK 0x0d
++#define WLAN_FSTYPE_CFEND 0x0e
++#define WLAN_FSTYPE_CFENDCFACK 0x0f
++
++/* Data */
++#define WLAN_FSTYPE_DATAONLY 0x00
++#define WLAN_FSTYPE_DATA_CFACK 0x01
++#define WLAN_FSTYPE_DATA_CFPOLL 0x02
++#define WLAN_FSTYPE_DATA_CFACK_CFPOLL 0x03
++#define WLAN_FSTYPE_NULL 0x04
++#define WLAN_FSTYPE_CFACK 0x05
++#define WLAN_FSTYPE_CFPOLL 0x06
++#define WLAN_FSTYPE_CFACK_CFPOLL 0x07
++
++/*--- FC Constants v. 2.0 ------------------------------------*/
++/* Each constant is defined twice: WF_CONST is in host */
++/* byteorder, WF_CONSTi is in ieee byteorder. */
++/* Usage: */
++/* printf("the frame subtype is %X", WF_FC_FTYPEi & rx.fc); */
++/* tx.fc = WF_FTYPE_CTLi | WF_FSTYPE_RTSi; */
++/*------------------------------------------------------------*/
++
++enum {
++/*--- Frame Control Field -------------------------------------*/
++/* Protocol version: always 0 for current 802.11 standards */
++IEEE16(WF_FC_PVER, 0x0003)
++IEEE16(WF_FC_FTYPE, 0x000c)
++IEEE16(WF_FC_FSTYPE, 0x00f0)
++IEEE16(WF_FC_TODS, 0x0100)
++IEEE16(WF_FC_FROMDS, 0x0200)
++IEEE16(WF_FC_FROMTODS, 0x0300)
++IEEE16(WF_FC_MOREFRAG, 0x0400)
++IEEE16(WF_FC_RETRY, 0x0800)
++/* Indicates PS mode in which STA will be after successful completion
++** of current frame exchange sequence. Always 0 for AP frames */
++IEEE16(WF_FC_PWRMGT, 0x1000)
++/* What MoreData=1 means:
++** From AP to STA in PS mode: don't sleep yet, I have more frames for you
++** From Contention-Free (CF) Pollable STA in response to a CF-Poll:
++** STA has buffered frames for transmission in response to next CF-Poll
++** Bcast/mcast frames transmitted from AP:
++** when additional bcast/mcast frames remain to be transmitted by AP
++** during this beacon interval
++** In all other cases MoreData=0 */
++IEEE16(WF_FC_MOREDATA, 0x2000)
++IEEE16(WF_FC_ISWEP, 0x4000)
++IEEE16(WF_FC_ORDER, 0x8000)
++
++/* Frame Types */
++IEEE16(WF_FTYPE_MGMT, 0x00)
++IEEE16(WF_FTYPE_CTL, 0x04)
++IEEE16(WF_FTYPE_DATA, 0x08)
++
++/* Frame subtypes */
++/* Management */
++IEEE16(WF_FSTYPE_ASSOCREQ, 0x00)
++IEEE16(WF_FSTYPE_ASSOCRESP, 0x10)
++IEEE16(WF_FSTYPE_REASSOCREQ, 0x20)
++IEEE16(WF_FSTYPE_REASSOCRESP, 0x30)
++IEEE16(WF_FSTYPE_PROBEREQ, 0x40)
++IEEE16(WF_FSTYPE_PROBERESP, 0x50)
++IEEE16(WF_FSTYPE_BEACON, 0x80)
++IEEE16(WF_FSTYPE_ATIM, 0x90)
++IEEE16(WF_FSTYPE_DISASSOC, 0xa0)
++IEEE16(WF_FSTYPE_AUTHEN, 0xb0)
++IEEE16(WF_FSTYPE_DEAUTHEN, 0xc0)
++
++/* Control */
++IEEE16(WF_FSTYPE_PSPOLL, 0xa0)
++IEEE16(WF_FSTYPE_RTS, 0xb0)
++IEEE16(WF_FSTYPE_CTS, 0xc0)
++IEEE16(WF_FSTYPE_ACK, 0xd0)
++IEEE16(WF_FSTYPE_CFEND, 0xe0)
++IEEE16(WF_FSTYPE_CFENDCFACK, 0xf0)
++
++/* Data */
++IEEE16(WF_FSTYPE_DATAONLY, 0x00)
++IEEE16(WF_FSTYPE_DATA_CFACK, 0x10)
++IEEE16(WF_FSTYPE_DATA_CFPOLL, 0x20)
++IEEE16(WF_FSTYPE_DATA_CFACK_CFPOLL, 0x30)
++IEEE16(WF_FSTYPE_NULL, 0x40)
++IEEE16(WF_FSTYPE_CFACK, 0x50)
++IEEE16(WF_FSTYPE_CFPOLL, 0x60)
++IEEE16(WF_FSTYPE_CFACK_CFPOLL, 0x70)
++};
++
++
++/***********************************************************************
++** Macros
++*/
++
++/*--- Duration Macros ----------------------------------------*/
++/* Macros to get/set the bitfields of the Duration Field */
++/* - the duration value is only valid when bit15 is zero */
++/* - the firmware handles these values, so I'm not going */
++/* to use these macros right now. */
++/*------------------------------------------------------------*/
++
++/*--- Sequence Control Macros -------------------------------*/
++/* Macros to get/set the bitfields of the Sequence Control */
++/* Field. */
++/*------------------------------------------------------------*/
++#define WLAN_GET_SEQ_FRGNUM(n) ((u16)(n) & 0x000f)
++#define WLAN_GET_SEQ_SEQNUM(n) (((u16)(n) & 0xfff0) >> 4)
++
++/*--- Data ptr macro -----------------------------------------*/
++/* Creates a u8* to the data portion of a frame */
++/* Assumes you're passing in a ptr to the beginning of the hdr*/
++/*------------------------------------------------------------*/
++#define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN)
++#define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN)
++
++
++/***********************************************************************
++** Types
++*/
++
++/* 802.11 header type
++**
++** Note the following:
++** a1 *always* is receiver's mac or bcast/mcast
++** a2 *always* is transmitter's mac, if a2 exists
++** seq: [0:3] frag#, [4:15] seq# - used for dup detection
++** (dups from retries have same seq#) */
++typedef struct wlan_hdr {
++ u16 fc;
++ u16 dur;
++ u8 a1[ETH_ALEN];
++ u8 a2[ETH_ALEN];
++ u8 a3[ETH_ALEN];
++ u16 seq;
++ u8 a4[ETH_ALEN];
++} WLAN_PACKED wlan_hdr_t;
++
++/* Separate structs for use if frame type is known */
++typedef struct wlan_hdr_a3 {
++ u16 fc;
++ u16 dur;
++ u8 a1[ETH_ALEN];
++ u8 a2[ETH_ALEN];
++ u8 a3[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED wlan_hdr_a3_t;
++
++typedef struct wlan_hdr_mgmt {
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED wlan_hdr_mgmt_t;
++
++#ifdef NOT_NEEDED_YET
++typedef struct { /* ad-hoc peer->peer (to/from DS = 0/0) */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED ibss;
++typedef struct { /* ap->sta (to/from DS = 0/1) */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED fromap;
++typedef struct { /* sta->ap (to/from DS = 1/0) */
++ u16 fc;
++ u16 dur;
++ u8 bssid[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 da[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED toap;
++typedef struct { /* wds->wds (to/from DS = 1/1), the only 4addr pkt */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++ u8 da[ETH_ALEN];
++ u16 seq;
++ u8 sa[ETH_ALEN];
++} WLAN_PACKED wds;
++typedef struct { /* all management packets */
++ u16 fc;
++ u16 dur;
++ u8 da[ETH_ALEN];
++ u8 sa[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++ u16 seq;
++} WLAN_PACKED mgmt;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++} WLAN_PACKED rts;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++} WLAN_PACKED cts;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++} WLAN_PACKED ack;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ /* NB: this one holds Assoc ID in dur field: */
++ u16 aid;
++ u8 bssid[ETH_ALEN];
++ u8 ta[ETH_ALEN];
++} WLAN_PACKED pspoll;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++} WLAN_PACKED cfend;
++typedef struct { /* has no body, just a FCS */
++ u16 fc;
++ u16 dur;
++ u8 ra[ETH_ALEN];
++ u8 bssid[ETH_ALEN];
++} WLAN_PACKED cfendcfack;
++#endif
++
++/* Prism header emulation (monitor mode) */
++typedef struct wlanitem_u32 {
++ u32 did;
++ u16 status;
++ u16 len;
++ u32 data;
++} WLAN_PACKED wlanitem_u32_t;
++#define WLANITEM_STATUS_data_ok 0
++#define WLANITEM_STATUS_no_value 1
++#define WLANITEM_STATUS_invalid_itemname 2
++#define WLANITEM_STATUS_invalid_itemdata 3
++#define WLANITEM_STATUS_missing_itemdata 4
++#define WLANITEM_STATUS_incomplete_itemdata 5
++#define WLANITEM_STATUS_invalid_msg_did 6
++#define WLANITEM_STATUS_invalid_mib_did 7
++#define WLANITEM_STATUS_missing_conv_func 8
++#define WLANITEM_STATUS_string_too_long 9
++#define WLANITEM_STATUS_data_out_of_range 10
++#define WLANITEM_STATUS_string_too_short 11
++#define WLANITEM_STATUS_missing_valid_func 12
++#define WLANITEM_STATUS_unknown 13
++#define WLANITEM_STATUS_invalid_did 14
++#define WLANITEM_STATUS_missing_print_func 15
++
++#define WLAN_DEVNAMELEN_MAX 16
++typedef struct wlansniffrm {
++ u32 msgcode;
++ u32 msglen;
++ u8 devname[WLAN_DEVNAMELEN_MAX];
++ wlanitem_u32_t hosttime;
++ wlanitem_u32_t mactime;
++ wlanitem_u32_t channel;
++ wlanitem_u32_t rssi;
++ wlanitem_u32_t sq;
++ wlanitem_u32_t signal;
++ wlanitem_u32_t noise;
++ wlanitem_u32_t rate;
++ wlanitem_u32_t istx; /* tx? 0:no 1:yes */
++ wlanitem_u32_t frmlen;
++} WLAN_PACKED wlansniffrm_t;
++#define WLANSNIFFFRM 0x0041
++#define WLANSNIFFFRM_hosttime 0x1041
++#define WLANSNIFFFRM_mactime 0x2041
++#define WLANSNIFFFRM_channel 0x3041
++#define WLANSNIFFFRM_rssi 0x4041
++#define WLANSNIFFFRM_sq 0x5041
++#define WLANSNIFFFRM_signal 0x6041
++#define WLANSNIFFFRM_noise 0x7041
++#define WLANSNIFFFRM_rate 0x8041
++#define WLANSNIFFFRM_istx 0x9041
++#define WLANSNIFFFRM_frmlen 0xA041
+Index: linux-2.6.23/drivers/net/wireless/acx/wlan_mgmt.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/acx/wlan_mgmt.h 2008-01-20 21:13:40.000000000 +0000
+@@ -0,0 +1,582 @@
++/***********************************************************************
++** Copyright (C) 2003 ACX100 Open Source Project
++**
++** The contents of this file are subject to the Mozilla Public
++** License Version 1.1 (the "License"); you may not use this file
++** except in compliance with the License. You may obtain a copy of
++** the License at http://www.mozilla.org/MPL/
++**
++** Software distributed under the License is distributed on an "AS
++** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++** implied. See the License for the specific language governing
++** rights and limitations under the License.
++**
++** Alternatively, the contents of this file may be used under the
++** terms of the GNU Public License version 2 (the "GPL"), in which
++** case the provisions of the GPL are applicable instead of the
++** above. If you wish to allow the use of your version of this file
++** only under the terms of the GPL and not to allow others to use
++** your version of this file under the MPL, indicate your decision
++** by deleting the provisions above and replace them with the notice
++** and other provisions required by the GPL. If you do not delete
++** the provisions above, a recipient may use your version of this
++** file under either the MPL or the GPL.
++** ---------------------------------------------------------------------
++** Inquiries regarding the ACX100 Open Source Project can be
++** made directly to:
++**
++** acx100-users@lists.sf.net
++** http://acx100.sf.net
++** ---------------------------------------------------------------------
++*/
++
++/***********************************************************************
++** This code is based on elements which are
++** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
++** info@linux-wlan.com
++** http://www.linux-wlan.com
++*/
++
++/***********************************************************************
++** Constants
++*/
++
++/*-- Information Element IDs --------------------*/
++#define WLAN_EID_SSID 0
++#define WLAN_EID_SUPP_RATES 1
++#define WLAN_EID_FH_PARMS 2
++#define WLAN_EID_DS_PARMS 3
++#define WLAN_EID_CF_PARMS 4
++#define WLAN_EID_TIM 5
++#define WLAN_EID_IBSS_PARMS 6
++#define WLAN_EID_COUNTRY 7 /* 802.11d */
++#define WLAN_EID_FH_HOP_PARMS 8 /* 802.11d */
++#define WLAN_EID_FH_TABLE 9 /* 802.11d */
++#define WLAN_EID_REQUEST 10 /* 802.11d */
++/*-- values 11-15 reserved --*/
++#define WLAN_EID_CHALLENGE 16
++/*-- values 17-31 reserved for challenge text extension --*/
++#define WLAN_EID_PWR_CONSTRAINT 32 /* 11h PowerConstraint */
++#define WLAN_EID_ERP_INFO 42 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_NONERP 47 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_RSN 48
++#define WLAN_EID_EXT_RATES 50
++#define WLAN_EID_UNKNOWN128 128
++#define WLAN_EID_UNKNOWN133 133
++#define WLAN_EID_GENERIC 221 /* was seen from WRT54GS with OpenWrt */
++#define WLAN_EID_UNKNOWN223 223
++
++#if 0
++#define WLAN_EID_PWR_CAP 33 /* 11h PowerCapability */
++#define WLAN_EID_TPC_REQUEST 34 /* 11h TPC Request */
++#define WLAN_EID_TPC_REPORT 35 /* 11h TPC Report */
++#define WLAN_EID_SUPP_CHANNELS 36 /* 11h Supported Channels */
++#define WLAN_EID_CHANNEL_SWITCH 37 /* 11h ChannelSwitch */
++#define WLAN_EID_MEASURE_REQUEST 38 /* 11h MeasurementRequest */
++#define WLAN_EID_MEASURE_REPORT 39 /* 11h MeasurementReport */
++#define WLAN_EID_QUIET_ID 40 /* 11h Quiet */
++#define WLAN_EID_IBSS_DFS_ID 41 /* 11h IBSS_DFS */
++#endif
++
++/*-- Reason Codes -------------------------------*/
++#define WLAN_MGMT_REASON_RSVD 0
++#define WLAN_MGMT_REASON_UNSPEC 1
++#define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2
++#define WLAN_MGMT_REASON_DEAUTH_LEAVING 3
++#define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4
++#define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5
++#define WLAN_MGMT_REASON_CLASS2_NONAUTH 6
++#define WLAN_MGMT_REASON_CLASS3_NONASSOC 7
++#define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8
++#define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9
++
++/*-- Status Codes -------------------------------*/
++#define WLAN_MGMT_STATUS_SUCCESS 0
++#define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1
++#define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10
++#define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12
++#define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13
++#define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14
++#define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15
++#define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18
++/* p80211b additions */
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOSHORT 19
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOPBCC 20
++#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOAGILITY 21
++
++/*-- Auth Algorithm Field ---------------------------*/
++#define WLAN_AUTH_ALG_OPENSYSTEM 0
++#define WLAN_AUTH_ALG_SHAREDKEY 1
++
++/*-- Management Frame Field Offsets -------------*/
++/* Note: Not all fields are listed because of variable lengths */
++/* Note: These offsets are from the start of the frame data */
++
++#define WLAN_BEACON_OFF_TS 0
++#define WLAN_BEACON_OFF_BCN_INT 8
++#define WLAN_BEACON_OFF_CAPINFO 10
++#define WLAN_BEACON_OFF_SSID 12
++
++#define WLAN_DISASSOC_OFF_REASON 0
++
++#define WLAN_ASSOCREQ_OFF_CAP_INFO 0
++#define WLAN_ASSOCREQ_OFF_LISTEN_INT 2
++#define WLAN_ASSOCREQ_OFF_SSID 4
++
++#define WLAN_ASSOCRESP_OFF_CAP_INFO 0
++#define WLAN_ASSOCRESP_OFF_STATUS 2
++#define WLAN_ASSOCRESP_OFF_AID 4
++#define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
++
++#define WLAN_REASSOCREQ_OFF_CAP_INFO 0
++#define WLAN_REASSOCREQ_OFF_LISTEN_INT 2
++#define WLAN_REASSOCREQ_OFF_CURR_AP 4
++#define WLAN_REASSOCREQ_OFF_SSID 10
++
++#define WLAN_REASSOCRESP_OFF_CAP_INFO 0
++#define WLAN_REASSOCRESP_OFF_STATUS 2
++#define WLAN_REASSOCRESP_OFF_AID 4
++#define WLAN_REASSOCRESP_OFF_SUPP_RATES 6
++
++#define WLAN_PROBEREQ_OFF_SSID 0
++
++#define WLAN_PROBERESP_OFF_TS 0
++#define WLAN_PROBERESP_OFF_BCN_INT 8
++#define WLAN_PROBERESP_OFF_CAP_INFO 10
++#define WLAN_PROBERESP_OFF_SSID 12
++
++#define WLAN_AUTHEN_OFF_AUTH_ALG 0
++#define WLAN_AUTHEN_OFF_AUTH_SEQ 2
++#define WLAN_AUTHEN_OFF_STATUS 4
++#define WLAN_AUTHEN_OFF_CHALLENGE 6
++
++#define WLAN_DEAUTHEN_OFF_REASON 0
++
++enum {
++IEEE16(WF_MGMT_CAP_ESS, 0x0001)
++IEEE16(WF_MGMT_CAP_IBSS, 0x0002)
++/* In (re)assoc request frames by STA:
++** Pollable=0, PollReq=0: STA is not CF-Pollable
++** 0 1: STA is CF-Pollable, not requesting to be placed on the CF-Polling list
++** 1 0: STA is CF-Pollable, requesting to be placed on the CF-Polling list
++** 1 1: STA is CF-Pollable, requesting never to be polled
++** In beacon, proberesp, (re)assoc resp frames by AP:
++** 0 0: No point coordinator at AP
++** 0 1: Point coordinator at AP for delivery only (no polling)
++** 1 0: Point coordinator at AP for delivery and polling
++** 1 1: Reserved */
++IEEE16(WF_MGMT_CAP_CFPOLLABLE, 0x0004)
++IEEE16(WF_MGMT_CAP_CFPOLLREQ, 0x0008)
++/* 1=non-WEP data frames are disallowed */
++IEEE16(WF_MGMT_CAP_PRIVACY, 0x0010)
++/* In beacon, proberesp, (re)assocresp by AP/AdHoc:
++** 1=use of shortpre is allowed ("I can receive shortpre") */
++IEEE16(WF_MGMT_CAP_SHORT, 0x0020)
++IEEE16(WF_MGMT_CAP_PBCC, 0x0040)
++IEEE16(WF_MGMT_CAP_AGILITY, 0x0080)
++/* In (re)assoc request frames by STA:
++** 1=short slot time implemented and enabled
++** NB: AP shall use long slot time beginning at the next Beacon after assoc
++** of STA with this bit set to 0
++** In beacon, proberesp, (re)assoc resp frames by AP:
++** currently used slot time value: 0/1 - long/short */
++IEEE16(WF_MGMT_CAP_SHORTSLOT, 0x0400)
++/* In (re)assoc request frames by STA: 1=CCK-OFDM is implemented and enabled
++** In beacon, proberesp, (re)assoc resp frames by AP/AdHoc:
++** 1=CCK-OFDM is allowed */
++IEEE16(WF_MGMT_CAP_CCKOFDM, 0x2000)
++};
++
++
++/***********************************************************************
++** Types
++*/
++
++/* Information Element types */
++
++/* prototype structure, all IEs start with these members */
++typedef struct wlan_ie {
++ u8 eid;
++ u8 len;
++} WLAN_PACKED wlan_ie_t;
++
++/*-- Service Set Identity (SSID) -----------------*/
++typedef struct wlan_ie_ssid {
++ u8 eid;
++ u8 len;
++ u8 ssid[1]; /* may be zero */
++} WLAN_PACKED wlan_ie_ssid_t;
++
++/*-- Supported Rates -----------------------------*/
++typedef struct wlan_ie_supp_rates {
++ u8 eid;
++ u8 len;
++ u8 rates[1]; /* had better be at LEAST one! */
++} WLAN_PACKED wlan_ie_supp_rates_t;
++
++/*-- FH Parameter Set ----------------------------*/
++typedef struct wlan_ie_fh_parms {
++ u8 eid;
++ u8 len;
++ u16 dwell;
++ u8 hopset;
++ u8 hoppattern;
++ u8 hopindex;
++} WLAN_PACKED wlan_ie_fh_parms_t;
++
++/*-- DS Parameter Set ----------------------------*/
++typedef struct wlan_ie_ds_parms {
++ u8 eid;
++ u8 len;
++ u8 curr_ch;
++} WLAN_PACKED wlan_ie_ds_parms_t;
++
++/*-- CF Parameter Set ----------------------------*/
++typedef struct wlan_ie_cf_parms {
++ u8 eid;
++ u8 len;
++ u8 cfp_cnt;
++ u8 cfp_period;
++ u16 cfp_maxdur;
++ u16 cfp_durremaining;
++} WLAN_PACKED wlan_ie_cf_parms_t;
++
++/*-- TIM ------------------------------------------*/
++typedef struct wlan_ie_tim {
++ u8 eid;
++ u8 len;
++ u8 dtim_cnt;
++ u8 dtim_period;
++ u8 bitmap_ctl;
++ u8 virt_bm[1];
++} WLAN_PACKED wlan_ie_tim_t;
++
++/*-- IBSS Parameter Set ---------------------------*/
++typedef struct wlan_ie_ibss_parms {
++ u8 eid;
++ u8 len;
++ u16 atim_win;
++} WLAN_PACKED wlan_ie_ibss_parms_t;
++
++/*-- Challenge Text ------------------------------*/
++typedef struct wlan_ie_challenge {
++ u8 eid;
++ u8 len;
++ u8 challenge[1];
++} WLAN_PACKED wlan_ie_challenge_t;
++
++/*-- ERP (42) -------------------------------------*/
++typedef struct wlan_ie_erp {
++ u8 eid;
++ u8 len;
++ /* bit 0:Non ERP present
++ ** 1:Use Protection
++ ** 2:Barker Preamble mode
++ ** 3-7:reserved */
++ u8 erp;
++} WLAN_PACKED wlan_ie_erp_t;
++
++/* Types for parsing mgmt frames */
++
++/* prototype structure, all mgmt frame types will start with these members */
++typedef struct wlan_fr_mgmt {
++ u16 type;
++ u16 len; /* DOES NOT include FCS */
++ wlan_hdr_t *hdr;
++ /* used for target specific data, skb in Linux */
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++} WLAN_PACKED wlan_fr_mgmt_t;
++
++/*-- Beacon ---------------------------------------*/
++typedef struct wlan_fr_beacon {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u64 *ts;
++ u16 *bcn_int;
++ u16 *cap_info;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++ wlan_ie_fh_parms_t *fh_parms;
++ wlan_ie_ds_parms_t *ds_parms;
++ wlan_ie_cf_parms_t *cf_parms;
++ wlan_ie_ibss_parms_t *ibss_parms;
++ wlan_ie_tim_t *tim; /* in beacon only, not proberesp */
++ wlan_ie_erp_t *erp; /* in beacon only, not proberesp */
++} wlan_fr_beacon_t;
++#define wlan_fr_proberesp wlan_fr_beacon
++#define wlan_fr_proberesp_t wlan_fr_beacon_t
++
++/*-- IBSS ATIM ------------------------------------*/
++typedef struct wlan_fr_ibssatim {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++ /* this frame type has a null body */
++} wlan_fr_ibssatim_t;
++
++/*-- Disassociation -------------------------------*/
++typedef struct wlan_fr_disassoc {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *reason;
++ /*-- info elements ----------*/
++} wlan_fr_disassoc_t;
++
++/*-- Association Request --------------------------*/
++typedef struct wlan_fr_assocreq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *listen_int;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_assocreq_t;
++
++/*-- Association Response -------------------------*/
++typedef struct wlan_fr_assocresp {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *status;
++ u16 *aid;
++ /*-- info elements ----------*/
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_assocresp_t;
++
++/*-- Reassociation Request ------------------------*/
++typedef struct wlan_fr_reassocreq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *listen_int;
++ u8 *curr_ap;
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_reassocreq_t;
++
++/*-- Reassociation Response -----------------------*/
++typedef struct wlan_fr_reassocresp {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *cap_info;
++ u16 *status;
++ u16 *aid;
++ /*-- info elements ----------*/
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_reassocresp_t;
++
++/*-- Probe Request --------------------------------*/
++typedef struct wlan_fr_probereq {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ /*-- info elements ----------*/
++ wlan_ie_ssid_t *ssid;
++ wlan_ie_supp_rates_t *supp_rates;
++ wlan_ie_supp_rates_t *ext_rates;
++} wlan_fr_probereq_t;
++
++/*-- Authentication -------------------------------*/
++typedef struct wlan_fr_authen {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *auth_alg;
++ u16 *auth_seq;
++ u16 *status;
++ /*-- info elements ----------*/
++ wlan_ie_challenge_t *challenge;
++} wlan_fr_authen_t;
++
++/*-- Deauthenication -----------------------------*/
++typedef struct wlan_fr_deauthen {
++ u16 type;
++ u16 len;
++ wlan_hdr_t *hdr;
++ /*-- fixed fields -----------*/
++ u16 *reason;
++ /*-- info elements ----------*/
++} wlan_fr_deauthen_t;
++
++/* Types for building mgmt frames */
++
++/* Warning. Several types used in below structs are
++** in fact variable length. Use structs with such fields with caution */
++typedef struct auth_frame_body {
++ u16 auth_alg;
++ u16 auth_seq;
++ u16 status;
++ wlan_ie_challenge_t challenge;
++} WLAN_PACKED auth_frame_body_t;
++
++typedef struct assocresp_frame_body {
++ u16 cap_info;
++ u16 status;
++ u16 aid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED assocresp_frame_body_t;
++
++typedef struct reassocreq_frame_body {
++ u16 cap_info;
++ u16 listen_int;
++ u8 current_ap[ETH_ALEN];
++ wlan_ie_ssid_t ssid;
++/* access to this one is disabled since ssid_t is variable length: */
++ /* wlan_ie_supp_rates_t rates; */
++} WLAN_PACKED reassocreq_frame_body_t;
++
++typedef struct reassocresp_frame_body {
++ u16 cap_info;
++ u16 status;
++ u16 aid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED reassocresp_frame_body_t;
++
++typedef struct deauthen_frame_body {
++ u16 reason;
++} WLAN_PACKED deauthen_frame_body_t;
++
++typedef struct disassoc_frame_body {
++ u16 reason;
++} WLAN_PACKED disassoc_frame_body_t;
++
++typedef struct probereq_frame_body {
++ wlan_ie_ssid_t ssid;
++ wlan_ie_supp_rates_t rates;
++} WLAN_PACKED probereq_frame_body_t;
++
++typedef struct proberesp_frame_body {
++ u8 timestamp[8];
++ u16 beacon_int;
++ u16 cap_info;
++ wlan_ie_ssid_t ssid;
++/* access to these is disabled since ssid_t is variable length: */
++ /* wlan_ie_supp_rates_t rates; */
++ /* fhps_t fhps; */
++ /* dsps_t dsps; */
++ /* cfps_t cfps; */
++} WLAN_PACKED proberesp_frame_body_t;
++
++
++/***********************************************************************
++** Functions
++*/
++
++/* Helpers for parsing mgmt frames */
++void wlan_mgmt_decode_ibssatim(wlan_fr_ibssatim_t *f);
++void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
++void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
++void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
++void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
++void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
++void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
++void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
++void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
++void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
++void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
++
++/* Helpers for building mgmt frames */
++static inline u8*
++wlan_fill_ie_ssid(u8 *p, int len, const char *ssid)
++{
++ struct wlan_ie_ssid *ie = (void*)p;
++ ie->eid = WLAN_EID_SSID;
++ ie->len = len;
++ memcpy(ie->ssid, ssid, len);
++ return p + len + 2;
++}
++/* This controls whether we create 802.11g 'ext supported rates' IEs
++** or just create overlong 'supported rates' IEs instead
++** (non-11g compliant) */
++#define WE_OBEY_802_11G 1
++static inline u8*
++wlan_fill_ie_rates(u8 *p, int len, const u8 *rates)
++{
++ struct wlan_ie_supp_rates *ie = (void*)p;
++#if WE_OBEY_802_11G
++ if (len > 8 ) len = 8;
++#endif
++ /* supported rates (1 to 8 octets) */
++ ie->eid = WLAN_EID_SUPP_RATES;
++ ie->len = len;
++ memcpy(ie->rates, rates, len);
++ return p + len + 2;
++}
++/* This one wouldn't create an IE at all if not needed */
++static inline u8*
++wlan_fill_ie_rates_ext(u8 *p, int len, const u8 *rates)
++{
++ struct wlan_ie_supp_rates *ie = (void*)p;
++#if !WE_OBEY_802_11G
++ return p;
++#endif
++ len -= 8;
++ if (len <= 0) return p;
++ /* ext supported rates */
++ ie->eid = WLAN_EID_EXT_RATES;
++ ie->len = len;
++ memcpy(ie->rates, rates+8, len);
++ return p + len + 2;
++}
++static inline u8*
++wlan_fill_ie_ds_parms(u8 *p, int channel)
++{
++ struct wlan_ie_ds_parms *ie = (void*)p;
++ ie->eid = WLAN_EID_DS_PARMS;
++ ie->len = 1;
++ ie->curr_ch = channel;
++ return p + sizeof(*ie);
++}
++static inline u8*
++wlan_fill_ie_ibss_parms(u8 *p, int atim_win)
++{
++ struct wlan_ie_ibss_parms *ie = (void*)p;
++ ie->eid = WLAN_EID_IBSS_PARMS;
++ ie->len = 2;
++ ie->atim_win = atim_win;
++ return p + sizeof(*ie);
++}
++static inline u8*
++wlan_fill_ie_tim(u8 *p, int rem, int period, int bcast,
++ int ofs, int len, const u8 *vbm)
++{
++ struct wlan_ie_tim *ie = (void*)p;
++ ie->eid = WLAN_EID_TIM;
++ ie->len = len + 3;
++ ie->dtim_cnt = rem;
++ ie->dtim_period = period;
++ ie->bitmap_ctl = ofs | (bcast!=0);
++ if (vbm)
++ memcpy(ie->virt_bm, vbm, len); /* min 1 byte */
++ else
++ ie->virt_bm[0] = 0;
++ return p + len + 3 + 2;
++}
+Index: linux-2.6.23/drivers/net/wireless/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/net/wireless/Kconfig 2008-01-20 21:13:17.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/Kconfig 2008-01-20 21:15:12.000000000 +0000
+@@ -5,6 +5,36 @@
+ menu "Wireless LAN"
+ depends on !S390
+
++config NET_RADIO
++ bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
++ select WIRELESS_EXT
++ ---help---
++ Support for wireless LANs and everything having to do with radio,
++ but not with amateur radio or FM broadcasting.
++
++ Saying Y here also enables the Wireless Extensions (creates
++ /proc/net/wireless and enables iwconfig access). The Wireless
++ Extension is a generic API allowing a driver to expose to the user
++ space configuration and statistics specific to common Wireless LANs.
++ The beauty of it is that a single set of tool can support all the
++ variations of Wireless LANs, regardless of their type (as long as
++ the driver supports Wireless Extension). Another advantage is that
++ these parameters may be changed on the fly without restarting the
++ driver (or Linux). If you wish to use Wireless Extensions with
++ wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch
++ the tools from
++ <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
++
++config NET_WIRELESS_RTNETLINK
++ bool "Wireless Extension API over RtNetlink"
++ depends on NET_RADIO
++ ---help---
++ Support the Wireless Extension API over the RtNetlink socket
++ in addition to the traditional ioctl interface (selected above).
++
++ For now, few tools use this facility, but it might grow in the
++ future. The only downside is that it adds 4.5 kB to your kernel.
++
+ config WLAN_PRE80211
+ bool "Wireless LAN (pre-802.11)"
+ depends on NETDEVICES
+@@ -650,6 +680,7 @@ config P54_PCI
+
+ source "drivers/net/wireless/iwlwifi/Kconfig"
+ source "drivers/net/wireless/hostap/Kconfig"
++source "drivers/net/wireless/acx/Kconfig"
+ source "drivers/net/wireless/bcm43xx/Kconfig"
+ source "drivers/net/wireless/b43/Kconfig"
+ source "drivers/net/wireless/b43legacy/Kconfig"
+Index: linux-2.6.23/drivers/net/wireless/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/net/wireless/Makefile 2008-01-20 21:13:17.000000000 +0000
++++ linux-2.6.23/drivers/net/wireless/Makefile 2008-01-20 21:13:40.000000000 +0000
+@@ -34,6 +34,8 @@ obj-$(CONFIG_PCMCIA_ATMEL) += atmel
+
+ obj-$(CONFIG_PRISM54) += prism54/
+
++obj-$(CONFIG_ACX) += acx/
++
+ obj-$(CONFIG_HOSTAP) += hostap/
+ obj-$(CONFIG_BCM43XX) += bcm43xx/
+ obj-$(CONFIG_B43) += b43/
diff --git a/recipes/linux/linux-kexecboot-2.6.26/htcuni.patch b/recipes/linux/linux-kexecboot-2.6.26/htcuni.patch
new file mode 100644
index 0000000000..783f55b064
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/htcuni.patch
@@ -0,0 +1,7899 @@
+---
+ arch/arm/Kconfig | 2
+ arch/arm/mach-pxa/Kconfig | 89 +
+ arch/arm/mach-pxa/Makefile | 1
+ arch/arm/mach-pxa/generic.c | 13
+ arch/arm/mach-pxa/htcuniversal/Makefile | 19
+ arch/arm/mach-pxa/htcuniversal/htcuniversal.c | 468 +++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c | 917 +++++++++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h | 65
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c | 143 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c | 61
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c | 135 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h | 17
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c | 87 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c | 226 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c | 212 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c | 167 ++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h | 16
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c | 69
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c | 97 +
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c | 490 ++++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c | 71
+ arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h | 20
+ drivers/input/keyboard/Kconfig | 7
+ drivers/input/keyboard/Makefile | 1
+ drivers/input/keyboard/asic3_keys.c | 131 +
+ drivers/leds/Kconfig | 7
+ drivers/leds/Makefile | 1
+ drivers/leds/leds-asic3.c | 189 ++
+ drivers/mfd/Kconfig | 10
+ drivers/mfd/Makefile | 2
+ drivers/mfd/asic3_base.c | 1208 +++++++++++++++
+ drivers/mfd/soc-core.c | 106 +
+ drivers/mfd/soc-core.h | 30
+ drivers/mmc/host/Kconfig | 6
+ drivers/mmc/host/Makefile | 1
+ drivers/mmc/host/asic3_mmc.c | 900 +++++++++++
+ drivers/mmc/host/asic3_mmc.h | 25
+ drivers/serial/pxa.c | 22
+ include/asm-arm/arch-pxa/clock.h | 27
+ include/asm-arm/arch-pxa/htcuniversal-asic.h | 213 ++
+ include/asm-arm/arch-pxa/htcuniversal-gpio.h | 220 ++
+ include/asm-arm/arch-pxa/htcuniversal-init.h | 14
+ include/asm-arm/arch-pxa/htcuniversal.h | 3
+ include/asm-arm/arch-pxa/irqs.h | 2
+ include/asm-arm/arch-pxa/pxa-pm_ll.h | 6
+ include/asm-arm/arch-pxa/pxa-regs.h | 2
+ include/asm-arm/arch-pxa/serial.h | 78
+ include/asm-arm/hardware/asic3_keys.h | 18
+ include/asm-arm/hardware/asic3_leds.h | 34
+ include/asm-arm/hardware/ipaq-asic3.h | 602 +++++++
+ include/linux/backlight.h | 7
+ include/linux/gpiodev.h | 44
+ include/linux/input_pda.h | 47
+ include/linux/ioport.h | 1
+ include/linux/soc/asic3_base.h | 104 +
+ include/linux/soc/tmio_mmc.h | 17
+ 56 files changed, 7469 insertions(+), 1 deletion(-)
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,19 @@
++#
++# Makefile for HTC Universal
++#
++
++snd-htcuniversal-ak4641-objs := htcuniversal_ak4641.o
++
++obj-$(CONFIG_MACH_HTCUNIVERSAL) += htcuniversal.o
++obj-$(CONFIG_HTCUNIVERSAL_CORE) += htcuniversal_core.o
++obj-$(CONFIG_HTCUNIVERSAL_POWER) += htcuniversal_power2.o
++obj-$(CONFIG_HTCUNIVERSAL_LCD) += htcuniversal_lcd.o
++obj-$(CONFIG_HTCUNIVERSAL_BACKLIGHT) += htcuniversal_bl.o
++obj-$(CONFIG_HTCUNIVERSAL_TS2) += htcuniversal_ts2.o
++obj-$(CONFIG_HTCUNIVERSAL_BUTTONS) += htcuniversal_buttons.o
++obj-$(CONFIG_HTCUNIVERSAL_BLUETOOTH) += htcuniversal_bt.o
++obj-$(CONFIG_HTCUNIVERSAL_PHONE) += htcuniversal_phone.o
++obj-$(CONFIG_HTCUNIVERSAL_ASIC3_LEDS) += htcuniversal_asic3_leds.o
++obj-$(CONFIG_HTCUNIVERSAL_UDC) += htcuniversal_udc.o
++
++obj-$(CONFIG_HTCUNIVERSAL_AK4641) += htcuniversal_ak4641.o
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,468 @@
++/*
++ * Hardware definitions for HTC Universal
++ *
++ * Copyright (c) 2006 Oleg Gusev
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/input.h>
++#include <linux/gpio_keys.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/setup.h>
++
++#include <asm/mach/irq.h>
++#include <asm/mach/arch.h>
++
++#include <asm/arch/bitfield.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/serial.h>
++#include <asm/arch/pxa27x_keyboard.h>
++#include <asm/arch/pxafb.h>
++#include <asm/arch/irda.h>
++#include <asm/arch/ohci.h>
++
++#include <asm/arch/htcuniversal.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-init.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++
++#include "../generic.h"
++
++#include "htcuniversal_bt.h"
++#include "htcuniversal_phone.h"
++#include "tsc2046_ts.h"
++
++/*
++ * IRDA
++ */
++
++static void htcuniversal_irda_transceiver_mode(struct device *dev, int mode)
++{
++ /* */
++}
++
++static struct pxaficp_platform_data htcuniversal_ficp_platform_data = {
++ .transceiver_cap = IR_SIRMODE | IR_FIRMODE,
++ .transceiver_mode = htcuniversal_irda_transceiver_mode,
++};
++
++/*
++ * Bluetooth - Relies on other loadable modules, like ASIC3 and Core,
++ * so make the calls indirectly through pointers. Requires that the
++ * htcuniversal_bt module be loaded before any attempt to use
++ * bluetooth (obviously).
++ */
++
++static struct htcuniversal_bt_funcs bt_funcs;
++
++static void
++htcuniversal_bt_configure( int state )
++{
++ if (bt_funcs.configure != NULL)
++ bt_funcs.configure( state );
++}
++
++static struct htcuniversal_phone_funcs phone_funcs;
++
++static void
++htcuniversal_phone_configure( int state )
++{
++ if (phone_funcs.configure != NULL)
++ phone_funcs.configure( state );
++}
++
++//void htcuniversal_ll_pm_init(void);
++
++extern struct platform_device htcuniversal_bl;
++static struct platform_device htcuniversal_lcd = { .name = "htcuniversal_lcd", };
++//static struct platform_device htcuniversal_kbd = { .name = "htcuniversal_kbd", };
++static struct platform_device htcuniversal_buttons = { .name = "htcuniversal_buttons", };
++//static struct platform_device htcuniversal_ts = { .name = "htcuniversal_ts", };
++//static struct platform_device htcuniversal_bt = { .name = "htcuniversal_bt", };
++//static struct platform_device htcuniversal_phone = { .name = "htcuniversal_phone", };
++static struct platform_device htcuniversal_power = { .name = "htcuniversal_power", };
++static struct platform_device htcuniversal_udc = { .name = "htcuniversal_udc", };
++
++static struct tsc2046_mach_info htcuniversal_ts_platform_data = {
++ .port = 1,
++ .clock = CKEN_SSP1,
++ .pwrbit_X = 1,
++ .pwrbit_Y = 1,
++ .irq = 0 /* asic3 irq */
++};
++
++static struct platform_device htcuniversal_ts = {
++ .name = "htcuniversal_ts",
++ .dev = {
++ .platform_data = &htcuniversal_ts_platform_data,
++ },
++};
++
++
++/* Bluetooth */
++
++static struct platform_device htcuniversal_bt = {
++ .name = "htcuniversal_bt",
++ .id = -1,
++ .dev = {
++ .platform_data = &bt_funcs,
++ },
++};
++
++static struct platform_device htcuniversal_phone = {
++ .name = "htcuniversal_phone",
++ .id = -1,
++ .dev = {
++ .platform_data = &phone_funcs,
++ },
++};
++
++/* PXA2xx Keys */
++
++static struct gpio_keys_button htcuniversal_button_table[] = {
++ { KEY_POWER, GPIO_NR_HTCUNIVERSAL_KEY_ON_N, 1 },
++};
++
++static struct gpio_keys_platform_data htcuniversal_pxa_keys_data = {
++ .buttons = htcuniversal_button_table,
++ .nbuttons = ARRAY_SIZE(htcuniversal_button_table),
++};
++
++static struct platform_device htcuniversal_pxa_keys = {
++ .name = "gpio-keys",
++ .dev = {
++ .platform_data = &htcuniversal_pxa_keys_data,
++ },
++ .id = -1,
++};
++
++/****************************************************************
++ * Keyboard
++ ****************************************************************/
++
++static struct pxa27x_keyboard_platform_data htcuniversal_kbd = {
++ .nr_rows = 8,
++ .nr_cols = 8,
++ .keycodes = {
++ {
++ /* row 0 */
++ KEY_ENTER,
++ KEY_MINUS,
++ KEY_ESC,
++ KEY_1,
++ KEY_TAB,
++ KEY_CAPSLOCK,
++ KEY_LEFTSHIFT,
++ KEY_RIGHTALT, /* Fn */
++ }, { /* row 1 */
++ KEY_COMMA,
++ KEY_EQUAL,
++ KEY_F1,
++ KEY_2,
++ KEY_Q,
++ KEY_A,
++ KEY_Z,
++ KEY_LEFTCTRL,
++ }, { /* row 2 */
++ KEY_UP,
++ KEY_I,
++ KEY_F2,
++ KEY_3,
++ KEY_W,
++ KEY_S,
++ KEY_X,
++ KEY_F6,
++ }, { /* row 3 */
++ KEY_DOT,
++ KEY_O,
++ KEY_F3,
++ KEY_4,
++ KEY_E,
++ KEY_D,
++ KEY_C,
++ KEY_LEFTALT,
++ }, { /* row 4 */
++ KEY_F9,
++ KEY_P,
++ KEY_F4,
++ KEY_5,
++ KEY_R,
++ KEY_F,
++ KEY_V,
++ KEY_SPACE,
++ }, { /* row 5 */
++ KEY_RIGHT,
++ KEY_BACKSPACE,
++ KEY_F5,
++ KEY_6,
++ KEY_T,
++ KEY_G,
++ KEY_B,
++ KEY_F7,
++ }, { /* row 6 */
++ KEY_F9,
++ KEY_K,
++ KEY_9,
++ KEY_7,
++ KEY_Y,
++ KEY_H,
++ KEY_N,
++ KEY_LEFT,
++ }, { /* row 7 */
++ KEY_F10,
++ KEY_L,
++ KEY_0,
++ KEY_8,
++ KEY_U,
++ KEY_J,
++ KEY_M,
++ KEY_DOWN,
++ },
++ },
++ .gpio_modes = {
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN0_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN1_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN2_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN3_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN4_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN5_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN6_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKIN7_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT0_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT1_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT2_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT3_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT4_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT5_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT6_MD,
++ GPIO_NR_HTCUNIVERSAL_KP_MKOUT7_MD,
++ },
++};
++
++static struct platform_device htcuniversal_pxa_keyboard = {
++ .name = "pxa27x-keyboard",
++ .id = -1,
++ .dev = {
++ .platform_data = &htcuniversal_kbd,
++ },
++};
++/* Core Hardware Functions */
++
++struct platform_device htcuniversal_core = {
++ .name = "htcuniversal_core",
++ .id = 0,
++ .dev = {
++ .platform_data = NULL,
++ },
++};
++
++static struct platform_device *devices[] __initdata = {
++ &htcuniversal_core,
++// &htcuniversal_flash,
++ &htcuniversal_pxa_keyboard,
++ &htcuniversal_pxa_keys,
++};
++
++static struct platform_device *htcuniversal_asic3_devices[] __initdata = {
++ &htcuniversal_lcd,
++#ifdef CONFIG_HTCUNIVERSAL_BACKLIGHT
++ &htcuniversal_bl,
++#endif
++ &htcuniversal_buttons,
++ &htcuniversal_ts,
++ &htcuniversal_bt,
++ &htcuniversal_phone,
++ &htcuniversal_power,
++ &htcuniversal_udc,
++};
++
++static struct asic3_platform_data htcuniversal_asic3_platform_data = {
++
++ /* Setting ASIC3 GPIO registers to the below initialization states
++ * HTC Universal asic3 information:
++ * http://wiki.xda-developers.com/index.php?pagename=UniversalASIC3
++ * http://wiki.xda-developers.com/index.php?pagename=ASIC3
++ *
++ * dir: Direction of the GPIO pin. 0: input, 1: output.
++ * If unknown, set as output to avoid power consuming floating input nodes
++ * init: Initial state of the GPIO bits
++ *
++ * These registers are configured as they are on Wince.
++ */
++ .gpio_a = {
++ .dir = (1<<GPIOA_LCD_PWR5_ON) |
++ (1<<GPIOA_FLASHLIGHT) |
++ (1<<GPIOA_UNKNOWN9) |
++ (1<<GPIOA_SPK_PWR2_ON) |
++ (1<<GPIOA_UNKNOWN4) |
++ (1<<GPIOA_EARPHONE_PWR_ON)|
++ (1<<GPIOA_AUDIO_PWR_ON) |
++ (1<<GPIOA_SPK_PWR1_ON) |
++ (1<<GPIOA_I2C_EN),
++ .init = (1<<GPIOA_LCD_PWR5_ON) |
++ (1<<GPIOA_I2C_EN),
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x000c,
++ },
++ .gpio_b = {
++ .dir = 0xc142,
++ .init = 0x8842, // TODO: 0x0900
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x000c,
++ },
++ .gpio_c = {
++ .dir = 0xc7e7,
++ .init = 0xc6e0, // TODO: 0x8000
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0007, // GPIOC_LED_RED | GPIOC_LED_GREEN | GPIOC_LED_BLUE
++ .sleep_conf = 0x000c,
++ },
++ .gpio_d = {
++ .dir = 0xffc0,
++ .init = 0x7840, // TODO: 0x0000
++ .sleep_out = 0x0000,
++ .batt_fault_out = 0x0000,
++ .alt_function = 0x0000,
++ .sleep_conf = 0x0008,
++ },
++ .bus_shift = 1,
++ .irq_base = HTCUNIVERSAL_ASIC3_IRQ_BASE,
++
++ .child_platform_devs = htcuniversal_asic3_devices,
++ .num_child_platform_devs = ARRAY_SIZE(htcuniversal_asic3_devices),
++};
++
++static struct resource htcuniversal_asic3_resources[] = {
++ [0] = {
++ .start = HTCUNIVERSAL_ASIC3_GPIO_PHYS,
++ .end = HTCUNIVERSAL_ASIC3_GPIO_PHYS + IPAQ_ASIC3_MAP_SIZE,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = HTCUNIVERSAL_IRQ(ASIC3_EXT_INT),
++ .end = HTCUNIVERSAL_IRQ(ASIC3_EXT_INT),
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = HTCUNIVERSAL_ASIC3_MMC_PHYS,
++ .end = HTCUNIVERSAL_ASIC3_MMC_PHYS + IPAQ_ASIC3_MAP_SIZE,
++ .flags = IORESOURCE_MEM,
++ },
++ [3] = {
++ .start = HTCUNIVERSAL_IRQ(ASIC3_SDIO_INT_N),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device htcuniversal_asic3 = {
++ .name = "asic3",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(htcuniversal_asic3_resources),
++ .resource = htcuniversal_asic3_resources,
++ .dev = { .platform_data = &htcuniversal_asic3_platform_data, },
++};
++EXPORT_SYMBOL(htcuniversal_asic3);
++
++static struct pxafb_mode_info htcuniversal_lcd_modes[] = {
++{
++ .pixclock = 96153,
++ .xres = 480,
++ .yres = 640,
++ .bpp = 16,
++ .hsync_len = 4,
++ .vsync_len = 1,
++ .left_margin = 20,
++ .right_margin = 8,
++ .upper_margin = 7,
++ .lower_margin = 8,
++
++// .sync = FB_SYNC_HOR_LOW_ACT|FB_SYNC_VERT_LOW_ACT,
++
++},
++};
++
++static struct pxafb_mach_info sony_acx526akm = {
++ .modes = htcuniversal_lcd_modes,
++ .num_modes = ARRAY_SIZE(htcuniversal_lcd_modes),
++
++ /* fixme: use constants defined in pxafb.h */
++ .lccr0 = 0x00000080,
++ .lccr3 = 0x00400000,
++// .lccr4 = 0x80000000,
++};
++
++static void __init htcuniversal_init_irq(void)
++{
++ pxa27x_init_irq();
++}
++
++static struct platform_pxa_serial_funcs htcuniversal_pxa_bt_funcs = {
++ .configure = htcuniversal_bt_configure,
++};
++static struct platform_pxa_serial_funcs htcuniversal_pxa_phone_funcs = {
++ .configure = htcuniversal_phone_configure,
++};
++
++/* USB OHCI */
++
++static int htcuniversal_ohci_init(struct device *dev)
++{
++ /* missing GPIO setup here */
++
++ /* got the value from wince */
++ UHCHR=UHCHR_CGR;
++
++ return 0;
++}
++
++static struct pxaohci_platform_data htcuniversal_ohci_platform_data = {
++ .port_mode = PMM_PERPORT_MODE,
++ .init = htcuniversal_ohci_init,
++};
++
++static void __init htcuniversal_map_io(void)
++{
++ pxa_map_io();
++
++ pxa_set_btuart_info(&htcuniversal_pxa_bt_funcs);
++ pxa_set_ffuart_info(&htcuniversal_pxa_phone_funcs);
++}
++
++static void __init htcuniversal_init(void)
++{
++ set_pxa_fb_info(&sony_acx526akm);
++
++ platform_device_register(&htcuniversal_asic3);
++ platform_add_devices(devices, ARRAY_SIZE(devices) );
++ pxa_set_ficp_info(&htcuniversal_ficp_platform_data);
++ pxa_set_ohci_info(&htcuniversal_ohci_platform_data);
++}
++
++MACHINE_START(HTCUNIVERSAL, "HTC Universal")
++ /* Maintainer xanadux.org */
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .boot_params = 0xa0000100,
++ .map_io = htcuniversal_map_io,
++ .init_irq = htcuniversal_init_irq,
++ .init_machine = htcuniversal_init,
++ .timer = &pxa_timer,
++MACHINE_END
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,917 @@
++/*
++ * Audio support for codec Asahi Kasei AK4641
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Copyright (c) 2006 Giorgio Padrin <giorgio@mandarinlogiq.org>
++ *
++ * History:
++ *
++ * 2006-03 Written -- Giorgio Padrin
++ * 2006-09 Test and debug on machine (HP hx4700) -- Elshin Roman <roxmail@list.ru>
++ *
++ * AK4641 codec device driver
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * Based on code:
++ * Copyright (c) 2002 Hewlett-Packard Company
++ * Copyright (c) 2000 Nicolas Pitre <nico@cam.org>
++ * Copyright (c) 2000 Lernout & Hauspie Speech Products, N.V.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License.
++ */
++
++#include <sound/driver.h>
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/string.h>
++#include <linux/slab.h>
++#include <linux/errno.h>
++#include <linux/ioctl.h>
++#include <linux/delay.h>
++#include <linux/i2c.h>
++
++#include <sound/core.h>
++#include <sound/control.h>
++#include <sound/initval.h>
++#include <sound/info.h>
++
++#include "htcuniversal_ak4641.h"
++
++/* Registers */
++#define R_PM1 0x00
++#define R_PM2 0x01
++#define R_SEL1 0x02
++#define R_SEL2 0x03
++#define R_MODE1 0x04
++#define R_MODE2 0x05
++#define R_DAC 0x06
++#define R_MIC 0x07
++#define REG_TIMER 0x08
++#define REG_ALC1 0x09
++#define REG_ALC2 0x0a
++#define R_PGA 0x0b
++#define R_ATTL 0x0c
++#define R_ATTR 0x0d
++#define REG_VOL 0x0e
++#define R_STATUS 0x0f
++#define REG_EQLO 0x10
++#define REG_EQMID 0x11
++#define REG_EQHI 0x12
++#define REG_BTIF 0x13
++
++/* Register flags */
++/* REG_PWR1 */
++#define R_PM1_PMADC 0x01
++#define R_PM1_PMMIC 0x02
++#define REG_PWR1_PMAUX 0x04
++#define REG_PWR1_PMMO 0x08
++#define R_PM1_PMLO 0x10
++/* unused 0x20 */
++/* unused 0x40 */
++#define R_PM1_PMVCM 0x80
++
++/* REG_PWR2 */
++#define R_PM2_PMDAC 0x01
++/* unused 0x02 */
++/* unused 0x04 */
++#define R_PM2_PMMO2 0x08
++#define REG_PWR2_MCKAC 0x10
++/* unused 0x20 */
++/* unused 0x40 */
++#define R_PM2_MCKPD 0x80
++
++/* REG_SEL1 */
++#define R_SEL1_PSMO2 0x01
++/* unused 0x02 */
++/* unused 0x04 */
++/* unused 0x08 */
++#define REG_SEL1_MICM 0x10
++#define REG_SEL1_DACM 0x20
++#define REG_SEL1_PSMO 0x40
++#define REG_SEL1_MOGN 0x80
++
++/* REG_SEL2 */
++#define R_SEL2_PSLOR 0x01
++#define R_SEL2_PSLOL 0x02
++#define REG_SEL2_AUXSI 0x04
++/* unused 0x08 */
++#define REG_SEL2_MICL 0x10
++#define REG_SEL2_AUXL 0x20
++/* unused 0x40 */
++#define R_SEL2_DACL 0x80
++
++/* REG_MODE1 */
++#define REG_MODE1_DIF0 0x01
++#define REG_MODE1_DIF1 0x02
++/* unused 0x04 */
++/* unused 0x08 */
++/* unused 0x10 */
++/* unused 0x20 */
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_MODE2 */
++/* unused 0x01 */
++#define REG_MODE2_LOOP 0x02
++#define REG_MODE2_HPM 0x04
++/* unused 0x08 */
++/* unused 0x10 */
++#define REG_MODE2_MCK0 0x20
++#define REG_MODE2_MCK1 0x40
++/* unused 0x80 */
++
++/* REG_DAC */
++#define REG_DAC_DEM0 0x01
++#define REG_DAC_DEM1 0x02
++#define REG_DAC_EQ 0x04
++/* unused 0x08 */
++#define R_DAC_DATTC 0x10
++#define R_DAC_SMUTE 0x20
++#define REG_DAC_TM 0x40
++/* unused 0x80 */
++
++/* REG_MIC */
++#define R_MIC_MGAIN 0x01
++#define R_MIC_MSEL 0x02
++#define R_MIC_MICAD 0x04
++#define R_MIC_MPWRI 0x08
++#define R_MIC_MPWRE 0x10
++#define REG_MIC_AUXAD 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_TIMER */
++
++#define REG_TIMER_LTM0 0x01
++#define REG_TIMER_LTM1 0x02
++#define REG_TIMER_WTM0 0x04
++#define REG_TIMER_WTM1 0x08
++#define REG_TIMER_ZTM0 0x10
++#define REG_TIMER_ZTM1 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++#define REG_ALC1_LMTH 0x01
++#define REG_ALC1_RATT 0x02
++#define REG_ALC1_LMAT0 0x04
++#define REG_ALC1_LMAT1 0x08
++#define REG_ALC1_ZELM 0x10
++#define REG_ALC1_ALC1 0x20
++/* unused 0x40 */
++/* unused 0x80 */
++
++/* REG_ALC2 */
++
++/* REG_PGA */
++
++/* REG_ATTL */
++
++/* REG_ATTR */
++
++/* REG_VOL */
++#define REG_VOL_ATTM 0x80
++
++/* REG_STATUS */
++#define R_STATUS_DTMIC 0x01
++
++/* REG_EQ controls use 4 bits for each of 5 EQ levels */
++
++/* Bluetooth not yet implemented */
++#define REG_BTIF_PMAD2 0x01
++#define REG_BTIF_PMDA2 0x02
++#define REG_BTIF_PMBIF 0x04
++#define REG_BTIF_ADC2 0x08
++#define REG_BTIF_DAC2 0x10
++#define REG_BTIF_BTFMT0 0x20
++#define REG_BTIF_BTFMT1 0x40
++/* unused 0x80 */
++
++/* begin {{ I2C }} */
++
++static struct i2c_driver snd_ak4641_i2c_driver = {
++ .driver = {
++ .name = "ak4641-i2c"
++ },
++};
++
++static int snd_ak4641_i2c_init(void)
++{
++ return i2c_add_driver(&snd_ak4641_i2c_driver);
++}
++
++static void snd_ak4641_i2c_free(void)
++{
++ i2c_del_driver(&snd_ak4641_i2c_driver);
++}
++
++static inline int snd_ak4641_i2c_probe(struct snd_ak4641 *ak)
++{
++ if (ak->i2c_client.adapter == NULL) return -EINVAL;
++ ak->i2c_client.addr = 0x12;
++ if (i2c_smbus_xfer(ak->i2c_client.adapter, ak->i2c_client.addr,
++ 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0)
++ return -ENODEV;
++ else return 0;
++}
++
++static int snd_ak4641_i2c_attach(struct snd_ak4641 *ak)
++{
++ int ret = 0;
++ if ((ret = snd_ak4641_i2c_probe(ak)) < 0) return ret;
++ snprintf(ak->i2c_client.name, sizeof(ak->i2c_client.name),
++ "ak4641-i2c at %d-%04x",
++ i2c_adapter_id(ak->i2c_client.adapter), ak->i2c_client.addr);
++ return i2c_attach_client(&ak->i2c_client);
++}
++
++static void snd_ak4641_i2c_detach(struct snd_ak4641 *ak)
++{
++ i2c_detach_client(&ak->i2c_client);
++}
++
++/* end {{ I2C }} */
++
++
++/* begin {{ Registers & Cache Ops }} */
++
++static int snd_ak4641_hwsync(struct snd_ak4641 *ak, int read, u8 reg)
++{
++ struct i2c_msg msgs[2];
++ u8 buf[2];
++ int ret;
++
++ snd_assert(reg < ARRAY_SIZE(ak->regs), return -EINVAL);
++
++ /* setup i2c msgs */
++ msgs[0].addr = ak->i2c_client.addr;
++ msgs[0].flags = 0;
++ msgs[0].buf = buf;
++ if (!read)
++ msgs[0].len = 2;
++ else {
++ msgs[1].flags = I2C_M_RD;
++ msgs[1].addr = msgs[0].addr;
++ msgs[1].buf = msgs[0].buf + 1;
++ msgs[0].len = 1;
++ msgs[1].len = 1;
++ }
++
++ buf[0] = reg;
++
++ /* regs[reg] -> buffer, on write */
++ if (!read) buf[1] = ak->regs[reg];
++
++ /* i2c transfer */
++ ret = i2c_transfer(ak->i2c_client.adapter, msgs, read ? 2 : 1);
++ if (ret != (read ? 2 : 1)) return ret; /* transfer error */ //@@ error ret < 0, or not ?
++
++ /* regs[reg] <- buffer, on read */
++ if (read) ak->regs[reg] = buf[1];
++
++ return 0;
++}
++
++static inline int snd_ak4641_hwsync_read(struct snd_ak4641 *ak, u8 reg)
++{
++ return snd_ak4641_hwsync(ak, 1, reg);
++}
++
++static inline int snd_ak4641_hwsync_write(struct snd_ak4641 *ak, u8 reg)
++{
++ return snd_ak4641_hwsync(ak, 0, reg);
++}
++
++static int snd_ak4641_hwsync_read_all(struct snd_ak4641 *ak)
++{
++ u8 reg;
++ for (reg = 0; reg < ARRAY_SIZE(ak->regs); reg++)
++ if (snd_ak4641_hwsync_read(ak, reg) < 0) return -1;
++ return 0;
++}
++
++static int snd_ak4641_hwsync_write_all(struct snd_ak4641 *ak)
++{
++ u8 reg;
++ for (reg = 0; reg < ARRAY_SIZE(ak->regs); reg++)
++ if (snd_ak4641_hwsync_write(ak, reg) < 0) return -1;
++ return 0;
++}
++
++static int snd_ak4641_reg_changed(struct snd_ak4641 *ak, u8 reg)
++{
++ if ((reg != R_PGA && ak->powered_on) ||
++ (reg == R_PGA && (ak->regs[R_PM1] & R_PM1_PMMIC)))
++ return snd_ak4641_hwsync_write(ak, reg);
++ return 0;
++}
++
++/* end {{ Registers & Cache Ops }}*/
++
++
++static inline void snd_ak4641_lock(struct snd_ak4641 *ak)
++{
++ down(&ak->sem);
++}
++
++static inline void snd_ak4641_unlock(struct snd_ak4641 *ak)
++{
++ up(&ak->sem);
++}
++
++#define WRITE_MASK(i, val, mask) (((i) & ~(mask)) | ((val) & (mask)))
++
++
++/* begin {{ Controls }} */
++
++#define INV_RANGE(val, mask) \
++ (~(val) & (mask))
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_actl_playback_volume_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 2;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 0xff;
++ return 0;
++}
++
++static int snd_ak4641_actl_playback_volume_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ucontrol->value.integer.value[0] = INV_RANGE(ak->regs[R_ATTL], 0xff);
++ ucontrol->value.integer.value[1] = INV_RANGE(ak->regs[R_ATTR], 0xff);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static int snd_ak4641_actl_playback_volume_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ak->regs[R_ATTL] = INV_RANGE(ucontrol->value.integer.value[0], 0xff);
++ ak->regs[R_ATTR] = INV_RANGE(ucontrol->value.integer.value[1], 0xff);
++ snd_ak4641_reg_changed(ak, R_ATTL);
++ snd_ak4641_reg_changed(ak, R_ATTR);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_actl_mic_gain_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 0x7f;
++ return 0;
++}
++
++static int snd_ak4641_actl_mic_gain_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ ucontrol->value.integer.value[0] = ak->regs[R_PGA];
++ return 0;
++}
++
++static int snd_ak4641_actl_mic_gain_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++
++ snd_ak4641_lock(ak);
++ ak->regs[R_PGA] = ucontrol->value.integer.value[0];
++ snd_ak4641_reg_changed(ak, R_PGA);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++#define ACTL(ctl_name, _name) \
++static struct snd_kcontrol_new snd_ak4641_actl_ ## ctl_name = \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = _name, \
++ .info = snd_ak4641_actl_ ## ctl_name ## _info, \
++ .get = snd_ak4641_actl_ ## ctl_name ## _get, .put = snd_ak4641_actl_ ## ctl_name ## _put };
++
++ACTL(playback_volume, "Master Playback Volume")
++ACTL(mic_gain, "Mic Capture Gain")
++
++struct snd_ak4641_uctl_bool {
++ int (*get) (struct snd_ak4641 *uda);
++ int (*set) (struct snd_ak4641 *uda, int on);
++};
++
++static int snd_ak4641_actl_bool_info(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 1;
++ return 0;
++}
++
++static int snd_ak4641_actl_bool_get(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++ struct snd_ak4641_uctl_bool *uctl =
++ (struct snd_ak4641_uctl_bool *) kcontrol->private_value;
++
++ ucontrol->value.integer.value[0] = uctl->get(ak);
++ return 0;
++}
++
++static int snd_ak4641_actl_bool_put(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *) kcontrol->private_data;
++ struct snd_ak4641_uctl_bool *uctl =
++ (struct snd_ak4641_uctl_bool *) kcontrol->private_value;
++
++ return uctl->set(ak, ucontrol->value.integer.value[0]);
++}
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_playback_switch_get(struct snd_ak4641 *ak)
++{
++ return (ak->regs[R_DAC] & R_DAC_SMUTE) == 0x00;
++}
++
++static int snd_ak4641_uctl_playback_switch_set(struct snd_ak4641 *ak, int on)
++{
++ snd_ak4641_lock(ak);
++ ak->regs[R_DAC] = WRITE_MASK(ak->regs[R_DAC],
++ on ? 0x00 : R_DAC_SMUTE, R_DAC_SMUTE);
++ snd_ak4641_reg_changed(ak, R_DAC);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_mic_boost_get(struct snd_ak4641 *ak)
++{
++ return (ak->regs[R_MIC] & R_MIC_MGAIN) == R_MIC_MGAIN;
++}
++
++static int snd_ak4641_uctl_mic_boost_set(struct snd_ak4641 *ak, int on)
++{
++ snd_ak4641_lock(ak);
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC],
++ on ? R_MIC_MGAIN : 0x00, R_MIC_MGAIN);
++ snd_ak4641_reg_changed(ak, R_MIC);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++/*-begin----------------------------------------------------------*/
++static int snd_ak4641_uctl_mono_out_get(struct snd_ak4641 *ak)
++{
++ printk("mono_out status 0x%8.8x -> 0x%8.8x\n",ak->regs[R_SEL1], ak->regs[R_SEL1] & REG_SEL1_PSMO);
++ return (ak->regs[R_SEL1] & REG_SEL1_PSMO) == REG_SEL1_PSMO;
++}
++
++static int snd_ak4641_uctl_mono_out_set(struct snd_ak4641 *ak, int on)
++{
++ printk("phone mic enable called. on=%d\n",on);
++ snd_ak4641_lock(ak);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], on ? R_PM1_PMMIC : 0x00, R_PM1_PMMIC);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], on ? REG_PWR1_PMMO : 0x00, REG_PWR1_PMMO);
++ snd_ak4641_reg_changed(ak, R_PM1);
++
++ snd_ak4641_hwsync_write(ak, R_PGA); /* mic PGA gain is reset when PMMIC = 0 */
++
++ /* internal mic */
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], on ? R_MIC_MPWRI : 0x0, R_MIC_MPWRI);
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], 0x0, R_MIC_MSEL);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++
++// ak->regs[REG_BTIF] = WRITE_MASK(ak->regs[REG_BTIF], 0x0, REG_BTIF_DAC2);
++// snd_ak4641_hwsync_write(ak, REG_BTIF);
++ /* */
++// ak->regs[REG_VOL] = WRITE_MASK(ak->regs[REG_VOL], on ? REG_VOL_ATTM : 0x00, REG_VOL_ATTM);
++// ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_MOGN : 0x00, REG_SEL1_MOGN);
++ ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_MICM : 0x00, REG_SEL1_MICM);
++ ak->regs[R_SEL1] = WRITE_MASK(ak->regs[R_SEL1], on ? REG_SEL1_PSMO : 0x00, REG_SEL1_PSMO);
++ snd_ak4641_reg_changed(ak, R_SEL1);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++/*-end------------------------------------------------------------*/
++
++#define ACTL_BOOL(ctl_name, _name) \
++static struct snd_ak4641_uctl_bool snd_ak4641_actl_ ## ctl_name ## _pvalue = \
++{ .get = snd_ak4641_uctl_ ## ctl_name ## _get, \
++ .set = snd_ak4641_uctl_ ## ctl_name ## _set }; \
++static struct snd_kcontrol_new snd_ak4641_actl_ ## ctl_name = \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = _name, .info = snd_ak4641_actl_bool_info, \
++ .get = snd_ak4641_actl_bool_get, .put = snd_ak4641_actl_bool_put, \
++ .private_value = (unsigned long) &snd_ak4641_actl_ ## ctl_name ## _pvalue };
++
++ACTL_BOOL(playback_switch, "Master Playback Switch")
++ACTL_BOOL(mic_boost, "Mic Boost (+20dB)")
++ACTL_BOOL(mono_out, "Phone mic enable")
++
++static void snd_ak4641_headphone_on(struct snd_ak4641 *ak, int on);
++static void snd_ak4641_speaker_on(struct snd_ak4641 *ak, int on);
++static void snd_ak4641_select_mic(struct snd_ak4641 *ak);
++
++void snd_ak4641_hp_connected(struct snd_ak4641 *ak, int connected)
++{
++ snd_ak4641_lock(ak);
++ if (connected != ak->hp_connected) {
++ ak->hp_connected = connected;
++
++ /* headphone or speaker, on playback */
++ if (ak->playback_on) {
++ if (connected) {
++ snd_ak4641_headphone_on(ak, 1);
++ snd_ak4641_speaker_on(ak, 0);
++ } else {
++ snd_ak4641_speaker_on(ak, 1);
++ snd_ak4641_headphone_on(ak, 0);
++ }
++ }
++
++ /* headset or internal mic, on capture */
++ if (ak->capture_on)
++ snd_ak4641_select_mic(ak);
++ }
++ snd_ak4641_unlock(ak);
++}
++
++/* end {{ Controls }} */
++
++
++/* begin {{ Headphone Detected Notification }} */
++
++static void snd_ak4641_hp_detected_w_fn(void *p)
++{
++ struct snd_ak4641 *ak = (struct snd_ak4641 *)p;
++
++ snd_ak4641_hp_connected(ak, ak->hp_detected.detected);
++}
++
++void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected)
++{
++ if (detected != ak->hp_detected.detected) {
++ ak->hp_detected.detected = detected;
++ queue_work(ak->hp_detected.wq, &ak->hp_detected.w);
++ }
++}
++
++static int snd_ak4641_hp_detected_init(struct snd_ak4641 *ak)
++{
++ INIT_WORK(&ak->hp_detected.w, snd_ak4641_hp_detected_w_fn);
++ ak->hp_detected.detected = ak->hp_connected;
++ ak->hp_detected.wq = create_singlethread_workqueue("ak4641");
++ if (ak->hp_detected.wq) return 0;
++ else return -1;
++}
++
++static void snd_ak4641_hp_detected_free(struct snd_ak4641 *ak)
++{
++ destroy_workqueue(ak->hp_detected.wq);
++}
++
++/* end {{ Headphone Detected Notification }} */
++
++
++/* begin {{ Codec Control }} */
++
++static void snd_ak4641_headphone_on(struct snd_ak4641 *ak, int on)
++{
++ if (on) {
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ ak->headphone_out_on(1);
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ R_SEL2_PSLOL | R_SEL2_PSLOR,
++ R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ } else {
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ 0x00, R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ ak->headphone_out_on(0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ }
++}
++
++static void snd_ak4641_speaker_on(struct snd_ak4641 *ak, int on)
++{
++ if (on) {
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ ak->speaker_out_on(1);
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ R_SEL2_PSLOL | R_SEL2_PSLOR,
++ R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ } else {
++ ak->regs[R_SEL2] = WRITE_MASK(ak->regs[R_SEL2],
++ 0x00, R_SEL2_PSLOL | R_SEL2_PSLOR);
++ snd_ak4641_hwsync_write(ak, R_SEL2);
++ ak->speaker_out_on(0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ }
++}
++
++static inline int snd_ak4641_power_on(struct snd_ak4641 *ak)
++{
++ ak->reset_pin(1);
++ ak->power_on_chip(1);
++ msleep(1);
++ ak->reset_pin(0);
++ ak->powered_on = 1;
++ return 0;
++}
++
++static inline int snd_ak4641_power_off(struct snd_ak4641 *ak)
++{
++ ak->powered_on = 0;
++ ak->power_on_chip(0);
++ return 0;
++}
++
++static inline void snd_ak4641_headphone_out_on(struct snd_ak4641 *ak, int on)
++{
++ if (ak->headphone_out_on) ak->headphone_out_on(on);
++}
++
++static inline void snd_ak4641_speaker_out_on(struct snd_ak4641 *ak, int on)
++{
++ if (ak->speaker_out_on) ak->speaker_out_on(on);
++}
++
++static int snd_ak4641_playback_on(struct snd_ak4641 *ak)
++{
++ if (ak->playback_on) return 0;
++
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2],
++ R_PM2_PMDAC, R_PM2_MCKPD | R_PM2_PMDAC);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMLO, R_PM1_PMLO);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ if (ak->hp_connected) snd_ak4641_headphone_on(ak, 1);
++ else snd_ak4641_speaker_on(ak, 1);
++
++ ak->playback_on = 1;
++
++ return 0;
++}
++
++static int snd_ak4641_playback_off(struct snd_ak4641 *ak)
++{
++ if (!ak->playback_on) return 0;
++
++ ak->playback_on = 0;
++
++ if (ak->hp_connected) snd_ak4641_headphone_on(ak, 0);
++ else snd_ak4641_speaker_on(ak, 0);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMLO);
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2],
++ (!ak->capture_on ? R_PM2_MCKPD : 0x00) | R_PM2_PMDAC,
++ R_PM2_MCKPD | R_PM2_PMDAC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++
++ return 0;
++}
++
++static void snd_ak4641_select_mic(struct snd_ak4641 *ak)
++{
++ int mic = 0;
++ u8 r_mic;
++
++ if (ak->hp_connected) {
++ /* check headset mic */
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC], R_MIC_MPWRE, R_MIC_MPWRE);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ snd_ak4641_hwsync_read(ak, R_STATUS);
++ mic = (ak->regs[R_STATUS] & R_STATUS_DTMIC) == R_STATUS_DTMIC;
++
++ printk("htcuniversal_ak4641_select_mic: mic=%d\n",mic);
++
++ r_mic = WRITE_MASK(ak->regs[R_MIC],
++ R_MIC_MSEL | (ak->capture_on ? R_MIC_MPWRE : 0x00),
++ R_MIC_MSEL | R_MIC_MPWRI | R_MIC_MPWRE);
++ }
++ else
++ r_mic = WRITE_MASK(ak->regs[R_MIC],
++ 0x00 | (ak->capture_on ? R_MIC_MPWRI : 0x00),
++ R_MIC_MSEL | R_MIC_MPWRI | R_MIC_MPWRE);
++
++ if (r_mic != ak->regs[R_MIC]) {
++ ak->regs[R_MIC] = r_mic;
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ }
++}
++
++static int snd_ak4641_capture_on(struct snd_ak4641 *ak)
++{
++ if (ak->capture_on) return 0;
++
++ if (!ak->playback_on) {
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2], 0x00, R_PM2_MCKPD);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ }
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMMIC | R_PM1_PMADC,
++ R_PM1_PMMIC | R_PM1_PMADC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_PGA); /* mic PGA gain is reset when PMMIC = 0 */
++
++ ak->capture_on = 1;
++
++ snd_ak4641_select_mic(ak);
++
++ msleep(47); /* accounts for ADC init cycle, time enough for fs >= 44.1 kHz */
++
++ return 0;
++}
++
++static int snd_ak4641_capture_off(struct snd_ak4641 *ak)
++{
++ if (!ak->capture_on) return 0;
++
++ ak->regs[R_MIC] = WRITE_MASK(ak->regs[R_MIC],
++ 0x00, R_MIC_MPWRI | R_MIC_MPWRE | R_MIC_MSEL);
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], 0x00, R_PM1_PMMIC | R_PM1_PMADC);
++ snd_ak4641_hwsync_write(ak, R_MIC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ if (!ak->playback_on) {
++ ak->regs[R_PM2] = WRITE_MASK(ak->regs[R_PM2], R_PM2_MCKPD, R_PM2_MCKPD);
++ snd_ak4641_hwsync_write(ak, R_PM2);
++ }
++
++ ak->capture_on = 0;
++
++ return 0;
++}
++
++int snd_ak4641_open_stream(struct snd_ak4641 *ak, int stream)
++{
++ snd_ak4641_lock(ak);
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ ak->playback_stream_opened = 1;
++ snd_ak4641_playback_on(ak);
++ } else {
++ ak->capture_stream_opened = 1;
++ snd_ak4641_capture_on(ak);
++ }
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++int snd_ak4641_close_stream(struct snd_ak4641 *ak, int stream)
++{
++ snd_ak4641_lock(ak);
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ ak->playback_stream_opened = 0;
++ snd_ak4641_playback_off(ak);
++ } else {
++ ak->capture_stream_opened = 0;
++ snd_ak4641_capture_off(ak);
++ }
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static int snd_ak4641_init_regs(struct snd_ak4641 *ak)
++{
++ snd_ak4641_hwsync_read_all(ak);
++
++ //@@ MEMO: add some configs
++
++ ak->regs[R_PM1] = WRITE_MASK(ak->regs[R_PM1], R_PM1_PMVCM, R_PM1_PMVCM);
++ ak->regs[R_DAC] = WRITE_MASK(ak->regs[R_DAC], 0x00, R_DAC_DATTC);
++ snd_ak4641_hwsync_write(ak, R_PM1);
++ snd_ak4641_hwsync_write(ak, R_DAC);
++
++ return 0;
++}
++
++int snd_ak4641_suspend(struct snd_ak4641 *ak, pm_message_t state)
++{
++ snd_ak4641_lock(ak);
++ if (ak->playback_on) snd_ak4641_playback_off(ak);
++ if (ak->capture_on) snd_ak4641_capture_off(ak);
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++int snd_ak4641_resume(struct snd_ak4641 *ak)
++{
++ snd_ak4641_lock(ak);
++ snd_ak4641_power_on(ak);
++ snd_ak4641_hwsync_write_all(ak);
++ if (ak->playback_stream_opened) snd_ak4641_playback_on(ak);
++ if (ak->capture_stream_opened) snd_ak4641_capture_on(ak);
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++static void snd_ak4641_init_ak(struct snd_ak4641 *ak)
++{
++ init_MUTEX(&ak->sem);
++ ak->i2c_client.driver = &snd_ak4641_i2c_driver;
++}
++
++int snd_ak4641_activate(struct snd_ak4641 *ak)
++{
++ int ret = 0;
++
++ snd_ak4641_init_ak(ak);
++ snd_ak4641_lock(ak);
++ snd_ak4641_power_on(ak);
++ if ((ret = snd_ak4641_i2c_attach(ak)) < 0)
++ goto failed_i2c_attach;
++ snd_ak4641_init_regs(ak);
++ if ((ret = snd_ak4641_hp_detected_init(ak)) < 0)
++ goto failed_hp_detected_init;
++ snd_ak4641_unlock(ak);
++ return 0;
++
++ failed_hp_detected_init:
++ snd_ak4641_i2c_detach(ak);
++ failed_i2c_attach:
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++ return ret;
++}
++
++void snd_ak4641_deactivate(struct snd_ak4641 *ak)
++{
++ snd_ak4641_lock(ak);
++ snd_ak4641_hp_detected_free(ak);
++ snd_ak4641_i2c_detach(ak);
++ snd_ak4641_power_off(ak);
++ snd_ak4641_unlock(ak);
++}
++
++int snd_ak4641_add_mixer_controls(struct snd_ak4641 *ak, struct snd_card *card)
++{
++ snd_ak4641_lock(ak);
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_playback_volume, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_playback_switch, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mic_gain, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mic_boost, ak));
++ snd_ctl_add(card, snd_ctl_new1(&snd_ak4641_actl_mono_out, ak));
++ snd_ak4641_unlock(ak);
++ return 0;
++}
++
++/* end {{ Codec Control }} */
++
++
++/* begin {{ Module }} */
++
++static int __init snd_ak4641_module_on_load(void)
++{
++ snd_ak4641_i2c_init();
++ return 0;
++}
++
++static void __exit snd_ak4641_module_on_unload(void)
++{
++ snd_ak4641_i2c_free();
++}
++
++module_init(snd_ak4641_module_on_load);
++module_exit(snd_ak4641_module_on_unload);
++
++EXPORT_SYMBOL(snd_ak4641_activate);
++EXPORT_SYMBOL(snd_ak4641_deactivate);
++EXPORT_SYMBOL(snd_ak4641_add_mixer_controls);
++EXPORT_SYMBOL(snd_ak4641_open_stream);
++EXPORT_SYMBOL(snd_ak4641_close_stream);
++EXPORT_SYMBOL(snd_ak4641_suspend);
++EXPORT_SYMBOL(snd_ak4641_resume);
++EXPORT_SYMBOL(snd_ak4641_hp_connected);
++EXPORT_SYMBOL(snd_ak4641_hp_detected);
++
++MODULE_AUTHOR("Giorgio Padrin");
++MODULE_DESCRIPTION("Audio support for codec Asahi Kasei AK4641");
++MODULE_LICENSE("GPL");
++
++/* end {{ Module }} */
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,65 @@
++/*
++ * Audio support for codec Asahi Kasei AK4641
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Copyright (c) 2006 Giorgio Padrin <giorgio@mandarinlogiq.org>
++ */
++
++#ifndef __SOUND_AK4641_H
++#define __SOUND_AK4641_H
++
++#include <linux/i2c.h>
++
++struct snd_ak4641 {
++ struct semaphore sem;
++
++ u8 regs[0x14]; /* registers cache */
++
++ unsigned int
++ powered_on:1,
++ playback_on:1,
++ playback_stream_opened:1,
++ capture_on:1,
++ capture_stream_opened:1;
++
++ unsigned int
++ hp_connected:1;
++
++ /* -- configuration (to fill before activation) -- */
++ void (*power_on_chip)(int on);
++ void (*reset_pin)(int on);
++ void (*headphone_out_on)(int on);
++ void (*speaker_out_on)(int on);
++
++ struct i2c_client i2c_client; /* to fill .adapter */
++ /* ----------------------------------------------- */
++
++ struct {
++ int detected;
++ struct workqueue_struct *wq;
++ struct work_struct w;
++ } hp_detected;
++};
++
++
++/* Note: opening, closing, suspending and resuming a stream
++ * require the clocks (MCLK and I2S ones) running
++ */
++
++/* don't forget to specify I2C adapter in i2c_client field */
++int snd_ak4641_activate(struct snd_ak4641 *ak);
++
++void snd_ak4641_deactivate(struct snd_ak4641 *ak);
++int snd_ak4641_add_mixer_controls(struct snd_ak4641 *ak, struct snd_card *card);
++int snd_ak4641_open_stream(struct snd_ak4641 *ak, int stream);
++int snd_ak4641_close_stream(struct snd_ak4641 *ak, int stream);
++int snd_ak4641_suspend(struct snd_ak4641 *ak, pm_message_t state);
++int snd_ak4641_resume(struct snd_ak4641 *ak);
++
++void snd_ak4641_hp_connected(struct snd_ak4641 *ak, int connected); /* non atomic context */
++void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected); /* atomic context */
++
++#endif /* __SOUND_AK4641_H */
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,143 @@
++/*
++ * LEDs support for the HP iPaq hx4700
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_leds.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++//FIXME
++//DEFINE_LED_TRIGGER_SHARED_GLOBAL(htcuniversal_radio_trig);
++//EXPORT_LED_TRIGGER_SHARED(htcuniversal_radio_trig);
++
++static struct asic3_led htcuniversal_leds[] = {
++ {
++ .led_cdev = {
++ .name = "htcuniversal:red",
++ .default_trigger = "htcuniversal-charging",
++ },
++ .hw_num = 2,
++
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:green",
++ .default_trigger = "htcuniversal-chargefull",
++ },
++ .hw_num = 1,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:wifi-bt",
++ .default_trigger = "htcuniversal-radio",
++ },
++ .hw_num = 0,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:phonebuttons",
++ .default_trigger = "htcuniversal-phonebuttons",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_BL_KEYP_PWR_ON,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:vibra",
++ .default_trigger = "htcuniversal-vibra",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_VIBRA_PWR_ON,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:flashlight1",
++ .default_trigger = "htcuniversal-flashlight1",
++ },
++ .hw_num = -1,
++ .gpio_num = ('A'-'A')*16+GPIOA_FLASHLIGHT,
++ },
++ {
++ .led_cdev = {
++ .name = "htcuniversal:kbdbacklight",
++ .default_trigger = "htcuniversal-kbdbacklight",
++ },
++ .hw_num = -1,
++ .gpio_num = ('D'-'A')*16+GPIOD_BL_KEYB_PWR_ON,
++ },
++};
++
++void htcuniversal_leds_release(struct device *dev)
++{
++ return;
++}
++
++static
++struct asic3_leds_machinfo htcuniversal_leds_machinfo = {
++ .num_leds = ARRAY_SIZE(htcuniversal_leds),
++ .leds = htcuniversal_leds,
++ .asic3_pdev = &htcuniversal_asic3,
++};
++
++static
++struct platform_device htcuniversal_leds_pdev = {
++ .name = "asic3-leds",
++ .dev = {
++ .platform_data = &htcuniversal_leds_machinfo,
++ .release = htcuniversal_leds_release,
++ },
++};
++
++static
++int __init htcuniversal_leds_init(void)
++{
++ int ret;
++ printk("htcuniversal LEDs Driver\n");
++// led_trigger_register_shared("htcuniversal-radio", &htcuniversal_radio_trig);
++
++ ret = asic3_leds_register();
++ if (ret) goto asic3_leds_failed;
++
++ ret = platform_device_register(&htcuniversal_leds_pdev);
++ if (ret) goto platform_device_failed;
++
++ goto success;
++
++platform_device_failed:
++ asic3_leds_unregister();
++asic3_leds_failed:
++// led_trigger_unregister_shared(htcuniversal_radio_trig);
++ printk("htcuniversal LEDs Driver failed to init");
++success:
++ return ret;
++}
++
++static
++void __exit htcuniversal_leds_exit(void)
++{
++// led_trigger_unregister_shared(htcuniversal_radio_trig);
++ platform_device_unregister(&htcuniversal_leds_pdev);
++ asic3_leds_unregister();
++ return;
++}
++
++module_init(htcuniversal_leds_init);
++module_exit(htcuniversal_leds_exit);
++
++MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
++MODULE_DESCRIPTION("htcuniversal LEDs driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,61 @@
++/*
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * Copyright (C) 2006 Paul Sokolosvky
++ * Based on code from older versions of htcuniversal_lcd.c
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/platform_device.h>
++#include <asm/arch/hardware.h> /* for pxa-regs.h (__REG) */
++#include <asm/arch/pxa-regs.h>
++#include <asm/mach-types.h> /* machine_is_htcuniversal */
++//#include <linux/corgi_bl.h>
++#include <linux/backlight.h>
++#include <linux/err.h>
++
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++#define HTCUNIVERSAL_MAX_INTENSITY 0xc7
++
++static void htcuniversal_set_bl_intensity(int intensity)
++{
++ PWM_CTRL1 = 1; /* pre-scaler */
++ PWM_PWDUTY1 = intensity; /* duty cycle */
++ PWM_PERVAL1 = HTCUNIVERSAL_MAX_INTENSITY+1; /* period */
++
++ if (intensity > 0) {
++ pxa_set_cken(CKEN_PWM1, 1);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev,
++ (1<<GPIOD_FL_PWR_ON), (1<<GPIOD_FL_PWR_ON));
++ } else {
++ pxa_set_cken(CKEN_PWM1, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev,
++ (1<<GPIOD_FL_PWR_ON), 0);
++ }
++}
++
++
++static struct generic_bl_info htcuniversal_bl_machinfo = {
++ .default_intensity = HTCUNIVERSAL_MAX_INTENSITY / 4,
++ .limit_mask = 0xff,
++ .max_intensity = HTCUNIVERSAL_MAX_INTENSITY,
++ .set_bl_intensity = htcuniversal_set_bl_intensity,
++};
++
++struct platform_device htcuniversal_bl = {
++ .name = "corgi-bl",
++ .dev = {
++ .platform_data = &htcuniversal_bl_machinfo,
++ },
++};
++
++MODULE_AUTHOR("Paul Sokolovsky <pmiscml@gmail.com>");
++MODULE_DESCRIPTION("Backlight driver for HTC Universal");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,135 @@
++/* Bluetooth interface driver for TI BRF6150 on HX4700
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-04-21 Todd Blumer Created.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/serial.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include "htcuniversal_bt.h"
++
++static uint use_led=1;
++
++static void
++htcuniversal_bt_configure( int state )
++{
++ int tries;
++
++ printk( KERN_NOTICE "htcuniversal configure bluetooth: %d\n", state );
++ switch (state) {
++
++ case PXA_UART_CFG_PRE_STARTUP:
++ break;
++
++ case PXA_UART_CFG_POST_STARTUP:
++ /* pre-serial-up hardware configuration */
++ htcuniversal_egpio_enable(1<<EGPIO5_BT_3V3_ON);
++ mdelay(50);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_PWR_ON, 1<<GPIOC_BT_PWR_ON);
++ mdelay(10);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_RESET, 0);
++ mdelay(10);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_RESET, 1<<GPIOC_BT_RESET);
++ mdelay(10);
++
++ /*
++ * BRF6150's RTS goes low when firmware is ready
++ * so check for CTS=1 (nCTS=0 -> CTS=1). Typical 150ms
++ */
++ tries = 0;
++ do {
++ mdelay(10);
++ } while ((BTMSR & MSR_CTS) == 0 && tries++ < 50);
++ if (use_led) {
++// htcuniversal_set_led(2, 16, 16);
++ }
++ break;
++
++ case PXA_UART_CFG_PRE_SHUTDOWN:
++ htcuniversal_egpio_disable(1<<EGPIO5_BT_3V3_ON );
++ mdelay(50);
++// htcuniversal_clear_led(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_BT_PWR_ON, 0);
++ break;
++
++ default:
++ break;
++ }
++}
++
++
++static int
++htcuniversal_bt_probe( struct platform_device *dev )
++{
++ struct htcuniversal_bt_funcs *funcs = dev->dev.platform_data;
++
++ /* configure bluetooth UART */
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_RXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_TXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_UART_CTS_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_BT_UART_RTS_MD );
++
++ funcs->configure = htcuniversal_bt_configure;
++
++ /* Make sure the LED is off */
++// htcuniversal_clear_led(2);
++
++ return 0;
++}
++
++static int
++htcuniversal_bt_remove( struct platform_device *dev )
++{
++ struct htcuniversal_bt_funcs *funcs = dev->dev.platform_data;
++
++ funcs->configure = NULL;
++
++ /* Make sure the LED is off */
++// htcuniversal_clear_led(2);
++
++ return 0;
++}
++
++static struct platform_driver bt_driver = {
++ .driver = {
++ .name = "htcuniversal_bt",
++ },
++ .probe = htcuniversal_bt_probe,
++ .remove = htcuniversal_bt_remove,
++};
++
++module_param(use_led, uint, 0);
++
++static int __init
++htcuniversal_bt_init( void )
++{
++ printk(KERN_NOTICE "htcuniversal Bluetooth Driver\n");
++ return platform_driver_register( &bt_driver );
++}
++
++static void __exit
++htcuniversal_bt_exit( void )
++{
++ platform_driver_unregister( &bt_driver );
++}
++
++module_init( htcuniversal_bt_init );
++module_exit( htcuniversal_bt_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Bluetooth Support Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
++
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,17 @@
++/*
++ * Bluetooth support file for calling bluetooth configuration functions
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-06 Todd Blumer Initial Revision
++ */
++
++#ifndef _HTCUNIVERSAL_BT_H
++#define _HTCUNIVERSAL_BT_H
++
++struct htcuniversal_bt_funcs {
++ void (*configure) ( int state );
++};
++
++
++#endif
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,87 @@
++/*
++ * Buttons driver for HTC Universal
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.
++ *
++ * Copyright (C) 2005 Pawel Kolodziejski
++ * Copyright (C) 2003 Joshua Wise
++ *
++ */
++
++#include <linux/input.h>
++#include <linux/input_pda.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/gpio_keys.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_keys.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static struct asic3_keys_button asic3_buttons[] = {
++//{KEY_SCREEN, ASIC3_GPIOA_IRQ_BASE+GPIOA_COVER_ROTATE_N, 1, "screen_cover", EV_SW},
++//{KEY_SWITCHVIDEOMODE, ASIC3_GPIOB_IRQ_BASE+GPIOB_CLAMSHELL_N, 1, "clamshell_rotate", EV_SW},
++//{KEY_KBDILLUMTOGGLE, ASIC3_GPIOB_IRQ_BASE+GPIOB_NIGHT_SENSOR, 1, "night_sensor", EV_SW},
++{SW_LID, ASIC3_GPIOA_IRQ_BASE+GPIOA_COVER_ROTATE_N, 1, "screen_cover", EV_SW},
++{SW_TABLET_MODE, ASIC3_GPIOB_IRQ_BASE+GPIOB_CLAMSHELL_N, 1, "clamshell_rotate", EV_SW},
++//{SW_NIGHT_SENSOR, ASIC3_GPIOB_IRQ_BASE+GPIOB_NIGHT_SENSOR, 1, "night_sensor", EV_SW},
++{KEY_F10, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_BACKLIGHT_N, 1, "backlight_button"},
++{KEY_RECORD, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_RECORD_N, 1, "record_button"},
++{KEY_CAMERA, ASIC3_GPIOA_IRQ_BASE+GPIOA_BUTTON_CAMERA_N, 1, "camera_button"},
++{KEY_VOLUMEDOWN, ASIC3_GPIOA_IRQ_BASE+GPIOA_VOL_UP_N, 1, "volume_slider_down"},
++{KEY_VOLUMEUP, ASIC3_GPIOA_IRQ_BASE+GPIOA_VOL_DOWN_N, 1, "volume_slider_up"},
++{KEY_KPENTER, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_OK_N, 1, "select"},
++{KEY_RIGHT, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_RIGHT_N, 1, "right"},
++{KEY_LEFT, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_LEFT_N, 1, "left"},
++{KEY_DOWN, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_DOWN_N, 1, "down"},
++{KEY_UP, ASIC3_GPIOD_IRQ_BASE+GPIOD_KEY_UP_N, 1, "up"},
++};
++
++static struct asic3_keys_platform_data asic3_keys_data = {
++ .buttons = asic3_buttons,
++ .nbuttons = ARRAY_SIZE(asic3_buttons),
++ .asic3_dev = &htcuniversal_asic3.dev,
++};
++
++static struct platform_device htcuniversal_keys_asic3 = {
++ .name = "asic3-keys",
++ .dev = { .platform_data = &asic3_keys_data, }
++};
++
++static int __init htcuniversal_buttons_probe(struct platform_device *dev)
++{
++ platform_device_register(&htcuniversal_keys_asic3);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_buttons_driver = {
++ .driver = {
++ .name = "htcuniversal_buttons",
++ },
++ .probe = htcuniversal_buttons_probe,
++};
++
++static int __init htcuniversal_buttons_init(void)
++{
++ if (!machine_is_htcuniversal())
++ return -ENODEV;
++
++ return platform_driver_register(&htcuniversal_buttons_driver);
++}
++
++static void __exit htcuniversal_buttons_exit(void)
++{
++ platform_driver_unregister(&htcuniversal_buttons_driver);
++}
++
++module_init(htcuniversal_buttons_init);
++module_exit(htcuniversal_buttons_exit);
++
++MODULE_AUTHOR ("Joshua Wise, Pawel Kolodziejski, Paul Sokolosvky");
++MODULE_DESCRIPTION ("Buttons support for HTC Universal");
++MODULE_LICENSE ("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,226 @@
++/* Core Hardware driver for Hx4700 (Serial, ASIC3, EGPIOs)
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-03-29 Todd Blumer Converted basic structure to support hx4700
++ * 2005-04-30 Todd Blumer Add IRDA code from H2200
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/pm.h>
++#include <linux/irq.h>
++
++#include <asm/io.h>
++#include <asm/mach/irq.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa-pm_ll.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include <linux/soc/asic3_base.h>
++#include <asm/hardware/ipaq-asic3.h>
++
++volatile u_int16_t *egpios;
++u_int16_t egpio_reg;
++
++static int htc_bootloader = 0; /* Is the stock HTC bootloader installed? */
++
++/*
++ * may make sense to put egpios elsewhere, but they're here now
++ * since they share some of the same address space with the TI WLAN
++ *
++ * EGPIO register is write-only
++ */
++
++void
++htcuniversal_egpio_enable( u_int16_t bits )
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++
++ egpio_reg |= bits;
++ *egpios = egpio_reg;
++
++ local_irq_restore(flags);
++}
++EXPORT_SYMBOL_GPL(htcuniversal_egpio_enable);
++
++void
++htcuniversal_egpio_disable( u_int16_t bits )
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++
++ egpio_reg &= ~bits;
++ *egpios = egpio_reg;
++
++ local_irq_restore(flags);
++}
++EXPORT_SYMBOL_GPL(htcuniversal_egpio_disable);
++
++#ifdef CONFIG_PM
++
++//void htcuniversal_ll_pm_init(void);
++
++static int htcuniversal_suspend(struct platform_device *dev, pm_message_t state)
++{
++ /* Turn off external clocks here, because htcuniversal_power and asic3_mmc
++ * scared to do so to not hurt each other. (-5 mA) */
++
++
++ /* 0x20c2 is HTC clock value
++ * CLOCK_CDEX_SOURCE 2
++ * CLOCK_CDEX_SPI 0
++ * CLOCK_CDEX_OWM 0
++ *
++ * CLOCK_CDEX_PWM0 0
++ * CLOCK_CDEX_PWM1 0
++ * CLOCK_CDEX_LED0 1
++ * CLOCK_CDEX_LED1 1
++ *
++ * CLOCK_CDEX_LED2 0
++ * CLOCK_CDEX_SD_HOST 0
++ * CLOCK_CDEX_SD_BUS 0
++ * CLOCK_CDEX_SMBUS 0
++ *
++ * CLOCK_CDEX_CONTROL_CX 0
++ * CLOCK_CDEX_EX0 1
++ * CLOCK_CDEX_EX1 0
++ * */
++ asic3_set_clock_cdex(&htcuniversal_asic3.dev, 0xffff, CLOCK_CDEX_SOURCE1
++ |CLOCK_CDEX_LED0
++ |CLOCK_CDEX_LED1
++ |CLOCK_CDEX_LED2
++ |CLOCK_CDEX_EX0
++ |CLOCK_CDEX_EX1);
++
++ *egpios = 0; /* turn off all egpio power */
++
++ /* Wake up enable. */
++ PWER = PWER_GPIO0
++ | PWER_GPIO1 /* reset */
++ | PWER_GPIO9 /* USB */
++ | PWER_GPIO10 /* AC on USB */
++ | PWER_GPIO14 /* ASIC3 mux */
++ | PWER_RTC;
++ /* Wake up on falling edge. */
++ PFER = PWER_GPIO0
++ | PWER_GPIO1
++ | PWER_GPIO9
++ | PWER_GPIO10
++ | PWER_GPIO14;
++
++ /* Wake up on rising edge. */
++ PRER = PWER_GPIO0
++ | PWER_GPIO1
++ | PWER_GPIO9
++ | PWER_GPIO10;
++ /* 3.6864 MHz oscillator power-down enable */
++ PCFR = PCFR_OPDE | PCFR_PI2CEN | PCFR_GPROD | PCFR_GPR_EN;
++
++ PGSR0 = 0x09088004;
++ PGSR1 = 0x00020002;
++ PGSR2 = 0x8001c000;
++ PGSR3 = 0x00106284;
++
++ PSLR = 0xcc000000;
++
++#if 0
++ /*
++ * If we're using bootldr and not the stock HTC bootloader,
++ * we want to wake up periodically to see if the charge is full while
++ * it is suspended. We do this with the OS timer 4 in the pxa270.
++ */
++ if (!htc_bootloader) {
++ OMCR4 = 0x4b; /* Periodic, self-resetting, 1-second timer */
++ OSMR4 = 5; /* Wake up bootldr after x seconds so it can
++ figure out what to do with the LEDs. */
++ OIER |= 0x10; /* Enable interrupt source for Timer 4 */
++ OSCR4 = 0; /* This starts the timer */
++ }
++#endif
++
++ asic3_set_extcf_select(&htcuniversal_asic3.dev, ASIC3_EXTCF_OWM_EN, 0);
++
++ return 0;
++}
++
++static int htcuniversal_resume(struct platform_device *dev)
++{
++ htcuniversal_egpio_enable(0);
++
++ return 0;
++}
++#else
++# define htcuniversal_suspend NULL
++# define htcuniversal_resume NULL
++#endif
++
++static int
++htcuniversal_core_probe( struct platform_device *dev )
++{
++
++ printk( KERN_NOTICE "HTC Universal Core Hardware Driver\n" );
++
++ egpios = (volatile u_int16_t *)ioremap_nocache(HTCUNIVERSAL_EGPIO_BASE, sizeof *egpios );
++ if (!egpios)
++ return -ENODEV;
++ else
++ printk( KERN_NOTICE "HTC Universal Core: egpio at phy=0x%8.8x is at virt=0x%p\n",
++ HTCUNIVERSAL_EGPIO_BASE, egpios );
++
++ printk("Using stock HTC first stage bootloader\n");
++ htc_bootloader = 1;
++
++// htcuniversal_ll_pm_init();
++
++ return 0;
++}
++
++static int
++htcuniversal_core_remove( struct platform_device *dev )
++{
++
++ if (egpios != NULL)
++ iounmap( (void *)egpios );
++
++ return 0;
++}
++
++static struct platform_driver htcuniversal_core_driver = {
++ .driver = {
++ .name = "htcuniversal_core",
++ },
++ .probe = htcuniversal_core_probe,
++ .remove = htcuniversal_core_remove,
++ .suspend = htcuniversal_suspend,
++ .resume = htcuniversal_resume,
++};
++
++static int __init
++htcuniversal_core_init( void )
++{
++ return platform_driver_register( &htcuniversal_core_driver );
++}
++
++
++static void __exit
++htcuniversal_core_exit( void )
++{
++ platform_driver_unregister( &htcuniversal_core_driver );
++}
++
++module_init( htcuniversal_core_init );
++module_exit( htcuniversal_core_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Core Hardware Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,212 @@
++/*
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * History:
++ *
++ * 2004-03-01 Eddi De Pieri Adapted for htcuniversal using h3900_lcd.c
++ * 2004 Shawn Anderson Lcd hacking on htcuniversal
++ * see h3900_lcd.c for more history.
++ *
++ */
++
++#include <linux/types.h>
++#include <asm/arch/hardware.h> /* for pxa-regs.h (__REG) */
++#include <linux/platform_device.h>
++#include <asm/arch/pxa-regs.h> /* LCCR[0,1,2,3]* */
++#include <asm/arch/bitfield.h> /* for pxa-regs.h (Fld, etc) */
++#include <asm/arch/pxafb.h> /* pxafb_mach_info, set_pxa_fb_info */
++#include <asm/mach-types.h> /* machine_is_htcuniversal */
++#include <linux/lcd.h> /* lcd_device */
++#include <linux/err.h>
++#include <linux/delay.h>
++
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++static int saved_lcdpower=-1;
++
++static int powerup_lcd(void)
++{
++ printk( KERN_INFO "htcuniversal powerup_lcd: called\n");
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++#if 1
++ LCCR4|=LCCR4_PCDDIV;
++#endif
++ pxa_set_cken(CKEN_LCD, 0);
++
++ mdelay(100);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 1<<GPIOA_LCD_PWR5_ON);
++ mdelay(5);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 1<<GPIOB_LCD_PWR3_ON);
++ mdelay(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 1<<GPIOC_LCD_PWR1_ON);
++ mdelay(2);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 1<<GPIOC_LCD_PWR2_ON);
++ mdelay(20);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 1<<GPIOD_LCD_PWR4_ON);
++ mdelay(1);
++ pxa_set_cken(CKEN_LCD, 1);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,1);
++ SET_HTCUNIVERSAL_GPIO(LCD2,1);
++ return 0;
++}
++
++static int powerdown_lcd(void)
++{
++ printk( KERN_INFO "htcuniversal powerdown_lcd: called\n");
++
++#if 1
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ mdelay(100);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ mdelay(10);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++ pxa_set_cken(CKEN_LCD, 0);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,0);
++ SET_HTCUNIVERSAL_GPIO(LCD2,0);
++#else
++ pxa_set_cken(CKEN_LCD, 0);
++
++ SET_HTCUNIVERSAL_GPIO(LCD1,0);
++ SET_HTCUNIVERSAL_GPIO(LCD2,0);
++
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR2_ON, 0);
++ mdelay(100);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_LCD_PWR4_ON, 0);
++ mdelay(10);
++ asic3_set_gpio_out_a(&htcuniversal_asic3.dev, 1<<GPIOA_LCD_PWR5_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_LCD_PWR3_ON, 0);
++ mdelay(1);
++ asic3_set_gpio_out_c(&htcuniversal_asic3.dev, 1<<GPIOC_LCD_PWR1_ON, 0);
++#endif
++ return 0;
++}
++
++static int htcuniversal_lcd_set_power(struct lcd_device *lm, int power)
++{
++ /* Enable or disable power to the LCD (0: on; 4: off) */
++
++ if ( power < 1 ) {
++
++ powerup_lcd();
++
++ } else {
++
++ powerdown_lcd();
++
++ }
++
++ saved_lcdpower=power;
++
++ return 0;
++}
++
++static int htcuniversal_lcd_get_power(struct lcd_device *lm)
++{
++ /* Get the LCD panel power status (0: full on, 1..3: controller
++ * power on, flat panel power off, 4: full off) */
++
++ if (saved_lcdpower == -1)
++ {
++ htcuniversal_lcd_set_power(lm, 4);
++ saved_lcdpower=4;
++ }
++
++ return saved_lcdpower;
++}
++
++static struct lcd_ops htcuniversal_lcd_properties =
++{
++ .get_power = htcuniversal_lcd_get_power,
++ .set_power = htcuniversal_lcd_set_power,
++};
++
++static struct lcd_device *htcuniversal_lcd_dev;
++
++static int htcuniversal_lcd_probe(struct platform_device * dev)
++{
++ htcuniversal_lcd_dev = lcd_device_register("pxa2xx-fb", &dev->dev, NULL,
++ &htcuniversal_lcd_properties);
++ if (IS_ERR(htcuniversal_lcd_dev)) {
++ printk("htcuniversal_lcd_probe: error registering devices\n");
++ return -1;
++ }
++
++ return 0;
++}
++
++static int htcuniversal_lcd_remove(struct platform_device * dev)
++{
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 4);
++ lcd_device_unregister(htcuniversal_lcd_dev);
++
++ return 0;
++}
++
++static int htcuniversal_lcd_suspend(struct platform_device * dev, pm_message_t state)
++{
++// printk("htcuniversal_lcd_suspend: called.\n");
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 4);
++ return 0;
++}
++
++static int htcuniversal_lcd_resume(struct platform_device * dev)
++{
++// printk("htcuniversal_lcd_resume: called.\n");
++
++ /* */
++#if 1
++ LCCR4|=LCCR4_PCDDIV;
++#endif
++
++ htcuniversal_lcd_set_power(htcuniversal_lcd_dev, 0);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_lcd_driver = {
++ .driver = {
++ .name = "htcuniversal_lcd",
++ },
++ .probe = htcuniversal_lcd_probe,
++ .remove = htcuniversal_lcd_remove,
++ .suspend = htcuniversal_lcd_suspend,
++ .resume = htcuniversal_lcd_resume,
++};
++
++static int htcuniversal_lcd_init(void)
++{
++ if (!machine_is_htcuniversal())
++ return -ENODEV;
++
++ return platform_driver_register(&htcuniversal_lcd_driver);
++}
++
++static void htcuniversal_lcd_exit(void)
++{
++ lcd_device_unregister(htcuniversal_lcd_dev);
++ platform_driver_unregister(&htcuniversal_lcd_driver);
++}
++
++module_init(htcuniversal_lcd_init);
++module_exit(htcuniversal_lcd_exit);
++
++MODULE_AUTHOR("xanadux.org");
++MODULE_DESCRIPTION("Framebuffer driver for HTC Universal");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,167 @@
++
++/* Phone interface driver for Qualcomm MSM6250 on HTC Universal
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-04-21 Todd Blumer Created.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/serial.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++#include "htcuniversal_phone.h"
++
++static void phone_reset(void)
++{
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_RESET2, 0);
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_RESET,0);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++ mdelay(1);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 1<<GPIOD_BB_RESET1);
++ mdelay(20);
++ SET_HTCUNIVERSAL_GPIO(PHONE_RESET,1);
++ mdelay(200);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++}
++
++static void phone_off(void)
++{
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 1<<GPIOD_BB_RESET1);
++ mdelay(2000);
++ asic3_set_gpio_out_d(&htcuniversal_asic3.dev, 1<<GPIOD_BB_RESET1, 0);
++
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_RESET2, 1<<GPIOB_BB_RESET2);
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0);
++}
++
++static void
++htcuniversal_phone_configure( int state )
++{
++ int tries;
++ unsigned short statusb;
++
++ printk( KERN_NOTICE "htcuniversal configure phone: %d\n", state );
++ switch (state) {
++
++ case PXA_UART_CFG_PRE_STARTUP:
++ break;
++
++ case PXA_UART_CFG_POST_STARTUP:
++ /* pre-serial-up hardware configuration */
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_START,0); /* "bootloader" */
++ SET_HTCUNIVERSAL_GPIO(PHONE_UNKNOWN,0); /* not used */
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0); /* PHONE_OFF */
++
++ phone_reset();
++
++ SET_HTCUNIVERSAL_GPIO(PHONE_START,1); /* phone */
++
++ phone_reset();
++
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_READY, 0);
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_UNKNOWN3, 0);
++
++ /*
++ */
++ tries = 0;
++ do {
++ mdelay(10);
++ statusb = asic3_get_gpio_status_b( &htcuniversal_asic3.dev );
++ } while ( (statusb & (1<<GPIOB_UMTS_DCD)) == 0 && tries++ < 200);
++
++ printk("UMTS_DCD tries=%d of 200\n",tries);
++
++ tries = 0;
++ do {
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,1);
++ mdelay(10);
++ SET_HTCUNIVERSAL_GPIO(PHONE_OFF,0);
++ mdelay(20);
++ statusb = asic3_get_gpio_status_b( &htcuniversal_asic3.dev );
++ } while ( (statusb & (1<<GPIOB_BB_READY)) == 0 && tries++ < 200);
++
++ printk("BB_READY tries=%d of 200\n",tries);
++
++ break;
++
++ case PXA_UART_CFG_PRE_SHUTDOWN:
++
++ phone_off();
++
++ break;
++
++ default:
++ break;
++ }
++}
++
++
++static int
++htcuniversal_phone_probe( struct platform_device *dev )
++{
++ struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
++
++ /* configure phone UART */
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD );
++ pxa_gpio_mode( GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD );
++
++ funcs->configure = htcuniversal_phone_configure;
++
++ return 0;
++}
++
++static int
++htcuniversal_phone_remove( struct platform_device *dev )
++{
++ struct htcuniversal_phone_funcs *funcs = dev->dev.platform_data;
++
++ funcs->configure = NULL;
++
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_READY, 1<<GPIOB_BB_READY);
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_BB_UNKNOWN3, 1<<GPIOB_BB_UNKNOWN3);
++
++ return 0;
++}
++
++static struct platform_driver phone_driver = {
++ .driver = {
++ .name = "htcuniversal_phone",
++ },
++ .probe = htcuniversal_phone_probe,
++ .remove = htcuniversal_phone_remove,
++};
++
++static int __init
++htcuniversal_phone_init( void )
++{
++ printk(KERN_NOTICE "htcuniversal Phone Driver\n");
++ return platform_driver_register( &phone_driver );
++}
++
++static void __exit
++htcuniversal_phone_exit( void )
++{
++ platform_driver_unregister( &phone_driver );
++}
++
++module_init( htcuniversal_phone_init );
++module_exit( htcuniversal_phone_exit );
++
++MODULE_AUTHOR("Todd Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Phone Support Driver");
++MODULE_LICENSE("GPL");
++
++/* vim600: set noexpandtab sw=8 ts=8 :*/
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,16 @@
++/*
++ * Bluetooth support file for calling bluetooth configuration functions
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * 2005-06 Todd Blumer Initial Revision
++ */
++
++#ifndef _HTCUNIVERSAL_PHONE_H
++#define _HTCUNIVERSAL_PHONE_H
++
++struct htcuniversal_phone_funcs {
++ void (*configure) ( int state );
++};
++
++#endif
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,69 @@
++/*
++ * MyPal 716 power management support for the original HTC IPL in DoC G3
++ *
++ * Use consistent with the GNU GPL is permitted, provided that this
++ * copyright notice is preserved in its entirety in all copies and
++ * derived works.
++ *
++ * Copyright (C) 2005 Pawel Kolodziejski
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/pm.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa-pm_ll.h>
++
++#ifdef CONFIG_PM
++
++static u32 *addr_a0040000;
++static u32 *addr_a0040004;
++static u32 *addr_a0040008;
++static u32 *addr_a004000c;
++
++static u32 save_a0040000;
++static u32 save_a0040004;
++static u32 save_a0040008;
++static u32 save_a004000c;
++
++static void htcuniversal_pxa_ll_pm_suspend(unsigned long resume_addr)
++{
++ save_a0040000 = *addr_a0040000;
++ save_a0040004 = *addr_a0040004;
++ save_a0040008 = *addr_a0040008;
++ save_a004000c = *addr_a004000c;
++
++ /* jump to PSPR */
++ *addr_a0040000 = 0xe3a00101; // mov r0, #0x40000000
++ *addr_a0040004 = 0xe380060f; // orr r0, r0, #0x0f000000
++ *addr_a0040008 = 0xe3800008; // orr r0, r0, #8
++ *addr_a004000c = 0xe590f000; // ldr pc, [r0]
++}
++
++static void htcuniversal_pxa_ll_pm_resume(void)
++{
++ *addr_a0040000 = save_a0040000;
++ *addr_a0040004 = save_a0040004;
++ *addr_a0040008 = save_a0040008;
++ *addr_a004000c = save_a004000c;
++}
++
++static struct pxa_ll_pm_ops htcuniversal_ll_pm_ops = {
++ .suspend = htcuniversal_pxa_ll_pm_suspend,
++ .resume = htcuniversal_pxa_ll_pm_resume,
++};
++
++void htcuniversal_ll_pm_init(void) {
++ addr_a0040000 = phys_to_virt(0xa0040000);
++ addr_a0040004 = phys_to_virt(0xa0040004);
++ addr_a0040008 = phys_to_virt(0xa0040008);
++ addr_a004000c = phys_to_virt(0xa004000c);
++
++ pxa_pm_set_ll_ops(&htcuniversal_ll_pm_ops);
++}
++#endif /* CONFIG_PM */
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,97 @@
++/*
++ * pda_power driver for HTC Universal
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or (at
++ * your option) any later version.
++ *
++ */
++
++#include <linux/platform_device.h>
++#include <linux/module.h>
++#include <linux/pda_power.h>
++#include <linux/soc/asic3_base.h>
++
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static void charge_on(int flags)
++{
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev, 1<<GPIOB_CHARGE_EN, 0);
++}
++
++static int ac_on(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(POWER_DET) == 0);
++}
++
++static int usb_on(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(USB_DET) == 0);
++}
++
++static char *supplicants[] = {
++ "ds2760-battery.0", "backup-battery"
++};
++
++static struct pda_power_pdata power_pdata = {
++ .is_ac_online = ac_on,
++ .is_usb_online = usb_on,
++ .set_charge = charge_on,
++ .supplied_to = supplicants,
++ .num_supplicants = ARRAY_SIZE(supplicants),
++};
++
++static struct resource power_resources[] = {
++ [0] = {
++ .name = "ac",
++ .start = HTCUNIVERSAL_IRQ(POWER_DET),
++ .end = HTCUNIVERSAL_IRQ(POWER_DET),
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
++ },
++ [1] = {
++ .name = "usb",
++ .start = HTCUNIVERSAL_IRQ(USB_DET),
++ .end = HTCUNIVERSAL_IRQ(USB_DET),
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
++ },
++};
++
++static void dev_release(struct device *dev)
++{
++ return;
++}
++
++static struct platform_device power_dev =
++{
++ .name = "pda-power",
++ .id = -1,
++ .resource = power_resources,
++ .num_resources = ARRAY_SIZE(power_resources),
++ .dev =
++ {
++ .platform_data = &power_pdata,
++ .release = dev_release,
++ },
++};
++
++static int htcuniversal_power_init(void)
++{
++ return platform_device_register(&power_dev);
++}
++
++static void htcuniversal_power_exit(void)
++{
++ platform_device_unregister(&power_dev);
++
++ return;
++}
++
++module_init(htcuniversal_power_init);
++module_exit(htcuniversal_power_exit);
++
++MODULE_DESCRIPTION("Power driver for HTC Universal");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,490 @@
++/* Touch screen driver for the TI something-or-other
++ *
++ * Copyright © 2005 SDG Systems, LLC
++ *
++ * Based on code that was based on the SAMCOP driver.
++ * Copyright © 2003, 2004 Compaq Computer Corporation.
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Keith Packard <keith.packard@hp.com>
++ * May 2003
++ *
++ * Updates:
++ *
++ * 2004-02-11 Michael Opdenacker Renamed names from samcop to shamcop,
++ * Goal:support HAMCOP and SAMCOP.
++ * 2004-02-14 Michael Opdenacker Temporary fix for device id handling
++ *
++ * 2005-02-18 Aric Blumer Converted basic structure to support hx4700
++ *
++ * 2005-06-07 Aric Blumer Added tssim device handling so we can
++ * hook in the fbvncserver.
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/cdev.h>
++#include <linux/interrupt.h>
++#include <linux/sched.h>
++#include <linux/pm.h>
++#include <linux/delay.h>
++#include <linux/input.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/mach/irq.h>
++#include <asm/io.h>
++
++/* remove me */
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++#include <asm/mach-types.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++
++
++#include "tsc2046_ts.h"
++
++enum touchscreen_state {
++ STATE_WAIT_FOR_TOUCH, /* Waiting for a PEN interrupt */
++ STATE_SAMPLING /* Actively sampling ADC */
++};
++
++struct touchscreen_data {
++ enum touchscreen_state state;
++ struct timer_list timer;
++ int irq;
++ struct input_dev *input;
++ /* */
++ int port;
++ int clock;
++ int pwrbit_X;
++ int pwrbit_Y;
++ int (*pen_down)(void);
++};
++
++static unsigned long poll_sample_time = 10; /* Sample every 10 milliseconds */
++
++static struct touchscreen_data *ts_data;
++
++static int irqblock;
++
++module_param(poll_sample_time, ulong, 0644);
++MODULE_PARM_DESC(poll_sample_time, "Poll sample time");
++
++static inline void
++report_touchpanel(struct touchscreen_data *ts, int pressure, int x, int y)
++{
++ input_report_abs(ts->input, ABS_PRESSURE, pressure);
++ input_report_abs(ts->input, ABS_X, x);
++ input_report_abs(ts->input, ABS_Y, y);
++ input_sync(ts->input);
++}
++
++static void start_read(struct touchscreen_data *touch);
++
++static irqreturn_t
++pen_isr(int irq, void *irq_desc)
++{
++ struct touchscreen_data *ts = ts_data;
++
++ if(irq == ts->irq /* && !irqblock */) {
++ irqblock = 1;
++
++ /*
++ * Disable the pen interrupt. It's reenabled when the user lifts the
++ * pen.
++ */
++ disable_irq(ts->irq);
++
++ if (ts->state == STATE_WAIT_FOR_TOUCH) {
++ ts->state = STATE_SAMPLING;
++ start_read(ts);
++ } else {
++ /* Shouldn't happen */
++ printk(KERN_ERR "Unexpected ts interrupt\n");
++ }
++
++ }
++ return IRQ_HANDLED;
++}
++
++static void
++ssp_init(int port, int clock)
++{
++
++ pxa_set_cken(clock, 0);
++
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_CLK_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_FRM_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DO_MD);
++ pxa_gpio_mode(GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DI_MD);
++
++ SET_HTCUNIVERSAL_GPIO(SPI_FRM,1);
++
++ /* *** Set up the SPI Registers *** */
++ SSCR0_P(port) =
++ SSCR0_EDSS /* Extended Data Size Select */
++ | SSCR0_SerClkDiv(7) /* Serial Clock Rate */
++ /* Synchronous Serial Enable (Disable for now) */
++ | SSCR0_Motorola /* Motorola SPI Interface */
++ | SSCR0_DataSize(8) /* Data Size Select (24-bit) */
++ ;
++ SSCR1_P(port) = 0;
++ SSPSP_P(port) = 0;
++
++ /* Clear the Status */
++ SSSR_P(port) = SSSR_P(port) & 0x00fcfffc;
++
++ /* Now enable it */
++ SSCR0_P(port) =
++ SSCR0_EDSS /* Extended Data Size Select */
++ | SSCR0_SerClkDiv(7) /* Serial Clock Rate */
++ | SSCR0_SSE /* Synchronous Serial Enable */
++ | SSCR0_Motorola /* Motorola SPI Interface */
++ | SSCR0_DataSize(8) /* Data Size Select (24-bit) */
++ ;
++
++ pxa_set_cken(clock, 1);
++}
++
++static void
++start_read(struct touchscreen_data *touch)
++{
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ int i;
++
++ /* Write here to the serial port. We request X and Y only for now.
++ * Then we have to wait for poll_sample_time before we read out the serial
++ * port. Then, when we read it out, we check to see if the pen is still
++ * down. If so, then we issue another request here.
++ */
++#define TS_SAMPLES 7
++
++ /*
++ * We do four samples for each, and throw out the highest and lowest, then
++ * average the other two.
++ */
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ while(!(SSSR_P(touch->port) & SSSR_TNF))
++ ;
++ /* It's not full. Write the command for X */
++ SSDR_P(touch->port) = (TSC2046_SAMPLE_X|(touch->pwrbit_X))<<16;
++ }
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ while(!(SSSR_P(touch->port) & SSSR_TNF))
++ ;
++ /* It's not full. Write the command for Y */
++ SSDR_P(touch->port) = (TSC2046_SAMPLE_Y|(touch->pwrbit_Y))<<16;
++ }
++
++ /*
++ * Enable the timer. We should get an interrupt, but we want keep a timer
++ * to ensure that we can detect missing data
++ */
++ mod_timer(&touch->timer, jiffies + inc);
++}
++
++static void
++ts_timer_callback(unsigned long data)
++{
++ struct touchscreen_data *ts = (struct touchscreen_data *)data;
++ int x, a[TS_SAMPLES], y;
++ static int oldx, oldy;
++ int ssrval;
++
++ /*
++ * Check here to see if there is anything in the SPI FIFO. If so,
++ * return it if there has been a change. If not, then we have a
++ * timeout. Generate an erro somehow.
++ */
++ ssrval = SSSR_P(ts->port);
++
++ if(ssrval & SSSR_RNE) { /* Look at Rx Not Empty bit */
++ int number_of_entries_in_fifo;
++
++ /* The FIFO is not emtpy. Good! Now make sure there are at least two
++ * entries. (Should be two exactly.) */
++
++ number_of_entries_in_fifo = ((ssrval >> 12) & 0xf) + 1;
++
++ if(number_of_entries_in_fifo < TS_SAMPLES * 2) {
++ /* Not ready yet. Come back later. */
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ mod_timer(&ts->timer, jiffies + inc);
++ return;
++ }
++
++ if(number_of_entries_in_fifo == TS_SAMPLES * 2) {
++ int i, j;
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ a[i] = SSDR_P(ts->port);
++ }
++ /* Sort them (bubble) */
++ for(j = TS_SAMPLES - 1; j > 0; j--) {
++ for(i = 0; i < j; i++) {
++ if(a[i] > a[i + 1]) {
++ int tmp;
++ tmp = a[i+1];
++ a[i+1] = a[i];
++ a[i] = tmp;
++ }
++ }
++ }
++
++ /* Take the average of the middle two */
++ /* x = (a[TS_SAMPLES/2 - 1] + a[TS_SAMPLES/2] + a[TS_SAMPLES/2+1] + a[TS_SAMPLES/2+2]) >> 2; */
++ x = a[TS_SAMPLES/2];
++
++ for(i = 0; i < TS_SAMPLES; i++) {
++ a[i] = SSDR_P(ts->port);
++ }
++ /* Sort them (bubble) */
++ for(j = TS_SAMPLES - 1; j > 0; j--) {
++ for(i = 0; i < j; i++) {
++ if(a[i] > a[i + 1]) {
++ int tmp;
++ tmp = a[i+1];
++ a[i+1] = a[i];
++ a[i] = tmp;
++ }
++ }
++ }
++
++
++ /* Take the average of the middle two */
++ /* y = (a[TS_SAMPLES/2 - 1] + a[TS_SAMPLES/2] + a[TS_SAMPLES/2+1] + a[TS_SAMPLES/2+2]) >> 2; */
++ y = a[TS_SAMPLES/2];
++ } else {
++ /* We have an error! Too many entries. */
++ printk(KERN_ERR "TS: Expected %d entries. Got %d\n", TS_SAMPLES*2, number_of_entries_in_fifo);
++ /* Try to clear the FIFO */
++ while(number_of_entries_in_fifo--) {
++ (void)SSDR_P(ts->port);
++ }
++
++ if (ts->pen_down())
++ start_read(ts);
++
++ return;
++ }
++ } else {
++ /* Not ready yet. Come back later. */
++ unsigned long inc = (poll_sample_time * HZ) / 1000;
++ mod_timer(&ts->timer, jiffies + inc);
++ return;
++ }
++
++ /*
++ * Now we check to see if the pen is still down. If it is, then call
++ * start_read().
++ */
++ if (ts->pen_down())
++ {
++ /* Still down */
++ if(oldx != x || oldy != y) {
++ oldx = x;
++ oldy = y;
++ report_touchpanel(ts, 1, x, y);
++ }
++ start_read(ts);
++ } else {
++ /* Up */
++ report_touchpanel(ts, 0, 0, 0);
++ irqblock = 0;
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ /* Re-enable pen down interrupt */
++ enable_irq(ts->irq);
++ }
++}
++
++static int pen_down(void)
++{
++ return ( asic3_get_gpio_status_a( &htcuniversal_asic3.dev ) & (1<<GPIOA_TOUCHSCREEN_N)) == 0 ;
++}
++
++static int
++ts_probe (struct platform_device *dev)
++{
++ int retval;
++ struct touchscreen_data *ts;
++ struct tsc2046_mach_info *mach = dev->dev.platform_data;
++
++ printk("htcuniversal: ts_probe\n");
++
++ ts = ts_data = kmalloc (sizeof (*ts), GFP_KERNEL);
++ if (ts == NULL) {
++ printk( KERN_NOTICE "htcuniversal_ts: unable to allocate memory\n" );
++ return -ENOMEM;
++ }
++ memset (ts, 0, sizeof (*ts));
++
++ ts->input = input_allocate_device();
++ if (ts->input == NULL) {
++ printk( KERN_NOTICE "htcuniversal_ts: unable to allocation touchscreen input\n" );
++ kfree(ts);
++ return -ENOMEM;
++ }
++ ts->input->evbit[0] = BIT(EV_ABS);
++ ts->input->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
++ ts->input->absmin[ABS_X] = 0;
++ ts->input->absmax[ABS_X] = 32767;
++ ts->input->absmin[ABS_Y] = 0;
++ ts->input->absmax[ABS_Y] = 32767;
++ ts->input->absmin[ABS_PRESSURE] = 0;
++ ts->input->absmax[ABS_PRESSURE] = 1;
++
++ ts->input->name = "htcuniversal_ts";
++ ts->input->phys = "touchscreen/htcuniversal_ts";
++ ts->input->private = ts;
++
++ input_register_device(ts->input);
++
++ ts->timer.function = ts_timer_callback;
++ ts->timer.data = (unsigned long)ts;
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ init_timer (&ts->timer);
++
++ platform_set_drvdata(dev, ts);
++
++ ts->port=-1;
++
++ if (mach) {
++ ts->port = mach->port;
++ ts->clock = mach->clock;
++ ts->pwrbit_X = mach->pwrbit_X;
++ ts->pwrbit_Y = mach->pwrbit_Y;
++
++ /* static irq */
++ if (mach->irq)
++ ts->irq = mach->irq;
++
++ if (mach->pen_down)
++ ts->pen_down=mach->pen_down;
++ }
++
++ if (ts->port == -1)
++ {
++ printk("tsc2046: your device is not supported by this driver\n");
++ return -ENODEV;
++ }
++
++ /* *** Initialize the SSP interface *** */
++ ssp_init(ts->port, ts->clock);
++
++ while(!(SSSR_P(ts->port) & SSSR_TNF))
++ ;
++ SSDR_P(ts->port) = (TSC2046_SAMPLE_X|(ts->pwrbit_X))<<16;
++
++ for(retval = 0; retval < 100; retval++) {
++ if(SSSR_P(ts->port) & SSSR_RNE) {
++ while(SSSR_P(ts->port) & SSSR_RNE) {
++ (void)SSDR_P(ts->port);
++ }
++ break;
++ }
++ mdelay(1);
++ }
++
++ if (machine_is_htcuniversal() )
++ {
++ ts->irq = asic3_irq_base( &htcuniversal_asic3.dev ) + ASIC3_GPIOA_IRQ_BASE + GPIOA_TOUCHSCREEN_N;
++ ts->pen_down=pen_down;
++ }
++
++ retval = request_irq(ts->irq, pen_isr, IRQF_DISABLED, "tsc2046_ts", ts);
++ if(retval) {
++ printk("Unable to get interrupt\n");
++ input_unregister_device (ts->input);
++ return -ENODEV;
++ }
++ set_irq_type(ts->irq, IRQ_TYPE_EDGE_FALLING);
++
++ return 0;
++}
++
++static int
++ts_remove (struct platform_device *dev)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ input_unregister_device (ts->input);
++ del_timer_sync (&ts->timer);
++ free_irq (ts->irq, ts);
++ pxa_set_cken(ts->clock, 0);
++
++ kfree(ts);
++ return 0;
++}
++
++static int
++ts_suspend (struct platform_device *dev, pm_message_t state)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ disable_irq(ts->irq);
++
++ printk("htcuniversal_ts2_suspend: called.\n");
++ return 0;
++}
++
++static int
++ts_resume (struct platform_device *dev)
++{
++ struct touchscreen_data *ts = platform_get_drvdata(dev);
++
++ ts->state = STATE_WAIT_FOR_TOUCH;
++ ssp_init(ts->port, ts->clock);
++ enable_irq(ts->irq);
++
++ printk("htcuniversal_ts2_resume: called.\n");
++ return 0;
++}
++
++static struct platform_driver ts_driver = {
++ .probe = ts_probe,
++ .remove = ts_remove,
++ .suspend = ts_suspend,
++ .resume = ts_resume,
++ .driver = {
++ .name = "htcuniversal_ts",
++ },
++};
++
++
++static int
++ts_module_init (void)
++{
++ printk(KERN_NOTICE "HTC Universal Touch Screen Driver\n");
++
++ return platform_driver_register(&ts_driver);
++}
++
++static void
++ts_module_cleanup (void)
++{
++ platform_driver_unregister (&ts_driver);
++}
++
++module_init(ts_module_init);
++module_exit(ts_module_cleanup);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
++MODULE_DESCRIPTION("HTC Universal Touch Screen Driver");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,71 @@
++
++/*
++ *
++ * htcuniversal_udc.c:
++ * htcuniversal specific code for the pxa27x usb device controller.
++ *
++ * Use consistent with the GNU GPL is permitted.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/udc.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/arch/htcuniversal-gpio.h>
++#include <asm/arch/htcuniversal-asic.h>
++
++static void htcuniversal_udc_command(int cmd)
++{
++ switch (cmd) {
++ case PXA2XX_UDC_CMD_DISCONNECT:
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev,
++ 1<<GPIOB_USB_PUEN, 0);
++// SET_HTCUNIVERSAL_GPIO(USB_PUEN,0);
++ break;
++ case PXA2XX_UDC_CMD_CONNECT:
++ asic3_set_gpio_out_b(&htcuniversal_asic3.dev,
++ 1<<GPIOB_USB_PUEN, 1<<GPIOB_USB_PUEN);
++// SET_HTCUNIVERSAL_GPIO(USB_PUEN,1);
++ break;
++ default:
++ printk("_udc_control: unknown command!\n");
++ break;
++ }
++}
++
++static int htcuniversal_udc_is_connected(void)
++{
++ return (GET_HTCUNIVERSAL_GPIO(USB_DET) != 0);
++}
++
++static struct pxa2xx_udc_mach_info htcuniversal_udc_info __initdata = {
++ .udc_is_connected = htcuniversal_udc_is_connected,
++ .udc_command = htcuniversal_udc_command,
++};
++
++static int htcuniversal_udc_probe(struct platform_device * dev)
++{
++ asic3_set_gpio_dir_b(&htcuniversal_asic3.dev, 1<<GPIOB_USB_PUEN, 1<<GPIOB_USB_PUEN);
++
++ pxa_set_udc_info(&htcuniversal_udc_info);
++ return 0;
++}
++
++static struct platform_driver htcuniversal_udc_driver = {
++ .driver = {
++ .name = "htcuniversal_udc",
++ },
++ .probe = htcuniversal_udc_probe,
++};
++
++static int __init htcuniversal_udc_init(void)
++{
++ return platform_driver_register(&htcuniversal_udc_driver);
++}
++
++module_init(htcuniversal_udc_init);
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,20 @@
++/*
++ * temporary TSC2046 touchscreen hack
++ */
++
++#ifndef _TSC2046_TS_H
++#define _TSC2046_TS_H
++
++struct tsc2046_mach_info {
++ int port;
++ int clock;
++ int pwrbit_X;
++ int pwrbit_Y;
++ int irq;
++ int (*pen_down)(void);
++};
++
++#define TSC2046_SAMPLE_X 0xd0
++#define TSC2046_SAMPLE_Y 0x90
++
++#endif
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/Kconfig 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -147,6 +147,14 @@
+ select PXA27x
+ select IWMMXT
+
++config MACH_HTCUNIVERSAL
++ bool "HTC Universal"
++ select PXA27x
++ help
++ Say Y here if you intend to run this kernel on a
++ HTC Universal. Currently there is only basic support
++ for this PDA.
++
+ endchoice
+
+ choice
+@@ -204,6 +212,86 @@
+
+ endif
+
++if MACH_HTCUNIVERSAL
++
++menu "HTC Universal support"
++
++config HTCUNIVERSAL_CORE
++ tristate "HTC Universal core"
++ depends on MACH_HTCUNIVERSAL
++ help
++ This selection enables HTC Universal core support.
++
++config HTCUNIVERSAL_UDC
++ bool "USB Device Controller support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && USB_PXA27X
++ help
++ Enables HTC Universal specific USB detection
++
++config HTCUNIVERSAL_POWER
++ tristate "HTC Universal power"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ This selection enables HTC Universal power monitoring
++ hardware support (through ASIC3).
++
++config HTCUNIVERSAL_BACKLIGHT
++ bool "HTC Universal Backlight"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD backlight.
++
++config HTCUNIVERSAL_LCD
++ tristate "HTC Universal LCD"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && LCD_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD display.
++
++config HTCUNIVERSAL_TS2
++ tristate "HTC Universal Touchscreen (old)"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ Enable support for the HTC Universal Touchscreen Panel.
++
++config HTCUNIVERSAL_BUTTONS
++ tristate "HTC Universal buttons support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++
++config HTCUNIVERSAL_BLUETOOTH
++ tristate "HTC Universal Bluetooth"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the TI BRF6150 Bluetooth Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_ASIC3_LEDS
++ tristate "HTC Universal ASIC3 LED support"
++ select LEDS_ASIC3
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ ---help---
++ Support for right (colors red+green+(amber)) and left (green+blue) led
++ Off/on hook keys LED backlight
++ Keyboard backlight
++ Vibra
++ Flashlight
++
++config HTCUNIVERSAL_PHONE
++ tristate "HTC Universal Phone"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the Qualcomm MSM6520 Phone Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_AK4641
++ depends on SND && I2C
++ tristate "AK4641 chipset support"
++
++endmenu
++
++endif
++
+ endmenu
+
+ config MACH_POODLE
+@@ -289,4 +377,3 @@
+ depends on (PXA25x || PXA27x) && INPUT
+
+ endif
+-
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/Makefile 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/Makefile 2008-06-01 18:50:46.000000000 +0100
+@@ -36,6 +36,7 @@
+ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
+ obj-$(CONFIG_MACH_TOSA) += tosa.o
+ obj-$(CONFIG_MACH_EM_X270) += em-x270.o
++obj-$(CONFIG_MACH_HTCUNIVERSAL) += htcuniversal/
+ obj-$(CONFIG_MACH_MAGICIAN) += magician.o
+ obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
+
+Index: linux-2.6.26-rc4/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/leds/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/leds/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -147,6 +147,13 @@
+ To compile this driver as a module, choose M here: the
+ module will be called leds-clevo-mail.
+
++config LEDS_ASIC3
++ tristate "LED Support for the HTC ASIC3 chip"
++ depends on LEDS_CLASS && HTC_ASIC3
++ help
++ This option enables support for the LEDs connected to the
++ HTC ASIC3 chip.
++
+ comment "LED Triggers"
+
+ config LEDS_TRIGGERS
+Index: linux-2.6.26-rc4/drivers/leds/leds-asic3.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/leds/leds-asic3.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,189 @@
++/*
++ * LEDs support for HTC ASIC3 devices.
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include "leds.h"
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach-types.h>
++#include <asm/hardware/asic3_leds.h>
++
++#ifdef DEBUG
++#define dbg(msg, ...) printk(msg, __VA_ARGS__)
++#else
++#define dbg(msg, ...)
++#endif
++
++static
++void asic3_leds_set(struct led_classdev *led_cdev, enum led_brightness b)
++{
++ struct asic3_led *led = container_of(led_cdev, struct asic3_led,
++ led_cdev);
++ struct asic3_leds_machinfo *machinfo = led->machinfo;
++ struct device *asic3_dev = &machinfo->asic3_pdev->dev;
++
++ dbg("%s:%s %d(%d)-%s %d\n", __FILE__, __FUNCTION__, led->hw_num,
++ led->gpio_num, led->led_cdev.name, b);
++
++ if (led->hw_num == -1) {
++ asic3_gpio_set_value(asic3_dev, led->gpio_num, b);
++ return;
++ }
++
++ if (b == LED_OFF) {
++ asic3_set_led(asic3_dev, led->hw_num, 0, 16, 6);
++ asic3_set_gpio_out_c(asic3_dev, led->hw_num, 0);
++ }
++ else {
++ asic3_set_gpio_out_c(asic3_dev, led->hw_num, led->hw_num);
++ #ifdef CONFIG_LEDS_TRIGGER_HWTIMER
++ if (led_cdev->trigger && led_cdev->trigger->is_led_supported &&
++ (led_cdev->trigger->is_led_supported(led_cdev) &
++ LED_SUPPORTS_HWTIMER)) {
++ struct hwtimer_data *td = led_cdev->trigger_data;
++ if (!td) return;
++ asic3_set_led(asic3_dev, led->hw_num, td->delay_on/8,
++ (td->delay_on + td->delay_off)/8, 6);
++ }
++ else
++ #endif
++ asic3_set_led(asic3_dev, led->hw_num, 16, 16, 6);
++ }
++
++ return;
++}
++
++static
++int asic3_leds_probe(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int ret, i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ // Turn on clocks early, for the case if trigger would enable
++ // led immediately after led_classdev_register().
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2);
++
++ for (i = 0; i < machinfo->num_leds; i++) {
++ leds[i].machinfo = machinfo;
++ leds[i].led_cdev.brightness_set = asic3_leds_set;
++ ret = led_classdev_register(&pdev->dev, &leds[i].led_cdev);
++ if (ret) {
++ printk(KERN_ERR "Error: can't register %s led\n",
++ leds[i].led_cdev.name);
++ goto out_err;
++ }
++ }
++
++ return 0;
++
++out_err:
++ while (--i >= 0) led_classdev_unregister(&leds[i].led_cdev);
++
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ 0 | 0 | 0);
++
++ return ret;
++}
++
++static
++int asic3_leds_remove(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_unregister(&leds[i].led_cdev);
++
++ asic3_set_clock_cdex(&machinfo->asic3_pdev->dev,
++ CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2,
++ 0 | 0 | 0);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++
++static
++int asic3_leds_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_suspend(&leds[i].led_cdev);
++
++ return 0;
++}
++
++static
++int asic3_leds_resume(struct platform_device *pdev)
++{
++ struct asic3_leds_machinfo *machinfo = pdev->dev.platform_data;
++ struct asic3_led *leds = machinfo->leds;
++ int i = 0;
++
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++
++ for (i = 0; i < machinfo->num_leds; i++)
++ led_classdev_resume(&leds[i].led_cdev);
++
++ return 0;
++}
++
++#endif
++
++static
++struct platform_driver asic3_leds_driver = {
++ .probe = asic3_leds_probe,
++ .remove = asic3_leds_remove,
++#ifdef CONFIG_PM
++ .suspend = asic3_leds_suspend,
++ .resume = asic3_leds_resume,
++#endif
++ .driver = {
++ .name = "asic3-leds",
++ },
++};
++
++int asic3_leds_register(void)
++{
++ dbg("%s:%s\n", __FILE__, __FUNCTION__);
++ return platform_driver_register(&asic3_leds_driver);
++}
++
++void asic3_leds_unregister(void)
++{
++ platform_driver_unregister(&asic3_leds_driver);
++ return;
++}
++
++EXPORT_SYMBOL_GPL(asic3_leds_register);
++EXPORT_SYMBOL_GPL(asic3_leds_unregister);
++
++MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
++MODULE_DESCRIPTION("HTC ASIC3 LEDs driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/drivers/mfd/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mfd/Kconfig 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mfd/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -44,6 +44,16 @@
+ help
+ Support for TI TSC2101 Touchscreen and Audio Codec
+
++config HTC_ASIC3
++ tristate "HTC ASIC3 (iPAQ h1900/h3900/h4000/hx4700/rx3000) support"
++
++config HTC_ASIC3_DS1WM
++ bool "Support HTC ASIC3 builtin DS1WM block"
++ help
++ Choose Y here if you want to include support for ASIC3's builtin
++ W1 controller. Some devices do not use it, and yet other have
++ separate DS1WM controller. For them, choose N.
++
+ endmenu
+
+ menu "Multimedia Capabilities Port drivers"
+Index: linux-2.6.26-rc4/drivers/mfd/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mfd/Makefile 2008-06-01 18:49:43.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mfd/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -2,6 +2,8 @@
+ # Makefile for multifunction miscellaneous devices
+ #
+
++obj-$(CONFIG_HTC_ASIC3) += asic3_base.o soc-core.o
++
+ obj-$(CONFIG_MFD_SM501) += sm501.o
+ obj-$(CONFIG_MFD_ASIC3) += asic3.o
+
+Index: linux-2.6.26-rc4/drivers/mfd/asic3_base.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mfd/asic3_base.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,1208 @@
++/*
++ * Driver interface to HTC "ASIC3"
++ *
++ * Copyright 2001 Compaq Computer Corporation.
++ * Copyright 2004-2005 Phil Blundell
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Andrew Christian
++ * <Andrew.Christian@compaq.com>
++ * October 2001
++ */
++
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/irq.h>
++#include <linux/clk.h>
++#include <linux/ds1wm.h>
++#include <asm/arch/clock.h>
++
++#include <asm/hardware.h>
++#include <asm/irq.h>
++#include <asm/io.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include <linux/soc/asic3_base.h>
++#include <linux/soc/tmio_mmc.h>
++#include "soc-core.h"
++
++
++struct asic3_data {
++ void *mapping;
++ unsigned int bus_shift;
++ int irq_base;
++ int irq_nr;
++
++ u16 irq_bothedge[4];
++ struct device *dev;
++
++ struct platform_device *mmc_dev;
++};
++
++static DEFINE_SPINLOCK(asic3_gpio_lock);
++
++static int asic3_remove(struct platform_device *dev);
++
++static inline unsigned long asic3_address(struct device *dev,
++ unsigned int reg)
++{
++ struct asic3_data *adata;
++
++ adata = (struct asic3_data *)dev->driver_data;
++
++ return (unsigned long)adata->mapping + (reg >> (2 - adata->bus_shift));
++}
++
++void asic3_write_register(struct device *dev, unsigned int reg, u32 value)
++{
++ __raw_writew(value, asic3_address(dev, reg));
++}
++EXPORT_SYMBOL(asic3_write_register);
++
++u32 asic3_read_register(struct device *dev, unsigned int reg)
++{
++ return __raw_readw(asic3_address(dev, reg));
++}
++EXPORT_SYMBOL(asic3_read_register);
++
++static inline void __asic3_write_register(struct asic3_data *asic,
++ unsigned int reg, u32 value)
++{
++ __raw_writew(value, (unsigned long)asic->mapping
++ + (reg >> (2 - asic->bus_shift)));
++}
++
++static inline u32 __asic3_read_register(struct asic3_data *asic,
++ unsigned int reg)
++{
++ return __raw_readw((unsigned long)asic->mapping
++ + (reg >> (2 - asic->bus_shift)));
++}
++
++#define ASIC3_GPIO_FN(get_fn_name, set_fn_name, REG) \
++u32 get_fn_name(struct device *dev) \
++{ \
++ return asic3_read_register(dev, REG); \
++} \
++EXPORT_SYMBOL(get_fn_name); \
++ \
++void set_fn_name(struct device *dev, u32 bits, u32 val) \
++{ \
++ unsigned long flags; \
++ \
++ spin_lock_irqsave(&asic3_gpio_lock, flags); \
++ val |= (asic3_read_register(dev, REG) & ~bits); \
++ asic3_write_register(dev, REG, val); \
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags); \
++} \
++EXPORT_SYMBOL(set_fn_name);
++
++#define ASIC3_GPIO_REGISTER(ACTION, action, fn, FN) \
++ ASIC3_GPIO_FN(asic3_get_gpio_ ## action ## _ ## fn , \
++ asic3_set_gpio_ ## action ## _ ## fn , \
++ _IPAQ_ASIC3_GPIO_ ## FN ## _Base \
++ + _IPAQ_ASIC3_GPIO_ ## ACTION )
++
++#define ASIC3_GPIO_FUNCTIONS(fn, FN) \
++ ASIC3_GPIO_REGISTER(Direction, dir, fn, FN) \
++ ASIC3_GPIO_REGISTER(Out, out, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepMask, sleepmask, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepOut, sleepout, fn, FN) \
++ ASIC3_GPIO_REGISTER(BattFaultOut, battfaultout, fn, FN) \
++ ASIC3_GPIO_REGISTER(AltFunction, alt_fn, fn, FN) \
++ ASIC3_GPIO_REGISTER(SleepConf, sleepconf, fn, FN) \
++ ASIC3_GPIO_REGISTER(Status, status, fn, FN)
++
++#if 0
++ ASIC3_GPIO_REGISTER(Mask, mask, fn, FN)
++ ASIC3_GPIO_REGISTER(TriggerType, trigtype, fn, FN)
++ ASIC3_GPIO_REGISTER(EdgeTrigger, rising, fn, FN)
++ ASIC3_GPIO_REGISTER(LevelTrigger, triglevel, fn, FN)
++ ASIC3_GPIO_REGISTER(IntStatus, intstatus, fn, FN)
++#endif
++
++ASIC3_GPIO_FUNCTIONS(a, A)
++ASIC3_GPIO_FUNCTIONS(b, B)
++ASIC3_GPIO_FUNCTIONS(c, C)
++ASIC3_GPIO_FUNCTIONS(d, D)
++
++int asic3_gpio_get_value(struct device *dev, unsigned gpio)
++{
++ u32 mask = ASIC3_GPIO_bit(gpio);
++ printk("%s(%d)\n", __FUNCTION__, gpio);
++ switch (gpio >> 4) {
++ case _IPAQ_ASIC3_GPIO_BANK_A:
++ return asic3_get_gpio_status_a(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_B:
++ return asic3_get_gpio_status_b(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_C:
++ return asic3_get_gpio_status_c(dev) & mask;
++ case _IPAQ_ASIC3_GPIO_BANK_D:
++ return asic3_get_gpio_status_d(dev) & mask;
++ }
++
++ printk(KERN_ERR "%s: invalid GPIO value 0x%x", __FUNCTION__, gpio);
++ return 0;
++}
++EXPORT_SYMBOL(asic3_gpio_get_value);
++
++void asic3_gpio_set_value(struct device *dev, unsigned gpio, int val)
++{
++ u32 mask = ASIC3_GPIO_bit(gpio);
++ u32 bitval = 0;
++ if (val) bitval = mask;
++ printk("%s(%d, %d)\n", __FUNCTION__, gpio, val);
++
++ switch (gpio >> 4) {
++ case _IPAQ_ASIC3_GPIO_BANK_A:
++ asic3_set_gpio_out_a(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_B:
++ asic3_set_gpio_out_b(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_C:
++ asic3_set_gpio_out_c(dev, mask, bitval);
++ return;
++ case _IPAQ_ASIC3_GPIO_BANK_D:
++ asic3_set_gpio_out_d(dev, mask, bitval);
++ return;
++ }
++
++ printk(KERN_ERR "%s: invalid GPIO value 0x%x", __FUNCTION__, gpio);
++}
++EXPORT_SYMBOL(asic3_gpio_set_value);
++
++int asic3_irq_base(struct device *dev)
++{
++ struct asic3_data *asic = dev->driver_data;
++
++ return asic->irq_base;
++}
++EXPORT_SYMBOL(asic3_irq_base);
++
++static int asic3_gpio_to_irq(struct device *dev, unsigned gpio)
++{
++ struct asic3_data *asic = dev->driver_data;
++ printk("%s(%d)\n", __FUNCTION__, gpio);
++
++ return asic->irq_base + gpio;
++}
++
++void asic3_set_led(struct device *dev, int led_num, int duty_time,
++ int cycle_time, int timebase)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned int led_base;
++
++ /* it's a macro thing: see #define _IPAQ_ASIC_LED_0_Base for why you
++ * can't substitute led_num in the macros below...
++ */
++
++ switch (led_num) {
++ case 0:
++ led_base = _IPAQ_ASIC3_LED_0_Base;
++ break;
++ case 1:
++ led_base = _IPAQ_ASIC3_LED_1_Base;
++ break;
++ case 2:
++ led_base = _IPAQ_ASIC3_LED_2_Base;
++ break;
++ default:
++ printk(KERN_ERR "%s: invalid led number %d", __FUNCTION__,
++ led_num);
++ return;
++ }
++
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_TimeBase,
++ timebase | LED_EN);
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_PeriodTime,
++ cycle_time);
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_DutyTime,
++ 0);
++ udelay(20); /* asic voodoo - possibly need a whole duty cycle? */
++ __asic3_write_register(asic, led_base + _IPAQ_ASIC3_LED_DutyTime,
++ duty_time);
++}
++EXPORT_SYMBOL(asic3_set_led);
++
++void asic3_set_clock_sel(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_clock_sel);
++
++void asic3_set_clock_cdex(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_clock_cdex);
++
++static void asic3_clock_cdex_enable(struct clk *clk)
++{
++ struct asic3_data *asic = (struct asic3_data *)clk->parent->ctrlbit;
++ unsigned long flags, val;
++
++ local_irq_save(flags);
++
++ val = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ val |= clk->ctrlbit;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), val);
++
++ local_irq_restore(flags);
++}
++
++static void asic3_clock_cdex_disable(struct clk *clk)
++{
++ struct asic3_data *asic = (struct asic3_data *)clk->parent->ctrlbit;
++ unsigned long flags, val;
++
++ local_irq_save(flags);
++
++ val = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX));
++ val &= ~clk->ctrlbit;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX), val);
++
++ local_irq_restore(flags);
++}
++
++/* base clocks */
++
++static struct clk clk_g = {
++ .name = "gclk",
++ .rate = 0,
++ .parent = NULL,
++};
++
++/* clock definitions */
++
++static struct clk asic3_clocks[] = {
++ {
++ .name = "spi",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_SPI,
++ },
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ {
++ .name = "ds1wm",
++ .id = -1,
++ .rate = 5000000,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_OWM,
++ },
++#endif
++ {
++ .name = "pwm0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_PWM0,
++ },
++ {
++ .name = "pwm1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_PWM1,
++ },
++ {
++ .name = "led0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED0,
++ },
++ {
++ .name = "led1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED1,
++ },
++ {
++ .name = "led2",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_LED2,
++ },
++ {
++ .name = "smbus",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_SMBUS,
++ },
++ {
++ .name = "ex0",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_EX0,
++ },
++ {
++ .name = "ex1",
++ .id = -1,
++ .parent = &clk_g,
++ .enable = asic3_clock_cdex_enable,
++ .disable = asic3_clock_cdex_disable,
++ .ctrlbit = CLOCK_CDEX_EX1,
++ },
++};
++
++void asic3_set_extcf_select(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Select));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Select), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_extcf_select);
++
++void asic3_set_extcf_reset(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Reset));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(EXTCF, Reset), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_extcf_reset);
++
++void asic3_set_sdhwctrl(struct device *dev, u32 bits, u32 val)
++{
++ struct asic3_data *asic = dev->driver_data;
++ unsigned long flags;
++ u32 v;
++
++ spin_lock_irqsave (&asic3_gpio_lock, flags);
++ v = __asic3_read_register(asic, IPAQ_ASIC3_OFFSET(SDHWCTRL, SDConf));
++ v = (v & ~bits) | val;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(SDHWCTRL, SDConf), v);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++EXPORT_SYMBOL(asic3_set_sdhwctrl);
++
++
++#define MAX_ASIC_ISR_LOOPS 20
++#define _IPAQ_ASIC3_GPIO_Base_INCR \
++ (_IPAQ_ASIC3_GPIO_B_Base - _IPAQ_ASIC3_GPIO_A_Base)
++
++static inline void asic3_irq_flip_edge(struct asic3_data *asic,
++ u32 base, int bit)
++{
++ u16 edge = __asic3_read_register(asic,
++ base + _IPAQ_ASIC3_GPIO_EdgeTrigger);
++ edge ^= bit;
++ __asic3_write_register(asic,
++ base + _IPAQ_ASIC3_GPIO_EdgeTrigger, edge);
++}
++
++static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
++{
++ int iter;
++ struct asic3_data *asic;
++
++ /* Acknowledge the parrent (i.e. CPU's) IRQ */
++ desc->chip->ack(irq);
++
++ asic = desc->handler_data;
++
++ /* printk( KERN_NOTICE "asic3_irq_demux: irq=%d\n", irq ); */
++ for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) {
++ u32 status;
++ int bank;
++
++ status = __asic3_read_register(asic,
++ IPAQ_ASIC3_OFFSET(INTR, PIntStat));
++ /* Check all ten register bits */
++ if ((status & 0x3ff) == 0)
++ break;
++
++ /* Handle GPIO IRQs */
++ for (bank = 0; bank < 4; bank++) {
++ if (status & (1 << bank)) {
++ unsigned long base, i, istat;
++
++ base = _IPAQ_ASIC3_GPIO_A_Base
++ + bank * _IPAQ_ASIC3_GPIO_Base_INCR;
++ istat = __asic3_read_register(asic,
++ base + _IPAQ_ASIC3_GPIO_IntStatus);
++ /* IntStatus is write 0 to clear */
++ /* XXX could miss interrupts! */
++ __asic3_write_register(asic,
++ base + _IPAQ_ASIC3_GPIO_IntStatus, 0);
++
++ for (i = 0; i < 16; i++) {
++ int bit = (1 << i);
++ unsigned int irqnr;
++ if (!(istat & bit))
++ continue;
++
++ irqnr = asic->irq_base
++ + (16 * bank) + i;
++ desc = irq_desc + irqnr;
++ desc->handle_irq(irqnr, desc);
++ if (asic->irq_bothedge[bank] & bit) {
++ asic3_irq_flip_edge(asic, base,
++ bit);
++ }
++ }
++ }
++ }
++
++ /* Handle remaining IRQs in the status register */
++ {
++ int i;
++
++ for (i = ASIC3_LED0_IRQ; i <= ASIC3_OWM_IRQ; i++) {
++ /* They start at bit 4 and go up */
++ if (status & (1 << (i - ASIC3_LED0_IRQ + 4))) {
++ desc = irq_desc + asic->irq_base + i;
++ desc->handle_irq(asic->irq_base + i,
++ desc);
++ }
++ }
++ }
++
++ }
++
++ if (iter >= MAX_ASIC_ISR_LOOPS)
++ printk(KERN_ERR "%s: interrupt processing overrun\n",
++ __FUNCTION__);
++}
++
++static inline int asic3_irq_to_bank(struct asic3_data *asic, int irq)
++{
++ int n;
++
++ n = (irq - asic->irq_base) >> 4;
++
++ return (n * (_IPAQ_ASIC3_GPIO_B_Base - _IPAQ_ASIC3_GPIO_A_Base));
++}
++
++static inline int asic3_irq_to_index(struct asic3_data *asic, int irq)
++{
++ return (irq - asic->irq_base) & 15;
++}
++
++static void asic3_mask_gpio_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 val, bank, index;
++ unsigned long flags;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ val = __asic3_read_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask);
++ val |= 1 << index;
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask, val);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++
++static void asic3_mask_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ int regval;
++
++ if (irq < ASIC3_NR_GPIO_IRQS) {
++ printk(KERN_ERR "asic3_base: gpio mask attempt, irq %d\n",
++ irq);
++ return;
++ }
++
++ regval = __asic3_read_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask);
++
++ switch (irq - asic->irq_base) {
++ case ASIC3_LED0_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK0);
++ break;
++ case ASIC3_LED1_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK1);
++ break;
++ case ASIC3_LED2_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK2);
++ break;
++ case ASIC3_SPI_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK3);
++ break;
++ case ASIC3_SMBUS_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK4);
++ break;
++ case ASIC3_OWM_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval & ~ASIC3_INTMASK_MASK5);
++ break;
++ default:
++ printk(KERN_ERR "asic3_base: bad non-gpio irq %d\n", irq);
++ break;
++ }
++}
++
++static void asic3_unmask_gpio_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 val, bank, index;
++ unsigned long flags;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ val = __asic3_read_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask);
++ val &= ~(1 << index);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_Mask, val);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++}
++
++static void asic3_unmask_irq(unsigned int irq)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ int regval;
++
++ if (irq < ASIC3_NR_GPIO_IRQS) {
++ printk(KERN_ERR "asic3_base: gpio unmask attempt, irq %d\n",
++ irq);
++ return;
++ }
++
++ regval = __asic3_read_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask);
++
++ switch (irq - asic->irq_base) {
++ case ASIC3_LED0_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK0);
++ break;
++ case ASIC3_LED1_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK1);
++ break;
++ case ASIC3_LED2_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK2);
++ break;
++ case ASIC3_SPI_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK3);
++ break;
++ case ASIC3_SMBUS_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK4);
++ break;
++ case ASIC3_OWM_IRQ:
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_INTR_Base + _IPAQ_ASIC3_INTR_IntMask,
++ regval | ASIC3_INTMASK_MASK5);
++ break;
++ default:
++ printk(KERN_ERR "asic3_base: bad non-gpio irq %d\n", irq);
++ break;
++ }
++}
++
++static int asic3_gpio_irq_type(unsigned int irq, unsigned int type)
++{
++ struct asic3_data *asic = get_irq_chip_data(irq);
++ u32 bank, index;
++ unsigned long flags;
++ u16 trigger, level, edge, bit;
++
++ bank = asic3_irq_to_bank(asic, irq);
++ index = asic3_irq_to_index(asic, irq);
++ bit = 1<<index;
++
++ spin_lock_irqsave(&asic3_gpio_lock, flags);
++ level = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_LevelTrigger);
++ edge = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_EdgeTrigger);
++ trigger = __asic3_read_register(asic,
++ bank + _IPAQ_ASIC3_GPIO_TriggerType);
++ asic->irq_bothedge[(irq - asic->irq_base) >> 4] &= ~bit;
++
++ if (type == IRQT_RISING) {
++ trigger |= bit;
++ edge |= bit;
++ } else if (type == IRQT_FALLING) {
++ trigger |= bit;
++ edge &= ~bit;
++ } else if (type == IRQT_BOTHEDGE) {
++ trigger |= bit;
++ if (asic3_gpio_get_value(asic->dev, irq - asic->irq_base))
++ edge &= ~bit;
++ else
++ edge |= bit;
++ asic->irq_bothedge[(irq - asic->irq_base) >> 4] |= bit;
++ } else if (type == IRQT_LOW) {
++ trigger &= ~bit;
++ level &= ~bit;
++ } else if (type == IRQT_HIGH) {
++ trigger &= ~bit;
++ level |= bit;
++ } else {
++ /*
++ * if type == IRQT_NOEDGE, we should mask interrupts, but
++ * be careful to not unmask them if mask was also called.
++ * Probably need internal state for mask.
++ */
++ printk(KERN_NOTICE "asic3: irq type not changed.\n");
++ }
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_LevelTrigger,
++ level);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_EdgeTrigger,
++ edge);
++ __asic3_write_register(asic, bank + _IPAQ_ASIC3_GPIO_TriggerType,
++ trigger);
++ spin_unlock_irqrestore(&asic3_gpio_lock, flags);
++ return 0;
++}
++
++static struct irq_chip asic3_gpio_irq_chip = {
++ .name = "ASIC3-GPIO",
++ .ack = asic3_mask_gpio_irq,
++ .mask = asic3_mask_gpio_irq,
++ .unmask = asic3_unmask_gpio_irq,
++ .set_type = asic3_gpio_irq_type,
++};
++
++static struct irq_chip asic3_irq_chip = {
++ .name = "ASIC3",
++ .ack = asic3_mask_irq,
++ .mask = asic3_mask_irq,
++ .unmask = asic3_unmask_irq,
++};
++
++static void asic3_release(struct device *dev)
++{
++ struct platform_device *sdev = to_platform_device(dev);
++
++ kfree(sdev->resource);
++ kfree(sdev);
++}
++
++int asic3_register_mmc(struct device *dev)
++{
++ struct platform_device *sdev = kzalloc(sizeof(*sdev), GFP_KERNEL);
++ struct tmio_mmc_hwconfig *mmc_config = kmalloc(sizeof(*mmc_config),
++ GFP_KERNEL);
++ struct platform_device *pdev = to_platform_device(dev);
++ struct asic3_data *asic = dev->driver_data;
++ struct asic3_platform_data *asic3_pdata = dev->platform_data;
++ struct resource *res;
++ int rc;
++
++ if (sdev == NULL || mmc_config == NULL)
++ return -ENOMEM;
++
++ if (asic3_pdata->tmio_mmc_hwconfig) {
++ memcpy(mmc_config, asic3_pdata->tmio_mmc_hwconfig,
++ sizeof(*mmc_config));
++ } else {
++ memset(mmc_config, 0, sizeof(*mmc_config));
++ }
++ mmc_config->address_shift = asic->bus_shift;
++
++ sdev->id = -1;
++ sdev->name = "asic3_mmc";
++ sdev->dev.parent = dev;
++ sdev->num_resources = 2;
++ sdev->dev.platform_data = mmc_config;
++ sdev->dev.release = asic3_release;
++
++ res = kzalloc(sdev->num_resources * sizeof(struct resource),
++ GFP_KERNEL);
++ if (res == NULL) {
++ kfree(sdev);
++ kfree(mmc_config);
++ return -ENOMEM;
++ }
++ sdev->resource = res;
++
++ res[0].start = pdev->resource[2].start;
++ res[0].end = pdev->resource[2].end;
++ res[0].flags = IORESOURCE_MEM;
++ res[1].start = res[1].end = pdev->resource[3].start;
++ res[1].flags = IORESOURCE_IRQ;
++
++ rc = platform_device_register(sdev);
++ if (rc) {
++ printk(KERN_ERR "asic3_base: "
++ "Could not register asic3_mmc device\n");
++ kfree(res);
++ kfree(sdev);
++ return rc;
++ }
++
++ asic->mmc_dev = sdev;
++
++ return 0;
++}
++EXPORT_SYMBOL(asic3_register_mmc);
++
++int asic3_unregister_mmc(struct device *dev)
++{
++ struct asic3_data *asic = dev->driver_data;
++ platform_device_unregister(asic->mmc_dev);
++ asic->mmc_dev = 0;
++
++ return 0;
++}
++EXPORT_SYMBOL(asic3_unregister_mmc);
++
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++/*
++ * DS1WM subdevice
++ */
++
++static void asic3_ds1wm_enable(struct platform_device *ds1wm_dev)
++{
++ struct device *dev = ds1wm_dev->dev.parent;
++
++ /* Turn on external clocks and the OWM clock */
++ asic3_set_clock_cdex(dev,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM);
++
++ mdelay(1);
++
++ asic3_set_extcf_reset(dev, ASIC3_EXTCF_OWM_RESET,
++ ASIC3_EXTCF_OWM_RESET);
++ mdelay(1);
++ asic3_set_extcf_reset(dev, ASIC3_EXTCF_OWM_RESET, 0);
++ mdelay(1);
++
++ /* Clear OWM_SMB, set OWM_EN */
++ asic3_set_extcf_select(dev,
++ ASIC3_EXTCF_OWM_SMB | ASIC3_EXTCF_OWM_EN,
++ 0 | ASIC3_EXTCF_OWM_EN);
++
++ mdelay(1);
++}
++
++static void asic3_ds1wm_disable(struct platform_device *ds1wm_dev)
++{
++ struct device *dev = ds1wm_dev->dev.parent;
++
++ asic3_set_extcf_select(dev,
++ ASIC3_EXTCF_OWM_SMB | ASIC3_EXTCF_OWM_EN,
++ 0 | 0);
++
++ asic3_set_clock_cdex(dev,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | CLOCK_CDEX_OWM,
++ CLOCK_CDEX_EX0 | CLOCK_CDEX_EX1 | 0);
++}
++
++
++static struct resource asic3_ds1wm_resources[] = {
++ {
++ .start = _IPAQ_ASIC3_OWM_Base,
++ .end = _IPAQ_ASIC3_OWM_Base + 0x14 - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = ASIC3_OWM_IRQ,
++ .end = ASIC3_OWM_IRQ,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
++ IORESOURCE_IRQ_SOC_SUBDEVICE,
++ },
++};
++
++static struct ds1wm_platform_data ds1wm_pd = {
++ .enable = asic3_ds1wm_enable,
++ .disable = asic3_ds1wm_disable,
++};
++#endif
++
++static struct soc_device_data asic3_blocks[] = {
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ {
++ .name = "ds1wm",
++ .res = asic3_ds1wm_resources,
++ .num_resources = ARRAY_SIZE(asic3_ds1wm_resources),
++ .hwconfig = &ds1wm_pd,
++ },
++#endif
++};
++
++static int asic3_probe(struct platform_device *pdev)
++{
++ struct asic3_platform_data *pdata = pdev->dev.platform_data;
++ struct asic3_data *asic;
++ struct device *dev = &pdev->dev;
++ unsigned long clksel;
++ int i, rc;
++
++ asic = kzalloc(sizeof(struct asic3_data), GFP_KERNEL);
++ if (!asic)
++ return -ENOMEM;
++
++ platform_set_drvdata(pdev, asic);
++ asic->dev = &pdev->dev;
++
++ asic->mapping = ioremap(pdev->resource[0].start, IPAQ_ASIC3_MAP_SIZE);
++ if (!asic->mapping) {
++ printk(KERN_ERR "asic3: couldn't ioremap ASIC3\n");
++ kfree (asic);
++ return -ENOMEM;
++ }
++
++ if (pdata && pdata->bus_shift)
++ asic->bus_shift = pdata->bus_shift;
++ else
++ asic->bus_shift = 2;
++
++ /* XXX: should get correct SD clock values from pdata struct */
++ clksel = 0;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), clksel);
++
++ /* Register ASIC3's clocks. */
++ clk_g.ctrlbit = (int)asic;
++
++ if (clk_register(&clk_g) < 0)
++ printk(KERN_ERR "asic3: failed to register ASIC3 gclk\n");
++
++ for (i = 0; i < ARRAY_SIZE(asic3_clocks); i++) {
++ rc = clk_register(&asic3_clocks[i]);
++ if (rc < 0)
++ printk(KERN_ERR "asic3: "
++ "failed to register clock %s (%d)\n",
++ asic3_clocks[i].name, rc);
++ }
++
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(A, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(B, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(C, Mask), 0xffff);
++ __asic3_write_register(asic, IPAQ_ASIC3_GPIO_OFFSET(D, Mask), 0xffff);
++
++ asic3_set_gpio_sleepmask_a(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_b(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_c(dev, 0xffff, 0xffff);
++ asic3_set_gpio_sleepmask_d(dev, 0xffff, 0xffff);
++
++ if (pdata) {
++ asic3_set_gpio_out_a(dev, 0xffff, pdata->gpio_a.init);
++ asic3_set_gpio_out_b(dev, 0xffff, pdata->gpio_b.init);
++ asic3_set_gpio_out_c(dev, 0xffff, pdata->gpio_c.init);
++ asic3_set_gpio_out_d(dev, 0xffff, pdata->gpio_d.init);
++
++ asic3_set_gpio_dir_a(dev, 0xffff, pdata->gpio_a.dir);
++ asic3_set_gpio_dir_b(dev, 0xffff, pdata->gpio_b.dir);
++ asic3_set_gpio_dir_c(dev, 0xffff, pdata->gpio_c.dir);
++ asic3_set_gpio_dir_d(dev, 0xffff, pdata->gpio_d.dir);
++
++ asic3_set_gpio_sleepmask_a(dev, 0xffff,
++ pdata->gpio_a.sleep_mask);
++ asic3_set_gpio_sleepmask_b(dev, 0xffff,
++ pdata->gpio_b.sleep_mask);
++ asic3_set_gpio_sleepmask_c(dev, 0xffff,
++ pdata->gpio_c.sleep_mask);
++ asic3_set_gpio_sleepmask_d(dev, 0xffff,
++ pdata->gpio_d.sleep_mask);
++
++ asic3_set_gpio_sleepout_a(dev, 0xffff,
++ pdata->gpio_a.sleep_out);
++ asic3_set_gpio_sleepout_b(dev, 0xffff,
++ pdata->gpio_b.sleep_out);
++ asic3_set_gpio_sleepout_c(dev, 0xffff,
++ pdata->gpio_c.sleep_out);
++ asic3_set_gpio_sleepout_d(dev, 0xffff,
++ pdata->gpio_d.sleep_out);
++
++ asic3_set_gpio_battfaultout_a(dev, 0xffff,
++ pdata->gpio_a.batt_fault_out);
++ asic3_set_gpio_battfaultout_b(dev, 0xffff,
++ pdata->gpio_b.batt_fault_out);
++ asic3_set_gpio_battfaultout_c(dev, 0xffff,
++ pdata->gpio_c.batt_fault_out);
++ asic3_set_gpio_battfaultout_d(dev, 0xffff,
++ pdata->gpio_d.batt_fault_out);
++
++ asic3_set_gpio_sleepconf_a(dev, 0xffff,
++ pdata->gpio_a.sleep_conf);
++ asic3_set_gpio_sleepconf_b(dev, 0xffff,
++ pdata->gpio_b.sleep_conf);
++ asic3_set_gpio_sleepconf_c(dev, 0xffff,
++ pdata->gpio_c.sleep_conf);
++ asic3_set_gpio_sleepconf_d(dev, 0xffff,
++ pdata->gpio_d.sleep_conf);
++
++ asic3_set_gpio_alt_fn_a(dev, 0xffff,
++ pdata->gpio_a.alt_function);
++ asic3_set_gpio_alt_fn_b(dev, 0xffff,
++ pdata->gpio_b.alt_function);
++ asic3_set_gpio_alt_fn_c(dev, 0xffff,
++ pdata->gpio_c.alt_function);
++ asic3_set_gpio_alt_fn_d(dev, 0xffff,
++ pdata->gpio_d.alt_function);
++ }
++
++ asic->irq_nr = -1;
++ asic->irq_base = -1;
++
++ if (pdev->num_resources > 1)
++ asic->irq_nr = pdev->resource[1].start;
++
++ if (asic->irq_nr != -1) {
++ unsigned int i;
++
++ if (!pdata->irq_base) {
++ printk(KERN_ERR "asic3: IRQ base not specified\n");
++ asic3_remove(pdev);
++ return -EINVAL;
++ }
++
++ asic->irq_base = pdata->irq_base;
++
++ /* turn on clock to IRQ controller */
++ clksel |= CLOCK_SEL_CX;
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL),
++ clksel);
++
++ printk(KERN_INFO "asic3: using irq %d-%d on irq %d\n",
++ asic->irq_base, asic->irq_base + ASIC3_NR_IRQS - 1,
++ asic->irq_nr);
++
++ for (i = 0 ; i < ASIC3_NR_IRQS ; i++) {
++ int irq = i + asic->irq_base;
++ if (i < ASIC3_NR_GPIO_IRQS) {
++ set_irq_chip(irq, &asic3_gpio_irq_chip);
++ set_irq_chip_data(irq, asic);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ } else {
++ /* The remaining IRQs are not GPIO */
++ set_irq_chip(irq, &asic3_irq_chip);
++ set_irq_chip_data(irq, asic);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++ }
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ ASIC3_INTMASK_GINTMASK);
++
++ set_irq_chained_handler(asic->irq_nr, asic3_irq_demux);
++ set_irq_type(asic->irq_nr, IRQT_RISING);
++ set_irq_data(asic->irq_nr, asic);
++ }
++
++#ifdef CONFIG_HTC_ASIC3_DS1WM
++ ds1wm_pd.bus_shift = asic->bus_shift;
++#endif
++
++ pdata->gpiodev_ops.get = asic3_gpio_get_value;
++ pdata->gpiodev_ops.set = asic3_gpio_set_value;
++ pdata->gpiodev_ops.to_irq = asic3_gpio_to_irq;
++
++ soc_add_devices(pdev, asic3_blocks, ARRAY_SIZE(asic3_blocks),
++ &pdev->resource[0],
++ asic->bus_shift - ASIC3_DEFAULT_ADDR_SHIFT,
++ asic->irq_base);
++
++ if (pdev->num_resources > 2) {
++ int rc;
++ rc = asic3_register_mmc(dev);
++ if (rc) {
++ asic3_remove(pdev);
++ return rc;
++ }
++ }
++
++ if (pdata && pdata->num_child_platform_devs != 0)
++ platform_add_devices(pdata->child_platform_devs,
++ pdata->num_child_platform_devs);
++
++ return 0;
++}
++
++static int asic3_remove(struct platform_device *pdev)
++{
++ struct asic3_platform_data *pdata = pdev->dev.platform_data;
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ int i;
++
++ if (pdata && pdata->num_child_platform_devs != 0) {
++ for (i = 0; i < pdata->num_child_platform_devs; i++) {
++ platform_device_unregister(
++ pdata->child_platform_devs[i]);
++ }
++ }
++
++ if (asic->irq_nr != -1) {
++ unsigned int i;
++
++ for (i = 0 ; i < ASIC3_NR_IRQS ; i++) {
++ int irq = i + asic->irq_base;
++ set_irq_flags(irq, 0);
++ set_irq_handler (irq, NULL);
++ set_irq_chip (irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++
++ set_irq_chained_handler(asic->irq_nr, NULL);
++ }
++
++ if (asic->mmc_dev)
++ asic3_unregister_mmc(&pdev->dev);
++
++ for (i = 0; i < ARRAY_SIZE(asic3_clocks); i++)
++ clk_unregister(&asic3_clocks[i]);
++ clk_unregister(&clk_g);
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, SEL), 0);
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask), 0);
++
++ iounmap(asic->mapping);
++
++ kfree(asic);
++
++ return 0;
++}
++
++static void asic3_shutdown(struct platform_device *pdev)
++{
++}
++
++#define ASIC3_SUSPEND_CDEX_MASK \
++ (CLOCK_CDEX_LED0 | CLOCK_CDEX_LED1 | CLOCK_CDEX_LED2)
++static unsigned short suspend_cdex;
++
++static int asic3_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ suspend_cdex = __asic3_read_register(asic,
++ _IPAQ_ASIC3_CLOCK_Base + _IPAQ_ASIC3_CLOCK_CDEX);
++ /* The LEDs are still active during suspend */
++ __asic3_write_register(asic,
++ _IPAQ_ASIC3_CLOCK_Base + _IPAQ_ASIC3_CLOCK_CDEX,
++ suspend_cdex & ASIC3_SUSPEND_CDEX_MASK);
++ return 0;
++}
++
++static int asic3_resume(struct platform_device *pdev)
++{
++ struct asic3_data *asic = platform_get_drvdata(pdev);
++ unsigned short intmask;
++
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(CLOCK, CDEX),
++ suspend_cdex);
++
++ if (asic->irq_nr != -1) {
++ /* Toggle the interrupt mask to try to get ASIC3 to show
++ * the CPU an interrupt edge. For more details see the
++ * kernel-discuss thread around 13 June 2005 with the
++ * subject "asic3 suspend / resume". */
++ intmask = __asic3_read_register(asic,
++ IPAQ_ASIC3_OFFSET(INTR, IntMask));
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ intmask & ~ASIC3_INTMASK_GINTMASK);
++ mdelay(1);
++ __asic3_write_register(asic, IPAQ_ASIC3_OFFSET(INTR, IntMask),
++ intmask | ASIC3_INTMASK_GINTMASK);
++ }
++
++ return 0;
++}
++
++static struct platform_driver asic3_device_driver = {
++ .driver = {
++ .name = "asic3",
++ },
++ .probe = asic3_probe,
++ .remove = asic3_remove,
++ .suspend = asic3_suspend,
++ .resume = asic3_resume,
++ .shutdown = asic3_shutdown,
++};
++
++static int __init asic3_base_init(void)
++{
++ int retval = 0;
++ retval = platform_driver_register(&asic3_device_driver);
++ return retval;
++}
++
++static void __exit asic3_base_exit(void)
++{
++ platform_driver_unregister(&asic3_device_driver);
++}
++
++#ifdef MODULE
++module_init(asic3_base_init);
++#else /* start early for dependencies */
++subsys_initcall(asic3_base_init);
++#endif
++module_exit(asic3_base_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Phil Blundell <pb@handhelds.org>");
++MODULE_DESCRIPTION("Core driver for HTC ASIC3");
++MODULE_SUPPORTED_DEVICE("asic3");
+Index: linux-2.6.26-rc4/drivers/mfd/soc-core.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mfd/soc-core.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,106 @@
++/*
++ * drivers/soc/soc-core.c
++ *
++ * core SoC support
++ * Copyright (c) 2006 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This file contains functionality used by many SoC type devices.
++ *
++ * Created: 2006-11-28
++ *
++ */
++
++#include <linux/ioport.h>
++#include <linux/slab.h>
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include "soc-core.h"
++
++void soc_free_devices(struct platform_device *devices, int nr_devs)
++{
++ struct platform_device *dev = devices;
++ int i;
++
++ for (i = 0; i < nr_devs; i++) {
++ struct resource *res = dev->resource;
++ platform_device_unregister(dev++);
++ kfree(res);
++ }
++ kfree(devices);
++}
++EXPORT_SYMBOL_GPL(soc_free_devices);
++
++#define SIGNED_SHIFT(val, shift) ((shift) >= 0 ? ((val) << (shift)) : ((val) >> -(shift)))
++
++struct platform_device *soc_add_devices(struct platform_device *dev,
++ struct soc_device_data *soc, int nr_devs,
++ struct resource *mem,
++ int relative_addr_shift, int irq_base)
++{
++ struct platform_device *devices;
++ int i, r, base;
++
++ devices = kzalloc(nr_devs * sizeof(struct platform_device), GFP_KERNEL);
++ if (!devices)
++ return NULL;
++
++ for (i = 0; i < nr_devs; i++) {
++ struct platform_device *sdev = &devices[i];
++ struct soc_device_data *blk = &soc[i];
++ struct resource *res;
++
++ sdev->id = -1;
++ sdev->name = blk->name;
++
++ sdev->dev.parent = &dev->dev;
++ sdev->dev.platform_data = (void *)blk->hwconfig;
++ sdev->num_resources = blk->num_resources;
++
++ /* Allocate space for the subdevice resources */
++ res = kzalloc (blk->num_resources * sizeof (struct resource), GFP_KERNEL);
++ if (!res)
++ goto fail;
++
++ for (r = 0 ; r < blk->num_resources ; r++) {
++ res[r].name = blk->res[r].name; // Fixme - should copy
++
++ /* Find out base to use */
++ base = 0;
++ if (blk->res[r].flags & IORESOURCE_MEM) {
++ base = mem->start;
++ } else if ((blk->res[r].flags & IORESOURCE_IRQ) &&
++ (blk->res[r].flags & IORESOURCE_IRQ_SOC_SUBDEVICE)) {
++ base = irq_base;
++ }
++
++ /* Adjust resource */
++ if (blk->res[r].flags & IORESOURCE_MEM) {
++ res[r].parent = mem;
++ res[r].start = base + SIGNED_SHIFT(blk->res[r].start, relative_addr_shift);
++ res[r].end = base + SIGNED_SHIFT(blk->res[r].end, relative_addr_shift);
++ } else {
++ res[r].start = base + blk->res[r].start;
++ res[r].end = base + blk->res[r].end;
++ }
++ res[r].flags = blk->res[r].flags;
++ }
++
++ sdev->resource = res;
++ if (platform_device_register(sdev)) {
++ kfree(res);
++ goto fail;
++ }
++
++ printk(KERN_INFO "SoC: registering %s\n", blk->name);
++ }
++ return devices;
++
++fail:
++ soc_free_devices(devices, i + 1);
++ return NULL;
++}
++EXPORT_SYMBOL_GPL(soc_add_devices);
+Index: linux-2.6.26-rc4/drivers/mfd/soc-core.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mfd/soc-core.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,30 @@
++/*
++ * drivers/soc/soc-core.h
++ *
++ * core SoC support
++ * Copyright (c) 2006 Ian Molton
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This file contains prototypes for the functions in soc-core.c
++ *
++ * Created: 2006-11-28
++ *
++ */
++
++struct soc_device_data {
++ char *name;
++ struct resource *res;
++ int num_resources;
++ void *hwconfig; /* platform_data to pass to the subdevice */
++};
++
++struct platform_device *soc_add_devices(struct platform_device *dev,
++ struct soc_device_data *soc, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift, int irq_base);
++
++void soc_free_devices(struct platform_device *devices, int nr_devs);
++
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/clock.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/clock.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,27 @@
++/*
++ * linux/include/asm-arm/arch-pxa/clock.h
++ *
++ * Copyright (C) 2006 Erik Hovland
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++struct clk {
++ struct list_head node;
++ struct module *owner;
++ struct clk *parent;
++ const char *name;
++ int id;
++ unsigned int enabled;
++ unsigned long rate;
++ unsigned long ctrlbit;
++
++ void (*enable)(struct clk *);
++ void (*disable)(struct clk *);
++};
++
++
++extern int clk_register(struct clk *clk);
++extern void clk_unregister(struct clk *clk);
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-asic.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-asic.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,213 @@
++/*
++ * include/asm/arm/arch-pxa/htcuniversal-asic.h
++ *
++ * Authors: Giuseppe Zompatori <giuseppe_zompatori@yahoo.it>
++ *
++ * based on previews work, see below:
++ *
++ * include/asm/arm/arch-pxa/hx4700-asic.h
++ * Copyright (c) 2004 SDG Systems, LLC
++ *
++ */
++
++#ifndef _HTCUNIVERSAL_ASIC_H_
++#define _HTCUNIVERSAL_ASIC_H_
++
++#include <asm/hardware/ipaq-asic3.h>
++
++/* ASIC3 */
++
++#define HTCUNIVERSAL_ASIC3_GPIO_PHYS PXA_CS4_PHYS
++#define HTCUNIVERSAL_ASIC3_MMC_PHYS PXA_CS3_PHYS
++
++/* TODO: some information is missing here */
++
++/* ASIC3 GPIO A bank */
++
++#define GPIOA_I2C_EN 0 /* Output */
++#define GPIOA_SPK_PWR1_ON 1 /* Output */
++#define GPIOA_AUDIO_PWR_ON 2 /* Output */
++#define GPIOA_EARPHONE_PWR_ON 3 /* Output */
++
++#define GPIOA_UNKNOWN4 4 /* Output */
++#define GPIOA_BUTTON_BACKLIGHT_N 5 /* Input */
++#define GPIOA_SPK_PWR2_ON 6 /* Output */
++#define GPIOA_BUTTON_RECORD_N 7 /* Input */
++
++#define GPIOA_BUTTON_CAMERA_N 8 /* Input */
++#define GPIOA_UNKNOWN9 9 /* Output */
++#define GPIOA_FLASHLIGHT 10 /* Output */
++#define GPIOA_COVER_ROTATE_N 11 /* Input */
++
++#define GPIOA_TOUCHSCREEN_N 12 /* Input */
++#define GPIOA_VOL_UP_N 13 /* Input */
++#define GPIOA_VOL_DOWN_N 14 /* Input */
++#define GPIOA_LCD_PWR5_ON 15 /* Output */
++
++/* ASIC3 GPIO B bank */
++
++#define GPIOB_BB_READY 0 /* Input */
++#define GPIOB_CODEC_PDN 1 /* Output */
++#define GPIOB_UNKNOWN2 2 /* Input */
++#define GPIOB_BB_UNKNOWN3 3 /* Input */
++
++#define GPIOB_BT_IRQ 4 /* Input */
++#define GPIOB_CLAMSHELL_N 5 /* Input */
++#define GPIOB_LCD_PWR3_ON 6 /* Output */
++#define GPIOB_BB_ALERT 7 /* Input */
++
++#define GPIOB_BB_RESET2 8 /* Output */
++#define GPIOB_EARPHONE_N 9 /* Input */
++#define GPIOB_MICRECORD_N 10 /* Input */
++#define GPIOB_NIGHT_SENSOR 11 /* Input */
++
++#define GPIOB_UMTS_DCD 12 /* Input */
++#define GPIOB_UNKNOWN13 13 /* Input */
++#define GPIOB_CHARGE_EN 14 /* Output */
++#define GPIOB_USB_PUEN 15 /* Output */
++
++/* ASIC3 GPIO C bank */
++
++#define GPIOC_LED_BTWIFI 0 /* Output */
++#define GPIOC_LED_RED 1 /* Output */
++#define GPIOC_LED_GREEN 2 /* Output */
++#define GPIOC_BOARDID3 3 /* Input */
++
++#define GPIOC_WIFI_IRQ_N 4 /* Input */
++#define GPIOC_WIFI_RESET 5 /* Output */
++#define GPIOC_WIFI_PWR1_ON 6 /* Output */
++#define GPIOC_BT_RESET 7 /* Output */
++
++#define GPIOC_UNKNOWN8 8 /* Output */
++#define GPIOC_LCD_PWR1_ON 9 /* Output */
++#define GPIOC_LCD_PWR2_ON 10 /* Output */
++#define GPIOC_BOARDID2 11 /* Input */
++
++#define GPIOC_BOARDID1 12 /* Input */
++#define GPIOC_BOARDID0 13 /* Input */
++#define GPIOC_BT_PWR_ON 14 /* Output */
++#define GPIOC_CHARGE_ON 15 /* Output */
++
++/* ASIC3 GPIO D bank */
++
++#define GPIOD_KEY_OK_N 0 /* Input */
++#define GPIOD_KEY_RIGHT_N 1 /* Input */
++#define GPIOD_KEY_LEFT_N 2 /* Input */
++#define GPIOD_KEY_DOWN_N 3 /* Input */
++
++#define GPIOD_KEY_UP_N 4 /* Input */
++#define GPIOD_SDIO_DET 5 /* Input */
++#define GPIOD_WIFI_PWR2_ON 6 /* Output */
++#define GPIOD_HW_REBOOT 7 /* Output */
++
++#define GPIOD_BB_RESET1 8 /* Output */
++#define GPIOD_UNKNOWN9 9 /* Output */
++#define GPIOD_VIBRA_PWR_ON 10 /* Output */
++#define GPIOD_WIFI_PWR3_ON 11 /* Output */
++
++#define GPIOD_FL_PWR_ON 12 /* Output */
++#define GPIOD_LCD_PWR4_ON 13 /* Output */
++#define GPIOD_BL_KEYP_PWR_ON 14 /* Output */
++#define GPIOD_BL_KEYB_PWR_ON 15 /* Output */
++
++extern struct platform_device htcuniversal_asic3;
++
++/* ASIC3 GPIO A bank */
++
++#define GPIO_I2C_EN 0*16+GPIOA_I2C_EN
++#define GPIO_SPK_PWR1_ON 0*16+GPIOA_SPK_PWR1_ON
++#define GPIO_AUDIO_PWR_ON 0*16+GPIOA_AUDIO_PWR_ON
++#define GPIO_EARPHONE_PWR_ON 0*16+GPIOA_EARPHONE_PWR_ON
++
++#define GPIO_UNKNOWNA4 0*16+GPIOA_UNKNOWN4
++#define GPIO_BUTTON_BACKLIGHT_N 0*16+GPIOA_BUTTON_BACKLIGHT_N
++#define GPIO_SPK_PWR2_ON 0*16+GPIOA_SPK_PWR2_ON
++#define GPIO_BUTTON_RECORD_N 0*16+GPIOA_BUTTON_RECORD_N
++
++#define GPIO_BUTTON_CAMERA_N 0*16+GPIOA_BUTTON_CAMERA_N
++#define GPIO_UNKNOWNA9 0*16+GPIOA_UNKNOWN9
++#define GPIO_FLASHLIGHT 0*16+GPIOA_FLASHLIGHT
++#define GPIO_COVER_ROTATE_N 0*16+GPIOA_COVER_ROTATE_N
++
++#define GPIO_TOUCHSCREEN_N 0*16+GPIOA_TOUCHSCREEN_N
++#define GPIO_VOL_UP_N 0*16+GPIOA_VOL_UP_N
++#define GPIO_VOL_DOWN_N 0*16+GPIOA_VOL_DOWN_N
++#define GPIO_LCD_PWR5_ON 0*16+GPIOA_LCD_PWR5_ON
++
++/* ASIC3 GPIO B bank */
++
++#define GPIO_BB_READY 1*16+GPIOB_BB_READY
++#define GPIO_CODEC_PDN 1*16+GPIOB_CODEC_PDN
++#define GPIO_UNKNOWNB2 1*16+GPIOB_UNKNOWN2
++#define GPIO_BB_UNKNOWN3 1*16+GPIOB_BB_UNKNOWN3
++
++#define GPIO_BT_IRQ 1*16+GPIOB_BT_IRQ
++#define GPIO_CLAMSHELL_N 1*16+GPIOB_CLAMSHELL_N
++#define GPIO_LCD_PWR3_ON 1*16+GPIOB_LCD_PWR3_ON
++#define GPIO_BB_ALERT 1*16+GPIOB_BB_ALERT
++
++#define GPIO_BB_RESET2 1*16+GPIOB_BB_RESET2
++#define GPIO_EARPHONE_N 1*16+GPIOB_EARPHONE_N
++#define GPIO_MICRECORD_N 1*16+GPIOB_MICRECORD_N
++#define GPIO_NIGHT_SENSOR 1*16+GPIOB_NIGHT_SENSOR
++
++#define GPIO_UMTS_DCD 1*16+GPIOB_UMTS_DCD
++#define GPIO_UNKNOWNB13 1*16+GPIOB_UNKNOWN13
++#define GPIO_CHARGE_EN 1*16+GPIOB_CHARGE_EN
++#define GPIO_USB_PUEN 1*16+GPIOB_USB_PUEN
++
++/* ASIC3 GPIO C bank */
++
++#define GPIO_LED_BTWIFI 2*16+GPIOC_LED_BTWIFI
++#define GPIO_LED_RED 2*16+GPIOC_LED_RED
++#define GPIO_LED_GREEN 2*16+GPIOC_LED_GREEN
++#define GPIO_BOARDID3 2*16+GPIOC_BOARDID3
++
++#define GPIO_WIFI_IRQ_N 2*16+GPIOC_WIFI_IRQ_N
++#define GPIO_WIFI_RESET 2*16+GPIOC_WIFI_RESET
++#define GPIO_WIFI_PWR1_ON 2*16+GPIOC_WIFI_PWR1_ON
++#define GPIO_BT_RESET 2*16+GPIOC_BT_RESET
++
++#define GPIO_UNKNOWNC8 2*16+GPIOC_UNKNOWN8
++#define GPIO_LCD_PWR1_ON 2*16+GPIOC_LCD_PWR1_ON
++#define GPIO_LCD_PWR2_ON 2*16+GPIOC_LCD_PWR2_ON
++#define GPIO_BOARDID2 2*16+GPIOC_BOARDID2
++
++#define GPIO_BOARDID1 2*16+GPIOC_BOARDID1
++#define GPIO_BOARDID0 2*16+GPIOC_BOARDID0
++#define GPIO_BT_PWR_ON 2*16+GPIOC_BT_PWR_ON
++#define GPIO_CHARGE_ON 2*16+GPIOC_CHARGE_ON
++
++/* ASIC3 GPIO D bank */
++
++#define GPIO_KEY_OK_N 3*16+GPIOD_KEY_OK_N
++#define GPIO_KEY_RIGHT_N 3*16+GPIOD_KEY_RIGHT_N
++#define GPIO_KEY_LEFT_N 3*16+GPIOD_KEY_LEFT_N
++#define GPIO_KEY_DOWN_N 3*16+GPIOD_KEY_DOWN_N
++
++#define GPIO_KEY_UP_N 3*16+GPIOD_KEY_UP_N
++#define GPIO_SDIO_DET 3*16+GPIOD_SDIO_DET
++#define GPIO_WIFI_PWR2_ON 3*16+GPIOD_WIFI_PWR2_ON
++#define GPIO_HW_REBOOT 3*16+GPIOD_HW_REBOOT
++
++#define GPIO_BB_RESET1 3*16+GPIOD_BB_RESET1
++#define GPIO_UNKNOWND9 3*16+GPIOD_UNKNOWN9
++#define GPIO_VIBRA_PWR_ON 3*16+GPIOD_VIBRA_PWR_ON
++#define GPIO_WIFI_PWR3_ON 3*16+GPIOD_WIFI_PWR3_ON
++
++#define GPIO_FL_PWR_ON 3*16+GPIOD_FL_PWR_ON
++#define GPIO_LCD_PWR4_ON 3*16+GPIOD_LCD_PWR4_ON
++#define GPIO_BL_KEYP_PWR_ON 3*16+GPIOD_BL_KEYP_PWR_ON
++#define GPIO_BL_KEYB_PWR_ON 3*16+GPIOD_BL_KEYB_PWR_ON
++
++#define HTCUNIVERSAL_EGPIO_BASE PXA_CS2_PHYS+0x02000000
++
++#define EGPIO4_ON 4 /* something */
++#define EGPIO5_BT_3V3_ON 5 /* Bluetooth related */
++#define EGPIO6_WIFI_ON 6 /* WLAN related*/
++
++extern void htcuniversal_egpio_enable( u_int16_t bits );
++extern void htcuniversal_egpio_disable( u_int16_t bits );
++
++#endif /* _HTCUNIVERSAL_ASIC_H_ */
++
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-gpio.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,220 @@
++/*
++ * include/asm-arm/arch-pxa/htcuniversal-gpio.h
++ * History:
++ *
++ * 2004-12-10 Michael Opdenacker. Wrote down GPIO settings as identified by Jamey Hicks.
++ * Reused the h2200-gpio.h file as a template.
++ */
++
++#ifndef _HTCUNIVERSAL_GPIO_H_
++#define _HTCUNIVERSAL_GPIO_H_
++
++#include <asm/arch/pxa-regs.h>
++
++#define GET_HTCUNIVERSAL_GPIO(gpio) \
++ (GPLR(GPIO_NR_HTCUNIVERSAL_ ## gpio) & GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio))
++
++#define SET_HTCUNIVERSAL_GPIO(gpio, setp) \
++do { \
++if (setp) \
++ GPSR(GPIO_NR_HTCUNIVERSAL_ ## gpio) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio); \
++else \
++ GPCR(GPIO_NR_HTCUNIVERSAL_ ## gpio) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio); \
++} while (0)
++
++#define SET_HTCUNIVERSAL_GPIO_N(gpio, setp) \
++do { \
++if (setp) \
++ GPCR(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N); \
++else \
++ GPSR(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCUNIVERSAL_ ## gpio ## _N); \
++} while (0)
++
++#define HTCUNIVERSAL_IRQ(gpio) \
++ IRQ_GPIO(GPIO_NR_HTCUNIVERSAL_ ## gpio)
++
++#define GPIO_NR_HTCUNIVERSAL_KEY_ON_N 0
++#define GPIO_NR_HTCUNIVERSAL_GP_RST_N 1
++
++#define GPIO_NR_HTCUNIVERSAL_USB_DET 9
++#define GPIO_NR_HTCUNIVERSAL_POWER_DET 10
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD7 12
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_SDIO_INT_N 13
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_EXT_INT 14
++#define GPIO_NR_HTCUNIVERSAL_CS1_N 15
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD6 17
++#define GPIO_NR_HTCUNIVERSAL_RDY 18
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_START 19
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT7 22
++#define GPIO_NR_HTCUNIVERSAL_SPI_CLK 23
++#define GPIO_NR_HTCUNIVERSAL_SPI_FRM 24
++#define GPIO_NR_HTCUNIVERSAL_SPI_DO 25
++#define GPIO_NR_HTCUNIVERSAL_SPI_DI 26
++
++#define GPIO_NR_HTCUNIVERSAL_CODEC_ON 27
++#define GPIO_NR_HTCUNIVERSAL_I2S_BCK 28
++#define GPIO_NR_HTCUNIVERSAL_I2S_DIN 29
++#define GPIO_NR_HTCUNIVERSAL_I2S_DOUT 30
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYNC 31
++
++#define GPIO_NR_HTCUNIVERSAL_RS232_ON 32
++#define GPIO_NR_HTCUNIVERSAL_CS5_N 33
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RXD 34
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS 35
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN7 36
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN3 37
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN4 38
++#define GPIO_NR_HTCUNIVERSAL_PHONE_TXD 39
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT6 40
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS 41
++#define GPIO_NR_HTCUNIVERSAL_BT_RXD 42
++#define GPIO_NR_HTCUNIVERSAL_BT_TXD 43
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_CTS 44
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_RTS 45
++
++#define GPIO_NR_HTCUNIVERSAL_SIR_RXD 42
++#define GPIO_NR_HTCUNIVERSAL_SIR_TXD 43
++
++#define GPIO_NR_HTCUNIVERSAL_POE_N 48
++#define GPIO_NR_HTCUNIVERSAL_PWE_N 49
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD3 50
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD2 51
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD4 52
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_MCLK 53
++#define GPIO_NR_HTCUNIVERSAL_CIF_PCLK 54
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD1 55
++
++#define GPIO_NR_HTCUNIVERSAL_LDD0 58
++#define GPIO_NR_HTCUNIVERSAL_LDD1 59
++#define GPIO_NR_HTCUNIVERSAL_LDD2 60
++#define GPIO_NR_HTCUNIVERSAL_LDD3 61
++#define GPIO_NR_HTCUNIVERSAL_LDD4 62
++#define GPIO_NR_HTCUNIVERSAL_LDD5 63
++#define GPIO_NR_HTCUNIVERSAL_LDD6 64
++#define GPIO_NR_HTCUNIVERSAL_LDD7 65
++#define GPIO_NR_HTCUNIVERSAL_LDD8 66
++#define GPIO_NR_HTCUNIVERSAL_LDD9 67
++#define GPIO_NR_HTCUNIVERSAL_LDD10 68
++#define GPIO_NR_HTCUNIVERSAL_LDD11 69
++#define GPIO_NR_HTCUNIVERSAL_LDD12 70
++#define GPIO_NR_HTCUNIVERSAL_LDD13 71
++#define GPIO_NR_HTCUNIVERSAL_LDD14 72
++#define GPIO_NR_HTCUNIVERSAL_LDD15 73
++
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_RD 74
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_A0 75
++#define GPIO_NR_HTCUNIVERSAL_LFCLK_WR 76
++#define GPIO_NR_HTCUNIVERSAL_LBIAS 77
++
++#define GPIO_NR_HTCUNIVERSAL_CS2_N 78
++#define GPIO_NR_HTCUNIVERSAL_CS3_N 79
++#define GPIO_NR_HTCUNIVERSAL_CS4_N 80
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD0 81
++#define GPIO_NR_HTCUNIVERSAL_CIF_DD5 82
++
++#define GPIO_NR_HTCUNIVERSAL_CIF_LV 84
++#define GPIO_NR_HTCUNIVERSAL_CIF_FV 85
++
++#define GPIO_NR_HTCUNIVERSAL_LCD1 86
++#define GPIO_NR_HTCUNIVERSAL_LCD2 87
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN5 90
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN6 91
++
++#define GPIO_NR_HTCUNIVERSAL_DREQ1 97
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RESET 98
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN0 100
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN1 101
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN2 102
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT0 103
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT1 104
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT2 105
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT3 106
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT4 107
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT5 108
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UNKNOWN 109
++#define GPIO_NR_HTCUNIVERSAL_PHONE_OFF 110
++
++#define GPIO_NR_HTCUNIVERSAL_USB_PUEN 112
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYSCLK 113
++
++#define GPIO_NR_HTCUNIVERSAL_PWM_OUT1 115
++
++#define GPIO_NR_HTCUNIVERSAL_I2C_SCL 117
++#define GPIO_NR_HTCUNIVERSAL_I2C_SDA 118
++
++#if 0
++#define GPIO_NR_HTCUNIVERSAL_CPU_BATT_FAULT_N
++#define GPIO_NR_HTCUNIVERSAL_ASIC3_RESET_N
++#define GPIO_NR_HTCUNIVERSAL_CHARGE_EN_N
++#define GPIO_NR_HTCUNIVERSAL_FLASH_VPEN
++#define GPIO_NR_HTCUNIVERSAL_BATT_OFF
++#define GPIO_NR_HTCUNIVERSAL_USB_CHARGE_RATE
++#define GPIO_NR_HTCUNIVERSAL_BL_DETECT_N
++#define GPIO_NR_HTCUNIVERSAL_CPU_HW_RESET_N
++#endif
++
++
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_CLK_MD (23 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_FRM_MD (24 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_TOUCHSCREEN_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_RXD_MD (34 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_CTS_MD (35 | GPIO_ALT_FN_1_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_PHONE_TXD_MD (39 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_PHONE_UART_RTS_MD (41 | GPIO_ALT_FN_2_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_BT_RXD_MD (42 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_BT_TXD_MD (43 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_CTS_MD (44 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_BT_UART_RTS_MD (45 | GPIO_ALT_FN_2_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_SIR_RXD_MD (46 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_SIR_TXD_MD (47 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
++#define GPIO_NR_HTCUNIVERSAL_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN0_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN0 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN1_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN1 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN2_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN2 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN3_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN3 | GPIO_ALT_FN_3_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN4_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN4 | GPIO_ALT_FN_2_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN5_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN5 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN6_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN6 | GPIO_ALT_FN_1_IN)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKIN7_MD (GPIO_NR_HTCUNIVERSAL_KP_MKIN7 | GPIO_ALT_FN_3_IN)
++
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT0_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT0 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT1_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT1 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT2_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT2 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT3_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT3 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT4_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT4 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT5_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT5 | GPIO_ALT_FN_2_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT6_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT6 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_KP_MKOUT7_MD (GPIO_NR_HTCUNIVERSAL_KP_MKOUT7 | GPIO_ALT_FN_1_OUT)
++
++
++#define GPIO_NR_HTCUNIVERSAL_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_PWM1OUT_MD (115 | GPIO_ALT_FN_3_OUT)
++
++#define GPIO_NR_HTCUNIVERSAL_I2C_SCL_MD (117 | GPIO_ALT_FN_1_OUT)
++#define GPIO_NR_HTCUNIVERSAL_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT)
++
++#endif /* _HTCUNIVERSAL_GPIO_H */
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-init.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal-init.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,14 @@
++/*
++ * include/asm/arm/arch-pxa/htcuniversal-init.h
++ * Copyright (c) 2004 SDG Systems, LLC
++ */
++
++#ifndef _HTCUNIVERSAL_INIT_H_
++#define _HTCUNIVERSAL_INIT_H_
++
++/* htcuniversal initialization data should be found here
++ * See -init.h files from other devices for details
++ */
++
++#endif /* _HTCUNIVERSAL_INIT_H_ */
++
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/htcuniversal.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,3 @@
++#include <asm/arch/irqs.h>
++
++#define HTCUNIVERSAL_ASIC3_IRQ_BASE IRQ_BOARD_START
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-pm_ll.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-pm_ll.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,6 @@
++struct pxa_ll_pm_ops {
++ void (*suspend)(unsigned long);
++ void (*resume)(void);
++};
++
++extern struct pxa_ll_pm_ops *pxa_pm_set_ll_ops(struct pxa_ll_pm_ops *new_ops);
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/asic3_keys.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/hardware/asic3_keys.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,18 @@
++#include <linux/input.h>
++
++struct asic3_keys_button {
++ /* Configuration parameters */
++ int keycode;
++ int gpio;
++ int active_low;
++ char *desc;
++ int type;
++ /* Internal state vars - add below */
++};
++
++struct asic3_keys_platform_data {
++ struct asic3_keys_button *buttons;
++ int nbuttons;
++ struct input_dev *input;
++ struct device *asic3_dev;
++};
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/asic3_leds.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/hardware/asic3_leds.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,34 @@
++/*
++ * LEDs support for HTC ASIC3 devices.
++ *
++ * Copyright (c) 2006 Anton Vorontsov <cbou@mail.ru>
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++
++struct asic3_leds_machinfo;
++
++struct asic3_led {
++ struct led_classdev led_cdev;
++ int hw_num; /* Number of "hardware-accelerated" led */
++ int gpio_num; /* Number of GPIO if hw_num == -1 */
++ struct asic3_leds_machinfo *machinfo;
++};
++
++struct asic3_leds_machinfo {
++ int num_leds;
++ struct asic3_led *leds;
++ struct platform_device *asic3_pdev;
++};
++
++extern int asic3_leds_register(void);
++extern void asic3_leds_unregister(void);
++
+Index: linux-2.6.26-rc4/include/asm-arm/hardware/ipaq-asic3.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/hardware/ipaq-asic3.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,602 @@
++/*
++ *
++ * Definitions for the HTC ASIC3 chip found in several handheld devices
++ *
++ * Copyright 2001 Compaq Computer Corporation.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
++ * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
++ * FITNESS FOR ANY PARTICULAR PURPOSE.
++ *
++ * Author: Andrew Christian
++ *
++ */
++
++#ifndef IPAQ_ASIC3_H
++#define IPAQ_ASIC3_H
++
++/****************************************************/
++/* IPAQ, ASIC #3, replaces ASIC #1 */
++
++#define IPAQ_ASIC3_OFFSET(x,y) (_IPAQ_ASIC3_ ## x ## _Base + _IPAQ_ASIC3_ ## x ## _ ## y)
++#define IPAQ_ASIC3_GPIO_OFFSET(x,y) (_IPAQ_ASIC3_GPIO_ ## x ## _Base + _IPAQ_ASIC3_GPIO_ ## y)
++
++
++/* All offsets below are specified with the following address bus shift */
++#define ASIC3_DEFAULT_ADDR_SHIFT 2
++
++#define _IPAQ_ASIC3_GPIO_A_Base 0x0000
++#define _IPAQ_ASIC3_GPIO_B_Base 0x0100
++#define _IPAQ_ASIC3_GPIO_C_Base 0x0200
++#define _IPAQ_ASIC3_GPIO_D_Base 0x0300
++
++#define _IPAQ_ASIC3_GPIO_Mask 0x00 /* R/W 0:don't mask, 1:mask interrupt */
++#define _IPAQ_ASIC3_GPIO_Direction 0x04 /* R/W 0:input, 1:output */
++#define _IPAQ_ASIC3_GPIO_Out 0x08 /* R/W 0:output low, 1:output high */
++#define _IPAQ_ASIC3_GPIO_TriggerType 0x0c /* R/W 0:level, 1:edge */
++#define _IPAQ_ASIC3_GPIO_EdgeTrigger 0x10 /* R/W 0:falling, 1:rising */
++#define _IPAQ_ASIC3_GPIO_LevelTrigger 0x14 /* R/W 0:low, 1:high level detect */
++#define _IPAQ_ASIC3_GPIO_SleepMask 0x18 /* R/W 0:don't mask, 1:mask trigger in sleep mode */
++#define _IPAQ_ASIC3_GPIO_SleepOut 0x1c /* R/W level 0:low, 1:high in sleep mode */
++#define _IPAQ_ASIC3_GPIO_BattFaultOut 0x20 /* R/W level 0:low, 1:high in batt_fault */
++#define _IPAQ_ASIC3_GPIO_IntStatus 0x24 /* R/W 0:none, 1:detect */
++#define _IPAQ_ASIC3_GPIO_AltFunction 0x28 /* R/W 0:normal control 1:LED register control */
++#define _IPAQ_ASIC3_GPIO_SleepConf 0x2c /* R/W bit 1: autosleep 0: disable gposlpout in normal mode, enable gposlpout in sleep mode */
++#define _IPAQ_ASIC3_GPIO_Status 0x30 /* R Pin status */
++
++#define IPAQ_ASIC3_GPIO_A_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Mask )
++#define IPAQ_ASIC3_GPIO_A_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Direction )
++#define IPAQ_ASIC3_GPIO_A_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Out )
++#define IPAQ_ASIC3_GPIO_A_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, A, TriggerType )
++#define IPAQ_ASIC3_GPIO_A_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, A, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_A_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, A, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepMask )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepOut )
++#define IPAQ_ASIC3_GPIO_A_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, A, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_A_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, A, IntStatus )
++#define IPAQ_ASIC3_GPIO_A_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, A, AltFunction )
++#define IPAQ_ASIC3_GPIO_A_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, A, SleepConf )
++#define IPAQ_ASIC3_GPIO_A_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, A, Status )
++
++#define IPAQ_ASIC3_GPIO_B_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Mask )
++#define IPAQ_ASIC3_GPIO_B_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Direction )
++#define IPAQ_ASIC3_GPIO_B_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Out )
++#define IPAQ_ASIC3_GPIO_B_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, B, TriggerType )
++#define IPAQ_ASIC3_GPIO_B_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, B, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_B_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, B, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepMask )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepOut )
++#define IPAQ_ASIC3_GPIO_B_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, B, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_B_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, B, IntStatus )
++#define IPAQ_ASIC3_GPIO_B_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, B, AltFunction )
++#define IPAQ_ASIC3_GPIO_B_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, B, SleepConf )
++#define IPAQ_ASIC3_GPIO_B_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, B, Status )
++
++#define IPAQ_ASIC3_GPIO_C_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Mask )
++#define IPAQ_ASIC3_GPIO_C_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Direction )
++#define IPAQ_ASIC3_GPIO_C_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Out )
++#define IPAQ_ASIC3_GPIO_C_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, C, TriggerType )
++#define IPAQ_ASIC3_GPIO_C_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, C, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_C_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, C, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepMask )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepOut )
++#define IPAQ_ASIC3_GPIO_C_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, C, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_C_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, C, IntStatus )
++#define IPAQ_ASIC3_GPIO_C_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, C, AltFunction )
++#define IPAQ_ASIC3_GPIO_C_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, C, SleepConf )
++#define IPAQ_ASIC3_GPIO_C_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, C, Status )
++
++#define IPAQ_ASIC3_GPIO_D_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Mask )
++#define IPAQ_ASIC3_GPIO_D_DIR(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Direction )
++#define IPAQ_ASIC3_GPIO_D_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Out )
++#define IPAQ_ASIC3_GPIO_D_LEVELTRI(_b) IPAQ_ASIC3_GPIO( _b, u16, D, TriggerType )
++#define IPAQ_ASIC3_GPIO_D_RISING(_b) IPAQ_ASIC3_GPIO( _b, u16, D, EdgeTrigger )
++#define IPAQ_ASIC3_GPIO_D_LEVEL(_b) IPAQ_ASIC3_GPIO( _b, u16, D, LevelTrigger )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_MASK(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepMask )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepOut )
++#define IPAQ_ASIC3_GPIO_D_BATT_FAULT_OUT(_b) IPAQ_ASIC3_GPIO( _b, u16, D, BattFaultOut )
++#define IPAQ_ASIC3_GPIO_D_INT_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, D, IntStatus )
++#define IPAQ_ASIC3_GPIO_D_ALT_FUNCTION(_b) IPAQ_ASIC3_GPIO( _b, u16, D, AltFunction )
++#define IPAQ_ASIC3_GPIO_D_SLEEP_CONF(_b) IPAQ_ASIC3_GPIO( _b, u16, D, SleepConf )
++#define IPAQ_ASIC3_GPIO_D_STATUS(_b) IPAQ_ASIC3_GPIO( _b, u16, D, Status )
++
++#define _IPAQ_ASIC3_SPI_Base 0x0400
++#define _IPAQ_ASIC3_SPI_Control 0x0000
++#define _IPAQ_ASIC3_SPI_TxData 0x0004
++#define _IPAQ_ASIC3_SPI_RxData 0x0008
++#define _IPAQ_ASIC3_SPI_Int 0x000c
++#define _IPAQ_ASIC3_SPI_Status 0x0010
++
++#define IPAQ_ASIC3_SPI_Control(_b) IPAQ_ASIC3( _b, u16, SPI, Control )
++#define IPAQ_ASIC3_SPI_TxData(_b) IPAQ_ASIC3( _b, u16, SPI, TxData )
++#define IPAQ_ASIC3_SPI_RxData(_b) IPAQ_ASIC3( _b, u16, SPI, RxData )
++#define IPAQ_ASIC3_SPI_Int(_b) IPAQ_ASIC3( _b, u16, SPI, Int )
++#define IPAQ_ASIC3_SPI_Status(_b) IPAQ_ASIC3( _b, u16, SPI, Status )
++
++#define SPI_CONTROL_SPR(clk) ((clk) & 0x0f) /* Clock rate */
++
++#define _IPAQ_ASIC3_PWM_0_Base 0x0500
++#define _IPAQ_ASIC3_PWM_1_Base 0x0600
++#define _IPAQ_ASIC3_PWM_TimeBase 0x0000
++#define _IPAQ_ASIC3_PWM_PeriodTime 0x0004
++#define _IPAQ_ASIC3_PWM_DutyTime 0x0008
++
++#define IPAQ_ASIC3_PWM_TimeBase(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, TimeBase )
++#define IPAQ_ASIC3_PWM_PeriodTime(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, PeriodTime )
++#define IPAQ_ASIC3_PWM_DutyTime(_b, x) IPAQ_ASIC3_N( _b, u16, PWM, x, DutyTime )
++
++#define PWM_TIMEBASE_VALUE(x) ((x)&0xf) /* Low 4 bits sets time base */
++#define PWM_TIMEBASE_ENABLE (1 << 4) /* Enable clock */
++
++#define _IPAQ_ASIC3_LED_0_Base 0x0700
++#define _IPAQ_ASIC3_LED_1_Base 0x0800
++#define _IPAQ_ASIC3_LED_2_Base 0x0900
++#define _IPAQ_ASIC3_LED_TimeBase 0x0000 /* R/W 7 bits */
++#define _IPAQ_ASIC3_LED_PeriodTime 0x0004 /* R/W 12 bits */
++#define _IPAQ_ASIC3_LED_DutyTime 0x0008 /* R/W 12 bits */
++#define _IPAQ_ASIC3_LED_AutoStopCount 0x000c /* R/W 16 bits */
++
++#define IPAQ_ASIC3_LED_TimeBase(_b, x) IPAQ_ASIC3_N( _b, u8, LED, x, TimeBase )
++#define IPAQ_ASIC3_LED_PeriodTime(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, PeriodTime )
++#define IPAQ_ASIC3_LED_DutyTime(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, DutyTime )
++#define IPAQ_ASIC3_LED_AutoStopCount(_b, x) IPAQ_ASIC3_N( _b, u16, LED, x, AutoStopCount )
++
++/* LED TimeBase bits - match ASIC2 */
++#define LED_TBS 0x0f /* Low 4 bits sets time base, max = 13 */
++ /* Note: max = 5 on hx4700 */
++ /* 0: maximum time base */
++ /* 1: maximum time base / 2 */
++ /* n: maximum time base / 2^n */
++
++#define LED_EN (1 << 4) /* LED ON/OFF 0:off, 1:on */
++#define LED_AUTOSTOP (1 << 5) /* LED ON/OFF auto stop set 0:disable, 1:enable */
++#define LED_ALWAYS (1 << 6) /* LED Interrupt Mask 0:No mask, 1:mask */
++
++#define _IPAQ_ASIC3_CLOCK_Base 0x0A00
++#define _IPAQ_ASIC3_CLOCK_CDEX 0x00
++#define _IPAQ_ASIC3_CLOCK_SEL 0x04
++
++#define IPAQ_ASIC3_CLOCK_CDEX(_b) IPAQ_ASIC3( _b, u16, CLOCK, CDEX )
++#define IPAQ_ASIC3_CLOCK_SEL(_b) IPAQ_ASIC3( _b, u16, CLOCK, SEL )
++
++#define CLOCK_CDEX_SOURCE (1 << 0) /* 2 bits */
++#define CLOCK_CDEX_SOURCE0 (1 << 0)
++#define CLOCK_CDEX_SOURCE1 (1 << 1)
++#define CLOCK_CDEX_SPI (1 << 2)
++#define CLOCK_CDEX_OWM (1 << 3)
++#define CLOCK_CDEX_PWM0 (1 << 4)
++#define CLOCK_CDEX_PWM1 (1 << 5)
++#define CLOCK_CDEX_LED0 (1 << 6)
++#define CLOCK_CDEX_LED1 (1 << 7)
++#define CLOCK_CDEX_LED2 (1 << 8)
++
++#define CLOCK_CDEX_SD_HOST (1 << 9) /* R/W: SD host clock source 24.576M/12.288M */
++#define CLOCK_CDEX_SD_BUS (1 << 10) /* R/W: SD bus clock source control 24.576M/12.288M */
++#define CLOCK_CDEX_SMBUS (1 << 11)
++#define CLOCK_CDEX_CONTROL_CX (1 << 12)
++
++#define CLOCK_CDEX_EX0 (1 << 13) /* R/W: 32.768 kHz crystal */
++#define CLOCK_CDEX_EX1 (1 << 14) /* R/W: 24.576 MHz crystal */
++
++#define CLOCK_SEL_SD_HCLK_SEL (1 << 0) /* R/W: SDIO host clock select - 1: 24.576 Mhz, 0: 12.288 MHz */
++#define CLOCK_SEL_SD_BCLK_SEL (1 << 1) /* R/W: SDIO bus clock select - 1: 24.576 MHz, 0: 12.288 MHz */
++#define CLOCK_SEL_CX (1 << 2) /* R/W: INT clock source control (32.768 kHz) */
++
++
++#define _IPAQ_ASIC3_INTR_Base 0x0B00
++
++#define _IPAQ_ASIC3_INTR_IntMask 0x00 /* Interrupt mask control */
++#define _IPAQ_ASIC3_INTR_PIntStat 0x04 /* Peripheral interrupt status */
++#define _IPAQ_ASIC3_INTR_IntCPS 0x08 /* Interrupt timer clock pre-scale */
++#define _IPAQ_ASIC3_INTR_IntTBS 0x0c /* Interrupt timer set */
++
++#define IPAQ_ASIC3_INTR_IntMask(_b) IPAQ_ASIC3( _b, u8, INTR, IntMask )
++#define IPAQ_ASIC3_INTR_PIntStat(_b) IPAQ_ASIC3( _b, u8, INTR, PIntStat )
++#define IPAQ_ASIC3_INTR_IntCPS(_b) IPAQ_ASIC3( _b, u8, INTR, IntCPS )
++#define IPAQ_ASIC3_INTR_IntTBS(_b) IPAQ_ASIC3( _b, u16, INTR, IntTBS )
++
++#define ASIC3_INTMASK_GINTMASK (1 << 0) /* Global interrupt mask 1:enable */
++#define ASIC3_INTMASK_GINTEL (1 << 1) /* 1: rising edge, 0: hi level */
++#define ASIC3_INTMASK_MASK0 (1 << 2)
++#define ASIC3_INTMASK_MASK1 (1 << 3)
++#define ASIC3_INTMASK_MASK2 (1 << 4)
++#define ASIC3_INTMASK_MASK3 (1 << 5)
++#define ASIC3_INTMASK_MASK4 (1 << 6)
++#define ASIC3_INTMASK_MASK5 (1 << 7)
++
++#define ASIC3_INTR_PERIPHERAL_A (1 << 0)
++#define ASIC3_INTR_PERIPHERAL_B (1 << 1)
++#define ASIC3_INTR_PERIPHERAL_C (1 << 2)
++#define ASIC3_INTR_PERIPHERAL_D (1 << 3)
++#define ASIC3_INTR_LED0 (1 << 4)
++#define ASIC3_INTR_LED1 (1 << 5)
++#define ASIC3_INTR_LED2 (1 << 6)
++#define ASIC3_INTR_SPI (1 << 7)
++#define ASIC3_INTR_SMBUS (1 << 8)
++#define ASIC3_INTR_OWM (1 << 9)
++
++#define ASIC3_INTR_CPS(x) ((x)&0x0f) /* 4 bits, max 14 */
++#define ASIC3_INTR_CPS_SET ( 1 << 4 ) /* Time base enable */
++
++
++/* Basic control of the SD ASIC */
++#define _IPAQ_ASIC3_SDHWCTRL_Base 0x0E00
++
++#define _IPAQ_ASIC3_SDHWCTRL_SDConf 0x00
++#define IPAQ_ASIC3_SDHWCTRL_SDConf(_b) IPAQ_ASIC3( _b, u8, SDHWCTRL, SDConf )
++
++#define ASIC3_SDHWCTRL_SUSPEND (1 << 0) /* 1=suspend all SD operations */
++#define ASIC3_SDHWCTRL_CLKSEL (1 << 1) /* 1=SDICK, 0=HCLK */
++#define ASIC3_SDHWCTRL_PCLR (1 << 2) /* All registers of SDIO cleared */
++#define ASIC3_SDHWCTRL_LEVCD (1 << 3) /* Level of SD card detection: 1:high, 0:low */
++#define ASIC3_SDHWCTRL_LEVWP (1 << 4) /* Level of SD card write protection: 1=low, 0=high */
++#define ASIC3_SDHWCTRL_SDLED (1 << 5) /* SD card LED signal 1=enable, 0=disable */
++#define ASIC3_SDHWCTRL_SDPWR (1 << 6) /* SD card power supply control 1=enable */
++
++
++/* This is a pointer to an array of 12 u32 values - but only the lower 2 bytes matter */
++/* Use it as "IPAQ_ASIC3_HWPROTECT_ARRAY[x]" */
++
++#define _IPAQ_ASIC3_HWPROTECT_Base 0x1000
++#define IPAQ_ASIC3_HWPROTECT_ARRAY ((volatile u32*)(_IPAQ_ASIC3_Base + _IPAQ_ASIC3_HWPROTECT_Base))
++#define HWPROTECT_ARRAY_LEN 12
++#define HWPROTECT_ARRAY_VALUES {0x4854,0x432d,0x5344,0x494f,0x2050,0x2f4e,0x3a33,0x3048,0x3830,0x3032,0x382d,0x3030}
++
++
++#define _IPAQ_ASIC3_EXTCF_Base 0x1100
++
++#define _IPAQ_ASIC3_EXTCF_Select 0x00
++#define _IPAQ_ASIC3_EXTCF_Reset 0x04
++
++#define IPAQ_ASIC3_EXTCF_Select(_b) IPAQ_ASIC3( _b, u16, EXTCF, Select )
++#define IPAQ_ASIC3_EXTCF_Reset(_b) IPAQ_ASIC3( _b, u16, EXTCF, Reset )
++
++#define ASIC3_EXTCF_SMOD0 (1 << 0) /* slot number of mode 0 */
++#define ASIC3_EXTCF_SMOD1 (1 << 1) /* slot number of mode 1 */
++#define ASIC3_EXTCF_SMOD2 (1 << 2) /* slot number of mode 2 */
++#define ASIC3_EXTCF_OWM_EN (1 << 4) /* enable onewire module */
++#define ASIC3_EXTCF_OWM_SMB (1 << 5) /* OWM bus selection */
++#define ASIC3_EXTCF_OWM_RESET (1 << 6) /* undocumented, used by OWM and CF */
++#define ASIC3_EXTCF_CF0_SLEEP_MODE (1 << 7) /* CF0 sleep state control */
++#define ASIC3_EXTCF_CF1_SLEEP_MODE (1 << 8) /* CF1 sleep state control */
++#define ASIC3_EXTCF_CF0_PWAIT_EN (1 << 10) /* CF0 PWAIT_n control */
++#define ASIC3_EXTCF_CF1_PWAIT_EN (1 << 11) /* CF1 PWAIT_n control */
++#define ASIC3_EXTCF_CF0_BUF_EN (1 << 12) /* CF0 buffer control */
++#define ASIC3_EXTCF_CF1_BUF_EN (1 << 13) /* CF1 buffer control */
++#define ASIC3_EXTCF_SD_MEM_ENABLE (1 << 14)
++#define ASIC3_EXTCF_CF_SLEEP (1 << 15) /* CF sleep mode control */
++
++/*****************************************************************************
++ * The Onewire interface registers
++ *
++ * OWM_CMD
++ * OWM_DAT
++ * OWM_INTR
++ * OWM_INTEN
++ * OWM_CLKDIV
++ *
++ *****************************************************************************/
++
++#define _IPAQ_ASIC3_OWM_Base 0xC00
++
++#define _IPAQ_ASIC3_OWM_CMD 0x00
++#define _IPAQ_ASIC3_OWM_DAT 0x04
++#define _IPAQ_ASIC3_OWM_INTR 0x08
++#define _IPAQ_ASIC3_OWM_INTEN 0x0C
++#define _IPAQ_ASIC3_OWM_CLKDIV 0x10
++
++#define ASIC3_OWM_CMD_ONEWR (1 << 0)
++#define ASIC3_OWM_CMD_SRA (1 << 1)
++#define ASIC3_OWM_CMD_DQO (1 << 2)
++#define ASIC3_OWM_CMD_DQI (1 << 3)
++
++#define ASIC3_OWM_INTR_PD (1 << 0)
++#define ASIC3_OWM_INTR_PDR (1 << 1)
++#define ASIC3_OWM_INTR_TBE (1 << 2)
++#define ASIC3_OWM_INTR_TEMP (1 << 3)
++#define ASIC3_OWM_INTR_RBF (1 << 4)
++
++#define ASIC3_OWM_INTEN_EPD (1 << 0)
++#define ASIC3_OWM_INTEN_IAS (1 << 1)
++#define ASIC3_OWM_INTEN_ETBE (1 << 2)
++#define ASIC3_OWM_INTEN_ETMT (1 << 3)
++#define ASIC3_OWM_INTEN_ERBF (1 << 4)
++
++#define ASIC3_OWM_CLKDIV_PRE (3 << 0) /* two bits wide at bit position 0 */
++#define ASIC3_OWM_CLKDIV_DIV (7 << 2) /* 3 bits wide at bit position 2 */
++
++
++/*****************************************************************************
++ * The SD configuration registers are at a completely different location
++ * in memory. They are divided into three sets of registers:
++ *
++ * SD_CONFIG Core configuration register
++ * SD_CTRL Control registers for SD operations
++ * SDIO_CTRL Control registers for SDIO operations
++ *
++ *****************************************************************************/
++
++#define IPAQ_ASIC3_SD_CONFIG(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SD_CONFIG_Base + (_IPAQ_ASIC3_SD_CONFIG_ ## x))))
++
++#define _IPAQ_ASIC3_SD_CONFIG_Base 0x0400 // Assumes 32 bit addressing
++
++#define _IPAQ_ASIC3_SD_CONFIG_Command 0x08 /* R/W: Command */
++#define _IPAQ_ASIC3_SD_CONFIG_Addr0 0x20 /* [9:31] SD Control Register Base Address */
++#define _IPAQ_ASIC3_SD_CONFIG_Addr1 0x24 /* [9:31] SD Control Register Base Address */
++#define _IPAQ_ASIC3_SD_CONFIG_IntPin 0x78 /* R/O: interrupt assigned to pin */
++#define _IPAQ_ASIC3_SD_CONFIG_ClkStop 0x80 /* Set to 0x1f to clock SD controller, 0 otherwise. */
++ /* at 0x82 - Gated Clock Control */
++#define _IPAQ_ASIC3_SD_CONFIG_ClockMode 0x84 /* Control clock of SD controller */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_PinStatus 0x88 /* R/0: read status of SD pins */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Power1 0x90 /* Power1 - manual power control */
++ /* Power2 is at 0x92 - auto power up after card inserted */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Power3 0x94 /* auto power down when card removed */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_CardDetect 0x98 /* */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_Slot 0xA0 /* R/O: define support slot number */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk1 0x1E0 /* Could be used for gated clock (don't use) */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk2 0x1E2 /* Could be used for gated clock (don't use) */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_GPIO_OutAndEnable 0x1E8 /* GPIO Output Reg. , at 0x1EA - GPIO Output Enable Reg. */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_GPIO_Status 0x1EC /* GPIO Status Reg. */
++#define _IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk3 0x1F0 /* Bit 1: double buffer/single buffer */
++
++#define IPAQ_ASIC3_SD_CONFIG_Command(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Command )
++#define IPAQ_ASIC3_SD_CONFIG_Addr0(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Addr0 )
++#define IPAQ_ASIC3_SD_CONFIG_Addr1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, Addr1 )
++#define IPAQ_ASIC3_SD_CONFIG_IntPin(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, IntPin )
++#define IPAQ_ASIC3_SD_CONFIG_ClkStop(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, ClkStop )
++#define IPAQ_ASIC3_SD_CONFIG_ClockMode(_b) IPAQ_ASIC3_SD_CONFIG(_b, u8, ClockMode )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_PinStatus(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_PinStatus )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Power1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Power1 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Power3(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Power3 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_CardDetect(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_CardDetect )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_Slot(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_Slot )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk1(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_ExtGateClk1 )
++#define IPAQ_ASIC3_SD_CONFIG_SDHC_ExtGateClk3(_b) IPAQ_ASIC3_SD_CONFIG(_b, u16, SDHC_ExtGateClk3 )
++
++#define SD_CONFIG_
++
++#define SD_CONFIG_COMMAND_MAE (1<<1) /* Memory access enable (set to 1 to access SD Controller) */
++
++#define SD_CONFIG_CLK_ENABLE_ALL 0x1f
++
++#define SD_CONFIG_POWER1_PC_33V 0x0200 /* Set for 3.3 volts */
++#define SD_CONFIG_POWER1_PC_OFF 0x0000 /* Turn off power */
++
++#define SD_CONFIG_CARDDETECTMODE_CLK ((x)&0x3) /* two bits - number of cycles for card detection */
++
++
++#define _IPAQ_ASIC3_SD_CTRL_Base 0x1000
++
++#define IPAQ_ASIC3_SD(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SD_CTRL_Base + (_IPAQ_ASIC3_SD_CTRL_ ## x))))
++
++#define _IPAQ_ASIC3_SD_CTRL_Cmd 0x00
++#define _IPAQ_ASIC3_SD_CTRL_Arg0 0x08
++#define _IPAQ_ASIC3_SD_CTRL_Arg1 0x0C
++#define _IPAQ_ASIC3_SD_CTRL_StopInternal 0x10
++#define _IPAQ_ASIC3_SD_CTRL_TransferSectorCount 0x14
++#define _IPAQ_ASIC3_SD_CTRL_Response0 0x18
++#define _IPAQ_ASIC3_SD_CTRL_Response1 0x1C
++#define _IPAQ_ASIC3_SD_CTRL_Response2 0x20
++#define _IPAQ_ASIC3_SD_CTRL_Response3 0x24
++#define _IPAQ_ASIC3_SD_CTRL_Response4 0x28
++#define _IPAQ_ASIC3_SD_CTRL_Response5 0x2C
++#define _IPAQ_ASIC3_SD_CTRL_Response6 0x30
++#define _IPAQ_ASIC3_SD_CTRL_Response7 0x34
++#define _IPAQ_ASIC3_SD_CTRL_CardStatus 0x38
++#define _IPAQ_ASIC3_SD_CTRL_BufferCtrl 0x3C
++#define _IPAQ_ASIC3_SD_CTRL_IntMaskCard 0x40
++#define _IPAQ_ASIC3_SD_CTRL_IntMaskBuffer 0x44
++#define _IPAQ_ASIC3_SD_CTRL_CardClockCtrl 0x48
++#define _IPAQ_ASIC3_SD_CTRL_MemCardXferDataLen 0x4C
++#define _IPAQ_ASIC3_SD_CTRL_MemCardOptionSetup 0x50
++#define _IPAQ_ASIC3_SD_CTRL_ErrorStatus0 0x58
++#define _IPAQ_ASIC3_SD_CTRL_ErrorStatus1 0x5C
++#define _IPAQ_ASIC3_SD_CTRL_DataPort 0x60
++#define _IPAQ_ASIC3_SD_CTRL_TransactionCtrl 0x68
++#define _IPAQ_ASIC3_SD_CTRL_SoftwareReset 0x1C0
++
++#define IPAQ_ASIC3_SD_CTRL_Cmd(_b) IPAQ_ASIC3_SD( _b, u16, Cmd ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Arg0(_b) IPAQ_ASIC3_SD( _b, u16, Arg0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Arg1(_b) IPAQ_ASIC3_SD( _b, u16, Arg1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_StopInternal(_b) IPAQ_ASIC3_SD( _b, u16, StopInternal ) /* */
++#define IPAQ_ASIC3_SD_CTRL_TransferSectorCount(_b) IPAQ_ASIC3_SD( _b, u16, TransferSectorCount ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response0(_b) IPAQ_ASIC3_SD( _b, u16, Response0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response1(_b) IPAQ_ASIC3_SD( _b, u16, Response1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response2(_b) IPAQ_ASIC3_SD( _b, u16, Response2 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response3(_b) IPAQ_ASIC3_SD( _b, u16, Response3 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response4(_b) IPAQ_ASIC3_SD( _b, u16, Response4 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response5(_b) IPAQ_ASIC3_SD( _b, u16, Response5 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response6(_b) IPAQ_ASIC3_SD( _b, u16, Response6 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_Response7(_b) IPAQ_ASIC3_SD( _b, u16, Response7 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_CardStatus(_b) IPAQ_ASIC3_SD( _b, u16, CardStatus ) /* */
++#define IPAQ_ASIC3_SD_CTRL_BufferCtrl(_b) IPAQ_ASIC3_SD( _b, u16, BufferCtrl ) /* and error status*/
++#define IPAQ_ASIC3_SD_CTRL_IntMaskCard(_b) IPAQ_ASIC3_SD( _b, u16, IntMaskCard ) /* */
++#define IPAQ_ASIC3_SD_CTRL_IntMaskBuffer(_b) IPAQ_ASIC3_SD( _b, u16, IntMaskBuffer ) /* */
++#define IPAQ_ASIC3_SD_CTRL_CardClockCtrl(_b) IPAQ_ASIC3_SD( _b, u16, CardClockCtrl ) /* */
++#define IPAQ_ASIC3_SD_CTRL_MemCardXferDataLen(_b) IPAQ_ASIC3_SD( _b, u16, MemCardXferDataLen ) /* */
++#define IPAQ_ASIC3_SD_CTRL_MemCardOptionSetup(_b) IPAQ_ASIC3_SD( _b, u16, MemCardOptionSetup ) /* */
++#define IPAQ_ASIC3_SD_CTRL_ErrorStatus0(_b) IPAQ_ASIC3_SD( _b, u16, ErrorStatus0 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_ErrorStatus1(_b) IPAQ_ASIC3_SD( _b, u16, ErrorStatus1 ) /* */
++#define IPAQ_ASIC3_SD_CTRL_DataPort(_b) IPAQ_ASIC3_SD( _b, u16, DataPort ) /* */
++#define IPAQ_ASIC3_SD_CTRL_TransactionCtrl(_b) IPAQ_ASIC3_SD( _b, u16, TransactionCtrl ) /* */
++#define IPAQ_ASIC3_SD_CTRL_SoftwareReset(_b) IPAQ_ASIC3_SD( _b, u16, SoftwareReset ) /* */
++
++#define SD_CTRL_SOFTWARE_RESET_CLEAR (1<<0)
++
++#define SD_CTRL_TRANSACTIONCONTROL_SET (1<<8) // 0x0100
++
++#define SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD (1<<15)// 0x8000
++#define SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK (1<<8) // 0x0100
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_512 (1<<7) // 0x0080
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_256 (1<<6) // 0x0040
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_128 (1<<5) // 0x0020
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_64 (1<<4) // 0x0010
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_32 (1<<3) // 0x0008
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_16 (1<<2) // 0x0004
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_8 (1<<1) // 0x0002
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_4 (1<<0) // 0x0001
++#define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_2 (0<<0) // 0x0000
++
++#define MEM_CARD_OPTION_REQUIRED 0x000e
++#define MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(x) (((x)&0x0f)<<4) /* Four bits */
++#define MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT (1<<14) // 0x4000
++#define MEM_CARD_OPTION_DATA_XFR_WIDTH_1 (1<<15) // 0x8000
++#define MEM_CARD_OPTION_DATA_XFR_WIDTH_4 (0<<15) //~0x8000
++
++#define SD_CTRL_COMMAND_INDEX(x) ((x)&0x3f) /* 0=CMD0, 1=CMD1, ..., 63=CMD63 */
++#define SD_CTRL_COMMAND_TYPE_CMD (0 << 6)
++#define SD_CTRL_COMMAND_TYPE_ACMD (1 << 6)
++#define SD_CTRL_COMMAND_TYPE_AUTHENTICATION (2 << 6)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL (0 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1 (4 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B (5 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2 (6 << 8)
++#define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3 (7 << 8)
++#define SD_CTRL_COMMAND_DATA_PRESENT (1 << 11)
++#define SD_CTRL_COMMAND_TRANSFER_READ (1 << 12)
++#define SD_CTRL_COMMAND_TRANSFER_WRITE (0 << 12)
++#define SD_CTRL_COMMAND_MULTI_BLOCK (1 << 13)
++#define SD_CTRL_COMMAND_SECURITY_CMD (1 << 14)
++
++#define SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12 (1 << 0)
++#define SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12 (1 << 8)
++
++#define SD_CTRL_CARDSTATUS_RESPONSE_END (1 << 0)
++#define SD_CTRL_CARDSTATUS_RW_END (1 << 2)
++#define SD_CTRL_CARDSTATUS_CARD_REMOVED_0 (1 << 3)
++#define SD_CTRL_CARDSTATUS_CARD_INSERTED_0 (1 << 4)
++#define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_0 (1 << 5)
++#define SD_CTRL_CARDSTATUS_WRITE_PROTECT (1 << 7)
++#define SD_CTRL_CARDSTATUS_CARD_REMOVED_3 (1 << 8)
++#define SD_CTRL_CARDSTATUS_CARD_INSERTED_3 (1 << 9)
++#define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_3 (1 << 10)
++
++#define SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_BUFFERSTATUS_CRC_ERROR (1 << 1) // 0x0002
++#define SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR (1 << 2) // 0x0004
++#define SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT (1 << 3) // 0x0008
++#define SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW (1 << 4) // 0x0010
++#define SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW (1 << 5) // 0x0020
++#define SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT (1 << 6) // 0x0040
++#define SD_CTRL_BUFFERSTATUS_UNK7 (1 << 7) // 0x0080
++#define SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE (1 << 8) // 0x0100
++#define SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE (1 << 9) // 0x0200
++#define SD_CTRL_BUFFERSTATUS_ILLEGAL_FUNCTION (1 << 13)// 0x2000
++#define SD_CTRL_BUFFERSTATUS_CMD_BUSY (1 << 14)// 0x4000
++#define SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS (1 << 15)// 0x8000
++
++#define SD_CTRL_INTMASKCARD_RESPONSE_END (1 << 0) // 0x0001
++#define SD_CTRL_INTMASKCARD_RW_END (1 << 2) // 0x0004
++#define SD_CTRL_INTMASKCARD_CARD_REMOVED_0 (1 << 3) // 0x0008
++#define SD_CTRL_INTMASKCARD_CARD_INSERTED_0 (1 << 4) // 0x0010
++#define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 (1 << 5) // 0x0020
++#define SD_CTRL_INTMASKCARD_UNK6 (1 << 6) // 0x0040
++#define SD_CTRL_INTMASKCARD_WRITE_PROTECT (1 << 7) // 0x0080
++#define SD_CTRL_INTMASKCARD_CARD_REMOVED_3 (1 << 8) // 0x0100
++#define SD_CTRL_INTMASKCARD_CARD_INSERTED_3 (1 << 9) // 0x0200
++#define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 (1 << 10)// 0x0400
++
++#define SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_INTMASKBUFFER_CRC_ERROR (1 << 1) // 0x0002
++#define SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR (1 << 2) // 0x0004
++#define SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT (1 << 3) // 0x0008
++#define SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW (1 << 4) // 0x0010
++#define SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW (1 << 5) // 0x0020
++#define SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT (1 << 6) // 0x0040
++#define SD_CTRL_INTMASKBUFFER_UNK7 (1 << 7) // 0x0080
++#define SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE (1 << 8) // 0x0100
++#define SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE (1 << 9) // 0x0200
++#define SD_CTRL_INTMASKBUFFER_ILLEGAL_FUNCTION (1 << 13)// 0x2000
++#define SD_CTRL_INTMASKBUFFER_CMD_BUSY (1 << 14)// 0x4000
++#define SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS (1 << 15)// 0x8000
++
++#define SD_CTRL_DETAIL0_RESPONSE_CMD_ERROR (1 << 0) // 0x0001
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 2) // 0x0004
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_CMD12 (1 << 3) // 0x0008
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_READ_DATA (1 << 4) // 0x0010
++#define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_WRITE_CRC_STATUS (1 << 5) // 0x0020
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 8) // 0x0100
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_CMD12 (1 << 9) // 0x0200
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_READ_DATA (1 << 10)// 0x0400
++#define SD_CTRL_DETAIL0_CRC_ERROR_FOR_WRITE_CMD (1 << 11)// 0x0800
++
++#define SD_CTRL_DETAIL1_NO_CMD_RESPONSE (1 << 0) // 0x0001
++#define SD_CTRL_DETAIL1_TIMEOUT_READ_DATA (1 << 4) // 0x0010
++#define SD_CTRL_DETAIL1_TIMEOUT_CRS_STATUS (1 << 5) // 0x0020
++#define SD_CTRL_DETAIL1_TIMEOUT_CRC_BUSY (1 << 6) // 0x0040
++
++#define _IPAQ_ASIC3_SDIO_CTRL_Base 0x1200
++
++#define IPAQ_ASIC3_SDIO(_b, s,x) \
++ (*((volatile s *) ((_b) + _IPAQ_ASIC3_SDIO_CTRL_Base + (_IPAQ_ASIC3_SDIO_CTRL_ ## x))))
++
++#define _IPAQ_ASIC3_SDIO_CTRL_Cmd 0x00
++#define _IPAQ_ASIC3_SDIO_CTRL_CardPortSel 0x04
++#define _IPAQ_ASIC3_SDIO_CTRL_Arg0 0x08
++#define _IPAQ_ASIC3_SDIO_CTRL_Arg1 0x0C
++#define _IPAQ_ASIC3_SDIO_CTRL_TransferBlockCount 0x14
++#define _IPAQ_ASIC3_SDIO_CTRL_Response0 0x18
++#define _IPAQ_ASIC3_SDIO_CTRL_Response1 0x1C
++#define _IPAQ_ASIC3_SDIO_CTRL_Response2 0x20
++#define _IPAQ_ASIC3_SDIO_CTRL_Response3 0x24
++#define _IPAQ_ASIC3_SDIO_CTRL_Response4 0x28
++#define _IPAQ_ASIC3_SDIO_CTRL_Response5 0x2C
++#define _IPAQ_ASIC3_SDIO_CTRL_Response6 0x30
++#define _IPAQ_ASIC3_SDIO_CTRL_Response7 0x34
++#define _IPAQ_ASIC3_SDIO_CTRL_CardStatus 0x38
++#define _IPAQ_ASIC3_SDIO_CTRL_BufferCtrl 0x3C
++#define _IPAQ_ASIC3_SDIO_CTRL_IntMaskCard 0x40
++#define _IPAQ_ASIC3_SDIO_CTRL_IntMaskBuffer 0x44
++#define _IPAQ_ASIC3_SDIO_CTRL_CardXferDataLen 0x4C
++#define _IPAQ_ASIC3_SDIO_CTRL_CardOptionSetup 0x50
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorStatus0 0x54
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorStatus1 0x58
++#define _IPAQ_ASIC3_SDIO_CTRL_DataPort 0x60
++#define _IPAQ_ASIC3_SDIO_CTRL_TransactionCtrl 0x68
++#define _IPAQ_ASIC3_SDIO_CTRL_CardIntCtrl 0x6C
++#define _IPAQ_ASIC3_SDIO_CTRL_ClocknWaitCtrl 0x70
++#define _IPAQ_ASIC3_SDIO_CTRL_HostInformation 0x74
++#define _IPAQ_ASIC3_SDIO_CTRL_ErrorCtrl 0x78
++#define _IPAQ_ASIC3_SDIO_CTRL_LEDCtrl 0x7C
++#define _IPAQ_ASIC3_SDIO_CTRL_SoftwareReset 0x1C0
++
++#define IPAQ_ASIC3_SDIO_CTRL_Cmd(_b) IPAQ_ASIC3_SDIO( _b, u16, Cmd ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardPortSel(_b) IPAQ_ASIC3_SDIO( _b, u16, CardPortSel ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Arg0(_b) IPAQ_ASIC3_SDIO( _b, u16, Arg0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Arg1(_b) IPAQ_ASIC3_SDIO( _b, u16, Arg1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_TransferBlockCount(_b) IPAQ_ASIC3_SDIO( _b, u16, TransferBlockCount ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response0(_b) IPAQ_ASIC3_SDIO( _b, u16, Response0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response1(_b) IPAQ_ASIC3_SDIO( _b, u16, Response1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response2(_b) IPAQ_ASIC3_SDIO( _b, u16, Response2 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response3(_b) IPAQ_ASIC3_SDIO( _b, u16, Response3 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response4(_b) IPAQ_ASIC3_SDIO( _b, u16, Response4 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response5(_b) IPAQ_ASIC3_SDIO( _b, u16, Response5 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response6(_b) IPAQ_ASIC3_SDIO( _b, u16, Response6 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_Response7(_b) IPAQ_ASIC3_SDIO( _b, u16, Response7 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardStatus(_b) IPAQ_ASIC3_SDIO( _b, u16, CardStatus ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_BufferCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, BufferCtrl ) /* and error status*/
++#define IPAQ_ASIC3_SDIO_CTRL_IntMaskCard(_b) IPAQ_ASIC3_SDIO( _b, u16, IntMaskCard ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_IntMaskBuffer(_b) IPAQ_ASIC3_SDIO( _b, u16, IntMaskBuffer ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardXferDataLen(_b) IPAQ_ASIC3_SDIO( _b, u16, CardXferDataLen ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardOptionSetup(_b) IPAQ_ASIC3_SDIO( _b, u16, CardOptionSetup ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorStatus0(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorStatus0 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorStatus1(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorStatus1 ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_DataPort(_b) IPAQ_ASIC3_SDIO( _b, u16, DataPort ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_TransactionCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, TransactionCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_CardIntCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, CardIntCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ClocknWaitCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, ClocknWaitCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_HostInformation(_b) IPAQ_ASIC3_SDIO( _b, u16, HostInformation ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_ErrorCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, ErrorCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_LEDCtrl(_b) IPAQ_ASIC3_SDIO( _b, u16, LEDCtrl ) /* */
++#define IPAQ_ASIC3_SDIO_CTRL_SoftwareReset(_b) IPAQ_ASIC3_SDIO( _b, u16, SoftwareReset ) /* */
++
++#define IPAQ_ASIC3_MAP_SIZE 0x2000
++
++#endif
+Index: linux-2.6.26-rc4/include/linux/gpiodev.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/gpiodev.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,44 @@
++#ifndef __GPIODEV_H
++#define __GPIODEV_H
++
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <asm/gpio.h>
++
++/* Interface */
++
++/* This structure must be first member of device platform_data structure
++ of a device which provides gpiodev interface. All method pointers
++ must be non-NULL, so stubs must be used for non-implemented ones. */
++struct gpiodev_ops {
++ int (*get)(struct device *this, unsigned gpio_no);
++ void (*set)(struct device *this, unsigned gpio_no, int val);
++ int (*to_irq)(struct device *this, unsigned gpio_no);
++};
++
++/* Generalized GPIO structure */
++
++struct gpio {
++ struct device *gpio_dev;
++ unsigned gpio_no;
++};
++
++/* API functions */
++
++static inline int gpiodev_get_value(struct gpio *gpio)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ return ops->get(gpio->gpio_dev, gpio->gpio_no);
++}
++static inline void gpiodev_set_value(struct gpio *gpio, int val)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ ops->set(gpio->gpio_dev, gpio->gpio_no, val);
++}
++static inline int gpiodev_to_irq(struct gpio *gpio)
++{
++ struct gpiodev_ops *ops = gpio->gpio_dev->platform_data;
++ return ops->to_irq(gpio->gpio_dev, gpio->gpio_no);
++}
++
++#endif /* __GPIODEV_H */
+Index: linux-2.6.26-rc4/include/linux/input_pda.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/input_pda.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,47 @@
++#ifndef _INPUT_PDA_H
++#define _INPUT_PDA_H
++
++/*
++ * This is temporary virtual button key codes map
++ * for keyboardless handheld computers.
++ * Its purpose is to provide map common to all devices
++ * and known to work with current software and its bugs
++ * and misfeatures. Once issues with the software are
++ * solved, codes from input.h will be used directly
++ * (missing key definitions will be added).
++ */
++
++/* Some directly usable keycodes:
++KEY_POWER - Power/suspend button
++KEY_ENTER - Enter/Action/Central button on joypad
++KEY_UP
++KEY_DOWN
++KEY_LEFT
++KEY_RIGHT
++*/
++
++/* XXX Instead of using any values in include/linux/input.h, we have to use
++ use values < 128 due to some munging that kdrive does to get keystrokes.
++ When kdrive gets its key events from evdev instead of the console,
++ we should be able to switch to using input.h values and get rid of
++ xmodmap. */
++
++#define _KEY_APP1 KEY_F9 // xmodmap sees 67 + 8 = 75
++#define _KEY_APP2 KEY_F10 // xmodmap 76
++#define _KEY_APP3 KEY_F11 // xmodmap 95
++#define _KEY_APP4 KEY_F12 // xmodmap 96
++
++#define _KEY_RECORD KEY_RO
++
++/* It is highly recommended to use exactly 4 codes above for
++ 4 buttons the device has. This will ensure that console and
++ framebuffer applications (e.g. games) will work ok on all
++ devices. If you'd like more distinguishable names, following
++ convenience defines are provided, suiting many devices. */
++
++#define _KEY_CALENDAR _KEY_APP1
++#define _KEY_CONTACTS _KEY_APP2
++#define _KEY_MAIL _KEY_APP3
++#define _KEY_HOMEPAGE _KEY_APP4
++
++#endif
+Index: linux-2.6.26-rc4/include/linux/soc/asic3_base.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/soc/asic3_base.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,104 @@
++#include <asm/types.h>
++#include <linux/gpiodev.h>
++
++/* Private API - for ASIC3 devices internal use only */
++#define HDR_IPAQ_ASIC3_ACTION(ACTION,action,fn,FN) \
++u32 asic3_get_gpio_ ## action ## _ ## fn (struct device *dev); \
++void asic3_set_gpio_ ## action ## _ ## fn (struct device *dev, u32 bits, u32 val);
++
++#define HDR_IPAQ_ASIC3_FN(fn,FN) \
++ HDR_IPAQ_ASIC3_ACTION ( MASK,mask,fn,FN) \
++ HDR_IPAQ_ASIC3_ACTION ( DIR, dir, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( OUT, out, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( LEVELTRI, trigtype, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( RISING, rising, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( LEVEL, triglevel, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_MASK, sleepmask, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_OUT, sleepout, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( BATT_FAULT_OUT, battfaultout, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( INT_STATUS, intstatus, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( ALT_FUNCTION, alt_fn, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( SLEEP_CONF, sleepconf, fn, FN) \
++ HDR_IPAQ_ASIC3_ACTION ( STATUS, status, fn, FN)
++
++/* Public API */
++
++#define ASIC3_GPIOA_IRQ_BASE 0
++#define ASIC3_GPIOB_IRQ_BASE 16
++#define ASIC3_GPIOC_IRQ_BASE 32
++#define ASIC3_GPIOD_IRQ_BASE 48
++#define ASIC3_LED0_IRQ 64
++#define ASIC3_LED1_IRQ 65
++#define ASIC3_LED2_IRQ 66
++#define ASIC3_SPI_IRQ 67
++#define ASIC3_SMBUS_IRQ 68
++#define ASIC3_OWM_IRQ 69
++
++#define ASIC3_NR_GPIO_IRQS 64 /* 16 bits each GPIO A...D banks */
++#define ASIC3_NR_IRQS (ASIC3_OWM_IRQ + 1)
++
++extern int asic3_irq_base(struct device *dev);
++
++extern void asic3_write_register(struct device *dev, unsigned int reg,
++ u32 value);
++extern u32 asic3_read_register(struct device *dev, unsigned int reg);
++
++/* old clock api */
++extern void asic3_set_clock_sel(struct device *dev, u32 bits, u32 val);
++extern u32 asic3_get_clock_cdex(struct device *dev);
++extern void asic3_set_clock_cdex(struct device *dev, u32 bits, u32 val);
++
++extern void asic3_set_extcf_select(struct device *dev, u32 bits, u32 val);
++extern void asic3_set_extcf_reset(struct device *dev, u32 bits, u32 val);
++extern void asic3_set_sdhwctrl(struct device *dev, u32 bits, u32 val);
++
++extern void asic3_set_led(struct device *dev, int led_num, int duty_time,
++ int cycle_time, int timebase);
++
++extern int asic3_register_mmc(struct device *dev);
++extern int asic3_unregister_mmc(struct device *dev);
++
++/* Accessors for GPIO banks */
++HDR_IPAQ_ASIC3_FN(a, A)
++HDR_IPAQ_ASIC3_FN(b, B)
++HDR_IPAQ_ASIC3_FN(c, C)
++HDR_IPAQ_ASIC3_FN(d, D)
++
++#define _IPAQ_ASIC3_GPIO_BANK_A 0
++#define _IPAQ_ASIC3_GPIO_BANK_B 1
++#define _IPAQ_ASIC3_GPIO_BANK_C 2
++#define _IPAQ_ASIC3_GPIO_BANK_D 3
++
++#define ASIC3_GPIO_bit(gpio) (1 << (gpio & 0xf))
++
++extern int asic3_get_gpio_bit(struct device *dev, int gpio);
++extern void asic3_set_gpio_bit(struct device *dev, int gpio, int val);
++extern int asic3_gpio_get_value(struct device *dev, unsigned gpio);
++extern void asic3_gpio_set_value(struct device *dev, unsigned gpio, int val);
++
++
++struct tmio_mmc_hwconfig;
++
++struct asic3_platform_data
++{
++ // Must be first member
++ struct gpiodev_ops gpiodev_ops;
++
++ struct {
++ u32 dir;
++ u32 init;
++ u32 sleep_mask;
++ u32 sleep_out;
++ u32 batt_fault_out;
++ u32 sleep_conf;
++ u32 alt_function;
++ } gpio_a, gpio_b, gpio_c, gpio_d;
++
++ int irq_base;
++ unsigned int bus_shift;
++
++ struct platform_device **child_platform_devs;
++ int num_child_platform_devs;
++
++ struct tmio_mmc_hwconfig *tmio_mmc_hwconfig;
++};
+Index: linux-2.6.26-rc4/include/linux/soc/tmio_mmc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/linux/soc/tmio_mmc.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,17 @@
++#include <linux/platform_device.h>
++
++#define MMC_CLOCK_DISABLED 0
++#define MMC_CLOCK_ENABLED 1
++
++#define TMIO_WP_ALWAYS_RW ((void*)-1)
++
++struct tmio_mmc_hwconfig {
++ void (*hwinit)(struct platform_device *sdev);
++ void (*set_mmc_clock)(struct platform_device *sdev, int state);
++
++ /* NULL - use ASIC3 signal,
++ TMIO_WP_ALWAYS_RW - assume always R/W (e.g. miniSD)
++ otherwise - machine-specific handler */
++ int (*mmc_get_ro)(struct platform_device *pdev);
++ short address_shift;
++};
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-regs.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/pxa-regs.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa-regs.h 2008-06-01 18:49:45.000000000 +0100
+@@ -1117,6 +1117,8 @@
+ #define PWM_PWDUTY1 __REG(0x40C00004) /* PWM 1 Duty Cycle Register */
+ #define PWM_PERVAL1 __REG(0x40C00008) /* PWM 1 Period Control Register */
+
++#define LCCR4_13M_PCD_EN (1<<25) /* 13M PCD enable */
++#define LCCR4_PCDDIV (1<<31) /* PCD selection */
+
+ /*
+ * Interrupt Controller
+Index: linux-2.6.26-rc4/drivers/mmc/host/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mmc/host/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mmc/host/Kconfig 2008-06-01 18:49:45.000000000 +0100
+@@ -130,3 +130,9 @@
+
+ If unsure, or if your system has no SPI master driver, say N.
+
++config MMC_ASIC3
++ tristate "HTC ASIC3 SD/MMC support"
++ depends on MMC && HTC_ASIC3
++ help
++ This provides support for the ASIC3 SD/MMC controller, used
++ in the iPAQ hx4700 and others.
+Index: linux-2.6.26-rc4/drivers/mmc/host/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/mmc/host/Makefile 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/mmc/host/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -13,6 +13,7 @@
+ obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o
+ obj-$(CONFIG_MMC_WBSD) += wbsd.o
+ obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
++obj-$(CONFIG_MMC_ASIC3) += asic3_mmc.o
+ obj-$(CONFIG_MMC_OMAP) += omap.o
+ obj-$(CONFIG_MMC_AT91) += at91_mci.o
+ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
+Index: linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,900 @@
++/* Note that this driver can likely be merged into the tmio driver, so
++ * consider this code temporary. It works, though.
++ */
++/*
++ * linux/drivers/mmc/asic3_mmc.c
++ *
++ * Copyright (c) 2005 SDG Systems, LLC
++ *
++ * based on tmio_mmc.c
++ * Copyright (C) 2004 Ian Molton
++ *
++ * Refactored to support all ASIC3 devices, 2006 Paul Sokolovsky
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Driver for the SD / SDIO cell found in:
++ *
++ * TC6393XB
++ *
++ * This driver draws mainly on scattered spec sheets, Reverse engineering
++ * of the toshiba e800 SD driver and some parts of the 2.4 ASIC3 driver (4 bit
++ * support).
++ *
++ * Supports MMC 1 bit transfers and SD 1 and 4 bit modes.
++ *
++ * TODO:
++ * Eliminate FIXMEs
++ * SDIO support
++ * Power management
++ * Handle MMC errors (at all)
++ *
++ */
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/blkdev.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/mmc/mmc.h>
++#include <linux/mmc/host.h>
++#include <linux/mmc/card.h>
++//#include <linux/mmc/protocol.h>
++#include <linux/mmc/sd.h>
++#include <linux/scatterlist.h>
++//#include <linux/soc-old.h>
++#include <linux/soc/asic3_base.h>
++#include <linux/soc/tmio_mmc.h>
++
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/mach/irq.h>
++#include <linux/clk.h>
++#include <asm/mach-types.h>
++
++#include <asm/hardware/ipaq-asic3.h>
++#include "asic3_mmc.h"
++
++struct asic3_mmc_host {
++ void *ctl_base;
++ struct device *asic3_dev; /* asic3 device */
++ struct tmio_mmc_hwconfig *hwconfig; /* HW config data/handlers, guaranteed != NULL */
++ unsigned long bus_shift;
++ struct mmc_command *cmd;
++ struct mmc_request *mrq;
++ struct mmc_data *data;
++ struct mmc_host *mmc;
++ int irq;
++ unsigned short clock_for_sd;
++
++ /* I/O related stuff */
++ struct scatterlist *sg_ptr;
++ unsigned int sg_len;
++ unsigned int sg_off;
++};
++
++static void
++mmc_finish_request(struct asic3_mmc_host *host)
++{
++ struct mmc_request *mrq = host->mrq;
++
++ /* Write something to end the command */
++ host->mrq = NULL;
++ host->cmd = NULL;
++ host->data = NULL;
++
++ mmc_request_done(host->mmc, mrq);
++}
++
++
++#define ASIC3_MMC_REG(host, block, reg) (*((volatile u16 *) ((host->ctl_base) + ((_IPAQ_ASIC3_## block ## _Base + _IPAQ_ASIC3_ ## block ## _ ## reg) >> (2 - host->bus_shift))) ))
++
++static void
++mmc_start_command(struct asic3_mmc_host *host, struct mmc_command *cmd)
++{
++ struct mmc_data *data = host->data;
++ int c = cmd->opcode;
++
++ DBG("Opcode: %d, base: %p\n", cmd->opcode, host->ctl_base);
++
++ if(cmd->opcode == MMC_STOP_TRANSMISSION) {
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12;
++ cmd->resp[0] = cmd->opcode;
++ cmd->resp[1] = 0;
++ cmd->resp[2] = 0;
++ cmd->resp[3] = 0;
++ cmd->resp[4] = 0;
++ return;
++ }
++
++ switch(cmd->flags & 0x1f) {
++ case MMC_RSP_NONE: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL; break;
++ case MMC_RSP_R1: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1; break;
++ case MMC_RSP_R1B: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B; break;
++ case MMC_RSP_R2: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2; break;
++ case MMC_RSP_R3: c |= SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3; break;
++ default:
++ DBG("Unknown response type %d\n", cmd->flags & 0x1f);
++ break;
++ }
++
++ host->cmd = cmd;
++
++ if(cmd->opcode == MMC_APP_CMD) {
++ c |= APP_CMD;
++ }
++ if (cmd->opcode == MMC_GO_IDLE_STATE) {
++ c |= (3 << 8); /* This was removed from ipaq-asic3.h for some reason */
++ }
++ if(data) {
++ c |= SD_CTRL_COMMAND_DATA_PRESENT;
++ if(data->blocks > 1) {
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12;
++ c |= SD_CTRL_COMMAND_MULTI_BLOCK;
++ }
++ if(data->flags & MMC_DATA_READ) {
++ c |= SD_CTRL_COMMAND_TRANSFER_READ;
++ }
++ /* MMC_DATA_WRITE does not require a bit to be set */
++ }
++
++ /* Enable the command and data interrupts */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0
++#if 0
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_3
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_3
++#endif
++ );
++
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) = ~(
++ SD_CTRL_INTMASKBUFFER_UNK7
++ | SD_CTRL_INTMASKBUFFER_CMD_BUSY
++#if 0
++ | SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR
++ | SD_CTRL_INTMASKBUFFER_CRC_ERROR
++ | SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR
++ | SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT
++ | SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW
++ | SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW
++ | SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT
++ | SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE
++ | SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE
++ | SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS
++#endif
++ );
++
++ /* Send the command */
++ ASIC3_MMC_REG(host, SD_CTRL, Arg1) = cmd->arg >> 16;
++ ASIC3_MMC_REG(host, SD_CTRL, Arg0) = cmd->arg & 0xffff;
++ ASIC3_MMC_REG(host, SD_CTRL, Cmd) = c;
++}
++
++/* This chip always returns (at least?) as much data as you ask for. I'm
++ * unsure what happens if you ask for less than a block. This should be looked
++ * into to ensure that a funny length read doesnt mess up the controller data
++ * state machine.
++ *
++ * Aric: Statement above may not apply to ASIC3.
++ *
++ * FIXME - this chip cannot do 1 and 2 byte data requests in 4 bit mode
++ *
++ * Aric: Statement above may not apply to ASIC3.
++ */
++
++static struct tasklet_struct mmc_data_read_tasklet;
++
++static void
++mmc_data_transfer(unsigned long h)
++{
++ struct asic3_mmc_host *host = (struct asic3_mmc_host *)h;
++ struct mmc_data *data = host->data;
++ unsigned short *buf;
++ int count;
++ /* unsigned long flags; */
++
++ if(!data){
++ printk(KERN_WARNING DRIVER_NAME ": Spurious Data IRQ\n");
++ return;
++ }
++
++ /* local_irq_save(flags); */
++ /* buf = kmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); */
++ buf = kmap(host->sg_ptr->page);
++ buf += host->sg_ptr->offset/2 + host->sg_off/2;
++
++ /*
++ * Ensure we dont read more than one block. The chip will interrupt us
++ * When the next block is available.
++ */
++ count = host->sg_ptr->length - host->sg_off;
++ if(count > data->blksz) {
++ count = data->blksz;
++ }
++
++ DBG("count: %08x, page: %p, offset: %08x flags %08x\n",
++ count, host->sg_ptr->page, host->sg_off, data->flags);
++
++ host->sg_off += count;
++
++ /* Transfer the data */
++ if(data->flags & MMC_DATA_READ) {
++ while(count > 0) {
++ /* Read two bytes from SD/MMC controller. */
++ *buf = ASIC3_MMC_REG(host, SD_CTRL, DataPort);
++ buf++;
++ count -= 2;
++ }
++ //flush_dcache_page(host->sg_ptr->page);
++ } else {
++ while(count > 0) {
++ /* Write two bytes to SD/MMC controller. */
++ ASIC3_MMC_REG(host, SD_CTRL, DataPort) = *buf;
++ buf++;
++ count -= 2;
++ }
++ }
++
++ /* kunmap_atomic(host->sg_ptr->page, KM_BIO_SRC_IRQ); */
++ kunmap(host->sg_ptr->page);
++ /* local_irq_restore(flags); */
++ if(host->sg_off == host->sg_ptr->length) {
++ host->sg_ptr++;
++ host->sg_off = 0;
++ --host->sg_len;
++ }
++
++ return;
++}
++
++static void
++mmc_data_end_irq(struct asic3_mmc_host *host)
++{
++ struct mmc_data *data = host->data;
++
++ host->data = NULL;
++
++ if(!data){
++ printk(KERN_WARNING DRIVER_NAME ": Spurious data end IRQ\n");
++ return;
++ }
++
++ if (data->error == MMC_ERR_NONE) {
++ data->bytes_xfered = data->blocks * data->blksz;
++ } else {
++ data->bytes_xfered = 0;
++ }
++
++ DBG("Completed data request\n");
++
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = 0;
++
++ /* Make sure read enable interrupt and write enable interrupt are disabled */
++ if(data->flags & MMC_DATA_READ) {
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) |= SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE;
++ } else {
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) |= SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE;
++ }
++
++ mmc_finish_request(host);
++}
++
++static void
++mmc_cmd_irq(struct asic3_mmc_host *host, unsigned int buffer_stat)
++{
++ struct mmc_command *cmd = host->cmd;
++ u8 *buf = (u8 *)cmd->resp;
++ u16 data;
++
++ if(!host->cmd) {
++ printk(KERN_WARNING DRIVER_NAME ": Spurious CMD irq\n");
++ return;
++ }
++
++ host->cmd = NULL;
++ if(cmd->flags & MMC_RSP_PRESENT && cmd->flags & MMC_RSP_136) {
++ /* R2 */
++ buf[12] = 0xff;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response0);
++ buf[13] = data & 0xff;
++ buf[14] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response1);
++ buf[15] = data & 0xff;
++ buf[8] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response2);
++ buf[9] = data & 0xff;
++ buf[10] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response3);
++ buf[11] = data & 0xff;
++ buf[4] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response4);
++ buf[5] = data & 0xff;
++ buf[6] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response5);
++ buf[7] = data & 0xff;
++ buf[0] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response6);
++ buf[1] = data & 0xff;
++ buf[2] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response7);
++ buf[3] = data & 0xff;
++ } else if(cmd->flags & MMC_RSP_PRESENT) {
++ /* R1, R1B, R3 */
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response0);
++ buf[0] = data & 0xff;
++ buf[1] = data >> 8;
++ data = ASIC3_MMC_REG(host, SD_CTRL, Response1);
++ buf[2] = data & 0xff;
++ buf[3] = data >> 8;
++ }
++ DBG("Response: %08x %08x %08x %08x\n", cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
++
++ if(buffer_stat & SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT) {
++ cmd->error = MMC_ERR_TIMEOUT;
++ } else if((buffer_stat & SD_CTRL_BUFFERSTATUS_CRC_ERROR) && (cmd->flags & MMC_RSP_CRC)) {
++ cmd->error = MMC_ERR_BADCRC;
++ } else if(buffer_stat &
++ (
++ SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS
++ | SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR
++ | SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR
++ | SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW
++ | SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW
++ | SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT
++ )
++ ) {
++ DBG("Buffer status ERROR 0x%04x - inside check buffer\n", buffer_stat);
++ DBG("detail0 error status 0x%04x\n", ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus0));
++ DBG("detail1 error status 0x%04x\n", ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus1));
++ cmd->error = MMC_ERR_FAILED;
++ }
++
++ if(cmd->error == MMC_ERR_NONE) {
++ switch (cmd->opcode) {
++ case SD_APP_SET_BUS_WIDTH:
++ if(cmd->arg == SD_BUS_WIDTH_4) {
++ host->clock_for_sd = SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_4;
++ } else {
++ host->clock_for_sd = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1;
++ }
++ break;
++ case MMC_SELECT_CARD:
++ if((cmd->arg >> 16) == 0) {
++ /* We have been deselected. */
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1;
++ }
++ }
++ }
++
++ /*
++ * If there is data to handle we enable data IRQs here, and we will
++ * ultimatley finish the request in the mmc_data_end_irq handler.
++ */
++ if(host->data && (cmd->error == MMC_ERR_NONE)){
++ if(host->data->flags & MMC_DATA_READ) {
++ /* Enable the read enable interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &=
++ ~SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE;
++ } else {
++ /* Enable the write enable interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &=
++ ~SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE;
++ }
++ } else {
++ /* There's no data, or we encountered an error, so finish now. */
++ mmc_finish_request(host);
++ }
++
++ return;
++}
++
++static void hwinit2_irqsafe(struct asic3_mmc_host *host);
++
++static irqreturn_t
++mmc_irq(int irq, void *irq_desc)
++{
++ struct asic3_mmc_host *host;
++ unsigned int breg, bmask, bstatus, creg, cmask, cstatus;
++
++ host = irq_desc;
++
++ /* asic3 bstatus has errors */
++ bstatus = ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl);
++ bmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer);
++ cstatus = ASIC3_MMC_REG(host, SD_CTRL, CardStatus);
++ cmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard);
++ breg = bstatus & ~bmask & ~DONT_CARE_BUFFER_BITS;
++ creg = cstatus & ~cmask & ~DONT_CARE_CARD_BITS;
++
++ if (!breg && !creg) {
++ /* This occurs sometimes for no known reason. It doesn't hurt
++ * anything, so I don't print it. */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) &= ~breg;
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) &= ~creg;
++ goto out;
++ }
++
++ while (breg || creg) {
++
++ /* XXX TODO: Need to handle errors in breg here. */
++
++ /*
++ * Card insert/remove. The mmc controlling code is stateless. That
++ * is, it doesn't care if it was an insert or a remove. It treats
++ * both the same.
++ */
++ /* XXX Asic3 has _3 versions of these status bits, too, for a second slot, perhaps? */
++ if (creg & (SD_CTRL_CARDSTATUS_CARD_INSERTED_0 | SD_CTRL_CARDSTATUS_CARD_REMOVED_0)) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &=
++ ~(SD_CTRL_CARDSTATUS_CARD_REMOVED_0 | SD_CTRL_CARDSTATUS_CARD_INSERTED_0);
++ if(creg & SD_CTRL_CARDSTATUS_CARD_INSERTED_0) {
++ hwinit2_irqsafe(host);
++ }
++ mmc_detect_change(host->mmc,1);
++ }
++
++ /* Command completion */
++ if (creg & SD_CTRL_CARDSTATUS_RESPONSE_END) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &=
++ ~(SD_CTRL_CARDSTATUS_RESPONSE_END);
++ mmc_cmd_irq(host, bstatus);
++ }
++
++ /* Data transfer */
++ if (breg & (SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE | SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE)) {
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) &=
++ ~(SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE | SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE);
++ tasklet_schedule(&mmc_data_read_tasklet);
++ }
++
++ /* Data transfer completion */
++ if (creg & SD_CTRL_CARDSTATUS_RW_END) {
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) &= ~(SD_CTRL_CARDSTATUS_RW_END);
++ mmc_data_end_irq(host);
++ }
++
++ /* Check status - keep going until we've handled it all */
++ bstatus = ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl);
++ bmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer);
++ cstatus = ASIC3_MMC_REG(host, SD_CTRL, CardStatus);
++ cmask = ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard);
++ breg = bstatus & ~bmask & ~DONT_CARE_BUFFER_BITS;
++ creg = cstatus & ~cmask & ~DONT_CARE_CARD_BITS;
++ }
++
++out:
++ /* Ensure all interrupt sources are cleared */
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) = 0;
++ return IRQ_HANDLED;
++}
++
++static void
++mmc_start_data(struct asic3_mmc_host *host, struct mmc_data *data)
++{
++ DBG("setup data transfer: blocksize %08x nr_blocks %d, page: %08x, offset: %08x\n", data->blksz,
++ data->blocks, (int)data->sg->page, data->sg->offset);
++
++ host->sg_len = data->sg_len;
++ host->sg_ptr = data->sg;
++ host->sg_off = 0;
++ host->data = data;
++
++ /* Set transfer length and blocksize */
++ ASIC3_MMC_REG(host, SD_CTRL, TransferSectorCount) = data->blocks;
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardXferDataLen) = data->blksz;
++}
++
++/* Process requests from the MMC layer */
++static void
++mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ WARN_ON(host->mrq != NULL);
++
++ host->mrq = mrq;
++
++ /* If we're performing a data request we need to setup some
++ extra information */
++ if(mrq->data) {
++ mmc_start_data(host, mrq->data);
++ }
++
++ mmc_start_command(host, mrq->cmd);
++}
++
++/* Set MMC clock / power.
++ * Note: This controller uses a simple divider scheme therefore it cannot run
++ * a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as MMC
++ * wont run that fast, it has to be clocked at 12MHz which is the next slowest
++ * setting. This is likely not an issue because we are doing single 16-bit
++ * writes for data I/O.
++ */
++static void
++mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ u32 clk = 0;
++
++ DBG("clock %uHz busmode %u powermode %u Vdd %u\n",
++ ios->clock, ios->bus_mode, ios->power_mode, ios->vdd);
++
++ if (ios->clock) {
++ clk = 0x80; /* slowest by default */
++ if(ios->clock >= 24000000 / 256) clk >>= 1;
++ if(ios->clock >= 24000000 / 128) clk >>= 1;
++ if(ios->clock >= 24000000 / 64) clk >>= 1;
++ if(ios->clock >= 24000000 / 32) clk >>= 1;
++ if(ios->clock >= 24000000 / 16) clk >>= 1;
++ if(ios->clock >= 24000000 / 8) clk >>= 1;
++ if(ios->clock >= 24000000 / 4) clk >>= 1;
++ if(ios->clock >= 24000000 / 2) clk >>= 1;
++ if(ios->clock >= 24000000 / 1) clk >>= 1;
++ if(clk == 0) { /* For fastest speed we disable the divider. */
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 0;
++ } else {
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 1;
++ }
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) =
++ host->clock_for_sd
++ | SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK
++ | clk;
++ msleep(10);
++ } else {
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ }
++
++ switch (ios->power_mode) {
++ case MMC_POWER_OFF:
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = 0;
++ msleep(1);
++ break;
++ case MMC_POWER_UP:
++ break;
++ case MMC_POWER_ON:
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = SD_CONFIG_POWER1_PC_33V;
++ msleep(20);
++ break;
++ }
++}
++
++static int
++mmc_get_ro(struct mmc_host *mmc)
++{
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ /* Call custom handler for RO status */
++ if(host->hwconfig->mmc_get_ro) {
++ /* Special case for cards w/o WP lock (like miniSD) */
++ if (host->hwconfig->mmc_get_ro == (void*)-1) {
++ return 0;
++ } else {
++ struct platform_device *pdev = to_platform_device(mmc_dev(mmc));
++ return host->hwconfig->mmc_get_ro(pdev);
++ }
++ }
++
++ /* WRITE_PROTECT is active low */
++ return (ASIC3_MMC_REG(host, SD_CTRL, CardStatus) & SD_CTRL_CARDSTATUS_WRITE_PROTECT)?0:1;
++}
++
++static struct mmc_host_ops mmc_ops = {
++ .request = mmc_request,
++ .set_ios = mmc_set_ios,
++ .get_ro = mmc_get_ro,
++};
++
++static void
++hwinit2_irqsafe(struct asic3_mmc_host *host)
++{
++ ASIC3_MMC_REG(host, SD_CONFIG, Addr1) = 0x0000;
++ ASIC3_MMC_REG(host, SD_CONFIG, Addr0) = 0x0800;
++
++ ASIC3_MMC_REG(host, SD_CONFIG, ClkStop) = SD_CONFIG_CLKSTOP_ENABLE_ALL;
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_CardDetect) = 2;
++ ASIC3_MMC_REG(host, SD_CONFIG, Command) = SD_CONFIG_COMMAND_MAE;
++
++ ASIC3_MMC_REG(host, SD_CTRL, SoftwareReset) = 0; /* reset on */
++ mdelay(2);
++
++ ASIC3_MMC_REG(host, SD_CTRL, SoftwareReset) = 1; /* reset off */
++ mdelay(2);
++
++ ASIC3_MMC_REG(host, SD_CTRL, MemCardOptionSetup) =
++ MEM_CARD_OPTION_REQUIRED
++ | MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(14)
++ | MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT
++ | MEM_CARD_OPTION_DATA_XFR_WIDTH_1
++ ;
++ host->clock_for_sd = 0;
++
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardStatus) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, BufferCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus0) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, ErrorStatus1) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, StopInternal) = 0;
++
++ ASIC3_MMC_REG(host, SDIO_CTRL, ClocknWaitCtrl) = 0x100;
++ /* *((unsigned short *)(((char *)host->ctl_base) + 0x938)) = 0x100; */
++
++ ASIC3_MMC_REG(host, SD_CONFIG, ClockMode) = 0;
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++
++ mdelay(1);
++
++
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0
++#if 0
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_3
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_3
++#endif
++ )
++ ; /* check */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskBuffer) = 0xffff; /* IRQs off */
++
++ /*
++ * ASIC3_MMC_REG(host, SD_CTRL, TransactionCtrl) = SD_CTRL_TRANSACTIONCONTROL_SET;
++ * Wince has 0x1000
++ */
++ /* ASIC3_MMC_REG(host, SD_CTRL, TransactionCtrl) = 0x1000; */
++
++
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SDPWR, ASIC3_SDHWCTRL_SDPWR); /* turn on power at controller(?) */
++
++}
++
++static void
++hwinit(struct asic3_mmc_host *host, struct platform_device *pdev)
++{
++ /* Call custom handler for enabling clock (if needed) */
++ if(host->hwconfig->set_mmc_clock)
++ host->hwconfig->set_mmc_clock(pdev, MMC_CLOCK_ENABLED);
++
++ /* Not sure if it must be done bit by bit, but leaving as-is */
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_LEVCD, ASIC3_SDHWCTRL_LEVCD);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_LEVWP, ASIC3_SDHWCTRL_LEVWP);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, 0);
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_PCLR, 0);
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_EX1 | CLOCK_CDEX_EX0, CLOCK_CDEX_EX1 | CLOCK_CDEX_EX0);
++ msleep(1);
++
++ asic3_set_clock_sel (host->asic3_dev,
++ CLOCK_SEL_SD_HCLK_SEL | CLOCK_SEL_SD_BCLK_SEL,
++ CLOCK_SEL_SD_HCLK_SEL | 0); /* ? */
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS);
++ msleep(1);
++
++ asic3_set_extcf_select(host->asic3_dev, ASIC3_EXTCF_SD_MEM_ENABLE, ASIC3_EXTCF_SD_MEM_ENABLE);
++
++ /* Long Delay */
++ if( !machine_is_h4700())
++ msleep(500);
++
++ hwinit2_irqsafe(host);
++}
++
++#ifdef CONFIG_PM
++static int
++mmc_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ int ret;
++
++ ret = mmc_suspend_host(mmc, state);
++
++ if (ret) {
++ printk(KERN_ERR DRIVER_NAME ": Could not suspend MMC host, hardware not suspended");
++ return ret;
++ }
++
++ /* disable the card insert / remove interrupt while sleeping */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END);
++
++ /* disable clock */
++ ASIC3_MMC_REG(host, SD_CTRL, CardClockCtrl) = 0;
++ ASIC3_MMC_REG(host, SD_CONFIG, ClkStop) = 0;
++
++ /* power down */
++ ASIC3_MMC_REG(host, SD_CONFIG, SDHC_Power1) = 0;
++
++ asic3_set_clock_cdex (host->asic3_dev,
++ CLOCK_CDEX_SD_HOST | CLOCK_CDEX_SD_BUS, 0);
++
++ /* disable core clock */
++ if(host->hwconfig->set_mmc_clock)
++ host->hwconfig->set_mmc_clock(pdev, MMC_CLOCK_DISABLED);
++
++ /* Put in suspend mode */
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, ASIC3_SDHWCTRL_SUSPEND);
++ return 0;
++}
++
++static int
++mmc_resume(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++
++ printk(KERN_INFO "%s: starting resume\n", DRIVER_NAME);
++
++ asic3_set_sdhwctrl(host->asic3_dev, ASIC3_SDHWCTRL_SUSPEND, 0);
++ hwinit(host, pdev);
++
++ /* re-enable card remove / insert interrupt */
++ ASIC3_MMC_REG(host, SD_CTRL, IntMaskCard) = ~(
++ SD_CTRL_INTMASKCARD_RESPONSE_END
++ | SD_CTRL_INTMASKCARD_RW_END
++ | SD_CTRL_INTMASKCARD_CARD_REMOVED_0
++ | SD_CTRL_INTMASKCARD_CARD_INSERTED_0 );
++
++ mmc_resume_host(mmc);
++
++ printk(KERN_INFO "%s: finished resume\n", DRIVER_NAME);
++ return 0;
++}
++#endif
++
++static int
++mmc_probe(struct platform_device *pdev)
++{
++ struct mmc_host *mmc;
++ struct asic3_mmc_host *host = NULL;
++ int retval = 0;
++ struct tmio_mmc_hwconfig *mmc_config = (struct tmio_mmc_hwconfig *)pdev->dev.platform_data;
++
++ /* bus_shift is mandatory */
++ if (!mmc_config) {
++ printk(KERN_ERR DRIVER_NAME ": Invalid configuration\n");
++ return -EINVAL;
++ }
++
++ mmc = mmc_alloc_host(sizeof(struct asic3_mmc_host) + 128, &pdev->dev);
++ if (!mmc) {
++ retval = -ENOMEM;
++ goto exceptional_return;
++ }
++
++ host = mmc_priv(mmc);
++ host->mmc = mmc;
++ platform_set_drvdata(pdev, mmc);
++
++ host->ctl_base = 0;
++ host->hwconfig = mmc_config;
++ host->bus_shift = mmc_config->address_shift;
++ host->asic3_dev = pdev->dev.parent;
++ host->clock_for_sd = 0;
++
++ tasklet_init(&mmc_data_read_tasklet, mmc_data_transfer, (unsigned long)host);
++
++ host->ctl_base = ioremap_nocache ((unsigned long)pdev->resource[0].start, pdev->resource[0].end - pdev->resource[0].start);
++ if(!host->ctl_base){
++ printk(KERN_ERR DRIVER_NAME ": Could not map ASIC3 SD controller\n");
++ retval = -ENODEV;
++ goto exceptional_return;
++ }
++
++ printk(DRIVER_NAME ": ASIC3 MMC/SD Driver, controller at 0x%lx\n", (unsigned long)pdev->resource[0].start);
++
++ mmc->ops = &mmc_ops;
++ mmc->caps = MMC_CAP_4_BIT_DATA;
++ mmc->f_min = 46875; /* ARIC: not sure what these should be */
++ mmc->f_max = 24000000; /* ARIC: not sure what these should be */
++ mmc->ocr_avail = MMC_VDD_32_33;
++
++ hwinit(host, pdev);
++
++
++ host->irq = pdev->resource[1].start;
++
++ retval = request_irq(host->irq, mmc_irq, 0, DRIVER_NAME, host);
++ if(retval) {
++ printk(KERN_ERR DRIVER_NAME ": Unable to get interrupt\n");
++ retval = -ENODEV;
++ goto exceptional_return;
++ }
++ set_irq_type(host->irq, IRQT_FALLING);
++
++ mmc_add_host(mmc);
++
++#ifdef CONFIG_PM
++ // resume_timer.function = resume_timer_callback;
++ // resume_timer.data = 0;
++ // init_timer(&resume_timer);
++#endif
++
++ return 0;
++
++exceptional_return:
++ if (mmc) {
++ mmc_free_host(mmc);
++ }
++ if(host && host->ctl_base) iounmap(host->ctl_base);
++ return retval;
++}
++
++static int
++mmc_remove(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++
++ platform_set_drvdata(pdev, NULL);
++
++ if (mmc) {
++ struct asic3_mmc_host *host = mmc_priv(mmc);
++ mmc_remove_host(mmc);
++ free_irq(host->irq, host);
++ /* FIXME - we might want to consider stopping the chip here... */
++ iounmap(host->ctl_base);
++ mmc_free_host(mmc); /* FIXME - why does this call hang? */
++ }
++ return 0;
++}
++
++/* ------------------- device registration ----------------------- */
++
++static struct platform_driver mmc_asic3_driver = {
++ .driver = {
++ .name = DRIVER_NAME,
++ },
++ .probe = mmc_probe,
++ .remove = mmc_remove,
++#ifdef CONFIG_PM
++ .suspend = mmc_suspend,
++ .resume = mmc_resume,
++#endif
++};
++
++static int __init mmc_init(void)
++{
++ return platform_driver_register(&mmc_asic3_driver);
++}
++
++static void __exit mmc_exit(void)
++{
++ platform_driver_unregister(&mmc_asic3_driver);
++}
++
++late_initcall(mmc_init);
++module_exit(mmc_exit);
++
++MODULE_DESCRIPTION("HTC ASIC3 SD/MMC driver");
++MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/mmc/host/asic3_mmc.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,25 @@
++#ifndef __ASIC3_MMC_H
++#define __ASIC3_MMC_H
++
++#define DRIVER_NAME "asic3_mmc"
++
++#ifdef CONFIG_MMC_DEBUG
++#define DBG(x...) printk(DRIVER_NAME ": " x)
++#else
++#define DBG(x...) do { } while (0)
++#endif
++
++/* Response types */
++#define APP_CMD 0x0040
++
++#define SD_CONFIG_CLKSTOP_ENABLE_ALL 0x1f
++
++#define DONT_CARE_CARD_BITS ( \
++ SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 \
++ | SD_CTRL_INTMASKCARD_WRITE_PROTECT \
++ | SD_CTRL_INTMASKCARD_UNK6 \
++ | SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 \
++ )
++#define DONT_CARE_BUFFER_BITS ( SD_CTRL_INTMASKBUFFER_UNK7 | SD_CTRL_INTMASKBUFFER_CMD_BUSY )
++
++#endif // __ASIC3_MMC_H
+Index: linux-2.6.26-rc4/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/Makefile 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/Makefile 2008-06-01 18:52:37.000000000 +0100
+@@ -15,6 +15,7 @@
+ obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
+ obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
+ obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
++obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+ obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+Index: linux-2.6.26-rc4/drivers/input/keyboard/asic3_keys.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/drivers/input/keyboard/asic3_keys.c 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,131 @@
++/*
++ * Generic buttons driver for ASIC3 SoC.
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ *
++ * Copyright (C) 2003 Joshua Wise
++ * Copyright (C) 2005 Pawel Kolodziejski
++ * Copyright (C) 2006 Paul Sokolovsky
++ *
++ */
++
++#include <linux/input.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/soc/asic3_base.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <asm/arch/irqs.h>
++#include <asm/hardware.h>
++#include <asm/hardware/ipaq-asic3.h>
++#include <asm/hardware/asic3_keys.h>
++
++static irqreturn_t asic3_keys_asic_handle(int irq, void *data)
++{
++ struct asic3_keys_platform_data *pdata = data;
++ int i, base_irq;
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++ for (i = 0; i < pdata->nbuttons; i++) {
++ struct asic3_keys_button *b = &pdata->buttons[i];
++ if ((base_irq + b->gpio) == irq) {
++ int state = !!asic3_gpio_get_value(pdata->asic3_dev, b->gpio);
++
++ if (pdata->buttons[i].type == EV_SW)
++ input_report_switch(pdata->input, pdata->buttons[i].keycode, state ^ b->active_low);
++ else
++ input_report_key(pdata->input, b->keycode, state ^ b->active_low);
++ input_sync(pdata->input);
++ }
++ }
++
++ return IRQ_HANDLED;
++}
++
++static int __devinit asic3_keys_probe(struct platform_device *pdev)
++{
++ struct asic3_keys_platform_data *pdata = pdev->dev.platform_data;
++ int i, base_irq;
++ int j, ret;
++
++ pdata->input = input_allocate_device();
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++
++ for (i = 0; i < pdata->nbuttons; i++) {
++ struct asic3_keys_button *b = &pdata->buttons[i];
++ set_bit(b->keycode, pdata->input->keybit);
++ ret=request_irq(base_irq + b->gpio, asic3_keys_asic_handle, SA_SAMPLE_RANDOM, b->desc, pdata);
++ if (ret)
++ {
++ printk(KERN_NOTICE "Failed to allocate asic3_keys irq=%d.\n",b->gpio);
++
++ for(j=0; j<i ; j++)
++ free_irq(base_irq + pdata->buttons[i].gpio, NULL);
++
++ input_unregister_device (pdata->input);
++
++ return -ENODEV;
++ }
++
++ set_irq_type(base_irq + b->gpio, IRQT_BOTHEDGE);
++ if (pdata->buttons[i].type == EV_SW) {
++ pdata->input->evbit[0] |= BIT(EV_SW);
++ set_bit(b->keycode, pdata->input->swbit);
++ } else {
++ pdata->input->evbit[0] |= BIT(EV_KEY);
++ set_bit(b->keycode, pdata->input->keybit);
++ }
++ }
++
++ pdata->input->name = pdev->name;
++ input_register_device(pdata->input);
++
++ return 0;
++}
++
++static int __devexit asic3_keys_remove(struct platform_device *pdev)
++{
++ struct asic3_keys_platform_data *pdata = pdev->dev.platform_data;
++ int i, base_irq;
++
++ base_irq = asic3_irq_base(pdata->asic3_dev);
++ for (i = 0; i < pdata->nbuttons; i++) {
++ free_irq(base_irq + pdata->buttons[i].gpio, NULL);
++ }
++
++ input_unregister_device(pdata->input);
++
++ return 0;
++}
++
++
++static struct platform_driver asic3_keys_driver = {
++ .probe = asic3_keys_probe,
++ .remove = __devexit_p(asic3_keys_remove),
++ .driver = {
++ .name = "asic3-keys",
++ },
++};
++
++static int __init asic3_keys_init(void)
++{
++ return platform_driver_register(&asic3_keys_driver);
++}
++
++static void __exit asic3_keys_exit(void)
++{
++ platform_driver_unregister(&asic3_keys_driver);
++}
++
++module_init(asic3_keys_init);
++module_exit(asic3_keys_exit);
++
++MODULE_AUTHOR("Joshua Wise, Pawel Kolodziejski, Paul Sokolovsky");
++MODULE_DESCRIPTION("Buttons driver for HTC ASIC3 SoC");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/irqs.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/irqs.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/irqs.h 2008-06-01 18:49:45.000000000 +0100
+@@ -184,6 +184,8 @@
+ defined(CONFIG_MACH_PCM027) || \
+ defined(CONFIG_MACH_MAGICIAN)
+ #define NR_IRQS (IRQ_BOARD_END)
++#elif defined(CONFIG_MACH_HTCUNIVERSAL)
++#define NR_IRQS (IRQ_BOARD_START + 96)
+ #else
+ #define NR_IRQS (IRQ_BOARD_START)
+ #endif
+Index: linux-2.6.26-rc4/include/linux/ioport.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/linux/ioport.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/linux/ioport.h 2008-06-01 18:49:45.000000000 +0100
+@@ -59,6 +59,7 @@
+ #define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
+ #define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+ #define IORESOURCE_IRQ_SHAREABLE (1<<4)
++#define IORESOURCE_IRQ_SOC_SUBDEVICE (1<<5)
+
+ /* ISA PnP DMA specific bits (IORESOURCE_BITS) */
+ #define IORESOURCE_DMA_TYPE_MASK (3<<0)
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/serial.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/serial.h 2008-06-01 18:49:45.000000000 +0100
+@@ -0,0 +1,78 @@
++/*
++ * linux/include/asm-arm/arch-pxa/serial.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <asm/arch/pxa-regs.h>
++
++#define BAUD_BASE 921600
++
++/* Standard COM flags */
++#define STD_COM_FLAGS (ASYNC_SKIP_TEST)
++
++#define STD_SERIAL_PORT_DEFNS \
++ { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &FFUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_FFUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &STUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_STUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &BTUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_BTUART, \
++ flags: STD_COM_FLAGS, \
++ }
++
++#define EXTRA_SERIAL_PORT_DEFNS
++
++struct platform_pxa_serial_funcs {
++
++ /* Initialize whatever is connected to this serial port. */
++ void (*configure)(int state);
++#define PXA_UART_CFG_PRE_STARTUP 0
++#define PXA_UART_CFG_POST_STARTUP 1
++#define PXA_UART_CFG_PRE_SHUTDOWN 2
++#define PXA_UART_CFG_POST_SHUTDOWN 3
++
++ /* Enable or disable the individual transmitter/receiver submodules.
++ * On transceivers without echo cancellation (e.g. SIR)
++ * transmitter always has priority; e.g. if both bits are set,
++ * only the transmitter is enabled. */
++ void (*set_txrx)(int txrx);
++#define PXA_SERIAL_TX 1
++#define PXA_SERIAL_RX 2
++
++ /* Get the current state of tx/rx. */
++ int (*get_txrx)(void);
++
++ int (*suspend)(struct platform_device *dev, pm_message_t state);
++ int (*resume)(struct platform_device *dev);
++};
++
++void pxa_set_ffuart_info(struct platform_pxa_serial_funcs *ffuart_funcs);
++void pxa_set_btuart_info(struct platform_pxa_serial_funcs *btuart_funcs);
++void pxa_set_stuart_info(struct platform_pxa_serial_funcs *stuart_funcs);
++void pxa_set_hwuart_info(struct platform_pxa_serial_funcs *hwuart_funcs);
+Index: linux-2.6.26-rc4/drivers/serial/pxa.c
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/serial/pxa.c 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/serial/pxa.c 2008-06-01 18:49:45.000000000 +0100
+@@ -47,6 +47,7 @@
+ #include <asm/io.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
++#include <asm/arch/serial.h>
+ #include <asm/arch/pxa-regs.h>
+
+
+@@ -60,6 +61,14 @@
+ char *name;
+ };
+
++
++#define IS_METHOD(dev, method) (dev && (dev)->platform_data && ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method)
++#define METHOD_CALL(dev, method) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method()
++#define SAFE_METHOD_CALL(dev, method, args...) \
++ if (IS_METHOD(dev, method)) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method(args)
++
+ static inline unsigned int serial_in(struct uart_pxa_port *up, int offset)
+ {
+ offset <<= 2;
+@@ -347,6 +356,9 @@
+ unsigned long flags;
+ int retval;
+
++ /* Perform platform-specific port initialization, if needed. */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_STARTUP);
++
+ if (port->line == 3) /* HWUART */
+ up->mcr |= UART_MCR_AFE;
+ else
+@@ -404,6 +416,12 @@
+ (void) serial_in(up, UART_IIR);
+ (void) serial_in(up, UART_MSR);
+
++ /*
++ * Perform platform-specific port initialization if needed
++ */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_STARTUP);
++ SAFE_METHOD_CALL(port->dev, set_txrx, PXA_SERIAL_RX);
++
+ return 0;
+ }
+
+@@ -412,6 +430,8 @@
+ struct uart_pxa_port *up = (struct uart_pxa_port *)port;
+ unsigned long flags;
+
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_SHUTDOWN);
++
+ free_irq(up->port.irq, up);
+
+ /*
+@@ -433,6 +453,8 @@
+ UART_FCR_CLEAR_RCVR |
+ UART_FCR_CLEAR_XMIT);
+ serial_out(up, UART_FCR, 0);
++
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_SHUTDOWN);
+ }
+
+ static void
+Index: linux-2.6.26-rc4/drivers/leds/Makefile
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/leds/Makefile 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/leds/Makefile 2008-06-01 18:49:45.000000000 +0100
+@@ -14,6 +14,7 @@
+ obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
+ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
++obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o
+ obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
+ obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
+ obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
+Index: linux-2.6.26-rc4/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/input/keyboard/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/input/keyboard/Kconfig 2008-06-01 18:52:13.000000000 +0100
+@@ -132,6 +132,13 @@
+ To compile this driver as a module, choose M here: the
+ module will be called stowaway.
+
++config KEYBOARD_ASIC3
++ tristate "Buttons on ASIC3 SoC GPIOs (iPaqs, etc.)"
++ depends on HTC_ASIC3
++ help
++ This enables support for the buttons attached to GPIOs of
++ HTC ASIC3 peripheral controller.
++
+ config KEYBOARD_CORGI
+ tristate "Corgi keyboard"
+ depends on PXA_SHARPSL
diff --git a/recipes/linux/linux-kexecboot-2.6.26/htcuniversal/defconfig b/recipes/linux/linux-kexecboot-2.6.26/htcuniversal/defconfig
new file mode 100644
index 0000000000..e9d5dc1e22
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/htcuniversal/defconfig
@@ -0,0 +1,1309 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 21:46:02 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_DMABOUNCE=y
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+CONFIG_ARCH_LUBBOCK=y
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA25x=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+CONFIG_SA1111=y
+CONFIG_FORCE_MAX_ZONEORDER=9
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+CONFIG_CPU_FREQ_PXA25x=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+# CONFIG_SUSPEND is not set
+CONFIG_APM_EMULATION=y
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=y
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=y
+# CONFIG_IRNET is not set
+CONFIG_IRCOMM=y
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+CONFIG_IRDA_DEBUG=y
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=y
+
+#
+# Dongle support
+#
+# CONFIG_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_PXA_FICP=y
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+# CONFIG_MTD_CHAR is not set
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_MTDRAM=m
+CONFIG_MTDRAM_TOTAL_SIZE=4096
+CONFIG_MTDRAM_ERASE_SIZE=128
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_NET_ETHERNET is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+CONFIG_NET_RADIO=y
+# CONFIG_NET_WIRELESS_RTNETLINK is not set
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+CONFIG_ACX=m
+CONFIG_ACX_MEM=y
+# CONFIG_ACX_CS is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_POWER is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_ASIC3=y
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_DS1WM=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_HTC_ASIC3=y
+CONFIG_HTC_ASIC3_DS1WM=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_PXA is not set
+CONFIG_MMC_ASIC3=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+CONFIG_LEDS_ASIC3=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+CONFIG_NLS_CODEPAGE_1250=y
+CONFIG_NLS_CODEPAGE_1251=y
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_VM=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_LZO is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/hx2000/defconfig b/recipes/linux/linux-kexecboot-2.6.26/hx2000/defconfig
new file mode 100644
index 0000000000..1fcf2bb910
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/hx2000/defconfig
@@ -0,0 +1,1733 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:10:53 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_MACH_HX2750=y
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
+CONFIG_PXA_KEYS=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PXA2XX is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_PXA27x=m
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_TOUCHSCREEN_TSC2101=y
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_MFD_TSC2101=y
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig b/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig
new file mode 100644
index 0000000000..4d40205111
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig
@@ -0,0 +1,1751 @@
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Fri Jan 25 22:13:14 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+CONFIG_MACH_POODLE=y
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_TOSA is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=m
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+CONFIG_CPU_FREQ_PXA25x=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=m
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=m
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=m
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_LOCOMO=y
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_LCD_QVGA=y
+# CONFIG_FB_PXA_LCD_VGA is not set
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+CONFIG_SND_PXA2XX_SOC_I2S=m
+CONFIG_SND_PXA2XX_SOC_POODLE=m
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM8731=m
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+# CONFIG_AC97_BUS is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_LOCOMO=y
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/poodle_pm-r7.patch b/recipes/linux/linux-kexecboot-2.6.26/poodle_pm-r7.patch
new file mode 100644
index 0000000000..75ad6213f4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/poodle_pm-r7.patch
@@ -0,0 +1,481 @@
+ arch/arm/common/locomo.c | 6
+ arch/arm/common/sharpsl_pm.c | 9
+ arch/arm/mach-pxa/Kconfig | 1
+ arch/arm/mach-pxa/Makefile | 2
+ arch/arm/mach-pxa/poodle_pm.c | 355 ++++++++++++++++++++++++++++++++++++++
+ include/asm-arm/hardware/locomo.h | 5
+ 6 files changed, 377 insertions(+), 1 deletion(-)
+
+Index: linux-2.6.26/arch/arm/common/sharpsl_pm.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/common/sharpsl_pm.c 2008-08-05 22:15:07.000000000 -0700
++++ linux-2.6.26/arch/arm/common/sharpsl_pm.c 2008-08-05 22:15:11.000000000 -0700
+@@ -458,6 +458,10 @@
+ {
+ int temp, i, buff[5];
+
++ /* Some devices don't support this */
++ if (!sharpsl_pm.machinfo->charge_acin_high)
++ return 0;
++
+ for (i=0; i<5; i++) {
+ buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_ACIN_VOLT);
+ mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN);
+@@ -598,6 +602,9 @@
+
+ dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n");
+
++ if (machine_is_poodle())
++ return 0;
++
+ /* Check AC-Adapter */
+ acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
+
+@@ -664,6 +671,7 @@
+ dev_dbg(sharpsl_pm.dev, "Offline Charger: Step 1\n");
+
+ /* AC Check */
++ if (!machine_is_poodle())
+ if ((sharpsl_ac_check() < 0) || (sharpsl_check_battery_temp() < 0))
+ return sharpsl_off_charge_error();
+
+@@ -686,6 +694,7 @@
+
+ dev_dbg(sharpsl_pm.dev, "Offline Charger: Step 2\n");
+
++ if (!machine_is_poodle())
+ if ((sharpsl_check_battery_temp() < 0) || (sharpsl_check_battery_voltage() < 0))
+ return sharpsl_off_charge_error();
+
+Index: linux-2.6.26/arch/arm/mach-pxa/Kconfig
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-pxa/Kconfig 2008-08-05 22:15:05.000000000 -0700
++++ linux-2.6.26/arch/arm/mach-pxa/Kconfig 2008-08-05 22:16:25.000000000 -0700
+@@ -210,6 +210,7 @@
+ bool "Enable Sharp SL-5600 (Poodle) Support"
+ depends on PXA_SHARPSL_25x
+ select SHARP_LOCOMO
++ select SHARPSL_PM
+ select PXA_SSP
+
+ config MACH_CORGI
+Index: linux-2.6.26/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-pxa/Makefile 2008-08-05 22:15:05.000000000 -0700
++++ linux-2.6.26/arch/arm/mach-pxa/Makefile 2008-08-05 22:16:25.000000000 -0700
+@@ -30,7 +30,7 @@
+ obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o
+ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o
+ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
+-obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
++obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o sharpsl_pm.o poodle_pm.o
+ obj-$(CONFIG_MACH_HX2750) += hx2750.o hx2750_test.o
+ obj-$(CONFIG_MACH_PCM027) += pcm027.o
+ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
+Index: linux-2.6.26/arch/arm/mach-pxa/poodle_pm.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.26/arch/arm/mach-pxa/poodle_pm.c 2008-08-05 22:21:31.000000000 -0700
+@@ -0,0 +1,356 @@
++/*
++ * Battery and Power Management code for the Sharp SL-5600
++ *
++ * Copyright (c) 2006 Richard Purdie
++ *
++ * 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/stat.h>
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/apm-emulation.h>
++#include <asm/irq.h>
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/hardware/scoop.h>
++#include <asm/hardware/locomo.h>
++
++#include <asm/arch/sharpsl.h>
++#include <asm/arch/poodle.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa2xx-gpio.h>
++#include "sharpsl.h"
++
++#if 0
++#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
++#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */
++#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */
++#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */
++#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */
++#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */
++#endif
++
++#define SHARPSL_CHARGE_ON_VOLT 1187 // 2.9V
++#define SHARPSL_CHARGE_ON_TEMP 2441
++#define SHARPSL_FATAL_NOACIN_VOLT 1454 // 3.55V
++#define SHARPSL_FATAL_ACIN_VOLT 1474 // 3.60V
++
++
++#if 0
++#define SHARPSL_POWER_MODE_CHECK 1475
++#define SHARPSL_POODLE_FATAL_VOLT 1433
++#define SHARPSL_POODLE_FATAL_NOACIN_FLON_VOLT 1454 // 3.55V
++#define SHARPSL_POODLE_FATAL_NOACIN_FLOFF_VOLT 1433 // 3.50V
++#define SHARPSL_POODLE_FATAL_ACIN_FLON_VOLT 1474 // 3.60V
++#define SHARPSL_POODLE_FATAL_ACIN_FLOFF_VOLT 1454 // 3.55V
++#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 5 // 50msec
++#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT 1 // 10msec
++#define SHARPSL_WAIT_DISCHARGE_ON 5 // 50msec
++#endif
++
++
++struct battery_thresh poodle_battery_levels_fl[] = {
++ {1582, 100},
++ {1527, 75},
++ {1482, 50},
++ {1458, 25},
++ {1404, 5},
++ { 0, 0},
++};
++
++struct battery_thresh poodle_battery_levels_nofl[] = {
++ {1589, 100},
++ {1536, 75},
++ {1490, 50},
++ {1466, 25},
++ {1413, 5},
++ { 0, 0},
++};
++
++struct battery_thresh poodle_battery_levels_acin_fl[] = {
++ {1601, 100},
++ {1536, 75},
++ {1503, 50},
++ {1482, 25},
++ { 0, 5},
++ { 0, 0},
++};
++
++struct battery_thresh poodle_battery_levels_acin_nofl[] = {
++ {1609, 100},
++ {1548, 75},
++ {1527, 50},
++ {1495, 25},
++ { 0, 5},
++ { 0, 0},
++};
++
++static void poodle_charger_init(void)
++{
++ pxa_gpio_mode(POODLE_GPIO_ADC_TEMP_ON | GPIO_OUT);
++ pxa_gpio_mode(POODLE_GPIO_CHRG_ON | GPIO_OUT);
++ pxa_gpio_mode(POODLE_GPIO_BYPASS_ON | GPIO_OUT);
++ pxa_gpio_mode(POODLE_GPIO_ON_KEY | GPIO_IN);
++ sharpsl_pm_pxa_init();
++}
++
++static void poodle_measure_temp(int on)
++{
++ if (on)
++ GPSR(POODLE_GPIO_ADC_TEMP_ON) = GPIO_bit(POODLE_GPIO_ADC_TEMP_ON);
++ else
++ GPCR(POODLE_GPIO_ADC_TEMP_ON) = GPIO_bit(POODLE_GPIO_ADC_TEMP_ON);
++}
++
++extern struct locomo_dev *frontlight_dev;
++
++static void poodle_charge(int on)
++{
++ if (on) {
++ GPSR(POODLE_GPIO_CHRG_ON) = GPIO_bit(POODLE_GPIO_CHRG_ON);
++ locomo_gpio_write(&poodle_locomo_device.dev, POODLE_LOCOMO_GPIO_JK_B, 1);
++ } else {
++ GPCR(POODLE_GPIO_CHRG_ON) = GPIO_bit(POODLE_GPIO_CHRG_ON);
++ locomo_gpio_write(&poodle_locomo_device.dev, POODLE_LOCOMO_GPIO_JK_B, 0);
++ }
++}
++
++static void poodle_discharge(int on)
++{
++ if (on)
++ GPSR(POODLE_GPIO_DISCHARGE_ON) = GPIO_bit(POODLE_GPIO_DISCHARGE_ON);
++ else
++ GPCR(POODLE_GPIO_DISCHARGE_ON) = GPIO_bit(POODLE_GPIO_DISCHARGE_ON);
++}
++
++static void poodle_presuspend(void)
++{
++ int i;
++ unsigned long wakeup_mask;
++
++ /* charging , so CHARGE_ON bit is HIGH during OFF. */
++ if (READ_GPIO_BIT(POODLE_GPIO_CHRG_ON))
++ PGSR1 |= GPIO_bit(POODLE_GPIO_CHRG_ON);
++ else
++ PGSR1 &= ~GPIO_bit(POODLE_GPIO_CHRG_ON);
++
++// if (READ_GPIO_BIT(CORGI_GPIO_CHRG_UKN))
++// PGSR1 |= GPIO_bit(CORGI_GPIO_CHRG_UKN);
++// else
++// PGSR1 &= ~GPIO_bit(CORGI_GPIO_CHRG_UKN);
++
++ /* Resume on keyboard power key */
++// PGSR2 = (PGSR2 & ~CORGI_GPIO_ALL_STROBE_BIT) | CORGI_GPIO_STROBE_BIT(0);
++
++ wakeup_mask = GPIO_bit(POODLE_GPIO_ON_KEY) | GPIO_bit(POODLE_GPIO_WAKEUP);
++ wakeup_mask |= GPIO_bit(POODLE_GPIO_AC_IN) | GPIO_bit(POODLE_GPIO_CHRG_FULL);
++ wakeup_mask |= GPIO_bit(POODLE_GPIO_MAIN_BAT_LOW) | GPIO_bit(POODLE_GPIO_CF_CD);
++ wakeup_mask |= GPIO_bit(POODLE_GPIO_HP_IN) | GPIO_bit(POODLE_GPIO_GA_INT) | GPIO_bit(POODLE_GPIO_nSD_INT);
++
++
++// if (!machine_is_corgi())
++// GPDR0 &= ~(GPIO_bit(15) | GPIO_bit(8)); /* Float n_CS1 */
++
++ PWER = wakeup_mask | PWER_RTC;
++ PRER = wakeup_mask;
++ PFER = wakeup_mask;
++
++ for (i = 0; i <=15; i++) {
++ if (PRER & PFER & GPIO_bit(i)) {
++ if (GPLR0 & GPIO_bit(i) )
++ PRER &= ~GPIO_bit(i);
++ else
++ PFER &= ~GPIO_bit(i);
++ }
++ }
++}
++
++static void poodle_postsuspend(void)
++{
++// if (!machine_is_corgi())
++// GPDR0 |= GPIO_bit(15) | GPIO_bit(8); /* Un-Float n_CS1 */
++}
++
++/*
++ * Check what brought us out of the suspend.
++ * Return: 0 to sleep, otherwise wake
++ */
++static int poodle_should_wakeup(unsigned int resume_on_alarm)
++{
++ int is_resume = 0;
++
++ dev_dbg(sharpsl_pm.dev, "GPLR0 = %x,%x\n", GPLR0, PEDR);
++
++ if ((PEDR & GPIO_bit(POODLE_GPIO_AC_IN))) {
++ if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) {
++ /* charge on */
++ dev_dbg(sharpsl_pm.dev, "ac insert\n");
++ sharpsl_pm.flags |= SHARPSL_DO_OFFLINE_CHRG;
++ } else {
++ /* charge off */
++ dev_dbg(sharpsl_pm.dev, "ac remove\n");
++ sharpsl_pm_led(SHARPSL_LED_OFF);
++ sharpsl_pm.machinfo->charge(0);
++ sharpsl_pm.charge_mode = CHRG_OFF;
++ }
++ }
++
++ if ((PEDR & GPIO_bit(POODLE_GPIO_CHRG_FULL)))
++ dev_dbg(sharpsl_pm.dev, "Charge full interrupt\n");
++
++ if (PEDR & GPIO_bit(POODLE_GPIO_ON_KEY))
++ is_resume |= GPIO_bit(POODLE_GPIO_ON_KEY);
++
++ if (PEDR & GPIO_bit(POODLE_GPIO_WAKEUP))
++ is_resume |= GPIO_bit(POODLE_GPIO_WAKEUP);
++
++// if ( (apm_wakeup_factor & GPIO_bit(GPIO_GA_INT)) && (LCM_KIC & 1) ) {
++// LCM_KIC &= ~0x100;
++// LCM_ICR &= ~0x100;
++// is_resume |= GPIO_bit(GPIO_GA_INT);
++// }
++
++ if (PEDR & GPIO_bit(POODLE_GPIO_CF_STSCHG))
++ is_resume |= GPIO_bit(POODLE_GPIO_CF_STSCHG);
++
++ if (PEDR & GPIO_bit(POODLE_GPIO_nSD_INT))
++ is_resume |= GPIO_bit(POODLE_GPIO_nSD_INT);
++
++ if (PEDR & GPIO_bit(POODLE_GPIO_HP_IN))
++ is_resume |= GPIO_bit(POODLE_GPIO_HP_IN);
++
++ if (resume_on_alarm && (PEDR & PWER_RTC))
++ is_resume |= PWER_RTC;
++
++ dev_dbg(sharpsl_pm.dev, "is_resume: %x\n",is_resume);
++ return is_resume;
++}
++
++static unsigned long poodle_charger_wakeup(void)
++{
++ return ~GPLR0 & ( GPIO_bit(POODLE_GPIO_AC_IN) | GPIO_bit(POODLE_GPIO_ON_KEY) | GPIO_bit(POODLE_GPIO_WAKEUP) );
++}
++
++#define MUX_CHL 6u
++#define BATT_CHL 2u
++
++/* ADS7846 Touch Screen Controller bit definitions */
++#define ADSCTRL_PD0 (1u << 0) /* PD0 */
++#define ADSCTRL_PD1 (1u << 1) /* PD1 */
++#define ADSCTRL_DFR (1u << 2) /* SER/DFR */
++#define ADSCTRL_MOD (1u << 3) /* Mode */
++#define ADSCTRL_ADR_SH 4 /* Address setting */
++#define ADSCTRL_STS (1u << 7) /* Start Bit */
++
++int poodle_pm_read_ads7846(int channel)
++{
++ int voltage;
++ int cmd = ADSCTRL_PD0 | ADSCTRL_PD1 | ADSCTRL_DFR |
++ (channel << ADSCTRL_ADR_SH) | ADSCTRL_STS;
++
++ corgi_ssp_ads7846_lock();
++
++ corgi_ssp_ads7846_put(cmd);
++ corgi_ssp_ads7846_get();
++
++ corgi_ssp_ads7846_put(cmd);
++ voltage = corgi_ssp_ads7846_get();
++
++ /* Power-Down Enable */
++ corgi_ssp_ads7846_put((1u << ADSCTRL_ADR_SH) | ADSCTRL_STS);
++ corgi_ssp_ads7846_get();
++
++ corgi_ssp_ads7846_unlock();
++
++ return voltage;
++}
++
++unsigned long poodlepm_read_devdata(int type)
++{
++ switch(type) {
++ case SHARPSL_STATUS_ACIN:
++ return ((GPLR(POODLE_GPIO_AC_IN) & GPIO_bit(POODLE_GPIO_AC_IN)) != 0);
++ case SHARPSL_STATUS_LOCK:
++ return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock);
++ case SHARPSL_STATUS_CHRGFULL:
++ return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull);
++ case SHARPSL_STATUS_FATAL:
++ return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal);
++// case SHARPSL_ACIN_VOLT:
++// return poodle_pm_read_ads7846(MAX1111_ACIN_VOLT);
++// FIXME
++ case SHARPSL_BATT_TEMP:
++ return poodle_pm_read_ads7846(MUX_CHL);
++ case SHARPSL_BATT_VOLT:
++ default:
++ return poodle_pm_read_ads7846(BATT_CHL);
++ }
++}
++
++static void poodle_limit_intensity(int limit)
++{
++}
++
++static struct sharpsl_charger_machinfo poodle_pm_machinfo = {
++ .init = poodle_charger_init,
++ .exit = sharpsl_pm_pxa_remove,
++ .gpio_batlock = POODLE_GPIO_BAT_COVER,
++ .gpio_acin = POODLE_GPIO_AC_IN,
++ .gpio_batfull = POODLE_GPIO_CHRG_FULL,
++ .batfull_irq = 1,
++ .discharge = poodle_discharge,
++ .charge = poodle_charge,
++ .measure_temp = poodle_measure_temp,
++ .presuspend = poodle_presuspend,
++ .postsuspend = poodle_postsuspend,
++ .read_devdata = poodlepm_read_devdata,
++ .charger_wakeup = poodle_charger_wakeup,
++ .should_wakeup = poodle_should_wakeup,
++ .backlight_limit = poodle_limit_intensity,
++ .charge_on_volt = SHARPSL_CHARGE_ON_VOLT,
++ .charge_on_temp = SHARPSL_CHARGE_ON_TEMP,
++ .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT,
++ .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,
++ .bat_levels = 6,
++ .bat_levels_noac = poodle_battery_levels_fl,
++ .bat_levels_acin = poodle_battery_levels_nofl,
++ .status_high_acin = 1490,
++ .status_low_acin = 1466,
++ .status_high_noac = 1482,
++ .status_low_noac = 1458,
++};
++
++static struct platform_device *poodlepm_device;
++
++static int __devinit poodlepm_init(void)
++{
++ int ret;
++
++ poodlepm_device = platform_device_alloc("sharpsl-pm", -1);
++ if (!poodlepm_device)
++ return -ENOMEM;
++
++ poodlepm_device->dev.platform_data = &poodle_pm_machinfo;
++ ret = platform_device_add(poodlepm_device);
++
++ if (ret)
++ platform_device_put(poodlepm_device);
++
++ return ret;
++}
++
++static void poodlepm_exit(void)
++{
++ platform_device_unregister(poodlepm_device);
++}
++
++module_init(poodlepm_init);
++module_exit(poodlepm_exit);
+Index: linux-2.6.26/arch/arm/common/locomo.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/common/locomo.c 2008-07-13 14:51:29.000000000 -0700
++++ linux-2.6.26/arch/arm/common/locomo.c 2008-08-05 22:16:20.000000000 -0700
+@@ -600,6 +600,7 @@
+ spin_lock_irqsave(&lchip->lock, flags);
+
+ save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */
++ // FIXME - should save JK_B
+ locomo_writel(0x00, lchip->base + LOCOMO_GPO);
+ save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */
+ locomo_writel(0x40, lchip->base + LOCOMO_SPICT);
+@@ -1101,11 +1102,16 @@
+
+ static struct locomo *locomo_chip_driver(struct locomo_dev *ldev);
+
++struct locomo_dev *frontlight_dev;
++EXPORT_SYMBOL(frontlight_dev);
++
+ void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
+ {
+ unsigned long flags;
+ struct locomo *lchip = locomo_chip_driver(dev);
+
++ frontlight_dev = dev;
++
+ if (vr)
+ locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 1);
+ else
+Index: linux-2.6.26/include/asm-arm/hardware/locomo.h
+===================================================================
+--- linux-2.6.26.orig/include/asm-arm/hardware/locomo.h 2008-07-13 14:51:29.000000000 -0700
++++ linux-2.6.26/include/asm-arm/hardware/locomo.h 2008-08-05 22:15:11.000000000 -0700
+@@ -100,6 +100,12 @@
+ #define LOCOMO_GPIO_CARD_DETECT LOCOMO_GPIO(13)
+ #define LOCOMO_GPIO_WRITE_PROT LOCOMO_GPIO(14)
+ #define LOCOMO_GPIO_CARD_POWER LOCOMO_GPIO(15)
++#define POODLE_LOCOMO_GPIO_AMP_ON LOCOMO_GPIO(8)
++#define POODLE_LOCOMO_GPIO_MUTE_L LOCOMO_GPIO(10)
++#define POODLE_LOCOMO_GPIO_MUTE_R LOCOMO_GPIO(11)
++#define POODLE_LOCOMO_GPIO_232VCC_ON LOCOMO_GPIO(12)
++#define POODLE_LOCOMO_GPIO_JK_B LOCOMO_GPIO(13)
++
+
+ /* Start the definitions of the devices. Each device has an initial
+ * base address and a series of offsets from that base address. */
diff --git a/recipes/linux/linux-kexecboot-2.6.26/poodle_serial_vcc-r1.patch b/recipes/linux/linux-kexecboot-2.6.26/poodle_serial_vcc-r1.patch
new file mode 100644
index 0000000000..853dce8ac2
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/poodle_serial_vcc-r1.patch
@@ -0,0 +1,30 @@
+
+Index: linux-2.6.26/arch/arm/common/locomo.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/common/locomo.c 2008-08-02 20:53:56.000000000 -0700
++++ linux-2.6.26/arch/arm/common/locomo.c 2008-08-04 16:50:29.000000000 -0700
+@@ -715,7 +715,7 @@
+ locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC);
+
+ /* GPIO */
+- locomo_writel(0, lchip->base + LOCOMO_GPO);
++ locomo_writel(POODLE_LOCOMO_GPIO_232VCC_ON, lchip->base + LOCOMO_GPO);
+ locomo_writel((LOCOMO_GPIO(1) | LOCOMO_GPIO(2) | LOCOMO_GPIO(13) | LOCOMO_GPIO(14))
+ , lchip->base + LOCOMO_GPE);
+ locomo_writel((LOCOMO_GPIO(1) | LOCOMO_GPIO(2) | LOCOMO_GPIO(13) | LOCOMO_GPIO(14))
+Index: linux-2.6.26/drivers/serial/pxa.c
+===================================================================
+--- linux-2.6.26.orig/drivers/serial/pxa.c 2008-08-04 16:46:37.000000000 -0700
++++ linux-2.6.26/drivers/serial/pxa.c 2008-08-04 16:48:18.000000000 -0700
+@@ -296,9 +296,9 @@
+ unsigned char mcr = 0;
+
+ if (mctrl & TIOCM_RTS)
+- mcr |= UART_MCR_RTS;
++ mcr &= ~UART_MCR_RTS;
+ if (mctrl & TIOCM_DTR)
+- mcr |= UART_MCR_DTR;
++ mcr &= ~UART_MCR_DTR;
+ if (mctrl & TIOCM_OUT1)
+ mcr |= UART_MCR_OUT1;
+ if (mctrl & TIOCM_OUT2)
diff --git a/recipes/linux/linux-kexecboot-2.6.26/poodle_ts.patch b/recipes/linux/linux-kexecboot-2.6.26/poodle_ts.patch
new file mode 100644
index 0000000000..97c0a66400
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/poodle_ts.patch
@@ -0,0 +1,22 @@
+Index: linux-2.6.23/arch/arm/mach-pxa/poodle.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/poodle.c 2008-01-25 12:10:10.000000000 -0800
++++ linux-2.6.23/arch/arm/mach-pxa/poodle.c 2008-01-25 12:11:58.000000000 -0800
+@@ -166,7 +166,7 @@
+ },
+ };
+
+-static unsigned long poodle_get_hsync_len(void)
++static unsigned long poodle_get_hsync_invperiod(void)
+ {
+ return 0;
+ }
+@@ -176,7 +176,7 @@
+ }
+
+ static struct corgits_machinfo poodle_ts_machinfo = {
+- .get_hsync_len = poodle_get_hsync_len,
++ .get_hsync_invperiod = poodle_get_hsync_invperiod,
+ .put_hsync = poodle_null_hsync,
+ .wait_hsync = poodle_null_hsync,
+ };
diff --git a/recipes/linux/linux-kexecboot-2.6.26/pxa-serial-hack.patch b/recipes/linux/linux-kexecboot-2.6.26/pxa-serial-hack.patch
new file mode 100644
index 0000000000..bf20f46a05
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/pxa-serial-hack.patch
@@ -0,0 +1,90 @@
+---
+ drivers/serial/8250.c | 5 +++++
+ drivers/serial/serial_core.c | 1 +
+ drivers/serial/serial_cs.c | 12 +++++++++---
+ include/linux/serial_core.h | 1 +
+ 4 files changed, 16 insertions(+), 3 deletions(-)
+
+Index: linux-2.6.20/drivers/serial/8250.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/8250.c 2007-04-27 13:37:26.000000000 +0100
++++ linux-2.6.20/drivers/serial/8250.c 2007-04-27 13:38:16.000000000 +0100
+@@ -2429,7 +2429,12 @@
+ .driver_name = "serial",
+ .dev_name = "ttyS",
+ .major = TTY_MAJOR,
++#ifdef CONFIG_SERIAL_PXA
++ .minor = 64 + 4,
++ .name_base = 4,
++#else
+ .minor = 64,
++#endif
+ .nr = UART_NR,
+ .cons = SERIAL8250_CONSOLE,
+ };
+Index: linux-2.6.20/drivers/serial/serial_core.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/serial_core.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_core.c 2007-04-27 13:39:39.000000000 +0100
+@@ -2068,7 +2068,8 @@
+ printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
+ port->dev ? port->dev->bus_id : "",
+ port->dev ? ": " : "",
+- drv->dev_name, port->line, address, port->irq, uart_type(port));
++ drv->dev_name, port->line + drv->name_base, address, port->irq,
++ uart_type(port));
+ }
+
+ static void
+@@ -2183,6 +2184,7 @@
+ normal->owner = drv->owner;
+ normal->driver_name = drv->driver_name;
+ normal->name = drv->dev_name;
++ normal->name_base = drv->name_base;
+ normal->major = drv->major;
+ normal->minor_start = drv->minor;
+ normal->type = TTY_DRIVER_TYPE_SERIAL;
+Index: linux-2.6.20/include/linux/serial_core.h
+===================================================================
+--- linux-2.6.20.orig/include/linux/serial_core.h 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/include/linux/serial_core.h 2007-04-27 13:37:27.000000000 +0100
+@@ -341,6 +341,7 @@
+ struct module *owner;
+ const char *driver_name;
+ const char *dev_name;
++ int name_base;
+ int major;
+ int minor;
+ int nr;
+Index: linux-2.6.20/drivers/serial/serial_cs.c
+===================================================================
+--- linux-2.6.20.orig/drivers/serial/serial_cs.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_cs.c 2007-04-27 13:40:34.000000000 +0100
+@@ -390,7 +390,7 @@
+ kio_addr_t iobase, int irq)
+ {
+ struct uart_port port;
+- int line;
++ int line, linestart;
+
+ memset(&port, 0, sizeof (struct uart_port));
+ port.iobase = iobase;
+@@ -411,10 +411,16 @@
+ return -EINVAL;
+ }
+
++#if CONFIG_SERIAL_PXA
++ linestart = 4;
++#else
++ linestart = 0;
++#endif
++
+ info->line[info->ndev] = line;
+- sprintf(info->node[info->ndev].dev_name, "ttyS%d", line);
++ sprintf(info->node[info->ndev].dev_name, "ttyS%d", line+linestart);
+ info->node[info->ndev].major = TTY_MAJOR;
+- info->node[info->ndev].minor = 0x40 + line;
++ info->node[info->ndev].minor = 0x40 + line + linestart;
+ if (info->ndev > 0)
+ info->node[info->ndev - 1].next = &info->node[info->ndev];
+ info->ndev++;
diff --git a/recipes/linux/linux-kexecboot-2.6.26/pxa_fb_overlay.patch b/recipes/linux/linux-kexecboot-2.6.26/pxa_fb_overlay.patch
new file mode 100644
index 0000000000..49c59b3275
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/pxa_fb_overlay.patch
@@ -0,0 +1,26 @@
+---
+ drivers/video/pxafb.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: linux-2.6.22/drivers/video/pxafb.h
+===================================================================
+--- linux-2.6.22.orig/drivers/video/pxafb.h 2007-09-25 15:44:42.000000000 +0200
++++ linux-2.6.22/drivers/video/pxafb.h 2007-09-25 15:45:07.000000000 +0200
+@@ -36,7 +36,7 @@
+ struct fb_bitfield transp;
+ };
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ /* PXA Overlay Framebuffer Support */
+ struct overlayfb_info
+ {
+@@ -142,7 +142,7 @@
+ wait_queue_head_t ctrlr_wait;
+ struct work_struct task;
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ /* PXA Overlay Framebuffer Support */
+ struct overlayfb_info *overlay1fb;
+ struct overlayfb_info *overlay2fb;
diff --git a/recipes/linux/linux-kexecboot-2.6.26/pxafb.patch b/recipes/linux/linux-kexecboot-2.6.26/pxafb.patch
new file mode 100644
index 0000000000..e98543b2e4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/pxafb.patch
@@ -0,0 +1,13 @@
+Index: linux-2.6.23/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.23.orig/drivers/video/pxafb.c 2008-01-25 16:25:21.000000000 -0800
++++ linux-2.6.23/drivers/video/pxafb.c 2008-01-25 16:32:14.000000000 -0800
+@@ -1194,7 +1194,7 @@
+ if ((clkinfo->old == 13000))
+ break;
+
+- pcd = get_pcd(fbi->fb.var.pixclock);
++ pcd = get_pcd(fbi,fbi->fb.var.pixclock);
+ lccr3 = fbi->reg_lccr3;
+ set_hsync_time(fbi, pcd);
+ fbi->reg_lccr3 = (fbi->reg_lccr3 & ~0xff) | LCCR3_PixClkDiv(pcd);
diff --git a/recipes/linux/linux-kexecboot-2.6.26/qemuarm/defconfig b/recipes/linux/linux-kexecboot-2.6.26/qemuarm/defconfig
new file mode 100644
index 0000000000..6a4502f95b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/qemuarm/defconfig
@@ -0,0 +1,1582 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 22:28:17 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_GENERIC_GPIO is not set
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+CONFIG_ARCH_VERSATILE=y
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Versatile platform type
+#
+CONFIG_ARCH_VERSATILE_PB=y
+# CONFIG_MACH_VERSATILE_AB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_ARM_VIC=y
+CONFIG_ICST307=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyAMA0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_VFP=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+# CONFIG_APM_EMULATION is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_AFS_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=m
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=51200
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
+CONFIG_SCSI_SYM53C8XX_2=y
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX is not set
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_AMBAKMI=y
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_PL031 is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/qemumips/defconfig b/recipes/linux/linux-kexecboot-2.6.26/qemumips/defconfig
new file mode 100644
index 0000000000..6a4502f95b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/qemumips/defconfig
@@ -0,0 +1,1582 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 22:28:17 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_GENERIC_GPIO is not set
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+CONFIG_ARCH_VERSATILE=y
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Versatile platform type
+#
+CONFIG_ARCH_VERSATILE_PB=y
+# CONFIG_MACH_VERSATILE_AB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_V6 is not set
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_ARM_VIC=y
+CONFIG_ICST307=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyAMA0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_VFP=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+# CONFIG_APM_EMULATION is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_AFS_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=m
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=m
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=51200
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
+CONFIG_SCSI_SYM53C8XX_2=y
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX is not set
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_AMBAKMI=y
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_ARMCLCD=y
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_PL031 is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/qemux86/defconfig b/recipes/linux/linux-kexecboot-2.6.26/qemux86/defconfig
new file mode 100644
index 0000000000..3724f1602b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/qemux86/defconfig
@@ -0,0 +1,1993 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:20:37 2008
+#
+# CONFIG_64BIT is not set
+CONFIG_X86_32=y
+# CONFIG_X86_64 is not set
+CONFIG_X86=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+# CONFIG_GENERIC_TIME_VSYSCALL is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+# CONFIG_ZONE_DMA32 is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_AUDIT_ARCH is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_TREE=y
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=15
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SMP=y
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_X86_VSMP is not set
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+# CONFIG_PARAVIRT_GUEST is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_GENERIC_CPU is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_TSC=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=4
+# CONFIG_HPET_TIMER is not set
+CONFIG_NR_CPUS=8
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_VM86=y
+# CONFIG_TOSHIBA is not set
+# CONFIG_I8K is not set
+# CONFIG_X86_REBOOTFIXUPS is not set
+# CONFIG_MICROCODE is not set
+# CONFIG_X86_MSR is not set
+# CONFIG_X86_CPUID is not set
+CONFIG_NOHIGHMEM=y
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HIGHMEM64G is not set
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_3G_OPT is not set
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_2G_OPT is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_X86_PAE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_NR_QUICK=1
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+# CONFIG_EFI is not set
+CONFIG_IRQBALANCE=y
+CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_KEXEC=y
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_RELOCATABLE is not set
+CONFIG_PHYSICAL_ALIGN=0x100000
+CONFIG_HOTPLUG_CPU=y
+CONFIG_COMPAT_VDSO=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_SMP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION_SMP_POSSIBLE=y
+# CONFIG_HIBERNATION is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_PROCFS is not set
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_PROC_EVENT=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_VIDEO is not set
+CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_ASUS is not set
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_BLACKLIST_YEAR=0
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+# CONFIG_ACPI_SBS is not set
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
+CONFIG_HT_IRQ=y
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_K8_NB=y
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_NSC_FIR is not set
+# CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_SMC_IRCC_FIR is not set
+# CONFIG_ALI_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_FIR is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+# CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
+# CONFIG_PARPORT_1284 is not set
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+# CONFIG_ISAPNP is not set
+# CONFIG_PNPBIOS is not set
+CONFIG_PNPACPI=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_FD=y
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ASUS_LAPTOP is not set
+# CONFIG_FUJITSU_LAPTOP is not set
+# CONFIG_MSI_LAPTOP is not set
+# CONFIG_SONY_LAPTOP is not set
+# CONFIG_THINKPAD_ACPI is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_BLK_DEV_IDEACPI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+CONFIG_BLK_DEV_CMD640=y
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_IDEPNP is not set
+
+#
+# PCI IDE chipsets support
+#
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_IDEPCI_PCIBUS_ORDER=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_RZ1000=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_ATIIXP is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5535 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+CONFIG_BLK_DEV_PIIX=y
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
+# CONFIG_IDE_ARM is not set
+
+#
+# Other IDE chipsets support
+#
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+# CONFIG_BLK_DEV_4DRIVES is not set
+# CONFIG_BLK_DEV_ALI14XX is not set
+# CONFIG_BLK_DEV_DTC2278 is not set
+# CONFIG_BLK_DEV_HT6560B is not set
+# CONFIG_BLK_DEV_QD65XX is not set
+# CONFIG_BLK_DEV_UMC8672 is not set
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+CONFIG_SCSI_DPT_I2O=m
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_NET_SB1000 is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+CONFIG_LANCE=m
+CONFIG_NET_VENDOR_SMC=y
+CONFIG_WD80x3=m
+CONFIG_ULTRA=m
+CONFIG_SMC9194=m
+# CONFIG_NET_VENDOR_RACAL is not set
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=m
+CONFIG_TULIP_MWI=y
+CONFIG_TULIP_MMIO=y
+CONFIG_TULIP_NAPI=y
+CONFIG_TULIP_NAPI_HW_MITIGATION=y
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_AT1700=m
+CONFIG_DEPCA=m
+CONFIG_HP100=m
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+# CONFIG_EWRK3 is not set
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=y
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+CONFIG_AC3200=m
+CONFIG_APRICOT=m
+CONFIG_B44=m
+CONFIG_B44_PCI_AUTOSELECT=y
+CONFIG_B44_PCICORE_AUTOSELECT=y
+CONFIG_B44_PCI=y
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+CONFIG_CS89x0=m
+CONFIG_EEPRO100=m
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=y
+# CONFIG_8139CP is not set
+CONFIG_8139TOO=y
+CONFIG_8139TOO_PIO=y
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+CONFIG_SUNDANCE_MMIO=y
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+# CONFIG_NET_POCKET is not set
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+CONFIG_ACENIC_OMIT_TIGON_I=y
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+CONFIG_SK98LIN=m
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+# CONFIG_LIBERTAS is not set
+# CONFIG_AIRO is not set
+CONFIG_HERMES=m
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_NORTEL_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+# CONFIG_HOSTAP_PLX is not set
+# CONFIG_HOSTAP_PCI is not set
+# CONFIG_BCM43XX is not set
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=m
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TABLET=y
+# CONFIG_TABLET_USB_ACECAD is not set
+# CONFIG_TABLET_USB_AIPTEK is not set
+# CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_KBTAB is not set
+CONFIG_TABLET_USB_WACOM=y
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_WISTRON_BTNS is not set
+# CONFIG_INPUT_ATLAS_BTNS is not set
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_CONSOLE is not set
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+# CONFIG_MWAVE is not set
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_NSC_GPIO is not set
+# CONFIG_CS5535_GPIO is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+# CONFIG_HANGCHECK_TIMER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+CONFIG_SSB=m
+CONFIG_SSB_PCIHOST_POSSIBLE=y
+CONFIG_SSB_PCIHOST=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
+CONFIG_SSB_DRIVER_PCICORE=y
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_BWQCAM is not set
+# CONFIG_VIDEO_CQCAM is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_STRADIS is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_AGP=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_AMD64=m
+CONFIG_AGP_INTEL=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM=m
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_I810 is not set
+# CONFIG_DRM_I830 is not set
+# CONFIG_DRM_I915 is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ARC is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+CONFIG_FB_UVESA=m
+# CONFIG_FB_VESA is not set
+# CONFIG_FB_EFI is not set
+# CONFIG_FB_HECUBA is not set
+# CONFIG_FB_HGA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_I810 is not set
+# CONFIG_FB_LE80578 is not set
+# CONFIG_FB_INTEL is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_CYBLA is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_GEODE is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+# CONFIG_BACKLIGHT_PROGEAR is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_VIDEO_SELECT=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_MTS64 is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_PORTMAN2X4 is not set
+
+#
+# ISA devices
+#
+# CONFIG_SND_ADLIB is not set
+# CONFIG_SND_AD1816A is not set
+# CONFIG_SND_AD1848 is not set
+# CONFIG_SND_ALS100 is not set
+# CONFIG_SND_AZT2320 is not set
+# CONFIG_SND_CMI8330 is not set
+# CONFIG_SND_CS4231 is not set
+# CONFIG_SND_CS4232 is not set
+# CONFIG_SND_CS4236 is not set
+# CONFIG_SND_DT019X is not set
+# CONFIG_SND_ES968 is not set
+# CONFIG_SND_ES1688 is not set
+# CONFIG_SND_ES18XX is not set
+# CONFIG_SND_SC6000 is not set
+# CONFIG_SND_GUSCLASSIC is not set
+# CONFIG_SND_GUSEXTREME is not set
+# CONFIG_SND_GUSMAX is not set
+# CONFIG_SND_INTERWAVE is not set
+# CONFIG_SND_INTERWAVE_STB is not set
+# CONFIG_SND_OPL3SA2 is not set
+# CONFIG_SND_OPTI92X_AD1848 is not set
+# CONFIG_SND_OPTI92X_CS4231 is not set
+# CONFIG_SND_OPTI93X is not set
+# CONFIG_SND_MIRO is not set
+# CONFIG_SND_SB8 is not set
+# CONFIG_SND_SB16 is not set
+# CONFIG_SND_SBAWE is not set
+# CONFIG_SND_SGALAXY is not set
+# CONFIG_SND_SSCAPE is not set
+# CONFIG_SND_WAVEFRONT is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_AD1889 is not set
+# CONFIG_SND_ALS300 is not set
+# CONFIG_SND_ALS4000 is not set
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_ATIIXP is not set
+# CONFIG_SND_ATIIXP_MODEM is not set
+# CONFIG_SND_AU8810 is not set
+# CONFIG_SND_AU8820 is not set
+# CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_BT87X is not set
+# CONFIG_SND_CA0106 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_CS5530 is not set
+# CONFIG_SND_CS5535AUDIO is not set
+# CONFIG_SND_DARLA20 is not set
+# CONFIG_SND_GINA20 is not set
+# CONFIG_SND_LAYLA20 is not set
+# CONFIG_SND_DARLA24 is not set
+# CONFIG_SND_GINA24 is not set
+# CONFIG_SND_LAYLA24 is not set
+# CONFIG_SND_MONA is not set
+# CONFIG_SND_MIA is not set
+# CONFIG_SND_ECHO3G is not set
+# CONFIG_SND_INDIGO is not set
+# CONFIG_SND_INDIGOIO is not set
+# CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_EMU10K1X is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_HDA_INTEL is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_HDSPM is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+CONFIG_SND_INTEL8X0=y
+# CONFIG_SND_INTEL8X0M is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_MIXART is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_PCXHR is not set
+# CONFIG_SND_RIPTIDE is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VX222 is not set
+# CONFIG_SND_YMFPCI is not set
+# CONFIG_SND_AC97_POWER_SAVE is not set
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
+# CONFIG_LGUEST is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# Firmware Drivers
+#
+# CONFIG_EDD is not set
+# CONFIG_DELL_RBU is not set
+# CONFIG_DCDBAS is not set
+CONFIG_DMIID=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=y
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_KPROBES is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+# CONFIG_CRYPTO_TWOFISH_586 is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_AES_586 is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_AUDIT_GENERIC=y
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch b/recipes/linux/linux-kexecboot-2.6.26/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
new file mode 100644
index 0000000000..b513ba1466
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
@@ -0,0 +1,155 @@
+
+From: Petr Vandrovec <vandrove@vc.cvut.cz>
+
+Patch below adds support for using different prescaler than 16 for 16c950
+chips. This is needed for using Fujitsu-Siemens Connect2Air compact-flash
+card, which comes (apparently) with 806kHz clocks, and so you have to
+program prescaler for division by 7, and DLAB to 1, to get 115200Bd.
+
+To get card properly running you also have to add lines below to
+/etc/pcmcia/serial.opts so kernel knows that base speed is not 115200 but
+50400 (50400 * 16 = 806400; 806400 / 7 = 115200). As I've found no code
+specifying baud_rate in serial_cs, I assume that specifying it in
+serial.opts is right way to do this type of things.
+
+Patch also fixes problem that for UPF_MAGIC_MULTIPLIER maximum possible
+baud rate passed to uart code was uartclk / 16 while correct value for
+these devices (and for 16c950) is uartclk / 4.
+
+Patch also fixes problem that for UPF_MAGIC_MULTIPLIER devices with
+baud_rate 19200 or 9600 spd_cust did not work correctly. Not that such
+devices exist, but we should not ignore spd_cust, user probably knows why
+he asked for spd_cust.
+
+serial.opts:
+
+case "$MANFID-$FUNCID-$PRODID_1-$PRODID_2-$PRODID_3-$PRODID_4" in
+'0279,950b-2-GPRS Modem---')
+ SERIAL_OPTS="baud_base 50400"
+ ;;
+esac
+
+Cc: David Woodhouse <dwmw2@infradead.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+---
+
+ drivers/serial/8250.c | 82 +++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 64 insertions(+), 18 deletions(-)
+
+Index: linux-2.6.21/drivers/serial/8250.c
+===================================================================
+--- linux-2.6.21.orig/drivers/serial/8250.c 2007-07-01 16:59:52.000000000 +0100
++++ linux-2.6.21/drivers/serial/8250.c 2007-07-01 17:01:21.000000000 +0100
+@@ -1964,24 +1964,58 @@ static void serial8250_shutdown(struct u
+ serial_unlink_irq_chain(up);
+ }
+
+-static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud)
++static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud,
++ unsigned int *prescaler)
+ {
+- unsigned int quot;
+-
+- /*
+- * Handle magic divisors for baud rates above baud_base on
+- * SMSC SuperIO chips.
++ /*
++ * Use special handling only if user did not supply its own divider.
++ * spd_cust is defined in terms of baud_base, so always use default
++ * prescaler when spd_cust is requested.
+ */
+- if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
+- baud == (port->uartclk/4))
+- quot = 0x8001;
+- else if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
+- baud == (port->uartclk/8))
+- quot = 0x8002;
+- else
+- quot = uart_get_divisor(port, baud);
+
+- return quot;
++ *prescaler = 16;
++ if (baud != 38400 || (port->flags & UPF_SPD_MASK) != UPF_SPD_CUST) {
++ unsigned int quot = port->uartclk / baud;
++
++ /*
++ * Handle magic divisors for baud rates above baud_base on
++ * SMSC SuperIO chips.
++ */
++ if (port->flags & UPF_MAGIC_MULTIPLIER) {
++ if (quot == 4) {
++ return 0x8001;
++ } else if (quot == 8) {
++ return 0x8002;
++ }
++ }
++ if (port->type == PORT_16C950) {
++ /*
++ * This computes TCR value (4 to 16), not CPR value (which can
++ * be between 1.000 and 31.875) - chip I have uses XTAL of
++ * 806400Hz, and so a division by 7 is required to get 115200Bd.
++ * I'm leaving CPR disabled for now, until someone will
++ * hit even more exotic XTAL (it is needed to get 500kbps
++ * or 1000kbps from 18.432MHz XTAL, but I have no device
++ * which would benefit from doing that).
++ *
++ * If we can use divide by 16, use it. Otherwise look for
++ * better prescaler, from 15 to 4. If quotient cannot
++ * be divided by any integer value between 4 and 15, use 4.
++ */
++ if (quot & 0x0F) {
++ unsigned int div;
++
++ for (div = 15; div > 4; div--) {
++ if (quot % div == 0) {
++ break;
++ }
++ }
++ *prescaler = div;
++ return quot / div;
++ }
++ }
++ }
++ return uart_get_divisor(port, baud);
+ }
+
+ static void
+@@ -1991,7 +2025,7 @@ serial8250_set_termios(struct uart_port
+ struct uart_8250_port *up = (struct uart_8250_port *)port;
+ unsigned char cval, fcr = 0;
+ unsigned long flags;
+- unsigned int baud, quot;
++ unsigned int baud, quot, prescaler;
+
+ switch (termios->c_cflag & CSIZE) {
+ case CS5:
+@@ -2023,8 +2057,13 @@ serial8250_set_termios(struct uart_port
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+- baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
+- quot = serial8250_get_divisor(port, baud);
++ if (port->type == PORT_16C950 || (port->flags & UPF_MAGIC_MULTIPLIER)) {
++ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/4);
++ } else {
++ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
++ }
++ quot = serial8250_get_divisor(port, baud, &prescaler);
++
+
+ /*
+ * Oxford Semi 952 rev B workaround
+@@ -2139,6 +2178,13 @@ serial8250_set_termios(struct uart_port
+ serial_dl_write(up, quot);
+
+ /*
++ * Program prescaler for 16C950 chips.
++ */
++ if (up->port.type == PORT_16C950) {
++ serial_icr_write(up, UART_TCR, prescaler == 16 ? 0 : prescaler);
++ }
++
++ /*
+ * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR
+ * is written without DLAB set, this mode will be disabled.
+ */
diff --git a/recipes/linux/linux-kexecboot-2.6.26/sharpsl-rc-r1.patch b/recipes/linux/linux-kexecboot-2.6.26/sharpsl-rc-r1.patch
new file mode 100644
index 0000000000..58ac0eeb06
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/sharpsl-rc-r1.patch
@@ -0,0 +1,558 @@
+This patch adds support for Sharp CE-RH2 on Akita+Spitz and CE-RH1 on Corgi.
+
+It is not clean enough to be upstreamed:
+ * Configuration shoud to platform tables
+ * Maybe more generic driver would be better
+ * Deprecated way to use Scoop GPIO
+- Maybe split to more parts:
+ * MAX1111 driver
+ * linear input device
+ * virtual keyboard on top of linear input device
+
+Index: linux-2.6.26/arch/arm/mach-pxa/spitz.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-pxa/spitz.c
++++ linux-2.6.26/arch/arm/mach-pxa/spitz.c
+@@ -262,6 +262,13 @@ static struct platform_device spitzkbd_d
+ .id = -1,
+ };
+
++/*
++ * Spitz Remote Control Device
++ */
++static struct platform_device sharpsl_rc_device = {
++ .name = "sharpsl-remote-control",
++ .id = -1,
++};
+
+ /*
+ * Spitz LEDs
+@@ -523,6 +530,7 @@ static struct platform_device *devices[]
+ &spitzscoop_device,
+ &spitzssp_device,
+ &spitzkbd_device,
++ &sharpsl_rc_device,
+ &spitzts_device,
+ &spitzbl_device,
+ &spitzled_device,
+Index: linux-2.6.26/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.26.orig/drivers/input/keyboard/Kconfig
++++ linux-2.6.26/drivers/input/keyboard/Kconfig
+@@ -175,6 +175,17 @@ config KEYBOARD_TOSA_USE_EXT_KEYCODES
+
+ Say Y only if you know, what you are doing!
+
++config SHARPSL_RC
++ tristate "Sharp SL-Cxx00 Remote Control"
++ depends on PXA_SHARPSL
++ default y
++ help
++ Say Y here to enable the remote on the Sharp Zaurus SL-Cxx00,
++ SL-C1000, SL-C3000 and Sl-C3100 series of PDAs.
++
++ To compile this driver as a module, choose M here: the
++ module will be called sharpsl_rc.
++
+ config KEYBOARD_AMIGA
+ tristate "Amiga keyboard"
+ depends on AMIGA
+Index: linux-2.6.26/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.26.orig/drivers/input/keyboard/Makefile
++++ linux-2.6.26/drivers/input/keyboard/Makefile
+@@ -26,4 +26,5 @@ obj-$(CONFIG_KEYBOARD_HP6XX) += jornada
+ obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
+ obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
+ obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
++obj-$(CONFIG_SHARPSL_RC) += sharpsl_rc.o
+ obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o
+Index: linux-2.6.26/drivers/input/keyboard/sharpsl_rc.c
+===================================================================
+--- /dev/null
++++ linux-2.6.26/drivers/input/keyboard/sharpsl_rc.c
+@@ -0,0 +1,321 @@
++/*
++ * Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
++ *
++ * Copyright (c) 2004-2005 Richard Purdie
++ *
++ * Based on corgikbd.c and Sharp's RC driver
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#define DEBUG 1
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/init.h>
++#include <linux/input.h>
++#include <linux/interrupt.h>
++#include <linux/jiffies.h>
++#include <linux/module.h>
++#include <linux/slab.h>
++
++#include <asm/mach-types.h>
++#include <asm/arch/spitz.h>
++#include <asm/arch/akita.h>
++#include <asm/arch/corgi.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxa2xx-gpio.h>
++#include <asm/hardware/scoop.h>
++#include <asm/arch/sharpsl.h>
++#include <asm/hardware/sharpsl_pm.h>
++
++#define DPRINTK(fmt, args...) dev_dbg(data->dev, fmt "\n", ##args)
++
++struct remote_control_key {
++ unsigned char min;
++ unsigned char max;
++ unsigned char key;
++};
++
++static struct remote_control_key remote_keys_spitz[] = {
++ /* CE-RH2 values */
++ { 25, 35, KEY_STOPCD},
++ { 55, 65, KEY_PLAYPAUSE},
++ { 85, 95, KEY_NEXTSONG},
++ { 115, 125, KEY_VOLUMEUP},
++ { 145, 155, KEY_PREVIOUSSONG},
++ { 180, 190, KEY_MUTE},
++ { 215, 225, KEY_VOLUMEDOWN},
++};
++static struct remote_control_key remote_keys_corgi[] = {
++ /* CE-RH1 values */
++ { 27, 35, KEY_STOPCD},
++ { 7, 13, KEY_PLAYPAUSE},
++ { 77, 93, KEY_NEXTSONG},
++ { 115, 132, KEY_VOLUMEUP},
++ { 46, 58, KEY_PREVIOUSSONG},
++ { 170, 186, KEY_VOLUMEDOWN},
++};
++
++#define RELEASE_HI 230
++#define MAX_EARPHONE 6
++#define RC_POLL_MS 10
++#define RC_FINISH_MS 500
++#define WAIT_STATE 3
++#define NOISE_THRESHOLD 100
++
++struct sharpsl_rc {
++ struct input_dev *input;
++ struct device *dev;
++
++ spinlock_t lock;
++ struct timer_list rctimer;
++ struct timer_list rctimer_finish;
++
++ unsigned int handling_press;
++ unsigned int noise;
++ unsigned int state;
++ unsigned int last_key;
++};
++
++static int get_remocon_raw(void)
++{
++ int i, val;
++ struct remote_control_key *remote_keys;
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ remote_keys = remote_keys_spitz;
++ else
++ remote_keys = remote_keys_corgi;
++
++ val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
++ for (i = 0; i < (machine_is_borzoi() || machine_is_spitz() || machine_is_akita() ?
++ ARRAY_SIZE(remote_keys_spitz) : ARRAY_SIZE(remote_keys_corgi));
++ ++i) {
++ if (val >= remote_keys[i].min
++ && val <= remote_keys[i].max) {
++ //printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, remote_keys[i].key);
++ return remote_keys[i].key;
++ }
++ }
++ return 0;
++}
++
++static irqreturn_t sharpsl_rc_interrupt(int irq, void *dev_id)
++{
++ struct sharpsl_rc *data = dev_id;
++ DPRINTK("sharpsl_rc_interrupt %d\n", irq);
++ if (!data->handling_press) {
++ DPRINTK("handling interrupt");
++ data->handling_press = 1;
++ data->noise = 0;
++ data->state = 0;
++ data->last_key = 0;
++
++ if (machine_is_borzoi() || machine_is_spitz())
++ reset_scoop_gpio(platform_scoop_config->devs[1].dev, SPITZ_SCP2_AKIN_PULLUP);
++ else if (machine_is_akita())
++ akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_AKIN_PULLUP);
++ else
++ reset_scoop_gpio(platform_scoop_config->devs[0].dev, CORGI_SCP_AKIN_PULLUP);
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ }
++ return IRQ_HANDLED;
++}
++
++static void sharpsl_rc_timer_callback(unsigned long dataPtr)
++{
++ struct sharpsl_rc *data = (struct sharpsl_rc *) dataPtr;
++ int timer = 1;
++ int key = get_remocon_raw();
++ DPRINTK("timer callback, key: %d", key);
++
++ //wait for value to stabilize
++ if (data->state < WAIT_STATE) {
++ if (data->last_key != key) {
++ ++data->noise;
++ if (data->noise > NOISE_THRESHOLD) {
++ DPRINTK("too much noise, bailing");
++ timer = 0;
++ }
++ data->state = 0;
++ } else {
++ ++data->state;
++ }
++ data->last_key = key;
++
++ //stable value, send event
++ } else if (data->state == WAIT_STATE) {
++ data->noise = 0;
++ //non-key returned, skip the rest of the states and bail now
++ if (data->last_key == 0) {
++ DPRINTK("non-key detected %d, noise: %d", data->last_key, data->noise);
++ timer = 0;
++ //send button press
++ } else {
++ DPRINTK("key press detected %d, noise %d", data->last_key, data->noise);
++ input_report_key(data->input, data->last_key, 1);
++ input_sync(data->input);
++ }
++ ++data->state;
++
++ //wait until key is released
++ } else if (data->state < WAIT_STATE * 2) {
++ if (key == data->last_key
++ && data->noise < NOISE_THRESHOLD) {
++ data->state = WAIT_STATE + 1;
++ ++data->noise;
++ } else {
++ ++data->state;
++ }
++ //key is released, send event
++ } else {
++ //send button release
++ DPRINTK("release key %d", data->last_key);
++ input_report_key(data->input, data->last_key, 0);
++ input_sync(data->input);
++ timer = 0;
++ }
++ if (timer) {
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ } else {
++ if (machine_is_borzoi() || machine_is_spitz())
++ set_scoop_gpio(platform_scoop_config->devs[1].dev, SPITZ_SCP2_AKIN_PULLUP);
++ else if (machine_is_akita())
++ akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_AKIN_PULLUP);
++ else
++ set_scoop_gpio(platform_scoop_config->devs[0].dev, CORGI_SCP_AKIN_PULLUP);
++ data->handling_press = 0;
++ }
++}
++
++static int __init sharpsl_rc_probe(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc;
++ struct input_dev *input_dev;
++ int i, ret;
++ struct remote_control_key *remote_keys;
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_probe\n");
++
++ sharpsl_rc = kzalloc(sizeof(struct sharpsl_rc), GFP_KERNEL);
++ input_dev = input_allocate_device();
++ if (!sharpsl_rc || !input_dev) {
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, sharpsl_rc);
++
++ sharpsl_rc->dev = &pdev->dev;
++ sharpsl_rc->input = input_dev;
++ spin_lock_init(&sharpsl_rc->lock);
++
++ /* Init Remote Control Timer */
++ init_timer(&sharpsl_rc->rctimer);
++ sharpsl_rc->rctimer.function = sharpsl_rc_timer_callback;
++ sharpsl_rc->rctimer.data = (unsigned long) sharpsl_rc;
++
++ input_dev->name = "Sharp Remote Control CE-RHX";
++ input_dev->phys = "sharpsl_rc/input0";
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x0001;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++ input_dev->dev.parent = &pdev->dev;
++
++ input_dev->evbit[0] = BIT(EV_KEY);
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ remote_keys = remote_keys_spitz;
++ else
++ remote_keys = remote_keys_corgi;
++ for (i = 0; i < (machine_is_borzoi() || machine_is_spitz() || machine_is_akita() ?
++ ARRAY_SIZE(remote_keys_spitz) : ARRAY_SIZE(remote_keys_corgi));
++ ++i)
++ set_bit(remote_keys[i].key, input_dev->keybit);
++
++ ret = input_register_device(sharpsl_rc->input);
++ if (ret) {
++ dev_dbg(&pdev->dev, "Failed to register Sharp Remote input device\n");
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return ret;
++ }
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita()) {
++ pxa_gpio_mode(SPITZ_GPIO_AK_INT | GPIO_IN);
++ ret = request_irq(SPITZ_IRQ_GPIO_AK_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ } else {
++ pxa_gpio_mode(CORGI_GPIO_AK_INT | GPIO_IN);
++ ret = request_irq(CORGI_IRQ_GPIO_AK_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ }
++ if (ret < 0) {
++ dev_dbg(&pdev->dev, "Can't get IRQ: %d!\n", i);
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return ret;
++ }
++
++ return 0;
++}
++
++static int sharpsl_rc_remove(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc = platform_get_drvdata(pdev);
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_remove\n");
++
++ if (machine_is_borzoi() || machine_is_spitz() || machine_is_akita())
++ free_irq(SPITZ_IRQ_GPIO_AK_INT, sharpsl_rc);
++ else
++ free_irq(CORGI_IRQ_GPIO_AK_INT, sharpsl_rc);
++ del_timer_sync(&sharpsl_rc->rctimer);
++ input_unregister_device(sharpsl_rc->input);
++ kfree(sharpsl_rc);
++
++ return 0;
++}
++
++static struct platform_driver sharpsl_rc_driver = {
++ .probe = sharpsl_rc_probe,
++ .remove = sharpsl_rc_remove,
++ .suspend = NULL,
++ .resume = NULL,
++ .driver = {
++ .name = "sharpsl-remote-control",
++ },
++};
++
++static int __devinit sharpsl_rc_init(void)
++{
++ //printk("sharpsl_rc_init\n");
++ return platform_driver_register(&sharpsl_rc_driver);
++}
++
++static void __exit sharpsl_rc_exit(void)
++{
++ //printk("sharpsl_rc_exit\n");
++ platform_driver_unregister(&sharpsl_rc_driver);
++}
++
++module_init(sharpsl_rc_init);
++module_exit(sharpsl_rc_exit);
++
++MODULE_AUTHOR("Justin Patrin <papercrane@reversefold.com>");
++MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
++MODULE_DESCRIPTION("SharpSL Remote Control Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.26/drivers/input/keyboard/spitzkbd.c
+===================================================================
+--- linux-2.6.26.orig/drivers/input/keyboard/spitzkbd.c
++++ linux-2.6.26/drivers/input/keyboard/spitzkbd.c
+@@ -19,6 +19,7 @@
+ #include <linux/jiffies.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
++#include <linux/kmod.h>
+
+ #include <asm/arch/spitz.h>
+ #include <asm/arch/hardware.h>
+@@ -280,13 +281,21 @@ static irqreturn_t spitzkbd_hinge_isr(in
+ static int sharpsl_hinge_state;
+ static int hinge_count;
+
++void spitzkbd_handle_sharpsl_rc(void *arg) {
++ request_module("sharpsl_rc");
++}
++
++DECLARE_WORK(spitzkbd_work, spitzkbd_handle_sharpsl_rc);
++
+ static void spitzkbd_hinge_timer(unsigned long data)
+ {
+ struct spitzkbd *spitzkbd_data = (struct spitzkbd *) data;
+ unsigned long state;
+ unsigned long flags;
++ unsigned int headphone, remote;
+
+ state = GPLR(SPITZ_GPIO_SWA) & (GPIO_bit(SPITZ_GPIO_SWA)|GPIO_bit(SPITZ_GPIO_SWB));
++ state |= (GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN));
+ state |= (GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT));
+ if (state != sharpsl_hinge_state) {
+ hinge_count = 0;
+@@ -300,9 +309,18 @@ static void spitzkbd_hinge_timer(unsigne
+
+ input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
+ input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
+- input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
++
++ headphone = ((GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN)) != 0);
++ input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, headphone);
++
++ remote = headphone && ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) == 0);
++ input_report_switch(spitzkbd_data->input, SW_REMOTE_INSERT, remote);
+ input_sync(spitzkbd_data->input);
+
++ if (remote) {
++ schedule_work(&spitzkbd_work);
++ }
++
+ spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
+ } else {
+ mod_timer(&spitzkbd_data->htimer, jiffies + msecs_to_jiffies(HINGE_SCAN_INTERVAL));
+@@ -396,6 +414,7 @@ static int __init spitzkbd_probe(struct
+ set_bit(SW_LID, input_dev->swbit);
+ set_bit(SW_TABLET_MODE, input_dev->swbit);
+ set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
++ set_bit(SW_REMOTE_INSERT, input_dev->swbit);
+
+ err = input_register_device(input_dev);
+ if (err)
+@@ -433,9 +452,12 @@ static int __init spitzkbd_probe(struct
+ request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd SWB", spitzkbd);
+- request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ request_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd HP", spitzkbd);
++ request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "Spitzkbd HP Type", spitzkbd);
+
+ return 0;
+
+@@ -456,6 +478,7 @@ static int spitzkbd_remove(struct platfo
+ free_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd);
++ free_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd);
+
+ del_timer_sync(&spitzkbd->htimer);
+Index: linux-2.6.26/arch/arm/mach-pxa/sharpsl.h
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-pxa/sharpsl.h
++++ linux-2.6.26/arch/arm/mach-pxa/sharpsl.h
+@@ -37,15 +37,10 @@ void corgi_lcdtg_hw_init(int mode);
+ */
+ #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
+
+-/* MAX1111 Channel Definitions */
+-#define MAX1111_BATT_VOLT 4u
+-#define MAX1111_BATT_TEMP 2u
+-#define MAX1111_ACIN_VOLT 6u
+-
+ extern struct battery_thresh spitz_battery_levels_acin[];
+ extern struct battery_thresh spitz_battery_levels_noac[];
+ void sharpsl_pm_pxa_init(void);
+ void sharpsl_pm_pxa_remove(void);
+-int sharpsl_pm_pxa_read_max1111(int channel);
++
+
+
+Index: linux-2.6.26/arch/arm/mach-pxa/sharpsl_pm.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-pxa/sharpsl_pm.c
++++ linux-2.6.26/arch/arm/mach-pxa/sharpsl_pm.c
+@@ -136,6 +136,8 @@ int sharpsl_pm_pxa_read_max1111(int chan
+ | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
+ }
+
++EXPORT_SYMBOL(sharpsl_pm_pxa_read_max1111);
++
+ void sharpsl_pm_pxa_init(void)
+ {
+ pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);
+Index: linux-2.6.26/include/asm-arm/hardware/sharpsl_pm.h
+===================================================================
+--- linux-2.6.26.orig/include/asm-arm/hardware/sharpsl_pm.h
++++ linux-2.6.26/include/asm-arm/hardware/sharpsl_pm.h
+@@ -104,3 +104,10 @@ irqreturn_t sharpsl_ac_isr(int irq, void
+ irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id);
+ irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id);
+
++/* MAX1111 Channel Definitions */
++#define MAX1111_REMCOM 0u
++#define MAX1111_BATT_VOLT 4u
++#define MAX1111_BATT_TEMP 2u
++#define MAX1111_ACIN_VOLT 6u
++
++int sharpsl_pm_pxa_read_max1111(int channel);
+Index: linux-2.6.26/include/linux/input.h
+===================================================================
+--- linux-2.6.26.orig/include/linux/input.h
++++ linux-2.6.26/include/linux/input.h
+@@ -640,6 +640,7 @@ struct input_absinfo {
+ #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
+ set = radio enabled */
+ #define SW_RADIO SW_RFKILL_ALL /* deprecated */
++#define SW_REMOTE_INSERT 0x04 /* set = remote */
+ #define SW_MAX 0x0f
+ #define SW_CNT (SW_MAX+1)
+
+Index: linux-2.6.26/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.26.orig/arch/arm/mach-pxa/spitz_pm.c
++++ linux-2.6.26/arch/arm/mach-pxa/spitz_pm.c
+@@ -160,6 +160,13 @@ static int spitz_should_wakeup(unsigned
+ if (resume_on_alarm && (PEDR & PWER_RTC))
+ is_resume |= PWER_RTC;
+
++ printk("wakeup: PEDR: %x, PKSR: %x, HP_IN: %x, AK_INT: %x\n", PEDR, PKSR, GPIO_bit(SPITZ_GPIO_HP_IN), GPIO_bit(SPITZ_GPIO_AK_INT));
++
++ //remote/headphone interrupt, wakeup
++ if (PEDR == 0 && (PKSR & 0xc0d01) != 0) {
++ is_resume |= PWER_RTC;
++ }
++
+ dev_dbg(sharpsl_pm.dev, "is_resume: %x\n",is_resume);
+ return is_resume;
+ }
diff --git a/recipes/linux/linux-kexecboot-2.6.26/spitz/defconfig b/recipes/linux/linux-kexecboot-2.6.26/spitz/defconfig
new file mode 100644
index 0000000000..2d34ad0225
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/spitz/defconfig
@@ -0,0 +1,1011 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26
+# Mon Feb 2 00:49:55 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_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# 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="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+# CONFIG_OPROFILE is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES 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=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_PXA_SHARPSL_25x is not set
+CONFIG_PXA_SHARPSL_27x=y
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_SHARPSL=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_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_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_BLK_DEV_HD 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=y
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_BLK_DEV_DM 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=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+CONFIG_KEYBOARD_SPITZ=y
+CONFIG_SHARPSL_RC=y
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_CORGI=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV 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_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP 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_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_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_SPITZ=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# 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 is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+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-kexecboot-2.6.26/spitz_h_rewrite.patch b/recipes/linux/linux-kexecboot-2.6.26/spitz_h_rewrite.patch
new file mode 100644
index 0000000000..3dcf4ed8af
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/spitz_h_rewrite.patch
@@ -0,0 +1,497 @@
+http://www.uwsg.indiana.edu/hypermail/linux/kernel/0802.1/3541.html
+
+Here is a rewrite of spitz.h, which includes comments documenting
+function of particular GPIO pins.
+
+spitz_h_rewrite.patch provides:
+- no changes in compiled code
+- partial spitz.h rewrite:
+ * organized by function
+ * describes complete GPIO pinout
+ * comments added
+ * removed defines cloning pxa-regs.h
+- prefer generic pxa-regs.h GPIO if available
+- use GPIO names instead of numbers
+
+Thanks to Trisoft for providing needed information.
+
+Index: linux-2.6.26-rc4/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mach-pxa/spitz_pm.c 2008-06-02 00:13:53.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mach-pxa/spitz_pm.c 2008-06-02 00:13:53.000000000 +0100
+@@ -111,9 +111,9 @@
+ pxa_gpio_mode(GPIO18_RDY|GPIO_OUT | GPIO_DFLT_HIGH);
+
+ PRER = GPIO_bit(SPITZ_GPIO_KEY_INT);
+- PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
+- PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET) | PWER_RTC;
+- PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
++ PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST);
++ PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST) | PWER_RTC;
++ PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(GPIO1_RST);
+ PKSR = 0xffffffff; // clear
+
+ /* nRESET_OUT Disable */
+@@ -126,7 +126,7 @@
+ static void spitz_postsuspend(void)
+ {
+ pxa_gpio_mode(GPIO18_RDY_MD);
+- pxa_gpio_mode(10 | GPIO_IN);
++ pxa_gpio_mode(SPITZ_GPIO_NC_10 | GPIO_IN);
+ }
+
+ static int spitz_should_wakeup(unsigned int resume_on_alarm)
+Index: linux-2.6.26-rc4/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.26-rc4.orig/drivers/video/pxafb.c 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/drivers/video/pxafb.c 2008-06-02 00:15:22.000000000 +0100
+@@ -966,7 +966,7 @@
+ return;
+ }
+
+- for (gpio = 58; ldd_bits; gpio++, ldd_bits--)
++ for (gpio = GPIO58_LDD_0; ldd_bits; gpio++, ldd_bits--)
+ pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT);
+ pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
+ pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/akita.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/akita.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/akita.h 2008-06-02 00:13:53.000000000 +0100
+@@ -12,11 +12,11 @@
+ /* Akita IO Expander GPIOs */
+
+ #define AKITA_IOEXP_RESERVED_7 (1 << 7)
+-#define AKITA_IOEXP_IR_ON (1 << 6)
+-#define AKITA_IOEXP_AKIN_PULLUP (1 << 5)
+-#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4)
+-#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3)
+-#define AKITA_IOEXP_MIC_BIAS (1 << 2)
++#define AKITA_IOEXP_IR_ON (1 << 6) /* IrDA On */
++#define AKITA_IOEXP_AKIN_PULLUP (1 << 5) /* Pull-Up for Remote */
++#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) /* Backlight Control */
++#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) /* Backlight On */
++#define AKITA_IOEXP_MIC_BIAS (1 << 2) /* Mic Bias On */
+ #define AKITA_IOEXP_RESERVED_1 (1 << 1)
+ #define AKITA_IOEXP_RESERVED_0 (1 << 0)
+
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/spitz.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/spitz.h 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/spitz.h 2008-06-02 00:13:53.000000000 +0100
+@@ -1,8 +1,9 @@
+ /*
+- * Hardware specific definitions for SL-Cx000 series of PDAs
++ * Hardware specific definitions for SL-Cxx00 series of PDAs
+ *
+ * Copyright (c) 2005 Alexander Wykes
+ * Copyright (c) 2005 Richard Purdie
++ * Copyright (c) 2008 Stanislav Brabec
+ *
+ * Based on Sharp's 2.4 kernel patches
+ *
+@@ -13,140 +14,257 @@
+ */
+ #ifndef __ASM_ARCH_SPITZ_H
+ #define __ASM_ARCH_SPITZ_H 1
+-#endif
+
+-#include <linux/fb.h>
++#include <asm-arm/arch-pxa/irqs.h>
++#include <linux/platform_device.h>
+
+ /* Spitz/Akita GPIOs */
+
+-#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
+-#define SPITZ_GPIO_RESET (1)
+-#define SPITZ_GPIO_nSD_DETECT (9)
+-#define SPITZ_GPIO_TP_INT (11) /* Touch Panel interrupt */
+-#define SPITZ_GPIO_AK_INT (13) /* Remote Control */
+-#define SPITZ_GPIO_ADS7846_CS (14)
+-#define SPITZ_GPIO_SYNC (16)
+-#define SPITZ_GPIO_MAX1111_CS (20)
+-#define SPITZ_GPIO_FATAL_BAT (21)
+-#define SPITZ_GPIO_HSYNC (22)
+-#define SPITZ_GPIO_nSD_CLK (32)
+-#define SPITZ_GPIO_USB_DEVICE (35)
+-#define SPITZ_GPIO_USB_HOST (37)
+-#define SPITZ_GPIO_USB_CONNECT (41)
+-#define SPITZ_GPIO_LCDCON_CS (53)
+-#define SPITZ_GPIO_nPCE (54)
+-#define SPITZ_GPIO_nSD_WP (81)
+-#define SPITZ_GPIO_ON_RESET (89)
+-#define SPITZ_GPIO_BAT_COVER (90)
+-#define SPITZ_GPIO_CF_CD (94)
+-#define SPITZ_GPIO_ON_KEY (95)
+-#define SPITZ_GPIO_SWA (97)
+-#define SPITZ_GPIO_SWB (96)
+-#define SPITZ_GPIO_CHRG_FULL (101)
+-#define SPITZ_GPIO_CO (101)
+-#define SPITZ_GPIO_CF_IRQ (105)
+-#define SPITZ_GPIO_AC_IN (115)
+-#define SPITZ_GPIO_HP_IN (116)
++/* This list refers to all GPIO pins either in defines or in comments.
++ *
++ * GPIO pins not listed:
++ * GPIO2 SYS_EN: System Power Enable
++ * GPIO5-GPIO8 PWR_CAP0-PWR_CAP3: sleep DC-DC converter power capacitors
++ * GPIO40 not connected
++ */
+
+-/* Spitz Only GPIOs */
+
+-#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
+-#define SPITZ_GPIO_CF2_CD (93)
++/* Spitz/Akita System GPIO */
++
++#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
++#define SPITZ_GPIO_SYNC (16) /* IOPORT Wake Up (input) */
++#define SPITZ_GPIO_NAND_CS (79) /* NAND Flash Chip Select */
++#define SPITZ_GPIO_NC_10 (10) /* Not Connected (but used in kernel) */
++/* This GPIO pin is connected:
++ * GPIO1_RST
++ */
+
+
++/* Compact Flash Interface */
++
++/* Spitz/Akita Compact Flash Interface */
++#define SPITZ_GPIO_CF_CD (94) /* CF IRQ */
++#define SPITZ_GPIO_CF_IRQ (105) /* CF Ready */
++/* These GPIO pins are connected:
++ * GPIO48_nPOE
++ * GPIO49_nPWE
++ * GPIO50_nPIOR
++ * GPIO51_nPIOW
++ * GPIO54_nPCE_2
++ * GPIO55_nPREG
++ * GPIO56_nPWAIT
++ * GPIO57_nIOIS16
++ * GPIO80_nCS_4
++ * GPIO85_nPCE_1
++ * GPIO104_pSKTSEL
++ */
++
++/* Spitz only Compact Flash Interface */
++#define SPITZ_GPIO_CF2_CD (93) /* CF slot1 IRQ */
++#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
++/* This GPIO pin is connected:
++ * GPIO78_nCS_2
++ */
++
++
++/* Spitz/Akita Battery, Power and Service Connector */
++
++#define SPITZ_GPIO_FATAL_BAT (21) /* Fatal Battery */
++#define SPITZ_GPIO_BAT_COVER (90) /* Battery Cover switch */
++#define SPITZ_GPIO_BAT_COVER2 (15) /* Battery Cover switch, parallel pin */
++#define SPITZ_GPIO_CHRG_FULL (101) /* Battery Full */
++#define SPITZ_GPIO_AC_IN (115) /* External Power Supply is active */
++#define SPITZ_GPIO_ON_RESET (89) /* Software Reset */
++#define SPITZ_GPIO_SERVICE0 (83) /* Service Connector */
++#define SPITZ_GPIO_SERVICE1 (84) /* Service Connector */
++/* This GPIO pin is connected:
++ * GPIO18_RDY
++ */
++
++
++/* Spitz/Akita Display Controller */
++
++#define SPITZ_GPIO_HSYNC (22) /* Line Sync Feedback */
++/* These GPIO pins are connected:
++ * GPIO58_LDD_0-GPIO58_LDD_15
++ * GPIO74_LCD_FCLK
++ * GPIO75_LCD_LCLK
++ * GPIO76_LCD_PCLK
++ * GPIO77_LCD_ACBIAS
++ */
++
++
++/* Spitz/Akita SSP/SPI Bus and Devices */
++
++#define SPITZ_GPIO_SSP_CLK (19) /* SSP bus Clock */
++#define SPITZ_GPIO_SSP_RXD (86) /* SSP bus RxD */
++#define SPITZ_GPIO_SSP_TXD (87) /* SSP bus TxD */
++#define SPITZ_GPIO_TP_INT (11) /* Touch Panel IRQ */
++#define SPITZ_GPIO_ADS7846_CS (14) /* Touch Panel Controller Chip Select */
++#define SPITZ_GPIO_MAX1111_CS (20) /* Multi Channel ADC Chip Select */
++#define SPITZ_GPIO_LCDCON_CS (53) /* LCD Controller Chip Select */
++
++
++/* Spitz/Akita Supplementary USB OTG Pins */
++
++#define SPITZ_GPIO_USB_DEVICE (35) /* USB Client power is present */
++#define SPITZ_GPIO_USB_HOST (37) /* USB OTG 5V Host power supply control */
++#define SPITZ_GPIO_USB_CONNECT (41) /* USB Host Cable is connected */
++
++
++/* Spitz/Akita Audio */
++
++#define SPITZ_GPIO_HP_IN (116) /* CPU Headphone detect */
++#define SPITZ_GPIO_AK_INT (13) /* Remote Control detect */
++/* These GPIO AC97 pins are connected:
++ * GPIO28_BITCLK
++ * GPIO29_SDATA_IN
++ * GPIO30_SDATA_OUT
++ * GPIO31_SYNC
++ * GPIO113_AC97_RESET_N
++ */
++
++
++/* Spitz/Akita SD Slot */
++
++#define SPITZ_GPIO_nSD_DETECT (9) /* SD Card Presence */
++#define SPITZ_GPIO_nSD_WP (81) /* SD Write Protection */
++/* These GPIO pins are connected:
++ * GPIO32_MMCCLK
++ * GPIO92_MMCDAT0
++ * GPIO109_MMCDAT1
++ * GPIO110_MMCDAT2
++ * GPIO111_MMCDAT3
++ * GPIO112_MMCCMD
++ */
++
++/* Spitz/Akita I2C bus */
++#define SPITZ_GPIO_SCL (117) /* I2C SCL */
++#define SPITZ_GPIO_SDA (118) /* I2C SDA */
++#define SPITZ_GPIO_PWR_SCL (3) /* I2C SCL power */
++#define SPITZ_GPIO_PWR_SDA (4) /* I2C SDA power */
++
++/* audio codec pins */
++
++
++/* Spitz/Akita UART ports */
++
++/* Fully Featured UART - connected to IOPORT connector */
++#define SPITZ_GPIO_FFRXD (102) /* IOPORT has nRXD inverted levels */
++#define SPITZ_GPIO_FFTXD (99) /* IOPORT has nTXD inverted levels */
++#define SPITZ_GPIO_FFRTS (98)
++#define SPITZ_GPIO_FFCTS (100)
++#define SPITZ_GPIO_FFDTR (82)
++#define SPITZ_GPIO_FFDSR (33)
++
++/* These UART GPIO pins are connected to Bluetooth
++ * (only on Akita version with Bluetooth)
++ * GPIO42_BTRXD
++ * GPIO43_BTTXD
++ * GPIO44_BTCTS
++ * GPIO45_BTRTS
++ */
++
++/* These UART GPIO pins are connected to IrDA:
++ * GPIO46_STRXD
++ * GPIO47_STTXD
++ */
++
+ /* Spitz/Akita Keyboard Definitions */
+
+-#define SPITZ_KEY_STROBE_NUM (11)
+-#define SPITZ_KEY_SENSE_NUM (7)
+-#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
+-#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
+-#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
+-#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
+-#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
+-#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
+-#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
+-#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
+-
+-#define SPITZ_GPIO_KEY_STROBE0 88
+-#define SPITZ_GPIO_KEY_STROBE1 23
+-#define SPITZ_GPIO_KEY_STROBE2 24
+-#define SPITZ_GPIO_KEY_STROBE3 25
+-#define SPITZ_GPIO_KEY_STROBE4 26
+-#define SPITZ_GPIO_KEY_STROBE5 27
+-#define SPITZ_GPIO_KEY_STROBE6 52
+-#define SPITZ_GPIO_KEY_STROBE7 103
+-#define SPITZ_GPIO_KEY_STROBE8 107
+-#define SPITZ_GPIO_KEY_STROBE9 108
+-#define SPITZ_GPIO_KEY_STROBE10 114
+-
+-#define SPITZ_GPIO_KEY_SENSE0 12
+-#define SPITZ_GPIO_KEY_SENSE1 17
+-#define SPITZ_GPIO_KEY_SENSE2 91
+-#define SPITZ_GPIO_KEY_SENSE3 34
+-#define SPITZ_GPIO_KEY_SENSE4 36
+-#define SPITZ_GPIO_KEY_SENSE5 38
+-#define SPITZ_GPIO_KEY_SENSE6 39
++#define SPITZ_KEY_STROBE_NUM (11)
++#define SPITZ_KEY_SENSE_NUM (7)
++#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
++#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
++#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
++#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
++#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
++#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
++#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
++#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
++#define SPITZ_GPIO_KEY_STROBE0 (88)
++#define SPITZ_GPIO_KEY_STROBE1 (23)
++#define SPITZ_GPIO_KEY_STROBE2 (24)
++#define SPITZ_GPIO_KEY_STROBE3 (25)
++#define SPITZ_GPIO_KEY_STROBE4 (26)
++#define SPITZ_GPIO_KEY_STROBE5 (27)
++#define SPITZ_GPIO_KEY_STROBE6 (52)
++#define SPITZ_GPIO_KEY_STROBE7 (103)
++#define SPITZ_GPIO_KEY_STROBE8 (107)
++#define SPITZ_GPIO_KEY_STROBE9 (108)
++#define SPITZ_GPIO_KEY_STROBE10 (114)
++#define SPITZ_GPIO_KEY_SENSE0 (12)
++#define SPITZ_GPIO_KEY_SENSE1 (17)
++#define SPITZ_GPIO_KEY_SENSE2 (91)
++#define SPITZ_GPIO_KEY_SENSE3 (34)
++#define SPITZ_GPIO_KEY_SENSE4 (36)
++#define SPITZ_GPIO_KEY_SENSE5 (38)
++#define SPITZ_GPIO_KEY_SENSE6 (39)
++
++#define SPITZ_GPIO_SWA (97) /* Keyboard Interrupt A */
++#define SPITZ_GPIO_SWB (96) /* Keyboard Interrupt B */
++#define SPITZ_GPIO_ON_KEY (95) /* Power On Key */
+
+
+-/* Spitz Scoop Device (No. 1) GPIOs */
++/* Spitz/Akita Scoop Device (No. 1) GPIOs */
+ /* Suspend States in comments */
+-#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Keep */
+-#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Keep */
+-#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Keep */
+-#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Low */
+-#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Low */
+-#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* Keep */
+-#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Keep */
+-#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Low */
+-#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Low */
++#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Green LED, Keep */
++#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Fast Charge On, Keep */
++#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Charge On, Keep */
++#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Extra Mute Left, Low */
++#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Extra Mute Right, Low */
++#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* CF+SD Power Circuit, Keep */
++#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Orange LED, Keep */
++#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Dummy Load, Low */
++#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Battery Sensor On, Low */
+
+ #define SPITZ_SCP_IO_DIR (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \
+- SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
+- SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
++ SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
++ SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
+ #define SPITZ_SCP_IO_OUT (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R)
+ #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
+ #define SPITZ_SCP_SUS_SET 0
+
+ /* Spitz Scoop Device (No. 2) GPIOs */
+-/* Suspend States in comments */
+-#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* High */
+-#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Keep */
+-#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
+-#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
+-#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
+-#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
+-#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Low */
+-#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Low */
+-#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Low */
++/* Suspend States in comments
++ * Spitz only, Akita uses corresponding AKITA_IOEXP_ */
++#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* IrDA On, High */
++#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Pull-Up for Remote, Keep */
++#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
++#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
++#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
++#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
++#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Backlight Control, Low */
++#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Backlight On, Low */
++#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Mic Bias On, Low */
+
+ #define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \
+- SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
+- SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++ SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
+
+ #define SPITZ_SCP2_IO_OUT (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1)
+ #define SPITZ_SCP2_SUS_CLR (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
+- SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
+ #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1)
+
+
+-/* Spitz IRQ Definitions */
++/* Spitz/Akita IRQ Definitions */
+
+-#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
+-#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
+-#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
+-#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
+-#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
+-#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
+-#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
+-#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
+-#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
++#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
++#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
++#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
++#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
++#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
++#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
++#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
++#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
++#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
+ #define SPITZ_IRQ_GPIO_BAT_COVER IRQ_GPIO(SPITZ_GPIO_BAT_COVER)
+ #define SPITZ_IRQ_GPIO_FATAL_BAT IRQ_GPIO(SPITZ_GPIO_FATAL_BAT)
+-#define SPITZ_IRQ_GPIO_CO IRQ_GPIO(SPITZ_GPIO_CO)
+-#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
+-#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
+-#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
+-#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
++#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
++#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
++#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
++#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
+ #define SPITZ_IRQ_GPIO_nSD_DETECT IRQ_GPIO(SPITZ_GPIO_nSD_DETECT)
+
+ /*
+@@ -156,3 +274,5 @@
+ extern struct platform_device spitzscoop2_device;
+ extern struct platform_device spitzssp_device;
+ extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
++
++#endif
+Index: linux-2.6.26-rc4/sound/arm/pxa2xx-ac97.c
+===================================================================
+--- linux-2.6.26-rc4.orig/sound/arm/pxa2xx-ac97.c 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/sound/arm/pxa2xx-ac97.c 2008-06-02 00:19:38.000000000 +0100
+@@ -156,10 +156,10 @@
+ #ifdef CONFIG_PXA27x
+ /* warm reset broken on Bulverde,
+ so manually keep AC97 reset high */
+- pxa_gpio_mode(113 | GPIO_OUT | GPIO_DFLT_HIGH);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N | GPIO_OUT | GPIO_DFLT_HIGH);
+ udelay(10);
+ GCR |= GCR_WARM_RST;
+- pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N_MD);
+ udelay(500);
+ #elif defined(CONFIG_PXA3xx)
+ timeout = 100;
+@@ -364,7 +364,7 @@
+ pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
+ #ifdef CONFIG_PXA27x
+ /* Use GPIO 113 as AC97 Reset on Bulverde */
+- pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
++ pxa_gpio_mode(GPIO113_AC97_RESET_N_MD | GPIO_ALT_FN_2_OUT);
+ ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK");
+ if (IS_ERR(ac97conf_clk)) {
+ ret = PTR_ERR(ac97conf_clk);
+Index: linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa2xx-gpio.h
+===================================================================
+--- linux-2.6.26-rc4.orig/include/asm-arm/arch-pxa/pxa2xx-gpio.h 2008-06-02 00:18:07.000000000 +0100
++++ linux-2.6.26-rc4/include/asm-arm/arch-pxa/pxa2xx-gpio.h 2008-06-02 00:18:28.000000000 +0100
+@@ -138,6 +138,7 @@
+ #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
+ #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */
+ #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */
++#define GPIO104_pSKTSEL 104 /* PCMCIA Socket Select (PXA27x) */
+ #define GPIO105_CIF_DD_1 105 /* Camera data pin 1 */
+ #define GPIO106_CIF_DD_9 106 /* Camera data pin 9 */
+ #define GPIO107_CIF_DD_8 107 /* Camera data pin 8 */
diff --git a/recipes/linux/linux-kexecboot-2.6.26/versatile-armv6.patch b/recipes/linux/linux-kexecboot-2.6.26/versatile-armv6.patch
new file mode 100644
index 0000000000..6f2ca26a9a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/versatile-armv6.patch
@@ -0,0 +1,17 @@
+---
+ arch/arm/mm/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: linux-2.6.26-rc4/arch/arm/mm/Kconfig
+===================================================================
+--- linux-2.6.26-rc4.orig/arch/arm/mm/Kconfig 2008-05-26 19:08:11.000000000 +0100
++++ linux-2.6.26-rc4/arch/arm/mm/Kconfig 2008-06-01 18:40:07.000000000 +0100
+@@ -387,7 +387,7 @@
+ # ARMv6
+ config CPU_V6
+ bool "Support ARM V6 processor"
+- depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
++ depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || ARCH_VERSATILE_PB
+ default y if ARCH_MX3
+ default y if ARCH_MSM7X00A
+ select CPU_32v6
diff --git a/recipes/linux/linux-kexecboot-2.6.26/zaurus-i2c-init.patch b/recipes/linux/linux-kexecboot-2.6.26/zaurus-i2c-init.patch
new file mode 100644
index 0000000000..e0db0746cd
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/zaurus-i2c-init.patch
@@ -0,0 +1,99 @@
+Typo in poodle chunk fixed: set_pxa_i2c_info->pxa_set_i2c_info.
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+To: Richard Purdie <rpurdie@rpsys.net>
+Date: Wed, 16 Jul 2008 23:19:36 +0100
+Message-Id: <1216246776-4500-1-git-send-email-broonie@opensource.wolfsonmicro.com>
+List-Id: ARM Linux kernel discussions
+ <linux-arm-kernel.lists.arm.linux.org.uk>
+
+Both spitz and poodle have audio codecs on their primary I2C bus so need
+to call pxa_set_i2c_info() to set it up during init. Tested on spitz by
+Stanislav.
+
+Reported-by: Stanislav Brabec <utx@penguin.cz>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+---
+ arch/arm/mach-pxa/corgi.c | 2 ++
+ arch/arm/mach-pxa/poodle.c | 2 ++
+ arch/arm/mach-pxa/spitz.c | 2 ++
+ 3 files changed, 6 insertions(+)
+
+--- linux-2.6.26.orig/arch/arm/mach-pxa/corgi.c
++++ linux-2.6.26/arch/arm/mach-pxa/corgi.c
+@@ -38,10 +38,11 @@
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxa2xx-gpio.h>
+ #include <asm/arch/irda.h>
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/udc.h>
++#include <asm/arch/i2c.h>
+ #include <asm/arch/corgi.h>
+ #include <asm/arch/sharpsl.h>
+
+ #include <asm/mach/sharpsl_param.h>
+ #include <asm/hardware/scoop.h>
+@@ -529,10 +530,11 @@ static void __init corgi_init(void)
+ pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN);
+
+ pxa_set_udc_info(&udc_info);
+ pxa_set_mci_info(&corgi_mci_platform_data);
+ pxa_set_ficp_info(&corgi_ficp_platform_data);
++ pxa_set_i2c_info(NULL);
+
+ platform_scoop_config = &corgi_pcmcia_config;
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+--- linux-2.6.26.orig/arch/arm/mach-pxa/poodle.c
++++ linux-2.6.26/arch/arm/mach-pxa/poodle.c
+@@ -33,10 +33,11 @@
+
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxa2xx-gpio.h>
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/udc.h>
++#include <asm/arch/i2c.h>
+ #include <asm/arch/irda.h>
+ #include <asm/arch/poodle.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/sharpsl.h>
+ #include <asm/arch/ssp.h>
+@@ -386,10 +387,11 @@ static void __init poodle_init(void)
+ pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
+ pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT);
+ pxa_set_udc_info(&udc_info);
+ pxa_set_mci_info(&poodle_mci_platform_data);
+ pxa_set_ficp_info(&poodle_ficp_platform_data);
++ pxa_set_i2c_info(NULL);
+
+ platform_scoop_config = &poodle_pcmcia_config;
+
+ ret = platform_add_devices(devices, ARRAY_SIZE(devices));
+ if (ret) {
+--- linux-2.6.26.orig/arch/arm/mach-pxa/spitz.c
++++ linux-2.6.26/arch/arm/mach-pxa/spitz.c
+@@ -36,10 +36,11 @@
+ #include <asm/mach/irq.h>
+
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxa2xx-regs.h>
+ #include <asm/arch/pxa2xx-gpio.h>
++#include <asm/arch/i2c.h>
+ #include <asm/arch/irda.h>
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/ohci.h>
+ #include <asm/arch/udc.h>
+ #include <asm/arch/pxafb.h>
+@@ -579,10 +580,11 @@ static void __init common_init(void)
+ pxa_set_mci_info(&spitz_mci_platform_data);
+ pxa_set_ohci_info(&spitz_ohci_platform_data);
+ pxa_set_ficp_info(&spitz_ficp_platform_data);
+ set_pxa_fb_parent(&spitzssp_device.dev);
+ set_pxa_fb_info(&spitz_pxafb_info);
++ pxa_set_i2c_info(NULL);
+ }
+
+ #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
+ static void spitz_bl_set_intensity(int intensity)
+ {
diff --git a/recipes/linux/linux-kexecboot-2.6.26/zylonite-boot.patch b/recipes/linux/linux-kexecboot-2.6.26/zylonite-boot.patch
new file mode 100644
index 0000000000..f41928eca5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/zylonite-boot.patch
@@ -0,0 +1,45 @@
+From 04c42f566c68b757fdadf54e0e0f9dfe9f3f9b06 Mon Sep 17 00:00:00 2001
+From: eric miao <eric.miao@marvell.com>
+Date: Tue, 19 Jun 2007 16:42:53 +0800
+Subject: [PATCH] [PATCH] make zylonite boot
+
+1. reuse head-xscale.S for XSC3
+
+2. add a workaround for machine ID assignment, which should be done
+ by boot loader
+---
+ arch/arm/boot/compressed/Makefile | 4 ++++
+ arch/arm/boot/compressed/head-xscale.S | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+Index: linux-2.6-pxa3/arch/arm/boot/compressed/Makefile
+===================================================================
+--- linux-2.6-pxa3.orig/arch/arm/boot/compressed/Makefile 2007-09-24 11:25:57.000000000 +0200
++++ linux-2.6-pxa3/arch/arm/boot/compressed/Makefile 2007-09-24 12:26:53.000000000 +0200
+@@ -40,6 +40,10 @@
+ OBJS += head-xscale.o
+ endif
+
++ifeq ($(CONFIG_CPU_XSC3),y)
++OBJS += head-xscale.o
++endif
++
+ ifeq ($(CONFIG_PXA_SHARPSL),y)
+ OBJS += head-sharpsl.o
+ endif
+Index: linux-2.6-pxa3/arch/arm/boot/compressed/head-xscale.S
+===================================================================
+--- linux-2.6-pxa3.orig/arch/arm/boot/compressed/head-xscale.S 2007-09-24 11:42:27.000000000 +0200
++++ linux-2.6-pxa3/arch/arm/boot/compressed/head-xscale.S 2007-09-24 12:26:02.000000000 +0200
+@@ -33,6 +33,11 @@
+ bic r0, r0, #0x1000 @ clear Icache
+ mcr p15, 0, r0, c1, c0, 0
+
++#ifdef CONFIG_MACH_ZYLONITE
++ mov r7, #(MACH_TYPE_ZYLONITE & 0xff)
++ orr r7, r7, #(MACH_TYPE_ZYLONITE & 0xff00)
++#endif
++
+ #ifdef CONFIG_ARCH_COTULLA_IDP
+ mov r7, #MACH_TYPE_COTULLA_IDP
+ #endif
diff --git a/recipes/linux/linux-kexecboot-2.6.26/zylonite/defconfig b/recipes/linux/linux-kexecboot-2.6.26/zylonite/defconfig
new file mode 100644
index 0000000000..3e7f96f6a7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/zylonite/defconfig
@@ -0,0 +1,1741 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Sun Jan 20 18:42:35 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Supported PXA3xx Processor Variants
+#
+CONFIG_CPU_PXA300=y
+CONFIG_CPU_PXA310=y
+CONFIG_CPU_PXA320=y
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+CONFIG_MACH_ZYLONITE=y
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA3xx=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSC3=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_IO_36=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=m
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,38400 root=/dev/mtdblock2 rootfstype=jffs2 mem=64M dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_LIBERTAS is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+# CONFIG_ATMEL is not set
+CONFIG_AIRO_CS=m
+# CONFIG_PCMCIA_WL3501 is not set
+# CONFIG_USB_ZD1201 is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+CONFIG_USB_NET_CDC_SUBSET=m
+# CONFIG_USB_ALI_M5632 is not set
+# CONFIG_USB_AN2720 is not set
+# CONFIG_USB_BELKIN is not set
+CONFIG_USB_ARMLINUX=y
+# CONFIG_USB_EPSON2888 is not set
+# CONFIG_USB_KC2190 is not set
+# CONFIG_USB_NET_ZAURUS is not set
+# CONFIG_NET_PCMCIA is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_POWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_LCD_QVGA is not set
+CONFIG_FB_PXA_LCD_VGA=y
+CONFIG_FB_PXA_OVERLAY=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_CORGI=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_OHAND_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_M66592=y
+CONFIG_USB_M66592=y
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+# CONFIG_USB_ZERO is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.26/zylonite_keypad-r0.patch b/recipes/linux/linux-kexecboot-2.6.26/zylonite_keypad-r0.patch
new file mode 100644
index 0000000000..1889b3884e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/zylonite_keypad-r0.patch
@@ -0,0 +1,1187 @@
+Eric Miao's pxa keypad patchset backport.
+---
+ arch/arm/mach-pxa/devices.h | 1
+ arch/arm/mach-pxa/generic.c | 31 +
+ arch/arm/mach-pxa/pxa27x.c | 2
+ arch/arm/mach-pxa/pxa300.c | 6
+ arch/arm/mach-pxa/pxa3xx.c | 1
+ arch/arm/mach-pxa/zylonite.c | 68 +++
+ drivers/input/keyboard/Kconfig | 8
+ drivers/input/keyboard/Makefile | 2
+ drivers/input/keyboard/pxa27x_keyboard.c | 273 -------------
+ drivers/input/keyboard/pxa27x_keypad.c | 575 +++++++++++++++++++++++++++++
+ include/asm-arm/arch-pxa/irqs.h | 2
+ include/asm-arm/arch-pxa/pxa27x_keyboard.h | 13
+ include/asm-arm/arch-pxa/pxa27x_keypad.h | 58 ++
+ 13 files changed, 745 insertions(+), 295 deletions(-)
+
+Index: linux-2.6.23-z-input/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/Kconfig 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/drivers/input/keyboard/Kconfig 2008-02-18 01:43:28.000000000 +0100
+@@ -218,13 +218,13 @@
+ module will be called omap-keypad.
+
+ config KEYBOARD_PXA27x
+- tristate "PXA27x keyboard support"
+- depends on PXA27x
++ tristate "PXA27x/PXA3xx keypad support"
++ depends on PXA27x || PXA3xx
+ help
+- Enable support for PXA27x matrix keyboard controller
++ Enable support for PXA27x/PXA3xx keypad controller
+
+ To compile this driver as a module, choose M here: the
+- module will be called pxa27x_keyboard.
++ module will be called pxa27x_keypad.
+
+ config KEYBOARD_AAED2000
+ tristate "AAED-2000 keyboard"
+Index: linux-2.6.23-z-input/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/Makefile 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/drivers/input/keyboard/Makefile 2008-02-18 01:43:28.000000000 +0100
+@@ -18,7 +18,7 @@
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
+-obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keyboard.o
++obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
+ obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
+ obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
+ obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+Index: linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keypad.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 01:40:04.000000000 +0100
+@@ -0,0 +1,575 @@
++/*
++ * linux/drivers/input/keyboard/pxa27x_keypad.c
++ *
++ * Driver for the pxa27x matrix keyboard controller.
++ *
++ * Created: Feb 22, 2007
++ * Author: Rodolfo Giometti <giometti@linux.it>
++ *
++ * Based on a previous implementations by Kevin O'Connor
++ * <kevin_at_koconnor.net> and Alex Osborne <bobofdoom@gmail.com> and
++ * on some suggestions by Nicolas Pitre <nico@cam.org>.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/input.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/mfp.h>
++#include <asm/arch/pxa27x_keypad.h>
++
++#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
++
++/*
++ * Keypad Controller registers
++ */
++#define KPC 0x0000 /* Keypad Control register */
++#define KPDK 0x0008 /* Keypad Direct Key register */
++#define KPREC 0x0010 /* Keypad Rotary Encoder register */
++#define KPMK 0x0018 /* Keypad Matrix Key register */
++#define KPAS 0x0020 /* Keypad Automatic Scan register */
++
++/* Keypad Automatic Scan Multiple Key Presser register 0-3 */
++#define KPASMKP0 0x0028
++#define KPASMKP1 0x0030
++#define KPASMKP2 0x0038
++#define KPASMKP3 0x0040
++#define KPKDI 0x0048
++
++/* bit definitions */
++#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
++#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
++#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
++
++#define KPC_AS (0x1 << 30) /* Automatic Scan bit */
++#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */
++#define KPC_MI (0x1 << 22) /* Matrix interrupt bit */
++#define KPC_IMKP (0x1 << 21) /* Ignore Multiple Key Press */
++
++#define KPC_MS(n) (0x1 << (13 + (n))) /* Matrix scan line 'n' */
++#define KPC_MS_ALL (0xff << 13)
++
++#define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
++#define KPC_MIE (0x1 << 11) /* Matrix Interrupt Enable */
++#define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
++#define KPC_DI (0x1 << 5) /* Direct key interrupt bit */
++#define KPC_RE_ZERO_DEB (0x1 << 4) /* Rotary Encoder Zero Debounce */
++#define KPC_REE1 (0x1 << 3) /* Rotary Encoder1 Enable */
++#define KPC_REE0 (0x1 << 2) /* Rotary Encoder0 Enable */
++#define KPC_DE (0x1 << 1) /* Direct Keypad Enable */
++#define KPC_DIE (0x1 << 0) /* Direct Keypad interrupt Enable */
++
++#define KPDK_DKP (0x1 << 31)
++#define KPDK_DK(n) ((n) & 0xff)
++
++#define KPREC_OF1 (0x1 << 31)
++#define kPREC_UF1 (0x1 << 30)
++#define KPREC_OF0 (0x1 << 15)
++#define KPREC_UF0 (0x1 << 14)
++
++#define KPREC_RECOUNT0(n) ((n) & 0xff)
++#define KPREC_RECOUNT1(n) (((n) >> 16) & 0xff)
++
++#define KPMK_MKP (0x1 << 31)
++#define KPAS_SO (0x1 << 31)
++#define KPASMKPx_SO (0x1 << 31)
++
++#define KPAS_MUKP(n) (((n) >> 26) & 0x1f)
++#define KPAS_RP(n) (((n) >> 4) & 0xf)
++#define KPAS_CP(n) ((n) & 0xf)
++
++#define KPASMKP_MKC_MASK (0xff)
++
++#define keypad_readl(off) __raw_readl(keypad->mmio_base + (off))
++#define keypad_writel(off, v) __raw_writel((v), keypad->mmio_base + (off))
++
++#define MAX_MATRIX_KEY_NUM (8 * 8)
++
++struct pxa27x_keypad {
++ struct pxa27x_keypad_platform_data *pdata;
++
++ struct clk *clk;
++ struct input_dev *input_dev;
++ void __iomem *mmio_base;
++
++ /* matrix key code map */
++ unsigned int matrix_keycodes[MAX_MATRIX_KEY_NUM];
++
++ /* state row bits of each column scan */
++ uint32_t matrix_key_state[MAX_MATRIX_KEY_COLS];
++ uint32_t direct_key_state;
++
++ unsigned int direct_key_mask;
++
++ int rotary_rel_code[2];
++ int rotary_up_key[2];
++ int rotary_down_key[2];
++};
++
++static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ struct input_dev *input_dev = keypad->input_dev;
++ unsigned int *key;
++ int i;
++
++ key = &pdata->matrix_key_map[0];
++ for (i = 0; i < pdata->matrix_key_map_size; i++, key++) {
++ int row = ((*key) >> 28) & 0xf;
++ int col = ((*key) >> 24) & 0xf;
++ int code = (*key) & 0xffffff;
++
++ keypad->matrix_keycodes[(row << 3) + col] = code;
++ set_bit(code, input_dev->keybit);
++ }
++
++ keypad->rotary_up_key[0] = pdata->rotary0_up_key;
++ keypad->rotary_up_key[1] = pdata->rotary1_up_key;
++ keypad->rotary_down_key[0] = pdata->rotary0_down_key;
++ keypad->rotary_down_key[1] = pdata->rotary1_down_key;
++ keypad->rotary_rel_code[0] = pdata->rotary0_rel_code;
++ keypad->rotary_rel_code[1] = pdata->rotary1_rel_code;
++
++ if (pdata->rotary0_up_key && pdata->rotary0_down_key) {
++ set_bit(pdata->rotary0_up_key, input_dev->keybit);
++ set_bit(pdata->rotary0_down_key, input_dev->keybit);
++ } else
++ set_bit(pdata->rotary0_rel_code, input_dev->relbit);
++
++ if (pdata->rotary1_up_key && pdata->rotary1_down_key) {
++ set_bit(pdata->rotary1_up_key, input_dev->keybit);
++ set_bit(pdata->rotary1_down_key, input_dev->keybit);
++ } else
++ set_bit(pdata->rotary1_rel_code, input_dev->relbit);
++}
++
++static inline unsigned int lookup_matrix_keycode(
++ struct pxa27x_keypad *keypad, int row, int col)
++{
++ return keypad->matrix_keycodes[(row << 3) + col];
++}
++
++static void pxa27x_keypad_scan_matrix(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ int row, col, num_keys_pressed = 0;
++ uint32_t new_state[MAX_MATRIX_KEY_COLS];
++ uint32_t kpas = keypad_readl(KPAS);
++
++ num_keys_pressed = KPAS_MUKP(kpas);
++
++ memset(new_state, 0, sizeof(new_state));
++
++ if (num_keys_pressed == 0)
++ goto scan;
++
++ if (num_keys_pressed == 1) {
++ col = KPAS_CP(kpas);
++ row = KPAS_RP(kpas);
++
++ /* if invalid row/col, treat as no key pressed */
++ if (col >= pdata->matrix_key_cols ||
++ row >= pdata->matrix_key_rows)
++ goto scan;
++
++ new_state[col] = (1 << row);
++ goto scan;
++ }
++
++ if (num_keys_pressed > 1) {
++ uint32_t kpasmkp0 = keypad_readl(KPASMKP0);
++ uint32_t kpasmkp1 = keypad_readl(KPASMKP1);
++ uint32_t kpasmkp2 = keypad_readl(KPASMKP2);
++ uint32_t kpasmkp3 = keypad_readl(KPASMKP3);
++
++ new_state[0] = kpasmkp0 & KPASMKP_MKC_MASK;
++ new_state[1] = (kpasmkp0 >> 16) & KPASMKP_MKC_MASK;
++ new_state[2] = kpasmkp1 & KPASMKP_MKC_MASK;
++ new_state[3] = (kpasmkp1 >> 16) & KPASMKP_MKC_MASK;
++ new_state[4] = kpasmkp2 & KPASMKP_MKC_MASK;
++ new_state[5] = (kpasmkp2 >> 16) & KPASMKP_MKC_MASK;
++ new_state[6] = kpasmkp3 & KPASMKP_MKC_MASK;
++ new_state[7] = (kpasmkp3 >> 16) & KPASMKP_MKC_MASK;
++ }
++scan:
++ for (col = 0; col < pdata->matrix_key_cols; col++) {
++ uint32_t bits_changed;
++
++ bits_changed = keypad->matrix_key_state[col] ^ new_state[col];
++ if (bits_changed == 0)
++ continue;
++
++ for (row = 0; row < pdata->matrix_key_rows; row++) {
++ if ((bits_changed & (1 << row)) == 0)
++ continue;
++
++ input_report_key(keypad->input_dev,
++ lookup_matrix_keycode(keypad, row, col),
++ new_state[col] & (1 << row));
++ }
++ }
++ input_sync(keypad->input_dev);
++ memcpy(keypad->matrix_key_state, new_state, sizeof(new_state));
++}
++
++#define DEFAULT_KPREC (0x007f007f)
++
++static inline int rotary_delta(uint32_t kprec)
++{
++ if (kprec & KPREC_OF0)
++ return (kprec & 0xff) + 0x7f;
++ else if (kprec & KPREC_UF0)
++ return (kprec & 0xff) - 0x7f - 0xff;
++ else
++ return (kprec & 0xff) - 0x7f;
++}
++
++static void report_rotary_event(struct pxa27x_keypad *keypad, int r, int delta)
++{
++ struct input_dev *dev = keypad->input_dev;
++
++ if (delta == 0)
++ return;
++
++ if (keypad->rotary_up_key[r] && keypad->rotary_down_key[r]) {
++ int keycode = (delta > 0) ? keypad->rotary_up_key[r] :
++ keypad->rotary_down_key[r];
++
++ /* simulate a press-n-release */
++ input_report_key(dev, keycode, 1);
++ input_sync(dev);
++ input_report_key(dev, keycode, 0);
++ input_sync(dev);
++ } else {
++ input_report_rel(dev, keypad->rotary_rel_code[r], delta);
++ input_sync(dev);
++ }
++}
++
++static void pxa27x_keypad_scan_rotary(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ uint32_t kprec;
++
++ /* read and reset to default count value */
++ kprec = keypad_readl(KPREC);
++ keypad_writel(KPREC, DEFAULT_KPREC);
++
++ if (pdata->enable_rotary0)
++ report_rotary_event(keypad, 0, rotary_delta(kprec));
++
++ if (pdata->enable_rotary1)
++ report_rotary_event(keypad, 1, rotary_delta(kprec >> 16));
++}
++
++static void pxa27x_keypad_scan_direct(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ unsigned int new_state;
++ uint32_t kpdk, bits_changed;
++ int i;
++
++ kpdk = keypad_readl(KPDK);
++
++ if (pdata->enable_rotary0 || pdata->enable_rotary1)
++ pxa27x_keypad_scan_rotary(keypad);
++
++ if (pdata->direct_key_map == NULL)
++ return;
++
++ new_state = KPDK_DK(kpdk) & keypad->direct_key_mask;
++ bits_changed = keypad->direct_key_state ^ new_state;
++
++ if (bits_changed == 0)
++ return;
++
++ for (i = 0; i < pdata->direct_key_num; i++) {
++ if (bits_changed & (1 << i))
++ input_report_key(keypad->input_dev,
++ pdata->direct_key_map[i],
++ (new_state & (1 << i)));
++ }
++ input_sync(keypad->input_dev);
++ keypad->direct_key_state = new_state;
++}
++
++static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id)
++{
++ struct pxa27x_keypad *keypad = dev_id;
++ unsigned long kpc = keypad_readl(KPC);
++
++ if (kpc & KPC_DI)
++ pxa27x_keypad_scan_direct(keypad);
++
++ if (kpc & KPC_MI)
++ pxa27x_keypad_scan_matrix(keypad);
++
++ return IRQ_HANDLED;
++}
++
++static void pxa27x_keypad_config(struct pxa27x_keypad *keypad)
++{
++ struct pxa27x_keypad_platform_data *pdata = keypad->pdata;
++ unsigned int mask = 0, direct_key_num = 0;
++ unsigned long kpc = 0;
++
++ /* enable matrix keys with automatic scan */
++ if (pdata->matrix_key_rows && pdata->matrix_key_cols) {
++ kpc |= KPC_ASACT | KPC_MIE | KPC_ME | KPC_MS_ALL;
++ kpc |= KPC_MKRN(pdata->matrix_key_rows) |
++ KPC_MKCN(pdata->matrix_key_cols);
++ }
++
++ /* enable rotary key, debounce interval same as direct keys */
++ if (pdata->enable_rotary0) {
++ mask |= 0x03;
++ direct_key_num = 2;
++ kpc |= KPC_REE0;
++ }
++
++ if (pdata->enable_rotary1) {
++ mask |= 0x0c;
++ direct_key_num = 4;
++ kpc |= KPC_REE1;
++ }
++
++ if (pdata->direct_key_num > direct_key_num)
++ direct_key_num = pdata->direct_key_num;
++
++ keypad->direct_key_mask = ((2 << direct_key_num) - 1) & ~mask;
++
++ /* enable direct key */
++ if (direct_key_num)
++ kpc |= KPC_DE | KPC_DIE | KPC_DKN(direct_key_num);
++
++ keypad_writel(KPC, kpc | KPC_RE_ZERO_DEB);
++ keypad_writel(KPREC, DEFAULT_KPREC);
++ keypad_writel(KPKDI, pdata->debounce_interval);
++}
++
++static int pxa27x_keypad_open(struct input_dev *dev)
++{
++ struct pxa27x_keypad *keypad = input_get_drvdata(dev);
++
++ /* Enable unit clock */
++ clk_enable(keypad->clk);
++ pxa27x_keypad_config(keypad);
++
++ return 0;
++}
++
++static void pxa27x_keypad_close(struct input_dev *dev)
++{
++ struct pxa27x_keypad *keypad = input_get_drvdata(dev);
++
++ /* Disable clock unit */
++ clk_disable(keypad->clk);
++}
++
++#ifdef CONFIG_PM
++static int pxa27x_keypad_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++
++ clk_disable(keypad->clk);
++ return 0;
++}
++
++static int pxa27x_keypad_resume(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++ struct input_dev *input_dev = keypad->input_dev;
++
++ mutex_lock(&input_dev->mutex);
++
++ if (input_dev->users) {
++ /* Enable unit clock */
++ clk_enable(keypad->clk);
++ pxa27x_keypad_config(keypad);
++ }
++
++ mutex_unlock(&input_dev->mutex);
++
++ return 0;
++}
++#else
++#define pxa27x_keypad_suspend NULL
++#define pxa27x_keypad_resume NULL
++#endif
++
++#define res_size(res) ((res)->end - (res)->start + 1)
++
++static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad;
++ struct input_dev *input_dev;
++ struct resource *res;
++ int irq, error;
++
++ keypad = kzalloc(sizeof(struct pxa27x_keypad), GFP_KERNEL);
++ if (keypad == NULL) {
++ dev_err(&pdev->dev, "failed to allocate driver data\n");
++ return -ENOMEM;
++ }
++
++ keypad->pdata = pdev->dev.platform_data;
++ if (keypad->pdata == NULL) {
++ dev_err(&pdev->dev, "no platform data defined\n");
++ error = -EINVAL;
++ goto failed_free;
++ }
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ dev_err(&pdev->dev, "failed to get keypad irq\n");
++ error = -ENXIO;
++ goto failed_free;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res == NULL) {
++ dev_err(&pdev->dev, "failed to get I/O memory\n");
++ error = -ENXIO;
++ goto failed_free;
++ }
++
++ res = request_mem_region(res->start, res_size(res), pdev->name);
++ if (res == NULL) {
++ dev_err(&pdev->dev, "failed to request I/O memory\n");
++ error = -EBUSY;
++ goto failed_free;
++ }
++
++ keypad->mmio_base = ioremap(res->start, res_size(res));
++ if (keypad->mmio_base == NULL) {
++ dev_err(&pdev->dev, "failed to remap I/O memory\n");
++ error = -ENXIO;
++ goto failed_free_mem;
++ }
++
++ keypad->clk = clk_get(&pdev->dev, "KBDCLK");
++ if (IS_ERR(keypad->clk)) {
++ dev_err(&pdev->dev, "failed to get keypad clock\n");
++ error = PTR_ERR(keypad->clk);
++ goto failed_free_io;
++ }
++
++ /* Create and register the input driver. */
++ input_dev = input_allocate_device();
++ if (!input_dev) {
++ dev_err(&pdev->dev, "failed to allocate input device\n");
++ error = -ENOMEM;
++ goto failed_put_clk;
++ }
++
++ input_dev->name = pdev->name;
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->open = pxa27x_keypad_open;
++ input_dev->close = pxa27x_keypad_close;
++ input_dev->dev.parent = &pdev->dev;
++
++ keypad->input_dev = input_dev;
++ input_set_drvdata(input_dev, keypad);
++
++ input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) |
++ BIT_MASK(EV_REL);
++
++ pxa27x_keypad_build_keycode(keypad);
++ platform_set_drvdata(pdev, keypad);
++
++ error = request_irq(irq, pxa27x_keypad_irq_handler, IRQF_DISABLED,
++ pdev->name, keypad);
++ if (error) {
++ dev_err(&pdev->dev, "failed to request IRQ\n");
++ goto failed_free_dev;
++ }
++
++ /* Register the input device */
++ error = input_register_device(input_dev);
++ if (error) {
++ dev_err(&pdev->dev, "failed to register input device\n");
++ goto failed_free_irq;
++ }
++
++ return 0;
++
++failed_free_irq:
++ free_irq(irq, pdev);
++ platform_set_drvdata(pdev, NULL);
++failed_free_dev:
++ input_free_device(input_dev);
++failed_put_clk:
++ clk_put(keypad->clk);
++failed_free_io:
++ iounmap(keypad->mmio_base);
++failed_free_mem:
++ release_mem_region(res->start, res_size(res));
++failed_free:
++ kfree(keypad);
++ return error;
++}
++
++static int __devexit pxa27x_keypad_remove(struct platform_device *pdev)
++{
++ struct pxa27x_keypad *keypad = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ free_irq(platform_get_irq(pdev, 0), pdev);
++
++ clk_disable(keypad->clk);
++ clk_put(keypad->clk);
++
++ input_unregister_device(keypad->input_dev);
++ input_free_device(keypad->input_dev);
++
++ iounmap(keypad->mmio_base);
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res->start, res_size(res));
++
++ platform_set_drvdata(pdev, NULL);
++ kfree(keypad);
++ return 0;
++}
++
++static struct platform_driver pxa27x_keypad_driver = {
++ .probe = pxa27x_keypad_probe,
++ .remove = __devexit_p(pxa27x_keypad_remove),
++ .suspend = pxa27x_keypad_suspend,
++ .resume = pxa27x_keypad_resume,
++ .driver = {
++ .name = "pxa27x-keypad",
++ },
++};
++
++static int __init pxa27x_keypad_init(void)
++{
++ return platform_driver_register(&pxa27x_keypad_driver);
++}
++
++static void __exit pxa27x_keypad_exit(void)
++{
++ platform_driver_unregister(&pxa27x_keypad_driver);
++}
++
++module_init(pxa27x_keypad_init);
++module_exit(pxa27x_keypad_exit);
++
++MODULE_DESCRIPTION("PXA27x Keypad Controller Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keyboard.h
+===================================================================
+--- linux-2.6.23-z-input.orig/include/asm-arm/arch-pxa/pxa27x_keyboard.h 2007-10-09 22:31:38.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,13 +0,0 @@
+-#define PXAKBD_MAXROW 8
+-#define PXAKBD_MAXCOL 8
+-
+-struct pxa27x_keyboard_platform_data {
+- int nr_rows, nr_cols;
+- int keycodes[PXAKBD_MAXROW][PXAKBD_MAXCOL];
+- int gpio_modes[PXAKBD_MAXROW + PXAKBD_MAXCOL];
+-
+-#ifdef CONFIG_PM
+- u32 reg_kpc;
+- u32 reg_kprec;
+-#endif
+-};
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keypad.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23-z-input/include/asm-arm/arch-pxa/pxa27x_keypad.h 2008-02-18 01:43:28.000000000 +0100
+@@ -0,0 +1,58 @@
++#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
++#define __ASM_ARCH_PXA27x_KEYPAD_H
++
++#include <linux/input.h>
++
++#define MAX_MATRIX_KEY_ROWS (8)
++#define MAX_MATRIX_KEY_COLS (8)
++
++/* pxa3xx keypad platform specific parameters
++ *
++ * NOTE:
++ * 1. direct_key_num indicates the number of keys in the direct keypad
++ * _plus_ the number of rotary-encoder sensor inputs, this can be
++ * left as 0 if only rotary encoders are enabled, the driver will
++ * automatically calculate this
++ *
++ * 2. direct_key_map is the key code map for the direct keys, if rotary
++ * encoder(s) are enabled, direct key 0/1(2/3) will be ignored
++ *
++ * 3. rotary can be either interpreted as a relative input event (e.g.
++ * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
++ *
++ * 4. matrix key and direct key will use the same debounce_interval by
++ * default, which should be sufficient in most cases
++ */
++struct pxa27x_keypad_platform_data {
++
++ /* code map for the matrix keys */
++ unsigned int matrix_key_rows;
++ unsigned int matrix_key_cols;
++ unsigned int *matrix_key_map;
++ int matrix_key_map_size;
++
++ /* direct keys */
++ int direct_key_num;
++ unsigned int direct_key_map[8];
++
++ /* rotary encoders 0 */
++ int enable_rotary0;
++ int rotary0_rel_code;
++ int rotary0_up_key;
++ int rotary0_down_key;
++
++ /* rotary encoders 1 */
++ int enable_rotary1;
++ int rotary1_rel_code;
++ int rotary1_up_key;
++ int rotary1_down_key;
++
++ /* key debounce interval */
++ unsigned int debounce_interval;
++};
++
++#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
++
++extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
++
++#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
+Index: linux-2.6.23-z-input/drivers/input/keyboard/pxa27x_keyboard.c
+===================================================================
+--- linux-2.6.23-z-input.orig/drivers/input/keyboard/pxa27x_keyboard.c 2008-02-18 01:43:28.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,273 +0,0 @@
+-/*
+- * linux/drivers/input/keyboard/pxa27x_keyboard.c
+- *
+- * Driver for the pxa27x matrix keyboard controller.
+- *
+- * Created: Feb 22, 2007
+- * Author: Rodolfo Giometti <giometti@linux.it>
+- *
+- * Based on a previous implementations by Kevin O'Connor
+- * <kevin_at_koconnor.net> and Alex Osborne <bobofdoom@gmail.com> and
+- * on some suggestions by Nicolas Pitre <nico@cam.org>.
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- */
+-
+-
+-#include <linux/kernel.h>
+-#include <linux/module.h>
+-#include <linux/init.h>
+-#include <linux/interrupt.h>
+-#include <linux/input.h>
+-#include <linux/device.h>
+-#include <linux/platform_device.h>
+-#include <linux/clk.h>
+-#include <linux/err.h>
+-
+-#include <asm/mach-types.h>
+-#include <asm/mach/arch.h>
+-#include <asm/mach/map.h>
+-
+-#include <asm/arch/hardware.h>
+-#include <asm/arch/pxa-regs.h>
+-#include <asm/arch/irqs.h>
+-#include <asm/arch/pxa27x_keyboard.h>
+-
+-#define DRIVER_NAME "pxa27x-keyboard"
+-
+-#define KPASMKP(col) (col/2 == 0 ? KPASMKP0 : \
+- col/2 == 1 ? KPASMKP1 : \
+- col/2 == 2 ? KPASMKP2 : KPASMKP3)
+-#define KPASMKPx_MKC(row, col) (1 << (row + 16 * (col % 2)))
+-
+-static struct clk *pxakbd_clk;
+-
+-static irqreturn_t pxakbd_irq_handler(int irq, void *dev_id)
+-{
+- struct platform_device *pdev = dev_id;
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+- unsigned long kpc = KPC;
+- int p, row, col, rel;
+-
+- if (kpc & KPC_DI) {
+- unsigned long kpdk = KPDK;
+-
+- if (!(kpdk & KPDK_DKP)) {
+- /* better luck next time */
+- } else if (kpc & KPC_REE0) {
+- unsigned long kprec = KPREC;
+- KPREC = 0x7f;
+-
+- if (kprec & KPREC_OF0)
+- rel = (kprec & 0xff) + 0x7f;
+- else if (kprec & KPREC_UF0)
+- rel = (kprec & 0xff) - 0x7f - 0xff;
+- else
+- rel = (kprec & 0xff) - 0x7f;
+-
+- if (rel) {
+- input_report_rel(input_dev, REL_WHEEL, rel);
+- input_sync(input_dev);
+- }
+- }
+- }
+-
+- if (kpc & KPC_MI) {
+- /* report the status of every button */
+- for (row = 0; row < pdata->nr_rows; row++) {
+- for (col = 0; col < pdata->nr_cols; col++) {
+- p = KPASMKP(col) & KPASMKPx_MKC(row, col) ?
+- 1 : 0;
+- pr_debug("keycode %x - pressed %x\n",
+- pdata->keycodes[row][col], p);
+- input_report_key(input_dev,
+- pdata->keycodes[row][col], p);
+- }
+- }
+- input_sync(input_dev);
+- }
+-
+- return IRQ_HANDLED;
+-}
+-
+-static int pxakbd_open(struct input_dev *dev)
+-{
+- /* Set keypad control register */
+- KPC |= (KPC_ASACT |
+- KPC_MS_ALL |
+- (2 << 6) | KPC_REE0 | KPC_DK_DEB_SEL |
+- KPC_ME | KPC_MIE | KPC_DE | KPC_DIE);
+-
+- KPC &= ~KPC_AS; /* disable automatic scan */
+- KPC &= ~KPC_IMKP; /* do not ignore multiple keypresses */
+-
+- /* Set rotary count to mid-point value */
+- KPREC = 0x7F;
+-
+- /* Enable unit clock */
+- clk_enable(pxakbd_clk);
+-
+- return 0;
+-}
+-
+-static void pxakbd_close(struct input_dev *dev)
+-{
+- /* Disable clock unit */
+- clk_disable(pxakbd_clk);
+-}
+-
+-#ifdef CONFIG_PM
+-static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+-
+- /* Save controller status */
+- pdata->reg_kpc = KPC;
+- pdata->reg_kprec = KPREC;
+-
+- return 0;
+-}
+-
+-static int pxakbd_resume(struct platform_device *pdev)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+-
+- mutex_lock(&input_dev->mutex);
+-
+- if (input_dev->users) {
+- /* Restore controller status */
+- KPC = pdata->reg_kpc;
+- KPREC = pdata->reg_kprec;
+-
+- /* Enable unit clock */
+- clk_disable(pxakbd_clk);
+- clk_enable(pxakbd_clk);
+- }
+-
+- mutex_unlock(&input_dev->mutex);
+-
+- return 0;
+-}
+-#else
+-#define pxakbd_suspend NULL
+-#define pxakbd_resume NULL
+-#endif
+-
+-static int __devinit pxakbd_probe(struct platform_device *pdev)
+-{
+- struct pxa27x_keyboard_platform_data *pdata = pdev->dev.platform_data;
+- struct input_dev *input_dev;
+- int i, row, col, error;
+-
+- pxakbd_clk = clk_get(&pdev->dev, "KBDCLK");
+- if (IS_ERR(pxakbd_clk)) {
+- error = PTR_ERR(pxakbd_clk);
+- goto err_clk;
+- }
+-
+- /* Create and register the input driver. */
+- input_dev = input_allocate_device();
+- if (!input_dev) {
+- printk(KERN_ERR "Cannot request keypad device\n");
+- error = -ENOMEM;
+- goto err_alloc;
+- }
+-
+- input_dev->name = DRIVER_NAME;
+- input_dev->id.bustype = BUS_HOST;
+- input_dev->open = pxakbd_open;
+- input_dev->close = pxakbd_close;
+- input_dev->dev.parent = &pdev->dev;
+-
+- input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL);
+- input_dev->relbit[LONG(REL_WHEEL)] = BIT(REL_WHEEL);
+- for (row = 0; row < pdata->nr_rows; row++) {
+- for (col = 0; col < pdata->nr_cols; col++) {
+- int code = pdata->keycodes[row][col];
+- if (code > 0)
+- set_bit(code, input_dev->keybit);
+- }
+- }
+-
+- error = request_irq(IRQ_KEYPAD, pxakbd_irq_handler, IRQF_DISABLED,
+- DRIVER_NAME, pdev);
+- if (error) {
+- printk(KERN_ERR "Cannot request keypad IRQ\n");
+- goto err_free_dev;
+- }
+-
+- platform_set_drvdata(pdev, input_dev);
+-
+- /* Register the input device */
+- error = input_register_device(input_dev);
+- if (error)
+- goto err_free_irq;
+-
+- /* Setup GPIOs. */
+- for (i = 0; i < pdata->nr_rows + pdata->nr_cols; i++)
+- pxa_gpio_mode(pdata->gpio_modes[i]);
+-
+- /*
+- * Store rows/cols info into keyboard registers.
+- */
+-
+- KPC |= (pdata->nr_rows - 1) << 26;
+- KPC |= (pdata->nr_cols - 1) << 23;
+-
+- for (col = 0; col < pdata->nr_cols; col++)
+- KPC |= KPC_MS0 << col;
+-
+- return 0;
+-
+- err_free_irq:
+- platform_set_drvdata(pdev, NULL);
+- free_irq(IRQ_KEYPAD, pdev);
+- err_free_dev:
+- input_free_device(input_dev);
+- err_alloc:
+- clk_put(pxakbd_clk);
+- err_clk:
+- return error;
+-}
+-
+-static int __devexit pxakbd_remove(struct platform_device *pdev)
+-{
+- struct input_dev *input_dev = platform_get_drvdata(pdev);
+-
+- input_unregister_device(input_dev);
+- free_irq(IRQ_KEYPAD, pdev);
+- clk_put(pxakbd_clk);
+- platform_set_drvdata(pdev, NULL);
+-
+- return 0;
+-}
+-
+-static struct platform_driver pxakbd_driver = {
+- .probe = pxakbd_probe,
+- .remove = __devexit_p(pxakbd_remove),
+- .suspend = pxakbd_suspend,
+- .resume = pxakbd_resume,
+- .driver = {
+- .name = DRIVER_NAME,
+- },
+-};
+-
+-static int __init pxakbd_init(void)
+-{
+- return platform_driver_register(&pxakbd_driver);
+-}
+-
+-static void __exit pxakbd_exit(void)
+-{
+- platform_driver_unregister(&pxakbd_driver);
+-}
+-
+-module_init(pxakbd_init);
+-module_exit(pxakbd_exit);
+-
+-MODULE_DESCRIPTION("PXA27x Matrix Keyboard Driver");
+-MODULE_LICENSE("GPL");
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/zylonite.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/zylonite.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/zylonite.c 2008-02-19 01:31:33.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <asm/arch/gpio.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/zylonite.h>
++#include <asm/arch/pxa27x_keypad.h>
+
+ #include "generic.h"
+
+@@ -173,6 +174,72 @@
+ static inline void zylonite_init_lcd(void) {}
+ #endif
+
++#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
++static unsigned int zylonite_matrix_key_map[] = {
++ /* KEY(row, col, key_code) */
++ KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
++ KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H),
++ KEY(2, 0, KEY_I), KEY(2, 1, KEY_J), KEY(2, 2, KEY_K), KEY(2, 5, KEY_L),
++ KEY(3, 0, KEY_M), KEY(3, 1, KEY_N), KEY(3, 2, KEY_O), KEY(3, 5, KEY_P),
++ KEY(5, 0, KEY_Q), KEY(5, 1, KEY_R), KEY(5, 2, KEY_S), KEY(5, 5, KEY_T),
++ KEY(6, 0, KEY_U), KEY(6, 1, KEY_V), KEY(6, 2, KEY_W), KEY(6, 5, KEY_X),
++ KEY(7, 1, KEY_Y), KEY(7, 2, KEY_Z),
++
++ KEY(4, 4, KEY_0), KEY(1, 3, KEY_1), KEY(4, 1, KEY_2), KEY(1, 4, KEY_3),
++ KEY(2, 3, KEY_4), KEY(4, 2, KEY_5), KEY(2, 4, KEY_6), KEY(3, 3, KEY_7),
++ KEY(4, 3, KEY_8), KEY(3, 4, KEY_9),
++
++ KEY(4, 5, KEY_SPACE),
++ KEY(5, 3, KEY_KPASTERISK), /* * */
++ KEY(5, 4, KEY_KPDOT), /* #" */
++
++ KEY(0, 7, KEY_UP),
++ KEY(1, 7, KEY_DOWN),
++ KEY(2, 7, KEY_LEFT),
++ KEY(3, 7, KEY_RIGHT),
++ KEY(2, 6, KEY_HOME),
++ KEY(3, 6, KEY_END),
++ KEY(6, 4, KEY_DELETE),
++ KEY(6, 6, KEY_BACK),
++ KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */
++
++ KEY(4, 6, KEY_ENTER), /* scroll push */
++ KEY(5, 7, KEY_ENTER), /* keypad action */
++
++ KEY(0, 4, KEY_EMAIL),
++ KEY(5, 6, KEY_SEND),
++ KEY(4, 0, KEY_CALENDAR),
++ KEY(7, 6, KEY_RECORD),
++ KEY(6, 7, KEY_VOLUMEUP),
++ KEY(7, 7, KEY_VOLUMEDOWN),
++
++ KEY(0, 6, KEY_F22), /* soft1 */
++ KEY(1, 6, KEY_F23), /* soft2 */
++ KEY(0, 3, KEY_AUX), /* contact */
++};
++
++static struct pxa27x_keypad_platform_data zylonite_keypad_info = {
++ .matrix_key_rows = 8,
++ .matrix_key_cols = 8,
++ .matrix_key_map = zylonite_matrix_key_map,
++ .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map),
++
++ .enable_rotary0 = 1,
++ .rotary0_up_key = KEY_UP,
++ .rotary0_down_key = KEY_DOWN,
++
++ .debounce_interval = 30,
++};
++
++static void __init zylonite_init_keypad(void)
++{
++ pxa_set_keypad_info(&zylonite_keypad_info);
++}
++#else
++static inline void zylonite_init_keypad(void) {}
++#endif
++
++
+ static void __init zylonite_init(void)
+ {
+ /* board-processor specific initialization */
+@@ -190,6 +257,7 @@
+ platform_device_register(&touch_device);
+
+ zylonite_init_lcd();
++ zylonite_init_keypad();
+ }
+
+ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/devices.h
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/devices.h 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/devices.h 2008-02-18 01:43:28.000000000 +0100
+@@ -12,3 +12,4 @@
+
+ extern struct platform_device pxa27x_device_i2c_power;
+ extern struct platform_device pxa27x_device_ohci;
++extern struct platform_device pxa27x_device_keypad;
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/generic.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/generic.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/generic.c 2008-02-18 01:43:28.000000000 +0100
+@@ -450,3 +450,34 @@
+ .name = "sa1100-rtc",
+ .id = -1,
+ };
++
++static struct resource pxa27x_resource_keypad[] = {
++ [0] = {
++ .start = 0x41500000,
++ .end = 0x4150004c,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_KEYPAD,
++ .end = IRQ_KEYPAD,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device pxa27x_device_keypad = {
++ .name = "pxa27x-keypad",
++ .id = -1,
++ .resource = pxa27x_resource_keypad,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
++};
++
++void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
++{
++ int ret;
++
++ pxa27x_device_keypad.dev.platform_data = info;
++
++ ret = platform_device_register(&pxa27x_device_keypad);
++ if (ret)
++ dev_err(&pxa27x_device_keypad.dev, "unable to register device: %d\n", ret);
++}
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa27x.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa27x.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa27x.c 2008-02-18 01:43:28.000000000 +0100
+@@ -148,7 +148,7 @@
+
+ INIT_CKEN("USBCLK", USB, 48000000, 0, &pxa27x_device_ohci.dev),
+ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
+
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa3xx.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa3xx.c 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa3xx.c 2008-02-19 01:32:40.000000000 +0100
+@@ -159,6 +159,7 @@
+ static struct clk pxa3xx_clks[] = {
+ INIT_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
+ INIT_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
++ INIT_CK("KBDCLK", KEYPAD, &clk_pxa3xx_hsio_ops, &pxa27x_device_keypad.dev),
+
+ INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+ INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+Index: linux-2.6.23-z-input/include/asm-arm/arch-pxa/irqs.h
+===================================================================
+--- linux-2.6.23-z-input.orig/include/asm-arm/arch-pxa/irqs.h 2008-02-18 01:43:28.000000000 +0100
++++ linux-2.6.23-z-input/include/asm-arm/arch-pxa/irqs.h 2008-02-18 01:43:28.000000000 +0100
+@@ -13,7 +13,7 @@
+
+ #define PXA_IRQ(x) (x)
+
+-#ifdef CONFIG_PXA27x
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+ #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
+ #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
+ #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
+Index: linux-2.6.23-z-input/arch/arm/mach-pxa/pxa300.c
+===================================================================
+--- linux-2.6.23-z-input.orig/arch/arm/mach-pxa/pxa300.c 2008-02-19 01:33:58.000000000 +0100
++++ linux-2.6.23-z-input/arch/arm/mach-pxa/pxa300.c 2008-02-19 01:34:35.000000000 +0100
+@@ -23,8 +23,10 @@
+
+ MFP_ADDR_X(GPIO0, GPIO2, 0x00b4),
+ MFP_ADDR_X(GPIO3, GPIO26, 0x027c),
+- MFP_ADDR_X(GPIO27, GPIO127, 0x0400),
+- MFP_ADDR_X(GPIO0_2, GPIO6_2, 0x02ec),
++ MFP_ADDR_X(GPIO27, GPIO98, 0x0400),
++ MFP_ADDR_X(GPIO99, GPIO127, 0x0600),
++ MFP_ADDR_X(GPIO0_2, GPIO1_2, 0x0674),
++ MFP_ADDR_X(GPIO2_2, GPIO6_2, 0x02dc),
+
+ MFP_ADDR(nBE0, 0x0204),
+ MFP_ADDR(nBE1, 0x0208),
diff --git a/recipes/linux/linux-kexecboot-2.6.26/zylonite_mtd-r0.patch b/recipes/linux/linux-kexecboot-2.6.26/zylonite_mtd-r0.patch
new file mode 100644
index 0000000000..cb5a9c5f72
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/zylonite_mtd-r0.patch
@@ -0,0 +1,4093 @@
+Gross hacks to make the Zylonite boot from flash in VGA.
+
+Flash driver forward ported to 2.6.14
+
+Index: linux-2.6.23/drivers/mtd/nand/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/mtd/nand/Kconfig 2007-10-09 21:31:38.000000000 +0100
++++ linux-2.6.23/drivers/mtd/nand/Kconfig 2008-02-13 00:59:45.000000000 +0000
+@@ -223,6 +223,10 @@
+ tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
+ depends on ARCH_PXA
+
++config MTD_NAND_ZYLONITE
++ tristate "Support for NAND Flash on Zylonite"
++ depends on ARCH_PXA
++
+ config MTD_NAND_BASLER_EXCITE
+ tristate "Support for NAND Flash on Basler eXcite"
+ depends on BASLER_EXCITE
+Index: linux-2.6.23/drivers/mtd/nand/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/mtd/nand/Makefile 2007-10-09 21:31:38.000000000 +0100
++++ linux-2.6.23/drivers/mtd/nand/Makefile 2008-02-13 00:59:45.000000000 +0000
+@@ -19,6 +19,7 @@
+ obj-$(CONFIG_MTD_NAND_H1900) += h1910.o
+ obj-$(CONFIG_MTD_NAND_RTC_FROM4) += rtc_from4.o
+ obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
++obj-$(CONFIG_MTD_NAND_ZYLONITE) += mhn_nand.o
+ obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o
+ obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
+ obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
+Index: linux-2.6.23/drivers/mtd/nand/mhn_nand.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/mtd/nand/mhn_nand.c 2008-02-13 00:59:45.000000000 +0000
+@@ -0,0 +1,3869 @@
++/*
++ * drivers/mtd/nand/mhn_nand.c
++ *
++ * Copyright (C) 2005 Intel Coporation (chao.xie@intel.com)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Overview:
++ * This is a device driver for the NAND flash device on zylonite board
++ * which utilizes the Samsung K9K1216Q0C parts. This is a 64Mibit NAND
++ * flash device.
++
++ *(C) Copyright 2006 Marvell International Ltd.
++ * All Rights Reserved
++ */
++
++#include <linux/slab.h>
++#include <linux/module.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
++#include <linux/interrupt.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/dma-mapping.h>
++#include <asm/hardware.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/delay.h>
++#include <asm/dma.h>
++#include <asm/arch/mfp.h>
++//#include <asm/arch/cpu-freq-voltage-mhn.h>
++
++//#define NDCR 0xf0000000
++//#define NDCR (*((volatile u32 *)0xf0000000))
++//#define NDCR __REG_2(0x43100000) /* Data Flash Control register */
++#define NDCR_SPARE_EN (0x1<<31)
++#define NDCR_ECC_EN (0x1<<30)
++#define NDCR_DMA_EN (0x1<<29)
++#define NDCR_ND_RUN (0x1<<28)
++#define NDCR_DWIDTH_C (0x1<<27)
++#define NDCR_DWIDTH_M (0x1<<26)
++#define NDCR_PAGE_SZ (0x1<<24)
++#define NDCR_NCSX (0x1<<23)
++#define NDCR_ND_MODE (0x3<<21)
++#define NDCR_NAND_MODE 0x0
++#define NDCR_CLR_PG_CNT (0x1<<20)
++#define NDCR_CLR_ECC ( 0x1<<19)
++#define NDCR_RD_ID_CNT_MASK (0x7<<16)
++#define NDCR_RD_ID_CNT(x) (((x) << 16) & NDCR_RD_ID_CNT_MASK)
++#define NDCR_RA_START (0x1<<15)
++#define NDCR_PG_PER_BLK (0x1<<14)
++#define NDCR_ND_ARB_EN (0x1<<12)
++
++//#define NDSR (*((volatile u32 *)0xf0000014))
++//#define NDSR __REG_2(0x43100014) /* Data Controller Status Register */
++#define NDSR_RDY (0x1<<11)
++#define NDSR_CS0_PAGED (0x1<<10)
++#define NDSR_CS1_PAGED (0x1<<9)
++#define NDSR_CS0_CMDD (0x1<<8)
++#define NDSR_CS1_CMDD (0x1<<7)
++#define NDSR_CS0_BBD (0x1<<6)
++#define NDSR_CS1_BBD (0x1<<5)
++#define NDSR_DBERR (0x1<<4)
++#define NDSR_SBERR (0x1<<3)
++#define NDSR_WRDREQ (0x1<<2)
++#define NDSR_RDDREQ (0x1<<1)
++#define NDSR_WRCMDREQ (0x1)
++
++#define OSCR __REG(0x40A00010) /* OS Timer Counter Register */
++//#define NDCB0 __REG_2(0x43100048) /* Data Controller Command Buffer0 */
++//#define NDCB1 __REG_2(0x4310004C) /* Data Controller Command Buffer1 */
++//#define NDCB2 __REG_2(0x43100050) /* Data Controller Command Buffer2 */
++#define NDCB0_AUTO_RS (0x1<<25)
++#define NDCB0_CSEL (0x1<<24)
++#define NDCB0_CMD_TYPE_MASK (0x7<<21)
++#define NDCB0_CMD_TYPE(x) (((x) << 21) & NDCB0_CMD_TYPE_MASK)
++#define NDCB0_NC (0x1<<20)
++#define NDCB0_DBC (0x1<<19)
++#define NDCB0_ADDR_CYC_MASK (0x7<<16)
++#define NDCB0_ADDR_CYC(x) (((x) << 16) & NDCB0_ADDR_CYC_MASK)
++#define NDCB0_CMD2_MASK (0xff<<8)
++#define NDCB0_CMD1_MASK (0xff)
++#define NDCB0_ADDR_CYC_SHIFT (16)
++#define DCMD0 __REG(0x4000020c) /* DMA Command Address Register Channel 0 */
++#define DCMD1 __REG(0x4000021c) /* DMA Command Address Register Channel 1 */
++#define DCMD2 __REG(0x4000022c) /* DMA Command Address Register Channel 2 */
++#define DCMD3 __REG(0x4000023c) /* DMA Command Address Register Channel 3 */
++#define DCMD4 __REG(0x4000024c) /* DMA Command Address Register Channel 4 */
++#define DCMD5 __REG(0x4000025c) /* DMA Command Address Register Channel 5 */
++#define DCMD6 __REG(0x4000026c) /* DMA Command Address Register Channel 6 */
++#define DCMD7 __REG(0x4000027c) /* DMA Command Address Register Channel 7 */
++#define DCMD8 __REG(0x4000028c) /* DMA Command Address Register Channel 8 */
++#define DCMD9 __REG(0x4000029c) /* DMA Command Address Register Channel 9 */
++#define DCMD10 __REG(0x400002ac) /* DMA Command Address Register Channel 10 */
++#define DCMD11 __REG(0x400002bc) /* DMA Command Address Register Channel 11 */
++#define DCMD12 __REG(0x400002cc) /* DMA Command Address Register Channel 12 */
++#define DCMD13 __REG(0x400002dc) /* DMA Command Address Register Channel 13 */
++#define DCMD14 __REG(0x400002ec) /* DMA Command Address Register Channel 14 */
++#define DCMD15 __REG(0x400002fc) /* DMA Command Address Register Channel 15 */
++#define DCMD(x) __REG2(0x4000020c, (x) << 4)
++#define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */
++#define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */
++#define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */
++#define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */
++#define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
++#define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */
++#define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */
++#define DCMD_BURST8 (1 << 16) /* 8 byte burst */
++#define DCMD_BURST16 (2 << 16) /* 16 byte burst */
++#define DCMD_BURST32 (3 << 16) /* 32 byte burst */
++#define DCMD_WIDTH1 (1 << 14) /* 1 byte width */
++#define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */
++#define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */
++#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
++#define DCMD_RXPCDR (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
++#define DCMD_RXMCDR (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
++#define DCMD_TXPCDR (DCMD_INCSRCADDR|DCMD_FLOWTRG|DCMD_BURST32|DCMD_WIDTH4)
++#define DRCMR(n) __REG2(0x40000100, (n)<<2)
++#define DRCMR97 __REG(0x40001184) /* Request to Channel Map Register for NAND interface data transmit & receive Request */
++#define DRCMR98 __REG(0x40001188) /* Reserved */
++#define DRCMR99 __REG(0x4000118C) /* Request to Channel Map Register for NAND interface command transmit Request */
++#define DRCMRRXSADR DRCMR2
++#define DRCMRTXSADR DRCMR3
++#define DRCMRRXBTRBR DRCMR4
++#define DRCMRTXBTTHR DRCMR5
++#define DRCMRRXFFRBR DRCMR6
++#define DRCMRTXFFTHR DRCMR7
++#define DRCMRRXMCDR DRCMR8
++#define DRCMRRXMODR DRCMR9
++#define DRCMRTXMODR DRCMR10
++#define DRCMRRXPCDR DRCMR11
++#define DRCMRTXPCDR DRCMR12
++#define DRCMRRXSSDR DRCMR13
++#define DRCMRTXSSDR DRCMR14
++#define DRCMRRXICDR DRCMR17
++#define DRCMRTXICDR DRCMR18
++#define DRCMRRXSTRBR DRCMR19
++#define DRCMRTXSTTHR DRCMR20
++#define DRCMRRXMMC DRCMR21
++#define DRCMRTXMMC DRCMR22
++#define DRCMRRXMMC2 DRCMR93
++#define DRCMRTXMMC2 DRCMR94
++#define DRCMRRXMMC3 DRCMR100
++#define DRCMRTXMMC3 DRCMR101
++#define DRCMRUDC(x) DRCMR((x) + 24)
++#define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */
++#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
++#define DCSR0 __REG(0x40000000) /* DMA Control / Status Register for Channel 0 */
++#define DCSR1 __REG(0x40000004) /* DMA Control / Status Register for Channel 1 */
++#define DCSR2 __REG(0x40000008) /* DMA Control / Status Register for Channel 2 */
++#define DCSR3 __REG(0x4000000c) /* DMA Control / Status Register for Channel 3 */
++#define DCSR4 __REG(0x40000010) /* DMA Control / Status Register for Channel 4 */
++#define DCSR5 __REG(0x40000014) /* DMA Control / Status Register for Channel 5 */
++#define DCSR6 __REG(0x40000018) /* DMA Control / Status Register for Channel 6 */
++#define DCSR7 __REG(0x4000001c) /* DMA Control / Status Register for Channel 7 */
++#define DCSR8 __REG(0x40000020) /* DMA Control / Status Register for Channel 8 */
++#define DCSR9 __REG(0x40000024) /* DMA Control / Status Register for Channel 9 */
++#define DCSR10 __REG(0x40000028) /* DMA Control / Status Register for Channel 10 */
++#define DCSR11 __REG(0x4000002c) /* DMA Control / Status Register for Channel 11 */
++#define DCSR12 __REG(0x40000030) /* DMA Control / Status Register for Channel 12 */
++#define DCSR13 __REG(0x40000034) /* DMA Control / Status Register for Channel 13 */
++#define DCSR14 __REG(0x40000038) /* DMA Control / Status Register for Channel 14 */
++#define DCSR15 __REG(0x4000003c) /* DMA Control / Status Register for Channel 15 */
++#define DCSR16 __REG(0x40000040) /* DMA Control / Status Register for Channel 16 */
++#define DCSR17 __REG(0x40000044) /* DMA Control / Status Register for Channel 17 */
++#define DCSR18 __REG(0x40000048) /* DMA Control / Status Register for Channel 18 */
++#define DCSR19 __REG(0x4000004c) /* DMA Control / Status Register for Channel 19 */
++#define DCSR20 __REG(0x40000050) /* DMA Control / Status Register for Channel 20 */
++#define DCSR21 __REG(0x40000054) /* DMA Control / Status Register for Channel 21 */
++#define DCSR22 __REG(0x40000058) /* DMA Control / Status Register for Channel 22 */
++#define DCSR23 __REG(0x4000005c) /* DMA Control / Status Register for Channel 23 */
++#define DCSR24 __REG(0x40000060) /* DMA Control / Status Register for Channel 24 */
++#define DCSR25 __REG(0x40000064) /* DMA Control / Status Register for Channel 25 */
++#define DCSR26 __REG(0x40000068) /* DMA Control / Status Register for Channel 26 */
++#define DCSR27 __REG(0x4000006c) /* DMA Control / Status Register for Channel 27 */
++#define DCSR28 __REG(0x40000070) /* DMA Control / Status Register for Channel 28 */
++#define DCSR29 __REG(0x40000074) /* DMA Control / Status Register for Channel 29 */
++#define DCSR30 __REG(0x40000078) /* DMA Control / Status Register for Channel 30 */
++#define DCSR31 __REG(0x4000007c) /* DMA Control / Status Register for Channel 31 */
++#define DCSR(x) __REG2(0x40000000, (x) << 2)
++#define DCSR_RUN (1 << 31) /* Run Bit (read / write) */
++#define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch (read / write) */
++#define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */
++#define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */
++#define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */
++#define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */
++#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */
++#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */
++#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */
++#define DCSR_EORINTR (1 << 9) /* The end of Receive */
++#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
++#define DCSR_RASINTR (1 << 4) /* Request After Channel Stopped */
++#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
++#define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
++#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
++#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
++#define DDADR(x) __REG2(0x40000200, (x) << 4)
++//#define __REG_2(x) (*((volatile u32 *)io_p2v_2(x)))
++#define IRQ_NAND PXA_IRQ(45)
++#define CKEN_NAND 4 ///< NAND Flash Controller Clock Enable
++
++/* #define CONFIG_MTD_NAND_MONAHANS_DEBUG */
++#ifdef CONFIG_MTD_NAND_MONAHANS_DEBUG
++#define D1(x) do { \
++ printk(KERN_DEBUG "%s: ", __FUNCTION__); \
++ x; \
++ }while(0)
++
++#define DPRINTK(fmt,args...) printk(KERN_DEBUG fmt, ##args )
++#define PRINT_BUF(buf, num) print_buf(buf, num)
++#else
++#define D1(x)
++#define DPRINTK(fmt,args...)
++#define PRINT_BUF(buf, num)
++#endif
++
++/* DFC timing 0 register */
++#define DFC_TIMING_tRP 0
++#define DFC_TIMING_tRH 3
++#define DFC_TIMING_tWP 8
++#define DFC_TIMING_tWH 11
++#define DFC_TIMING_tCS 16
++#define DFC_TIMING_tCH 19
++
++/* DFC timing 1 register */
++#define DFC_TIMING_tAR 0
++#define DFC_TIMING_tWHR 4
++#define DFC_TIMING_tR 16
++
++/* max value for each timing setting in DFC */
++#define DFC_TIMING_MAX_tCH 7
++#define DFC_TIMING_MAX_tCS 7
++#define DFC_TIMING_MAX_tWH 7
++#define DFC_TIMING_MAX_tWP 7
++#define DFC_TIMING_MAX_tRH 7
++#define DFC_TIMING_MAX_tRP 7
++#define DFC_TIMING_MAX_tR 65535
++#define DFC_TIMING_MAX_tWHR 15
++#define DFC_TIMING_MAX_tAR 15
++
++/*
++ * The Data Flash Controller Flash timing structure
++ * For NAND flash used on Zylonite board(Samsung K9K1216Q0C),
++ * user should use value at end of each row of following member
++ * bracketed.
++ */
++struct dfc_flash_timing {
++ uint32_t tCH; /* Enable signal hold time */
++ uint32_t tCS; /* Enable signal setup time */
++ uint32_t tWH; /* ND_nWE high duration */
++ uint32_t tWP; /* ND_nWE pulse time */
++ uint32_t tRH; /* ND_nRE high duration */
++ uint32_t tRP; /* ND_nRE pulse width */
++ uint32_t tR; /* ND_nWE high to ND_nRE low for read */
++ uint32_t tWHR;/* ND_nWE high to ND_nRE low delay for status read */
++ uint32_t tAR; /* ND_ALE low to ND_nRE low delay */
++};
++
++/* DFC command type */
++enum {
++ DFC_CMD_READ = 0x00000000,
++ DFC_CMD_PROGRAM = 0x00200000,
++ DFC_CMD_ERASE = 0x00400000,
++ DFC_CMD_READ_ID = 0x00600000,
++ DFC_CMD_STATUS_READ = 0x00800000,
++ DFC_CMD_RESET = 0x00a00000
++};
++
++/*
++ * The Data Flash Controller Flash specification structure
++ * For NAND flash used on Zylonite board(Samsung K9K1216Q0C),
++ * user should use value at end of each row of following member
++ * bracketed.
++ */
++struct dfc_flash_info {
++ struct dfc_flash_timing timing; /* NAND Flash timing */
++
++ int enable_arbiter;/* Data flash bus arbiter enable (ND_ARB_EN) */
++ uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */
++ uint32_t row_addr_start;/* Row address start position (RA_START) */
++ uint32_t read_id_bytes; /* returned ID bytes(RD_ID_CNT) */
++ uint32_t dfc_mode; /* NAND, CARBONDALE, PIXLEY... (ND_MODE) */
++ uint32_t ncsx; /* Chip select don't care bit (NCSX) */
++ uint32_t page_size; /* Page size in bytes (PAGE_SZ) */
++ uint32_t oob_size; /* OOB size */
++ uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */
++ uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */
++ uint32_t num_blocks; /* Number of physical blocks in Flash */
++ uint32_t chip_id;
++
++ /* command codes */
++ uint32_t read1; /* Read */
++ uint32_t read2; /* unused, DFC don't support yet */
++ uint32_t program; /* two cycle command */
++ uint32_t read_status;
++ uint32_t read_id;
++ uint32_t erase; /* two cycle command */
++ uint32_t reset;
++ uint32_t lock; /* lock whole flash */
++ uint32_t unlock; /* two cycle command, supporting partial unlock */
++ uint32_t lock_status; /* read block lock status */
++
++ /* addr2ndcb1 - encode address cycles into register NDCB1 */
++ /* ndbbr2addr - convert register NDBBR to bad block address */
++ int (*addr2ndcb1)(uint16_t cmd, uint32_t addr, uint32_t *p);
++ int (*ndbbr2addr)(uint16_t cmd, uint32_t ndbbr,uint32_t *p);
++};
++
++enum {
++ DFC_FLASH_NULL = 0 ,
++ DFC_FLASH_Samsung_512Mb_X_16 = 1,
++ DFC_FLASH_Micron_1Gb_X_8 = 2,
++ DFC_FLASH_Micron_1Gb_X_16 = 3,
++ DFC_FLASH_STM_1Gb_X_16 = 4,
++ DFC_FLASH_STM_2Gb_X_16 = 5,
++ DFC_FLASH_END,
++};
++
++static int dfc_get_flash_info(int type, struct dfc_flash_info **flash_info);
++
++#define DFC_NDCR 0
++#define DFC_NDTR0CS0 1
++#define DFC_NDTR1CS0 3
++#define DFC_NDSR 5
++#define DFC_NDPCR 6
++#define DFC_NDBDR0 7
++#define DFC_NDBDR1 8
++#define DFC_NDDB 16
++#define DFC_NDCB0 18
++#define DFC_NDCB1 19
++#define DFC_NDCB2 20
++
++/* The Data Flash Controller Mode structure */
++struct dfc_mode {
++ int enable_dma; /* DMA, or nonDMA mode */
++ int enable_ecc; /* ECC on/off */
++ int enable_spare; /* Spare enable */
++ int chip_select; /* CS0 or CS1 */
++};
++
++/* The Data Flash Controller Context structure */
++struct dfc_context {
++ unsigned char __iomem *membase; /* DFC register base */
++ struct dfc_mode *dfc_mode; /* DFC mode */
++ int data_dma_ch; /* Data DMA channel number */
++ int cmd_dma_ch; /* CMD DMA channel number */
++ struct dfc_flash_info *flash_info; /* Flash Spec */
++ struct mtd_info *mtd;
++};
++
++#define NDCB0_DMA_ADDR 0x43100048
++#define NDDB_DMA_ADDR 0x43100040
++
++#define NDSR_MASK 0xFFF
++
++/* The following data is a rough evaluation */
++
++/* microsecond, for readID/readStatus/reset */
++#define NAND_OTHER_TIMEOUT 10
++/* microsecond, for readID/readStatus/reset */
++#define NAND_CMD_TIMEOUT 10
++
++#define BBT_BLOCK_BAD 0x03
++#define BBT_BLOCK_GOOD 0x00
++#define BBT_BLOCK_REV1 0x01
++#define BBT_BLOCK_REV2 0x02
++
++#define BUFLEN (2048 + 64)
++
++/*
++ * DFC data size enumeration transfered from/to controller,
++ * including padding (zero)to be a multiple of 32.
++ */
++enum {
++ DFC_DATA_SIZE_STATUS = 8, /* ReadStatus/ReadBlockLockStatus */
++ DFC_DATA_SIZE_ID = 7, /* ReadID */
++
++ DFC_DATA_SIZE_32 = 32,
++ DFC_DATA_SIZE_512 = 512, /* R/W disabling spare area */
++ DFC_DATA_SIZE_520 = 520, /* Spare=1, ECC=1 */
++ DFC_DATA_SIZE_528 = 528, /* Spare=1, ECC=0 */
++ DFC_DATA_SIZE_544 = 544, /* R/W enabling spare area.(DMA mode)*/
++
++ DFC_DATA_SIZE_64 = 64,
++ DFC_DATA_SIZE_2048 = 2048, /* R/W disabling spare area */
++ DFC_DATA_SIZE_2088 = 2088, /* R/W enabling spare area with ecc */
++ DFC_DATA_SIZE_2112 = 2112, /* R/W enabling spare area without ecc*/
++ DFC_DATA_SIZE_2096 = 2096, /* R/W enabling spare area */
++ DFC_DATA_SIZE_UNUSED = 0xFFFF
++};
++
++/* DFC padding size enumeration transfered from/to controller */
++enum {
++ /*
++ * ReadStatus/ReadBlockLockStatus/ReadID/
++ * Read/Program disabling spare area(Both 512 and 2048)
++ * Read/Program enabling spare area, disabling ECC
++ */
++ DFC_PADDING_SIZE_0 = 0,
++
++ /* Read/program with SPARE_EN=1, ECC_EN=0, pgSize=512 */
++ DFC_PADDING_SIZE_16 = 16,
++ /* for read/program with SPARE_EN=1, ECC_EN=1, pgSize=512 and 2048 */
++ DFC_PADDING_SIZE_24 = 24,
++ DFC_PADDING_SIZE_UNUSED = 0xFFFF
++};
++
++static unsigned int flash_config = DFC_FLASH_NULL;
++
++void dfc_set_timing(struct dfc_context *context, struct dfc_flash_timing *t);
++void dfc_set_dma(struct dfc_context *context);
++void dfc_set_ecc(struct dfc_context *context);
++void dfc_set_spare(struct dfc_context *context);
++
++int dfc_get_pattern(struct dfc_context *context, uint16_t cmd,
++ int *data_size, int *padding);
++
++static int dfc_wait_event(struct dfc_context *context, uint32_t event,
++ uint32_t *event_out, uint32_t timeout, int enable_int);
++
++int dfc_send_cmd(struct dfc_context *context, uint16_t cmd,
++ uint32_t addr, int num_pages);
++
++void dfc_stop(struct dfc_context *context);
++void dfc_read_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size);
++void dfc_write_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size);
++
++void dfc_read_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes);
++void dfc_write_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes);
++
++void dfc_read_badblock_addr(struct dfc_context *context, uint32_t *bbaddr);
++
++void dfc_clear_int(struct dfc_context *context, uint32_t int_mask);
++void dfc_enable_int(struct dfc_context *context, uint32_t int_mask);
++void dfc_disable_int(struct dfc_context *context, uint32_t int_mask);
++
++/* high level primitives */
++int dfc_init(struct dfc_context *context, int type);
++int dfc_init_no_gpio(struct dfc_context *context, int type);
++
++int dfc_reset_flash(struct dfc_context *context);
++
++int dfc_setup_cmd_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t addr, int num_pages,
++ uint32_t *buf, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc);
++
++int dfc_setup_data_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc);
++
++void dfc_start_cmd_dma(struct dfc_context *context,
++ struct pxa_dma_desc *dma_desc);
++void dfc_start_data_dma(struct dfc_context *context,
++ struct pxa_dma_desc *dma_desc);
++static int monahans_df_dev_ready(struct mtd_info *mtd);
++
++#ifdef CONFIG_DVFM
++static int mhn_nand_dvfm_notifier(unsigned cmd, void *client_data, void *info);
++static struct mhn_fv_notifier dvfm_notifier = {
++ .name = "monahans-nand-flash",
++ .priority = 0,
++ .notifier_call = mhn_nand_dvfm_notifier,
++};
++#endif
++
++static unsigned short search_rel_block(int block, struct mtd_info *mtd);
++
++/*****************************************************************************
++ * The DFC registers read/write routines
++ *****************************************************************************/
++static inline void dfc_write(struct dfc_context *context, int offset,
++ unsigned long value)
++{
++ offset <<= 2;
++ writel(value, context->membase + offset);
++}
++
++static inline unsigned int dfc_read(struct dfc_context *context, int offset)
++{
++ offset <<= 2;
++ return __raw_readl(context->membase + offset);
++}
++
++/****************************************************************************
++ * Flash Information
++ ***************************************************************************/
++
++static int Samsung512MbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Samsung512MbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info samsung512MbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 0, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 40, /* tWP, ND_nWE pulse time */
++ .tRH = 30, /* tRH, ND_nRE high duration */
++ .tRP = 40, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 11123,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 110,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 32, /* Pages per block */
++ .row_addr_start = 0, /* Second cycle start, Row address start position */
++ .read_id_bytes = 2, /* 2 bytes, returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 512, /* Page size in bytes */
++ .oob_size = 16, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 4096, /* Number of physical blocks in Flash */
++ .chip_id = 0x46ec,
++
++ /* command codes */
++ .read1 = 0x0000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Samsung512MbX16Addr2NDCB1,
++ .ndbbr2addr = Samsung512MbX16NDBBR2Addr,
++};
++
++static int Samsung512MbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++
++ if (addr >= 0x4000000) return -EINVAL;
++
++ if (cmd == samsung512MbX16.read1 || cmd == samsung512MbX16.program) {
++ ndcb1 = (addr & 0xFF) | ((addr >> 1) & 0x01FFFF00);
++ } else if (cmd == samsung512MbX16.erase) {
++ ndcb1 = ((addr >> 9) & 0x00FFFFFF);
++ }
++
++ *p = ndcb1;
++ return 0;
++
++}
++
++static int Samsung512MbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ *p = ndbbr << 9;
++ return 0;
++}
++
++static int Micron1GbX8Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Micron1GbX8NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info micron1GbX8 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 25, /* tCS, Enable signal setup time */
++ .tWH = 15, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 15, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 8, /* Width of Flash memory */
++ .dfc_width = 8, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xa12c,
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Micron1GbX8Addr2NDCB1,
++ .ndbbr2addr = Micron1GbX8NDBBR2Addr,
++};
++
++static int Micron1GbX8Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / micron1GbX8.page_size;
++ addr = (page / micron1GbX8.page_per_block) << 18 |
++ (page % micron1GbX8.page_per_block) << 12;
++
++ if (cmd == micron1GbX8.read1 || cmd == micron1GbX8.program) {
++ ndcb1 = (addr & 0xFFF) | ((addr << 4) & 0xFFFF0000);
++ }
++ else if (cmd == micron1GbX8.erase) {
++ ndcb1 = ((addr >> 18) << 6) & 0xFFFF;
++ }
++
++ *p = ndcb1;
++ return 0;
++}
++
++static int Micron1GbX8NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == micron1GbX8.read1 || cmd == micron1GbX8.program) {
++ *p = ((ndbbr & 0xF) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == micron1GbX8.erase) {
++ *p = (ndbbr >> 6) << 18;
++ }
++
++
++ return 0;
++}
++
++
++static int Micron1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int Micron1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info micron1GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 25, /* tCS, Enable signal setup time */
++ .tWH = 15, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 15, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xb12c,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = Micron1GbX16Addr2NDCB1,
++ .ndbbr2addr = Micron1GbX16NDBBR2Addr,
++};
++
++static int Micron1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / micron1GbX16.page_size;
++ addr = (page / micron1GbX16.page_per_block) << 17 |
++ (page % micron1GbX16.page_per_block) << 11;
++
++ if (cmd == micron1GbX16.read1 || cmd == micron1GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == micron1GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int Micron1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == micron1GbX16.read1 || cmd == micron1GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == micron1GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static int STM1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int STM1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info stm1GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 10, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 20, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 1024, /* Number of physical blocks in Flash */
++ .chip_id = 0xb120,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = STM1GbX16Addr2NDCB1,
++ .ndbbr2addr = STM1GbX16NDBBR2Addr,
++};
++
++static int STM1GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / stm1GbX16.page_size;
++ addr = (page / stm1GbX16.page_per_block) << 17 |
++ (page % stm1GbX16.page_per_block) << 11;
++
++ if (cmd == stm1GbX16.read1 || cmd == stm1GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == stm1GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int STM1GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == stm1GbX16.read1 || cmd == stm1GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == stm1GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static int STM2GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p);
++static int STM2GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p);
++
++static struct dfc_flash_info stm2GbX16 =
++{
++ .timing = {
++ .tCH = 10, /* tCH, Enable signal hold time */
++ .tCS = 10, /* tCS, Enable signal setup time */
++ .tWH = 20, /* tWH, ND_nWE high duration */
++ .tWP = 25, /* tWP, ND_nWE pulse time */
++ .tRH = 20, /* tRH, ND_nRE high duration */
++ .tRP = 25, /* tRP, ND_nRE pulse width */
++ /* tR = tR+tRR+tWB+1, ND_nWE high to ND_nRE low for read */
++ .tR = 25000,
++ /* tWHR, ND_nWE high to ND_nRE low delay for status read */
++ .tWHR = 60,
++ .tAR = 10, /* tAR, ND_ALE low to ND_nRE low delay */
++ },
++ .enable_arbiter = 1, /* Data flash bus arbiter enable */
++ .page_per_block = 64, /* Pages per block */
++ .row_addr_start = 1, /* Second cycle start, Row address start position */
++ .read_id_bytes = 4, /* Returned ID bytes */
++ .dfc_mode = 0, /* NAND mode */
++ .ncsx = 0,
++ .page_size = 2048, /* Page size in bytes */
++ .oob_size = 64, /* OOB size in bytes */
++ .flash_width = 16, /* Width of Flash memory */
++ .dfc_width = 16, /* Width of flash controller */
++ .num_blocks = 2048, /* Number of physical blocks in Flash */
++ .chip_id = 0xca20,
++
++ /* command codes */
++ .read1 = 0x3000, /* Read */
++ .read2 = 0x0050, /* Read1 unused, current DFC don't support */
++ .program = 0x1080, /* Write, two cycle command */
++ .read_status = 0x0070, /* Read status */
++ .read_id = 0x0090, /* Read ID */
++ .erase = 0xD060, /* Erase, two cycle command */
++ .reset = 0x00FF, /* Reset */
++ .lock = 0x002A, /* Lock whole flash */
++ .unlock = 0x2423, /* Unlock, two cycle command, supporting partial unlock */
++ .lock_status = 0x007A, /* Read block lock status */
++ .addr2ndcb1 = STM2GbX16Addr2NDCB1,
++ .ndbbr2addr = STM2GbX16NDBBR2Addr,
++};
++
++static int STM2GbX16Addr2NDCB1(uint16_t cmd, uint32_t addr, uint32_t *p)
++{
++ uint32_t ndcb1 = 0;
++ uint32_t page;
++
++ if (addr >= 0x8000000)
++ return -EINVAL;
++ page = addr / stm2GbX16.page_size;
++ addr = (page / stm2GbX16.page_per_block) << 17 |
++ (page % stm2GbX16.page_per_block) << 11;
++
++ if (cmd == stm2GbX16.read1 || cmd == stm2GbX16.program) {
++ ndcb1 = (addr & 0x7FF) | ((addr << 5) & 0xFFFF0000);
++ }
++ else if (cmd == stm2GbX16.erase) {
++ ndcb1 = ((addr >> 17) << 6) & 0xFFFF;
++ }
++ *p = ndcb1;
++ return 0;
++}
++
++static int STM2GbX16NDBBR2Addr(uint16_t cmd, uint32_t ndbbr, uint32_t *p)
++{
++ if (cmd == stm2GbX16.read1 || cmd == stm2GbX16.program) {
++ *p = ((ndbbr & 0x7) << 8) | ((ndbbr >> 8) << 16);
++ }
++ else if (cmd == stm2GbX16.erase) {
++ *p = (ndbbr >> 6) << 17;
++ }
++
++ return 0;
++}
++
++static struct {
++ int type;
++ struct dfc_flash_info *flash_info;
++} type_info[] = {
++ { DFC_FLASH_Samsung_512Mb_X_16, &samsung512MbX16},
++ { DFC_FLASH_Micron_1Gb_X_8, &micron1GbX8},
++ { DFC_FLASH_Micron_1Gb_X_16, &micron1GbX16},
++ { DFC_FLASH_STM_1Gb_X_16, &stm1GbX16},
++ { DFC_FLASH_STM_2Gb_X_16, &stm2GbX16},
++ { DFC_FLASH_NULL, NULL},
++};
++
++int dfc_get_flash_info(int type, struct dfc_flash_info **flash_info)
++{
++ uint32_t i = 0;
++
++ while(type_info[i].type != DFC_FLASH_NULL) {
++ if (type_info[i].type == type) {
++ *flash_info = type_info[i].flash_info;
++ return 0;
++ }
++ i++;
++ }
++ *flash_info = NULL;
++ return -EINVAL;
++}
++
++/******************************************************************************
++ dfc_set_timing
++
++ Description:
++ This function sets flash timing property in DFC timing register
++ according to input timing value embodied in context structure.
++ It is called once during the hardware initialization.
++ Input Parameters:
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++//#if defined(CONFIG_CPU_MONAHANS_L) || defined(CONFIG_CPU_MONAHANS_LV)
++#define DFC_CLOCK 208
++//#else
++//#define DFC_CLOCK 104
++//#endif
++#define CLOCK_NS DFC_CLOCK/1000
++
++void dfc_set_timing(struct dfc_context *context, struct dfc_flash_timing *t)
++{
++ struct dfc_flash_timing timing = *t;
++
++ uint32_t r0 = 0;
++ uint32_t r1 = 0;
++
++ /*
++ * num of clock cycles = time (ns) / one clock sycle (ns) + 1
++ * - integer division will truncate the result, so add a 1 in all cases
++ * - subtract the extra 1 cycle added to all register timing values
++ */
++ timing.tCH = min(((int) (timing.tCH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tCH);
++ timing.tCS = min(((int) (timing.tCS * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tCS);
++ timing.tWH = min(((int) (timing.tWH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWH);
++ timing.tWP = min(((int) (timing.tWP * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWP);
++ timing.tRH = min(((int) (timing.tRH * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tRH);
++ timing.tRP = min(((int) (timing.tRP * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tRP);
++
++ r0 = (timing.tCH << DFC_TIMING_tCH) |
++ (timing.tCS << DFC_TIMING_tCS) |
++ (timing.tWH << DFC_TIMING_tWH) |
++ (timing.tWP << DFC_TIMING_tWP) |
++ (timing.tRH << DFC_TIMING_tRH) |
++ (timing.tRP << DFC_TIMING_tRP);
++
++ dfc_write(context, DFC_NDTR0CS0, r0);
++
++ timing.tR = min(((int) (timing.tR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tR);
++ timing.tWHR = min(((int) (timing.tWHR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tWHR);
++ timing.tAR = min(((int) (timing.tAR * CLOCK_NS) + 1),
++ DFC_TIMING_MAX_tAR);
++
++ r1 = (timing.tR << DFC_TIMING_tR) |
++ (timing.tWHR << DFC_TIMING_tWHR) |
++ (timing.tAR << DFC_TIMING_tAR);
++
++ dfc_write(context, DFC_NDTR1CS0, r1);
++ return;
++}
++
++/******************************************************************************
++ dfc_set_dma
++
++ Description:
++ Enables or Disables DMA in line with setting in DFC mode of context
++ structure. DMA mode of DFC. Performs a read-modify-write operation that
++ only changes the driven DMA_EN bit field In DMA mode, all commands and
++ data are transferred by DMA. DMA can be enable/disable on the fly.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_dma(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_dma)
++ ndcr |= NDCR_DMA_EN;
++ else
++ ndcr &= ~NDCR_DMA_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++
++/******************************************************************************
++ dfc_set_ecc
++
++ Description:
++ This function enables or disables hardware ECC capability of DFC in line
++ with setting in DFC mode of context structure.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_ecc(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_ecc)
++ ndcr |= NDCR_ECC_EN;
++ else
++ ndcr &= ~NDCR_ECC_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_set_spare
++
++ Description:
++ This function enables or disables accesses to spare area of NAND Flash
++ through DFC in line with setting in DFC mode of context structure.
++ Input Parameters:
++ context -Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void
++dfc_set_spare(struct dfc_context* context)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ if (context->dfc_mode->enable_spare)
++ ndcr |= NDCR_SPARE_EN;
++ else
++ ndcr &= ~NDCR_SPARE_EN;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Read again to make sure write work */
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++static unsigned int get_delta (unsigned int start)
++{
++ unsigned int stop = OSCR;
++ return (stop - start);
++}
++
++static int dfc_wait_event(struct dfc_context *context, uint32_t event,
++ uint32_t *event_out, uint32_t timeout, int enable_int)
++{
++ uint32_t ndsr;
++ uint32_t to = 3 * timeout; /* 3 ticks ~ 1us */
++ int status;
++ int start = OSCR;
++
++ if (enable_int)
++ dfc_enable_int(context, event);
++
++ while (1) {
++ ndsr = dfc_read(context, DFC_NDSR);
++ ndsr &= NDSR_MASK;
++ if (ndsr & event) {
++ /* event happened */
++ *event_out = ndsr & event;
++ dfc_clear_int(context, *event_out);
++ status = 0;
++ break;
++ } else if (get_delta(start) > to) {
++ status = -ETIME;
++ break;
++ }
++ }
++
++ if (enable_int)
++ dfc_disable_int(context, event);
++ return status;
++}
++
++/******************************************************************************
++ dfc_get_pattern
++
++ Description:
++ This function is used to retrieve buffer size setting for a transaction
++ based on cmd.
++ Input Parameters:
++ context - Pointer to DFC context structure
++ cmd
++ Specifies type of command to be sent to NAND flash .The LSB of this
++ parameter defines the first command code for 2-cycles command. The
++ MSB defines the second command code for 2-cycles command. If MSB is
++ set to zero, this indicates that one cycle command
++ Output Parameters:
++ data_size
++ It is used to retrieve length of data transferred to/from DFC,
++ which includes padding bytes
++ padding
++ It is used to retrieve how many padding bytes there should be
++ in buffer of data_size.
++ Returns:
++ 0
++ If size setting is returned successfully
++ -EINVAL
++ If page size specified in flash spec of context structure is not 512 or
++ 2048;If specified command index is not read1/program/erase/reset/readID/
++ readStatus.
++*******************************************************************************/
++int dfc_get_pattern(struct dfc_context *context, uint16_t cmd,
++ int *data_size, int *padding)
++{
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++ struct dfc_flash_info * flash_info = context->flash_info;
++ uint32_t page_size = context->flash_info->page_size; /* 512 or 2048 */
++
++ if (cmd == flash_info->read1 ||
++ cmd == flash_info->program) {
++ if (512 == page_size) {
++ /* add for DMA */
++ if (dfc_mode->enable_dma) {
++ *data_size = DFC_DATA_SIZE_544;
++ if (dfc_mode->enable_ecc)
++ *padding = DFC_PADDING_SIZE_24;
++ else
++ *padding = DFC_PADDING_SIZE_16;
++ } else if (!dfc_mode->enable_spare) {
++ *data_size = DFC_DATA_SIZE_512;
++ *padding = DFC_PADDING_SIZE_0;
++ } else {
++
++ if (dfc_mode->enable_ecc)
++ *data_size = DFC_DATA_SIZE_520;
++ else
++ *data_size = DFC_DATA_SIZE_528;
++
++ *padding = DFC_PADDING_SIZE_0;
++ }
++ } else if (2048 == page_size) {
++ /* add for DMA */
++ if (dfc_mode->enable_dma) {
++ *data_size = DFC_DATA_SIZE_2112;
++ if (dfc_mode->enable_ecc)
++ *padding = DFC_PADDING_SIZE_24;
++ else
++ *padding = DFC_PADDING_SIZE_0;
++ } else if (!dfc_mode->enable_spare) {
++ *data_size = DFC_DATA_SIZE_2048;
++ *padding = DFC_PADDING_SIZE_0;
++ } else {
++
++ if (dfc_mode->enable_ecc)
++ *data_size = DFC_DATA_SIZE_2088;
++ else
++ *data_size = DFC_DATA_SIZE_2112;
++
++ *padding = DFC_PADDING_SIZE_0;
++ }
++ } else /* if the page_size is neither 512 or 2048 */
++ return -EINVAL;
++ } else if (cmd == flash_info->read_id) {
++ *data_size = DFC_DATA_SIZE_ID;
++ *padding = DFC_PADDING_SIZE_0;
++ } else if(cmd == flash_info->read_status) {
++ *data_size = DFC_DATA_SIZE_STATUS;
++ *padding = DFC_PADDING_SIZE_0;
++ } else if (cmd == flash_info->erase || cmd == flash_info->reset) {
++ *data_size = DFC_DATA_SIZE_UNUSED;
++ *padding = DFC_PADDING_SIZE_UNUSED;
++ } else
++ return -EINVAL;
++ return 0;
++}
++
++
++/******************************************************************************
++ dfc_send_cmd
++
++ Description:
++ This function configures DFC to send command through DFC to NAND flash
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ cmd
++ Specifies type of command to be sent to NAND flash .The LSB of this
++ parameter defines the first command code for 2-cycles command. The
++ MSB defines the second command code for 2-cycles command. If MSB is
++ set to zero, this indicates that one cycle command
++ addr
++ Address sent out to the flash device withthis command. For page read/
++ program commands , 4-cycles address is sent. For erase command only
++ 3-cycles address is sent. If it is equal to 0xFFFFFFFF, the address
++ should not be used.
++ num_pages
++ It specifies the number of pages of data to be transferred for
++ a program or read commands. Unused for any other commands than
++ read/program.
++
++ Output Parameters:
++ None
++ Returns:
++ 0
++ If size setting is returned successfully
++ -EINVAL
++ If specified command index is not read1/program/erase/reset/readID/
++ readStatus.
++*******************************************************************************/
++int dfc_send_cmd(struct dfc_context *context, uint16_t cmd,
++ uint32_t addr, int num_pages)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ struct dfc_mode *dfc_mode = context->dfc_mode;
++ uint8_t cmd2;
++ uint32_t event_out;
++ uint32_t ndcb0=0, ndcb1=0, ndcb2=0, ndcr;
++ int status;
++
++ /* It is a must to set ND_RUN firstly, then write command buffer
++ * If conversely,it does not work
++ */
++ dfc_write(context, DFC_NDSR, NDSR_MASK);
++
++ /* Set ND_RUN */
++ ndcr = dfc_read(context, DFC_NDCR);
++ dfc_write(context, DFC_NDCR, (ndcr | NDCR_ND_RUN));
++
++ // Wait for write command request
++ status = dfc_wait_event(context, NDSR_WRCMDREQ,
++ &event_out, NAND_CMD_TIMEOUT, 0);
++
++ if (status) /* Timeout */
++ return status;
++
++ cmd2 = (cmd>>8) & 0xFF;
++ ndcb0 = cmd | (dfc_mode->chip_select<<24) | ((cmd2?1:0)<<19);
++
++ if (cmd == flash_info->read1) {
++ if (0xFFFFFFFF != addr) {
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages - 1) << 8;
++ }
++ } else if (cmd == flash_info->program) {
++ ndcb0 |= NDCB0_CMD_TYPE(1) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ } else if (cmd == flash_info->erase) {
++ ndcb0 |= NDCB0_CMD_TYPE(2) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(3);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ } else if (cmd == flash_info->read_id) {
++ ndcb0 |= NDCB0_CMD_TYPE(3);
++ } else if(cmd == flash_info->read_status) {
++ ndcb0 |= NDCB0_CMD_TYPE(4);
++ } else if(cmd == flash_info->reset) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else if (cmd == flash_info->lock) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else
++ return -EINVAL;
++
++ /* Write to DFC command register */
++ dfc_write(context, DFC_NDCB0, ndcb0);
++ dfc_write(context, DFC_NDCB0, ndcb1);
++ dfc_write(context, DFC_NDCB0, ndcb2);
++
++ return 0;
++}
++
++/******************************************************************************
++ dfc_stop
++
++ Description:
++ This function clears ND_RUN bit of NDCR.
++ Input Parameters:
++ context--Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_stop(struct dfc_context *context)
++{
++ unsigned int ndcr;
++ ndcr = dfc_read(context, DFC_NDCR);
++ dfc_write(context, DFC_NDCR, (ndcr & ~NDCR_ND_RUN));
++ ndcr = dfc_read(context, DFC_NDCR);
++
++ return;
++}
++
++int dfc_setup_cmd_dma(struct dfc_context *context,
++ uint16_t cmd, uint32_t addr, int num_pages,
++ uint32_t *buf, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc *dma_desc)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ struct dfc_mode *dfc_mode = context->dfc_mode;
++ uint8_t cmd2;
++ uint32_t event_out;
++ uint32_t ndcb0=0, ndcb1=0, ndcb2=0, ndcr;
++ int status;
++
++ /*
++ * It is a must to set ND_RUN firstly, then write command buffer
++ * If conversely,it does not work
++ */
++ dfc_write(context, DFC_NDSR, NDSR_MASK);
++
++ /* Set ND_RUN */
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_ND_RUN;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ /* Wait for write command request */
++ status = dfc_wait_event(context, NDSR_WRCMDREQ,
++ &event_out, NAND_CMD_TIMEOUT, 0);
++
++ if (status)
++ return status; /* Timeout */
++
++ cmd2 = (cmd>>8) & 0xFF;
++ ndcb0 = cmd | (dfc_mode->chip_select<<24) | ((cmd2?1:0)<<19);
++
++ if (cmd == flash_info->read1) {
++ if (0xFFFFFFFF != addr) {
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ }
++ } else if (cmd == flash_info->program) {
++ ndcb0 |= NDCB0_CMD_TYPE(1) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(4);
++
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ ndcb2 = (num_pages-1) << 8;
++ } else if (cmd == flash_info->erase) {
++ ndcb0 |= NDCB0_CMD_TYPE(2) | NDCB0_AUTO_RS;
++ ndcb0 |= NDCB0_ADDR_CYC(3);
++
++ status = flash_info->addr2ndcb1(cmd, addr, &ndcb1);
++ if (status)
++ return status;
++ } else if (cmd == flash_info->read_id) {
++ ndcb0 |= NDCB0_CMD_TYPE(3);
++ } else if (cmd == flash_info->read_status) {
++ ndcb0 |= NDCB0_CMD_TYPE(4);
++ } else if (cmd == flash_info->reset) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else if (cmd == flash_info->lock) {
++ ndcb0 |= NDCB0_CMD_TYPE(5);
++ } else
++ return -EINVAL;
++
++ *((uint32_t *)buf) = ndcb0;
++ *((uint32_t *)buf + 1) = ndcb1;
++ *((uint32_t *)buf + 2) = ndcb2;
++
++ dma_int_en &= (DCMD_STARTIRQEN | DCMD_ENDIRQEN);
++
++ dma_desc->ddadr = next_desc_phys;
++ dma_desc->dsadr = buf_phys;
++ dma_desc->dtadr = NDCB0_DMA_ADDR;
++ dma_desc->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST16 | 12;
++ return 0;
++}
++
++int dfc_setup_data_dma(struct dfc_context* context,
++ uint16_t cmd, uint32_t buf_phys,
++ uint32_t next_desc_phys, uint32_t dma_int_en,
++ struct pxa_dma_desc* dma_desc)
++{
++ struct dfc_flash_info * flash_info = context->flash_info;
++ int data_size, padding;
++
++ dfc_get_pattern(context, cmd, &data_size, &padding);
++
++ dma_desc->ddadr = next_desc_phys;
++ dma_int_en &= (DCMD_STARTIRQEN | DCMD_ENDIRQEN);
++
++ if (cmd == flash_info->program) {
++
++ dma_desc->dsadr = buf_phys;
++ dma_desc->dtadr = NDDB_DMA_ADDR;
++ dma_desc->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST32 | data_size;
++
++ } else if (cmd == flash_info->read1 || cmd == flash_info->read_id ||
++ cmd == flash_info->read_status) {
++
++ dma_desc->dsadr = NDDB_DMA_ADDR;
++ dma_desc->dtadr = buf_phys;
++ dma_desc->dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | dma_int_en |
++ DCMD_WIDTH4 | DCMD_BURST32 | data_size;
++ }
++ else
++ return -EINVAL;
++ return 0;
++}
++
++void dfc_start_cmd_dma(struct dfc_context* context, struct pxa_dma_desc* dma_desc)
++{
++ DRCMR99 = DRCMR_MAPVLD | context->cmd_dma_ch; /* NAND CMD DRCMR */
++ DDADR(context->cmd_dma_ch) = (uint32_t)dma_desc;
++ DCSR(context->cmd_dma_ch) |= DCSR_RUN;
++}
++
++void dfc_start_data_dma(struct dfc_context* context, struct pxa_dma_desc* dma_desc)
++{
++ DRCMR97 = DRCMR_MAPVLD | context->data_dma_ch;
++ DDADR(context->data_dma_ch) = (uint32_t)dma_desc;
++ DCSR(context->data_dma_ch) |= DCSR_RUN;
++}
++
++/******************************************************************************
++ dfc_read_fifo_partial
++
++ Description:
++ This function reads data from data buffer of DFC.Bytes can be any less than
++ or equal to data_size, the left is ignored by ReadFIFO though they will be
++ read from NDDB to clear data buffer.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ Output Parameters:
++ pBuffer
++ Pointer to the data buffer where data should be placed.
++ Returns:
++ None
++*******************************************************************************/
++void dfc_read_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size)
++{
++ uint32_t data = 0;
++ uint32_t i = 0;
++ uint32_t bytes_multi;
++ uint32_t bytes_remain;
++
++
++ if (1 == data_size) {
++ data = dfc_read(context, DFC_NDDB) & 0xFF;
++ *buffer++ = (uint8_t)data;
++ } else if (2 == data_size) {
++ data = dfc_read(context, DFC_NDDB) & 0xFFFF;
++ *buffer++ = data & 0xFF;
++ *buffer++ = (data >> 8) & 0xFF;
++ } else {
++ bytes_multi = (nbytes & 0xFFFFFFFC);
++ bytes_remain = nbytes & 0x03;
++
++ i = 0;
++ /* Read the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ data = dfc_read(context, DFC_NDDB);
++ /* FIXME: we don't know whether the buffer
++ * align to 4 bytes or not. Cast the buffer
++ * to int is not safe here. Especially under
++ * gcc 4.x. Used memcpy here. But the memcpy
++ * may be not correct on BE architecture.
++ * --by Yin, Fengwei
++ */
++ memcpy(buffer, &data, sizeof(data));
++ i += sizeof(data);
++ buffer += sizeof(data);
++ }
++
++ /* Read the left bytes_remain bytes data */
++ if (bytes_remain) {
++ data = dfc_read(context, DFC_NDDB);
++ for (i = 0; i < bytes_remain; i++)
++ *buffer++ = (uint8_t)((data >> (8*i)) & 0xFF);
++ }
++
++ /* When read the remain bytes, we always read 4 bytes data
++ * to DFC. So the data_size should subtract following number.
++ */
++ data_size -= bytes_multi + (bytes_remain ? sizeof(data) : 0);
++
++ /* We need Read data_size bytes data totally */
++ while (data_size > 0) {
++ data = dfc_read(context, DFC_NDDB);
++ data_size -= sizeof(data);
++ }
++
++/*
++ while(i < ((uint32_t)data_size) ) {
++ if (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ *temp = dfc_reg->nddb;
++ } else if (i == bytes_multi && bytes_remain){
++ uint32_t j = 0;
++ data = dfc_reg->nddb;
++ while (j++ < bytes_remain) {
++ *buffer++ = (uint8_t) \
++ ((data>>(8*j)) & 0xFF);
++ }
++ } else {
++ data = dfc_reg->nddb;
++ }
++ i += 4;
++ buffer += 4;
++ }
++*/
++ }
++ return;
++}
++
++/******************************************************************************
++ dfc_write_fifo_partial
++
++ Description:
++ Write to data buffer of DFC from a buffer. Bytes can be same as
++ data_size, also can be data_size-padding, but can¡¯t be random value,
++ the left will be automatically padded by WriteFIFO.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ bytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ buffer
++ Pointer to the data buffer where data will be taken from to be written
++ to DFC data buffer
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_write_fifo_partial(struct dfc_context *context, uint8_t *buffer,
++ int nbytes, int data_size)
++{
++ uint32_t i = 0;
++
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t temp;
++ /*
++ * caller guarantee buffer contains appropriate data thereby
++ * it is impossible for nbytes not to be a multiple of 4 byte
++ */
++
++ /* Write the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = buffer[0] | buffer[1] << 8 |
++ buffer[2] << 16 | buffer[3] << 24;
++ dfc_write(context, DFC_NDDB, temp);
++ buffer += 4;
++ i += 4;
++ }
++
++ /* Write the left bytes_remain bytes data */
++ if (bytes_remain) {
++ temp = 0xFFFFFFFF;
++ for (i = 0; i < bytes_remain; i++)
++ temp &= *buffer++ << i*8;
++
++ dfc_write(context, DFC_NDDB, temp);
++ }
++
++ /* When write the remain bytes, we always write 4 bytes data
++ * to DFC. So the data_size should subtract following number.
++ */
++ data_size -= bytes_multi + (bytes_remain ? sizeof(temp) : 0);
++
++ while (data_size > 0) {
++ dfc_write(context, DFC_NDDB, 0xFFFFFFFF);
++ data_size -= 4;
++ }
++
++/*
++ while (i < ((uint32_t)data_size)) {
++ if (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ dfc_reg->nddb = *temp;
++ }
++ else if (i == bytes_multi && bytes_remain) {
++ uint32_t j = 0, data = 0xFFFFFFFF;
++ while (j < bytes_remain) {
++ data &= (uint8_t)(*buffer) << j;
++ buffer++;
++ j++;
++ }
++ dfc_reg->nddb = data;
++ }
++ else {
++ dfc_reg->nddb = 0xFFFFFFFF;
++ }
++ i += 4;
++ buffer += 4;
++ }
++*/
++
++ return;
++}
++
++/******************************************************************************
++ dfc_read_fifo
++ Description:
++ This function reads data from data buffer of DFC.Bytes can be any less
++ than or equal to data_size, the left is ignored by ReadFIFO though they
++ will be read from NDDB to clear data buffer.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ Output Parameters:
++ buffer
++ Pointer to the data buffer where data should be placed.
++ Returns:
++ None
++*******************************************************************************/
++
++void dfc_read_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes)
++{
++ uint32_t i = 0;
++
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t temp;
++
++ /* Read the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = dfc_read(context, DFC_NDDB);
++ /* FIXME: we don't know whether the buffer
++ * align to 4 bytes or not. Cast the buffer
++ * to int is not safe here. Especially under
++ * gcc 4.x. Used memcpy here. But the memcpy
++ * may be not correct on BE architecture.
++ * --by Yin, Fengwei
++ */
++ memcpy(buffer, &temp, sizeof(temp));
++ i += sizeof(temp);
++ buffer += sizeof(temp);
++ }
++
++ /* Read the left bytes_remain bytes data */
++ temp = dfc_read(context, DFC_NDDB);
++ for (i = 0; i < bytes_remain; i++) {
++ *buffer++ = (uint8_t)((temp >> (8*i)) & 0xFF);
++ }
++
++/*
++ while (i < bytes_multi) {
++ temp = (uint32_t *)buffer;
++ *temp = dfc_reg->nddb;
++ i += 4;
++ buffer += 4;
++ }
++
++ if (bytes_remain) {
++ data = dfc_reg->nddb;
++ for (i = 0; i < bytes_remain; i++) {
++ *buffer++ = (uint8_t)((data>>(8*i)) & 0xFF);
++ }
++ }
++*/
++
++ return;
++}
++
++/******************************************************************************
++ dfc_write_fifo
++ Description:
++ Write to data buffer of DFC from a buffer.Bytes can be same as data_size,
++ also can be data_size-padding, but can¡¯t be random value, the left will
++ be automatically padded by WriteFIFO.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ nbytes
++ Indicating how much data should be read into buffer.
++ data_size
++ Specifing length of data transferred to/from DFC, which includes
++ padding bytes
++ buffer
++ Pointer to the data buffer where data will be taken from to be written to
++ DFC data buffer
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_write_fifo(struct dfc_context *context, uint8_t *buffer, int nbytes)
++{
++ uint32_t bytes_multi = (nbytes & 0xFFFFFFFC);
++ uint32_t bytes_remain = nbytes & 0x03;
++ uint32_t i=0;
++ uint32_t temp;
++
++ /* Write the bytes_multi*4 bytes data */
++ while (i < bytes_multi) {
++ temp = buffer[0] | buffer[1] << 8 |
++ buffer[2] << 16 | buffer[3] << 24;
++ dfc_write(context, DFC_NDDB, temp);
++ buffer += 4;
++ i += 4;
++ }
++
++ /* Write the left bytes_remain bytes data */
++ temp = 0xFFFFFFFF;
++ for (i = 0; i < bytes_remain; i++)
++ temp &= *buffer++ << i*8;
++ dfc_write(context, DFC_NDDB, temp);
++
++/*
++ while (i < nbytes) {
++ temp = (uint32_t *)buffer;
++ dfc_reg->nddb = *temp;
++ i += 4;
++ buffer += 4;
++ }
++*/
++}
++
++/******************************************************************************
++ dfc_read_badblock_addr
++
++ Description:
++ This function reads bad block address in units of block starting from 0
++ if bad block is detected. It takes into the account if the operation is
++ for CS0 or CS1 depending on settings of chip_select parameter of DFC
++ Mode structure.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ pBadBlockAddr
++ Used to retrieve bad block address back to caller if bad block is
++ detected
++ Returns:
++ None
++*******************************************************************************/
++void dfc_read_badblock_addr(struct dfc_context *context, uint32_t *bbaddr)
++{
++ uint32_t ndbdr;
++ if (0 == context->dfc_mode->chip_select)
++ ndbdr = dfc_read(context, DFC_NDBDR0);
++ else
++ ndbdr = dfc_read(context, DFC_NDBDR1);
++
++ if (512 == context->flash_info->page_size) {
++ ndbdr = (ndbdr >> 5) & 0xFFF;
++ *bbaddr = ndbdr;
++ } else if (2048 == context->flash_info->page_size) {
++ /* 16 bits LB */
++ ndbdr = (ndbdr >> 8);
++ *bbaddr = ndbdr;
++ }
++ return;
++}
++
++/******************************************************************************
++ dfc_enable_int
++
++ Description:
++ This function is used to enable DFC interrupts. The bits in int_mask
++ will be used to unmask NDCR register to enable corresponding interrupts.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to enable
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_enable_int(struct dfc_context *context, uint32_t int_mask)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~int_mask;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_disable_int
++
++ Description:
++ This function is used to disable DFC interrupts.
++ The bits inint_mask will be used to mask NDCR register to disable
++ corresponding interrupts.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to disable
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_disable_int(struct dfc_context *context, uint32_t int_mask)
++{
++ uint32_t ndcr;
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= int_mask;
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ ndcr = dfc_read(context, DFC_NDCR);
++ return;
++}
++
++/******************************************************************************
++ dfc_clear_int
++
++ Description:
++ This function is used to disable DFC interrupts.
++ The bits in int_mask will be used to clear corresponding interrupts
++ in NDCR register
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ int_mask
++ Specifies what interrupts to clear
++ Output Parameters:
++ None
++ Returns:
++ None
++*******************************************************************************/
++void dfc_clear_int(struct dfc_context *context, uint32_t int_mask)
++{
++ dfc_write(context, DFC_NDSR, int_mask);
++
++ dfc_read(context, DFC_NDSR);
++ return;
++}
++
++/*
++ * high level primitives
++ */
++
++/******************************************************************************
++ dfc_init
++
++ Description:
++ This function does entire DFC initialization according to the NAND
++ flash type currently used with platform, including setting MFP, set
++ flash timing, set DFC mode, configuring specified flash parameters
++ in DFC, clear ECC logic and page count register.
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ if MFPRs are set correctly
++ -EINVAL
++ if specified flash is not support by check bytes per page and pages per
++ block
++******************************************************************************/
++
++static mfp_cfg_t pxa300_nand_cfg[] = {
++ /* NAND */
++ MFP_CFG_X(DF_INT_RnB, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nRE_nOE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nWE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_CLE_nOE, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nADV1_ALE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS0, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS1, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_IO0, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO1, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO2, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO3, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO4, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO5, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO6, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO7, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO8, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO9, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO10, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO11, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO12, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO13, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO14, AF1, DS08X, PULL_LOW),
++};
++
++#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
++
++int dfc_init(struct dfc_context* context, int type)
++{
++ int status;
++ struct dfc_flash_info * flash_info;
++ uint32_t ndcr = 0x00000FFF; /* disable all interrupts */
++
++ status = dfc_get_flash_info(type, &flash_info);
++ if (status)
++ return status;
++ context->flash_info = flash_info;
++
++ pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa300_nand_cfg));
++ //enable_dfc_pins();
++
++ dfc_set_timing(context, &context->flash_info->timing);
++
++ if (flash_info->enable_arbiter)
++ ndcr |= NDCR_ND_ARB_EN;
++
++ if (64 == flash_info->page_per_block)
++ ndcr |= NDCR_PG_PER_BLK;
++ else if (32 != flash_info->page_per_block)
++ return -EINVAL;
++
++ if (flash_info->row_addr_start)
++ ndcr |= NDCR_RA_START;
++
++ ndcr |= (flash_info->read_id_bytes)<<16;
++
++ ndcr |= (flash_info->dfc_mode) << 21;
++
++ if (flash_info->ncsx)
++ ndcr |= NDCR_NCSX;
++
++ if (2048 == flash_info->page_size)
++ ndcr |= NDCR_PAGE_SZ;
++ else if (512 != flash_info->page_size)
++ return -EINVAL;
++
++ if (16 == flash_info->flash_width)
++ ndcr |= NDCR_DWIDTH_M;
++ else if (8 != flash_info->flash_width)
++ return -EINVAL;
++
++ if (16 == flash_info->dfc_width)
++ ndcr |= NDCR_DWIDTH_C;
++ else if (8 != flash_info->dfc_width)
++ return -EINVAL;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ dfc_set_dma(context);
++ dfc_set_ecc(context);
++ dfc_set_spare(context);
++
++ return 0;
++}
++
++/******************************************************************************
++ dfc_init_no_gpio
++
++ Description:
++ This function does entire DFC initialization according to the NAND
++ flash type currently used with platform, including set flash timing,
++ set DFC mode, configuring specified flash parameters in DFC, clear
++ ECC logic and page count register. The only difference with dfc_init
++ is that it does not set MFP&GPIO, very useful in OS loader
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ if MFPRs are set correctly
++ -EINVAL
++ if specified flash is not support by check bytes per page and pages
++ per block
++******************************************************************************/
++int dfc_init_no_gpio(struct dfc_context* context, int type)
++{
++ struct dfc_flash_info * flash_info;
++ uint32_t ndcr = 0x00000FFF; /* disable all interrupts */
++ int status;
++
++ status = dfc_get_flash_info(type, &flash_info);
++ if (status)
++ return status;
++ context->flash_info = flash_info;
++
++ dfc_set_timing(context, &context->flash_info->timing);
++
++ if (flash_info->enable_arbiter)
++ ndcr |= NDCR_ND_ARB_EN;
++
++ if (64 == flash_info->page_per_block)
++ ndcr |= NDCR_PG_PER_BLK;
++ else if (32 != flash_info->page_per_block)
++ return -EINVAL;
++
++ if (flash_info->row_addr_start)
++ ndcr |= NDCR_RA_START;
++
++ ndcr |= (flash_info->read_id_bytes)<<16;
++
++ ndcr |= (flash_info->dfc_mode) << 21;
++
++ if (flash_info->ncsx)
++ ndcr |= NDCR_NCSX;
++
++ if (2048 == flash_info->page_size)
++ ndcr |= NDCR_PAGE_SZ;
++ else if (512 != flash_info->page_size)
++ return -EINVAL;
++
++ if (16 == flash_info->flash_width)
++ ndcr |= NDCR_DWIDTH_M;
++ else if (8 != flash_info->flash_width)
++ return -EINVAL;
++
++ if (16 == flash_info->dfc_width)
++ ndcr |= NDCR_DWIDTH_C;
++ else if (8 != flash_info->dfc_width)
++ return -EINVAL;
++
++ dfc_write(context, DFC_NDCR, ndcr);
++
++ dfc_set_dma(context);
++ dfc_set_ecc(context);
++ dfc_set_spare(context);
++
++ return 0;
++}
++
++/*
++ * This macro will be used in following NAND operation functions.
++ * It is used to clear command buffer to ensure cmd buffer is empty
++ * in case of operation is timeout
++ */
++#define ClearCMDBuf() do { \
++ dfc_stop(context); \
++ udelay(NAND_OTHER_TIMEOUT); \
++ } while (0)
++
++/******************************************************************************
++ dfc_reset_flash
++
++ Description:
++ It reset the flash. The function can be called at any time when the
++ device is in Busy state during random read/program/erase mode and
++ reset operation will abort all these operations. After reset operation
++ the device is ready to wait for next command
++ Input Parameters:
++ context
++ Pointer to DFC context structure
++ Output Parameters:
++ None
++ Returns:
++ 0
++ execution succeeds
++ -ETIME
++ if timeout
++*******************************************************************************/
++int dfc_reset_flash(struct dfc_context *context)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ uint32_t event, event_out;
++ unsigned long timeo;
++ int status;
++
++ /* Send command */
++ dfc_send_cmd(context, (uint16_t)flash_info->reset, 0xFFFFFFFF, 0);
++
++ event = (context->dfc_mode->chip_select)? \
++ NDSR_CS1_CMDD : NDSR_CS0_CMDD;
++
++ /* Wait for CMDDM(command done successfully) */
++ status = dfc_wait_event(context, event, &event_out,
++ NAND_OTHER_TIMEOUT, 0);
++
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++
++
++ /* Wait until flash device is stable or timeout (10ms) */
++ timeo = jiffies + HZ;
++ do {
++ if (monahans_df_dev_ready(context->mtd))
++ break;
++ } while (time_before(jiffies, timeo));
++
++ return 0;
++}
++
++int dfc_readid(struct dfc_context *context, uint32_t *id)
++{
++ struct dfc_flash_info *flash_info = context->flash_info;
++ uint32_t event_out;
++ int status;
++ char tmp[DFC_DATA_SIZE_ID];
++
++ /* Send command */
++ status = dfc_send_cmd(context, (uint16_t)flash_info->read_id,
++ 0xFFFFFFFF, 0);
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++
++ /* Wait for CMDDM(command done successfully) */
++ status = dfc_wait_event(context, NDSR_RDDREQ, &event_out,
++ NAND_OTHER_TIMEOUT, 0);
++ if (status) {
++ ClearCMDBuf();
++ return status;
++ }
++ dfc_read_fifo_partial(context, (unsigned char *)tmp,
++ context->flash_info->read_id_bytes, DFC_DATA_SIZE_ID);
++
++ *id = tmp[0] | (tmp[1] << 8);
++ return 0;
++}
++
++#define ERR_NONE 0x0
++#define ERR_DMABUSERR (-0x01)
++#define ERR_SENDCMD (-0x02)
++#define ERR_DBERR (-0x03)
++#define ERR_BBERR (-0x04)
++#define ERR_BUSY (-0x05)
++
++#define STATE_CMD_SEND 0x1
++#define STATE_CMD_HANDLE 0x2
++#define STATE_DMA_TRANSFER 0x3
++#define STATE_DMA_DONE 0x4
++#define STATE_READY 0x5
++#define STATE_SUSPENDED 0x6
++#define STATE_DATA_TRANSFER 0x7
++
++#define NAND_RELOC_MAX 127
++#define NAND_RELOC_HEADER 0x524e
++#define MAX_CHIP 1
++#define NAND_CMD_DMA_LEN 12
++
++#define MAX_TIM_SIZE 0x1000
++#define MAX_BBT_SLOTS 24
++
++struct reloc_item {
++ unsigned short from;
++ unsigned short to;
++};
++
++struct reloc_table {
++ unsigned short header;
++ unsigned short total;
++ struct reloc_item reloc[NAND_RELOC_MAX];
++};
++
++struct monahans_dfc_info {
++ unsigned int state;
++ struct dfc_context *context;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ dma_addr_t data_buf_addr;
++ char *data_buf;
++ int data_dma;
++ struct pxa_dma_desc *data_desc;
++ dma_addr_t data_desc_addr;
++ dma_addr_t cmd_buf_addr;
++ char *cmd_buf;
++ int cmd_dma;
++ struct pxa_dma_desc *cmd_desc;
++ dma_addr_t cmd_desc_addr;
++ u64 dma_mask;
++#else
++ char *data_buf;
++#endif
++ u32 current_slot;
++ struct reloc_table table;
++ unsigned int table_init;
++ /* relate to the command */
++ unsigned int cmd;
++ unsigned int addr;
++ unsigned int column;
++ int retcode;
++ unsigned int buf_count;
++ struct completion cmd_complete;
++};
++
++static struct dfc_mode dfc_mode =
++{
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ 1, /* enable DMA */
++#else
++ 0,
++#endif
++ 1, /* enable ECC */
++ 1, /* enable SPARE */
++ 0, /* CS0 */
++};
++
++
++struct dfc_context dfc_context =
++{
++ 0, /* Initialized at function monahans_df_init() */
++ &dfc_mode,
++ 0, /* data dma channel */
++ 0, /* cmd dma channel */
++ NULL, /* &zylonite_flashinfo */
++};
++
++
++/*
++ * MTD structure for Zylonite board
++ */
++static struct mtd_info *monahans_mtd = NULL;
++
++/*
++ * BootRom and XDB will use last 127 block, and they will keep all the status
++ * of the bootloader and image, so skip the first 2M size and last 2M size
++ */
++static struct mtd_partition partition_info[] = {
++ {
++ name: "Bootloader",
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ size: 0x00060000,
++//#else
++// size: 0x00040000,
++//#endif
++ offset: 0,
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ },{
++ name: "Kernel",
++ size: 0x00200000,
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ offset: 0x00060000,
++//#else
++// offset: 0x00040000,
++//#endif
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ },{
++ name: "Filesystem",
++ size: 0x05000000,
++//#ifdef CONFIG_CPU_MONAHANS_LV
++ offset: 0x00260000,
++//#else
++// offset: 0x00240000,
++//#endif
++ }, {
++ name: "MassStorage",
++ size: 0x0, /* It will be set at probe function */
++ offset: MTDPART_OFS_APPEND /* Append after fs section */
++ }, {
++ name: "BBT",
++ size: 0x0, /* It will be set at probe function */
++ offset: MTDPART_OFS_APPEND,/* Append after fs section */
++ mask_flags: MTD_WRITEABLE /* force read-only */
++ }
++};
++
++#define PART_NUM ARRAY_SIZE(partition_info)
++
++/* MHN_OBM_V2 is related to BBT in MOBM V2
++ * MHN_OBM_V3 is related to BBT in MOBM V3
++ */
++enum {
++ MHN_OBM_NULL = 0,
++ MHN_OBM_V1,
++ MHN_OBM_V2,
++ MHN_OBM_V3,
++ MHN_OBM_INVAL
++} MHN_OBM_TYPE;
++
++static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
++static uint8_t scan_main_bbt_pattern[] = { 'p', 'x', 'a', '1' };
++static uint8_t scan_mirror_bbt_pattern[] = { '0', 'a', 'x', 'p' };
++
++static struct nand_bbt_descr monahans_bbt_default = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .maxblocks = 2,
++ .len = 2,
++ .offs = 0,
++ .pattern = scan_ff_pattern,
++};
++
++static struct nand_bbt_descr monahans_bbt_main = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 6,
++ .maxblocks = 2,
++ .offs = 2,
++ .len = 4,
++ .pattern = scan_main_bbt_pattern,
++};
++
++static struct nand_bbt_descr monahans_bbt_mirror = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 6,
++ .maxblocks = 2,
++ .offs = 2,
++ .len = 4,
++ .pattern = scan_mirror_bbt_pattern,
++};
++
++#if 0
++static struct nand_bbt_descr monahans_bbt_main = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 2,
++ .maxblocks = 2,
++ .offs = 0x0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++static struct nand_bbt_descr monahans_bbt_mirror = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
++ | NAND_BBT_2BIT | NAND_BBT_VERSION,
++ .veroffs = 2,
++ .maxblocks = 2,
++ .offs = 0x0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++#endif
++
++static struct nand_ecclayout monahans_lb_nand_oob = {
++ .eccbytes = 24,
++ .eccpos = {
++ 40, 41, 42, 43, 44, 45, 46, 47,
++ 48, 49, 50, 51, 52, 53, 54, 55,
++ 56, 57, 58, 59, 60, 61, 62, 63},
++ .oobfree = { {2, 38} }
++};
++
++/*
++ * Monahans OOB size is only 8 bytes, and the rest 8 bytes is controlled by
++ * hardware for ECC. We construct virutal ECC buffer. Acutally, ECC is 6 bytes
++ * and the remain 2 bytes are reserved.
++ */
++static struct nand_ecclayout monahans_sb_nand_oob = {
++ .eccbytes = 6,
++ .eccpos = {8, 9, 10, 11, 12, 13 },
++ .oobfree = { {2, 6} }
++};
++
++
++static inline int is_buf_blank(u8 * buf, int size)
++{
++ int i = 0;
++ while(i < size) {
++ if (*((unsigned long *)(buf + i)) != 0xFFFFFFFF)
++ return 0;
++ i += 4;
++ }
++ if (i > size) {
++ i -= 4;
++ while( i < size) {
++ if(*(buf + i) != 0xFF)
++ return 0;
++ i++;
++ }
++ }
++ return 1;
++}
++
++static void print_buf(char *buf, int num)
++{
++ int i = 0;
++
++ while (i < num) {
++ printk(KERN_ERR "0x%08x: %02x %02x %02x %02x %02x %02x %02x"
++ " %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
++ (unsigned int) (i), buf[i], buf[i+1], buf[i+2],
++ buf[i+3], buf[i+4], buf[i+5], buf[i+6], buf[i+7],
++ buf[i+8], buf[i+9], buf[i+10],buf[i+11], buf[i+12],
++ buf[i+13], buf[i+14], buf[i+15]);
++ i += 16;
++ }
++}
++
++static int inline enable_dfc_dma(struct dfc_context *context, int enable)
++{
++ int ret = dfc_mode.enable_dma;
++ unsigned long ndcr;
++
++ if (!enable) {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~NDCR_DMA_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_dma = 0;
++ } else {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_DMA_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_dma = 1;
++ }
++ return ret;
++}
++
++
++static void inline dump_info(struct monahans_dfc_info *info)
++{
++ if (!info)
++ return;
++
++ printk(KERN_ERR "cmd:0x%x; addr:0x%x; retcode:%d; state:%d \n",
++ info->cmd, info->addr, info->retcode, info->state);
++}
++
++static void inline enable_hw_ecc(struct dfc_context* context, int enable)
++{
++ unsigned long ndcr;
++
++ if (!enable) {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr &= ~NDCR_ECC_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_ecc = 0;
++ }
++ else {
++ ndcr = dfc_read(context, DFC_NDCR);
++ ndcr |= NDCR_ECC_EN;
++ dfc_write(context, DFC_NDCR, ndcr);
++ dfc_mode.enable_ecc = 1;
++ }
++}
++
++/*
++ * Now, we are not sure that the NDSR_RDY mean the flash is ready.
++ * Need more test.
++ */
++static int monahans_df_dev_ready(struct mtd_info *mtd)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ struct dfc_context* context = info->context;
++
++ return ((dfc_read(context, DFC_NDSR) & NDSR_RDY));
++}
++
++/* each read, we can only read 4bytes from NDDB, we must buffer it */
++static u_char monahans_df_read_byte(struct mtd_info *mtd)
++{
++ char retval = 0xFF;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (info->column < info->buf_count) {
++ /* Has just send a new command? */
++ retval = info->data_buf[info->column++];
++ }
++ return retval;
++}
++
++static void monahans_df_write_byte(struct mtd_info *mtd, u8 byte)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ info->data_buf[info->column++] = byte;
++}
++
++static u16 monahans_df_read_word(struct mtd_info *mtd)
++{
++ u16 retval = 0xFFFF;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (!(info->column & 0x01) && info->column < info->buf_count) {
++ retval = *((u16 *)(info->data_buf+info->column));
++ info->column += 2;
++ }
++ return retval;
++}
++
++static void monahans_df_write_word(struct mtd_info *mtd, u16 word)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (!(info->column & 0x01) && info->column < info->buf_count) {
++ *((u16 *)(info->data_buf+info->column)) = word;
++ info->column += 2;
++ }
++}
++
++static void monahans_df_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int real_len = min((unsigned int)len, info->buf_count - info->column);
++
++ memcpy(buf, info->data_buf + info->column, real_len);
++ info->column += real_len;
++}
++
++static void monahans_df_write_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int real_len = min((unsigned int)len, info->buf_count - info->column);
++
++ memcpy(info->data_buf + info->column, buf, real_len);
++ info->column += real_len;
++}
++
++static int monahans_df_verify_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ return 0;
++}
++
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++static void monahans_dfc_cmd_dma_irq(int channel, void *data,
++ struct pt_regs *regs)
++{
++ unsigned int dcsr;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)data;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++ unsigned int intm;
++
++ dcsr = DCSR(channel);
++ DCSR(channel) = dcsr;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ D1(printk("cmd dma interrupt, channel:%d, DCSR:0x%08x\n", \
++ channel, dcsr));
++
++ if (dcsr & DCSR_BUSERR) {
++ info->retcode = ERR_DMABUSERR;
++ complete(&info->cmd_complete);
++ } else {
++ if ((info->cmd == NAND_CMD_READ0) ||
++ (info->cmd == NAND_CMD_READOOB)|| \
++ (info->cmd == NAND_CMD_READID) || \
++ (info->cmd == NAND_CMD_STATUS)) {
++ dfc_enable_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ } else if (info->cmd == NAND_CMD_PAGEPROG)
++ dfc_enable_int(context, NDSR_WRDREQ);
++ else if (info->cmd == NAND_CMD_ERASE1)
++ dfc_enable_int(context, intm);
++ }
++
++ return;
++}
++
++
++static void monahans_dfc_data_dma_irq(int channel, void *data,
++ struct pt_regs *regs)
++{
++ unsigned int dcsr, intm;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)data;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++
++ dcsr = DCSR(channel);
++ DCSR(channel) = dcsr;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ D1(printk("data dma interrupt, channel:%d, DCSR:0x%08x\n",
++ channel, dcsr));
++ if (dcsr & DCSR_BUSERR) {
++ info->retcode = ERR_DMABUSERR;
++ complete(&info->cmd_complete);
++ }
++
++ if (info->cmd == NAND_CMD_PAGEPROG) {
++ /* DMA interrupt may be interrupted by other IRQs*/
++ info->state = STATE_DMA_DONE;
++ dfc_enable_int(context, intm);
++ } else {
++ info->state = STATE_READY;
++ complete(&info->cmd_complete);
++ }
++
++}
++#endif
++
++static irqreturn_t monahans_dfc_irq(int irq, void *devid)
++{
++ unsigned int status, event, intm, cmd;
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)devid;
++ struct dfc_context* context = info->context;
++ struct dfc_mode* dfc_mode = context->dfc_mode;
++
++ intm = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++ event = (dfc_mode->chip_select) ? \
++ (NDSR_CS1_BBD | NDSR_CS1_CMDD) : (NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ status = dfc_read(context, DFC_NDSR);
++ D1(printk("DFC irq, NDSR:0x%x\n", status));
++ if (status & (NDSR_RDDREQ | NDSR_DBERR)) {
++ if (status & NDSR_DBERR) {
++ info->retcode = ERR_DBERR;
++ }
++
++ dfc_disable_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ dfc_clear_int(context, NDSR_RDDREQ | NDSR_DBERR);
++ if (info->cmd == NAND_CMD_READID)
++ cmd = context->flash_info->read_id;
++ else if (info->cmd == NAND_CMD_STATUS)
++ cmd = context->flash_info->read_status;
++ else if (info->cmd == NAND_CMD_READ0 ||
++ info->cmd == NAND_CMD_READOOB)
++ cmd = context->flash_info->read1;
++ else {
++ printk(KERN_ERR "No according command:0x%x happens\n",
++ info->cmd);
++ goto out;
++ }
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->state = STATE_DMA_TRANSFER;
++ dfc_start_data_dma(context,
++ (struct pxa_dma_desc*)info->data_desc_addr);
++#else
++ info->state = STATE_DATA_TRANSFER;
++ complete(&info->cmd_complete);
++#endif
++ } else if (status & NDSR_WRDREQ) {
++ dfc_disable_int(context, NDSR_WRDREQ);
++ dfc_clear_int(context, NDSR_WRDREQ);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->state = STATE_DMA_TRANSFER;
++ dfc_start_data_dma(context,
++ (struct pxa_dma_desc*)info->data_desc_addr);
++#else
++ info->state = STATE_DATA_TRANSFER;
++ complete(&info->cmd_complete);
++#endif
++ } else if (status & event) {
++ if (status & NDSR_CS0_BBD) {
++ info->retcode = ERR_BBERR;
++ }
++
++ dfc_disable_int(context, intm);
++ dfc_clear_int(context, event);
++ info->state = STATE_READY;
++ complete(&info->cmd_complete);
++ }
++out:
++ return IRQ_HANDLED;
++}
++
++static int dfc_send_command(struct mtd_info *mtd, unsigned int cmd,
++ unsigned int addr, unsigned int num_pages,
++ unsigned int event)
++{
++
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ struct dfc_context* context = info->context;
++ int status;
++ int ret;
++
++ D1(printk("ready send command, cmd:0x%x, at address:0x%x,"
++ " num_pages:%d, wait event:0x%x\n", cmd, addr, num_pages, event));
++
++ info->state = STATE_CMD_SEND;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ status = dfc_setup_cmd_dma(context, cmd, addr, num_pages,
++ (uint32_t *)info->cmd_buf, info->cmd_buf_addr,
++ DDADR_STOP, DCMD_ENDIRQEN, info->cmd_desc);
++#else
++ status = dfc_send_cmd(context, cmd, addr, num_pages);
++#endif
++ if (status) {
++ info->retcode = ERR_SENDCMD;
++ dfc_stop(context);
++ udelay(20);
++ printk(KERN_ERR "fail send command\n");
++ return info->retcode;
++ }
++ info->state = STATE_CMD_HANDLE;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_setup_data_dma(context, cmd, info->data_buf_addr,
++ DDADR_STOP, DCMD_ENDIRQEN, info->data_desc);
++ dfc_start_cmd_dma(context, (struct pxa_dma_desc*)info->cmd_desc_addr);
++#endif
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_enable_int(context, event);
++#endif
++ ret = wait_for_completion_timeout(&info->cmd_complete, 2*HZ);
++ if (!ret){
++ printk(KERN_ERR "Command time out\n");
++ dump_info(info);
++ }
++ D1(printk("command return, cmd:0x%x, retcode:%d\n",
++ info->cmd, info->retcode));
++ return 0;
++}
++
++static void monahans_df_command(struct mtd_info *mtd, unsigned command,
++ int column, int page_addr )
++{
++ struct nand_chip *this = (struct nand_chip *)(mtd->priv);
++ struct monahans_dfc_info *info =
++ (struct monahans_dfc_info *)(this->priv);
++ struct dfc_context *context = info->context;
++ struct dfc_flash_info * flash_info = context->flash_info;
++ int ret, pages_shift;
++ int status;
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ int datasize;
++ int paddingsize;
++#endif
++ unsigned int to;
++
++ D1(printk("command:0x%x at address:0x%x, column:0x%x\n",
++ command, page_addr, column));
++
++ if (info->state != STATE_READY) {
++ printk(KERN_ERR "CHIP is not ready.\n");
++ dump_info(info);
++ info->retcode = ERR_BUSY;
++ return;
++ }
++ info->retcode = ERR_NONE;
++ pages_shift = this->phys_erase_shift - this->page_shift;
++ if (info->table_init) {
++ to = search_rel_block((page_addr >> pages_shift), mtd);
++ if (to) {
++ page_addr = (to << pages_shift) | (page_addr
++ & ((1 << pages_shift) - 1));
++ }
++ }
++
++ switch ( command ) {
++ case NAND_CMD_READOOB:
++ /*
++ * DFC has mark the last 8 bytes OOB data if HARDEARE_ECC is
++ * enabled. We must first disable the HARDWARE_ECC for getting
++ * all the 16 bytes OOB
++ */
++ enable_hw_ecc(context, 0);
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ info->column = mtd->writesize + column;
++ info->cmd = command;
++ info->addr = page_addr << this->page_shift;
++ ret = dfc_send_command(mtd, flash_info->read1, info->addr,
++ 1, NDSR_RDDREQ | NDSR_DBERR);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read1, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ min(info->buf_count, datasize), datasize);
++ info->state = STATE_READY;
++#endif
++ /* We only are OOB, so if the data has error, does not matter */
++ if (info->retcode == ERR_DBERR)
++ info->retcode = ERR_NONE;
++ enable_hw_ecc(context, 1);
++ break;
++
++ case NAND_CMD_READ0:
++ enable_hw_ecc(context, 1);
++ info->column = column;
++ info->cmd = command;
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ memset(info->data_buf, 0xFF, info->buf_count);
++ info->addr = page_addr << this->page_shift;
++
++ ret = dfc_send_command(mtd, flash_info->read1, info->addr,
++ 1, NDSR_RDDREQ | NDSR_DBERR);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read1, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ min(info->buf_count, datasize), datasize);
++ info->state = STATE_READY;
++#endif
++ /* When the data buf is blank, the DFC will report DB error */
++ if (info->retcode == ERR_DBERR && is_buf_blank(info->data_buf,
++ mtd->writesize))
++ info->retcode = ERR_NONE;
++
++ if (info->retcode == ERR_DBERR) {
++ printk(KERN_ERR "DB error at address 0x%x\n",
++ info->addr);
++ print_buf(info->data_buf, info->buf_count);
++ }
++ break;
++ case NAND_CMD_SEQIN:
++ /* Write only OOB? */
++
++ info->cmd = command;
++ if (column >= mtd->writesize) {
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ enable_hw_ecc(context, 0);
++ } else {
++ info->buf_count = mtd->writesize + mtd->oobsize;
++ enable_hw_ecc(context, 1);
++ }
++ memset(info->data_buf, 0xFF, mtd->writesize + mtd->oobsize);
++ info->column = column;
++ info->addr = page_addr << this->page_shift;
++ break;
++ case NAND_CMD_PAGEPROG:
++ /* prevois command is NAND_CMD_SEIN ?*/
++ if (info->cmd != NAND_CMD_SEQIN) {
++ info->cmd = command;
++ info->retcode = ERR_SENDCMD;
++ printk(KERN_ERR "Monahans NAND device: "
++ "No NAND_CMD_SEQIN executed before.\n");
++ enable_hw_ecc(context, 1);
++ break;
++ }
++ info->cmd = command;
++ ret = dfc_send_command(mtd, flash_info->program, info->addr,
++ 1, NDSR_WRDREQ);
++
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ if (ret != 0)
++ break;
++
++ dfc_get_pattern(info->context, flash_info->program, &datasize,
++ &paddingsize);
++ dfc_write_fifo_partial(info->context, info->data_buf, datasize,
++ datasize);
++
++ if (info->context->dfc_mode->chip_select)
++ dfc_enable_int(info->context,
++ NDSR_CS1_BBD | NDSR_CS1_CMDD);
++ else
++ dfc_enable_int(info->context,
++ NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ ret = wait_for_completion_timeout(&info->cmd_complete, 2*HZ);
++ if (!ret){
++ printk(KERN_ERR "Programm Command time out\n");
++ dump_info(info);
++ }
++
++ if (info->retcode == ERR_BBERR) {
++ mtd->block_markbad(mtd, info->addr);
++ }
++#endif
++ break;
++ case NAND_CMD_ERASE1:
++ info->cmd = command;
++ info->addr = (page_addr >> pages_shift) << this->phys_erase_shift;
++
++ if (info->context->dfc_mode->chip_select)
++ ret = dfc_send_command(mtd, flash_info->erase,
++ info->addr, 0, NDSR_CS1_BBD | NDSR_CS1_CMDD);
++ else
++ ret = dfc_send_command(mtd, flash_info->erase,
++ info->addr, 0, NDSR_CS0_BBD | NDSR_CS0_CMDD);
++
++ if (info->retcode == ERR_BBERR) {
++ mtd->block_markbad(mtd, info->addr);
++ }
++ break;
++ case NAND_CMD_ERASE2:
++ break;
++ case NAND_CMD_READID:
++ info->cmd = command;
++ info->buf_count = flash_info->read_id_bytes;
++ info->column = 0;
++ info->addr = 0xFFFFFFFF;
++ ret = dfc_send_command(mtd, flash_info->read_id, info->addr,
++ 0, NDSR_RDDREQ);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read_id, &datasize,
++ &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ info->buf_count, datasize);
++ info->state = STATE_READY;
++#endif
++ D1(printk("ReadID, [1]:0x%x, [2]:0x%x\n",
++ info->data_buf[0], info->data_buf[1]));
++ break;
++ case NAND_CMD_STATUS:
++ info->cmd = command;
++ info->buf_count = 1;
++ info->column = 0;
++ info->addr = 0xFFFFFFFF;
++ ret = dfc_send_command(mtd, flash_info->read_status,
++ info->addr, 0, NDSR_RDDREQ);
++#ifndef CONFIG_MTD_NAND_MONAHANS_DMA
++ dfc_get_pattern(info->context, flash_info->read_status,
++ &datasize, &paddingsize);
++ dfc_read_fifo_partial(info->context, info->data_buf,
++ info->buf_count, datasize);
++ info->state = STATE_READY;
++#endif
++ break;
++
++ case NAND_CMD_RESET:
++ status = dfc_reset_flash(&dfc_context);
++ if (status) {
++ printk(KERN_WARNING "Monahans NAND device:"
++ "NAND_CMD_RESET error\n");
++ }
++ break;
++ default:
++ printk(KERN_WARNING "Monahans NAND device:"
++ "Non-support the command.\n");
++ break;
++ }
++
++ if (info->retcode != ERR_NONE)
++ dfc_stop(info->context);
++}
++
++static void monahans_df_select_chip(struct mtd_info *mtd, int chip)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if (chip <= MAX_CHIP)
++ info->context->dfc_mode->chip_select = chip;
++ else
++ printk(KERN_ERR "Monahans NAND device:"
++ "not select the NAND chips!\n");
++}
++
++static int monahans_df_waitfunc(struct mtd_info *mtd,
++ struct nand_chip *this)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ /* monahans_df_send_command has waited for command complete */
++ if (this->state == FL_WRITING || this->state == FL_ERASING) {
++ if (info->retcode == ERR_NONE)
++ return 0;
++ else {
++ /*
++ * any error make it return 0x01 which will tell
++ * the caller the erase and write fail
++ */
++ return 0x01;
++ }
++ }
++
++ return 0;
++}
++
++static int monahans_df_calculate_ecc(struct mtd_info *mtd,
++ const u_char *dat, u_char *ecc_code)
++{
++ return 0;
++}
++
++static int monahans_df_correct_data(struct mtd_info *mtd,
++ u_char *dat, u_char *read_ecc, u_char *calc_ecc)
++{
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ /*
++ * Any error include ERR_SEND_CMD, ERR_DBERR, ERR_BUSERR, we
++ * consider it as a ecc error which will tell the caller the
++ * read fail We have distinguish all the errors, but the
++ * nand_read_ecc only check this function return value
++ */
++ if (info->retcode != ERR_NONE)
++ return -1;
++
++ return 0;
++}
++
++static void monahans_df_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ return;
++}
++
++/*
++ * The relocation table management is different between MOBM V2 and V3.
++ *
++ * MOBM V2 is applied on chips taped out before MhnLV A0.
++ * MOBM V3 is applied on chips taped out after MhnLV A0. It's also applied
++ * on MhnLV A0.
++ */
++static int calc_obm_ver(void)
++{
++ unsigned int cpuid;
++ /* read CPU ID */
++ __asm__ (
++ "mrc p15, 0, %0, c0, c0, 0\n"
++ : "=r" (cpuid)
++ );
++ /* It's not xscale chip. */
++ if ((cpuid & 0xFFFF0000) != 0x69050000)
++ return MHN_OBM_INVAL;
++ /* It's MhnP Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006420)
++ return MHN_OBM_V2;
++ /* It's MhnP Bx */
++ if ((cpuid & 0x0000FFF0) == 0x00006820) {
++ if ((cpuid & 0x0F) <= 5)
++ return MHN_OBM_V2;
++ else
++ return MHN_OBM_V3;
++ }
++ /* It's MhnL Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006880) {
++ if ((cpuid & 0x0F) == 0)
++ return MHN_OBM_V2;
++ else
++ return MHN_OBM_V3;
++ }
++ /* It's MhnLV Ax */
++ if ((cpuid & 0x0000FFF0) == 0x00006890)
++ return MHN_OBM_V3;
++ return MHN_OBM_INVAL;
++}
++
++
++/*
++ * MOBM maintains a relocation table. It's used to replace bad blocks.
++ * If block A is bad, it will use block B instead.
++ * There're 127 relocated blocks. All of them reside in the bottom of NAND
++ * flash. So they're reserved and can't be calculated in mtd size and chip
++ * size.
++ */
++static int read_reloc_table(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct dfc_context *context = NULL;
++ struct reloc_table *table = NULL;
++ int page, maxslot;
++ int obm, valid;
++
++ obm = calc_obm_ver();
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ context = info->context;
++
++ mtd->size -= (NAND_RELOC_MAX * mtd->erasesize);
++ this->chipsize -= (NAND_RELOC_MAX << this->phys_erase_shift);
++ page = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
++
++ this->select_chip(mtd, 0);
++ valid = 0;
++ if (obm == MHN_OBM_V2) {
++ /* On MOBM V2, the relocation table resides in the last page
++ * of the first block.
++ */
++ memset(info->data_buf, 0, BUFLEN);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ memcpy(((unsigned char *)&(info->table)), info->data_buf,
++ sizeof(struct reloc_table));
++ if (info->table.header == NAND_RELOC_HEADER)
++ valid = 1;
++ } else if (obm == MHN_OBM_V3) {
++ /* On MOBM V3, there're several relocation tables in the first
++ * block.
++ * When new bad blocks are found, a new relocation table will
++ * be generated and written back to the first block. But the
++ * original relocation table won't be erased. Even if the new
++ * relocation table is written wrong, system can still find an
++ * old one.
++ * One page contains one slot.
++ */
++ maxslot = 1 << (this->phys_erase_shift - this->page_shift);
++ page = maxslot - MAX_BBT_SLOTS;
++ for (; page < maxslot; page++) {
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ table = (struct reloc_table *)info->data_buf;
++ if (info->retcode == ERR_NONE) {
++ if (table->header != NAND_RELOC_HEADER) {
++ continue;
++ } else {
++ memcpy(((unsigned char *)&(info->table)),
++ table, sizeof(struct reloc_table));
++ valid = 1;
++ break;
++ }
++ }
++ }
++
++ } else {
++ printk(KERN_ERR "The version of MOBM isn't supported\n");
++ }
++ if (valid) {
++ memcpy(((unsigned char *)&(info->table)), info->data_buf,
++ sizeof(struct reloc_table));
++ printk(KERN_DEBUG "relocation table at page:%d\n", page);
++ PRINT_BUF((unsigned char *)&(info->table),
++ sizeof(struct reloc_table));
++ info->table_init = 1;
++ } else {
++ /* There should be a valid relocation table slot at least. */
++ printk(KERN_ERR "NO VALID relocation table can be \
++ recognized\n");
++ printk(KERN_ERR "CAUTION: It may cause unpredicated error\n");
++ printk(KERN_ERR "Please re-initialize the NAND flash.\n");
++ memset((unsigned char *)&(info->table), 0,
++ sizeof(struct reloc_table));
++ info->table_init = 0;
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/* add the relocation entry into the relocation table
++ * It's valid on MOBM V3.
++ * If the relocated block is bad, an new entry will be added into the
++ * bottom of the relocation table.
++ */
++static int update_rel_table(struct mtd_info *mtd, int block)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct reloc_table *table = NULL;
++ int obm, reloc_block;
++
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ obm = calc_obm_ver();
++ if (obm == MHN_OBM_V3) {
++ table = &info->table;
++ if (info->table_init == 0) {
++ printk(KERN_ERR "Error: the initial relocation \
++ table can't be read\n");
++ memset(table, 0, sizeof(struct reloc_table));
++ table->header = NAND_RELOC_HEADER;
++ info->table_init = 1;
++ }
++ if (table->total == 0) {
++ /* Point to the first relocated block.
++ * It resides in the last block of flash.
++ * the relocation entry has calculated in
++ * chipsize
++ */
++ reloc_block = (this->chipsize
++ >> this->phys_erase_shift)
++ + NAND_RELOC_MAX - 1;
++ } else if (table->total < NAND_RELOC_MAX) {
++ reloc_block = table->reloc[table->total - 1].to - 1;
++ } else {
++ printk(KERN_ERR "Relocation table exceed max number, \
++ cannot mark block 0x%x as bad block\n", block);
++ return -ENOSPC;
++ }
++ /* Make sure that reloc_block is pointing to a valid block */
++ for (; ; reloc_block--) {
++ /* The relocate table is full */
++ if (reloc_block < (this->chipsize
++ >> this->phys_erase_shift))
++ return -ENOSPC;
++ this->cmdfunc(mtd, NAND_CMD_ERASE1, 0, reloc_block
++ << (this->phys_erase_shift
++ - this->page_shift));
++ if (info->retcode == ERR_NONE)
++ break;
++ }
++ /* Create the relocated block information in the table */
++ table->reloc[table->total].from = block;
++ table->reloc[table->total].to = reloc_block;
++ table->total++;
++ }
++ return 0;
++}
++
++/* Write the relocation table back to device, if there's room. */
++static int sync_rel_table(struct mtd_info *mtd, int *idx)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ int obm, start_page, len;
++
++ if (*idx >= MAX_BBT_SLOTS) {
++ printk(KERN_ERR "Can't write relocation table to device \
++ any more.\n");
++ return -1;
++ }
++ if (*idx < 0) {
++ printk(KERN_ERR "Wrong Slot is specified.\n");
++ return -1;
++ }
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ len = 4;
++ len += info->table.total << 2;
++ obm = calc_obm_ver();
++ if (obm == MHN_OBM_V3) {
++ /* write to device */
++ start_page = 1 << (this->phys_erase_shift - this->page_shift);
++ start_page = start_page - 1 - *idx;
++ memset(&(info->data_buf), 0xFF, BUFLEN);
++ memcpy(&(info->data_buf), &(info->table), len);
++
++ printk(KERN_DEBUG "DUMP relocation table before write. \
++ page:0x%x\n", start_page);
++ monahans_df_command(mtd, NAND_CMD_SEQIN, 0, start_page);
++ monahans_df_command(mtd, NAND_CMD_PAGEPROG, 0, start_page);
++ /* write to idx */
++ (*idx)++;
++ /* dump it */
++ memset(&(info->data_buf), 0, BUFLEN);
++ monahans_df_command(mtd, NAND_CMD_READOOB, 0, start_page);
++ PRINT_BUF(info->data_buf, len);
++ }
++ return 0;
++}
++
++
++/* Find the relocated block of the bad one.
++ * If it's a good block, return 0. Otherwise, return a relocated one.
++ * idx points to the next relocation entry
++ * If the relocated block is bad, an new entry will be added into the
++ * bottom of the relocation table.
++ */
++static unsigned short search_rel_block(int block, struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ struct reloc_table *table = NULL;
++ int i, max, reloc_block = 0;
++
++ this = (struct nand_chip *)(mtd->priv);
++ info = (struct monahans_dfc_info *)(this->priv);
++ table = &(info->table);
++ if ((block <= 0) || (block > this->chipsize)
++ || (info->table_init == 0) || (table->total == 0))
++ return 0;
++ if (table->total > NAND_RELOC_MAX)
++ table->total = NAND_RELOC_MAX;
++ max = table->total;
++ for (i = 0; i < max; i++) {
++ if (block == table->reloc[i].from)
++ reloc_block = table->reloc[i].to;
++ }
++ return reloc_block;
++}
++
++/*
++ * Check whether the block is a bad one.
++ * At first, it will search the relocation table.
++ * If necessary, it will search the BBT. Because relocation table can only
++ * maintain limited record. If there're more bad blocks, they can't be
++ * recorded in relocation table. They can only be recorded in BBT.
++ */
++static int monahans_df_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
++{
++ struct nand_chip *this = NULL;
++ int page, block, reloc_block, chipnr, res = 0;
++ u16 bad;
++
++ /* At here, we only support one flash chip */
++ this = (struct nand_chip *)mtd->priv;
++ block = (int)(ofs >> this->phys_erase_shift);
++ /* search the block in the relocation table */
++ reloc_block = search_rel_block(block, mtd);
++ if (reloc_block) {
++ ofs = ((reloc_block << this->phys_erase_shift) |
++ (ofs & ((1 << this->phys_erase_shift) - 1)));
++ }
++
++ /* search BBT
++ * Maybe the relocation table is full, but some bad blocks aren't
++ * recordered in it.
++ * The below code are copied from nand_block_bad().
++ */
++ if (getchip) {
++ page = (int)(ofs >> this->page_shift);
++ chipnr = (int)(ofs >> this->chip_shift);
++
++ /* Select the NAND chips */
++ this->select_chip(mtd, chipnr);
++ } else
++ page = (int)ofs;
++
++ if (this->options & NAND_BUSWIDTH_16) {
++ this->cmdfunc(mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE,
++ page & this->pagemask);
++ bad = cpu_to_le16(this->read_word(mtd));
++ if (this->badblockpos & 0x1)
++ bad >>= 1;
++ if ((bad & 0xFF) != 0xFF)
++ res = 1;
++ } else {
++ this->cmdfunc(mtd, NAND_CMD_READOOB, this->badblockpos,
++ page & this->pagemask);
++ if (this->read_byte(mtd) != 0xFF)
++ res = 1;
++ }
++
++ return res;
++}
++
++static int monahans_df_block_markbad(struct mtd_info *mtd, loff_t ofs)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ unsigned char buf[2] = {0, 0};
++ int block, reloc_block, page, ret;
++
++ this = (struct nand_chip *)mtd->priv;
++ info = (struct monahans_dfc_info *)(this->priv);
++ /* Get block number */
++ block = ((int)ofs) >> this->bbt_erase_shift;
++ ret = update_rel_table(mtd, block);
++ if (!ret) {
++ sync_rel_table(mtd, &(info->current_slot));
++ return 0;
++ } else {
++ reloc_block = search_rel_block(block, mtd);
++ if (reloc_block)
++ block = reloc_block;
++ if (this->bbt)
++ this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
++ }
++
++ /* Do we have a flash based bad block table ? */
++ if (this->options & NAND_USE_FLASH_BBT)
++ return nand_update_bbt(mtd, ofs);
++
++ /* mark the bad block flag at the first two pages */
++ page = block << (this->phys_erase_shift - this->page_shift);
++ ofs = mtd->writesize + this->badblockpos;
++ this->cmdfunc(mtd, NAND_CMD_SEQIN, ofs, page);
++ this->write_buf(mtd, buf, 2);
++ this->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
++ page++;
++ this->cmdfunc(mtd, NAND_CMD_SEQIN, ofs, page);
++ this->write_buf(mtd, buf, 2);
++ this->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
++ return 0;
++}
++
++static int dump_bbt_flash(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ struct monahans_dfc_info *info = NULL;
++ int block, page, totlen;
++
++ this = (struct nand_chip *)mtd->priv;
++ info = (struct monahans_dfc_info *)this->priv;
++ block = (this->chipsize >> this->phys_erase_shift) - 1;
++ totlen = (this->chipsize >> this->phys_erase_shift) >> 2;
++ printk(KERN_ERR "totlen:0x%x\n", totlen);
++ this->select_chip(mtd, 0);
++ if (this->bbt_td) {
++ printk(KERN_ERR "BBT page:0x%x\n", this->bbt_td->pages[0]);
++ page = this->bbt_td->pages[0];
++ if (this->bbt_td->pages[0] <= 0) {
++ page = block << (this->phys_erase_shift
++ - this->page_shift);
++ }
++ while (totlen > 0) {
++ printk(KERN_ERR "page:0x%x\n", page);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ printk(KERN_ERR "read result:0x%x\n", info->retcode);
++ PRINT_BUF(info->data_buf, BUFLEN);
++ totlen -= (1 << this->page_shift);
++ page++;
++ }
++ }
++ if (this->bbt_md) {
++ printk(KERN_ERR "BBT page:0x%x\n", this->bbt_md->pages[0]);
++ page = this->bbt_md->pages[0];
++ if (this->bbt_td->pages[0] <= 0) {
++ page = block << (this->phys_erase_shift
++ - this->page_shift);
++ }
++ while (totlen > 0) {
++ printk(KERN_ERR "page:0x%x\n", page);
++ monahans_df_command(mtd, NAND_CMD_READ0, 0, page);
++ printk(KERN_ERR "read result:0x%x\n", info->retcode);
++ PRINT_BUF(info->data_buf, BUFLEN);
++ totlen -= (1 << this->page_shift);
++ page++;
++ }
++
++ }
++ return 0;
++}
++
++static int dump_bbt_mem(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++
++ this = (struct nand_chip *)mtd->priv;
++ PRINT_BUF(this->bbt, 225);
++ return 0;
++}
++
++static int monahans_df_scan_bbt(struct mtd_info *mtd)
++{
++ struct nand_chip *this = NULL;
++ int ret;
++
++ this = (struct nand_chip *)mtd->priv;
++ ret = read_reloc_table(mtd);
++ if (ret) {
++ printk(KERN_ERR "Failed to get relocation table\n");
++ printk(KERN_ERR "Try to build a new BBT. It may result \
++ unpredicated error.\n");
++ /* Create new memory based and flash based BBT */
++ }
++ nand_scan_bbt(mtd, &monahans_bbt_default);
++ //dump_bbt_flash(mtd);
++ dump_bbt_mem(mtd);
++ return 0;
++#if 0
++ /* Read flashed based BBT from device */
++ return (nand_scan_bbt(mtd, &monahans_bbt_main));
++#endif
++}
++
++
++static int monahans_df_probe(struct platform_device *pdev)
++{
++ struct nand_chip *this;
++ struct monahans_dfc_info *info;
++ int status = -1;
++ unsigned int data_buf_len;
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ unsigned int buf_len;
++#endif
++ int i, ret = 0;
++
++ printk(KERN_ERR "Nand driver probe\n");
++
++ dfc_context.membase = ioremap_nocache(0x43100000, 0x100000);
++ if (!dfc_context.membase)
++ printk(KERN_ERR "Couldn't ioremap\n");
++
++ pxa_set_cken(CKEN_NAND, 1);
++
++ for (i = DFC_FLASH_NULL + 1; i < DFC_FLASH_END; i++)
++ {
++ uint32_t id;
++
++ status = dfc_init(&dfc_context, i);
++ if (status)
++ continue;
++ status = dfc_readid(&dfc_context, &id);
++ if (status)
++ continue;
++ printk(KERN_DEBUG "id:0x%x, chipid:0x%x\n",
++ id, dfc_context.flash_info->chip_id);
++ if (id == dfc_context.flash_info->chip_id)
++ break;
++ }
++
++ if(i == DFC_FLASH_END) {
++ printk(KERN_ALERT "Monahans NAND device:"
++ "Nand Flash initialize failure!\n");
++ ret = -ENXIO;
++ goto out;
++ }
++ flash_config = i;
++
++ monahans_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip) +
++ sizeof(struct monahans_dfc_info) , GFP_KERNEL);
++ if (!monahans_mtd) {
++ printk (KERN_ERR "Monahans NAND device:"
++ "Unable to allocate NAND MTD device structure.\n");
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ /* Get pointer to private data */
++ this = (struct nand_chip *)((void *)monahans_mtd + sizeof(struct mtd_info));
++ info = (struct monahans_dfc_info *)((void *)this + sizeof(struct nand_chip));
++ dfc_context.mtd = monahans_mtd;
++
++ monahans_mtd->priv = this;
++ this->priv = info;
++ data_buf_len = dfc_context.flash_info->page_size +
++ dfc_context.flash_info->oob_size;
++ info->state = STATE_READY;
++ init_completion(&info->cmd_complete);
++ info->table_init = 0;
++ memset(&info->table, 0x0, sizeof(struct reloc_table));
++ printk(KERN_DEBUG "%s: this->controller: 0x%x, &this->controller: 0x%x\n",__func__, (unsigned int)this->controller, (unsigned int)&(this->controller));
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ info->dma_mask = 0xffffffffUL;
++
++ dev->dma_mask = &info->dma_mask;
++ dev->coherent_dma_mask = 0xffffffffUL;
++
++ /* alloc dma data buffer for data
++ * buffer + 2*descriptor + command buffer
++ */
++ buf_len = ALIGN(2*sizeof(struct pxa_dma_desc), 32) +
++ ALIGN(data_buf_len, 32) + ALIGN(NAND_CMD_DMA_LEN, 32);
++
++ printk(KERN_INFO "Try to allocate dma buffer(len:%d)"
++ "for data buffer + 2*descriptor + command buffer\n", buf_len);
++ info->data_desc = (struct pxa_dma_desc*)dma_alloc_writecombine(dev,
++ buf_len, &info->data_desc_addr, GFP_KERNEL);
++ if (!info->data_desc) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma buffer\n");
++ ret = -ENOMEM;
++ goto free_mtd;
++ }
++
++ info->cmd_desc = (struct pxa_dma_desc*)((char *)info->data_desc +
++ sizeof(struct pxa_dma_desc));
++ info->cmd_desc_addr = (dma_addr_t)((char *)info->data_desc_addr +
++ sizeof(struct pxa_dma_desc));
++ info->data_buf = (char *)info->data_desc +
++ ALIGN(2*sizeof(struct pxa_dma_desc), 32);
++ info->data_buf_addr = (dma_addr_t)((char *)info->data_desc_addr +
++ ALIGN(2*sizeof(struct pxa_dma_desc), 32));
++ info->cmd_buf = (char *)info->data_buf + ALIGN(data_buf_len, 32);
++ info->cmd_buf_addr = (dma_addr_t)((char *)info->data_buf_addr +
++ ALIGN(data_buf_len, 32));
++
++ D1(printk("Get dma buffer for data dma descriptor, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->data_desc, info->data_desc_addr));
++ D1(printk("Get dma buffer for command dma descriptors, virt:0x%x,"
++ "phys0x:%x\n", (unsigned int)info->cmd_desc, info->cmd_desc_addr));
++ D1(printk("Get dma buffer for data, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->data_buf, info->data_buf_addr));
++ D1(printk("Get dma buffer for command, virt:0x%x, phys0x:%x\n",
++ (unsigned int)info->cmd_buf, info->cmd_buf_addr));
++
++ D1(printk("Try to allocate dma channel for data\n"));
++
++ info->data_dma = pxa_request_dma("NAND DATA", DMA_PRIO_LOW,
++ monahans_dfc_data_dma_irq, info);
++ if (info->data_dma < 0) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma channel for data\n");
++ ret = info->data_dma;
++ goto free_buf;
++ }
++ D1(printk("Get dma channel:%d for data\n", info->data_dma));
++
++ D1(printk("Try to allocate dma channel for command\n"));
++ info->cmd_dma = pxa_request_dma("NAND CMD", DMA_PRIO_LOW,
++ monahans_dfc_cmd_dma_irq, info);
++ if (info->cmd_dma < 0) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc dma channel for command\n");
++ ret = info->cmd_dma;
++ goto free_data_dma;
++ }
++ D1(printk("Get dma channel:%d for command\n", info->cmd_dma));
++
++ dfc_context.cmd_dma_ch = info->cmd_dma;
++ dfc_context.data_dma_ch = info->data_dma;
++#else
++ printk(KERN_DEBUG "Try to allocate data buffer(len:%d)\n", data_buf_len);
++ info->data_buf = kmalloc(data_buf_len, GFP_KERNEL);
++ if (!info->data_buf) {
++ printk(KERN_ERR "Monahans NAND device:"
++ "Unable to alloc data buffer\n");
++ ret = -ENOMEM;
++ goto free_mtd;
++ }
++#endif
++
++ D1(printk("Try to request irq:%d\n", IRQ_NAND));
++ ret = request_irq(IRQ_NAND, monahans_dfc_irq, 0, pdev->name, info);
++ if (ret < 0) {
++ printk(KERN_ERR "Monahans NAND device: Unable to request irq\n");
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ goto free_cmd_dma;
++#else
++ goto free_buf;
++#endif
++ }
++
++ D1(printk("Success request irq\n"));
++
++ /* set address of NAND IO lines */
++ this->options = (dfc_context.flash_info->flash_width == 16)? \
++ NAND_BUSWIDTH_16: 0 | NAND_USE_FLASH_BBT;
++
++ /* this->IO_ADDR_R = this->IO_ADDR_W = NDDB */
++ this->waitfunc = monahans_df_waitfunc;
++ this->select_chip = monahans_df_select_chip;
++ this->dev_ready = monahans_df_dev_ready;
++ this->cmdfunc = monahans_df_command;
++ this->read_word= monahans_df_read_word;
++ /*this->write_word= monahans_df_write_word;*/
++ this->read_byte = monahans_df_read_byte;
++ this->read_buf = monahans_df_read_buf;
++ this->write_buf = monahans_df_write_buf;
++ this->verify_buf = monahans_df_verify_buf;
++ this->ecc.hwctl = monahans_df_enable_hwecc;
++ this->ecc.calculate = monahans_df_calculate_ecc;
++ this->ecc.correct = monahans_df_correct_data;
++ this->block_bad = monahans_df_block_bad;
++ this->block_markbad = monahans_df_block_markbad;
++ this->scan_bbt = monahans_df_scan_bbt;
++ this->chip_delay= 25;
++ this->bbt_td = &monahans_bbt_main;
++ this->bbt_md = &monahans_bbt_mirror;
++
++ /* If the NAND flash is small block flash, only 512-byte pagesize
++ * is supported.
++ * Adjust parameters of BBT what is depended on large block nand
++ * flash or small block nand flash.
++ */
++ if (dfc_context.flash_info->oob_size > 16) {
++ this->ecc.layout = &monahans_lb_nand_oob;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 2048;
++ this->ecc.bytes = 24;
++ this->bbt_td->offs = 2;
++ this->bbt_td->veroffs = 6;
++ this->bbt_md->offs = 2;
++ this->bbt_md->veroffs = 6;
++ this->badblockpos = NAND_LARGE_BADBLOCK_POS;
++ monahans_bbt_default.offs = NAND_LARGE_BADBLOCK_POS;
++ monahans_bbt_default.len = 2;
++ /* when scan_bbt() is executed, bbt version can get */
++ monahans_bbt_default.veroffs = 2;
++ } else {
++ this->ecc.layout = &monahans_sb_nand_oob;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 512;
++ this->ecc.bytes = 6;
++ this->bbt_td->offs = 8;
++ this->bbt_td->veroffs = 12;
++ this->bbt_md->offs = 8;
++ this->bbt_md->veroffs = 12;
++ this->badblockpos = NAND_SMALL_BADBLOCK_POS;
++ monahans_bbt_default.offs = NAND_SMALL_BADBLOCK_POS;
++ monahans_bbt_default.len = 1;
++ monahans_bbt_default.veroffs = 8;
++ }
++
++ info->context = &dfc_context;
++ /* TODO: allocate dma buffer and channel */
++
++ platform_set_drvdata(pdev, monahans_mtd);
++
++ if (nand_scan(monahans_mtd, 1)) {
++ printk(KERN_ERR "Nand scan failed\n");
++ ret = -ENXIO;
++ goto free_irq;
++ }
++
++ /* There is a potential limitation that no more partition can be
++ * added between MassStorage and BBT(last block).
++ *
++ * The last 127 blocks is reserved for relocation table, they aren't
++ * statistical data of mtd size and chip size.
++ *
++ * BBT partitions contains 4 blocks. Two blocks are used to store
++ * main descriptor, the other two are used to store mirror descriptor.
++ */
++ partition_info[PART_NUM - 1].size = (monahans_bbt_main.maxblocks
++ + monahans_bbt_mirror.maxblocks)
++ << this->phys_erase_shift;
++ partition_info[PART_NUM - 1].offset = this->chipsize
++ - partition_info[PART_NUM - 1].size;
++ partition_info[PART_NUM - 2].offset = partition_info[PART_NUM - 3].offset
++ + partition_info[PART_NUM - 3].size;
++ partition_info[PART_NUM - 2].size = this->chipsize
++ - partition_info[PART_NUM - 2].offset
++ - partition_info[PART_NUM - 1].size;
++ add_mtd_partitions(monahans_mtd, partition_info, PART_NUM);
++
++#ifdef CONFIG_DVFM
++ dvfm_notifier.client_data = info;
++ mhn_fv_register_notifier(&dvfm_notifier);
++#endif
++
++ return 0;
++
++free_irq:
++ free_irq(IRQ_NAND, info);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++free_cmd_dma:
++ pxa_free_dma(info->cmd_dma);
++free_data_dma:
++ pxa_free_dma(info->data_dma);
++free_buf:
++ dma_free_writecombine(dev, buf_len, info->data_desc, info->data_desc_addr);
++#else
++free_buf:
++ kfree(info->data_buf);
++#endif
++free_mtd:
++ kfree(monahans_mtd);
++out:
++ return ret;
++
++}
++
++static int __devexit monahans_df_remove(struct platform_device *dev)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ unsigned int data_buf_len = dfc_context.flash_info->page_size +
++ dfc_context.flash_info->oob_size;
++ unsigned int buf_len = ALIGN(2*sizeof(struct pxa_dma_desc), 32) +
++ ALIGN(data_buf_len, 32) + ALIGN(NAND_CMD_DMA_LEN, 32);
++#endif
++
++#ifdef CONFIG_DVFM
++ mhn_fv_unregister_notifier(&dvfm_notifier);
++#endif
++
++ platform_set_drvdata(dev, NULL);
++
++ del_mtd_device(mtd);
++ del_mtd_partitions(mtd);
++ free_irq(IRQ_NAND, info);
++#ifdef CONFIG_MTD_NAND_MONAHANS_DMA
++ pxa_free_dma(info->cmd_dma);
++ pxa_free_dma(info->data_dma);
++ dma_free_writecombine(dev, buf_len, info->data_desc,
++ info->data_desc_addr);
++#else
++ kfree(info->data_buf);
++#endif
++ kfree(mtd);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int monahans_df_suspend(struct platform_device *dev, pm_message_t state, u32 level)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++
++ if( SUSPEND_DISABLE == level){ /*SUSPEND_NOTIFY*/
++ if (info->state != STATE_READY) {
++ printk(KERN_ERR "current state is %d\n", info->state);
++ return -EAGAIN;
++ }
++ info->state = STATE_SUSPENDED;
++ /*
++ * The PM code need read the mobm from NAND.
++ * So the NAND clock can't be stop here.
++ * The PM code will cover this.
++ */
++ /* pxa_set_cken(CKEN_NAND, 0); */
++ }
++ return 0;
++}
++
++static int monahans_df_resume(struct platform_device *dev, u32 level)
++{
++ struct mtd_info *mtd = (struct mtd_info *)platform_get_drvdata(dev);
++ struct monahans_dfc_info *info = (struct monahans_dfc_info *)
++ (((struct nand_chip *)(mtd->priv))->priv);
++ int status;
++
++ if(RESUME_ENABLE == level){
++ if (info->state != STATE_SUSPENDED)
++ printk(KERN_WARNING "Error State after resume back\n");
++
++ info->state = STATE_READY;
++
++ pxa_set_cken(CKEN_NAND, 1);
++
++ status = dfc_init(&dfc_context, flash_config);
++ if (status) {
++ printk(KERN_ALERT "Monahans NAND device:"
++ "Nand Flash initialize failure!\n");
++ return -ENXIO;
++ }
++ }
++ return 0;
++}
++#endif
++
++#ifdef CONFIG_DVFM
++static int mhn_nand_dvfm_notifier(unsigned cmd, void *client_data, void *info)
++{
++ struct monahans_dfc_info *dfc_info =
++ (struct monahans_dfc_info *)client_data;
++
++ switch (cmd) {
++ case FV_NOTIFIER_QUERY_SET :
++ if (dfc_info->state != STATE_READY)
++ return -1;
++ break;
++
++ case FV_NOTIFIER_PRE_SET :
++ break;
++
++ case FV_NOTIFIER_POST_SET :
++ break;
++ }
++
++ return 0;
++}
++#endif
++
++static struct platform_driver monahans_df_driver = {
++ .probe = monahans_df_probe,
++ .remove = __devexit_p(monahans_df_remove),
++#ifdef CONFIG_PM
++ .suspend = monahans_df_suspend,
++ .resume = monahans_df_resume,
++#endif
++ .driver = {
++ .name = "monahans-nand-flash",
++ }
++};
++
++static void __exit monahans_df_cleanup(void)
++{
++ printk(KERN_ERR "Nand driver registered\n");
++ platform_driver_unregister(&monahans_df_driver);
++}
++
++static int __init monahans_df_init(void)
++{
++ return platform_driver_register(&monahans_df_driver);
++}
++
++module_init(monahans_df_init);
++module_exit(monahans_df_cleanup);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jingqing.xu (jingqing.xu@intel.com)");
++MODULE_DESCRIPTION("Glue logic layer for NAND flash on monahans DFC");
++
++
+Index: linux-2.6.23/arch/arm/mach-pxa/zylonite.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/zylonite.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/arch/arm/mach-pxa/zylonite.c 2008-02-13 09:11:02.000000000 +0000
+@@ -29,6 +29,8 @@
+ #include "generic.h"
+
+ int gpio_backlight;
++int gpio_vsync;
++int gpio_vsync1;
+ int gpio_eth_irq;
+
+ int lcd_id;
+@@ -54,6 +56,16 @@
+ .resource = smc91x_resources,
+ };
+
++static struct platform_device nand_device = {
++ .name = "monahans-nand-flash",
++ .id = -1,
++};
++
++static struct platform_device touch_device = {
++ .name = "pxa2xx-touch",
++ .id = -1,
++};
++
+ #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULES)
+ static void zylonite_backlight_power(int on)
+ {
+@@ -96,7 +108,7 @@
+ };
+
+ static struct pxafb_mode_info sharp_ls037_modes[] = {
+- [0] = {
++ [1] = {
+ .pixclock = 158000,
+ .xres = 240,
+ .yres = 320,
+@@ -109,8 +121,8 @@
+ .lower_margin = 3,
+ .sync = 0,
+ },
+- [1] = {
+- .pixclock = 39700,
++ [0] = {
++ .pixclock = 45000,
+ .xres = 480,
+ .yres = 640,
+ .bpp = 16,
+@@ -137,6 +149,11 @@
+ /* backlight GPIO: output, default on */
+ gpio_direction_output(gpio_backlight, 1);
+
++ gpio_direction_output(gpio_vsync, 0);
++ gpio_direction_output(gpio_vsync1, 0);
++
++ printk(KERN_ERR "LCD ID is %x\n", lcd_id);
++
+ if (lcd_id & 0x20) {
+ set_pxa_fb_info(&zylonite_sharp_lcd_info);
+ return;
+@@ -169,6 +186,8 @@
+ smc91x_resources[1].start = gpio_to_irq(gpio_eth_irq);
+ smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq);
+ platform_device_register(&smc91x_device);
++ platform_device_register(&nand_device);
++ platform_device_register(&touch_device);
+
+ zylonite_init_lcd();
+ }
+Index: linux-2.6.23/arch/arm/mach-pxa/zylonite_pxa300.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/zylonite_pxa300.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/arch/arm/mach-pxa/zylonite_pxa300.c 2008-02-13 14:01:13.000000000 +0000
+@@ -62,12 +62,12 @@
+ GPIO110_UART3_RXD,
+
+ /* AC97 */
+- GPIO23_AC97_nACRESET,
++ /*GPIO23_AC97_nACRESET,
+ GPIO24_AC97_SYSCLK,
+ GPIO29_AC97_BITCLK,
+ GPIO25_AC97_SDATA_IN_0,
+ GPIO27_AC97_SDATA_OUT,
+- GPIO28_AC97_SYNC,
++ GPIO28_AC97_SYNC,*/
+
+ /* Keypad */
+ GPIO107_KP_DKIN_0,
+@@ -104,6 +104,41 @@
+ /* Ethernet */
+ GPIO2_nCS3,
+ GPIO99_GPIO,
++
++ /* NAND */
++ MFP_CFG_X(DF_INT_RnB, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nRE_nOE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nWE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_CLE_nOE, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nADV1_ALE, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS0, AF1, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_nCS1, AF0, DS10X, PULL_LOW),
++ MFP_CFG_X(DF_IO0, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO1, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO2, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO3, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO4, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO5, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO6, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO7, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO8, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO9, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO10, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO11, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO12, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO13, AF1, DS08X, PULL_LOW),
++ MFP_CFG_X(DF_IO14, AF1, DS08X, PULL_LOW),
++
++ /* AC97 */
++ MFP_CFG_X(GPIO23, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO27, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO28, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO29, AF1, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO25, AF1, DS03X, PULL_LOW),
++
++ MFP_CFG_X(GPIO26, AF0, DS01X, PULL_LOW), /* Interrupt */
++ MFP_CFG_X(GPIO24, AF0, DS03X, PULL_LOW), /*SYSCLK external */
++ MFP_CFG_X(GPIO11, AF0, DS01X, PULL_LOW),
+ };
+
+ static mfp_cfg_t pxa310_mfp_cfg[] __initdata = {
+@@ -163,6 +198,9 @@
+ pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]);
+ }
+
++extern int gpio_vsync;
++extern int gpio_vsync1;
++
+ void __init zylonite_pxa300_init(void)
+ {
+ if (cpu_is_pxa300() || cpu_is_pxa310()) {
+@@ -174,6 +212,8 @@
+
+ /* GPIO pin assignment */
+ gpio_backlight = mfp_to_gpio(MFP_PIN_GPIO20);
++ gpio_vsync = mfp_to_gpio(GPIO76_LCD_VSYNC);
++ gpio_vsync1 = mfp_to_gpio(GPIO71_LCD_LDD_17);
+ }
+
+ if (cpu_is_pxa300()) {
+Index: linux-2.6.23/drivers/video/pxafb.c
+===================================================================
+--- linux-2.6.23.orig/drivers/video/pxafb.c 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/drivers/video/pxafb.c 2008-02-13 00:59:45.000000000 +0000
+@@ -1543,9 +1543,9 @@
+ if (inf->lccr0 & LCCR0_INVALID_CONFIG_MASK)
+ dev_warn(&dev->dev, "machine LCCR0 setting contains illegal bits: %08x\n",
+ inf->lccr0 & LCCR0_INVALID_CONFIG_MASK);
+- if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
+- dev_warn(&dev->dev, "machine LCCR3 setting contains illegal bits: %08x\n",
+- inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
++ //if (inf->lccr3 & LCCR3_INVALID_CONFIG_MASK)
++ // dev_warn(&dev->dev, "machine LCCR3 setting contains illegal bits: %08x\n",
++ // inf->lccr3 & LCCR3_INVALID_CONFIG_MASK);
+ if (inf->lccr0 & LCCR0_DPD &&
+ ((inf->lccr0 & LCCR0_PAS) != LCCR0_Pas ||
+ (inf->lccr0 & LCCR0_SDS) != LCCR0_Sngl ||
+Index: linux-2.6.23/include/asm-arm/arch-pxa/mfp-pxa300.h
+===================================================================
+--- linux-2.6.23.orig/include/asm-arm/arch-pxa/mfp-pxa300.h 2008-02-13 00:59:45.000000000 +0000
++++ linux-2.6.23/include/asm-arm/arch-pxa/mfp-pxa300.h 2008-02-13 00:59:45.000000000 +0000
+@@ -175,13 +175,13 @@
+ #define GPIO68_LCD_LDD_14 MFP_CFG_DRV(GPIO68, AF1, DS01X)
+ #define GPIO69_LCD_LDD_15 MFP_CFG_DRV(GPIO69, AF1, DS01X)
+ #define GPIO70_LCD_LDD_16 MFP_CFG_DRV(GPIO70, AF1, DS01X)
+-#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)
++#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF0, DS01X)
+ #define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X)
+ #define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X)
+ #define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X)
+ #define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS01X)
+ #define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X)
+-#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X)
++#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF0, DS01X)
+
+ #define GPIO15_LCD_CS_N MFP_CFG_DRV(GPIO15, AF2, DS01X)
+ #define GPIO127_LCD_CS_N MFP_CFG_DRV(GPIO127, AF1, DS01X)
diff --git a/recipes/linux/linux-kexecboot-2.6.26/zylonite_touch-r0.patch b/recipes/linux/linux-kexecboot-2.6.26/zylonite_touch-r0.patch
new file mode 100644
index 0000000000..1c00696051
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.26/zylonite_touch-r0.patch
@@ -0,0 +1,1548 @@
+Index: linux-2.6.23/drivers/input/touchscreen/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/input/touchscreen/Kconfig 2008-02-13 01:12:29.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/Kconfig 2008-02-13 01:13:20.000000000 +0000
+@@ -54,6 +54,12 @@
+ To compile this driver as a module, choose M here: the
+ module will be called corgi_ts.
+
++config TOUCHSCREEN_ZYLONITE
++ tristate "Zylonite touchscreen driver"
++ default y
++ help
++ Say Y here for the Zylonite touchscreen driver
++
+ config TOUCHSCREEN_FUJITSU
+ tristate "Fujitsu serial touchscreen"
+ select SERIO
+Index: linux-2.6.23/drivers/input/touchscreen/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/input/touchscreen/Makefile 2008-02-13 01:12:29.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/Makefile 2008-02-13 01:13:38.000000000 +0000
+@@ -19,3 +19,4 @@
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_TSC2101) += tsc2101_ts.o
++obj-$(CONFIG_TOUCHSCREEN_ZYLONITE) += zylonite-ts.o
+Index: linux-2.6.23/drivers/input/touchscreen/zylonite-ts.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.23/drivers/input/touchscreen/zylonite-ts.c 2008-02-13 16:19:15.000000000 +0000
+@@ -0,0 +1,1517 @@
++/*
++ * drivers/input/touchscreen/mhn_audio_touch.c.
++ *
++ * Author: bridge.wu@marvell.com
++ * Created: Nov 17, 2006
++ * Copyright: Marvell Corporation.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/initval.h>
++
++#include <asm/semaphore.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/mfp.h>
++//#include <asm/arch/ipmc.h>
++#include <linux/suspend.h>
++#include <linux/spinlock.h>
++
++//#include <asm/arch/codec/acodec.h>
++//#include <asm/arch/mhn_audio_plat.h>
++
++#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
++#define AC97_DIV __REG(0x41340014)
++
++#define ALSA_ZY_CARD_DEBUG
++#undef ALSA_ZY_CARD_DEBUG
++
++#define WM_9713_ID 0x4C13 /* this should be the 7E register value */
++
++#ifdef ALSA_ZY_CARD_DEBUG
++#define dbg(format, arg...) printk(KERN_DEBUG format, ##arg)
++#else
++#define dbg(format, arg...)
++#endif
++
++#define DEBUG
++#undef DEBUG
++#ifdef DEBUG
++unsigned int start_time;
++unsigned int end_time;
++unsigned int time;
++#define PRINT_TIME() do {\
++ time = ((end_time > start_time))?\
++ (end_time - start_time)*100/325:\
++ (0xffffffff - start_time + end_time)*100/325;\
++ printk("\n%s:%dus\n", __FUNCTION__, time);\
++} while(0)
++#endif
++
++
++
++
++/* 9713 specific
++ * Register Name Index
++ */
++#define RESET 0X00
++#define SPEAKER_VOLUME 0X02
++#define HEADPHONE_VOLUME 0X04
++#define OUT3_OUT4_VOLUME 0X06
++#define MONOVOL_MONOINPGA_ROUTE 0X08
++#define LINE_IN_PGA_VOL_ROUTE 0X0A
++#define DAC_PGA_VOL_ROUTE 0X0C
++#define MIC_PGA_VOLUME 0X0E
++#define MIC_ROUTING 0X10
++#define REC_PGA_VOL 0X12
++#define REC_ROUTE_MUX_SEL 0X14
++#define PCBEEP_VOL_ROUTE 0X16
++#define VXDAC_VOLUME_ROUTE 0X18
++#define AUX_DAC_VOL_ROUTE 0X1A
++#define OUTPUT_PGA_MUX 0X1C
++#define DAC_3D_CTRL_INV_MUX_SEL 0X1E
++#define DAC_TONE_CTRL 0X20
++#define MIC_BIAS 0X22
++#define OUTPUT_VOL_MAPPING_JACK 0X24
++#define POWERDOWN_CTRL_STAT 0X26
++#define EXTENDED_AUD_ID 0X28
++#define EXTENDED_AUD_STAT_CTRL 0X2A
++#define AUDIO_DAC_RATE 0X2C
++#define AUX_DAC_RATE 0X2E
++#define AUDIO_ADC_RATE 0X32
++#define PCM_CODEC_CTRL 0X36
++#define SPDIF_CTRL 0X3A
++#define POWER_DOWN_1 0X3C
++#define POWER_DOWN_2 0X3E
++#define GENERAL_PURPOSE_WM_13 0X40
++#define FAST_POWERUP_CTRL 0X42
++#define MCLK_PLL_CTRL_1 0X44
++#define MCLK_PLL_CTRL_2 0X46
++#define GPIO_PIN_CFG 0X4C
++#define GPIO_PIN_POL_TYPE 0X4E
++#define GPIO_PIN_STICKY 0X50
++#define GPIO_PIN_WAKEUP 0X52
++#define GPIO_PIN_STATUS 0X54
++#define GPIO_PIN_SHARING 0X56
++#define GPIO_PULL_UP_DOWN_CTRL 0X58
++#define ADD_FUNC_1 0X5A
++#define ADD_FUNC_2 0X5C
++#define ALC_CTRL 0X60
++#define ALC_NOISE_GATE_CTRL 0X62
++#define AUX_DAC_INPUT_CTRL 0X64
++#define TEST_REG_1 0X68
++#define TEST_REG_2 0X6A
++#define TEST_REG_3 0X6C
++#define TEST_REG_4 0X6E
++#define DIGITIZER_1_WM13 0x74
++#define DIGITIZER_2_WM13 0x76
++#define DIGITIZER_3_WM13 0x78
++#define DIGITIZER_READ_BACK 0x7a
++#define VENDOR_ID1 0x7c
++#define VENDOR_ID2 0x7e
++
++#define ZY_TOUCH_SAMPLE_X 1
++#define ZY_TOUCH_SAMPLE_Y 2
++
++#define ZY_EVENT_TYPE_NONE 0
++#define ZY_EVENT_TYPE_PDN 1
++
++
++typedef enum _zy_acodec_error_t {
++ ZY_ACODEC_SUCCESS = 0, /* successful completion of a function */
++ ZY_ACODEC_GENERAL_SW_ERR, /* null pointer to registers or other software error */
++ ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT, /* time-out for waiting for respponse */
++ ZY_ACODEC_SAMPLERATE_NOT_SUPPORTED, /* the sample rate is not supported either in controller or codec */
++ ZY_ACODEC_FEATURE_NO_SUPPORTED, /* this codec feature is not supported */
++ ZY_ACODEC_GENERAL_HW_ERR ,/* other hardware error besides time out */
++ ZY_ACODEC_ROUTE_NO_SUPPORTED, /* the codec can not set the route required */
++ ZY_ACODEC_SLEEP /* the codec is sleep */
++} zy_acodec_error_t;
++
++typedef unsigned int zy_acodec_device_id_t;
++
++typedef enum _codec_state {
++ ZY_CODEC_SLEEP = 0,
++ ZY_CODEC_WAKEUP = 1
++} acodec_state_t;
++
++typedef enum {
++ ZY_FM = 0,
++ ZY_MIC1 = 1,
++ ZY_MIC2 = 2,
++ ZY_SPEAKER =3,
++ ZY_HEADSET =4,
++ ZY_HANDSET =5,
++} vol_port_type_t;
++
++typedef struct _context_t {
++ int use_count; /* probe/remove and suspend/resume usage count, sync among multiple devices */
++ zy_acodec_device_id_t acodec_id;/* - an ID that uniquely identifies the codec to be used */
++ unsigned long init_number; /* used by driver to track whether it is inited or not */
++
++ void *p_voice_reg; /* pointer to Monahans registers that has PCM interface to codec */
++ void *p_hifi_reg; /* pointer to Monahans registers that has hifi interface to codec */
++ void *p_ctrl_reg; /* pointer to Monahans registers that has control interface to codec */
++ int *p_ost_regs; /* needed for time out */
++ void *p_save_memory; /* pointer to a memory region to save context while suspend */
++ void *p_zy_scenario; /* pointer to the scenario data structure */
++ long u_max_read_write_time_out_ms;/* input the max time to wait in milliseconds before giving up on a read or write operation */
++ long u_max_setup_time_out_ms; /* input the maximum time in milliseconds to wait during initial setup of the ACODEC controller and codec */
++
++ /* member functions these pointers must be set by */
++ zy_acodec_error_t (* g_pfn_codec_specific_init) (struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_codec_specific_dinit) (struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_acodec_read) (struct _context_t *p_dev_context, unsigned short reg_addr, unsigned short *p_reg_value);
++ zy_acodec_error_t (* g_pfn_acodec_write) (struct _context_t *p_dev_context, unsigned short reg_addr, unsigned short reg_value);
++
++ /* add for route */
++ zy_acodec_error_t (* g_pfn_set_route) (struct _context_t *p_device_context, unsigned short * rout_map ,unsigned short* current_map);
++ /* add for sleep the codec */
++ zy_acodec_error_t (* g_pfn_sleep_codec) (struct _context_t *p_device_context);
++ /* add for Wake up the codec */
++ zy_acodec_error_t (* g_pfn_wake_codec) (struct _context_t *p_device_context);
++ /* add for get codec state */
++ zy_acodec_error_t (* g_pfn_get_state) (struct _context_t *p_device_context, acodec_state_t *p_state);
++ /* add for volume */
++ zy_acodec_error_t (* g_pfn_get_vol)(struct _context_t *p_device_context, vol_port_type_t port, unsigned short *gain_in_db);
++ zy_acodec_error_t (* g_pfn_set_vol)(struct _context_t *p_device_context, vol_port_type_t port, unsigned short gain_in_db);
++
++ void (* g_pfn_get_event)(struct _context_t *p_device_context, unsigned char * event_type);
++ void (* g_pfn_event_ack)(struct _context_t *p_device_context, unsigned char event_type);
++ zy_acodec_error_t (* g_pfn_enable_touch)(struct _context_t *p_device_context);
++ zy_acodec_error_t (* g_pfn_disable_touch)(struct _context_t *p_device_context);
++} zy_acocec_context_t, *p_zy_acocec_context_t;
++
++
++
++
++
++static p_zy_acocec_context_t p_zy_codec_ctxt = NULL;
++
++#include <linux/input.h>
++//#include <asm/arch/codec/wm9713.h>
++
++#define PEN_DOWN 1
++#define PEN_UP 0
++#define TS_SAMPLE_INTERVAL 1
++
++typedef struct {
++ struct input_dev *idev;
++ struct timer_list *timer;
++ int use_count;
++} codec_zy_ts_t;
++
++codec_zy_ts_t codec_zy_ts;
++
++static struct input_dev *codec_zy_ts_input;
++
++#ifdef CONFIG_PM
++static volatile int touch_suspend = 0 ;
++#endif
++
++#define ZY_AC97_CODEC_REGS_NUM 0x40
++
++typedef struct
++{ // Register symbol // Usage
++ volatile unsigned long pocr; // PCM Out Control Register
++ volatile unsigned long picr; // PCM In Control Register
++ volatile unsigned long mccr; // Mic In Control Register
++ volatile unsigned long gcr; // Global Control Register
++ volatile unsigned long posr; // PCM Out Status Register
++ volatile unsigned long pisr; // PCM In Status Register
++ volatile unsigned long mcsr; // Mic In Status Register
++ volatile unsigned long gsr; // Global Status Register
++ volatile unsigned long car; // CODEC Access Register
++ volatile unsigned long pcscr; // PCM Surround Out Control
++ volatile unsigned long pcssr; // PCM Surround Out Status
++ volatile unsigned long pcsdr; // PCM Surround Out Data
++ volatile unsigned long pcclcr; // PCM Center/LFE Out Control
++ volatile unsigned long pcclsr; // PCM Center/LFE Out Status
++ volatile unsigned long pccldr; // PCM Center/LFE Out Data
++ volatile unsigned long reserved1; //
++ volatile unsigned long pcdr; // PCM FIFO Data Register
++ volatile unsigned long reserved2 [0x7]; // 0x4050-0044 through 0x4050-005C
++ volatile unsigned long mcdr; // Mic-in FIFO Data Register
++ volatile unsigned long reserved3 [0x27]; // 0x4050-0064 through 0x4050-00FC
++ volatile unsigned long mocr; // MODEM Out Control Register
++ volatile unsigned long reserved4;
++ volatile unsigned long micr; // MODEM In Control Register
++ volatile unsigned long reserved5;
++ volatile unsigned long mosr; // MODEM Out Status Register
++ volatile unsigned long reserved6;
++ volatile unsigned long misr; // MODEM In Status Register
++ volatile unsigned long reserved7 [0x9]; // 0x4050-011C through 0x4050-013C
++ volatile unsigned long modr; // MODEM FIFO Data Register
++ volatile unsigned long reserved8 [0x2F]; // 0x4050-0144 through 0x4050-01FC
++ // Primary Audio CODEC registers access
++ volatile unsigned long codec_regs_primary_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 01 Audio CODEC registers access
++ volatile unsigned long codec_regs_secondary_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Primary MODEM CODEC registers access
++ volatile unsigned long codec_regs_primary_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 01 MODEM CODEC registers access
++ volatile unsigned long codec_regs_secondary_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 10 MODEM CODEC registers access
++ volatile unsigned long codec_regs_third_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 11 MODEM CODEC registers access
++ volatile unsigned long codec_regs_fouth_mdm [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 10 Audio CODEC registers access
++ volatile unsigned long codec_regs_third_aud [ZY_AC97_CODEC_REGS_NUM];
++ // Secondary ID 11 Audio CODEC registers access
++ volatile unsigned long codec_regs_fouth_aud [ZY_AC97_CODEC_REGS_NUM];
++} zy_ac97_acodec_t, *p_zy_ac97acodec_t ;
++
++
++/* Constants for the Global Control Register and Global Status Register */
++
++// AC97 Global Control Register bit mask constants
++
++#define ZY_AC97_GCR_GIE_MSK (1u << 0 )
++#define ZY_AC97_GCR_COLD_RESET_MSK (1u << 1 )
++#define ZY_AC97_GCR_WARM_RESET_MSK (1u << 2 )
++#define ZY_AC97_GCR_LINK_OFF_MSK (1u << 3 )
++#define ZY_AC97_GCR_PCRSM_IEN_MSK (1u << 4 )
++#define ZY_AC97_GCR_SCRSM_IEN_MSK (1u << 5 )
++#define ZY_AC97_GCR_PCRDY_IEN_MSK (1u << 8 )
++#define ZY_AC97_GCR_SCRDY_IEN_MSK (1u << 9 )
++#define ZY_AC97_GCR_SDONE_IE_MSK (1u << 18)
++#define ZY_AC97_GCR_CDONE_IE_MSK (1u << 19)
++#define ZY_AC97_GCR_nDMAEN_MSK (1u << 24)
++#define ZY_AC97_GCR_CLKBPB_MSK (1u << 31)
++#define ZY_AC97_GCR_FRCRST_MSK (1u << 30)
++// Global Status Register bit mask constants
++
++#define ZY_AC97_GSR_GSCI_MSK (1u << 0 )
++#define ZY_AC97_GSR_MIINT_MSK (1u << 1 )
++#define ZY_AC97_GSR_MOINT_MSK (1u << 2 )
++#define ZY_AC97_GSR_ACOFFD_MSK (1u << 3 )
++#define ZY_AC97_GSR_PIINT_MSK (1u << 5 )
++#define ZY_AC97_GSR_POINT_MSK (1u << 6 )
++#define ZY_AC97_GSR_MINT_MSK (1u << 7 )
++#define ZY_AC97_GSR_PCRDY_MSK (1u << 8 )
++#define ZY_AC97_GSR_SCRDY_MSK (1u << 9 )
++#define ZY_AC97_GSR_PCRSM_MSK (1u << 10)
++#define ZY_AC97_GSR_SCRSM_MSK (1u << 11)
++#define ZY_AC97_GSR_SLT12_BITS_MSK (7u << 12)
++#define ZY_AC97_GSR_RCS_ERR_MSK (1u << 15)
++#define ZY_AC97_GSR_SDONE_MSK (1u << 18)
++#define ZY_AC97_GSR_CDONE_MSK (1u << 19)
++
++
++// Bit mask and values for CAIP bit in car register.
++#define ZY_AC97_CAR_CAIP_MSK (0x1<<0)
++#define ZY_AC97_CAR_CAIP_LOCKED (0x1<<0)
++#define ZY_AC97_CAR_CAIP_CLEAR (0<<0)
++
++/* Constants for FIFO status reporting and control */
++
++// One bit location is used to report FIFO error conditions and clear
++// interrupts on those conditions in the various non-global status registers.
++
++// ZY_AC97_FIFOSTAT_FIFOE is used in:
++ // posr
++ // pisr
++ // mcsr
++ // mosr
++ // misr
++
++#define ZY_AC97_FIFOSTAT_FIFOE (1u << 4)
++#define ZY_AC97_FIFOSTAT_EOC (1u << 3)
++#define ZY_AC97_FIFOSTAT_FSR (1u << 2)
++
++// A different bit location is used to enable or disable interrupts based on
++// FIFO error conditions in the various non-global control registers.
++
++// ZY_AC97_FIFOCTRL_FEIE is used in:
++ // pocr
++ // picr
++ // mccr
++ // mocr
++ // micr
++
++#define ZY_AC97_FIFOCTRL_FEIE (1u << 3)
++#define ZY_AC97_FIFOCTRL_FSRIE (1u << 1)
++
++/*
++*******************************************************************************
++ AC'97 Codec Registers Location and Bit Definition
++*******************************************************************************
++*/
++
++/* */
++
++ // Includes symbolic values for certain proprietary register asssignments
++ // in AC'97 devices that might be used with ZY_AC97.
++
++ // Valid for subset of R 2.1 specification.
++ // Leading "e" in comment means it is an "expanded" register definition as
++ // found in one or more of the Appendices A-D of the R 2.1 specification.
++ // Appendix identifier will immediately follow the "e", such as "eA"
++ // R/O indicates read-only
++ // Registers not supported by the assumed controller will be commented out.
++
++#define ZY_AC97_CR_RESET_ID 0x00 // RESET CODEC TO DEFAULT, get ID info
++#define ZY_AC97_CR_MASTER_VOLUME 0x02 // LINE OUT VOLUME
++#define ZY_AC97_CR_HEADPHONE_VOLUME 0x04 //
++#define ZY_AC97_CR_MASTER_VOLUME_MONO 0x06 //
++#define ZY_AC97_CR_MASTER_TONE_R_L 0x08 //
++#define ZY_AC97_CR_PC_BEEP_VOLUME 0x0A //
++#define ZY_AC97_CR_PHONE_VOLUME 0x0C //
++#define ZY_AC97_CR_MIC_VOLUME 0x0E // micrOPHONE VOLUME/ AGC
++#define ZY_AC97_CR_LINE_IN_VOLUME 0x10 // LINE IN VOLUME
++#define ZY_AC97_CR_CD_VOLUME 0x12 //
++#define ZY_AC97_CR_VIDEO_VOLUME 0x14 //
++#define ZY_AC97_CR_AUX_VOLUME 0x16 //
++#define ZY_AC97_CR_PCM_OUT_VOLUME 0x18 //
++#define ZY_AC97_CR_RECORD_SELECT 0x1A // SELECT LINE IN OR micrOPHONE
++#define ZY_AC97_CR_RECORD_GAIN 0x1C //
++#define ZY_AC97_CR_RECORD_GAIN_MIC 0x1E //
++#define ZY_AC97_CR_GENERAL_PURPOSE 0x20 //
++#define ZY_AC97_CR_CONTROL_3D 0x22 //
++#define ZY_AC97_CR_POWERDOWN_CTRL_STAT 0x26 // POWER MANAGEMENT
++#define ZY_AC97_CR_E_AUDIO_ID 0x28 // eA Extended audio sprt info, R/O
++#define ZY_AC97_CR_E_AUDIO_CTRL_STAT 0x2A // eA Extended audio stat + control
++
++//
++// Audio Sample Rate Control Registers, 0x2C - 0x34
++//
++ // eA PCM Front DAC rate control
++#define ZY_AC97_CR_E_ASR_PCM_FRNT_DAC_RT 0x2C // (output slots 3, 4, 6)
++#define ZY_AC97_CR_E_ASR_PCM_LR_ADC_RT 0x32 // eA PCM L+R ADC rate control (3+4)
++#define ZY_AC97_CR_E_ASR_MIC_ADC_RT 0x34 // eA PCM Mic ADC rate control (5)
++
++
++#define ZY_AC97_CR_E_MDM_GPIO_PIN_STAT 0x54
++//
++// 5Ah-7Ah: Vendor Reserved
++//
++//
++// 7Ch-7Eh: Vendor ID registers. Optional but standardized for Plug'n'Play
++//
++#define ZY_AC97_CR_VENDOR_ID1 0x7C
++#define ZY_AC97_CR_VENDOR_ID2 0x7E
++
++#define ZY_AC97_CR_MAX ZY_AC97_CR_VENDOR_ID2
++
++#define ZY_AC97_CR_END_OF_LIST (ZY_AC97_CR_MAX + 2)
++
++
++
++/* Other Constants */
++
++// For accessing the Codec mixer registers, each increment of one 32-bit word
++// in processor space increments the addressed mixer register by two.
++// This does not cause any ambiguities because only even mixer register
++// addresses are currently supported (AC '97 spec, R 2.2)
++#define ZY_AC97_CODEC_REGS_PER_WORD 2
++
++/* Default timeout and holdtime settings */
++
++// timeout in reading and writing codec registers through AC link
++#define ZY_AC97_RW_TIMEOUT_DEF 200 //unit is us
++
++// timeout in waiting for codec's ready signal during setup process
++#define ZY_AC97_SETUP_TIMEOUT_DEF 500 //unit is us
++
++// timeout in waiting for locking the link successfully
++#define ZY_AC97_LOCK_TIMEOUT_DEF 300 //unit is us
++
++// timeout in shutting down the link
++#define ZY_AC97_LINKOFF_TIMEOUT_DEF 500 //unit is us
++
++// holdtime for keeping nReset signal active(low) in AC link
++#define ZY_AC97_COLD_HOLDTIME 100 //unit is us
++
++/*
++*******************************************************************************
++ ZY AC97 data structure used in function interface
++*******************************************************************************
++*/
++
++typedef struct
++{
++ unsigned long pocr; // PCM Out Control Register
++ unsigned long picr; // PCM In Control Register
++ unsigned long mccr; // Mic In Control Register
++ unsigned long gcr; // Global Control Register
++ unsigned long pcscr; // PCM Surround Out Control
++ unsigned long pcclcr; // PCM Center/LFE Out Control
++ unsigned long mocr; // MODEM Out Control Register
++ unsigned long micr; // MODEM In Control Register
++}zy_ac97_save_context_t;
++
++
++#define AC97_SAVE_CONTEXT_SIZE (sizeof(zy_ac97_save_context_t))
++
++static int zy_ac97_acodec_link_lock(p_zy_ac97acodec_t p_ac97_reg)
++{
++ int status = 1;
++ volatile unsigned long car_tmp;
++
++ car_tmp = p_ac97_reg->car;
++ if (car_tmp & ZY_AC97_CAR_CAIP_MSK) /* "1" in CAIP bit means lock failed. */
++ {
++ status = 0;
++ }
++ return (status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_write (zy_acocec_context_t *p_dev_context, unsigned short offset, unsigned short data)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ int got_link;
++ unsigned long time_remaining;
++ volatile unsigned long * p_codec_reg;
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_dev_context->p_ctrl_reg);
++ unsigned long max_rw_time_out_us = (p_dev_context->u_max_read_write_time_out_ms) * 1000;
++
++
++ if(offset == ZY_AC97_CR_E_MDM_GPIO_PIN_STAT)
++ {/* it is a special register and sent out on slot 12 */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_mdm[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++ /* The data will be sent out on slot 12. */
++ *p_codec_reg = (unsigned long)data;
++ goto done;
++ }
++
++ /* Point to specified register within area mapped to target codec regs */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_aud[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++
++
++ /* Lock the ACLINK */
++ time_remaining = ZY_AC97_LOCK_TIMEOUT_DEF;
++ do
++ {
++ got_link = zy_ac97_acodec_link_lock(p_ac97_reg);
++ if (0 == got_link) /* 1 usec is a long time. Skip delay if possible. */
++ {
++ udelay(1);
++ }
++ } /* Wait while time remaining and ACLINK not available */
++ while (time_remaining-- && (0 == got_link));
++
++ if (0 == got_link) /* Didn't get the ACLINK */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ printk(KERN_ERR "AC97 Write Link Timeout\n");
++ }
++ else /* We got the link. Perform the write operation and don't wait. */
++ {
++ /* First, clear old write status indication CDONE by writing a ONE to that bit. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_CDONE_MSK;
++
++ *p_codec_reg = (unsigned long)data; /* Now the write! */
++
++ /* Wait until write cycle is complete. There should be a way
++ * to do this speculatively at the beginning of the procedure.
++ * Need to discover it. Too inefficient to always wait.
++ */
++
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and command I/O still incomplete. */
++ while ( (time_remaining--) && !(p_ac97_reg->gsr & ZY_AC97_GSR_CDONE_MSK));
++ if (!(p_ac97_reg->gsr & ZY_AC97_GSR_CDONE_MSK))
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ p_ac97_reg->car = ZY_AC97_CAR_CAIP_CLEAR;
++ }
++ } /* Got AC link */
++
++done:
++ return(status);
++} /* Ac97CtrlCodecWrite() */
++
++#define CKENA __REG(0x4134000C) /* A Clock Enable Register */
++#define CKENB __REG(0x41340010)
++
++zy_acodec_error_t zy_ac97_acodec_read (zy_acocec_context_t *p_dev_context, unsigned short offset, unsigned short *pdata)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ int got_link;
++ unsigned long time_remaining;
++ volatile unsigned long * p_codec_reg;
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_dev_context->p_ctrl_reg);
++ unsigned long max_rw_time_out_us = (p_dev_context->u_max_read_write_time_out_ms) * 1000;
++
++ /* Point to specified register within area mapped to target codec regs */
++ p_codec_reg = &(p_ac97_reg->codec_regs_primary_aud[0]);
++ p_codec_reg += offset / ZY_AC97_CODEC_REGS_PER_WORD;
++
++ /* Lock the ACLINK */
++ time_remaining = ZY_AC97_LOCK_TIMEOUT_DEF;
++ do
++ {
++ got_link = zy_ac97_acodec_link_lock(p_ac97_reg);
++ if (0 == got_link) /* 1 usec is a long time. Skip delay if possible. */
++ {
++ udelay(1);
++ }
++ } /* Wait while time remaining and ACLINK not available */
++ while (time_remaining-- && (0 == got_link));
++
++ if (0 == got_link) /* Didn't get the ACLINK */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ printk(KERN_ERR "AC97 Read Link Timeout\n");
++ }
++ else /* We got the link. Perform the write operation and don't wait. */
++ {
++ /* First, clear old read status indications. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_SDONE_MSK | ZY_AC97_GSR_RCS_ERR_MSK;
++
++ *pdata = (unsigned short)(*p_codec_reg); /* This is THE DUMMY READ. */
++
++ /* Wait for read I/O with codec to complete before doing real read. */
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and read I/O still incomplete */
++ while( (time_remaining--) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK)) );
++
++ if ((p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_RCS_ERR_MSK)) )
++ {
++ if (p_ac97_reg->gsr & ZY_AC97_GSR_RCS_ERR_MSK)
++ {/* timeout indicated by RCS bit */
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++ /* succeed in reading. clear status bits first. */
++ p_ac97_reg->gsr = ZY_AC97_GSR_SDONE_MSK | ZY_AC97_GSR_RCS_ERR_MSK;
++ *pdata = (unsigned short)(*p_codec_reg); /* THE REAL READ. */
++ if (*pdata == 0xffff)
++ {/* timeout indicated by returned value */
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++ /* check later: is second waiting really needed? */
++ time_remaining = max_rw_time_out_us;
++ do
++ {
++ udelay(1);
++ } /* Wait while time remaining and read I/O still incomplete */
++ while( (time_remaining--) && (!(p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK)) );
++ //printk(KERN_ERR "AC97 Read Result %d\n", (p_ac97_reg->gsr & ZY_AC97_GSR_SDONE_MSK) );
++ }
++ else /* failed */
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ p_ac97_reg->car = ZY_AC97_CAR_CAIP_CLEAR;
++ //printk(KERN_ERR "AC97 Read Link Timeout2 %x %x %x\n", CKENA, OSCC, CKENB);
++ } /* else (OK to do real read) */
++
++ } /* else (We got the link. Perform the read operations.) */
++
++ return (status);
++}
++
++
++
++zy_acodec_error_t zy_acodec_get_adc_sample(zy_acocec_context_t *p_device_context, unsigned short *p_sample_data, unsigned short adc_type, int *p_pen_down)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++ unsigned long wait;
++
++ if (adc_type == ZY_TOUCH_SAMPLE_X)
++ {
++ value = 0x202;
++ }
++ else
++ {/* Y sample */
++ value = 0x204;
++ }
++
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_1_WM13, value);
++
++ wait = 0;
++ do
++ {
++ status = zy_ac97_acodec_read(p_device_context, DIGITIZER_1_WM13, &value);
++ if ( !(value & 0x200 ) )
++ {
++ break;
++ }
++ }while ( 100 > wait++ );
++
++ status = zy_ac97_acodec_read(p_device_context, DIGITIZER_READ_BACK, &value);
++ if (value & 0x8000)
++ {/* means pen down */
++ *p_pen_down = 1;
++ }
++ else
++ {
++ *p_pen_down = 0;
++ }
++ *p_sample_data = value & 0xfff;
++
++ return status;
++}
++
++
++
++/*
++ * add a touch event
++ */
++static int codec_zy_ts_evt_add(codec_zy_ts_t* ts, u16 pressure, u16 x, u16 y)
++{
++ /* add event and remove adc src bits */
++ static u16 pre_press = 0;
++
++ input_report_abs(ts->idev, ABS_X, x & 0xfff);
++ input_report_abs(ts->idev, ABS_Y, y & 0xfff);
++ if (pressure == pre_press){
++ pressure--;
++ }
++ pre_press = pressure;
++ input_report_abs(ts->idev, ABS_PRESSURE, pressure & 0xfff);
++ input_sync(ts->idev);
++#ifdef CONFIG_IPM
++ ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_TSI, NULL, 0);
++#endif
++ return 0;
++}
++
++/*
++ * add a pen up event
++ */
++static void codec_zy_ts_evt_release(codec_zy_ts_t* ts)
++{
++ input_report_abs(ts->idev, ABS_PRESSURE, 0);
++ input_sync(ts->idev);
++
++#ifdef CONFIG_IPM
++ ipm_event_notify(IPM_EVENT_UI, IPM_EVENT_DEVICE_TSI, NULL, 0);
++#endif
++ p_zy_codec_ctxt->g_pfn_event_ack(p_zy_codec_ctxt,ZY_EVENT_TYPE_PDN);
++}
++
++/*
++ * Kill the touchscreen thread and stop
++ * the touch digitiser.
++ */
++static void codec_zy_ts_input_close(struct input_dev *idev)
++{
++ codec_zy_ts_t *ts = (codec_zy_ts_t *) &codec_zy_ts;
++
++#ifdef CONFIG_PM
++ if(touch_suspend){
++ pr_info("touch is suspended!\n");
++ return -1;
++ }
++#endif
++ dbg("close ts input!\n");
++ if (--ts->use_count == 0) {
++ del_timer(ts->timer);
++ if (ts->timer != NULL)
++ kfree(ts->timer);
++ p_zy_codec_ctxt->g_pfn_disable_touch(p_zy_codec_ctxt);
++ }
++}
++
++/*
++ * Sample the touchscreen
++ */
++int ac97_poll_touch(codec_zy_ts_t *ts)
++{
++ unsigned short x=0, y=0;
++ int if_down= 0;
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++
++#ifdef DEBUG
++ start_time = OSCR;
++#endif
++
++ /* get x value */
++ status = zy_acodec_get_adc_sample(p_zy_codec_ctxt, &x, ZY_TOUCH_SAMPLE_X, &if_down);
++ if (ZY_ACODEC_SUCCESS != status ){
++ return -EIO;
++ }
++ dbg("x:0x%x\n", x);
++
++ /* the pen is up */
++ if (1 != if_down){
++ return PEN_UP;
++ }
++
++ /* get y vaule */
++ status = zy_acodec_get_adc_sample(p_zy_codec_ctxt, &y, ZY_TOUCH_SAMPLE_Y, &if_down);
++ if (ZY_ACODEC_SUCCESS != status ){
++ return -EIO;
++ }
++ dbg("y:0x%x\n",y);
++
++ /* the pen is up */
++ if (1 != if_down){
++ return PEN_UP;
++ }
++
++ /* the pen is down, can not get the pressure value,
++ * so if pen is down, give the max pressure value
++ */
++ codec_zy_ts_evt_add(ts,0xfff, x, y);
++
++#ifdef DEBUG
++ end_time = OSCR;
++ PRINT_TIME();
++#endif
++
++ return PEN_DOWN;
++}
++
++static void touch_timer_handler(unsigned long unused)
++{
++ int event;
++ codec_zy_ts_t *ts = &codec_zy_ts;
++
++ event = ac97_poll_touch(ts);
++
++ if (event == PEN_DOWN) {
++ dbg("pen down!\n");
++ ts->timer->expires = jiffies + TS_SAMPLE_INTERVAL;
++ add_timer(ts->timer);
++ } else if(event == PEN_UP) {
++ dbg("pen up!\n");
++ codec_zy_ts_evt_release(ts);
++ } else if(event == -EIO) {
++ printk(KERN_ERR "Access touch interface error!\n");
++ }
++ return;
++}
++
++static zy_acodec_error_t zy_ac97_acodec_cold_reset(zy_acocec_context_t * p_ac97_ctxt)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ p_zy_ac97acodec_t p_ac97 = (p_zy_ac97acodec_t)(p_ac97_ctxt->p_ctrl_reg);
++ int pri_codec_ready;
++ unsigned long time_remaining;
++
++ p_ac97->gcr = 0;
++ p_ac97->gcr |= ZY_AC97_GCR_CLKBPB_MSK;
++ /* Hold reset active for a minimum time */
++ udelay(ZY_AC97_COLD_HOLDTIME);
++ p_ac97->gcr &= ~ZY_AC97_GCR_CLKBPB_MSK;
++
++ /* Deactivate cold reset condition */
++ p_ac97->gcr |= (ZY_AC97_GCR_COLD_RESET_MSK | ZY_AC97_GCR_WARM_RESET_MSK);
++
++
++ pri_codec_ready = 0;
++ time_remaining = (p_ac97_ctxt->u_max_setup_time_out_ms) * 10;
++ do
++ {
++ udelay(1);
++ if (p_ac97->gsr & ZY_AC97_GSR_PCRDY_MSK)
++ pri_codec_ready = 1;
++ }
++ while (time_remaining-- && (pri_codec_ready == 0));
++
++ /* Timeout status if some of the devices weren't ready. */
++ if (pri_codec_ready == 0)
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ }
++
++ return (status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_init(zy_acocec_context_t *p_ac97_ctxt)
++{
++ zy_acodec_error_t status ;
++
++ status = zy_ac97_acodec_cold_reset(p_ac97_ctxt);
++
++ return (status);
++}
++
++
++/*
++ * Start the touchscreen thread and
++ * the touch digitiser.
++ */
++static int codec_zy_ts_input_open(struct input_dev *idev)
++{
++ codec_zy_ts_t *ts = (codec_zy_ts_t *) &codec_zy_ts;
++
++#ifdef CONFIG_PM
++ if(touch_suspend){
++ pr_info("touch is suspended!\n");
++ return -1;
++ }
++#endif
++
++ if (ts->use_count++ > 0)
++ return 0;
++
++ dbg("Touch is opened. Use count: %d\n", ts->use_count);
++ ts->idev = idev;
++ ts->timer = kmalloc(sizeof(struct timer_list), GFP_KERNEL);
++ if (!ts->timer) {
++ printk(KERN_ERR "Alloc memory error for timer!\n");
++ return -ENOMEM;
++ }
++
++ init_timer(ts->timer);
++ ts->timer->function = touch_timer_handler;
++ ts->timer->data = 0;
++ p_zy_codec_ctxt->g_pfn_enable_touch(p_zy_codec_ctxt);
++
++ return 0;
++}
++
++/*
++ * initilze the pxa touch screen
++ */
++static int alsa_ts_init( void )
++{
++ codec_zy_ts_t* ts = &codec_zy_ts;
++
++ memset(ts, 0, sizeof(codec_zy_ts_t));
++
++ codec_zy_ts_input = input_allocate_device();
++ if (!codec_zy_ts_input)
++ return -ENOMEM;
++
++
++ /* tell input system what we events we accept and register */
++ codec_zy_ts_input->name = "codec zy touchscreen";
++ codec_zy_ts_input->open = codec_zy_ts_input_open;
++ codec_zy_ts_input->close = codec_zy_ts_input_close;
++ __set_bit(EV_ABS, codec_zy_ts_input->evbit);
++ __set_bit(ABS_X, codec_zy_ts_input->absbit);
++ __set_bit(ABS_Y, codec_zy_ts_input->absbit);
++ __set_bit(ABS_PRESSURE, codec_zy_ts_input->absbit);
++ input_register_device(codec_zy_ts_input);
++
++ return 0;
++}
++
++static irqreturn_t pxa_touch_irq(int irq, void *dev)
++{
++ unsigned char event_type;
++
++ //printk(KERN_ERR "%s: enter codec event handler\n", __FUNCTION__);
++
++ dbg("%s: enter codec event handler\n", __FUNCTION__);
++ p_zy_codec_ctxt->g_pfn_get_event(p_zy_codec_ctxt, &event_type);
++ switch (event_type) {
++ case ZY_EVENT_TYPE_PDN:
++ {
++ codec_zy_ts_t *ts = &codec_zy_ts;
++ /*if the touch is not open need not acknowledge the event*/
++ if (ts->use_count <= 0)
++ break;
++ ts->timer->expires = jiffies + TS_SAMPLE_INTERVAL;
++ add_timer(ts->timer);
++ break;
++ }
++ default:
++ printk("unsupported codec event:0x%x\n", event_type);
++ }
++
++ return IRQ_HANDLED;
++}
++
++
++
++
++
++
++
++
++
++static mfp_cfg_t extra_cfg[] = {
++ MFP_CFG_X(GPIO17, AF3, DS03X, PULL_LOW),
++ MFP_CFG_X(GPIO25, AF0, DS01X, PULL_LOW),
++};
++
++#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
++
++extern void dump_mfp(void);
++
++zy_acodec_error_t zy_ac97_acodec_mfp_init(zy_acocec_context_t *p_device_context)
++{
++ unsigned short codec_id;
++
++ //mhn_mfp_set_afds(MFP_RSVD_AC97_SDATA_IN_0, MFP_AF0, MFP_DS03X);
++ //enable_ac97_pins();
++ zy_ac97_acodec_init(p_device_context);
++ if (zy_ac97_acodec_read(p_device_context, 0x0, &codec_id)){
++
++ /*
++ * there is a bug on MonahansL/MonhansPL PC card: AC97_SDATA_IN is not connected to CODEC
++ * ECO 72: Connect PWM_0(MFP_RSVD_AC97_SDATA_IN_0) to CODEC as AC97_SDATA_IN
++ */
++
++ //mhn_mfp_set_afds(MFP_RSVD_AC97_SDATA_IN_0, MFP_RSVD_AC97_SDATA_IN_0_AF, MFP_DS03X);
++ //mhn_mfp_set_afds(MFP_AC97_SDATA_IN_0, MFP_AF0, MFP_DS01X);
++
++ gpio_direction_output(mfp_to_gpio(MFP_PIN_GPIO17), 0);
++ pxa3xx_mfp_config(ARRAY_AND_SIZE(extra_cfg));
++ gpio_direction_input(mfp_to_gpio(MFP_PIN_GPIO25));
++ }
++
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++#define ZY_AC97_WM9713_GPIO_PIN_PDN ( 0x1 << 13 ) /* Pen down */
++
++/*power enable bit in 3ch and 3eh */
++/*3ch */
++#define ZY_AC97_9713_PWR_PADCPD ( 0x1 << 15 )
++#define ZY_AC97_9713_PWR_VMID ( 0x1 << 14 )
++#define ZY_AC97_9713_PWR_TSHUT ( 0x1 << 13 )
++#define ZY_AC97_9713_PWR_VXDAC ( 0x1 << 12 )
++#define ZY_AC97_9713_PWR_AUXDAC ( 0x1 << 11 )
++#define ZY_AC97_9713_PWR_MBIAS ( 0x1 << 10 )
++#define ZY_AC97_9713_PWR_PLL ( 0x1 << 9 )
++#define ZY_AC97_9713_PWR_DACL ( 0x1 << 7 )
++#define ZY_AC97_9713_PWR_DACR ( 0x1 << 6 )
++#define ZY_AC97_9713_PWR_ADCL ( 0x1 << 5 )
++#define ZY_AC97_9713_PWR_ADCR ( 0x1 << 4 )
++#define ZY_AC97_9713_PWR_HPLX ( 0x1 << 3 )
++#define ZY_AC97_9713_PWR_HPRX ( 0x1 << 2 )
++#define ZY_AC97_9713_PWR_SPKX ( 0x1 << 1 )
++#define ZY_AC97_9713_PWR_MX ( 0x1 << 0 )
++
++/*3EH */
++#define ZY_AC97_9713_PWR_MCD ( 0x1 << 15 )
++#define ZY_AC97_9713_PWR_MICBIAS ( 0x1 << 14 )
++#define ZY_AC97_9713_PWR_MONO ( 0x1 << 13 )
++#define ZY_AC97_9713_PWR_OUT4 ( 0x1 << 12 )
++#define ZY_AC97_9713_PWR_OUT3 ( 0x1 << 11 )
++#define ZY_AC97_9713_PWR_HPL ( 0x1 << 10 )
++#define ZY_AC97_9713_PWR_HPR ( 0x1 << 9 )
++#define ZY_AC97_9713_PWR_SPKL ( 0x1 << 8 )
++#define ZY_AC97_9713_PWR_SPKR ( 0x1 << 7 )
++#define ZY_AC97_9713_PWR_LL ( 0x1 << 6 )
++#define ZY_AC97_9713_PWR_LR ( 0x1 << 5 )
++#define ZY_AC97_9713_PWR_MOIN ( 0x1 << 4 )
++#define ZY_AC97_9713_PWR_MA ( 0x1 << 3 )
++#define ZY_AC97_9713_PWR_MB ( 0x1 << 2 )
++#define ZY_AC97_9713_PWR_MPA ( 0x1 << 1 )
++#define ZY_AC97_9713_PWR_MPB ( 0x1 << 0 )
++
++
++void zy_wm9713_get_event(zy_acocec_context_t *p_device_context, unsigned char * event_type)
++{
++ unsigned short event_state = 0;
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ if(event_state & ZY_AC97_WM9713_GPIO_PIN_PDN){
++ *event_type = ZY_EVENT_TYPE_PDN;
++ return;
++ }
++ return;
++}
++
++void zy_wm9713_event_ack(zy_acocec_context_t *p_device_context, unsigned char event_type)
++{
++ unsigned short event_state = 0;
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ if( event_type == ZY_EVENT_TYPE_PDN){
++ zy_ac97_acodec_write(p_device_context,
++ GPIO_PIN_STATUS,
++ (event_state & (~ZY_AC97_WM9713_GPIO_PIN_PDN)));
++ }
++
++ zy_ac97_acodec_read(p_device_context, GPIO_PIN_STATUS, &event_state);
++ return;
++}
++
++static void * p_saved_memory = NULL;
++static void * p_zy_scenario = NULL;
++static p_zy_acocec_context_t p_zy_ctxt = NULL;
++
++#define WM9713_SAVE_REGISTER_NO (64-11)
++typedef struct {
++ unsigned short wm9713RegisterContext [WM9713_SAVE_REGISTER_NO + 1]; /* Fixed (data misalignment error) */
++}ZY_9713_CONTEXT_SAVE_T;
++
++
++/**
++ * alsa_prepare_for_zy - create and initialize the p_zy_acocec_context_t
++ * open the clock of data link
++ * @p_p_zy_ctxt: return the data structure p_zy_acocec_context_t
++ * return: 0 success ; -ENOMEM
++ **/
++int alsa_prepare_for_zy(p_zy_acocec_context_t * p_p_zy_ctxt)
++{
++ if (p_zy_ctxt) {
++ p_zy_ctxt->use_count++;
++ *p_p_zy_ctxt = p_zy_ctxt;
++ return 0;
++ }
++
++ p_zy_ctxt = kzalloc(sizeof(zy_acocec_context_t), GFP_KERNEL);
++ if (!p_zy_ctxt)
++ return -ENOMEM;
++
++ /* enable CLK_POUT as CODEC clock input */
++ OSCC |= 0x800;
++
++ p_saved_memory = kzalloc(sizeof(ZY_9713_CONTEXT_SAVE_T) +
++ sizeof(zy_ac97_save_context_t), GFP_KERNEL);
++ if (NULL == p_saved_memory) {
++ if (p_zy_ctxt)
++ kfree(p_zy_ctxt);
++ return -ENOMEM;
++ }
++
++ p_zy_ctxt->acodec_id = (zy_acodec_device_id_t) (WM_9713_ID);
++ p_zy_ctxt->use_count++;
++ /*
++ p_zy_ctxt->pMfpRegBase = (unsigned long) (MFP_BASE);
++ p_zy_ctxt->pMfpRmDb = ZY_MFP_RM_DATABASE;
++ p_zy_ctxt->p_ost_regs = OST_BASE;
++ */
++ p_zy_ctxt->p_voice_reg = NULL;
++ p_zy_ctxt->p_hifi_reg = (void *) (&POCR);
++ p_zy_ctxt->p_ctrl_reg = (void *) (&POCR);
++ p_zy_ctxt->u_max_read_write_time_out_ms = ZY_AC97_RW_TIMEOUT_DEF;
++ p_zy_ctxt->u_max_setup_time_out_ms = ZY_AC97_SETUP_TIMEOUT_DEF;
++ p_zy_ctxt->p_save_memory = p_saved_memory;
++ p_zy_ctxt->p_zy_scenario = p_zy_scenario;
++// pxa_set_cken(24, 1);
++ CKENA |= (1 << 24);
++ AC97_DIV = 1625<<12 | 128;
++#ifdef DEBUG_ALSA_ZY
++ debug_pac97ctxt = p_zy_ctxt;
++ misc_register(&audio_dev);
++#endif
++
++ (*p_p_zy_ctxt) = p_zy_ctxt;
++
++ return 0;
++}
++
++
++/* this is platform specific */
++/* do later: not to enable recording route and playback route in this function,
++ * leave it to driver to call other function
++ */
++zy_acodec_error_t zy_wm9713_specific_init (zy_acocec_context_t *p_device_context)
++{
++
++ unsigned short value;
++
++ /* this assumes that the aclink is initialized wait some time and then
++ * do a warm reset to enabled the ACLINK, required for wm9713
++ * (not wm9712 or ucb1400)
++ */
++
++ /* pay attention: whether the workaround is still needed? */
++ p_zy_ac97acodec_t p_ac97_reg = (p_zy_ac97acodec_t)(p_device_context->p_ctrl_reg);
++
++ p_ac97_reg->gcr |= ZY_AC97_GCR_WARM_RESET_MSK;
++
++ mdelay(5);
++
++ /* power on all the necessary unit */
++ zy_ac97_acodec_write(p_device_context,POWERDOWN_CTRL_STAT, 0x000); /*26*/
++ /* open left headphone mixer */
++ /* open right headphone mixer */
++ /* open right/left dac */
++ /* open right/left adc */
++ /* open temperature sensor */
++ /* enable reference generator */
++ zy_ac97_acodec_write(p_device_context,POWER_DOWN_1, 0xda00); /*3c */
++ /* open microphone bias */
++ /* open HPL output PGA */
++ /* open HPR output PGA */
++ /* open mic PGA MA */
++ /* open mic pre-amp MPA */
++ /* if here we enable SPKL and SPKR PGA, then Touch screen will doesn't work */
++ zy_ac97_acodec_write(p_device_context,POWER_DOWN_2,0xb9f5); /*3e */
++
++ /* recording route and microphone input */
++ /* microphone selection, now fixed to MIC1 input and mic bias output */
++ /* MIC1 only, MICBIAS enable */
++ zy_ac97_acodec_write (p_device_context, MIC_BIAS, 0xC440); /*0x22h*/
++
++ /* mic pga setting to mixer (side tone) */
++ /* comment the below code to make MICA/B play back volume gain + 0db */
++ /* zy_ac97_acodec_write (p_device_context, MIC_PGA_VOLUME, 0x0000); */ /*0x0eh*/
++
++ /* recording side tone and ADC boost, now fixed to default (14h) */
++ /* recording volume 0dB */
++ zy_ac97_acodec_write(p_device_context, REC_PGA_VOL, 0x0); /*12*/
++
++ /* hifi playback route and output mixer */
++ /* by default, fixed to enable headphone only */
++
++ /* comment the below code to make SPEAKER default MUTE */
++ zy_ac97_acodec_write (p_device_context, SPEAKER_VOLUME, 0x0); /*02*/
++
++ /* comment the below code to make OUT3_OUT4 default MUTE */
++ /* zy_ac97_acodec_write (p_device_context, OUT3_OUT4_VOLUME, 0x8000); */ /*06*/
++
++ /* remove all the mute bit volume gain + 0db */
++ zy_ac97_acodec_write(p_device_context, HEADPHONE_VOLUME, 0x0); /*04*/
++
++ /* DAC route */
++ /* open DAC to headphone mixer path */
++ /* left DAC gain +0db */
++ /* right DAC gain +0db */
++ zy_ac97_acodec_write(p_device_context, DAC_PGA_VOL_ROUTE,0x0808); /*0c*/
++
++ /* out3 configure, invert to HPMIXR */
++ /* zy_ac97_acodec_write(p_device_context,DAC_3D_CTRL_INV_MUX_SEL, 0x8000); */ /*1e*/
++
++ /* output control */
++ /* select HPMIXR HPMIXL out */
++ /* other out are all VIM */
++ zy_ac97_acodec_write(p_device_context,OUTPUT_PGA_MUX, 0x9BA8); /*1c*/
++
++ /* set sample rates */
++ /* enable variable rate conversion */
++ zy_ac97_acodec_write(p_device_context, EXTENDED_AUD_STAT_CTRL , 0x1); /*2a*/
++ /* DAC 44kHZ */
++ zy_ac97_acodec_write(p_device_context,AUDIO_DAC_RATE,0xac44); /*2c*/
++ /* ADC 16KHZ */
++ zy_ac97_acodec_write(p_device_context,AUDIO_ADC_RATE,0x3E80); /*32*/
++
++ /* clock scheme, use external clock, it is 24MHZ from MCLK_A */
++
++
++ zy_ac97_acodec_read(p_device_context, MCLK_PLL_CTRL_1, &value);
++ zy_ac97_acodec_write(p_device_context, MCLK_PLL_CTRL_1, value | 0x2);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_wm9713_specific_deinit (zy_acocec_context_t *p_device_context)
++{/* do later: shut down all power */
++ unsigned short value = 0;
++
++ /* close the power of all units */
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, 0xffff);
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_2, 0xffff);
++ zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value &= ~(ZY_AC97_9713_PWR_MBIAS);
++ zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_acodec_set_pen_down_interrupt(zy_acocec_context_t *p_device_context, int enable)
++{/* disable/enable pen down interrupt in the codec. This function is not implemented for Wm9713 */
++ /* because the pen down detection could not be disabled in codec */
++ return ZY_ACODEC_SUCCESS;
++}
++
++zy_acodec_error_t zy_wm9713_enable_touch(zy_acocec_context_t *p_device_context)
++{/* enable touch functionality in the codec */
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++
++ /* power setting */
++ status = zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value &= ~(ZY_AC97_9713_PWR_PADCPD);
++ status = zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ /* basic touch setting */
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_3_WM13, 0xc008);
++ status = zy_ac97_acodec_write(p_device_context, DIGITIZER_2_WM13, 0x6);
++
++
++ /* 9713 powerdown virtual gpio setting (polarity, sticky, wakeup) */
++ /* 9713 gpio 2(pin45) route to IRQ */
++ /* Notes: Can use defaults for IRQ polarity, PENDOWN polarity in IRQ, */
++ /* sticky for PENDOWN in IRQ and wakeup for PENDOWN. */
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_CFG, &value);
++ value &= ~(0x4);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_CFG, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_SHARING, &value);
++ value &= ~(0x4);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_SHARING, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_WAKEUP, &value);
++ value |= (0x2000);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_WAKEUP, value);
++
++ status = zy_ac97_acodec_read(p_device_context, GPIO_PIN_STICKY, &value);
++ value |= (0x2000);
++ status = zy_ac97_acodec_write(p_device_context, GPIO_PIN_STICKY, value);
++
++ return status;
++}
++
++zy_acodec_error_t zy_wm9713_disable_touch(zy_acocec_context_t *p_device_context)
++{/* disable touch functionality in the codec */
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned short value;
++
++ /* power setting */
++ status = zy_ac97_acodec_read(p_device_context, POWER_DOWN_1, &value);
++ value |= (ZY_AC97_9713_PWR_PADCPD);
++ status = zy_ac97_acodec_write(p_device_context, POWER_DOWN_1, value);
++
++ return status;
++}
++zy_acodec_error_t zy_ac97_acodec_mfp_deinit(zy_acocec_context_t *p_device_context)
++{/* do later: free all MFP resources. */
++ return ZY_ACODEC_SUCCESS;
++}
++
++static zy_acodec_error_t zy_ac97_acodec_shut_down_aclink(p_zy_ac97acodec_t p_ac97_reg, int * p_ost_regs)
++{
++ zy_acodec_error_t status = ZY_ACODEC_SUCCESS;
++ unsigned long time_remaining = ZY_AC97_LINKOFF_TIMEOUT_DEF;
++
++ p_ac97_reg->gcr |= ZY_AC97_GCR_LINK_OFF_MSK;
++ p_ac97_reg->gcr |= ZY_AC97_GCR_CLKBPB_MSK;
++
++ while (!(p_ac97_reg->gsr & ZY_AC97_GSR_ACOFFD_MSK))
++ {
++ time_remaining --;
++ if (0 == time_remaining)
++ {
++ status = ZY_ACODEC_CONTROLLER_INTERFACE_TIMEOUT;
++ break;
++ }
++ udelay(1);
++ }
++ p_ac97_reg->gcr |= ZY_AC97_GCR_FRCRST_MSK;
++ /* check later: any delay needed */
++ p_ac97_reg->gcr &= ~ZY_AC97_GCR_FRCRST_MSK;
++ p_ac97_reg->gcr &= ~ZY_AC97_GCR_CLKBPB_MSK;
++
++ return(status);
++}
++
++
++zy_acodec_error_t zy_ac97_acodec_deinit(zy_acocec_context_t * p_ac97_ctxt)
++{
++ zy_acodec_error_t status ;
++
++ status = zy_ac97_acodec_shut_down_aclink((p_zy_ac97acodec_t)(p_ac97_ctxt->p_ctrl_reg), p_ac97_ctxt->p_ost_regs);
++
++ return (status);
++}
++
++zy_acodec_error_t zy_acodec_deinit(zy_acocec_context_t *p_device_context)
++{
++ /* power down codec by codec specific power down function */
++ if (p_device_context->g_pfn_codec_specific_dinit)
++ {
++ p_device_context->g_pfn_codec_specific_dinit(p_device_context);
++ }
++ /* call bus deinit function */
++ zy_ac97_acodec_deinit(p_device_context);
++ /* restore MFP, set GPIO to suitable value */
++ zy_ac97_acodec_mfp_deinit(p_device_context);
++
++ return ZY_ACODEC_SUCCESS;
++}
++
++void alsa_zy_codec_put(p_zy_acocec_context_t p_acodectxt)
++{
++
++ zy_acodec_deinit(p_acodectxt);
++ //pxa_set_cken(24, 0);
++ CKENA &= ~(1 << 24);
++
++ if(p_acodectxt->p_save_memory){
++ kfree(p_saved_memory);
++ }
++ if(p_acodectxt->p_zy_scenario){
++ kfree(p_zy_scenario);
++ }
++}
++
++
++zy_acodec_error_t zy_acodec_init(zy_acocec_context_t *p_device_context, int hw_init)
++{
++ /* set codec specific functions
++ * set mfp for Zylonite platform
++ * call bus init function (AC97, I2S, I2C, SSP)
++ * call specific init of codec
++ */
++ zy_acodec_error_t retval = ZY_ACODEC_SUCCESS;
++
++ if (p_device_context->acodec_id != WM_9713_ID)
++ {/* on Zylonite, it is Wolfson 9713 codec only */
++ return ZY_ACODEC_GENERAL_SW_ERR;
++ }
++
++ if (1 == hw_init)
++ {
++ zy_ac97_acodec_mfp_init(p_device_context);
++ zy_ac97_acodec_init(p_device_context); /* codec init common to ac97 */
++ }
++
++ /* wm9713-specific functions */
++ (p_device_context->g_pfn_codec_specific_init) = zy_wm9713_specific_init;
++ (p_device_context->g_pfn_codec_specific_dinit) = zy_wm9713_specific_deinit;
++ (p_device_context->g_pfn_acodec_read) = zy_ac97_acodec_read;
++ (p_device_context->g_pfn_acodec_write) = zy_ac97_acodec_write;
++
++ (p_device_context->g_pfn_event_ack) = zy_wm9713_event_ack;
++ (p_device_context->g_pfn_get_event) = zy_wm9713_get_event;
++ (p_device_context->g_pfn_disable_touch) = zy_wm9713_disable_touch;
++ (p_device_context->g_pfn_enable_touch) = zy_wm9713_enable_touch;
++
++ if (1 == hw_init)
++ {
++ retval = p_device_context->g_pfn_codec_specific_init(p_device_context);
++ }
++
++ return retval;
++}
++
++static int __devinit touch_codec_zy_probe(struct platform_device *dev)
++{
++ int ret = 0;
++ struct snd_card *card = NULL;
++ zy_acodec_error_t status;
++
++ /* will increase codec context use count */
++ ret = alsa_prepare_for_zy(&p_zy_codec_ctxt);
++ if (ret)
++ goto err;
++
++ /* codec specific initialization, audio will do it either */
++ if (1 == p_zy_codec_ctxt->use_count) {
++ status = zy_acodec_init(p_zy_codec_ctxt, 1);
++ if (ZY_ACODEC_SUCCESS != status) {
++ printk(KERN_ERR "initialize codec error\n");
++ ret = -EIO;
++ goto err;
++ }
++
++ /* power down the units of the acodec, sleep the acodec, zy_acodec_init()
++ * will open all the units' power of the codec while ALSA need all the codec
++ * units power down and the codec should sleep if it can.
++ * So on the zylonite platform we call below function to power down and sleep
++ * wm9713 codec.
++ */
++ p_zy_codec_ctxt->g_pfn_codec_specific_dinit(p_zy_codec_ctxt);
++
++ }
++
++ alsa_ts_init();
++
++ //mhn_mfp_set_afds(MFP_AC97_INT_N_GPIO,0,0);
++ //mhn_gpio_set_direction(MFP_AC97_INT_N_GPIO, GPIO_DIR_IN);
++ //mhn_gpio_clear_edge_detect_status(MFP_AC97_INT_N_GPIO);
++ gpio_direction_input(mfp_to_gpio(MFP_PIN_GPIO26));
++ ret = request_irq(IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO26)),
++ pxa_touch_irq, IRQF_TRIGGER_RISING,
++ "wm9713 touch event interrupt", NULL);
++ if (ret) {
++ printk(KERN_ERR "Request IRQ for touch failed (%d).\n", ret);
++ goto err;
++ }
++
++ return 0;
++err:
++ if (p_zy_codec_ctxt && (!--p_zy_codec_ctxt->use_count)) {
++ zy_acodec_deinit(p_zy_codec_ctxt);
++ //pxa_set_cken(24, 0);
++ CKENA &= ~(1 << 24);
++ kfree(p_zy_codec_ctxt);
++ p_zy_codec_ctxt = NULL;
++ }
++
++ if (card)
++ snd_card_free(card);
++
++ return ret;
++}
++
++static int __devexit touch_codec_zy_remove(struct platform_device *dev)
++{
++ struct snd_card *card = platform_get_drvdata(dev);
++
++ input_unregister_device(codec_zy_ts_input);
++
++ if (p_zy_codec_ctxt && (!--p_zy_codec_ctxt->use_count)) {
++ alsa_zy_codec_put(p_zy_codec_ctxt);
++ kfree(p_zy_codec_ctxt);
++ p_zy_codec_ctxt = NULL;
++ }
++
++ if (card) {
++ snd_card_free(card);
++ platform_set_drvdata(dev, NULL);
++ }
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int touch_codec_zy_suspend(struct platform_device *_dev, pm_message_t state, u32 level)
++{
++ int ret=0;
++
++ if (level == SUSPEND_DISABLE) {
++ ret = audio_codec_zy_do_suspend(NULL, SNDRV_CTL_POWER_D3cold, p_zy_codec_ctxt);
++ touch_suspend = 1;
++ }
++ return ret;
++}
++
++static int touch_codec_zy_resume(struct platform_device *_dev, u32 level)
++{
++ int ret = 0;
++
++ if (level == RESUME_ENABLE) {
++ ret = audio_codec_zy_do_resume(NULL, SNDRV_CTL_POWER_D0, p_zy_codec_ctxt);
++ touch_suspend = 0;
++ }
++ return ret;
++}
++#else
++#define touch_codec_zy_suspend NULL
++#define touch_codec_zy_resume NULL
++#endif
++
++static struct platform_driver touch_codec_zy_driver = {
++ .probe = touch_codec_zy_probe,
++ .remove = __devexit_p(touch_codec_zy_remove),
++ .suspend= touch_codec_zy_suspend,
++ .resume = touch_codec_zy_resume,
++ .driver = {
++ .name = "pxa2xx-touch",
++ },
++};
++
++static int __init touch_codec_zy_init(void)
++{
++ return platform_driver_register(&touch_codec_zy_driver);
++}
++
++static void __exit touch_code_zy_exit(void)
++{
++ platform_driver_unregister(&touch_codec_zy_driver);
++}
++module_init(touch_codec_zy_init);
++module_exit(touch_code_zy_exit);
++
++EXPORT_SYMBOL(p_zy_codec_ctxt);
++
++MODULE_AUTHOR("bridge.wu@marvell.com");
++MODULE_DESCRIPTION("zylonite audio touch codec driver on ALSA");
++MODULE_LICENSE("GPL");
++
diff --git a/recipes/linux/linux-kexecboot-2.6.29/0001-ASoC-Add-support-for-OMAP3-EVM.patch b/recipes/linux/linux-kexecboot-2.6.29/0001-ASoC-Add-support-for-OMAP3-EVM.patch
new file mode 100644
index 0000000000..a76e96e444
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/0001-ASoC-Add-support-for-OMAP3-EVM.patch
@@ -0,0 +1,206 @@
+From c1dad0b6b434300ae64c902d11611c54c513ea10 Mon Sep 17 00:00:00 2001
+From: Anuj Aggarwal <anuj.aggarwal@ti.com>
+Date: Fri, 21 Nov 2008 17:41:03 +0530
+Subject: [PATCH] ASoC: Add support for OMAP3 EVM
+
+This patch adds ALSA SoC support for OMAP3 EVM using TWL4030 audio codec.
+
+Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
+---
+ sound/soc/omap/Kconfig | 8 +++
+ sound/soc/omap/Makefile | 3 +-
+ sound/soc/omap/omap3evm.c | 147 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 157 insertions(+), 1 deletions(-)
+ create mode 100644 sound/soc/omap/omap3evm.c
+
+diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
+index 0daeee4..deb6ba9 100644
+--- a/sound/soc/omap/Kconfig
++++ b/sound/soc/omap/Kconfig
+@@ -22,6 +22,14 @@ config SND_OMAP_SOC_OMAP3_BEAGLE
+ help
+ Say Y if you want to add support for SoC audio on the Beagleboard.
+
++config SND_OMAP_SOC_OMAP3EVM
++ tristate "SoC Audio support for OMAP3EVM board"
++ depends on SND_OMAP_SOC && MACH_OMAP3EVM
++ select SND_OMAP_SOC_MCBSP
++ select SND_SOC_TWL4030
++ help
++ Say Y if you want to add support for SoC audio on the omap3evm board.
++
+ config SND_OMAP_SOC_OSK5912
+ tristate "SoC Audio support for omap osk5912"
+ depends on SND_OMAP_SOC && MACH_OMAP_OSK
+diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
+index 4bae404..ef31c25 100644
+--- a/sound/soc/omap/Makefile
++++ b/sound/soc/omap/Makefile
+@@ -10,9 +10,10 @@ 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-omap3evm-objs := omap3evm.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_OMAP3EVM) += snd-soc-omap3evm.o
+diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
+new file mode 100644
+index 0000000..570af55
+--- /dev/null
++++ b/sound/soc/omap/omap3evm.c
+@@ -0,0 +1,147 @@
++/*
++ * omap3evm.c -- ALSA SoC support for OMAP3 EVM
++ *
++ * Author: Anuj Aggarwal <anuj.aggarwal@ti.com>
++ *
++ * Based on sound/soc/omap/beagle.c by Steve Sakoman
++ *
++ * Copyright (C) 2008 Texas Instruments, Incorporated
++ *
++ * 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 version 2.
++ *
++ * 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
++ * General Public License for more details.
++ */
++
++#include <linux/clk.h>
++#include <linux/platform_device.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/soc.h>
++#include <sound/soc-dapm.h>
++
++#include <asm/mach-types.h>
++#include <mach/hardware.h>
++#include <mach/gpio.h>
++#include <mach/mcbsp.h>
++
++#include "omap-mcbsp.h"
++#include "omap-pcm.h"
++#include "../codecs/twl4030.h"
++
++static int omap3evm_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *params)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
++ struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
++ int ret;
++
++ /* Set codec DAI configuration */
++ ret = snd_soc_dai_set_fmt(codec_dai,
++ SND_SOC_DAIFMT_I2S |
++ SND_SOC_DAIFMT_NB_NF |
++ SND_SOC_DAIFMT_CBM_CFM);
++ if (ret < 0) {
++ printk(KERN_ERR "can't set codec DAI configuration\n");
++ return ret;
++ }
++
++ /* Set cpu DAI configuration */
++ ret = snd_soc_dai_set_fmt(cpu_dai,
++ SND_SOC_DAIFMT_I2S |
++ SND_SOC_DAIFMT_NB_NF |
++ SND_SOC_DAIFMT_CBM_CFM);
++ if (ret < 0) {
++ printk(KERN_ERR "can't set cpu DAI configuration\n");
++ return ret;
++ }
++
++ /* Set the codec system clock for DAC and ADC */
++ ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
++ SND_SOC_CLOCK_IN);
++ if (ret < 0) {
++ printk(KERN_ERR "can't set codec system clock\n");
++ return ret;
++ }
++
++ return 0;
++}
++
++static struct snd_soc_ops omap3evm_ops = {
++ .hw_params = omap3evm_hw_params,
++};
++
++/* Digital audio interface glue - connects codec <--> CPU */
++static struct snd_soc_dai_link omap3evm_dai = {
++ .name = "TWL4030",
++ .stream_name = "TWL4030",
++ .cpu_dai = &omap_mcbsp_dai[0],
++ .codec_dai = &twl4030_dai,
++ .ops = &omap3evm_ops,
++};
++
++/* Audio machine driver */
++static struct snd_soc_machine snd_soc_machine_omap3evm = {
++ .name = "omap3evm",
++ .dai_link = &omap3evm_dai,
++ .num_links = 1,
++};
++
++/* Audio subsystem */
++static struct snd_soc_device omap3evm_snd_devdata = {
++ .machine = &snd_soc_machine_omap3evm,
++ .platform = &omap_soc_platform,
++ .codec_dev = &soc_codec_dev_twl4030,
++};
++
++static struct platform_device *omap3evm_snd_device;
++
++static int __init omap3evm_soc_init(void)
++{
++ int ret;
++
++ if (!machine_is_omap3evm()) {
++ pr_debug("Not OMAP3 EVM!\n");
++ return -ENODEV;
++ }
++ pr_info("OMAP3 EVM SoC init\n");
++
++ omap3evm_snd_device = platform_device_alloc("soc-audio", -1);
++ if (!omap3evm_snd_device) {
++ printk(KERN_ERR "Platform device allocation failed\n");
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata);
++ omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev;
++ *(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1; /* McBSP2 */
++
++ ret = platform_device_add(omap3evm_snd_device);
++ if (ret)
++ goto err1;
++
++ return 0;
++
++err1:
++ printk(KERN_ERR "Unable to add platform device\n");
++ platform_device_put(omap3evm_snd_device);
++
++ return ret;
++}
++
++static void __exit omap3evm_soc_exit(void)
++{
++ platform_device_unregister(omap3evm_snd_device);
++}
++
++module_init(omap3evm_soc_init);
++module_exit(omap3evm_soc_exit);
++
++MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>");
++MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM");
++MODULE_LICENSE("GPL");
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/0001-This-merges-Steve-Kipisz-USB-EHCI-support.-He-star.patch b/recipes/linux/linux-kexecboot-2.6.29/0001-This-merges-Steve-Kipisz-USB-EHCI-support.-He-star.patch
new file mode 100644
index 0000000000..d590f8ffb9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/0001-This-merges-Steve-Kipisz-USB-EHCI-support.-He-star.patch
@@ -0,0 +1,146 @@
+From f8f10f496bce396416d7156da876222c6ce8c341 Mon Sep 17 00:00:00 2001
+From: Steven Kipisz <skipisz@beagleboard.org>
+Date: Wed, 9 Jan 2009 12:01:11 -0600
+Subject: [PATCH-USB] Omap3 beagleboard: add support for EHCI in revision C1 boards
+
+Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 10 +---------
+ arch/arm/mach-omap2/usb-ehci.c | 4 +---
+ drivers/usb/host/ehci-omap.c | 26 ++++++++++++++++++++++++++
+ 3 files changed, 28 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index fe97bab..de81153 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -140,15 +140,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
+ * power switch and overcurrent detect
+ */
+
+- gpio_request(gpio + 1, "EHCI_nOC");
+- gpio_direction_input(gpio + 1);
+-
+- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
+- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+-
+- /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
+- gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
++ /* TODO: This needs to be modified to not rely on u-boot */
+
+ return 0;
+ }
+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)
+ {
+ #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE)
+- /* 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_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 +235,43 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
+
+ #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 +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_OMAP3_BEAGLE
+ 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_OMAP3_BEAGLE
+ 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-kexecboot-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch b/recipes/linux/linux-kexecboot-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch
new file mode 100644
index 0000000000..49045f7bb1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch
@@ -0,0 +1,90 @@
+From 7efa7cc5b807cb840c62b5bf54bf47181c9b95a6 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@openembedded.org>
+Date: Mon, 30 Mar 2009 15:21:37 +0200
+Subject: [PATCH v2] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
+
+The ldp board was left behind when other boards got updated. The ldp info was copied from the beagleboard board file and s/beagle/ldp/g
+
+Changes since v1:
+ * dropped vsim portion since only 4 pins are hooked up
+
+Signed-off-by: Koen Kooi <koen@beagleboard.org>
+---
+ arch/arm/mach-omap2/board-ldp.c | 32 ++++++++++++++++++++++++++++++++
+ 1 files changed, 32 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
+index 30926b0..19a5c15 100644
+--- a/arch/arm/mach-omap2/board-ldp.c
++++ b/arch/arm/mach-omap2/board-ldp.c
+@@ -22,6 +22,7 @@
+ #include <linux/clk.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
++#include <linux/regulator/machine.h>
+ #include <linux/i2c/twl4030.h>
+
+ #include <mach/hardware.h>
+@@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[] __initdata = {
+ &wrst_script,
+ };
+
++static const struct twl4030_resconfig ldp_resconfig[] = {
++ /* disable regulators that u-boot left enabled; the
++ * devices' drivers should be managing these.
++ */
++ { .resource = RES_VMMC1, },
++ { 0, },
++};
++
+ static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
++ .resource_config = ldp_resconfig,
+ .scripts = twl4030_scripts,
+ .size = ARRAY_SIZE(twl4030_scripts),
+ };
+@@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data ldp_madc_data = {
+ .irq_line = 1,
+ };
+
++static struct regulator_consumer_supply ldp_vmmc1_supply = {
++ .supply = "vmmc",
++};
++
++/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
++static struct regulator_init_data ldp_vmmc1 = {
++ .constraints = {
++ .min_uV = 1850000,
++ .max_uV = 3150000,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
++ | REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &ldp_vmmc1_supply,
++};
++
+ static struct twl4030_platform_data ldp_twldata = {
+ .irq_base = TWL4030_IRQ_BASE,
+ .irq_end = TWL4030_IRQ_END,
+@@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata = {
+ .madc = &ldp_madc_data,
+ .usb = &ldp_usb_data,
+ .power = &sdp3430_t2scripts_data,
++ .vmmc1 = &ldp_vmmc1,
+ .gpio = &ldp_gpio_data,
+ .keypad = &ldp_kp_twl4030_data,
+ };
+@@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
+ omap_serial_init();
+ usb_musb_init();
+ twl4030_mmc_init(mmc);
++ /* link regulators to MMC adapters */
++ ldp_vmmc1_supply.dev = mmc[0].dev;
+ }
+
+ static void __init omap_ldp_map_io(void)
+--
+1.6.2
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/0124-leds-gpio-broken-with-current-git.patch b/recipes/linux/linux-kexecboot-2.6.29/0124-leds-gpio-broken-with-current-git.patch
new file mode 100644
index 0000000000..dc6e190e89
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/ads7846-detection.patch b/recipes/linux/linux-kexecboot-2.6.29/ads7846-detection.patch
new file mode 100644
index 0000000000..25a1cb052c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/ads7846-detection.patch
@@ -0,0 +1,41 @@
+diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
+index 2ae5ab8..a68b0a6 100644
+--- a/drivers/input/touchscreen/ads7846.c
++++ b/drivers/input/touchscreen/ads7846.c
+@@ -1154,9 +1154,16 @@ static int __devinit ads7846_probe(struct spi_device *spi)
+ /* take a first sample, leaving nPENIRQ active and vREF off; avoid
+ * the touchscreen, in case it's not connected.
+ */
+- (void) ads7846_read12_ser(&spi->dev,
++ err = ads7846_read12_ser(&spi->dev,
+ READ_12BIT_SER(vaux) | ADS_PD10_ALL_ON);
+
++ /* if sample is all 0's or all 1's then there is no device on spi */
++ if ( (err == 0x000) || (err == 0xfff)) {
++ dev_info(&spi->dev, "no device detected, test read result was 0x%08X\n", err);
++ err = -ENODEV;
++ goto err_free_irq;
++ }
++
+ err = sysfs_create_group(&spi->dev.kobj, &ads784x_attr_group);
+ if (err)
+ goto err_remove_hwmon;
+@@ -1174,7 +1181,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
+ err_free_irq:
+ free_irq(spi->irq, ts);
+ err_free_gpio:
+- if (ts->gpio_pendown != -1)
++ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
+ gpio_free(ts->gpio_pendown);
+ err_cleanup_filter:
+ if (ts->filter_cleanup)
+@@ -1201,7 +1208,7 @@ static int __devexit ads7846_remove(struct spi_device *spi)
+ /* suspend left the IRQ disabled */
+ enable_irq(ts->spi->irq);
+
+- if (ts->gpio_pendown != -1)
++ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
+ gpio_free(ts->gpio_pendown);
+
+ if (ts->filter_cleanup)
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/beagleboard/beagle-asoc.patch b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/beagle-asoc.patch
new file mode 100644
index 0000000000..b2b920037e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/beagle-asoc.patch
@@ -0,0 +1,35 @@
+diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
+index 4f7f040..ccd8973 100644
+--- a/sound/soc/omap/Kconfig
++++ b/sound/soc/omap/Kconfig
+@@ -55,3 +55,13 @@ config SND_OMAP_SOC_OMAP3_PANDORA
+ select SND_SOC_TWL4030
+ help
+ Say Y if you want to add support for SoC audio on the OMAP3 Pandora.
++
++config SND_OMAP_SOC_OMAP3_BEAGLE
++ tristate "SoC Audio support for OMAP3 Beagle"
++ depends on TWL4030_CORE && 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.
++
++
+diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
+index 76fedd9..0c9e4ac 100644
+--- a/sound/soc/omap/Makefile
++++ b/sound/soc/omap/Makefile
+@@ -12,6 +12,7 @@ snd-soc-overo-objs := overo.o
+ snd-soc-omap2evm-objs := omap2evm.o
+ snd-soc-sdp3430-objs := sdp3430.o
+ snd-soc-omap3pandora-objs := omap3pandora.o
++snd-soc-omap3beagle-objs := omap3beagle.o
+
+ obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
+ obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
+@@ -19,3 +20,4 @@ obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
+ obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
+ obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
+ obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
++obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
diff --git a/recipes/linux/linux-kexecboot-2.6.29/beagleboard/defconfig b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/defconfig
new file mode 100644
index 0000000000..7bb7f39d9f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/defconfig
@@ -0,0 +1,2741 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-omap1
+# Thu Jul 16 15:21:36 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 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 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 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_IOMMU=y
+# 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=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=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_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 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_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_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+CONFIG_SMC911X=y
+CONFIG_SMSC911X=y
+# 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=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=n
+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_DMA_SG=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_VIDEO_OMAP3=m
+CONFIG_VIDEO_OMAP34XX_ISP_RESIZER=m
+# 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_OVERO is not set
+CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=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=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_NOP_USB_XCEIV 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=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_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 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_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_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=n
+# 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-kexecboot-2.6.29/beagleboard/ehci.patch b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/ehci.patch
new file mode 100644
index 0000000000..5a8c84471b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/beagleboard/logo_linux_clut224.ppm b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/logo_linux_clut224.ppm
new file mode 100644
index 0000000000..d29fc1c544
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/beagleboard/tincantools-puppy.diff b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/tincantools-puppy.diff
new file mode 100644
index 0000000000..c7856731e5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/beagleboard/tincantools-puppy.diff
@@ -0,0 +1,66 @@
+--- /tmp/board-omap3beagle.c 2009-07-01 01:06:44.000000000 +0200
++++ git/arch/arm/mach-omap2/board-omap3beagle.c 2009-07-01 01:06:50.000000000 +0200
+@@ -125,6 +125,13 @@
+ .wires = 8,
+ .gpio_wp = 29,
+ },
++ {
++ .mmc = 2,
++ .wires = 4,
++ .gpio_wp = 141,
++ .gpio_cd = 162,
++ .transceiver = true,
++ },
+ {} /* Terminator */
+ };
+
+@@ -132,6 +139,11 @@
+ .supply = "vmmc",
+ };
+
++static struct regulator_consumer_supply beagle_vmmc2_supply = {
++ .supply = "vmmc",
++};
++
++
+ static struct regulator_consumer_supply beagle_vsim_supply = {
+ .supply = "vmmc_aux",
+ };
+@@ -148,6 +160,7 @@
+
+ /* link regulators to MMC adapters */
+ beagle_vmmc1_supply.dev = mmc[0].dev;
++ beagle_vmmc2_supply.dev = mmc[1].dev;
+ beagle_vsim_supply.dev = mmc[0].dev;
+
+ /* REVISIT: need ehci-omap hooks for external VBUS
+@@ -209,6 +222,21 @@
+ .consumer_supplies = &beagle_vmmc1_supply,
+ };
+
++/* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */
++static struct regulator_init_data beagle_vmmc2 = {
++ .constraints = {
++ .min_uV = 2700000,
++ .max_uV = 3150000,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
++ | REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &beagle_vmmc2_supply,
++};
++
+ /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
+ static struct regulator_init_data beagle_vsim = {
+ .constraints = {
+@@ -284,6 +312,7 @@
+ .gpio = &beagle_gpio_data,
+ .power = &beagle_power_data,
+ .vmmc1 = &beagle_vmmc1,
++ .vmmc2 = &beagle_vmmc2,
+ .vsim = &beagle_vsim,
+ .vdac = &beagle_vdac,
+ .vpll2 = &beagle_vpll2,
diff --git a/recipes/linux/linux-kexecboot-2.6.29/cache-display-fix.patch b/recipes/linux/linux-kexecboot-2.6.29/cache-display-fix.patch
new file mode 100644
index 0000000000..019fd5acf1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/cache-display-fix.patch
@@ -0,0 +1,238 @@
+On Tue, 2008-07-01 at 06:23 +0100, Dirk Behme wrote:
+> Catalin Marinas wrote:
+> > But, anyway, if you want a patch, Harry is updating it to a recent
+> > kernel.
+>
+> Any news on this? I think there are some people wanting a patch ;)
+
+See below for a preliminary patch updated to 2.6.26-rc8. Note that I
+don't plan to submit it in its current form but clean it up a bit first.
+
+
+Show the cache type of ARMv7 CPUs
+
+From: Catalin Marinas <catalin.marinas@arm.com>
+
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+---
+
+ arch/arm/kernel/setup.c | 137 +++++++++++++++++++++++++++++++++++++++++++++-
+ include/asm-arm/system.h | 18 ++++++
+ 2 files changed, 153 insertions(+), 2 deletions(-)
+
+
+diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
+index 5ae0eb2..0cd238d 100644
+--- a/arch/arm/kernel/setup.c
++++ b/arch/arm/kernel/setup.c
+@@ -256,6 +256,24 @@ static const char *proc_arch[] = {
+ "?(17)",
+ };
+
++static const char *v7_cache_policy[4] = {
++ "reserved",
++ "AVIVT",
++ "VIPT",
++ "PIPT",
++};
++
++static const char *v7_cache_type[8] = {
++ "none",
++ "instruction only",
++ "data only",
++ "separate instruction and data",
++ "unified",
++ "unknown type",
++ "unknown type",
++ "unknown type",
++};
++
+ #define CACHE_TYPE(x) (((x) >> 25) & 15)
+ #define CACHE_S(x) ((x) & (1 << 24))
+ #define CACHE_DSIZE(x) (((x) >> 12) & 4095) /* only if S=1 */
+@@ -266,6 +284,22 @@ static const char *proc_arch[] = {
+ #define CACHE_M(y) ((y) & (1 << 2))
+ #define CACHE_LINE(y) ((y) & 3)
+
++#define CACHE_TYPE_V7(x) (((x) >> 14) & 3)
++#define CACHE_UNIFIED(x) ((((x) >> 27) & 7)+1)
++#define CACHE_COHERENT(x) ((((x) >> 24) & 7)+1)
++
++#define CACHE_ID_LEVEL_MASK 7
++#define CACHE_ID_LEVEL_BITS 3
++
++#define CACHE_LINE_V7(v) ((1 << (((v) & 7)+4)))
++#define CACHE_ASSOC_V7(v) ((((v) >> 3) & ((1<<10)-1))+1)
++#define CACHE_SETS_V7(v) ((((v) >> 13) & ((1<<15)-1))+1)
++#define CACHE_SIZE_V7(v) (CACHE_LINE_V7(v)*CACHE_ASSOC_V7(v)*CACHE_SETS_V7(v))
++#define CACHE_WA_V7(v) (((v) & (1<<28)) != 0)
++#define CACHE_RA_V7(v) (((v) & (1<<29)) != 0)
++#define CACHE_WB_V7(v) (((v) & (1<<30)) != 0)
++#define CACHE_WT_V7(v) (((v) & (1<<31)) != 0)
++
+ static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
+ {
+ unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
+@@ -279,11 +313,57 @@ static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
+ CACHE_LINE(cache)));
+ }
+
++static void dump_v7_cache(const char *type, int cpu, unsigned int level)
++{
++ unsigned int cachesize;
++
++ write_extended_cpuid(2,0,0,0,level); /* Set the cache size selection register */
++ write_extended_cpuid(0,7,5,4,0); /* Prefetch flush to wait for above */
++ cachesize = read_extended_cpuid(1,0,0,0);
++
++ printk("CPU%u: %s cache: %d bytes, associativity %d, %d byte lines, %d sets,\n supports%s%s%s%s\n",
++ cpu, type,
++ CACHE_SIZE_V7(cachesize),CACHE_ASSOC_V7(cachesize),
++ CACHE_LINE_V7(cachesize),CACHE_SETS_V7(cachesize),
++ CACHE_WA_V7(cachesize) ? " WA" : "",
++ CACHE_RA_V7(cachesize) ? " RA" : "",
++ CACHE_WB_V7(cachesize) ? " WB" : "",
++ CACHE_WT_V7(cachesize) ? " WT" : "");
++}
++
+ static void __init dump_cpu_info(int cpu)
+ {
+ unsigned int info = read_cpuid(CPUID_CACHETYPE);
+
+- if (info != processor_id) {
++ if (info != processor_id && (info & (1 << 31))) {
++ /* ARMv7 style of cache info register */
++ unsigned int id = read_extended_cpuid(1,0,0,1);
++ unsigned int level = 0;
++ printk("CPU%u: L1 I %s cache. Caches unified at level %u, coherent at level %u\n",
++ cpu,
++ v7_cache_policy[CACHE_TYPE_V7(info)],
++ CACHE_UNIFIED(id),
++ CACHE_COHERENT(id));
++
++ while (id & CACHE_ID_LEVEL_MASK) {
++ printk("CPU%u: Level %u cache is %s\n",
++ cpu, (level >> 1)+1, v7_cache_type[id & CACHE_ID_LEVEL_MASK]);
++
++ if (id & 1) {
++ /* Dump I at this level */
++ dump_v7_cache("I", cpu, level | 1);
++ }
++
++ if (id & (4 | 2)) {
++ /* Dump D or unified at this level */
++ dump_v7_cache((id & 4) ? "unified" : "D", cpu, level);
++ }
++
++ /* Next level out */
++ level += 2;
++ id >>= CACHE_ID_LEVEL_BITS;
++ }
++ } else if (info != processor_id) {
+ printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
+ cache_types[CACHE_TYPE(info)]);
+ if (CACHE_S(info)) {
+@@ -916,6 +996,30 @@ c_show_cache(struct seq_file *m, const char *type, unsigned int cache)
+ CACHE_LINE(cache)));
+ }
+
++static void c_show_v7_cache(struct seq_file *m, const char *type, unsigned int levelselect)
++{
++ unsigned int cachesize;
++ unsigned int level = (levelselect >> 1) + 1;
++
++ write_extended_cpuid(2,0,0,0,levelselect); /* Set the cache size selection register */
++ write_extended_cpuid(0,7,5,4,0); /* Prefetch flush to wait for above */
++ cachesize = read_extended_cpuid(1,0,0,0);
++
++ seq_printf(m, "L%u %s size\t\t: %d bytes\n"
++ "L%u %s assoc\t\t: %d\n"
++ "L%u %s line length\t: %d\n"
++ "L%u %s sets\t\t: %d\n"
++ "L%u %s supports\t\t:%s%s%s%s\n",
++ level, type, CACHE_SIZE_V7(cachesize),
++ level, type, CACHE_ASSOC_V7(cachesize),
++ level, type, CACHE_LINE_V7(cachesize),
++ level, type, CACHE_SETS_V7(cachesize),
++ level, type, CACHE_WA_V7(cachesize) ? " WA" : "",
++ CACHE_RA_V7(cachesize) ? " RA" : "",
++ CACHE_WB_V7(cachesize) ? " WB" : "",
++ CACHE_WT_V7(cachesize) ? " WT" : "");
++}
++
+ static int c_show(struct seq_file *m, void *v)
+ {
+ int i;
+@@ -971,7 +1075,36 @@ static int c_show(struct seq_file *m, void *v)
+
+ {
+ unsigned int cache_info = read_cpuid(CPUID_CACHETYPE);
+- if (cache_info != processor_id) {
++ if (cache_info != processor_id && (cache_info & (1<<31))) {
++ /* V7 style of cache info register */
++ unsigned int id = read_extended_cpuid(1,0,0,1);
++ unsigned int levelselect = 0;
++ seq_printf(m, "L1 I cache\t:%s\n"
++ "Cache unification level\t: %u\n"
++ "Cache coherency level\t: %u\n",
++ v7_cache_policy[CACHE_TYPE_V7(cache_info)],
++ CACHE_UNIFIED(id),
++ CACHE_COHERENT(id));
++
++ while (id & CACHE_ID_LEVEL_MASK) {
++ seq_printf(m, "Level %u cache\t\t: %s\n",
++ (levelselect >> 1)+1, v7_cache_type[id & CACHE_ID_LEVEL_MASK]);
++
++ if (id & 1) {
++ /* Dump I at this level */
++ c_show_v7_cache(m, "I", levelselect | 1);
++ }
++
++ if (id & (4 | 2)) {
++ /* Dump D or unified at this level */
++ c_show_v7_cache(m, (id & 4) ? "cache" : "D", levelselect);
++ }
++
++ /* Next level out */
++ levelselect += 2;
++ id >>= CACHE_ID_LEVEL_BITS;
++ }
++ } else if (cache_info != processor_id) {
+ seq_printf(m, "Cache type\t: %s\n"
+ "Cache clean\t: %s\n"
+ "Cache lockdown\t: %s\n"
+diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
+index 514af79..704738e 100644
+--- a/arch/arm/include/asm/system.h
++++ b/arch/arm/include/asm/system.h
+@@ -74,6 +74,24 @@
+ : "cc"); \
+ __val; \
+ })
++#define read_extended_cpuid(op1,op2,op3,op4) \
++ ({ \
++ unsigned int __val; \
++ asm("mrc p15," __stringify(op1) ",%0,c" __stringify(op2)",c" __stringify(op3)"," __stringify(op4) \
++ : "=r" (__val) \
++ : \
++ : "cc"); \
++ __val; \
++ })
++
++#define write_extended_cpuid(op1,op2,op3,op4,v) \
++ ({ \
++ unsigned int __val = v; \
++ asm("mcr p15," __stringify(op1) ",%0,c" __stringify(op2)",c" __stringify(op3)"," __stringify(op4) \
++ : \
++ : "r" (__val) \
++ : "cc"); \
++ })
+ #else
+ extern unsigned int processor_id;
+ #define read_cpuid(reg) (processor_id)
+
+
+--
+Catalin
+
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
new file mode 100644
index 0000000000..5c86e6a654
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
@@ -0,0 +1,1316 @@
+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 02/69] 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/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
+index adbe21f..a04e3ee 100644
+--- a/arch/arm/mach-omap2/io.c
++++ b/arch/arm/mach-omap2/io.c
+@@ -18,13 +18,13 @@
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/init.h>
++#include <linux/omapfb.h>
+ #include <linux/io.h>
+
+ #include <asm/tlb.h>
+
+ #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>
+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.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
new file mode 100644
index 0000000000..877bb43c56
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch
new file mode 100644
index 0000000000..c68c89e171
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch
new file mode 100644
index 0000000000..26d21d8744
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch
@@ -0,0 +1,5715 @@
+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
+@@ -37,6 +37,7 @@
+ #include <mach/common.h>
+ #include <mach/dma.h>
+ #include <mach/gpmc.h>
++#include <mach/display.h>
+
+ #include <mach/control.h>
+
+@@ -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>
+@@ -43,6 +44,7 @@
+ #include <mach/gpmc.h>
+ #include <mach/nand.h>
+ #include <mach/mux.h>
++#include <mach/display.h>
+
+ #include "twl4030-generic-scripts.h"
+ #include "mmc-twl4030.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
+@@ -36,6 +36,7 @@
+ #include <mach/usb.h>
+ #include <mach/common.h>
+ #include <mach/mcspi.h>
++#include <mach/display.h>
+
+ #include "sdram-micron-mt46h32m32lf-6.h"
+ #include "twl4030-generic-scripts.h"
+@@ -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-kexecboot-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch
new file mode 100644
index 0000000000..82a1474056
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch
new file mode 100644
index 0000000000..8e1d139c72
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch
new file mode 100644
index 0000000000..44f126e7a4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch
new file mode 100644
index 0000000000..6457a5b94a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch
new file mode 100644
index 0000000000..5f4f155452
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch
new file mode 100644
index 0000000000..c545b648cc
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch
new file mode 100644
index 0000000000..a0b694736b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch
new file mode 100644
index 0000000000..8d5f57866d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch
new file mode 100644
index 0000000000..2ba9b1b1a2
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch b/recipes/linux/linux-kexecboot-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch
new file mode 100644
index 0000000000..17f959cb27
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch b/recipes/linux/linux-kexecboot-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-kexecboot-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-kexecboot-2.6.29/dss2/0070-DSS2-fix-irq1.diff b/recipes/linux/linux-kexecboot-2.6.29/dss2/0070-DSS2-fix-irq1.diff
new file mode 100644
index 0000000000..8f384dfe2d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/dss2/0071-DSS2-fix-irq2.diff b/recipes/linux/linux-kexecboot-2.6.29/dss2/0071-DSS2-fix-irq2.diff
new file mode 100644
index 0000000000..cb8aaf1a28
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/ehci.patch b/recipes/linux/linux-kexecboot-2.6.29/ehci.patch
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/ehci.patch
diff --git a/recipes/linux/linux-kexecboot-2.6.29/evm-mcspi-ts.diff b/recipes/linux/linux-kexecboot-2.6.29/evm-mcspi-ts.diff
new file mode 100644
index 0000000000..64d797cf96
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/fix-audio-capture.patch b/recipes/linux/linux-kexecboot-2.6.29/fix-audio-capture.patch
new file mode 100644
index 0000000000..c5ff914757
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/fix-audio-capture.patch
@@ -0,0 +1,16 @@
+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) */
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/fix-install.patch b/recipes/linux/linux-kexecboot-2.6.29/fix-install.patch
new file mode 100644
index 0000000000..46bc25a50b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/fix-unaligned-access.diff b/recipes/linux/linux-kexecboot-2.6.29/fix-unaligned-access.diff
new file mode 100644
index 0000000000..c82090f54a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/fix-unaligned-access.diff
@@ -0,0 +1,41 @@
+From: Mans Rullgard <mans@mansr.com>
+Date: Sat, 28 Mar 2009 12:54:25 +0000 (+0000)
+Subject: NSM: Fix unaligned accesses in nsm_init_private()
+X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=8f2bd6fdde1ebfef57f65b6cf29b29008c23d297
+
+NSM: Fix unaligned accesses in nsm_init_private()
+
+This fixes unaligned accesses in nsm_init_private() when
+creating nlm_reboot keys.
+
+Signed-off-by: Mans Rullgard <mans@mansr.com>
+---
+
+diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
+index 5e2c4d5..6d5d4a4 100644
+--- a/fs/lockd/mon.c
++++ b/fs/lockd/mon.c
+@@ -16,6 +16,8 @@
+ #include <linux/sunrpc/svc.h>
+ #include <linux/lockd/lockd.h>
+
++#include <asm/unaligned.h>
++
+ #define NLMDBG_FACILITY NLMDBG_MONITOR
+ #define NSM_PROGRAM 100024
+ #define NSM_VERSION 1
+@@ -274,10 +276,12 @@ static void nsm_init_private(struct nsm_handle *nsm)
+ {
+ u64 *p = (u64 *)&nsm->sm_priv.data;
+ struct timespec ts;
++ s64 ns;
+
+ ktime_get_ts(&ts);
+- *p++ = timespec_to_ns(&ts);
+- *p = (unsigned long)nsm;
++ ns = timespec_to_ns(&ts);
++ put_unaligned(ns, p);
++ put_unaligned((unsigned long)nsm, p + 1);
+ }
+
+ static struct nsm_handle *nsm_create_handle(const struct sockaddr *sap,
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0001-omap-iommu-tlb-and-pagetable-primitives.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0001-omap-iommu-tlb-and-pagetable-primitives.patch
new file mode 100644
index 0000000000..c2c9bc2b62
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0001-omap-iommu-tlb-and-pagetable-primitives.patch
@@ -0,0 +1,1226 @@
+From a62a047ed02162573e4bece18ecf8bdd66ccd06b Mon Sep 17 00:00:00 2001
+From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+Date: Mon, 26 Jan 2009 15:13:40 +0200
+Subject: [PATCH] omap iommu: tlb and pagetable primitives
+
+This patch provides:
+
+- iotlb_*() : iommu tlb operations
+- iopgtable_*() : iommu pagetable(twl) operations
+- iommu_*() : the other generic operations
+
+and the entry points to register and acquire iommu object.
+
+Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/iommu.h | 157 +++++
+ arch/arm/plat-omap/iommu.c | 953 +++++++++++++++++++++++++++++++
+ arch/arm/plat-omap/iopgtable.h | 72 +++
+ 3 files changed, 1182 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/plat-omap/include/mach/iommu.h
+ create mode 100644 arch/arm/plat-omap/iommu.c
+ create mode 100644 arch/arm/plat-omap/iopgtable.h
+
+diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/mach/iommu.h
+new file mode 100644
+index 0000000..ef04d7a
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/iommu.h
+@@ -0,0 +1,157 @@
++/*
++ * omap iommu: main structures
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@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.
++ */
++
++#ifndef __MACH_IOMMU_H
++#define __MACH_IOMMU_H
++
++struct iotlb_entry {
++ u32 da;
++ u32 pa;
++ u32 pgsz, prsvd, valid;
++ union {
++ u16 ap;
++ struct {
++ u32 endian, elsz, mixed;
++ };
++ };
++};
++
++struct iommu {
++ const char *name;
++ struct module *owner;
++ struct clk *clk;
++ void __iomem *regbase;
++ struct device *dev;
++
++ unsigned int refcount;
++ struct mutex iommu_lock; /* global for this whole object */
++
++ /*
++ * We don't change iopgd for a situation like pgd for a task,
++ * but share it globally for each iommu.
++ */
++ u32 *iopgd;
++ spinlock_t page_table_lock; /* protect iopgd */
++
++ int nr_tlb_entries;
++
++ struct list_head mmap;
++ struct mutex mmap_lock; /* protect mmap */
++
++ int (*isr)(struct iommu *obj);
++
++ void *ctx; /* iommu context: registres saved area */
++};
++
++struct cr_regs {
++ union {
++ struct {
++ u16 cam_l;
++ u16 cam_h;
++ };
++ u32 cam;
++ };
++ union {
++ struct {
++ u16 ram_l;
++ u16 ram_h;
++ };
++ u32 ram;
++ };
++};
++
++struct iotlb_lock {
++ short base;
++ short vict;
++};
++
++/* architecture specific functions */
++struct iommu_functions {
++ unsigned long version;
++
++ int (*enable)(struct iommu *obj);
++ void (*disable)(struct iommu *obj);
++ u32 (*fault_isr)(struct iommu *obj, u32 *ra);
++
++ void (*tlb_read_cr)(struct iommu *obj, struct cr_regs *cr);
++ void (*tlb_load_cr)(struct iommu *obj, struct cr_regs *cr);
++
++ struct cr_regs *(*alloc_cr)(struct iommu *obj, struct iotlb_entry *e);
++ int (*cr_valid)(struct cr_regs *cr);
++ u32 (*cr_to_virt)(struct cr_regs *cr);
++ void (*cr_to_e)(struct cr_regs *cr, struct iotlb_entry *e);
++ ssize_t (*dump_cr)(struct iommu *obj, struct cr_regs *cr, char *buf);
++
++ u32 (*get_pte_attr)(struct iotlb_entry *e);
++
++ void (*save_ctx)(struct iommu *obj);
++ void (*restore_ctx)(struct iommu *obj);
++ ssize_t (*dump_ctx)(struct iommu *obj, char *buf);
++};
++
++struct iommu_platform_data {
++ const char *name;
++ const char *clk_name;
++ const int nr_tlb_entries;
++};
++
++#include <mach/iommu2.h>
++
++/*
++ * utilities for super page(16MB, 1MB, 64KB and 4KB)
++ */
++
++#define iopgsz_max(bytes) \
++ (((bytes) >= SZ_16M) ? SZ_16M : \
++ ((bytes) >= SZ_1M) ? SZ_1M : \
++ ((bytes) >= SZ_64K) ? SZ_64K : \
++ ((bytes) >= SZ_4K) ? SZ_4K : 0)
++
++#define bytes_to_iopgsz(bytes) \
++ (((bytes) == SZ_16M) ? MMU_CAM_PGSZ_16M : \
++ ((bytes) == SZ_1M) ? MMU_CAM_PGSZ_1M : \
++ ((bytes) == SZ_64K) ? MMU_CAM_PGSZ_64K : \
++ ((bytes) == SZ_4K) ? MMU_CAM_PGSZ_4K : -1)
++
++#define iopgsz_to_bytes(iopgsz) \
++ (((iopgsz) == MMU_CAM_PGSZ_16M) ? SZ_16M : \
++ ((iopgsz) == MMU_CAM_PGSZ_1M) ? SZ_1M : \
++ ((iopgsz) == MMU_CAM_PGSZ_64K) ? SZ_64K : \
++ ((iopgsz) == MMU_CAM_PGSZ_4K) ? SZ_4K : 0)
++
++#define iopgsz_ok(bytes) (bytes_to_iopgsz(bytes) >= 0)
++
++/*
++ * global functions
++ */
++extern u32 iommu_arch_version(void);
++
++extern int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e);
++extern void flush_iotlb_page(struct iommu *obj, u32 da);
++extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end);
++extern void flush_iotlb_all(struct iommu *obj);
++
++ssize_t iotlb_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf);
++
++extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e);
++extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova);
++
++extern struct iommu *iommu_get(const char *name);
++extern void iommu_put(struct iommu *obj);
++
++extern void iommu_save_ctx(struct iommu *obj);
++extern void iommu_restore_ctx(struct iommu *obj);
++
++extern int install_iommu_arch(const struct iommu_functions *ops);
++extern void uninstall_iommu_arch(const struct iommu_functions *ops);
++
++#endif /* __MACH_IOMMU_H */
+diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
+new file mode 100644
+index 0000000..e638883
+--- /dev/null
++++ b/arch/arm/plat-omap/iommu.c
+@@ -0,0 +1,953 @@
++/*
++ * omap iommu: tlb and pagetable primitives
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>,
++ * Paul Mundt and Toshihiro Kobayashi
++ *
++ * 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/err.h>
++#include <linux/module.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/clk.h>
++#include <linux/platform_device.h>
++
++#include <asm/io.h>
++#include <asm/cacheflush.h>
++
++#include <mach/clock.h>
++#include <mach/iommu.h>
++
++#include "iopgtable.h"
++
++/* accommodate the difference between omap1 and omap2/3 */
++static const struct iommu_functions *arch_iommu;
++
++static struct platform_driver omap_iommu_driver;
++static struct kmem_cache *iopte_cachep;
++
++/**
++ * install_iommu_arch() - Install archtecure specific iommu functions
++ * @ops: a pointer to architecture specific iommu functions
++ *
++ * There are several kind of iommu algorithm(tlb, pagetable) among
++ * omap series. This interface installs such an iommu algorighm.
++ **/
++int install_iommu_arch(const struct iommu_functions *ops)
++{
++ if (arch_iommu)
++ return -EBUSY;
++
++ arch_iommu = ops;
++ return 0;
++}
++EXPORT_SYMBOL_GPL(install_iommu_arch);
++
++/**
++ * uninstall_iommu_arch() - Uninstall archtecure specific iommu functions
++ * @ops: a pointer to architecture specific iommu functions
++ *
++ * This interface uninstalls the iommu algorighm installed previously.
++ **/
++void uninstall_iommu_arch(const struct iommu_functions *ops)
++{
++ if (arch_iommu != ops)
++ pr_err("%s: not your arch\n", __func__);
++
++ arch_iommu = NULL;
++}
++EXPORT_SYMBOL_GPL(uninstall_iommu_arch);
++
++/**
++ * iommu_save_ctx() - Save registers for pm off-mode support
++ * @obj: target iommu
++ **/
++void iommu_save_ctx(struct iommu *obj)
++{
++ arch_iommu->save_ctx(obj);
++}
++EXPORT_SYMBOL_GPL(iommu_save_ctx);
++
++/**
++ * iommu_restore_ctx() - Restore registers for pm off-mode support
++ * @obj: target iommu
++ **/
++void iommu_restore_ctx(struct iommu *obj)
++{
++ arch_iommu->restore_ctx(obj);
++}
++EXPORT_SYMBOL_GPL(iommu_restore_ctx);
++
++/**
++ * iommu_arch_version() - Return running iommu arch version
++ **/
++u32 iommu_arch_version(void)
++{
++ return arch_iommu->version;
++}
++EXPORT_SYMBOL_GPL(iommu_arch_version);
++
++static int iommu_enable(struct iommu *obj)
++{
++ int err;
++
++ if (!obj)
++ return -EINVAL;
++
++ clk_enable(obj->clk);
++
++ err = arch_iommu->enable(obj);
++
++ clk_disable(obj->clk);
++ return err;
++}
++
++static void iommu_disable(struct iommu *obj)
++{
++ if (!obj)
++ return;
++
++ clk_enable(obj->clk);
++
++ arch_iommu->disable(obj);
++
++ clk_disable(obj->clk);
++}
++
++#ifdef DEBUG
++static ssize_t iommu_dump_ctx(struct iommu *obj, char *buf)
++{
++ if (!obj || !buf)
++ return -EINVAL;
++
++ return arch_iommu->dump_ctx(obj, buf);
++}
++#endif
++
++/*
++ * TLB operations
++ */
++static inline void iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e)
++{
++ BUG_ON(!cr || !e);
++
++ arch_iommu->cr_to_e(cr, e);
++}
++
++static inline int iotlb_cr_valid(struct cr_regs *cr)
++{
++ if (!cr)
++ return -EINVAL;
++
++ return arch_iommu->cr_valid(cr);
++}
++
++static inline struct cr_regs *iotlb_alloc_cr(struct iommu *obj,
++ struct iotlb_entry *e)
++{
++ if (!e)
++ return NULL;
++
++ return arch_iommu->alloc_cr(obj, e);
++}
++
++static inline u32 iotlb_cr_to_virt(struct cr_regs *cr)
++{
++ return arch_iommu->cr_to_virt(cr);
++}
++
++static u32 get_iopte_attr(struct iotlb_entry *e)
++{
++ return arch_iommu->get_pte_attr(e);
++}
++
++static u32 iommu_report_fault(struct iommu *obj, u32 *da)
++{
++ return arch_iommu->fault_isr(obj, da);
++}
++
++static void iotlb_lock_get(struct iommu *obj, struct iotlb_lock *l)
++{
++ u32 val;
++
++ val = iommu_read_reg(obj, MMU_LOCK);
++
++ l->base = MMU_LOCK_BASE(val);
++ l->vict = MMU_LOCK_VICT(val);
++
++ BUG_ON(l->base != 0); /* Currently no preservation is used */
++}
++
++static void iotlb_lock_set(struct iommu *obj, struct iotlb_lock *l)
++{
++ u32 val;
++
++ BUG_ON(l->base != 0); /* Currently no preservation is used */
++
++ val = (l->base << MMU_LOCK_BASE_SHIFT);
++ val |= (l->vict << MMU_LOCK_VICT_SHIFT);
++
++ iommu_write_reg(obj, val, MMU_LOCK);
++}
++
++static void iotlb_read_cr(struct iommu *obj, struct cr_regs *cr)
++{
++ arch_iommu->tlb_read_cr(obj, cr);
++}
++
++static void iotlb_load_cr(struct iommu *obj, struct cr_regs *cr)
++{
++ arch_iommu->tlb_load_cr(obj, cr);
++
++ iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY);
++ iommu_write_reg(obj, 1, MMU_LD_TLB);
++}
++
++/**
++ * iotlb_dump_cr() - Dump an iommu tlb entry into buf
++ * @obj: target iommu
++ * @cr: contents of cam and ram register
++ * @buf: output buffer
++ **/
++ssize_t iotlb_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
++{
++ BUG_ON(!cr || !buf);
++
++ return arch_iommu->dump_cr(obj, cr, buf);
++}
++EXPORT_SYMBOL_GPL(iotlb_dump_cr);
++
++/**
++ * load_iotlb_entry() - Set an iommu tlb entry
++ * @obj: target iommu
++ * @e: an iommu tlb entry info
++ **/
++int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e)
++{
++ int i;
++ int err = 0;
++ struct iotlb_lock l;
++ struct cr_regs *cr;
++
++ if (!obj || !obj->nr_tlb_entries || !e)
++ return -EINVAL;
++
++ clk_enable(obj->clk);
++
++ for (i = 0; i < obj->nr_tlb_entries; i++) {
++ struct cr_regs tmp;
++
++ iotlb_lock_get(obj, &l);
++ l.vict = i;
++ iotlb_lock_set(obj, &l);
++ iotlb_read_cr(obj, &tmp);
++ if (!iotlb_cr_valid(&tmp))
++ break;
++ }
++
++ if (i == obj->nr_tlb_entries) {
++ dev_dbg(obj->dev, "%s: full: no entry\n", __func__);
++ err = -EBUSY;
++ goto out;
++ }
++
++ cr = iotlb_alloc_cr(obj, e);
++ if (IS_ERR(cr)) {
++ clk_disable(obj->clk);
++ return PTR_ERR(cr);
++ }
++
++ iotlb_load_cr(obj, cr);
++ kfree(cr);
++
++ /* increment victim for next tlb load */
++ if (++l.vict == obj->nr_tlb_entries)
++ l.vict = 0;
++ iotlb_lock_set(obj, &l);
++out:
++ clk_disable(obj->clk);
++ return err;
++}
++EXPORT_SYMBOL_GPL(load_iotlb_entry);
++
++/**
++ * flush_iotlb_page() - Clear an iommu tlb entry
++ * @obj: target iommu
++ * @da: iommu device virtual address
++ *
++ * Clear an iommu tlb entry which includes 'da' address.
++ **/
++void flush_iotlb_page(struct iommu *obj, u32 da)
++{
++ struct iotlb_lock l;
++ int i;
++
++ clk_enable(obj->clk);
++
++ for (i = 0; i < obj->nr_tlb_entries; i++) {
++ struct cr_regs cr;
++ u32 start;
++ size_t bytes;
++
++ iotlb_lock_get(obj, &l);
++ l.vict = i;
++ iotlb_lock_set(obj, &l);
++ iotlb_read_cr(obj, &cr);
++ if (!iotlb_cr_valid(&cr))
++ continue;
++
++ start = iotlb_cr_to_virt(&cr);
++ bytes = iopgsz_to_bytes(cr.cam & 3);
++
++ if ((start <= da) && (da < start + bytes)) {
++ dev_dbg(obj->dev, "%s: %08x<=%08x(%x)\n",
++ __func__, start, da, bytes);
++
++ iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY);
++ }
++ }
++ clk_disable(obj->clk);
++
++ if (i == obj->nr_tlb_entries)
++ dev_dbg(obj->dev, "%s: no page for %08x\n", __func__, da);
++}
++EXPORT_SYMBOL_GPL(flush_iotlb_page);
++
++/**
++ * flush_iotlb_range() - Clear an iommu tlb entries
++ * @obj: target iommu
++ * @start: iommu device virtual address(start)
++ * @end: iommu device virtual address(end)
++ *
++ * Clear an iommu tlb entry which includes 'da' address.
++ **/
++void flush_iotlb_range(struct iommu *obj, u32 start, u32 end)
++{
++ u32 da = start;
++
++ while (da < end) {
++ flush_iotlb_page(obj, da);
++ /* FIXME: Optimize for multiple page size */
++ da += IOPTE_SIZE;
++ }
++}
++EXPORT_SYMBOL_GPL(flush_iotlb_range);
++
++/**
++ * flush_iotlb_all() - Clear all iommu tlb entries
++ * @obj: target iommu
++ **/
++void flush_iotlb_all(struct iommu *obj)
++{
++ struct iotlb_lock l;
++
++ clk_enable(obj->clk);
++
++ l.base = 0;
++ l.vict = 0;
++ iotlb_lock_set(obj, &l);
++
++ iommu_write_reg(obj, 1, MMU_GFLUSH);
++
++ clk_disable(obj->clk);
++}
++EXPORT_SYMBOL_GPL(flush_iotlb_all);
++
++/*
++ * H/W pagetable operations
++ */
++static void flush_iopgd_range(u32 *first, u32 *last)
++{
++ /* FIXME: L2 cache should be taken care of if it exists */
++ do {
++ asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pgd"
++ : : "r" (first));
++ first += L1_CACHE_BYTES / sizeof(*first);
++ } while (first <= last);
++}
++
++static void flush_iopte_range(u32 *first, u32 *last)
++{
++ /* FIXME: L2 cache should be taken care of if it exists */
++ do {
++ asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pte"
++ : : "r" (first));
++ first += L1_CACHE_BYTES / sizeof(*first);
++ } while (first <= last);
++}
++
++static void iopte_free(u32 *iopte)
++{
++ /* Note: freed iopte's must be clean ready for re-use */
++ kmem_cache_free(iopte_cachep, iopte);
++}
++
++static u32 *iopte_alloc(struct iommu *obj, u32 *iopgd, u32 da)
++{
++ u32 *iopte;
++
++ /* a table has already existed */
++ if (*iopgd)
++ goto pte_ready;
++
++ /*
++ * do the allocation outside the page table lock
++ */
++ spin_unlock(&obj->page_table_lock);
++ iopte = kmem_cache_zalloc(iopte_cachep, GFP_KERNEL);
++ spin_lock(&obj->page_table_lock);
++
++ if (!*iopgd) {
++ if (!iopte)
++ return ERR_PTR(-ENOMEM);
++
++ *iopgd = virt_to_phys(iopte) | IOPGD_TABLE;
++ flush_iopgd_range(iopgd, iopgd);
++
++ dev_vdbg(obj->dev, "%s: a new pte:%p\n", __func__, iopte);
++ } else {
++ /* We raced, free the reduniovant table */
++ iopte_free(iopte);
++ }
++
++pte_ready:
++ iopte = iopte_offset(iopgd, da);
++
++ dev_vdbg(obj->dev,
++ "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n",
++ __func__, da, iopgd, *iopgd, iopte, *iopte);
++
++ return iopte;
++}
++
++static int iopgd_alloc_section(struct iommu *obj, u32 da, u32 pa, u32 prot)
++{
++ u32 *iopgd = iopgd_offset(obj, da);
++
++ *iopgd = (pa & IOSECTION_MASK) | prot | IOPGD_SECTION;
++ flush_iopgd_range(iopgd, iopgd);
++ return 0;
++}
++
++static int iopgd_alloc_super(struct iommu *obj, u32 da, u32 pa, u32 prot)
++{
++ u32 *iopgd = iopgd_offset(obj, da);
++ int i;
++
++ for (i = 0; i < 16; i++)
++ *(iopgd + i) = (pa & IOSUPER_MASK) | prot | IOPGD_SUPER;
++ flush_iopgd_range(iopgd, iopgd + 15);
++ return 0;
++}
++
++static int iopte_alloc_page(struct iommu *obj, u32 da, u32 pa, u32 prot)
++{
++ u32 *iopgd = iopgd_offset(obj, da);
++ u32 *iopte = iopte_alloc(obj, iopgd, da);
++
++ if (IS_ERR(iopte))
++ return PTR_ERR(iopte);
++
++ *iopte = (pa & IOPAGE_MASK) | prot | IOPTE_SMALL;
++ flush_iopte_range(iopte, iopte);
++
++ dev_vdbg(obj->dev, "%s: da:%08x pa:%08x pte:%p *pte:%08x\n",
++ __func__, da, pa, iopte, *iopte);
++
++ return 0;
++}
++
++static int iopte_alloc_large(struct iommu *obj, u32 da, u32 pa, u32 prot)
++{
++ u32 *iopgd = iopgd_offset(obj, da);
++ u32 *iopte = iopte_alloc(obj, iopgd, da);
++ int i;
++
++ if (IS_ERR(iopte))
++ return PTR_ERR(iopte);
++
++ for (i = 0; i < 16; i++)
++ *(iopte + i) = (pa & IOLARGE_MASK) | prot | IOPTE_LARGE;
++ flush_iopte_range(iopte, iopte + 15);
++ return 0;
++}
++
++static int iopgtable_store_entry_core(struct iommu *obj, struct iotlb_entry *e)
++{
++ int (*fn)(struct iommu *, u32, u32, u32);
++ u32 prot;
++ int err;
++
++ if (!obj || !e)
++ return -EINVAL;
++
++ switch (e->pgsz) {
++ case MMU_CAM_PGSZ_16M:
++ fn = iopgd_alloc_super;
++ break;
++ case MMU_CAM_PGSZ_1M:
++ fn = iopgd_alloc_section;
++ break;
++ case MMU_CAM_PGSZ_64K:
++ fn = iopte_alloc_large;
++ break;
++ case MMU_CAM_PGSZ_4K:
++ fn = iopte_alloc_page;
++ break;
++ default:
++ fn = NULL;
++ BUG();
++ break;
++ }
++
++ prot = get_iopte_attr(e);
++
++ spin_lock(&obj->page_table_lock);
++ err = fn(obj, e->da, e->pa, prot);
++ spin_unlock(&obj->page_table_lock);
++
++ return err;
++}
++
++#ifdef DEBUG
++static void dump_tlb_entries(struct iommu *obj)
++{
++ int i;
++ struct iotlb_lock l;
++
++ clk_enable(obj->clk);
++
++ pr_info("%8s %8s\n", "cam:", "ram:");
++ pr_info("-----------------------------------------\n");
++
++ for (i = 0; i < obj->nr_tlb_entries; i++) {
++ struct cr_regs cr;
++ static char buf[4096];
++
++ iotlb_lock_get(obj, &l);
++ l.vict = i;
++ iotlb_lock_set(obj, &l);
++ iotlb_read_cr(obj, &cr);
++ if (!iotlb_cr_valid(&cr))
++ continue;
++
++ memset(buf, 0, 4096);
++ iotlb_dump_cr(obj, &cr, buf);
++ pr_err("%s", buf);
++ }
++
++ clk_disable(obj->clk);
++}
++#else
++static inline void dump_tlb_entries(struct iommu *obj) {}
++#endif
++
++/**
++ * iopgtable_store_entry() - Make an iommu pte entry
++ * @obj: target iommu
++ * @e: an iommu tlb entry info
++ **/
++int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e)
++{
++ int err;
++
++ flush_iotlb_page(obj, e->da);
++ err = iopgtable_store_entry_core(obj, e);
++#ifdef USE_IOTLB
++ if (!err)
++ load_iotlb_entry(obj, e);
++#endif
++ return err;
++}
++EXPORT_SYMBOL_GPL(iopgtable_store_entry);
++
++/**
++ * iopgtable_lookup_entry() - Lookup an iommu pte entry
++ * @obj: target iommu
++ * @da: iommu device virtual address
++ * @ppgd: iommu pgd entry pointer to be returned
++ * @ppte: iommu pte entry pointer to be returned
++ **/
++void iopgtable_lookup_entry(struct iommu *obj, u32 da, u32 **ppgd, u32 **ppte)
++{
++ u32 *iopgd, *iopte = NULL;
++
++ iopgd = iopgd_offset(obj, da);
++ if (!*iopgd)
++ goto out;
++
++ if (*iopgd & IOPGD_TABLE)
++ iopte = iopte_offset(iopgd, da);
++out:
++ *ppgd = iopgd;
++ *ppte = iopte;
++}
++EXPORT_SYMBOL_GPL(iopgtable_lookup_entry);
++
++static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da)
++{
++ size_t bytes;
++ u32 *iopgd = iopgd_offset(obj, da);
++ int nent = 1;
++
++ if (!*iopgd)
++ return 0;
++
++ if (*iopgd & IOPGD_TABLE) {
++ int i;
++ u32 *iopte = iopte_offset(iopgd, da);
++
++ bytes = IOPTE_SIZE;
++ if (*iopte & IOPTE_LARGE) {
++ nent *= 16;
++ /* rewind to the 1st entry */
++ iopte = (u32 *)((u32)iopte & IOLARGE_MASK);
++ }
++ bytes *= nent;
++ memset(iopte, 0, nent * sizeof(*iopte));
++ flush_iopte_range(iopte, iopte + (nent - 1) * sizeof(*iopte));
++
++ /*
++ * do table walk to check if this table is necessary or not
++ */
++ iopte = iopte_offset(iopgd, 0);
++ for (i = 0; i < PTRS_PER_IOPTE; i++)
++ if (iopte[i])
++ goto out;
++
++ iopte_free(iopte);
++ nent = 1; /* for the next L1 entry */
++ } else {
++ bytes = IOPGD_SIZE;
++ if (*iopgd & IOPGD_SUPER) {
++ nent *= 16;
++ /* rewind to the 1st entry */
++ iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK);
++ }
++ bytes *= nent;
++ }
++ memset(iopgd, 0, nent * sizeof(*iopgd));
++ flush_iopgd_range(iopgd, iopgd + (nent - 1) * sizeof(*iopgd));
++out:
++ return bytes;
++}
++
++/**
++ * iopgtable_clear_entry() - Remove an iommu pte entry
++ * @obj: target iommu
++ * @da: iommu device virtual address
++ **/
++size_t iopgtable_clear_entry(struct iommu *obj, u32 da)
++{
++ size_t bytes;
++
++ spin_lock(&obj->page_table_lock);
++
++ bytes = iopgtable_clear_entry_core(obj, da);
++ flush_iotlb_page(obj, da);
++
++ spin_unlock(&obj->page_table_lock);
++
++ return bytes;
++}
++EXPORT_SYMBOL_GPL(iopgtable_clear_entry);
++
++static void iopgtable_clear_entry_all(struct iommu *obj)
++{
++ int i;
++
++ spin_lock(&obj->page_table_lock);
++
++ for (i = 0; i < PTRS_PER_IOPGD; i++) {
++ u32 da;
++ u32 *iopgd;
++
++ da = i << IOPGD_SHIFT;
++ iopgd = iopgd_offset(obj, da);
++
++ if (!*iopgd)
++ continue;
++
++ if (*iopgd & IOPGD_TABLE)
++ iopte_free(iopte_offset(iopgd, 0));
++
++ *iopgd = 0;
++ flush_iopgd_range(iopgd, iopgd);
++ }
++
++ flush_iotlb_all(obj);
++
++ spin_unlock(&obj->page_table_lock);
++}
++
++/*
++ * Device IOMMU generic operations
++ */
++static irqreturn_t iommu_fault_handler(int irq, void *data)
++{
++ u32 stat, da;
++ u32 *iopgd, *iopte;
++ int err = -EIO;
++ struct iommu *obj = data;
++
++ /* Dynamic loading TLB or PTE */
++ if (obj->isr)
++ err = obj->isr(obj);
++
++ if (!err)
++ return IRQ_HANDLED;
++
++ stat = iommu_report_fault(obj, &da);
++ if (!stat)
++ return IRQ_HANDLED;
++
++ iopgd = iopgd_offset(obj, da);
++
++ if (!(*iopgd & IOPGD_TABLE)) {
++ dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x\n", __func__,
++ da, iopgd, *iopgd);
++ return IRQ_NONE;
++ }
++
++ iopte = iopte_offset(iopgd, da);
++
++ dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n",
++ __func__, da, iopgd, *iopgd, iopte, *iopte);
++
++ dump_tlb_entries(obj);
++
++ return IRQ_NONE;
++}
++
++static int device_match_by_alias(struct device *dev, void *data)
++{
++ struct iommu *obj = to_iommu(dev);
++ const char *name = data;
++
++ pr_debug("%s: %s %s\n", __func__, obj->name, name);
++
++ return strcmp(obj->name, name) == 0;
++}
++
++/**
++ * iommu_put() - Get iommu handler
++ * @name: target iommu name
++ **/
++struct iommu *iommu_get(const char *name)
++{
++ int err = -ENOMEM;
++ struct device *dev;
++ struct iommu *obj;
++
++ dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name,
++ device_match_by_alias);
++ if (!dev)
++ return ERR_PTR(-ENODEV);
++
++ obj = to_iommu(dev);
++
++ mutex_lock(&obj->iommu_lock);
++
++ if (obj->refcount++ == 0) {
++ err = iommu_enable(obj);
++ if (err)
++ goto err_enable;
++ flush_iotlb_all(obj);
++ }
++
++ if (!try_module_get(obj->owner))
++ goto err_module;
++
++ mutex_unlock(&obj->iommu_lock);
++
++ dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name);
++ return obj;
++
++err_module:
++ if (obj->refcount == 1)
++ iommu_disable(obj);
++err_enable:
++ mutex_unlock(&obj->iommu_lock);
++ return ERR_PTR(err);
++}
++EXPORT_SYMBOL_GPL(iommu_get);
++
++/**
++ * iommu_put() - Put back iommu handler
++ * @obj: target iommu
++ **/
++void iommu_put(struct iommu *obj)
++{
++ if (!obj && IS_ERR(obj))
++ return;
++
++ mutex_lock(&obj->iommu_lock);
++
++ if (--obj->refcount == 0)
++ iommu_disable(obj);
++
++ module_put(obj->owner);
++
++ mutex_unlock(&obj->iommu_lock);
++
++ dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name);
++}
++EXPORT_SYMBOL_GPL(iommu_put);
++
++/*
++ * OMAP Device MMU(IOMMU) detection
++ */
++static int __devinit omap_iommu_probe(struct platform_device *pdev)
++{
++ int err = -ENODEV;
++ void *p;
++ int irq;
++ struct iommu *obj;
++ struct resource *res;
++ struct iommu_platform_data *pdata = pdev->dev.platform_data;
++
++ if (pdev->num_resources != 2)
++ return -EINVAL;
++
++ obj = kzalloc(sizeof(*obj) + MMU_REG_SIZE, GFP_KERNEL);
++ if (!obj)
++ return -ENOMEM;
++
++ obj->clk = clk_get(&pdev->dev, pdata->clk_name);
++ if (IS_ERR(obj->clk))
++ goto err_clk;
++
++ obj->nr_tlb_entries = pdata->nr_tlb_entries;
++ obj->name = pdata->name;
++ obj->dev = &pdev->dev;
++ obj->ctx = (void *)obj + sizeof(*obj);
++
++ mutex_init(&obj->iommu_lock);
++ mutex_init(&obj->mmap_lock);
++ spin_lock_init(&obj->page_table_lock);
++ INIT_LIST_HEAD(&obj->mmap);
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ err = -ENODEV;
++ goto err_mem;
++ }
++ obj->regbase = ioremap(res->start, resource_size(res));
++ if (!obj->regbase) {
++ err = -ENOMEM;
++ goto err_mem;
++ }
++
++ res = request_mem_region(res->start, resource_size(res),
++ dev_name(&pdev->dev));
++ if (!res) {
++ err = -EIO;
++ goto err_mem;
++ }
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq < 0) {
++ err = -ENODEV;
++ goto err_irq;
++ }
++ err = request_irq(irq, iommu_fault_handler, IRQF_SHARED,
++ dev_name(&pdev->dev), obj);
++ if (err < 0)
++ goto err_irq;
++ platform_set_drvdata(pdev, obj);
++
++ p = (void *)__get_free_pages(GFP_KERNEL, get_order(IOPGD_TABLE_SIZE));
++ if (!p) {
++ err = -ENOMEM;
++ goto err_pgd;
++ }
++ memset(p, 0, IOPGD_TABLE_SIZE);
++ clean_dcache_area(p, IOPGD_TABLE_SIZE);
++ obj->iopgd = p;
++
++ BUG_ON(!IS_ALIGNED((unsigned long)obj->iopgd, IOPGD_TABLE_SIZE));
++
++ dev_info(&pdev->dev, "%s registered\n", obj->name);
++ return 0;
++
++err_pgd:
++ free_irq(irq, obj);
++err_irq:
++ release_mem_region(res->start, resource_size(res));
++ iounmap(obj->regbase);
++err_mem:
++ clk_put(obj->clk);
++err_clk:
++ kfree(obj);
++ return err;
++}
++
++static int __devexit omap_iommu_remove(struct platform_device *pdev)
++{
++ int irq;
++ struct resource *res;
++ struct iommu *obj = platform_get_drvdata(pdev);
++
++ platform_set_drvdata(pdev, NULL);
++
++ iopgtable_clear_entry_all(obj);
++ free_pages((unsigned long)obj->iopgd, get_order(IOPGD_TABLE_SIZE));
++
++ irq = platform_get_irq(pdev, 0);
++ free_irq(irq, obj);
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res->start, resource_size(res));
++ iounmap(obj->regbase);
++
++ clk_put(obj->clk);
++ dev_info(&pdev->dev, "%s removed\n", obj->name);
++ kfree(obj);
++ return 0;
++}
++
++static struct platform_driver omap_iommu_driver = {
++ .probe = omap_iommu_probe,
++ .remove = __devexit_p(omap_iommu_remove),
++ .driver = {
++ .name = "omap-iommu",
++ },
++};
++
++static void iopte_cachep_ctor(void *iopte)
++{
++ clean_dcache_area(iopte, IOPTE_TABLE_SIZE);
++}
++
++static int __init omap_iommu_init(void)
++{
++ struct kmem_cache *p;
++ const unsigned long flags = SLAB_HWCACHE_ALIGN;
++
++ p = kmem_cache_create("iopte_cache", IOPTE_TABLE_SIZE, 0, flags,
++ iopte_cachep_ctor);
++ if (!p)
++ return -ENOMEM;
++ iopte_cachep = p;
++
++ return platform_driver_register(&omap_iommu_driver);
++}
++module_init(omap_iommu_init);
++
++static void __exit omap_iommu_exit(void)
++{
++ kmem_cache_destroy(iopte_cachep);
++
++ platform_driver_unregister(&omap_iommu_driver);
++}
++module_exit(omap_iommu_exit);
++
++MODULE_DESCRIPTION("omap iommu: tlb and pagetable primitives");
++MODULE_ALIAS("platform:omap-iommu");
++MODULE_AUTHOR("Hiroshi DOYU, Paul Mundt and Toshihiro Kobayashi");
++MODULE_LICENSE("GPL v2");
+diff --git a/arch/arm/plat-omap/iopgtable.h b/arch/arm/plat-omap/iopgtable.h
+new file mode 100644
+index 0000000..37dac43
+--- /dev/null
++++ b/arch/arm/plat-omap/iopgtable.h
+@@ -0,0 +1,72 @@
++/*
++ * omap iommu: pagetable definitions
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@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.
++ */
++
++#ifndef __PLAT_OMAP_IOMMU_H
++#define __PLAT_OMAP_IOMMU_H
++
++#define IOPGD_SHIFT 20
++#define IOPGD_SIZE (1 << IOPGD_SHIFT)
++#define IOPGD_MASK (~(IOPGD_SIZE - 1))
++#define IOSECTION_MASK IOPGD_MASK
++#define PTRS_PER_IOPGD (1 << (32 - IOPGD_SHIFT))
++#define IOPGD_TABLE_SIZE (PTRS_PER_IOPGD * sizeof(u32))
++
++#define IOSUPER_SIZE (IOPGD_SIZE << 4)
++#define IOSUPER_MASK (~(IOSUPER_SIZE - 1))
++
++#define IOPTE_SHIFT 12
++#define IOPTE_SIZE (1 << IOPTE_SHIFT)
++#define IOPTE_MASK (~(IOPTE_SIZE - 1))
++#define IOPAGE_MASK IOPTE_MASK
++#define PTRS_PER_IOPTE (1 << (IOPGD_SHIFT - IOPTE_SHIFT))
++#define IOPTE_TABLE_SIZE (PTRS_PER_IOPTE * sizeof(u32))
++
++#define IOLARGE_SIZE (IOPTE_SIZE << 4)
++#define IOLARGE_MASK (~(IOLARGE_SIZE - 1))
++
++#define IOPGD_TABLE (1 << 0)
++#define IOPGD_SECTION (2 << 0)
++#define IOPGD_SUPER (1 << 18 | 2 << 0)
++
++#define IOPTE_SMALL (2 << 0)
++#define IOPTE_LARGE (1 << 0)
++
++#define iopgd_index(da) (((da) >> IOPGD_SHIFT) & (PTRS_PER_IOPGD - 1))
++#define iopgd_offset(obj, da) ((obj)->iopgd + iopgd_index(da))
++
++#define iopte_paddr(iopgd) (*iopgd & ~((1 << 10) - 1))
++#define iopte_vaddr(iopgd) ((u32 *)phys_to_virt(iopte_paddr(iopgd)))
++
++#define iopte_index(da) (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))
++#define iopte_offset(iopgd, da) (iopte_vaddr(iopgd) + iopte_index(da))
++
++static inline u32 iotlb_init_entry(struct iotlb_entry *e, u32 da, u32 pa,
++ u32 flags)
++{
++ memset(e, 0, sizeof(*e));
++
++ e->da = da;
++ e->pa = pa;
++ e->valid = 1;
++ /* FIXME: add OMAP1 support */
++ e->pgsz = flags & MMU_CAM_PGSZ_MASK;
++ e->endian = flags & MMU_RAM_ENDIAN_MASK;
++ e->elsz = flags & MMU_RAM_ELSZ_MASK;
++ e->mixed = flags & MMU_RAM_MIXED_MASK;
++
++ return iopgsz_to_bytes(e->pgsz);
++}
++
++#define to_iommu(dev) \
++ (struct iommu *)platform_get_drvdata(to_platform_device(dev))
++
++#endif /* __PLAT_OMAP_IOMMU_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0002-omap-iommu-omap2-architecture-specific-functions.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0002-omap-iommu-omap2-architecture-specific-functions.patch
new file mode 100644
index 0000000000..d5f78dd14e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0002-omap-iommu-omap2-architecture-specific-functions.patch
@@ -0,0 +1,453 @@
+From c79d7959c45f40e47520aa6acd54c19094754787 Mon Sep 17 00:00:00 2001
+From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+Date: Mon, 26 Jan 2009 15:13:45 +0200
+Subject: [PATCH] omap iommu: omap2 architecture specific functions
+
+The structure 'arch_mmu' accommodates the difference between omap1 and
+omap2/3.
+
+This patch provides omap2/3 specific functions
+
+Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+---
+ arch/arm/mach-omap2/iommu2.c | 326 ++++++++++++++++++++++++++++++
+ arch/arm/plat-omap/include/mach/iommu2.h | 94 +++++++++
+ 2 files changed, 420 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/mach-omap2/iommu2.c
+ create mode 100644 arch/arm/plat-omap/include/mach/iommu2.h
+
+diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
+new file mode 100644
+index 0000000..88a44f1
+--- /dev/null
++++ b/arch/arm/mach-omap2/iommu2.c
+@@ -0,0 +1,326 @@
++/*
++ * omap iommu: omap2/3 architecture specific functions
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>,
++ * Paul Mundt and Toshihiro Kobayashi
++ *
++ * 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/err.h>
++#include <linux/device.h>
++#include <linux/jiffies.h>
++#include <linux/module.h>
++#include <linux/stringify.h>
++
++#include <asm/io.h>
++
++#include <mach/iommu.h>
++#include <mach/iommu2.h>
++
++/*
++ * omap2 architecture specific register bit definitions
++ */
++#define IOMMU_ARCH_VERSION 0x00000011
++
++/* SYSCONF */
++#define MMU_SYS_IDLE_SHIFT 3
++#define MMU_SYS_IDLE_FORCE (0 << MMU_SYS_IDLE_SHIFT)
++#define MMU_SYS_IDLE_NONE (1 << MMU_SYS_IDLE_SHIFT)
++#define MMU_SYS_IDLE_SMART (2 << MMU_SYS_IDLE_SHIFT)
++#define MMU_SYS_IDLE_MASK (3 << MMU_SYS_IDLE_SHIFT)
++
++#define MMU_SYS_SOFTRESET (1 << 1)
++#define MMU_SYS_AUTOIDLE 1
++
++/* SYSSTATUS */
++#define MMU_SYS_RESETDONE 1
++
++/* IRQSTATUS & IRQENABLE */
++#define MMU_IRQ_MULTIHITFAULT (1 << 4)
++#define MMU_IRQ_TABLEWALKFAULT (1 << 3)
++#define MMU_IRQ_EMUMISS (1 << 2)
++#define MMU_IRQ_TRANSLATIONFAULT (1 << 1)
++#define MMU_IRQ_TLBMISS (1 << 0)
++#define MMU_IRQ_MASK \
++ (MMU_IRQ_MULTIHITFAULT | MMU_IRQ_TABLEWALKFAULT | MMU_IRQ_EMUMISS | \
++ MMU_IRQ_TRANSLATIONFAULT)
++
++/* MMU_CNTL */
++#define MMU_CNTL_SHIFT 1
++#define MMU_CNTL_MASK (7 << MMU_CNTL_SHIFT)
++#define MMU_CNTL_EML_TLB (1 << 3)
++#define MMU_CNTL_TWL_EN (1 << 2)
++#define MMU_CNTL_MMU_EN (1 << 1)
++
++#define get_cam_va_mask(pgsz) \
++ (((pgsz) == MMU_CAM_PGSZ_16M) ? 0xff000000 : \
++ ((pgsz) == MMU_CAM_PGSZ_1M) ? 0xfff00000 : \
++ ((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \
++ ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0)
++
++static int omap2_iommu_enable(struct iommu *obj)
++{
++ u32 l, pa;
++ unsigned long timeout;
++
++ if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K))
++ return -EINVAL;
++
++ pa = virt_to_phys(obj->iopgd);
++ if (!IS_ALIGNED(pa, SZ_16K))
++ return -EINVAL;
++
++ iommu_write_reg(obj, MMU_SYS_SOFTRESET, MMU_SYSCONFIG);
++
++ timeout = jiffies + msecs_to_jiffies(20);
++ do {
++ l = iommu_read_reg(obj, MMU_SYSSTATUS);
++ if (l & MMU_SYS_RESETDONE)
++ break;
++ } while (time_after(jiffies, timeout));
++
++ if (!(l & MMU_SYS_RESETDONE)) {
++ dev_err(obj->dev, "can't take mmu out of reset\n");
++ return -ENODEV;
++ }
++
++ l = iommu_read_reg(obj, MMU_REVISION);
++ dev_info(obj->dev, "%s: version %d.%d\n", obj->name,
++ (l >> 4) & 0xf, l & 0xf);
++
++ l = iommu_read_reg(obj, MMU_SYSCONFIG);
++ l &= ~MMU_SYS_IDLE_MASK;
++ l |= (MMU_SYS_IDLE_SMART | MMU_SYS_AUTOIDLE);
++ iommu_write_reg(obj, l, MMU_SYSCONFIG);
++
++ iommu_write_reg(obj, MMU_IRQ_MASK, MMU_IRQENABLE);
++ iommu_write_reg(obj, pa, MMU_TTB);
++
++ l = iommu_read_reg(obj, MMU_CNTL);
++ l &= ~MMU_CNTL_MASK;
++ l |= (MMU_CNTL_MMU_EN | MMU_CNTL_TWL_EN);
++ iommu_write_reg(obj, l, MMU_CNTL);
++
++ return 0;
++}
++
++static void omap2_iommu_disable(struct iommu *obj)
++{
++ u32 l = iommu_read_reg(obj, MMU_CNTL);
++
++ l &= ~MMU_CNTL_MASK;
++ iommu_write_reg(obj, l, MMU_CNTL);
++ iommu_write_reg(obj, MMU_SYS_IDLE_FORCE, MMU_SYSCONFIG);
++
++ dev_dbg(obj->dev, "%s is shutting down\n", obj->name);
++}
++
++static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra)
++{
++ int i;
++ u32 stat, da;
++ const char *err_msg[] = {
++ "tlb miss",
++ "translation fault",
++ "emulation miss",
++ "table walk fault",
++ "multi hit fault",
++ };
++
++ stat = iommu_read_reg(obj, MMU_IRQSTATUS);
++ stat &= MMU_IRQ_MASK;
++ if (!stat)
++ return 0;
++
++ da = iommu_read_reg(obj, MMU_FAULT_AD);
++ *ra = da;
++
++ dev_err(obj->dev, "%s:\tda:%08x ", __func__, da);
++
++ for (i = 0; i < ARRAY_SIZE(err_msg); i++) {
++ if (stat & (1 << i))
++ printk("%s ", err_msg[i]);
++ }
++ printk("\n");
++
++ iommu_write_reg(obj, stat, MMU_IRQSTATUS);
++ return stat;
++}
++
++static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr)
++{
++ cr->cam = iommu_read_reg(obj, MMU_READ_CAM);
++ cr->ram = iommu_read_reg(obj, MMU_READ_RAM);
++}
++
++static void omap2_tlb_load_cr(struct iommu *obj, struct cr_regs *cr)
++{
++ iommu_write_reg(obj, cr->cam | MMU_CAM_V, MMU_CAM);
++ iommu_write_reg(obj, cr->ram, MMU_RAM);
++}
++
++static u32 omap2_cr_to_virt(struct cr_regs *cr)
++{
++ u32 page_size = cr->cam & MMU_CAM_PGSZ_MASK;
++ u32 mask = get_cam_va_mask(cr->cam & page_size);
++
++ return cr->cam & mask;
++}
++
++static struct cr_regs *omap2_alloc_cr(struct iommu *obj, struct iotlb_entry *e)
++{
++ struct cr_regs *cr;
++
++ if (e->da & ~(get_cam_va_mask(e->pgsz))) {
++ dev_err(obj->dev, "%s:\twrong alignment: %08x\n", __func__,
++ e->da);
++ return ERR_PTR(-EINVAL);
++ }
++
++ cr = kmalloc(sizeof(*cr), GFP_KERNEL);
++ if (!cr)
++ return ERR_PTR(-ENOMEM);
++
++ cr->cam = (e->da & MMU_CAM_VATAG_MASK) | e->prsvd | e->pgsz;
++ cr->ram = e->pa | e->endian | e->elsz | e->mixed;
++
++ return cr;
++}
++
++static inline int omap2_cr_valid(struct cr_regs *cr)
++{
++ return cr->cam & MMU_CAM_V;
++}
++
++static u32 omap2_get_pte_attr(struct iotlb_entry *e)
++{
++ u32 attr;
++
++ attr = e->mixed << 5;
++ attr |= e->endian;
++ attr |= e->elsz >> 3;
++ attr <<= ((e->pgsz & MMU_CAM_PGSZ_4K) ? 0 : 6);
++
++ return attr;
++}
++
++static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
++{
++ char *p = buf;
++
++ /* FIXME: Need more detail analysis of cam/ram */
++ p += sprintf(p, "%08x %08x\n", cr->cam, cr->ram);
++
++ return p - buf;
++}
++
++#define pr_reg(name) \
++ p += sprintf(p, "%20s: %08x\n", \
++ __stringify(name), iommu_read_reg(obj, MMU_##name));
++
++static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
++{
++ char *p = buf;
++
++ pr_reg(REVISION);
++ pr_reg(SYSCONFIG);
++ pr_reg(SYSSTATUS);
++ pr_reg(IRQSTATUS);
++ pr_reg(IRQENABLE);
++ pr_reg(WALKING_ST);
++ pr_reg(CNTL);
++ pr_reg(FAULT_AD);
++ pr_reg(TTB);
++ pr_reg(LOCK);
++ pr_reg(LD_TLB);
++ pr_reg(CAM);
++ pr_reg(RAM);
++ pr_reg(GFLUSH);
++ pr_reg(FLUSH_ENTRY);
++ pr_reg(READ_CAM);
++ pr_reg(READ_RAM);
++ pr_reg(EMU_FAULT_AD);
++
++ return p - buf;
++}
++
++static void omap2_iommu_save_ctx(struct iommu *obj)
++{
++ int i;
++ u32 *p = obj->ctx;
++
++ for (i = 0; i < (MMU_REG_SIZE / sizeof(u32)); i++) {
++ p[i] = iommu_read_reg(obj, i * sizeof(u32));
++ dev_dbg(obj->dev, "%s\t[%02d] %08x\n", __func__, i, p[i]);
++ }
++
++ BUG_ON(p[0] != IOMMU_ARCH_VERSION);
++}
++
++static void omap2_iommu_restore_ctx(struct iommu *obj)
++{
++ int i;
++ u32 *p = obj->ctx;
++
++ for (i = 0; i < (MMU_REG_SIZE / sizeof(u32)); i++) {
++ iommu_write_reg(obj, p[i], i * sizeof(u32));
++ dev_dbg(obj->dev, "%s\t[%02d] %08x\n", __func__, i, p[i]);
++ }
++
++ BUG_ON(p[0] != IOMMU_ARCH_VERSION);
++}
++
++static void omap2_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e)
++{
++ e->da = cr->cam & MMU_CAM_VATAG_MASK;
++ e->pa = cr->ram & MMU_RAM_PADDR_MASK;
++ e->valid = cr->cam & MMU_CAM_V;
++ e->pgsz = cr->cam & MMU_CAM_PGSZ_MASK;
++ e->endian = cr->ram & MMU_RAM_ENDIAN_MASK;
++ e->elsz = cr->ram & MMU_RAM_ELSZ_MASK;
++ e->mixed = cr->ram & MMU_RAM_MIXED;
++}
++
++static const struct iommu_functions omap2_iommu_ops = {
++ .version = IOMMU_ARCH_VERSION,
++
++ .enable = omap2_iommu_enable,
++ .disable = omap2_iommu_disable,
++ .fault_isr = omap2_iommu_fault_isr,
++
++ .tlb_read_cr = omap2_tlb_read_cr,
++ .tlb_load_cr = omap2_tlb_load_cr,
++
++ .cr_to_e = omap2_cr_to_e,
++ .cr_to_virt = omap2_cr_to_virt,
++ .alloc_cr = omap2_alloc_cr,
++ .cr_valid = omap2_cr_valid,
++ .dump_cr = omap2_dump_cr,
++
++ .get_pte_attr = omap2_get_pte_attr,
++
++ .save_ctx = omap2_iommu_save_ctx,
++ .restore_ctx = omap2_iommu_restore_ctx,
++ .dump_ctx = omap2_iommu_dump_ctx,
++};
++
++static int __init omap2_iommu_init(void)
++{
++ return install_iommu_arch(&omap2_iommu_ops);
++}
++module_init(omap2_iommu_init);
++
++static void __exit omap2_iommu_exit(void)
++{
++ uninstall_iommu_arch(&omap2_iommu_ops);
++}
++module_exit(omap2_iommu_exit);
++
++MODULE_AUTHOR("Hiroshi DOYU, Paul Mundt and Toshihiro Kobayashi");
++MODULE_DESCRIPTION("omap iommu: omap2/3 architecture specific functions");
++MODULE_LICENSE("GPL v2");
+diff --git a/arch/arm/plat-omap/include/mach/iommu2.h b/arch/arm/plat-omap/include/mach/iommu2.h
+new file mode 100644
+index 0000000..d746047
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/iommu2.h
+@@ -0,0 +1,94 @@
++/*
++ * omap iommu: omap2 architecture specific definitions
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@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.
++ */
++
++#ifndef __MACH_IOMMU2_H
++#define __MACH_IOMMU2_H
++
++/*
++ * MMU Register offsets
++ */
++#define MMU_REVISION 0x00
++#define MMU_SYSCONFIG 0x10
++#define MMU_SYSSTATUS 0x14
++#define MMU_IRQSTATUS 0x18
++#define MMU_IRQENABLE 0x1c
++#define MMU_WALKING_ST 0x40
++#define MMU_CNTL 0x44
++#define MMU_FAULT_AD 0x48
++#define MMU_TTB 0x4c
++#define MMU_LOCK 0x50
++#define MMU_LD_TLB 0x54
++#define MMU_CAM 0x58
++#define MMU_RAM 0x5c
++#define MMU_GFLUSH 0x60
++#define MMU_FLUSH_ENTRY 0x64
++#define MMU_READ_CAM 0x68
++#define MMU_READ_RAM 0x6c
++#define MMU_EMU_FAULT_AD 0x70
++
++#define MMU_REG_SIZE 256
++
++/*
++ * MMU Register bit definitions
++ */
++#define MMU_LOCK_BASE_SHIFT 10
++#define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT)
++#define MMU_LOCK_BASE(x) \
++ ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT)
++
++#define MMU_LOCK_VICT_SHIFT 4
++#define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT)
++#define MMU_LOCK_VICT(x) \
++ ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT)
++
++#define MMU_CAM_VATAG_SHIFT 12
++#define MMU_CAM_VATAG_MASK \
++ ((~0UL >> MMU_CAM_VATAG_SHIFT) << MMU_CAM_VATAG_SHIFT)
++#define MMU_CAM_P (1 << 3)
++#define MMU_CAM_V (1 << 2)
++#define MMU_CAM_PGSZ_MASK 3
++#define MMU_CAM_PGSZ_1M (0 << 0)
++#define MMU_CAM_PGSZ_64K (1 << 0)
++#define MMU_CAM_PGSZ_4K (2 << 0)
++#define MMU_CAM_PGSZ_16M (3 << 0)
++
++#define MMU_RAM_PADDR_SHIFT 12
++#define MMU_RAM_PADDR_MASK \
++ ((~0UL >> MMU_RAM_PADDR_SHIFT) << MMU_RAM_PADDR_SHIFT)
++#define MMU_RAM_ENDIAN_SHIFT 9
++#define MMU_RAM_ENDIAN_MASK (1 << MMU_RAM_ENDIAN_SHIFT)
++#define MMU_RAM_ENDIAN_BIG (1 << MMU_RAM_ENDIAN_SHIFT)
++#define MMU_RAM_ENDIAN_LITTLE (0 << MMU_RAM_ENDIAN_SHIFT)
++#define MMU_RAM_ELSZ_SHIFT 7
++#define MMU_RAM_ELSZ_MASK (3 << MMU_RAM_ELSZ_SHIFT)
++#define MMU_RAM_ELSZ_8 (0 << MMU_RAM_ELSZ_SHIFT)
++#define MMU_RAM_ELSZ_16 (1 << MMU_RAM_ELSZ_SHIFT)
++#define MMU_RAM_ELSZ_32 (2 << MMU_RAM_ELSZ_SHIFT)
++#define MMU_RAM_ELSZ_NONE (3 << MMU_RAM_ELSZ_SHIFT)
++#define MMU_RAM_MIXED_SHIFT 6
++#define MMU_RAM_MIXED_MASK (1 << MMU_RAM_MIXED_SHIFT)
++#define MMU_RAM_MIXED MMU_RAM_MIXED_MASK
++
++/*
++ * register accessors
++ */
++static inline u32 iommu_read_reg(struct iommu *obj, size_t offs)
++{
++ return __raw_readl(obj->regbase + offs);
++}
++
++static inline void iommu_write_reg(struct iommu *obj, u32 val, size_t offs)
++{
++ __raw_writel(val, obj->regbase + offs);
++}
++
++#endif /* __MACH_IOMMU2_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0003-omap-iommu-omap3-iommu-device-registration.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0003-omap-iommu-omap3-iommu-device-registration.patch
new file mode 100644
index 0000000000..2954c47872
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0003-omap-iommu-omap3-iommu-device-registration.patch
@@ -0,0 +1,124 @@
+From 6a84082597dd322713c5d5951530e3eecb878ad4 Mon Sep 17 00:00:00 2001
+From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+Date: Wed, 28 Jan 2009 21:32:04 +0200
+Subject: [PATCH] omap iommu: omap3 iommu device registration
+
+Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+---
+ arch/arm/mach-omap2/omap3-iommu.c | 104 +++++++++++++++++++++++++++++++++++++
+ 1 files changed, 104 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/mach-omap2/omap3-iommu.c
+
+diff --git a/arch/arm/mach-omap2/omap3-iommu.c b/arch/arm/mach-omap2/omap3-iommu.c
+new file mode 100644
+index 0000000..97481cc
+--- /dev/null
++++ b/arch/arm/mach-omap2/omap3-iommu.c
+@@ -0,0 +1,104 @@
++/*
++ * omap iommu: omap3 device registration
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@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.
++ */
++
++#include <linux/platform_device.h>
++#include <linux/io.h>
++
++#include <mach/iommu.h>
++
++#define OMAP3_MMU1_BASE 0x480bd400
++#define OMAP3_MMU2_BASE 0x5d000000
++#define OMAP3_MMU1_IRQ 24
++#define OMAP3_MMU2_IRQ 28
++
++static struct resource omap3_iommu_res[] = {
++ { /* Camera ISP MMU */
++ .start = OMAP3_MMU1_BASE,
++ .end = OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = OMAP3_MMU1_IRQ,
++ .flags = IORESOURCE_IRQ,
++ },
++ { /* IVA2.2 MMU */
++ .start = OMAP3_MMU2_BASE,
++ .end = OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = OMAP3_MMU2_IRQ,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++#define NR_IOMMU_RES (ARRAY_SIZE(omap3_iommu_res) / 2)
++
++static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
++ {
++ .name = "isp",
++ .nr_tlb_entries = 8,
++ .clk_name = "cam_ick",
++ },
++ {
++ .name = "iva2",
++ .nr_tlb_entries = 32,
++ .clk_name = "iva2_ck",
++ },
++};
++#define NR_IOMMU_DEVICES ARRAY_SIZE(omap3_iommu_pdata)
++
++static struct platform_device *omap3_iommu_pdev[NR_IOMMU_DEVICES];
++
++static int __init omap3_iommu_init(void)
++{
++ int i, err;
++
++ for (i = 0; i < NR_IOMMU_DEVICES; i++) {
++ struct platform_device *pdev;
++
++ pdev = platform_device_alloc("omap-iommu", i + 1);
++ if (!pdev)
++ goto err_out;
++ err = platform_device_add_resources(pdev,
++ &omap3_iommu_res[2 * i], NR_IOMMU_RES);
++ if (err)
++ goto err_out;
++ err = platform_device_add_data(pdev, &omap3_iommu_pdata[i],
++ sizeof(omap3_iommu_pdata[0]));
++ if (err)
++ goto err_out;
++ err = platform_device_add(pdev);
++ if (err)
++ goto err_out;
++ omap3_iommu_pdev[i] = pdev;
++ }
++ return 0;
++
++err_out:
++ while (i--)
++ platform_device_put(omap3_iommu_pdev[i]);
++ return err;
++}
++module_init(omap3_iommu_init);
++
++static void __exit omap3_iommu_exit(void)
++{
++ int i;
++
++ for (i = 0; i < NR_IOMMU_DEVICES; i++)
++ platform_device_unregister(omap3_iommu_pdev[i]);
++}
++module_exit(omap3_iommu_exit);
++
++MODULE_AUTHOR("Hiroshi DOYU");
++MODULE_DESCRIPTION("omap iommu: omap3 device registration");
++MODULE_LICENSE("GPL v2");
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0004-omap-iommu-simple-virtual-address-space-management.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0004-omap-iommu-simple-virtual-address-space-management.patch
new file mode 100644
index 0000000000..945778b943
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0004-omap-iommu-simple-virtual-address-space-management.patch
@@ -0,0 +1,1083 @@
+From 07365182b998af3dc2b79e822b8e21a3f50262c4 Mon Sep 17 00:00:00 2001
+From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+Date: Wed, 28 Jan 2009 21:32:08 +0200
+Subject: [PATCH] omap iommu: simple virtual address space management
+
+This patch provides a device drivers, which has a omap iommu, with
+address mapping APIs between device virtual address(iommu), physical
+address and MPU virtual address.
+
+There are 4 possible patterns for iommu virtual address(iova/da) mapping.
+
+ |iova/ mapping iommu_ page
+ | da pa va (d)-(p)-(v) function type
+ ---------------------------------------------------------------------------
+ 1 | c c c 1 - 1 - 1 _kmap() / _kunmap() s
+ 2 | c c,a c 1 - 1 - 1 _kmalloc()/ _kfree() s
+ 3 | c d c 1 - n - 1 _vmap() / _vunmap() s
+ 4 | c d,a c 1 - n - 1 _vmalloc()/ _vfree() n*
+
+ 'iova': device iommu virtual address
+ 'da': alias of 'iova'
+ 'pa': physical address
+ 'va': mpu virtual address
+
+ 'c': contiguous memory area
+ 'd': dicontiguous memory area
+ 'a': anonymous memory allocation
+ '()': optional feature
+
+ 'n': a normal page(4KB) size is used.
+ 's': multiple iommu superpage(16MB, 1MB, 64KB, 4KB) size is used.
+
+ '*': not yet, but feasible.
+
+Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+---
+ arch/arm/include/asm/io.h | 6 +
+ arch/arm/mm/ioremap.c | 11 +
+ arch/arm/plat-omap/include/mach/iovmm.h | 94 ++++
+ arch/arm/plat-omap/iovmm.c | 891 +++++++++++++++++++++++++++++++
+ 4 files changed, 1002 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/plat-omap/include/mach/iovmm.h
+ create mode 100644 arch/arm/plat-omap/iovmm.c
+
+diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
+index d2a59cf..cbdadfe 100644
+--- a/arch/arm/include/asm/io.h
++++ b/arch/arm/include/asm/io.h
+@@ -75,6 +75,12 @@ extern void __iomem * __arm_ioremap(unsigned long, size_t, unsigned int);
+ extern void __iounmap(volatile void __iomem *addr);
+
+ /*
++ * external interface to remap single page with appropriate type
++ */
++extern int ioremap_page(unsigned long virt, unsigned long phys,
++ unsigned int mtype);
++
++/*
+ * Bad read/write accesses...
+ */
+ extern void __readwrite_bug(const char *fn);
+diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
+index 9f88dd3..8441351 100644
+--- a/arch/arm/mm/ioremap.c
++++ b/arch/arm/mm/ioremap.c
+@@ -110,6 +110,17 @@ static int remap_area_pages(unsigned long start, unsigned long pfn,
+ return err;
+ }
+
++int ioremap_page(unsigned long virt, unsigned long phys, unsigned int mtype)
++{
++ const struct mem_type *type;
++
++ type = get_mem_type(mtype);
++ if (!type)
++ return -EINVAL;
++
++ return remap_area_pages(virt, __phys_to_pfn(phys), PAGE_SIZE, type);
++}
++EXPORT_SYMBOL(ioremap_page);
+
+ void __check_kvm_seq(struct mm_struct *mm)
+ {
+diff --git a/arch/arm/plat-omap/include/mach/iovmm.h b/arch/arm/plat-omap/include/mach/iovmm.h
+new file mode 100644
+index 0000000..bdc7ce5
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/iovmm.h
+@@ -0,0 +1,94 @@
++/*
++ * omap iommu: simple virtual address space management
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@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.
++ */
++
++#ifndef __IOMMU_MMAP_H
++#define __IOMMU_MMAP_H
++
++struct iovm_struct {
++ struct iommu *iommu; /* iommu object which this belongs to */
++ u32 da_start; /* area definition */
++ u32 da_end;
++ u32 flags; /* IOVMF_: see below */
++ struct list_head list; /* linked in ascending order */
++ const struct sg_table *sgt; /* keep 'page' <-> 'da' mapping */
++ void *va; /* mpu side mapped address */
++};
++
++/*
++ * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma)
++ *
++ * lower 16 bit is used for h/w and upper 16 bit is for s/w.
++ */
++#define IOVMF_SW_SHIFT 16
++#define IOVMF_HW_SIZE (1 << IOVMF_SW_SHIFT)
++#define IOVMF_HW_MASK (IOVMF_HW_SIZE - 1)
++#define IOVMF_SW_MASK (~IOVMF_HW_MASK)UL
++
++/*
++ * iovma: h/w flags derived from cam and ram attribute
++ */
++#define IOVMF_CAM_MASK (~((1 << 10) - 1))
++#define IOVMF_RAM_MASK (~IOVMF_CAM_MASK)
++
++#define IOVMF_PGSZ_MASK (3 << 0)
++#define IOVMF_PGSZ_1M MMU_CAM_PGSZ_1M
++#define IOVMF_PGSZ_64K MMU_CAM_PGSZ_64K
++#define IOVMF_PGSZ_4K MMU_CAM_PGSZ_4K
++#define IOVMF_PGSZ_16M MMU_CAM_PGSZ_16M
++
++#define IOVMF_ENDIAN_MASK (1 << 9)
++#define IOVMF_ENDIAN_BIG MMU_RAM_ENDIAN_BIG
++#define IOVMF_ENDIAN_LITTLE MMU_RAM_ENDIAN_LITTLE
++
++#define IOVMF_ELSZ_MASK (3 << 7)
++#define IOVMF_ELSZ_8 MMU_RAM_ELSZ_8
++#define IOVMF_ELSZ_16 MMU_RAM_ELSZ_16
++#define IOVMF_ELSZ_32 MMU_RAM_ELSZ_32
++#define IOVMF_ELSZ_NONE MMU_RAM_ELSZ_NONE
++
++#define IOVMF_MIXED_MASK (1 << 6)
++#define IOVMF_MIXED MMU_RAM_MIXED
++
++/*
++ * iovma: s/w flags, used for mapping and umapping internally.
++ */
++#define IOVMF_MMIO (1 << IOVMF_SW_SHIFT)
++#define IOVMF_ALLOC (2 << IOVMF_SW_SHIFT)
++#define IOVMF_ALLOC_MASK (3 << IOVMF_SW_SHIFT)
++
++/* "superpages" is supported just with physically linear pages */
++#define IOVMF_DISCONT (1 << (2 + IOVMF_SW_SHIFT))
++#define IOVMF_LINEAR (2 << (2 + IOVMF_SW_SHIFT))
++#define IOVMF_LINEAR_MASK (3 << (2 + IOVMF_SW_SHIFT))
++
++#define IOVMF_DA_FIXED (1 << (4 + IOVMF_SW_SHIFT))
++#define IOVMF_DA_ANON (2 << (4 + IOVMF_SW_SHIFT))
++#define IOVMF_DA_MASK (3 << (4 + IOVMF_SW_SHIFT))
++
++
++extern struct iovm_struct *find_iovm_area(struct iommu *obj, u32 da);
++extern u32 iommu_vmap(struct iommu *obj, u32 da,
++ const struct sg_table *sgt, u32 flags);
++extern struct sg_table *iommu_vunmap(struct iommu *obj, u32 da);
++extern u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes,
++ u32 flags);
++extern void iommu_vfree(struct iommu *obj, const u32 da);
++extern u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes,
++ u32 flags);
++extern void iommu_kunmap(struct iommu *obj, u32 da);
++extern u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes,
++ u32 flags);
++extern void iommu_kfree(struct iommu *obj, u32 da);
++
++extern void *da_to_va(struct iommu *obj, u32 da);
++
++#endif /* __IOMMU_MMAP_H */
+diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
+new file mode 100644
+index 0000000..6726d10
+--- /dev/null
++++ b/arch/arm/plat-omap/iovmm.c
+@@ -0,0 +1,891 @@
++/*
++ * omap iommu: simple virtual address space management
++ *
++ * Copyright (C) 2008-2009 Nokia Corporation
++ *
++ * Written by Hiroshi DOYU <Hiroshi.DOYU@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.
++ */
++
++#include <linux/err.h>
++#include <linux/vmalloc.h>
++#include <linux/device.h>
++#include <linux/scatterlist.h>
++
++#include <asm/io.h>
++#include <asm/cacheflush.h>
++
++#include <mach/iommu.h>
++#include <mach/iovmm.h>
++
++#include "iopgtable.h"
++
++/*
++ * A device driver needs to create address mappings between:
++ *
++ * - iommu/device address
++ * - physical address
++ * - mpu virtual address
++ *
++ * There are 4 possible patterns for them:
++ *
++ * |iova/ mapping iommu_ page
++ * | da pa va (d)-(p)-(v) function type
++ * ---------------------------------------------------------------------------
++ * 1 | c c c 1 - 1 - 1 _kmap() / _kunmap() s
++ * 2 | c c,a c 1 - 1 - 1 _kmalloc()/ _kfree() s
++ * 3 | c d c 1 - n - 1 _vmap() / _vunmap() s
++ * 4 | c d,a c 1 - n - 1 _vmalloc()/ _vfree() n*
++ *
++ *
++ * 'iova': device iommu virtual address
++ * 'da': alias of 'iova'
++ * 'pa': physical address
++ * 'va': mpu virtual address
++ *
++ * 'c': contiguous memory area
++ * 'd': dicontiguous memory area
++ * 'a': anonymous memory allocation
++ * '()': optional feature
++ *
++ * 'n': a normal page(4KB) size is used.
++ * 's': multiple iommu superpage(16MB, 1MB, 64KB, 4KB) size is used.
++ *
++ * '*': not yet, but feasible.
++ */
++
++static struct kmem_cache *iovm_area_cachep;
++
++/* return total bytes of sg buffers */
++static size_t sgtable_len(const struct sg_table *sgt)
++{
++ unsigned int i, total = 0;
++ struct scatterlist *sg;
++
++ if (!sgt)
++ return 0;
++
++ for_each_sg(sgt->sgl, sg, sgt->nents, i) {
++ size_t bytes;
++
++ bytes = sg_dma_len(sg);
++
++ if (!iopgsz_ok(bytes)) {
++ pr_err("%s: sg[%d] not iommu pagesize(%x)\n",
++ __func__, i, bytes);
++ return 0;
++ }
++
++ total += bytes;
++ }
++
++ return total;
++}
++#define sgtable_ok(x) (!!sgtable_len(x))
++
++/*
++ * calculate the optimal number sg elements from total bytes based on
++ * iommu superpages
++ */
++static unsigned int sgtable_nents(size_t bytes)
++{
++ int i;
++ unsigned int nr_entries;
++ const unsigned long pagesize[] = { SZ_16M, SZ_1M, SZ_64K, SZ_4K, };
++
++ if (!IS_ALIGNED(bytes, PAGE_SIZE)) {
++ pr_err("%s: wrong size %08x\n", __func__, bytes);
++ return 0;
++ }
++
++ nr_entries = 0;
++ for (i = 0; i < ARRAY_SIZE(pagesize); i++) {
++ if (bytes >= pagesize[i]) {
++ nr_entries += (bytes / pagesize[i]);
++ bytes %= pagesize[i];
++ }
++ }
++ BUG_ON(bytes);
++
++ return nr_entries;
++}
++
++/* allocate and initialize sg_table header(a kind of 'superblock') */
++static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags)
++{
++ unsigned int nr_entries;
++ int err;
++ struct sg_table *sgt;
++
++ if (!bytes)
++ return ERR_PTR(-EINVAL);
++
++ if (!IS_ALIGNED(bytes, PAGE_SIZE))
++ return ERR_PTR(-EINVAL);
++
++ /* FIXME: IOVMF_DA_FIXED should support 'superpages' */
++ if ((flags & IOVMF_LINEAR) && (flags & IOVMF_DA_ANON)) {
++ nr_entries = sgtable_nents(bytes);
++ if (!nr_entries)
++ return ERR_PTR(-EINVAL);
++ } else
++ nr_entries = bytes / PAGE_SIZE;
++
++ sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
++ if (!sgt)
++ return ERR_PTR(-ENOMEM);
++
++ err = sg_alloc_table(sgt, nr_entries, GFP_KERNEL);
++ if (err)
++ return ERR_PTR(err);
++
++ pr_debug("%s: sgt:%p(%d entries)\n", __func__, sgt, nr_entries);
++
++ return sgt;
++}
++
++/* free sg_table header(a kind of superblock) */
++static void sgtable_free(struct sg_table *sgt)
++{
++ if (!sgt)
++ return;
++
++ sg_free_table(sgt);
++ kfree(sgt);
++
++ pr_debug("%s: sgt:%p\n", __func__, sgt);
++}
++
++/* map 'sglist' to a contiguous mpu virtual area and return 'va' */
++static void *vmap_sg(const struct sg_table *sgt)
++{
++ u32 va;
++ size_t total;
++ unsigned int i;
++ struct scatterlist *sg;
++ struct vm_struct *new;
++
++ total = sgtable_len(sgt);
++ if (!total)
++ return ERR_PTR(-EINVAL);
++
++ new = __get_vm_area(total, VM_IOREMAP, VMALLOC_START, VMALLOC_END);
++ if (!new)
++ return ERR_PTR(-ENOMEM);
++ va = (u32)new->addr;
++
++ for_each_sg(sgt->sgl, sg, sgt->nents, i) {
++ size_t bytes;
++ u32 pa;
++ int err;
++
++ pa = sg_phys(sg);
++ bytes = sg_dma_len(sg);
++
++ BUG_ON(bytes != PAGE_SIZE);
++
++ err = ioremap_page(va, pa, MT_DEVICE);
++ if (err)
++ goto err_out;
++
++ va += bytes;
++ }
++
++ flush_cache_vmap(new->addr, total);
++ return new->addr;
++
++err_out:
++ WARN_ON(1); /* FIXME: cleanup some mpu mappings */
++ vunmap(new->addr);
++ return ERR_PTR(-EAGAIN);
++}
++
++static inline void vunmap_sg(const void *va)
++{
++ vunmap(va);
++}
++
++static struct iovm_struct *__find_iovm_area(struct iommu *obj, const u32 da)
++{
++ struct iovm_struct *tmp;
++
++ list_for_each_entry(tmp, &obj->mmap, list) {
++ if ((da >= tmp->da_start) && (da < tmp->da_end)) {
++ size_t len;
++
++ len = tmp->da_end - tmp->da_start;
++
++ dev_dbg(obj->dev, "%s: %08x-%08x-%08x(%x) %08x\n",
++ __func__, tmp->da_start, da, tmp->da_end, len,
++ tmp->flags);
++
++ return tmp;
++ }
++ }
++
++ return NULL;
++}
++
++/**
++ * find_iovm_area - find iovma which includes @da
++ * @da: iommu device virtual address
++ *
++ * Find the existing iovma starting at @da
++ */
++struct iovm_struct *find_iovm_area(struct iommu *obj, u32 da)
++{
++ struct iovm_struct *area;
++
++ mutex_lock(&obj->mmap_lock);
++ area = __find_iovm_area(obj, da);
++ mutex_unlock(&obj->mmap_lock);
++
++ return area;
++}
++EXPORT_SYMBOL_GPL(find_iovm_area);
++
++/*
++ * This finds the hole(area) which fits the requested address and len
++ * in iovmas mmap, and returns the new allocated iovma.
++ */
++static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da,
++ size_t bytes, u32 flags)
++{
++ struct iovm_struct *new, *tmp;
++ u32 start, prev_end, alignement;
++
++ if (!obj || !bytes)
++ return ERR_PTR(-EINVAL);
++
++ start = da;
++ alignement = PAGE_SIZE;
++
++ if (flags & IOVMF_DA_ANON) {
++ /*
++ * Reserve the first page for NULL
++ */
++ start = PAGE_SIZE;
++ if (flags & IOVMF_LINEAR)
++ alignement = iopgsz_max(bytes);
++ start = roundup(start, alignement);
++ }
++
++ tmp = NULL;
++ if (list_empty(&obj->mmap))
++ goto found;
++
++ prev_end = 0;
++ list_for_each_entry(tmp, &obj->mmap, list) {
++
++ if ((prev_end <= start) && (start + bytes < tmp->da_start))
++ goto found;
++
++ if (flags & IOVMF_DA_ANON)
++ start = roundup(tmp->da_end, alignement);
++
++ prev_end = tmp->da_end;
++ }
++
++ if ((start >= prev_end) && (ULONG_MAX - start >= bytes))
++ goto found;
++
++ dev_dbg(obj->dev, "%s: no space to fit %08x(%x) flags: %08x\n",
++ __func__, da, bytes, flags);
++
++ return ERR_PTR(-EINVAL);
++
++found:
++ new = kmem_cache_zalloc(iovm_area_cachep, GFP_KERNEL);
++ if (!new)
++ return ERR_PTR(-ENOMEM);
++
++ new->iommu = obj;
++ new->da_start = start;
++ new->da_end = start + bytes;
++ new->flags = flags;
++
++ /*
++ * keep ascending order of iovmas
++ */
++ if (tmp)
++ list_add_tail(&new->list, &tmp->list);
++ else
++ list_add(&new->list, &obj->mmap);
++
++ dev_dbg(obj->dev, "%s: found %08x-%08x-%08x(%x) %08x\n",
++ __func__, new->da_start, start, new->da_end, bytes, flags);
++
++ return new;
++}
++
++static void free_iovm_area(struct iommu *obj, struct iovm_struct *area)
++{
++ size_t bytes;
++
++ BUG_ON(!obj || !area);
++
++ bytes = area->da_end - area->da_start;
++
++ dev_dbg(obj->dev, "%s: %08x-%08x(%x) %08x\n",
++ __func__, area->da_start, area->da_end, bytes, area->flags);
++
++ list_del(&area->list);
++ kmem_cache_free(iovm_area_cachep, area);
++}
++
++/**
++ * da_to_va - convert (d) to (v)
++ * @obj: objective iommu
++ * @da: iommu device virtual address
++ * @va: mpu virtual address
++ *
++ * Returns mpu virtual addr which corresponds to a given device virtual addr
++ */
++void *da_to_va(struct iommu *obj, u32 da)
++{
++ void *va = NULL;
++ struct iovm_struct *area;
++
++ mutex_lock(&obj->mmap_lock);
++
++ area = __find_iovm_area(obj, da);
++ if (!area) {
++ dev_warn(obj->dev, "%s: no da area(%08x)\n", __func__, da);
++ goto out;
++ }
++ va = area->va;
++ mutex_unlock(&obj->mmap_lock);
++out:
++ return va;
++}
++EXPORT_SYMBOL_GPL(da_to_va);
++
++static void sgtable_fill_vmalloc(struct sg_table *sgt, void *_va)
++{
++ unsigned int i;
++ struct scatterlist *sg;
++ void *va = _va;
++ void *va_end;
++
++ for_each_sg(sgt->sgl, sg, sgt->nents, i) {
++ struct page *pg;
++ const size_t bytes = PAGE_SIZE;
++
++ /*
++ * iommu 'superpage' isn't supported with 'iommu_vmalloc()'
++ */
++ pg = vmalloc_to_page(va);
++ BUG_ON(!pg);
++ sg_set_page(sg, pg, bytes, 0);
++
++ va += bytes;
++ }
++
++ va_end = _va + PAGE_SIZE * i;
++ flush_cache_vmap(_va, va_end);
++}
++
++static inline void sgtable_drain_vmalloc(struct sg_table *sgt)
++{
++ /*
++ * Actually this is not necessary at all, just exists for
++ * consistency of the code readibility.
++ */
++ BUG_ON(!sgt);
++}
++
++static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, size_t len)
++{
++ unsigned int i;
++ struct scatterlist *sg;
++ void *va;
++
++ va = phys_to_virt(pa);
++
++ for_each_sg(sgt->sgl, sg, sgt->nents, i) {
++ size_t bytes;
++
++ bytes = iopgsz_max(len);
++
++ BUG_ON(!iopgsz_ok(bytes));
++
++ sg_set_buf(sg, phys_to_virt(pa), bytes);
++ /*
++ * 'pa' is cotinuous(linear).
++ */
++ pa += bytes;
++ len -= bytes;
++ }
++ BUG_ON(len);
++
++ clean_dcache_area(va, len);
++}
++
++static inline void sgtable_drain_kmalloc(struct sg_table *sgt)
++{
++ /*
++ * Actually this is not necessary at all, just exists for
++ * consistency of the code readibility
++ */
++ BUG_ON(!sgt);
++}
++
++/* create 'da' <-> 'pa' mapping from 'sgt' */
++static int map_iovm_area(struct iommu *obj, struct iovm_struct *new,
++ const struct sg_table *sgt, u32 flags)
++{
++ int err;
++ unsigned int i, j;
++ struct scatterlist *sg;
++ u32 da = new->da_start;
++
++ if (!obj || !new || !sgt)
++ return -EINVAL;
++
++ BUG_ON(!sgtable_ok(sgt));
++
++ for_each_sg(sgt->sgl, sg, sgt->nents, i) {
++ u32 pa;
++ int pgsz;
++ size_t bytes;
++ struct iotlb_entry e;
++
++ pa = sg_phys(sg);
++ bytes = sg_dma_len(sg);
++
++ flags &= ~IOVMF_PGSZ_MASK;
++ pgsz = bytes_to_iopgsz(bytes);
++ if (pgsz < 0)
++ goto err_out;
++ flags |= pgsz;
++
++ pr_debug("%s: [%d] %08x %08x(%x)\n", __func__,
++ i, da, pa, bytes);
++
++ iotlb_init_entry(&e, da, pa, flags);
++ err = iopgtable_store_entry(obj, &e);
++ if (err)
++ goto err_out;
++
++ da += bytes;
++ }
++ return 0;
++
++err_out:
++ da = new->da_start;
++
++ for_each_sg(sgt->sgl, sg, i, j) {
++ size_t bytes;
++
++ bytes = iopgtable_clear_entry(obj, da);
++
++ BUG_ON(!iopgsz_ok(bytes));
++
++ da += bytes;
++ }
++ return err;
++}
++
++/* release 'da' <-> 'pa' mapping */
++static void unmap_iovm_area(struct iommu *obj, struct iovm_struct *area)
++{
++ u32 start;
++ size_t total = area->da_end - area->da_start;
++
++ BUG_ON((!total) || !IS_ALIGNED(total, PAGE_SIZE));
++
++ start = area->da_start;
++ while (total > 0) {
++ size_t bytes;
++
++ bytes = iopgtable_clear_entry(obj, start);
++ if (bytes == 0)
++ bytes = PAGE_SIZE;
++ else
++ dev_dbg(obj->dev, "%s: unmap %08x(%x) %08x\n",
++ __func__, start, bytes, area->flags);
++
++ BUG_ON(!IS_ALIGNED(bytes, PAGE_SIZE));
++
++ total -= bytes;
++ start += bytes;
++ }
++ BUG_ON(total);
++}
++
++/* template function for all unmapping */
++static struct sg_table *unmap_vm_area(struct iommu *obj, const u32 da,
++ void (*fn)(const void *), u32 flags)
++{
++ struct sg_table *sgt = NULL;
++ struct iovm_struct *area;
++
++ BUG_ON(in_interrupt());
++
++ if (!IS_ALIGNED(da, PAGE_SIZE)) {
++ dev_err(obj->dev, "%s: alignment err(%08x)\n", __func__, da);
++ return NULL;
++ }
++
++ mutex_lock(&obj->mmap_lock);
++
++ area = __find_iovm_area(obj, da);
++ if (!area) {
++ dev_err(obj->dev, "%s: no da area(%08x)\n", __func__, da);
++ goto out;
++ }
++
++ if ((area->flags & flags) != flags) {
++ dev_err(obj->dev, "%s: wrong flags(%08x)\n", __func__,
++ area->flags);
++ goto out;
++ }
++ sgt = (struct sg_table *)area->sgt;
++
++ unmap_iovm_area(obj, area);
++
++ fn(area->va);
++
++ dev_dbg(obj->dev, "%s: %08x-%08x-%08x(%x) %08x\n", __func__,
++ area->da_start, da, area->da_end,
++ area->da_end - area->da_start, area->flags);
++
++ free_iovm_area(obj, area);
++out:
++ mutex_unlock(&obj->mmap_lock);
++
++ return sgt;
++}
++
++static u32 map_iommu_region(struct iommu *obj, u32 da,
++ const struct sg_table *sgt, void *va, size_t bytes, u32 flags)
++{
++ int err = -ENOMEM;
++ struct iovm_struct *new;
++
++ mutex_lock(&obj->mmap_lock);
++
++ new = alloc_iovm_area(obj, da, bytes, flags);
++ if (IS_ERR(new)) {
++ err = PTR_ERR(new);
++ goto err_alloc_iovma;
++ }
++ new->va = va;
++ new->sgt = sgt;
++
++ if (map_iovm_area(obj, new, sgt, new->flags))
++ goto err_map;
++
++ mutex_unlock(&obj->mmap_lock);
++
++ dev_dbg(obj->dev, "%s: da:%08x(%x) flags:%08x va:%p\n",
++ __func__, new->da_start, bytes, new->flags, va);
++
++ return new->da_start;
++
++err_map:
++ free_iovm_area(obj, new);
++err_alloc_iovma:
++ mutex_unlock(&obj->mmap_lock);
++ return err;
++}
++
++static inline u32 __iommu_vmap(struct iommu *obj, u32 da,
++ const struct sg_table *sgt, void *va, size_t bytes, u32 flags)
++{
++ return map_iommu_region(obj, da, sgt, va, bytes, flags);
++}
++
++/**
++ * iommu_vmap - (d)-(p)-(v) address mapper
++ * @obj: objective iommu
++ * @sgt: address of scatter gather table
++ * @flags: iovma and page property
++ *
++ * Creates 1-n-1 mapping with given @sgt and returns @da.
++ * All @sgt element must be io page size aligned.
++ */
++u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt,
++ u32 flags)
++{
++ size_t bytes;
++ void *va;
++
++ if (!obj || !obj->dev || !sgt)
++ return -EINVAL;
++
++ bytes = sgtable_len(sgt);
++ if (!bytes)
++ return -EINVAL;
++ bytes = PAGE_ALIGN(bytes);
++
++ va = vmap_sg(sgt);
++ if (IS_ERR(va))
++ return PTR_ERR(va);
++
++ flags &= IOVMF_HW_MASK;
++ flags |= IOVMF_DISCONT;
++ flags |= IOVMF_MMIO;
++ flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON);
++
++ da = __iommu_vmap(obj, da, sgt, va, bytes, flags);
++ if (IS_ERR_VALUE(da))
++ vunmap_sg(va);
++
++ return da;
++}
++EXPORT_SYMBOL_GPL(iommu_vmap);
++
++/**
++ * iommu_vunmap - release virtual mapping obtained by 'iommu_vmap()'
++ * @obj: objective iommu
++ * @da: iommu device virtual address
++ *
++ * Free the iommu virtually contiguous memory area starting at
++ * @da, which was returned by 'iommu_vmap()'.
++ */
++struct sg_table *iommu_vunmap(struct iommu *obj, u32 da)
++{
++ struct sg_table *sgt;
++ /*
++ * 'sgt' is allocated before 'iommu_vmalloc()' is called.
++ * Just returns 'sgt' to the caller to free
++ */
++ sgt = unmap_vm_area(obj, da, vunmap_sg, IOVMF_DISCONT | IOVMF_MMIO);
++ if (!sgt)
++ dev_err(obj->dev, "%s: No sgt\n", __func__);
++ return sgt;
++}
++EXPORT_SYMBOL_GPL(iommu_vunmap);
++
++/**
++ * iommu_vmalloc - (d)-(p)-(v) address allocator and mapper
++ * @obj: objective iommu
++ * @da: contiguous iommu virtual memory
++ * @bytes: allocation size
++ * @flags: iovma and page property
++ *
++ * Allocate @bytes linearly and creates 1-n-1 mapping and returns
++ * @da again, which might be adjusted if 'IOVMF_DA_ANON' is set.
++ */
++u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags)
++{
++ void *va;
++ struct sg_table *sgt;
++
++ if (!obj || !obj->dev || !bytes)
++ return -EINVAL;
++
++ bytes = PAGE_ALIGN(bytes);
++
++ va = vmalloc(bytes);
++ if (!va)
++ return -ENOMEM;
++
++ sgt = sgtable_alloc(bytes, flags);
++ if (IS_ERR(sgt)) {
++ da = PTR_ERR(sgt);
++ goto err_sgt_alloc;
++ }
++ sgtable_fill_vmalloc(sgt, va);
++
++ flags &= IOVMF_HW_MASK;
++ flags |= IOVMF_DISCONT;
++ flags |= IOVMF_ALLOC;
++ flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON);
++
++ da = __iommu_vmap(obj, da, sgt, va, bytes, flags);
++ if (IS_ERR_VALUE(da))
++ goto err_iommu_vmap;
++
++ return da;
++
++err_iommu_vmap:
++ sgtable_drain_vmalloc(sgt);
++ sgtable_free(sgt);
++err_sgt_alloc:
++ vfree(va);
++ return da;
++}
++EXPORT_SYMBOL_GPL(iommu_vmalloc);
++
++/**
++ * iommu_vfree - release memory allocated by 'iommu_vmalloc()'
++ * @obj: objective iommu
++ * @da: iommu device virtual address
++ *
++ * Frees the iommu virtually continuous memory area starting at
++ * @da, as obtained from 'iommu_vmalloc()'.
++ */
++void iommu_vfree(struct iommu *obj, const u32 da)
++{
++ struct sg_table *sgt;
++
++ sgt = unmap_vm_area(obj, da, vfree, IOVMF_DISCONT | IOVMF_ALLOC);
++ if (!sgt)
++ dev_err(obj->dev, "%s: No sgt\n", __func__);
++ sgtable_free(sgt);
++}
++EXPORT_SYMBOL_GPL(iommu_vfree);
++
++static u32 __iommu_kmap(struct iommu *obj, u32 da, u32 pa, void *va,
++ size_t bytes, u32 flags)
++{
++ struct sg_table *sgt;
++
++ sgt = sgtable_alloc(bytes, flags);
++ if (IS_ERR(sgt))
++ return PTR_ERR(sgt);
++
++ sgtable_fill_kmalloc(sgt, pa, bytes);
++
++ da = map_iommu_region(obj, da, sgt, va, bytes, flags);
++ if (IS_ERR_VALUE(da)) {
++ sgtable_drain_kmalloc(sgt);
++ sgtable_free(sgt);
++ }
++
++ return da;
++}
++
++/**
++ * iommu_kmap - (d)-(p)-(v) address mapper
++ * @obj: objective iommu
++ * @da: contiguous iommu virtual memory
++ * @pa: contiguous physical memory
++ * @flags: iovma and page property
++ *
++ * Creates 1-1-1 mapping and returns @da again, which can be
++ * adjusted if 'IOVMF_DA_ANON' is set.
++ */
++u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes,
++ u32 flags)
++{
++ void *va;
++
++ if (!obj || !obj->dev || !bytes)
++ return -EINVAL;
++
++ bytes = PAGE_ALIGN(bytes);
++
++ va = ioremap(pa, bytes);
++ if (!va)
++ return -ENOMEM;
++
++ flags &= IOVMF_HW_MASK;
++ flags |= IOVMF_LINEAR;
++ flags |= IOVMF_MMIO;
++ flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON);
++
++ da = __iommu_kmap(obj, da, pa, va, bytes, flags);
++ if (IS_ERR_VALUE(da))
++ iounmap(va);
++
++ return da;
++}
++EXPORT_SYMBOL_GPL(iommu_kmap);
++
++/**
++ * iommu_kunmap - release virtual mapping obtained by 'iommu_kmap()'
++ * @obj: objective iommu
++ * @da: iommu device virtual address
++ *
++ * Frees the iommu virtually contiguous memory area starting at
++ * @da, which was passed to and was returned by'iommu_kmap()'.
++ */
++void iommu_kunmap(struct iommu *obj, u32 da)
++{
++ struct sg_table *sgt;
++
++ sgt = unmap_vm_area(obj, da, __iounmap, IOVMF_LINEAR | IOVMF_MMIO);
++ if (!sgt)
++ dev_err(obj->dev, "%s: No sgt\n", __func__);
++ sgtable_free(sgt);
++}
++EXPORT_SYMBOL_GPL(iommu_kunmap);
++
++/**
++ * iommu_kmalloc - (d)-(p)-(v) address allocator and mapper
++ * @obj: objective iommu
++ * @da: contiguous iommu virtual memory
++ * @bytes: bytes for allocation
++ * @flags: iovma and page property
++ *
++ * Allocate @bytes linearly and creates 1-1-1 mapping and returns
++ * @da again, which might be adjusted if 'IOVMF_DA_ANON' is set.
++ */
++u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags)
++{
++ void *va;
++ u32 pa;
++
++ if (!obj || !obj->dev || !bytes)
++ return -EINVAL;
++
++ bytes = PAGE_ALIGN(bytes);
++
++ va = kmalloc(bytes, GFP_KERNEL | GFP_DMA);
++ if (!va)
++ return -ENOMEM;
++ pa = virt_to_phys(va);
++
++ flags &= IOVMF_HW_MASK;
++ flags |= IOVMF_LINEAR;
++ flags |= IOVMF_ALLOC;
++ flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON);
++
++ da = __iommu_kmap(obj, da, pa, va, bytes, flags);
++ if (IS_ERR_VALUE(da))
++ kfree(va);
++
++ return da;
++}
++EXPORT_SYMBOL_GPL(iommu_kmalloc);
++
++/**
++ * iommu_kfree - release virtual mapping obtained by 'iommu_kmalloc()'
++ * @obj: objective iommu
++ * @da: iommu device virtual address
++ *
++ * Frees the iommu virtually contiguous memory area starting at
++ * @da, which was passed to and was returned by'iommu_kmalloc()'.
++ */
++void iommu_kfree(struct iommu *obj, u32 da)
++{
++ struct sg_table *sgt;
++
++ sgt = unmap_vm_area(obj, da, kfree, IOVMF_LINEAR | IOVMF_ALLOC);
++ if (!sgt)
++ dev_err(obj->dev, "%s: No sgt\n", __func__);
++ sgtable_free(sgt);
++}
++EXPORT_SYMBOL_GPL(iommu_kfree);
++
++
++static int __init iovmm_init(void)
++{
++ const unsigned long flags = SLAB_HWCACHE_ALIGN;
++ struct kmem_cache *p;
++
++ p = kmem_cache_create("iovm_area_cache", sizeof(struct iovm_struct), 0,
++ flags, NULL);
++ if (!p)
++ return -ENOMEM;
++ iovm_area_cachep = p;
++
++ return 0;
++}
++module_init(iovmm_init);
++
++static void __exit iovmm_exit(void)
++{
++ kmem_cache_destroy(iovm_area_cachep);
++}
++module_exit(iovmm_exit);
++
++MODULE_DESCRIPTION("omap iommu: simple virtual address space management");
++MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
++MODULE_LICENSE("GPL v2");
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0005-omap-iommu-entries-for-Kconfig-and-Makefile.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0005-omap-iommu-entries-for-Kconfig-and-Makefile.patch
new file mode 100644
index 0000000000..c0f9e4d9ac
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0005-omap-iommu-entries-for-Kconfig-and-Makefile.patch
@@ -0,0 +1,45 @@
+From 7de046a6a8446358001c38ad1d0b2b829ca0c98c Mon Sep 17 00:00:00 2001
+From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+Date: Wed, 28 Jan 2009 21:32:08 +0200
+Subject: [PATCH] omap iommu: entries for Kconfig and Makefile
+
+Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+---
+ arch/arm/plat-omap/Kconfig | 8 ++++++++
+ arch/arm/plat-omap/Makefile | 1 +
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
+index b16ae76..2090bb5 100644
+--- a/arch/arm/plat-omap/Kconfig
++++ b/arch/arm/plat-omap/Kconfig
+@@ -176,6 +176,14 @@ config OMAP_MBOX_FWK
+ Say Y here if you want to use OMAP Mailbox framework support for
+ DSP, IVA1.0 and IVA2 in OMAP1/2/3.
+
++config OMAP_IOMMU
++ tristate "IOMMU support"
++ depends on ARCH_OMAP
++ default n
++ help
++ Say Y here if you want to use OMAP IOMMU support for IVA2 and
++ Camera in OMAP3.
++
+ choice
+ prompt "System timer"
+ default OMAP_MPU_TIMER
+diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
+index 3ebc09e..aa8f6df 100644
+--- a/arch/arm/plat-omap/Makefile
++++ b/arch/arm/plat-omap/Makefile
+@@ -13,6 +13,7 @@ obj- :=
+ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
+
+ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
++obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
+
+ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
+ obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0006-omap-iommu-Don-t-try-BUG_ON-in_interrupt.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0006-omap-iommu-Don-t-try-BUG_ON-in_interrupt.patch
new file mode 100644
index 0000000000..54a7abfe85
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0006-omap-iommu-Don-t-try-BUG_ON-in_interrupt.patch
@@ -0,0 +1,26 @@
+From b03f695e25bbdaa95a2cc87e15ee8592e7ca128d Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Feb 2009 18:01:29 +0200
+Subject: [PATCH] omap iommu: Don't try BUG_ON(in_interrupt())
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ arch/arm/plat-omap/iovmm.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
+index 6726d10..bdfbb09 100644
+--- a/arch/arm/plat-omap/iovmm.c
++++ b/arch/arm/plat-omap/iovmm.c
+@@ -523,8 +523,6 @@ static struct sg_table *unmap_vm_area(struct iommu *obj, const u32 da,
+ struct sg_table *sgt = NULL;
+ struct iovm_struct *area;
+
+- BUG_ON(in_interrupt());
+-
+ if (!IS_ALIGNED(da, PAGE_SIZE)) {
+ dev_err(obj->dev, "%s: alignment err(%08x)\n", __func__, da);
+ return NULL;
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0007-omap-iommu-We-support-chained-scatterlists-probabl.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0007-omap-iommu-We-support-chained-scatterlists-probabl.patch
new file mode 100644
index 0000000000..d8ad0eb0b7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0007-omap-iommu-We-support-chained-scatterlists-probabl.patch
@@ -0,0 +1,24 @@
+From 24f984f784cae1a4515fe1be8db1ac24cdf51e84 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Feb 2009 18:37:41 +0200
+Subject: [PATCH] omap iommu: We support chained scatterlists, probably. :)
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ arch/arm/include/asm/scatterlist.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/include/asm/scatterlist.h b/arch/arm/include/asm/scatterlist.h
+index ca0a37d..393f8b8 100644
+--- a/arch/arm/include/asm/scatterlist.h
++++ b/arch/arm/include/asm/scatterlist.h
+@@ -24,4 +24,6 @@ struct scatterlist {
+ #define sg_dma_address(sg) ((sg)->dma_address)
+ #define sg_dma_len(sg) ((sg)->length)
+
++#define ARCH_HAS_SG_CHAIN
++
+ #endif /* _ASMARM_SCATTERLIST_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0008-omap2-iommu-entries-for-Kconfig-and-Makefile.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0008-omap2-iommu-entries-for-Kconfig-and-Makefile.patch
new file mode 100644
index 0000000000..298e797c37
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/iommu/0008-omap2-iommu-entries-for-Kconfig-and-Makefile.patch
@@ -0,0 +1,29 @@
+From 3c65ff4a684d3e0f4d9c59e731975408452c3743 Mon Sep 17 00:00:00 2001
+From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+Date: Wed, 28 Jan 2009 21:32:09 +0200
+Subject: [PATCH] omap2 iommu: entries for Kconfig and Makefile
+
+Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+---
+ arch/arm/mach-omap2/Makefile | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
+index b44bb78..33b5aa8 100644
+--- a/arch/arm/mach-omap2/Makefile
++++ b/arch/arm/mach-omap2/Makefile
+@@ -38,6 +38,11 @@ obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
+ obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
+ mailbox_mach-objs := mailbox.o
+
++iommu-y += iommu2.o
++iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o
++
++obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y)
++
+ # Specific board support
+ obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
+ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o board-h4-mmc.o
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0001-omap3isp-Add-ISP-main-driver-and-register-definitio.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0001-omap3isp-Add-ISP-main-driver-and-register-definitio.patch
new file mode 100644
index 0000000000..e6e07d8afc
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0001-omap3isp-Add-ISP-main-driver-and-register-definitio.patch
@@ -0,0 +1,4625 @@
+From 77c99cd863b906c803c3dec08753c19bf9b67882 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add ISP main driver and register definitions
+
+TODO:
+
+- Release resoures in isp_probe() if something fails.
+
+- Implement a sensible generic interface so that the ISP can offer a
+ v4l2_subdev (like the v4l2-int-device slaves) interface towards the
+ camera driver.
+
+- Handle CSI1 and CSI2 error cases (currently unhandled?).
+
+- Fix H3A / HIST interrupt enabling / disabling.
+
+- Clean up the private ioctls.
+
+- Handle SBL overflows somehow.
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/Makefile | 2 +
+ drivers/media/video/isp/Makefile | 12 +
+ drivers/media/video/isp/isp.c | 2547 ++++++++++++++++++++++++++++++++++++++
+ drivers/media/video/isp/isp.h | 318 +++++
+ drivers/media/video/isp/ispreg.h | 1674 +++++++++++++++++++++++++
+ 5 files changed, 4553 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/Makefile
+ create mode 100644 drivers/media/video/isp/isp.c
+ create mode 100644 drivers/media/video/isp/isp.h
+ create mode 100644 drivers/media/video/isp/ispreg.h
+
+diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
+index 72f6d03..e654270 100644
+--- a/drivers/media/video/Makefile
++++ b/drivers/media/video/Makefile
+@@ -106,6 +106,8 @@ obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
+ obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o
+ obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
+
++obj-y += isp/
++
+ obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
+
+ obj-$(CONFIG_USB_DABUSB) += dabusb.o
+diff --git a/drivers/media/video/isp/Makefile b/drivers/media/video/isp/Makefile
+new file mode 100644
+index 0000000..f14d617
+--- /dev/null
++++ b/drivers/media/video/isp/Makefile
+@@ -0,0 +1,12 @@
++# Makefile for OMAP3 ISP driver
++
++ifdef CONFIG_ARCH_OMAP3410
++isp-mod-objs += \
++ isp.o ispccdc.o
++else
++isp-mod-objs += \
++ isp.o ispccdc.o ispmmu.o \
++ isppreview.o ispresizer.o isph3a.o isphist.o isp_af.o ispcsi2.o
++endif
++
++obj-$(CONFIG_VIDEO_OMAP3) += isp-mod.o
+diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
+new file mode 100644
+index 0000000..54c839b
+--- /dev/null
++++ b/drivers/media/video/isp/isp.c
+@@ -0,0 +1,2547 @@
++/*
++ * isp.c
++ *
++ * Driver Library for ISP Control module in TI's OMAP3 Camera ISP
++ * ISP interface and IRQ related APIs are defined here.
++ *
++ * Copyright (C) 2009 Texas Instruments.
++ * Copyright (C) 2009 Nokia.
++ *
++ * Contributors:
++ * Sameer Venkatraman <sameerv@ti.com>
++ * Mohit Jalori <mjalori@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ * Toni Leinonen <toni.leinonen@nokia.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <asm/cacheflush.h>
++
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/clk.h>
++#include <linux/dma-mapping.h>
++#include <linux/vmalloc.h>
++#include <linux/platform_device.h>
++
++#include "isp.h"
++#include "ispmmu.h"
++#include "ispreg.h"
++#include "ispccdc.h"
++#include "isph3a.h"
++#include "isphist.h"
++#include "isp_af.h"
++#include "isppreview.h"
++#include "ispresizer.h"
++#include "ispcsi2.h"
++
++static struct isp_device *omap3isp;
++
++static int isp_try_size(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output);
++
++static void isp_save_ctx(void);
++
++static void isp_restore_ctx(void);
++
++static void isp_buf_init(void);
++
++/* List of image formats supported via OMAP ISP */
++const static struct v4l2_fmtdesc isp_formats[] = {
++ {
++ .description = "UYVY, packed",
++ .pixelformat = V4L2_PIX_FMT_UYVY,
++ },
++ {
++ .description = "YUYV (YUV 4:2:2), packed",
++ .pixelformat = V4L2_PIX_FMT_YUYV,
++ },
++ {
++ .description = "Bayer10 (GrR/BGb)",
++ .pixelformat = V4L2_PIX_FMT_SGRBG10,
++ },
++};
++
++/* ISP Crop capabilities */
++static struct v4l2_rect ispcroprect;
++static struct v4l2_rect cur_rect;
++
++/**
++ * struct vcontrol - Video control structure.
++ * @qc: V4L2 Query control structure.
++ * @current_value: Current value of the control.
++ */
++static struct vcontrol {
++ struct v4l2_queryctrl qc;
++ int current_value;
++} video_control[] = {
++ {
++ {
++ .id = V4L2_CID_BRIGHTNESS,
++ .type = V4L2_CTRL_TYPE_INTEGER,
++ .name = "Brightness",
++ .minimum = ISPPRV_BRIGHT_LOW,
++ .maximum = ISPPRV_BRIGHT_HIGH,
++ .step = ISPPRV_BRIGHT_STEP,
++ .default_value = ISPPRV_BRIGHT_DEF,
++ },
++ .current_value = ISPPRV_BRIGHT_DEF,
++ },
++ {
++ {
++ .id = V4L2_CID_CONTRAST,
++ .type = V4L2_CTRL_TYPE_INTEGER,
++ .name = "Contrast",
++ .minimum = ISPPRV_CONTRAST_LOW,
++ .maximum = ISPPRV_CONTRAST_HIGH,
++ .step = ISPPRV_CONTRAST_STEP,
++ .default_value = ISPPRV_CONTRAST_DEF,
++ },
++ .current_value = ISPPRV_CONTRAST_DEF,
++ },
++ {
++ {
++ .id = V4L2_CID_COLORFX,
++ .type = V4L2_CTRL_TYPE_MENU,
++ .name = "Color Effects",
++ .minimum = V4L2_COLORFX_NONE,
++ .maximum = V4L2_COLORFX_SEPIA,
++ .step = 1,
++ .default_value = V4L2_COLORFX_NONE,
++ },
++ .current_value = V4L2_COLORFX_NONE,
++ }
++};
++
++static struct v4l2_querymenu video_menu[] = {
++ {
++ .id = V4L2_CID_COLORFX,
++ .index = 0,
++ .name = "None",
++ },
++ {
++ .id = V4L2_CID_COLORFX,
++ .index = 1,
++ .name = "B&W",
++ },
++ {
++ .id = V4L2_CID_COLORFX,
++ .index = 2,
++ .name = "Sepia",
++ },
++};
++
++struct isp_buf {
++ dma_addr_t isp_addr;
++ void (*complete)(struct videobuf_buffer *vb, void *priv);
++ struct videobuf_buffer *vb;
++ void *priv;
++ u32 vb_state;
++};
++
++#define ISP_BUFS_IS_FULL(bufs) \
++ (((bufs)->queue + 1) % NUM_BUFS == (bufs)->done)
++#define ISP_BUFS_IS_EMPTY(bufs) ((bufs)->queue == (bufs)->done)
++#define ISP_BUFS_IS_LAST(bufs) \
++ ((bufs)->queue == ((bufs)->done + 1) % NUM_BUFS)
++#define ISP_BUFS_QUEUED(bufs) \
++ ((((bufs)->done - (bufs)->queue + NUM_BUFS)) % NUM_BUFS)
++#define ISP_BUF_DONE(bufs) ((bufs)->buf + (bufs)->done)
++#define ISP_BUF_NEXT_DONE(bufs) \
++ ((bufs)->buf + ((bufs)->done + 1) % NUM_BUFS)
++#define ISP_BUF_QUEUE(bufs) ((bufs)->buf + (bufs)->queue)
++#define ISP_BUF_MARK_DONE(bufs) \
++ (bufs)->done = ((bufs)->done + 1) % NUM_BUFS;
++#define ISP_BUF_MARK_QUEUED(bufs) \
++ (bufs)->queue = ((bufs)->queue + 1) % NUM_BUFS;
++
++struct isp_bufs {
++ dma_addr_t isp_addr_capture[VIDEO_MAX_FRAME];
++ spinlock_t lock; /* For handling current buffer */
++ /* queue full: (ispsg.queue + 1) % NUM_BUFS == ispsg.done
++ queue empty: ispsg.queue == ispsg.done */
++ struct isp_buf buf[NUM_BUFS];
++ /* Next slot to queue a buffer. */
++ int queue;
++ /* Buffer that is being processed. */
++ int done;
++ /* Wait for this many hs_vs before anything else. */
++ int wait_hs_vs;
++};
++
++/**
++ * struct ispirq - Structure for containing callbacks to be called in ISP ISR.
++ * @isp_callbk: Array which stores callback functions, indexed by the type of
++ * callback (8 possible types).
++ * @isp_callbk_arg1: Pointer to array containing pointers to the first argument
++ * to be passed to the requested callback function.
++ * @isp_callbk_arg2: Pointer to array containing pointers to the second
++ * argument to be passed to the requested callback function.
++ *
++ * This structure is used to contain all the callback functions related for
++ * each callback type (CBK_CCDC_VD0, CBK_CCDC_VD1, CBK_PREV_DONE,
++ * CBK_RESZ_DONE, CBK_MMU_ERR, CBK_H3A_AWB_DONE, CBK_HIST_DONE, CBK_HS_VS,
++ * CBK_LSC_ISR).
++ */
++struct isp_irq {
++ isp_callback_t isp_callbk[CBK_END];
++ isp_vbq_callback_ptr isp_callbk_arg1[CBK_END];
++ void *isp_callbk_arg2[CBK_END];
++};
++
++/**
++ * struct ispmodule - Structure for storing ISP sub-module information.
++ * @isp_pipeline: Bit mask for submodules enabled within the ISP.
++ * @applyCrop: Flag to do a crop operation when video buffer queue ISR is done
++ * @pix: Structure containing the format and layout of the output image.
++ * @ccdc_input_width: ISP CCDC module input image width.
++ * @ccdc_input_height: ISP CCDC module input image height.
++ * @ccdc_output_width: ISP CCDC module output image width.
++ * @ccdc_output_height: ISP CCDC module output image height.
++ * @preview_input_width: ISP Preview module input image width.
++ * @preview_input_height: ISP Preview module input image height.
++ * @preview_output_width: ISP Preview module output image width.
++ * @preview_output_height: ISP Preview module output image height.
++ * @resizer_input_width: ISP Resizer module input image width.
++ * @resizer_input_height: ISP Resizer module input image height.
++ * @resizer_output_width: ISP Resizer module output image width.
++ * @resizer_output_height: ISP Resizer module output image height.
++ */
++struct isp_module {
++ unsigned int isp_pipeline;
++ int applyCrop;
++ struct v4l2_pix_format pix;
++ unsigned int ccdc_input_width;
++ unsigned int ccdc_input_height;
++ unsigned int ccdc_output_width;
++ unsigned int ccdc_output_height;
++ unsigned int preview_input_width;
++ unsigned int preview_input_height;
++ unsigned int preview_output_width;
++ unsigned int preview_output_height;
++ unsigned int resizer_input_width;
++ unsigned int resizer_input_height;
++ unsigned int resizer_output_width;
++ unsigned int resizer_output_height;
++};
++
++#define RAW_CAPTURE(isp) \
++ (!((isp)->module.isp_pipeline & OMAP_ISP_PREVIEW))
++
++/**
++ * struct isp - Structure for storing ISP Control module information
++ * @lock: Spinlock to sync between isr and processes.
++ * @isp_mutex: Semaphore used to get access to the ISP.
++ * @ref_count: Reference counter.
++ * @cam_ick: Pointer to ISP Interface clock.
++ * @cam_fck: Pointer to ISP Functional clock.
++ *
++ * This structure is used to store the OMAP ISP Control Information.
++ */
++static struct isp {
++ spinlock_t lock; /* For handling registered ISP callbacks */
++ struct mutex isp_mutex; /* For handling ref_count field */
++ int ref_count;
++ struct clk *cam_ick;
++ struct clk *cam_mclk;
++ struct clk *csi2_fck;
++ struct isp_interface_config *config;
++ dma_addr_t tmp_buf;
++ size_t tmp_buf_size;
++ unsigned long tmp_buf_offset;
++ struct isp_bufs bufs;
++ struct isp_irq irq;
++ struct isp_module module;
++} isp_obj;
++
++/* Structure for saving/restoring ISP module registers */
++static struct isp_reg isp_reg_list[] = {
++ {OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_GRESET_LENGTH, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_PSTRB_REPLAY, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_CTRL, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_CTRL, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_FRAME, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_PSTRB_DELAY, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_STRB_DELAY, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_SHUT_DELAY, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_PSTRB_LENGTH, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_STRB_LENGTH, 0},
++ {OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_SHUT_LENGTH, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF_SYSCONFIG, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF_IRQENABLE, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF0_CTRL, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF1_CTRL, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF0_START, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF1_START, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF0_END, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF1_END, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF0_WINDOWSIZE, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF1_WINDOWSIZE, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF0_THRESHOLD, 0},
++ {OMAP3_ISP_IOMEM_CBUFF, ISP_CBUFF1_THRESHOLD, 0},
++ {0, ISP_TOK_TERM, 0}
++};
++
++u32 isp_reg_readl(enum isp_mem_resources isp_mmio_range, u32 reg_offset)
++{
++ return __raw_readl(omap3isp->mmio_base[isp_mmio_range] + reg_offset);
++}
++EXPORT_SYMBOL(isp_reg_readl);
++
++void isp_reg_writel(u32 reg_value, enum isp_mem_resources isp_mmio_range,
++ u32 reg_offset)
++{
++ __raw_writel(reg_value,
++ omap3isp->mmio_base[isp_mmio_range] + reg_offset);
++}
++EXPORT_SYMBOL(isp_reg_writel);
++
++/*
++ *
++ * V4L2 Handling
++ *
++ */
++
++/**
++ * find_vctrl - Returns the index of the ctrl array of the requested ctrl ID.
++ * @id: Requested control ID.
++ *
++ * Returns 0 if successful, -EINVAL if not found, or -EDOM if its out of
++ * domain.
++ **/
++static int find_vctrl(int id)
++{
++ int i;
++
++ if (id < V4L2_CID_BASE)
++ return -EDOM;
++
++ for (i = (ARRAY_SIZE(video_control) - 1); i >= 0; i--)
++ if (video_control[i].qc.id == id)
++ break;
++
++ if (i < 0)
++ i = -EINVAL;
++
++ return i;
++}
++
++static int find_next_vctrl(int id)
++{
++ int i;
++ u32 best = (u32)-1;
++
++ for (i = 0; i < ARRAY_SIZE(video_control); i++) {
++ if (video_control[i].qc.id > id &&
++ (best == (u32)-1 ||
++ video_control[i].qc.id <
++ video_control[best].qc.id)) {
++ best = i;
++ }
++ }
++
++ if (best == (u32)-1)
++ return -EINVAL;
++
++ return best;
++}
++
++/**
++ * find_vmenu - Returns index of the menu array of the requested ctrl option.
++ * @id: Requested control ID.
++ * @index: Requested menu option index.
++ *
++ * Returns 0 if successful, -EINVAL if not found, or -EDOM if its out of
++ * domain.
++ **/
++static int find_vmenu(int id, int index)
++{
++ int i;
++
++ if (id < V4L2_CID_BASE)
++ return -EDOM;
++
++ for (i = (ARRAY_SIZE(video_menu) - 1); i >= 0; i--) {
++ if (video_menu[i].id != id || video_menu[i].index != index)
++ continue;
++ return i;
++ }
++
++ return -EINVAL;
++}
++
++/**
++ * isp_release_resources - Free ISP submodules
++ **/
++static void isp_release_resources(void)
++{
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_CCDC)
++ ispccdc_free();
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_PREVIEW)
++ isppreview_free();
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_RESIZER)
++ ispresizer_free();
++ return;
++}
++
++static int isp_wait(int (*busy)(void), int wait_for_busy, int max_wait)
++{
++ int wait = 0;
++
++ if (max_wait == 0)
++ max_wait = 10000; /* 10 ms */
++
++ while ((wait_for_busy && !busy())
++ || (!wait_for_busy && busy())) {
++ rmb();
++ udelay(1);
++ wait++;
++ if (wait > max_wait) {
++ printk(KERN_ALERT "%s: wait is too much\n", __func__);
++ return -EBUSY;
++ }
++ }
++ DPRINTK_ISPCTRL(KERN_ALERT "%s: wait %d\n", __func__, wait);
++
++ return 0;
++}
++
++static int ispccdc_sbl_wait_idle(int max_wait)
++{
++ return isp_wait(ispccdc_sbl_busy, 0, max_wait);
++}
++
++static void isp_enable_interrupts(int is_raw)
++{
++ isp_reg_writel(-1, OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_CCDC_LSC_PREF_ERR_IRQ |
++ IRQ0ENABLE_HS_VS_IRQ |
++ IRQ0ENABLE_CCDC_VD0_IRQ |
++ IRQ0ENABLE_CCDC_VD1_IRQ);
++
++ if (is_raw)
++ return;
++
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_PRV_DONE_IRQ |
++ IRQ0ENABLE_RSZ_DONE_IRQ);
++
++ return;
++}
++
++static void isp_disable_interrupts(void)
++{
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~(IRQ0ENABLE_CCDC_LSC_PREF_ERR_IRQ |
++ IRQ0ENABLE_HS_VS_IRQ |
++ IRQ0ENABLE_CCDC_VD0_IRQ |
++ IRQ0ENABLE_CCDC_VD1_IRQ |
++ IRQ0ENABLE_PRV_DONE_IRQ |
++ IRQ0ENABLE_RSZ_DONE_IRQ));
++}
++
++/**
++ * isp_set_callback - Sets the callback for the ISP module done events.
++ * @type: Type of the event for which callback is requested.
++ * @callback: Method to be called as callback in the ISR context.
++ * @arg1: First argument to be passed when callback is called in ISR.
++ * @arg2: Second argument to be passed when callback is called in ISR.
++ *
++ * This function sets a callback function for a done event in the ISP
++ * module, and enables the corresponding interrupt.
++ **/
++int isp_set_callback(enum isp_callback_type type, isp_callback_t callback,
++ isp_vbq_callback_ptr arg1,
++ void *arg2)
++{
++ unsigned long irqflags = 0;
++
++ if (callback == NULL) {
++ DPRINTK_ISPCTRL("ISP_ERR : Null Callback\n");
++ return -EINVAL;
++ }
++
++ spin_lock_irqsave(&isp_obj.lock, irqflags);
++ isp_obj.irq.isp_callbk[type] = callback;
++ isp_obj.irq.isp_callbk_arg1[type] = arg1;
++ isp_obj.irq.isp_callbk_arg2[type] = arg2;
++ spin_unlock_irqrestore(&isp_obj.lock, irqflags);
++
++ switch (type) {
++ case CBK_H3A_AWB_DONE:
++ isp_reg_writel(IRQ0ENABLE_H3A_AWB_DONE_IRQ,
++ OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_H3A_AWB_DONE_IRQ);
++ break;
++ case CBK_H3A_AF_DONE:
++ isp_reg_writel(IRQ0ENABLE_H3A_AF_DONE_IRQ,
++ OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_H3A_AF_DONE_IRQ);
++ break;
++ case CBK_HIST_DONE:
++ isp_reg_writel(IRQ0ENABLE_HIST_DONE_IRQ,
++ OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_HIST_DONE_IRQ);
++ break;
++ case CBK_PREV_DONE:
++ isp_reg_writel(IRQ0ENABLE_PRV_DONE_IRQ,
++ OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_PRV_DONE_IRQ);
++ break;
++ default:
++ break;
++ }
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_set_callback);
++
++/**
++ * isp_unset_callback - Clears the callback for the ISP module done events.
++ * @type: Type of the event for which callback to be cleared.
++ *
++ * This function clears a callback function for a done event in the ISP
++ * module, and disables the corresponding interrupt.
++ **/
++int isp_unset_callback(enum isp_callback_type type)
++{
++ unsigned long irqflags = 0;
++
++ spin_lock_irqsave(&isp_obj.lock, irqflags);
++ isp_obj.irq.isp_callbk[type] = NULL;
++ isp_obj.irq.isp_callbk_arg1[type] = NULL;
++ isp_obj.irq.isp_callbk_arg2[type] = NULL;
++ spin_unlock_irqrestore(&isp_obj.lock, irqflags);
++
++ switch (type) {
++ case CBK_H3A_AWB_DONE:
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~IRQ0ENABLE_H3A_AWB_DONE_IRQ);
++ break;
++ case CBK_H3A_AF_DONE:
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~IRQ0ENABLE_H3A_AF_DONE_IRQ);
++ break;
++ case CBK_HIST_DONE:
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~IRQ0ENABLE_HIST_DONE_IRQ);
++ break;
++ case CBK_CSIA:
++ isp_csi2_irq_set(0);
++ break;
++ case CBK_CSIB:
++ isp_reg_writel(IRQ0ENABLE_CSIB_IRQ, OMAP3_ISP_IOMEM_MAIN,
++ ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_CSIB_IRQ);
++ break;
++ case CBK_PREV_DONE:
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~IRQ0ENABLE_PRV_DONE_IRQ);
++ break;
++ default:
++ break;
++ }
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_unset_callback);
++
++/**
++ * isp_set_xclk - Configures the specified cam_xclk to the desired frequency.
++ * @xclk: Desired frequency of the clock in Hz.
++ * @xclksel: XCLK to configure (0 = A, 1 = B).
++ *
++ * Configures the specified MCLK divisor in the ISP timing control register
++ * (TCTRL_CTRL) to generate the desired xclk clock value.
++ *
++ * Divisor = CM_CAM_MCLK_HZ / xclk
++ *
++ * Returns the final frequency that is actually being generated
++ **/
++u32 isp_set_xclk(u32 xclk, u8 xclksel)
++{
++ u32 divisor;
++ u32 currentxclk;
++
++ if (xclk >= CM_CAM_MCLK_HZ) {
++ divisor = ISPTCTRL_CTRL_DIV_BYPASS;
++ currentxclk = CM_CAM_MCLK_HZ;
++ } else if (xclk >= 2) {
++ divisor = CM_CAM_MCLK_HZ / xclk;
++ if (divisor >= ISPTCTRL_CTRL_DIV_BYPASS)
++ divisor = ISPTCTRL_CTRL_DIV_BYPASS - 1;
++ currentxclk = CM_CAM_MCLK_HZ / divisor;
++ } else {
++ divisor = xclk;
++ currentxclk = 0;
++ }
++
++ switch (xclksel) {
++ case 0:
++ isp_reg_and_or(OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_CTRL,
++ ~ISPTCTRL_CTRL_DIVA_MASK,
++ divisor << ISPTCTRL_CTRL_DIVA_SHIFT);
++ DPRINTK_ISPCTRL("isp_set_xclk(): cam_xclka set to %d Hz\n",
++ currentxclk);
++ break;
++ case 1:
++ isp_reg_and_or(OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_CTRL,
++ ~ISPTCTRL_CTRL_DIVB_MASK,
++ divisor << ISPTCTRL_CTRL_DIVB_SHIFT);
++ DPRINTK_ISPCTRL("isp_set_xclk(): cam_xclkb set to %d Hz\n",
++ currentxclk);
++ break;
++ default:
++ DPRINTK_ISPCTRL("ISP_ERR: isp_set_xclk(): Invalid requested "
++ "xclk. Must be 0 (A) or 1 (B)."
++ "\n");
++ return -EINVAL;
++ }
++
++ return currentxclk;
++}
++EXPORT_SYMBOL(isp_set_xclk);
++
++/**
++ * isp_power_settings - Sysconfig settings, for Power Management.
++ * @isp_sysconfig: Structure containing the power settings for ISP to configure
++ *
++ * Sets the power settings for the ISP, and SBL bus.
++ **/
++static void isp_power_settings(int idle)
++{
++ if (idle) {
++ isp_reg_writel(ISP_SYSCONFIG_AUTOIDLE |
++ (ISP_SYSCONFIG_MIDLEMODE_SMARTSTANDBY <<
++ ISP_SYSCONFIG_MIDLEMODE_SHIFT),
++ OMAP3_ISP_IOMEM_MAIN,
++ ISP_SYSCONFIG);
++ if (omap_rev() == OMAP3430_REV_ES1_0) {
++ isp_reg_writel(ISPCSI1_AUTOIDLE |
++ (ISPCSI1_MIDLEMODE_SMARTSTANDBY <<
++ ISPCSI1_MIDLEMODE_SHIFT),
++ OMAP3_ISP_IOMEM_CSI2A,
++ ISP_CSIA_SYSCONFIG);
++ isp_reg_writel(ISPCSI1_AUTOIDLE |
++ (ISPCSI1_MIDLEMODE_SMARTSTANDBY <<
++ ISPCSI1_MIDLEMODE_SHIFT),
++ OMAP3_ISP_IOMEM_CCP2,
++ ISP_CSIB_SYSCONFIG);
++ }
++ isp_reg_writel(ISPCTRL_SBL_AUTOIDLE, OMAP3_ISP_IOMEM_MAIN,
++ ISP_CTRL);
++
++ } else {
++ isp_reg_writel(ISP_SYSCONFIG_AUTOIDLE |
++ (ISP_SYSCONFIG_MIDLEMODE_FORCESTANDBY <<
++ ISP_SYSCONFIG_MIDLEMODE_SHIFT),
++ OMAP3_ISP_IOMEM_MAIN,
++ ISP_SYSCONFIG);
++ if (omap_rev() == OMAP3430_REV_ES1_0) {
++ isp_reg_writel(ISPCSI1_AUTOIDLE |
++ (ISPCSI1_MIDLEMODE_FORCESTANDBY <<
++ ISPCSI1_MIDLEMODE_SHIFT),
++ OMAP3_ISP_IOMEM_CSI2A,
++ ISP_CSIA_SYSCONFIG);
++
++ isp_reg_writel(ISPCSI1_AUTOIDLE |
++ (ISPCSI1_MIDLEMODE_FORCESTANDBY <<
++ ISPCSI1_MIDLEMODE_SHIFT),
++ OMAP3_ISP_IOMEM_CCP2,
++ ISP_CSIB_SYSCONFIG);
++ }
++
++ isp_reg_writel(ISPCTRL_SBL_AUTOIDLE, OMAP3_ISP_IOMEM_MAIN,
++ ISP_CTRL);
++ }
++}
++
++#define BIT_SET(var, shift, mask, val) \
++ do { \
++ var = (var & ~(mask << shift)) \
++ | (val << shift); \
++ } while (0)
++
++static int isp_init_csi(struct isp_interface_config *config)
++{
++ u32 i = 0, val, reg;
++ int format;
++
++ switch (config->u.csi.format) {
++ case V4L2_PIX_FMT_SGRBG10:
++ format = 0x16; /* RAW10+VP */
++ break;
++ case V4L2_PIX_FMT_SGRBG10DPCM8:
++ format = 0x12; /* RAW8+DPCM10+VP */
++ break;
++ default:
++ printk(KERN_ERR "isp_init_csi: bad csi format\n");
++ return -EINVAL;
++ }
++
++ /* Reset the CSI and wait for reset to complete */
++ isp_reg_writel(isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, ISPCSI1_SYSCONFIG) |
++ BIT(1),
++ OMAP3_ISP_IOMEM_CCP2,
++ ISPCSI1_SYSCONFIG);
++ while (!(isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, ISPCSI1_SYSSTATUS) &
++ BIT(0))) {
++ udelay(10);
++ if (i++ > 10)
++ break;
++ }
++ if (!(isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, ISPCSI1_SYSSTATUS) &
++ BIT(0))) {
++ printk(KERN_WARNING
++ "omap3_isp: timeout waiting for csi reset\n");
++ }
++
++ /* ISPCSI1_CTRL */
++ val = isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, ISPCSI1_CTRL);
++ val &= ~BIT(11); /* Enable VP only off ->
++ extract embedded data to interconnect */
++ BIT_SET(val, 8, 0x3, config->u.csi.vpclk); /* Video port clock */
++/* val |= BIT(3); */ /* Wait for FEC before disabling interface */
++ val |= BIT(2); /* I/O cell output is parallel
++ (no effect, but errata says should be enabled
++ for class 1/2) */
++ val |= BIT(12); /* VP clock polarity to falling edge
++ (needed or bad picture!) */
++
++ /* Data/strobe physical layer */
++ BIT_SET(val, 1, 1, config->u.csi.signalling);
++ BIT_SET(val, 10, 1, config->u.csi.strobe_clock_inv);
++ val |= BIT(4); /* Magic bit to enable CSI1 and strobe mode */
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_CCP2, ISPCSI1_CTRL);
++
++ /* ISPCSI1_LCx_CTRL logical channel #0 */
++ reg = ISPCSI1_LCx_CTRL(0); /* reg = ISPCSI1_CTRL1; */
++ val = isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, reg);
++ /* Format = RAW10+VP or RAW8+DPCM10+VP*/
++ BIT_SET(val, 3, 0x1f, format);
++ /* Enable setting of frame regions of interest */
++ BIT_SET(val, 1, 1, 1);
++ BIT_SET(val, 2, 1, config->u.csi.crc);
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_CCP2, reg);
++
++ /* ISPCSI1_DAT_START for logical channel #0 */
++ reg = ISPCSI1_LCx_DAT_START(0); /* reg = ISPCSI1_DAT_START; */
++ val = isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, reg);
++ BIT_SET(val, 16, 0xfff, config->u.csi.data_start);
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_CCP2, reg);
++
++ /* ISPCSI1_DAT_SIZE for logical channel #0 */
++ reg = ISPCSI1_LCx_DAT_SIZE(0); /* reg = ISPCSI1_DAT_SIZE; */
++ val = isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, reg);
++ BIT_SET(val, 16, 0xfff, config->u.csi.data_size);
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_CCP2, reg);
++
++ /* Clear status bits for logical channel #0 */
++ isp_reg_writel(0xFFF & ~BIT(6), OMAP3_ISP_IOMEM_CCP2,
++ ISPCSI1_LC01_IRQSTATUS);
++
++ /* Enable CSI1 */
++ val = isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, ISPCSI1_CTRL);
++ val |= BIT(0) | BIT(4);
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_CCP2, ISPCSI1_CTRL);
++
++ if (!(isp_reg_readl(OMAP3_ISP_IOMEM_CCP2, ISPCSI1_CTRL) & BIT(4))) {
++ printk(KERN_WARNING "OMAP3 CSI1 bus not available\n");
++ if (config->u.csi.signalling) /* Strobe mode requires CSI1 */
++ return -EIO;
++ }
++
++ return 0;
++}
++
++/**
++ * isp_configure_interface - Configures ISP Control I/F related parameters.
++ * @config: Pointer to structure containing the desired configuration for the
++ * ISP.
++ *
++ * Configures ISP control register (ISP_CTRL) with the values specified inside
++ * the config structure. Controls:
++ * - Selection of parallel or serial input to the preview hardware.
++ * - Data lane shifter.
++ * - Pixel clock polarity.
++ * - 8 to 16-bit bridge at the input of CCDC module.
++ * - HS or VS synchronization signal detection
++ **/
++int isp_configure_interface(struct isp_interface_config *config)
++{
++ u32 ispctrl_val = isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL);
++ int r;
++
++ isp_obj.config = config;
++
++ ispctrl_val &= ISPCTRL_SHIFT_MASK;
++ ispctrl_val |= config->dataline_shift << ISPCTRL_SHIFT_SHIFT;
++ ispctrl_val &= ~ISPCTRL_PAR_CLK_POL_INV;
++
++ ispctrl_val &= ISPCTRL_PAR_SER_CLK_SEL_MASK;
++
++ isp_buf_init();
++
++ switch (config->ccdc_par_ser) {
++ case ISP_PARLL:
++ ispctrl_val |= ISPCTRL_PAR_SER_CLK_SEL_PARALLEL;
++ ispctrl_val |= config->u.par.par_clk_pol
++ << ISPCTRL_PAR_CLK_POL_SHIFT;
++ ispctrl_val &= ~ISPCTRL_PAR_BRIDGE_BENDIAN;
++ ispctrl_val |= config->u.par.par_bridge
++ << ISPCTRL_PAR_BRIDGE_SHIFT;
++ break;
++ case ISP_CSIA:
++ ispctrl_val |= ISPCTRL_PAR_SER_CLK_SEL_CSIA;
++ ispctrl_val &= ~ISPCTRL_PAR_BRIDGE_BENDIAN;
++
++ isp_csi2_ctx_config_format(0, config->u.csi.format);
++ isp_csi2_ctx_update(0, false);
++
++ if (config->u.csi.crc)
++ isp_csi2_ctrl_config_ecc_enable(true);
++
++ isp_csi2_ctrl_config_vp_out_ctrl(config->u.csi.vpclk);
++ isp_csi2_ctrl_config_vp_only_enable(true);
++ isp_csi2_ctrl_config_vp_clk_enable(true);
++ isp_csi2_ctrl_update(false);
++
++ isp_csi2_irq_complexio1_set(1);
++ isp_csi2_irq_status_set(1);
++ isp_csi2_irq_set(1);
++
++ isp_csi2_enable(1);
++ mdelay(3);
++ break;
++ case ISP_CSIB:
++ ispctrl_val |= ISPCTRL_PAR_SER_CLK_SEL_CSIB;
++ r = isp_init_csi(config);
++ if (r)
++ return r;
++ break;
++ case ISP_NONE:
++ return 0;
++ default:
++ return -EINVAL;
++ }
++
++ ispctrl_val &= ~ISPCTRL_SYNC_DETECT_VSRISE;
++ ispctrl_val |= config->hsvs_syncdetect;
++
++ isp_reg_writel(ispctrl_val, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL);
++
++ /* Set sensor specific fields in CCDC and Previewer module.*/
++ isppreview_set_skip(config->prev_sph, config->prev_slv);
++ ispccdc_set_wenlog(config->wenlog);
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_configure_interface);
++
++static int isp_buf_process(struct isp_bufs *bufs);
++
++/**
++ * omap34xx_isp_isr - Interrupt Service Routine for Camera ISP module.
++ * @irq: Not used currently.
++ * @ispirq_disp: Pointer to the object that is passed while request_irq is
++ * called. This is the isp_obj.irq object containing info on the
++ * callback.
++ *
++ * Handles the corresponding callback if plugged in.
++ *
++ * Returns IRQ_HANDLED when IRQ was correctly handled, or IRQ_NONE when the
++ * IRQ wasn't handled.
++ **/
++static irqreturn_t omap34xx_isp_isr(int irq, void *_isp)
++{
++ struct isp *isp = _isp;
++ struct isp_irq *irqdis = &isp->irq;
++ struct isp_bufs *bufs = &isp->bufs;
++ unsigned long flags;
++ u32 irqstatus = 0;
++ unsigned long irqflags = 0;
++ int wait_hs_vs = 0;
++
++ irqstatus = isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_writel(irqstatus, OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++
++ spin_lock_irqsave(&bufs->lock, flags);
++ wait_hs_vs = bufs->wait_hs_vs;
++ if (irqstatus & HS_VS && bufs->wait_hs_vs)
++ bufs->wait_hs_vs--;
++ spin_unlock_irqrestore(&bufs->lock, flags);
++
++ spin_lock_irqsave(&isp_obj.lock, irqflags);
++ /*
++ * We need to wait for the first HS_VS interrupt from CCDC.
++ * Otherwise our frame (and everything else) might be bad.
++ */
++ if (wait_hs_vs)
++ goto out_ignore_buff;
++
++ if (irqstatus & CCDC_VD0) {
++ if (RAW_CAPTURE(&isp_obj))
++ isp_buf_process(bufs);
++ if (!ispccdc_busy())
++ ispccdc_config_shadow_registers();
++ }
++
++ if (irqstatus & PREV_DONE) {
++ if (irqdis->isp_callbk[CBK_PREV_DONE])
++ irqdis->isp_callbk[CBK_PREV_DONE](
++ PREV_DONE,
++ irqdis->isp_callbk_arg1[CBK_PREV_DONE],
++ irqdis->isp_callbk_arg2[CBK_PREV_DONE]);
++ else if (!RAW_CAPTURE(&isp_obj) && !ispresizer_busy()) {
++ if (isp_obj.module.applyCrop) {
++ ispresizer_applycrop();
++ if (!ispresizer_busy())
++ isp_obj.module.applyCrop = 0;
++ }
++ if (!isppreview_busy()) {
++ ispresizer_enable(1);
++ if (isppreview_busy()) {
++ /* FIXME: locking! */
++ ISP_BUF_DONE(bufs)->vb_state =
++ VIDEOBUF_ERROR;
++ printk(KERN_ERR "%s: can't stop"
++ " preview\n", __func__);
++ }
++ }
++ if (!isppreview_busy())
++ isppreview_config_shadow_registers();
++ if (!isppreview_busy())
++ isph3a_update_wb();
++ }
++ }
++
++ if (irqstatus & RESZ_DONE) {
++ if (!RAW_CAPTURE(&isp_obj)) {
++ if (!ispresizer_busy())
++ ispresizer_config_shadow_registers();
++ isp_buf_process(bufs);
++ }
++ }
++
++ if (irqstatus & H3A_AWB_DONE) {
++ if (irqdis->isp_callbk[CBK_H3A_AWB_DONE])
++ irqdis->isp_callbk[CBK_H3A_AWB_DONE](
++ H3A_AWB_DONE,
++ irqdis->isp_callbk_arg1[CBK_H3A_AWB_DONE],
++ irqdis->isp_callbk_arg2[CBK_H3A_AWB_DONE]);
++ }
++
++ if (irqstatus & HIST_DONE) {
++ if (irqdis->isp_callbk[CBK_HIST_DONE])
++ irqdis->isp_callbk[CBK_HIST_DONE](
++ HIST_DONE,
++ irqdis->isp_callbk_arg1[CBK_HIST_DONE],
++ irqdis->isp_callbk_arg2[CBK_HIST_DONE]);
++ }
++
++ if (irqstatus & H3A_AF_DONE) {
++ if (irqdis->isp_callbk[CBK_H3A_AF_DONE])
++ irqdis->isp_callbk[CBK_H3A_AF_DONE](
++ H3A_AF_DONE,
++ irqdis->isp_callbk_arg1[CBK_H3A_AF_DONE],
++ irqdis->isp_callbk_arg2[CBK_H3A_AF_DONE]);
++ }
++
++
++out_ignore_buff:
++ if (irqstatus & LSC_PRE_ERR) {
++ struct isp_buf *buf = ISP_BUF_DONE(bufs);
++ /* Mark buffer faulty. */
++ buf->vb_state = VIDEOBUF_ERROR;
++ ispccdc_lsc_error_handler();
++ printk(KERN_ERR "%s: lsc prefetch error\n", __func__);
++ }
++
++ if (irqstatus & CSIA) {
++ struct isp_buf *buf = ISP_BUF_DONE(bufs);
++ isp_csi2_isr();
++ buf->vb_state = VIDEOBUF_ERROR;
++ }
++
++ if (irqstatus & IRQ0STATUS_CSIB_IRQ) {
++ u32 ispcsi1_irqstatus;
++
++ ispcsi1_irqstatus = isp_reg_readl(OMAP3_ISP_IOMEM_CCP2,
++ ISPCSI1_LC01_IRQSTATUS);
++ DPRINTK_ISPCTRL("%x\n", ispcsi1_irqstatus);
++ }
++
++ if (irqdis->isp_callbk[CBK_CATCHALL]) {
++ irqdis->isp_callbk[CBK_CATCHALL](
++ irqstatus,
++ irqdis->isp_callbk_arg1[CBK_CATCHALL],
++ irqdis->isp_callbk_arg2[CBK_CATCHALL]);
++ }
++
++ spin_unlock_irqrestore(&isp_obj.lock, irqflags);
++
++#if 1
++ {
++ static const struct {
++ int num;
++ char *name;
++ } bits[] = {
++ { 31, "HS_VS_IRQ" },
++ { 30, "SEC_ERR_IRQ" },
++ { 29, "OCP_ERR_IRQ" },
++ { 28, "MMU_ERR_IRQ" },
++ { 27, "res27" },
++ { 26, "res26" },
++ { 25, "OVF_IRQ" },
++ { 24, "RSZ_DONE_IRQ" },
++ { 23, "res23" },
++ { 22, "res22" },
++ { 21, "CBUFF_IRQ" },
++ { 20, "PRV_DONE_IRQ" },
++ { 19, "CCDC_LSC_PREFETCH_ERROR" },
++ { 18, "CCDC_LSC_PREFETCH_COMPLETED" },
++ { 17, "CCDC_LSC_DONE" },
++ { 16, "HIST_DONE_IRQ" },
++ { 15, "res15" },
++ { 14, "res14" },
++ { 13, "H3A_AWB_DONE_IRQ" },
++ { 12, "H3A_AF_DONE_IRQ" },
++ { 11, "CCDC_ERR_IRQ" },
++ { 10, "CCDC_VD2_IRQ" },
++ { 9, "CCDC_VD1_IRQ" },
++ { 8, "CCDC_VD0_IRQ" },
++ { 7, "res7" },
++ { 6, "res6" },
++ { 5, "res5" },
++ { 4, "CSIB_IRQ" },
++ { 3, "CSIB_LCM_IRQ" },
++ { 2, "res2" },
++ { 1, "res1" },
++ { 0, "CSIA_IRQ" },
++ };
++ int i;
++ for (i = 0; i < ARRAY_SIZE(bits); i++) {
++ if ((1 << bits[i].num) & irqstatus)
++ DPRINTK_ISPCTRL("%s ", bits[i].name);
++ }
++ DPRINTK_ISPCTRL("\n");
++ }
++#endif
++
++ return IRQ_HANDLED;
++}
++
++/* Device name, needed for resource tracking layer */
++struct device_driver camera_drv = {
++ .name = "camera"
++};
++
++struct device camera_dev = {
++ .driver = &camera_drv,
++};
++
++/**
++ * isp_tmp_buf_free - To free allocated 10MB memory
++ *
++ **/
++static void isp_tmp_buf_free(void)
++{
++ if (isp_obj.tmp_buf) {
++ ispmmu_vfree(isp_obj.tmp_buf);
++ isp_obj.tmp_buf = 0;
++ isp_obj.tmp_buf_size = 0;
++ }
++}
++
++/**
++ * isp_tmp_buf_alloc - To allocate a 10MB memory
++ *
++ **/
++static u32 isp_tmp_buf_alloc(size_t size)
++{
++ isp_tmp_buf_free();
++
++ printk(KERN_INFO "%s: allocating %d bytes\n", __func__, size);
++
++ isp_obj.tmp_buf = ispmmu_vmalloc(size);
++ if (IS_ERR((void *)isp_obj.tmp_buf)) {
++ printk(KERN_ERR "ispmmu_vmap mapping failed ");
++ return -ENOMEM;
++ }
++ isp_obj.tmp_buf_size = size;
++
++ isppreview_set_outaddr(isp_obj.tmp_buf);
++ ispresizer_set_inaddr(isp_obj.tmp_buf);
++
++ return 0;
++}
++
++/**
++ * isp_start - Starts ISP submodule
++ *
++ * Start the needed isp components assuming these components
++ * are configured correctly.
++ **/
++void isp_start(void)
++{
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_PREVIEW
++ && is_isppreview_enabled())
++ isppreview_enable(1);
++
++ return;
++}
++EXPORT_SYMBOL(isp_start);
++
++#define ISP_STATISTICS_BUSY \
++ ()
++#define ISP_STOP_TIMEOUT msecs_to_jiffies(1000)
++static int __isp_disable_modules(int suspend)
++{
++ unsigned long timeout = jiffies + ISP_STOP_TIMEOUT;
++ int reset = 0;
++
++ /*
++ * We need to stop all the modules after CCDC first or they'll
++ * never stop since they may not get a full frame from CCDC.
++ */
++ if (suspend) {
++ isp_af_suspend();
++ isph3a_aewb_suspend();
++ isp_hist_suspend();
++ isppreview_suspend();
++ ispresizer_suspend();
++ } else {
++ isp_af_enable(0);
++ isph3a_aewb_enable(0);
++ isp_hist_enable(0);
++ isppreview_enable(0);
++ ispresizer_enable(0);
++ }
++
++ timeout = jiffies + ISP_STOP_TIMEOUT;
++ while (isp_af_busy()
++ || isph3a_aewb_busy()
++ || isp_hist_busy()
++ || isppreview_busy()
++ || ispresizer_busy()) {
++ if (time_after(jiffies, timeout)) {
++ printk(KERN_ERR "%s: can't stop non-ccdc modules\n",
++ __func__);
++ reset = 1;
++ break;
++ }
++ msleep(1);
++ }
++
++ /* Let's stop CCDC now. */
++ if (suspend)
++ /* This function supends lsc too */
++ ispccdc_suspend();
++ else {
++ ispccdc_enable_lsc(0);
++ ispccdc_enable(0);
++ }
++
++ timeout = jiffies + ISP_STOP_TIMEOUT;
++ while (ispccdc_busy()) {
++ if (time_after(jiffies, timeout)) {
++ printk(KERN_ERR "%s: can't stop ccdc\n", __func__);
++ reset = 1;
++ break;
++ }
++ msleep(1);
++ }
++
++ return reset;
++}
++
++static int isp_stop_modules(void)
++{
++ return __isp_disable_modules(0);
++}
++
++static int isp_suspend_modules(void)
++{
++ return __isp_disable_modules(1);
++}
++
++static void isp_resume_modules(void)
++{
++ ispresizer_resume();
++ isppreview_resume();
++ isp_hist_resume();
++ isph3a_aewb_resume();
++ isp_af_resume();
++ ispccdc_resume();
++}
++
++static void isp_reset(void)
++{
++ unsigned long timeout = 0;
++
++ isp_reg_writel(isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG)
++ | ISP_SYSCONFIG_SOFTRESET,
++ OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG);
++ while (!(isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_SYSSTATUS) & 0x1)) {
++ if (timeout++ > 10000) {
++ printk(KERN_ALERT "%s: cannot reset ISP\n", __func__);
++ break;
++ }
++ udelay(1);
++ }
++}
++
++/**
++ * isp_stop - Stops isp submodules
++ **/
++void isp_stop()
++{
++ int reset;
++
++ isp_disable_interrupts();
++ reset = isp_stop_modules();
++ isp_buf_init();
++ if (!reset)
++ return;
++
++ isp_save_ctx();
++ isp_reset();
++ isp_restore_ctx();
++}
++EXPORT_SYMBOL(isp_stop);
++
++static void isp_set_buf(struct isp_buf *buf)
++{
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_RESIZER
++ && is_ispresizer_enabled())
++ ispresizer_set_outaddr(buf->isp_addr);
++ else if (isp_obj.module.isp_pipeline & OMAP_ISP_CCDC)
++ ispccdc_set_outaddr(buf->isp_addr);
++
++}
++
++/**
++ * isp_calc_pipeline - Sets pipeline depending of input and output pixel format
++ * @pix_input: Pointer to V4L2 pixel format structure for input image.
++ * @pix_output: Pointer to V4L2 pixel format structure for output image.
++ **/
++static u32 isp_calc_pipeline(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output)
++{
++ isp_release_resources();
++ if ((pix_input->pixelformat == V4L2_PIX_FMT_SGRBG10
++ || pix_input->pixelformat == V4L2_PIX_FMT_SGRBG10DPCM8)
++ && pix_output->pixelformat != V4L2_PIX_FMT_SGRBG10) {
++ isp_obj.module.isp_pipeline =
++ OMAP_ISP_CCDC | OMAP_ISP_PREVIEW | OMAP_ISP_RESIZER;
++ ispccdc_request();
++ isppreview_request();
++ ispresizer_request();
++ ispccdc_config_datapath(CCDC_RAW, CCDC_OTHERS_VP);
++ isppreview_config_datapath(PRV_RAW_CCDC, PREVIEW_MEM);
++ ispresizer_config_datapath(RSZ_MEM_YUV);
++ } else {
++ isp_obj.module.isp_pipeline = OMAP_ISP_CCDC;
++ ispccdc_request();
++ if (pix_input->pixelformat == V4L2_PIX_FMT_SGRBG10
++ || pix_input->pixelformat == V4L2_PIX_FMT_SGRBG10DPCM8)
++ ispccdc_config_datapath(CCDC_RAW, CCDC_OTHERS_VP_MEM);
++ else
++ ispccdc_config_datapath(CCDC_YUV_SYNC,
++ CCDC_OTHERS_MEM);
++ }
++ return 0;
++}
++
++/**
++ * isp_config_pipeline - Configures the image size and ycpos for ISP submodules
++ * @pix_input: Pointer to V4L2 pixel format structure for input image.
++ * @pix_output: Pointer to V4L2 pixel format structure for output image.
++ *
++ * The configuration of ycpos depends on the output pixel format for both the
++ * Preview and Resizer submodules.
++ **/
++static void isp_config_pipeline(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output)
++{
++ ispccdc_config_size(isp_obj.module.ccdc_input_width,
++ isp_obj.module.ccdc_input_height,
++ isp_obj.module.ccdc_output_width,
++ isp_obj.module.ccdc_output_height);
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_PREVIEW) {
++ isppreview_config_size(isp_obj.module.preview_input_width,
++ isp_obj.module.preview_input_height,
++ isp_obj.module.preview_output_width,
++ isp_obj.module.preview_output_height);
++ }
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_RESIZER) {
++ ispresizer_config_size(isp_obj.module.resizer_input_width,
++ isp_obj.module.resizer_input_height,
++ isp_obj.module.resizer_output_width,
++ isp_obj.module.resizer_output_height);
++ }
++
++ if (pix_output->pixelformat == V4L2_PIX_FMT_UYVY) {
++ isppreview_config_ycpos(YCPOS_YCrYCb);
++ if (is_ispresizer_enabled())
++ ispresizer_config_ycpos(0);
++ } else {
++ isppreview_config_ycpos(YCPOS_CrYCbY);
++ if (is_ispresizer_enabled())
++ ispresizer_config_ycpos(1);
++ }
++
++ return;
++}
++
++static void isp_buf_init(void)
++{
++ struct isp_bufs *bufs = &isp_obj.bufs;
++ int sg;
++
++ bufs->queue = 0;
++ bufs->done = 0;
++ bufs->wait_hs_vs = isp_obj.config->wait_hs_vs;
++ for (sg = 0; sg < NUM_BUFS; sg++) {
++ bufs->buf[sg].complete = NULL;
++ bufs->buf[sg].vb = NULL;
++ bufs->buf[sg].priv = NULL;
++ }
++}
++
++/**
++ * isp_vbq_sync - Walks the pages table and flushes the cache for
++ * each page.
++ **/
++static int isp_vbq_sync(struct videobuf_buffer *vb, int when)
++{
++ flush_cache_all();
++
++ return 0;
++}
++
++static int isp_buf_process(struct isp_bufs *bufs)
++{
++ struct isp_buf *buf = NULL;
++ unsigned long flags;
++ int last;
++
++ spin_lock_irqsave(&bufs->lock, flags);
++
++ if (ISP_BUFS_IS_EMPTY(bufs))
++ goto out;
++
++ if (RAW_CAPTURE(&isp_obj) && ispccdc_sbl_wait_idle(1000)) {
++ printk(KERN_ERR "ccdc %d won't become idle!\n",
++ RAW_CAPTURE(&isp_obj));
++ goto out;
++ }
++
++ /* We had at least one buffer in queue. */
++ buf = ISP_BUF_DONE(bufs);
++ last = ISP_BUFS_IS_LAST(bufs);
++
++ if (!last) {
++ /* Set new buffer address. */
++ isp_set_buf(ISP_BUF_NEXT_DONE(bufs));
++ } else {
++ /* Tell ISP not to write any of our buffers. */
++ isp_disable_interrupts();
++ if (RAW_CAPTURE(&isp_obj))
++ ispccdc_enable(0);
++ else
++ ispresizer_enable(0);
++ /*
++ * We must wait for the HS_VS since before that the
++ * CCDC may trigger interrupts even if it's not
++ * receiving a frame.
++ */
++ bufs->wait_hs_vs = isp_obj.config->wait_hs_vs;
++ }
++ if ((RAW_CAPTURE(&isp_obj) && ispccdc_busy())
++ || (!RAW_CAPTURE(&isp_obj) && ispresizer_busy())) {
++ /*
++ * Next buffer available: for the transfer to succeed, the
++ * CCDC (RAW capture) or resizer (YUV capture) must be idle
++ * for the duration of transfer setup. Bad things happen
++ * otherwise!
++ *
++ * Next buffer not available: if we fail to stop the
++ * ISP the buffer is probably going to be bad.
++ */
++ /* Mark this buffer faulty. */
++ buf->vb_state = VIDEOBUF_ERROR;
++ /* Mark next faulty, too, in case we have one. */
++ if (!last) {
++ ISP_BUF_NEXT_DONE(bufs)->vb_state =
++ VIDEOBUF_ERROR;
++ printk(KERN_ALERT "OUCH!!!\n");
++ } else {
++ printk(KERN_ALERT "Ouch!\n");
++ }
++ }
++
++ /* Mark the current buffer as done. */
++ ISP_BUF_MARK_DONE(bufs);
++
++ DPRINTK_ISPCTRL(KERN_ALERT "%s: finish %d mmu %p\n", __func__,
++ (bufs->done - 1 + NUM_BUFS) % NUM_BUFS,
++ (bufs->buf+((bufs->done - 1 + NUM_BUFS)
++ % NUM_BUFS))->isp_addr);
++
++out:
++ spin_unlock_irqrestore(&bufs->lock, flags);
++
++ if (buf != NULL) {
++ /*
++ * We want to dequeue a buffer from the video buffer
++ * queue. Let's do it!
++ */
++ isp_vbq_sync(buf->vb, DMA_FROM_DEVICE);
++ buf->vb->state = buf->vb_state;
++ buf->complete(buf->vb, buf->priv);
++ }
++
++ return 0;
++}
++
++int isp_buf_queue(struct videobuf_buffer *vb,
++ void (*complete)(struct videobuf_buffer *vb, void *priv),
++ void *priv)
++{
++ unsigned long flags;
++ struct isp_buf *buf;
++ struct videobuf_dmabuf *dma = videobuf_to_dma(vb);
++ const struct scatterlist *sglist = dma->sglist;
++ struct isp_bufs *bufs = &isp_obj.bufs;
++ int sglen = dma->sglen;
++
++ BUG_ON(sglen < 0 || !sglist);
++
++ isp_vbq_sync(vb, DMA_TO_DEVICE);
++
++ spin_lock_irqsave(&bufs->lock, flags);
++
++ BUG_ON(ISP_BUFS_IS_FULL(bufs));
++
++ buf = ISP_BUF_QUEUE(bufs);
++
++ buf->isp_addr = bufs->isp_addr_capture[vb->i];
++ buf->complete = complete;
++ buf->vb = vb;
++ buf->priv = priv;
++ buf->vb_state = VIDEOBUF_DONE;
++
++ if (ISP_BUFS_IS_EMPTY(bufs)) {
++ isp_enable_interrupts(RAW_CAPTURE(&isp_obj));
++ isp_set_buf(buf);
++ ispccdc_enable(1);
++ isp_start();
++ }
++
++ ISP_BUF_MARK_QUEUED(bufs);
++
++ spin_unlock_irqrestore(&bufs->lock, flags);
++
++ DPRINTK_ISPCTRL(KERN_ALERT "%s: queue %d vb %d, mmu %p\n", __func__,
++ (bufs->queue - 1 + NUM_BUFS) % NUM_BUFS, vb->i,
++ buf->isp_addr);
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_buf_queue);
++
++int isp_vbq_setup(struct videobuf_queue *vbq, unsigned int *cnt,
++ unsigned int *size)
++{
++ int rval = 0;
++ size_t tmp_size = PAGE_ALIGN(isp_obj.module.preview_output_width
++ * isp_obj.module.preview_output_height
++ * ISP_BYTES_PER_PIXEL);
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_PREVIEW
++ && isp_obj.tmp_buf_size < tmp_size)
++ rval = isp_tmp_buf_alloc(tmp_size);
++
++ return rval;
++}
++EXPORT_SYMBOL(isp_vbq_setup);
++
++/**
++ * isp_vbq_prepare - Videobuffer queue prepare.
++ * @vbq: Pointer to videobuf_queue structure.
++ * @vb: Pointer to videobuf_buffer structure.
++ * @field: Requested Field order for the videobuffer.
++ *
++ * Returns 0 if successful, or -EIO if the ispmmu was unable to map a
++ * scatter-gather linked list data space.
++ **/
++int isp_vbq_prepare(struct videobuf_queue *vbq, struct videobuf_buffer *vb,
++ enum v4l2_field field)
++{
++ unsigned int isp_addr;
++ struct videobuf_dmabuf *vdma;
++ struct isp_bufs *bufs = &isp_obj.bufs;
++
++ int err = 0;
++
++ vdma = videobuf_to_dma(vb);
++
++ isp_addr = ispmmu_vmap(vdma->sglist, vdma->sglen);
++
++ if (IS_ERR_VALUE(isp_addr))
++ err = -EIO;
++ else
++ bufs->isp_addr_capture[vb->i] = isp_addr;
++
++ return err;
++}
++EXPORT_SYMBOL(isp_vbq_prepare);
++
++/**
++ * isp_vbq_release - Videobuffer queue release.
++ * @vbq: Pointer to videobuf_queue structure.
++ * @vb: Pointer to videobuf_buffer structure.
++ **/
++void isp_vbq_release(struct videobuf_queue *vbq, struct videobuf_buffer *vb)
++{
++ struct isp_bufs *bufs = &isp_obj.bufs;
++
++ ispmmu_vunmap(bufs->isp_addr_capture[vb->i]);
++ bufs->isp_addr_capture[vb->i] = (dma_addr_t)NULL;
++ return;
++}
++EXPORT_SYMBOL(isp_vbq_release);
++
++/**
++ * isp_queryctrl - Query V4L2 control from existing controls in ISP.
++ * @a: Pointer to v4l2_queryctrl structure. It only needs the id field filled.
++ *
++ * Returns 0 if successful, or -EINVAL if not found in ISP.
++ **/
++int isp_queryctrl(struct v4l2_queryctrl *a)
++{
++ int i;
++
++ if (a->id & V4L2_CTRL_FLAG_NEXT_CTRL) {
++ a->id &= ~V4L2_CTRL_FLAG_NEXT_CTRL;
++ i = find_next_vctrl(a->id);
++ } else {
++ i = find_vctrl(a->id);
++ }
++
++ if (i < 0)
++ return -EINVAL;
++
++ *a = video_control[i].qc;
++ return 0;
++}
++EXPORT_SYMBOL(isp_queryctrl);
++
++/**
++ * isp_queryctrl - Query V4L2 control from existing controls in ISP.
++ * @a: Pointer to v4l2_queryctrl structure. It only needs the id field filled.
++ *
++ * Returns 0 if successful, or -EINVAL if not found in ISP.
++ **/
++int isp_querymenu(struct v4l2_querymenu *a)
++{
++ int i;
++
++ i = find_vmenu(a->id, a->index);
++
++ if (i < 0)
++ return -EINVAL;
++
++ *a = video_menu[i];
++ return 0;
++}
++EXPORT_SYMBOL(isp_querymenu);
++
++/**
++ * isp_g_ctrl - Gets value of the desired V4L2 control.
++ * @a: V4L2 control to read actual value from.
++ *
++ * Return 0 if successful, or -EINVAL if chosen control is not found.
++ **/
++int isp_g_ctrl(struct v4l2_control *a)
++{
++ u8 current_value;
++ int rval = 0;
++
++ if (!isp_obj.ref_count)
++ return -EINVAL;
++
++ switch (a->id) {
++ case V4L2_CID_BRIGHTNESS:
++ isppreview_query_brightness(&current_value);
++ a->value = current_value / ISPPRV_BRIGHT_UNITS;
++ break;
++ case V4L2_CID_CONTRAST:
++ isppreview_query_contrast(&current_value);
++ a->value = current_value / ISPPRV_CONTRAST_UNITS;
++ break;
++ case V4L2_CID_COLORFX:
++ isppreview_get_color(&current_value);
++ a->value = current_value;
++ break;
++ default:
++ rval = -EINVAL;
++ break;
++ }
++
++ return rval;
++}
++EXPORT_SYMBOL(isp_g_ctrl);
++
++/**
++ * isp_s_ctrl - Sets value of the desired V4L2 control.
++ * @a: V4L2 control to read actual value from.
++ *
++ * Return 0 if successful, -EINVAL if chosen control is not found or value
++ * is out of bounds, -EFAULT if copy_from_user or copy_to_user operation fails
++ * from camera abstraction layer related controls or the transfered user space
++ * pointer via the value field is not set properly.
++ **/
++int isp_s_ctrl(struct v4l2_control *a)
++{
++ int rval = 0;
++ u8 new_value = a->value;
++
++ if (!isp_obj.ref_count)
++ return -EINVAL;
++
++ switch (a->id) {
++ case V4L2_CID_BRIGHTNESS:
++ if (new_value > ISPPRV_BRIGHT_HIGH)
++ rval = -EINVAL;
++ else
++ isppreview_update_brightness(&new_value);
++ break;
++ case V4L2_CID_CONTRAST:
++ if (new_value > ISPPRV_CONTRAST_HIGH)
++ rval = -EINVAL;
++ else
++ isppreview_update_contrast(&new_value);
++ break;
++ case V4L2_CID_COLORFX:
++ if (new_value > V4L2_COLORFX_SEPIA)
++ rval = -EINVAL;
++ else
++ isppreview_set_color(&new_value);
++ break;
++ default:
++ rval = -EINVAL;
++ break;
++ }
++
++ return rval;
++}
++EXPORT_SYMBOL(isp_s_ctrl);
++
++/**
++ * isp_handle_private - Handle all private ioctls for isp module.
++ * @cmd: ioctl cmd value
++ * @arg: ioctl arg value
++ *
++ * Return 0 if successful, -EINVAL if chosen cmd value is not handled or value
++ * is out of bounds, -EFAULT if ioctl arg value is not valid.
++ * Function simply routes the input ioctl cmd id to the appropriate handler in
++ * the isp module.
++ **/
++int isp_handle_private(int cmd, void *arg)
++{
++ int rval = 0;
++
++ if (!isp_obj.ref_count)
++ return -EINVAL;
++
++ switch (cmd) {
++ case VIDIOC_PRIVATE_ISP_CCDC_CFG:
++ rval = omap34xx_isp_ccdc_config(arg);
++ break;
++ case VIDIOC_PRIVATE_ISP_PRV_CFG:
++ rval = omap34xx_isp_preview_config(arg);
++ break;
++ case VIDIOC_PRIVATE_ISP_AEWB_CFG: {
++ struct isph3a_aewb_config *params;
++ params = (struct isph3a_aewb_config *)arg;
++ rval = isph3a_aewb_configure(params);
++ }
++ break;
++ case VIDIOC_PRIVATE_ISP_AEWB_REQ: {
++ struct isph3a_aewb_data *data;
++ data = (struct isph3a_aewb_data *)arg;
++ rval = isph3a_aewb_request_statistics(data);
++ }
++ break;
++ case VIDIOC_PRIVATE_ISP_HIST_CFG: {
++ struct isp_hist_config *params;
++ params = (struct isp_hist_config *)arg;
++ rval = isp_hist_configure(params);
++ }
++ break;
++ case VIDIOC_PRIVATE_ISP_HIST_REQ: {
++ struct isp_hist_data *data;
++ data = (struct isp_hist_data *)arg;
++ rval = isp_hist_request_statistics(data);
++ }
++ break;
++ case VIDIOC_PRIVATE_ISP_AF_CFG: {
++ struct af_configuration *params;
++ params = (struct af_configuration *)arg;
++ rval = isp_af_configure(params);
++ }
++ break;
++ case VIDIOC_PRIVATE_ISP_AF_REQ: {
++ struct isp_af_data *data;
++ data = (struct isp_af_data *)arg;
++ rval = isp_af_request_statistics(data);
++ }
++ break;
++ default:
++ rval = -EINVAL;
++ break;
++ }
++ return rval;
++}
++EXPORT_SYMBOL(isp_handle_private);
++
++/**
++ * isp_enum_fmt_cap - Gets more information of chosen format index and type
++ * @f: Pointer to structure containing index and type of format to read from.
++ *
++ * Returns 0 if successful, or -EINVAL if format index or format type is
++ * invalid.
++ **/
++int isp_enum_fmt_cap(struct v4l2_fmtdesc *f)
++{
++ int index = f->index;
++ enum v4l2_buf_type type = f->type;
++ int rval = -EINVAL;
++
++ if (index >= NUM_ISP_CAPTURE_FORMATS)
++ goto err;
++
++ memset(f, 0, sizeof(*f));
++ f->index = index;
++ f->type = type;
++
++ switch (f->type) {
++ case V4L2_BUF_TYPE_VIDEO_CAPTURE:
++ rval = 0;
++ break;
++ default:
++ goto err;
++ }
++
++ f->flags = isp_formats[index].flags;
++ strncpy(f->description, isp_formats[index].description,
++ sizeof(f->description));
++ f->pixelformat = isp_formats[index].pixelformat;
++err:
++ return rval;
++}
++EXPORT_SYMBOL(isp_enum_fmt_cap);
++
++/**
++ * isp_g_fmt_cap - Gets current output image format.
++ * @f: Pointer to V4L2 format structure to be filled with current output format
++ **/
++void isp_g_fmt_cap(struct v4l2_pix_format *pix)
++{
++ *pix = isp_obj.module.pix;
++ return;
++}
++EXPORT_SYMBOL(isp_g_fmt_cap);
++
++/**
++ * isp_s_fmt_cap - Sets I/O formats and crop and configures pipeline in ISP
++ * @f: Pointer to V4L2 format structure to be filled with current output format
++ *
++ * Returns 0 if successful, or return value of either isp_try_size or
++ * isp_try_fmt if there is an error.
++ **/
++int isp_s_fmt_cap(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output)
++{
++ int crop_scaling_w = 0, crop_scaling_h = 0;
++ int rval = 0;
++
++ if (!isp_obj.ref_count)
++ return -EINVAL;
++
++ rval = isp_calc_pipeline(pix_input, pix_output);
++ if (rval)
++ goto out;
++
++ rval = isp_try_size(pix_input, pix_output);
++ if (rval)
++ goto out;
++
++ rval = isp_try_fmt(pix_input, pix_output);
++ if (rval)
++ goto out;
++
++ if (ispcroprect.width != pix_output->width) {
++ crop_scaling_w = 1;
++ ispcroprect.left = 0;
++ ispcroprect.width = pix_output->width;
++ }
++
++ if (ispcroprect.height != pix_output->height) {
++ crop_scaling_h = 1;
++ ispcroprect.top = 0;
++ ispcroprect.height = pix_output->height;
++ }
++
++ isp_config_pipeline(pix_input, pix_output);
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_RESIZER
++ && (crop_scaling_h || crop_scaling_w))
++ isp_config_crop(pix_output);
++
++out:
++ return rval;
++}
++EXPORT_SYMBOL(isp_s_fmt_cap);
++
++/**
++ * isp_config_crop - Configures crop parameters in isp resizer.
++ * @croppix: Pointer to V4L2 pixel format structure containing crop parameters
++ **/
++void isp_config_crop(struct v4l2_pix_format *croppix)
++{
++ u8 crop_scaling_w;
++ u8 crop_scaling_h;
++ unsigned long org_left, num_pix, new_top;
++
++ struct v4l2_pix_format *pix = croppix;
++
++ crop_scaling_w = (isp_obj.module.preview_output_width * 10) /
++ pix->width;
++ crop_scaling_h = (isp_obj.module.preview_output_height * 10) /
++ pix->height;
++
++ cur_rect.left = (ispcroprect.left * crop_scaling_w) / 10;
++ cur_rect.top = (ispcroprect.top * crop_scaling_h) / 10;
++ cur_rect.width = (ispcroprect.width * crop_scaling_w) / 10;
++ cur_rect.height = (ispcroprect.height * crop_scaling_h) / 10;
++
++ org_left = cur_rect.left;
++ while (((int)cur_rect.left & 0xFFFFFFF0) != (int)cur_rect.left)
++ (int)cur_rect.left--;
++
++ num_pix = org_left - cur_rect.left;
++ new_top = (int)(num_pix * 3) / 4;
++ cur_rect.top = cur_rect.top - new_top;
++ cur_rect.height = (2 * new_top) + cur_rect.height;
++
++ cur_rect.width = cur_rect.width + (2 * num_pix);
++ while (((int)cur_rect.width & 0xFFFFFFF0) != (int)cur_rect.width)
++ (int)cur_rect.width--;
++
++ isp_obj.tmp_buf_offset =
++ cur_rect.left * 2 +
++ isp_obj.module.preview_output_width * 2 * cur_rect.top;
++
++ ispresizer_trycrop(cur_rect.left, cur_rect.top, cur_rect.width,
++ cur_rect.height,
++ isp_obj.module.resizer_output_width,
++ isp_obj.module.resizer_output_height);
++
++ return;
++}
++EXPORT_SYMBOL(isp_config_crop);
++
++/**
++ * isp_g_crop - Gets crop rectangle size and position.
++ * @a: Pointer to V4L2 crop structure to be filled.
++ *
++ * Always returns 0.
++ **/
++int isp_g_crop(struct v4l2_crop *a)
++{
++ struct v4l2_crop *crop = a;
++
++ crop->c = ispcroprect;
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_g_crop);
++
++/**
++ * isp_s_crop - Sets crop rectangle size and position and queues crop operation
++ * @a: Pointer to V4L2 crop structure with desired parameters.
++ * @pix: Pointer to V4L2 pixel format structure with desired parameters.
++ *
++ * Returns 0 if successful, or -EINVAL if crop parameters are out of bounds.
++ **/
++int isp_s_crop(struct v4l2_crop *a, struct v4l2_pix_format *pix)
++{
++ struct v4l2_crop *crop = a;
++ int rval = 0;
++
++ if (!isp_obj.ref_count)
++ return -EINVAL;
++
++ if (crop->c.left < 0)
++ crop->c.left = 0;
++ if (crop->c.width < 0)
++ crop->c.width = 0;
++ if (crop->c.top < 0)
++ crop->c.top = 0;
++ if (crop->c.height < 0)
++ crop->c.height = 0;
++
++ if (crop->c.left >= pix->width)
++ crop->c.left = pix->width - 1;
++ if (crop->c.top >= pix->height)
++ crop->c.top = pix->height - 1;
++
++ if (crop->c.left + crop->c.width > pix->width)
++ crop->c.width = pix->width - crop->c.left;
++ if (crop->c.top + crop->c.height > pix->height)
++ crop->c.height = pix->height - crop->c.top;
++
++ ispcroprect.left = crop->c.left;
++ ispcroprect.top = crop->c.top;
++ ispcroprect.width = crop->c.width;
++ ispcroprect.height = crop->c.height;
++
++ isp_config_crop(pix);
++
++ isp_obj.module.applyCrop = 1;
++
++ return rval;
++}
++EXPORT_SYMBOL(isp_s_crop);
++
++/**
++ * isp_try_fmt_cap - Tries desired input/output image formats
++ * @pix_input: Pointer to V4L2 pixel format structure for input image.
++ * @pix_output: Pointer to V4L2 pixel format structure for output image.
++ *
++ * Returns 0 if successful, or return value of either isp_try_size or
++ * isp_try_fmt if there is an error.
++ **/
++int isp_try_fmt_cap(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output)
++{
++ int rval = 0;
++
++ rval = isp_calc_pipeline(pix_input, pix_output);
++ if (rval)
++ goto out;
++
++ rval = isp_try_size(pix_input, pix_output);
++ if (rval)
++ goto out;
++
++ rval = isp_try_fmt(pix_input, pix_output);
++ if (rval)
++ goto out;
++
++out:
++ return rval;
++}
++EXPORT_SYMBOL(isp_try_fmt_cap);
++
++/**
++ * isp_try_size - Tries size configuration for I/O images of each ISP submodule
++ * @pix_input: Pointer to V4L2 pixel format structure for input image.
++ * @pix_output: Pointer to V4L2 pixel format structure for output image.
++ *
++ * Returns 0 if successful, or return value of ispccdc_try_size,
++ * isppreview_try_size, or ispresizer_try_size (depending on the pipeline
++ * configuration) if there is an error.
++ **/
++static int isp_try_size(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output)
++{
++ int rval = 0;
++
++ if (pix_output->width <= ISPRSZ_MIN_OUTPUT
++ || pix_output->height <= ISPRSZ_MIN_OUTPUT)
++ return -EINVAL;
++
++ if (pix_output->width >= ISPRSZ_MAX_OUTPUT
++ || pix_output->height > ISPRSZ_MAX_OUTPUT)
++ return -EINVAL;
++
++ isp_obj.module.ccdc_input_width = pix_input->width;
++ isp_obj.module.ccdc_input_height = pix_input->height;
++ isp_obj.module.resizer_output_width = pix_output->width;
++ isp_obj.module.resizer_output_height = pix_output->height;
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_CCDC) {
++ rval = ispccdc_try_size(isp_obj.module.ccdc_input_width,
++ isp_obj.module.ccdc_input_height,
++ &isp_obj.module.ccdc_output_width,
++ &isp_obj.module.ccdc_output_height);
++ if (rval) {
++ printk(KERN_ERR "ISP_ERR: The dimensions %dx%d are not"
++ " supported\n", pix_input->width,
++ pix_input->height);
++ return rval;
++ }
++ pix_output->width = isp_obj.module.ccdc_output_width;
++ pix_output->height = isp_obj.module.ccdc_output_height;
++ }
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_PREVIEW) {
++ isp_obj.module.preview_input_width =
++ isp_obj.module.ccdc_output_width;
++ isp_obj.module.preview_input_height =
++ isp_obj.module.ccdc_output_height;
++ rval = isppreview_try_size(
++ isp_obj.module.preview_input_width,
++ isp_obj.module.preview_input_height,
++ &isp_obj.module.preview_output_width,
++ &isp_obj.module.preview_output_height);
++ if (rval) {
++ printk(KERN_ERR "ISP_ERR: The dimensions %dx%d are not"
++ " supported\n", pix_input->width,
++ pix_input->height);
++ return rval;
++ }
++ pix_output->width = isp_obj.module.preview_output_width;
++ pix_output->height = isp_obj.module.preview_output_height;
++ }
++
++ if (isp_obj.module.isp_pipeline & OMAP_ISP_RESIZER) {
++ isp_obj.module.resizer_input_width =
++ isp_obj.module.preview_output_width;
++ isp_obj.module.resizer_input_height =
++ isp_obj.module.preview_output_height;
++ rval = ispresizer_try_size(
++ &isp_obj.module.resizer_input_width,
++ &isp_obj.module.resizer_input_height,
++ &isp_obj.module.resizer_output_width,
++ &isp_obj.module.resizer_output_height);
++ if (rval) {
++ printk(KERN_ERR "ISP_ERR: The dimensions %dx%d are not"
++ " supported\n", pix_input->width,
++ pix_input->height);
++ return rval;
++ }
++ pix_output->width = isp_obj.module.resizer_output_width;
++ pix_output->height = isp_obj.module.resizer_output_height;
++ }
++
++ return rval;
++}
++
++/**
++ * isp_try_fmt - Validates input/output format parameters.
++ * @pix_input: Pointer to V4L2 pixel format structure for input image.
++ * @pix_output: Pointer to V4L2 pixel format structure for output image.
++ *
++ * Always returns 0.
++ **/
++int isp_try_fmt(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output)
++{
++ int ifmt;
++
++ for (ifmt = 0; ifmt < NUM_ISP_CAPTURE_FORMATS; ifmt++) {
++ if (pix_output->pixelformat == isp_formats[ifmt].pixelformat)
++ break;
++ }
++ if (ifmt == NUM_ISP_CAPTURE_FORMATS)
++ ifmt = 1;
++ pix_output->pixelformat = isp_formats[ifmt].pixelformat;
++ pix_output->field = V4L2_FIELD_NONE;
++ pix_output->bytesperline = pix_output->width * ISP_BYTES_PER_PIXEL;
++ pix_output->sizeimage =
++ PAGE_ALIGN(pix_output->bytesperline * pix_output->height);
++ pix_output->priv = 0;
++ switch (pix_output->pixelformat) {
++ case V4L2_PIX_FMT_YUYV:
++ case V4L2_PIX_FMT_UYVY:
++ pix_output->colorspace = V4L2_COLORSPACE_JPEG;
++ break;
++ default:
++ pix_output->colorspace = V4L2_COLORSPACE_SRGB;
++ }
++
++ isp_obj.module.pix.pixelformat = pix_output->pixelformat;
++ isp_obj.module.pix.width = pix_output->width;
++ isp_obj.module.pix.height = pix_output->height;
++ isp_obj.module.pix.field = pix_output->field;
++ isp_obj.module.pix.bytesperline = pix_output->bytesperline;
++ isp_obj.module.pix.sizeimage = pix_output->sizeimage;
++ isp_obj.module.pix.priv = pix_output->priv;
++ isp_obj.module.pix.colorspace = pix_output->colorspace;
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_try_fmt);
++
++/**
++ * isp_save_ctx - Saves ISP, CCDC, HIST, H3A, PREV, RESZ & MMU context.
++ *
++ * Routine for saving the context of each module in the ISP.
++ * CCDC, HIST, H3A, PREV, RESZ and MMU.
++ **/
++static void isp_save_ctx(void)
++{
++ isp_save_context(isp_reg_list);
++ ispccdc_save_context();
++ ispmmu_save_context();
++ isphist_save_context();
++ isph3a_save_context();
++ isppreview_save_context();
++ ispresizer_save_context();
++}
++
++/**
++ * isp_restore_ctx - Restores ISP, CCDC, HIST, H3A, PREV, RESZ & MMU context.
++ *
++ * Routine for restoring the context of each module in the ISP.
++ * CCDC, HIST, H3A, PREV, RESZ and MMU.
++ **/
++static void isp_restore_ctx(void)
++{
++ isp_restore_context(isp_reg_list);
++ ispccdc_restore_context();
++ ispmmu_restore_context();
++ isphist_restore_context();
++ isph3a_restore_context();
++ isppreview_restore_context();
++ ispresizer_restore_context();
++}
++
++static int isp_enable_clocks(void)
++{
++ int r;
++
++ r = clk_enable(isp_obj.cam_ick);
++ if (r) {
++ DPRINTK_ISPCTRL("ISP_ERR: clk_en for ick failed\n");
++ goto out_clk_enable_ick;
++ }
++ r = clk_enable(isp_obj.cam_mclk);
++ if (r) {
++ DPRINTK_ISPCTRL("ISP_ERR: clk_en for mclk failed\n");
++ goto out_clk_enable_mclk;
++ }
++ r = clk_enable(isp_obj.csi2_fck);
++ if (r) {
++ DPRINTK_ISPCTRL("ISP_ERR: clk_en for csi2_fclk"
++ " failed\n");
++ goto out_clk_enable_csi2_fclk;
++ }
++ return 0;
++
++out_clk_enable_csi2_fclk:
++ clk_disable(isp_obj.cam_mclk);
++out_clk_enable_mclk:
++ clk_disable(isp_obj.cam_ick);
++out_clk_enable_ick:
++ return r;
++}
++
++static void isp_disable_clocks(void)
++{
++ clk_disable(isp_obj.cam_ick);
++ clk_disable(isp_obj.cam_mclk);
++ clk_disable(isp_obj.csi2_fck);
++}
++
++/**
++ * isp_get - Adquires the ISP resource.
++ *
++ * Initializes the clocks for the first acquire.
++ **/
++int isp_get(void)
++{
++ static int has_context;
++ int ret_err = 0;
++
++ if (omap3isp == NULL)
++ return -EBUSY;
++
++ DPRINTK_ISPCTRL("isp_get: old %d\n", isp_obj.ref_count);
++ mutex_lock(&(isp_obj.isp_mutex));
++ if (isp_obj.ref_count == 0) {
++ ret_err = isp_enable_clocks();
++ if (ret_err)
++ goto out_err;
++ /* We don't want to restore context before saving it! */
++ if (has_context)
++ isp_restore_ctx();
++ else
++ has_context = 1;
++ } else {
++ mutex_unlock(&isp_obj.isp_mutex);
++ return -EBUSY;
++ }
++ isp_obj.ref_count++;
++ mutex_unlock(&(isp_obj.isp_mutex));
++
++ DPRINTK_ISPCTRL("isp_get: new %d\n", isp_obj.ref_count);
++ return isp_obj.ref_count;
++
++out_err:
++ mutex_unlock(&(isp_obj.isp_mutex));
++ return ret_err;
++}
++EXPORT_SYMBOL(isp_get);
++
++/**
++ * isp_put - Releases the ISP resource.
++ *
++ * Releases the clocks also for the last release.
++ **/
++int isp_put(void)
++{
++ if (omap3isp == NULL)
++ return -EBUSY;
++
++ DPRINTK_ISPCTRL("isp_put: old %d\n", isp_obj.ref_count);
++ mutex_lock(&(isp_obj.isp_mutex));
++ if (isp_obj.ref_count) {
++ if (--isp_obj.ref_count == 0) {
++ isp_save_ctx();
++ isp_tmp_buf_free();
++ isp_release_resources();
++ isp_obj.module.isp_pipeline = 0;
++ isp_disable_clocks();
++ memset(&ispcroprect, 0, sizeof(ispcroprect));
++ memset(&cur_rect, 0, sizeof(cur_rect));
++ }
++ }
++ mutex_unlock(&(isp_obj.isp_mutex));
++ DPRINTK_ISPCTRL("isp_put: new %d\n", isp_obj.ref_count);
++ return isp_obj.ref_count;
++}
++EXPORT_SYMBOL(isp_put);
++
++/**
++ * isp_save_context - Saves the values of the ISP module registers.
++ * @reg_list: Structure containing pairs of register address and value to
++ * modify on OMAP.
++ **/
++void isp_save_context(struct isp_reg *reg_list)
++{
++ struct isp_reg *next = reg_list;
++
++ for (; next->reg != ISP_TOK_TERM; next++)
++ next->val = isp_reg_readl(next->mmio_range, next->reg);
++}
++EXPORT_SYMBOL(isp_save_context);
++
++/**
++ * isp_restore_context - Restores the values of the ISP module registers.
++ * @reg_list: Structure containing pairs of register address and value to
++ * modify on OMAP.
++ **/
++void isp_restore_context(struct isp_reg *reg_list)
++{
++ struct isp_reg *next = reg_list;
++
++ for (; next->reg != ISP_TOK_TERM; next++)
++ isp_reg_writel(next->val, next->mmio_range, next->reg);
++}
++EXPORT_SYMBOL(isp_restore_context);
++
++static int isp_remove(struct platform_device *pdev)
++{
++ struct isp_device *isp = platform_get_drvdata(pdev);
++ int i;
++
++ isp_csi2_cleanup();
++ isp_af_exit();
++ isp_resizer_cleanup();
++ isp_preview_cleanup();
++ ispmmu_cleanup();
++ isph3a_aewb_cleanup();
++ isp_hist_cleanup();
++ isp_ccdc_cleanup();
++
++ if (!isp)
++ return 0;
++
++ clk_put(isp_obj.cam_ick);
++ clk_put(isp_obj.cam_mclk);
++ clk_put(isp_obj.csi2_fck);
++
++ free_irq(isp->irq, &isp_obj);
++
++ for (i = 0; i <= OMAP3_ISP_IOMEM_CSI2PHY; i++) {
++ if (isp->mmio_base[i]) {
++ iounmap((void *)isp->mmio_base[i]);
++ isp->mmio_base[i] = 0;
++ }
++
++ if (isp->mmio_base_phys[i]) {
++ release_mem_region(isp->mmio_base_phys[i],
++ isp->mmio_size[i]);
++ isp->mmio_base_phys[i] = 0;
++ }
++ }
++
++ omap3isp = NULL;
++
++ kfree(isp);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++
++static int isp_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ int reset;
++
++ mutex_lock(&(isp_obj.isp_mutex));
++ DPRINTK_ISPCTRL("isp_suspend: starting\n");
++ if (isp_obj.ref_count == 0)
++ goto out;
++
++ isp_disable_interrupts();
++ reset = isp_suspend_modules();
++ isp_save_ctx();
++ if (reset)
++ isp_reset();
++
++ isp_disable_clocks();
++
++out:
++ DPRINTK_ISPCTRL("isp_suspend: done\n");
++ mutex_unlock(&(isp_obj.isp_mutex));
++ return 0;
++}
++
++static int isp_resume(struct platform_device *pdev)
++{
++ int ret_err = 0;
++
++ DPRINTK_ISPCTRL("isp_resume: starting\n");
++
++ if (omap3isp == NULL)
++ goto out;
++
++ if (isp_obj.ref_count >= 0) {
++ ret_err = isp_enable_clocks();
++ if (ret_err)
++ goto out;
++ isp_restore_ctx();
++ isp_resume_modules();
++ isp_enable_interrupts(RAW_CAPTURE(&isp_obj));
++ isp_start();
++ }
++
++out:
++ DPRINTK_ISPCTRL("isp_resume: done \n");
++ return ret_err;
++}
++
++#else
++
++#define isp_suspend NULL
++#define isp_resume NULL
++
++#endif /* CONFIG_PM */
++
++
++static int isp_probe(struct platform_device *pdev)
++{
++ struct isp_device *isp;
++ int ret_err = 0;
++ int i;
++
++ isp = kzalloc(sizeof(*isp), GFP_KERNEL);
++ if (!isp) {
++ dev_err(&pdev->dev, "could not allocate memory\n");
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, isp);
++
++ isp->dev = &pdev->dev;
++
++ for (i = 0; i <= OMAP3_ISP_IOMEM_CSI2PHY; i++) {
++ struct resource *mem;
++ /* request the mem region for the camera registers */
++ mem = platform_get_resource(pdev, IORESOURCE_MEM, i);
++ if (!mem) {
++ dev_err(isp->dev, "no mem resource?\n");
++ return -ENODEV;
++ }
++
++ if (!request_mem_region(mem->start, mem->end - mem->start + 1,
++ pdev->name)) {
++ dev_err(isp->dev,
++ "cannot reserve camera register I/O region\n");
++ return -ENODEV;
++
++ }
++ isp->mmio_base_phys[i] = mem->start;
++ isp->mmio_size[i] = mem->end - mem->start + 1;
++
++ /* map the region */
++ isp->mmio_base[i] = (unsigned long)
++ ioremap_nocache(isp->mmio_base_phys[i],
++ isp->mmio_size[i]);
++ if (!isp->mmio_base[i]) {
++ dev_err(isp->dev,
++ "cannot map camera register I/O region\n");
++ return -ENODEV;
++ }
++ }
++
++ isp->irq = platform_get_irq(pdev, 0);
++ if (isp->irq <= 0) {
++ dev_err(isp->dev, "no irq for camera?\n");
++ return -ENODEV;
++ }
++
++ isp_obj.cam_ick = clk_get(&camera_dev, "cam_ick");
++ if (IS_ERR(isp_obj.cam_ick)) {
++ DPRINTK_ISPCTRL("ISP_ERR: clk_get for "
++ "cam_ick failed\n");
++ return PTR_ERR(isp_obj.cam_ick);
++ }
++ isp_obj.cam_mclk = clk_get(&camera_dev, "cam_mclk");
++ if (IS_ERR(isp_obj.cam_mclk)) {
++ DPRINTK_ISPCTRL("ISP_ERR: clk_get for "
++ "cam_mclk failed\n");
++ ret_err = PTR_ERR(isp_obj.cam_mclk);
++ goto out_clk_get_mclk;
++ }
++ isp_obj.csi2_fck = clk_get(&camera_dev, "csi2_96m_fck");
++ if (IS_ERR(isp_obj.csi2_fck)) {
++ DPRINTK_ISPCTRL("ISP_ERR: clk_get for csi2_fclk"
++ " failed\n");
++ ret_err = PTR_ERR(isp_obj.csi2_fck);
++ goto out_clk_get_csi2_fclk;
++ }
++
++ if (request_irq(isp->irq, omap34xx_isp_isr, IRQF_SHARED,
++ "Omap 3 Camera ISP", &isp_obj)) {
++ DPRINTK_ISPCTRL("Could not install ISR\n");
++ ret_err = -EINVAL;
++ goto out_request_irq;
++ }
++
++ isp_obj.ref_count = 0;
++
++ mutex_init(&(isp_obj.isp_mutex));
++ spin_lock_init(&isp_obj.lock);
++ spin_lock_init(&isp_obj.bufs.lock);
++
++ omap3isp = isp;
++
++ ret_err = ispmmu_init();
++ if (ret_err)
++ goto out_ispmmu_init;
++
++ isp_ccdc_init();
++ isp_hist_init();
++ isph3a_aewb_init();
++ isp_preview_init();
++ isp_resizer_init();
++ isp_af_init();
++ isp_csi2_init();
++
++ isp_get();
++ isp_power_settings(1);
++ isp_put();
++
++ isph3a_notify(1);
++ isp_af_notify(1);
++
++ return 0;
++
++out_ispmmu_init:
++ omap3isp = NULL;
++ free_irq(isp->irq, &isp_obj);
++out_request_irq:
++ clk_put(isp_obj.csi2_fck);
++out_clk_get_csi2_fclk:
++ clk_put(isp_obj.cam_mclk);
++out_clk_get_mclk:
++ clk_put(isp_obj.cam_ick);
++
++ return ret_err;
++}
++
++static struct platform_driver omap3isp_driver = {
++ .probe = isp_probe,
++ .remove = isp_remove,
++ .suspend = isp_suspend,
++ .resume = isp_resume,
++ .driver = {
++ .name = "omap3isp",
++ },
++};
++
++/**
++ * isp_init - ISP module initialization.
++ **/
++static int __init isp_init(void)
++{
++ return platform_driver_register(&omap3isp_driver);
++}
++
++/**
++ * isp_cleanup - ISP module cleanup.
++ **/
++static void __exit isp_cleanup(void)
++{
++ platform_driver_unregister(&omap3isp_driver);
++}
++
++/**
++ * isp_print_status - Prints the values of the ISP Control Module registers
++ *
++ * Also prints other debug information stored in the ISP module structure.
++ **/
++void isp_print_status(void)
++{
++ if (!is_ispctrl_debug_enabled())
++ return;
++
++ DPRINTK_ISPCTRL("###ISP_CTRL=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL));
++ DPRINTK_ISPCTRL("###ISP_TCTRL_CTRL=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_CTRL));
++ DPRINTK_ISPCTRL("###ISP_SYSCONFIG=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_SYSCONFIG));
++ DPRINTK_ISPCTRL("###ISP_SYSSTATUS=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_SYSSTATUS));
++ DPRINTK_ISPCTRL("###ISP_IRQ0ENABLE=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE));
++ DPRINTK_ISPCTRL("###ISP_IRQ0STATUS=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS));
++}
++EXPORT_SYMBOL(isp_print_status);
++
++module_init(isp_init);
++module_exit(isp_cleanup);
++
++MODULE_AUTHOR("Texas Instruments");
++MODULE_DESCRIPTION("ISP Control Module Library");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/media/video/isp/isp.h b/drivers/media/video/isp/isp.h
+new file mode 100644
+index 0000000..55c98a9
+--- /dev/null
++++ b/drivers/media/video/isp/isp.h
+@@ -0,0 +1,318 @@
++/*
++ * isp.h
++ *
++ * Top level public header file for ISP Control module in
++ * TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments.
++ * Copyright (C) 2009 Nokia.
++ *
++ * Contributors:
++ * Sameer Venkatraman <sameerv@ti.com>
++ * Mohit Jalori <mjalori@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_TOP_H
++#define OMAP_ISP_TOP_H
++#include <mach/cpu.h>
++#include <media/videobuf-dma-sg.h>
++#include <linux/videodev2.h>
++#define OMAP_ISP_CCDC (1 << 0)
++#define OMAP_ISP_PREVIEW (1 << 1)
++#define OMAP_ISP_RESIZER (1 << 2)
++#define OMAP_ISP_AEWB (1 << 3)
++#define OMAP_ISP_AF (1 << 4)
++#define OMAP_ISP_HIST (1 << 5)
++
++#define ISP_TOK_TERM 0xFFFFFFFF /*
++ * terminating token for ISP
++ * modules reg list
++ */
++#define NUM_BUFS VIDEO_MAX_FRAME
++
++#ifndef CONFIG_ARCH_OMAP3410
++#define USE_ISP_PREVIEW
++#define USE_ISP_RESZ
++#define is_isppreview_enabled() 1
++#define is_ispresizer_enabled() 1
++#else
++#define is_isppreview_enabled() 0
++#define is_ispresizer_enabled() 0
++#endif
++
++#define ISP_BYTES_PER_PIXEL 2
++#define NUM_ISP_CAPTURE_FORMATS (sizeof(isp_formats) / \
++ sizeof(isp_formats[0]))
++typedef int (*isp_vbq_callback_ptr) (struct videobuf_buffer *vb);
++typedef void (*isp_callback_t) (unsigned long status,
++ isp_vbq_callback_ptr arg1, void *arg2);
++
++enum isp_mem_resources {
++ OMAP3_ISP_IOMEM_MAIN,
++ OMAP3_ISP_IOMEM_CBUFF,
++ OMAP3_ISP_IOMEM_CCP2,
++ OMAP3_ISP_IOMEM_CCDC,
++ OMAP3_ISP_IOMEM_HIST,
++ OMAP3_ISP_IOMEM_H3A,
++ OMAP3_ISP_IOMEM_PREV,
++ OMAP3_ISP_IOMEM_RESZ,
++ OMAP3_ISP_IOMEM_SBL,
++ OMAP3_ISP_IOMEM_CSI2A,
++ OMAP3_ISP_IOMEM_CSI2PHY
++};
++
++struct isp_device {
++ struct device *dev;
++
++ /*** platform HW resources ***/
++ unsigned int irq;
++
++#define mmio_base_main mmio_base[OMAP3_ISP_IOMEM_MAIN]
++#define mmio_cbuff_main mmio_base[OMAP3_ISP_IOMEM_CBUFF]
++#define mmio_ccp2_main mmio_base[OMAP3_ISP_IOMEM_CCP2]
++#define mmio_ccdc_main mmio_base[OMAP3_ISP_IOMEM_CCDC]
++#define mmio_hist_main mmio_base[OMAP3_ISP_IOMEM_HIST]
++#define mmio_h3a_main mmio_base[OMAP3_ISP_IOMEM_H3A]
++#define mmio_prev_main mmio_base[OMAP3_ISP_IOMEM_PREV]
++#define mmio_resz_main mmio_base[OMAP3_ISP_IOMEM_RESZ]
++#define mmio_sbl_main mmio_base[OMAP3_ISP_IOMEM_SBL]
++#define mmio_csi2_main mmio_base[OMAP3_ISP_IOMEM_CSI2A]
++#define mmio_csi2phy_main mmio_base[OMAP3_ISP_IOMEM_CSI2PHY]
++ unsigned long mmio_base[OMAP3_ISP_IOMEM_CSI2PHY + 1];
++ unsigned long mmio_base_phys[OMAP3_ISP_IOMEM_CSI2PHY + 1];
++ unsigned long mmio_size[OMAP3_ISP_IOMEM_CSI2PHY + 1];
++};
++
++enum isp_interface_type {
++ ISP_PARLL = 1,
++ ISP_CSIA = 2,
++ ISP_CSIB = 4,
++ ISP_NONE = 8 /* memory input to preview / resizer */
++};
++
++enum isp_irqevents {
++ CSIA = 0x01,
++ CSIB = 0x10,
++ CCDC_VD0 = 0x100,
++ CCDC_VD1 = 0x200,
++ CCDC_VD2 = 0x400,
++ CCDC_ERR = 0x800,
++ H3A_AWB_DONE = 0x2000,
++ H3A_AF_DONE = 0x1000,
++ HIST_DONE = 0x10000,
++ PREV_DONE = 0x100000,
++ LSC_DONE = 0x20000,
++ LSC_PRE_COMP = 0x40000,
++ LSC_PRE_ERR = 0x80000,
++ RESZ_DONE = 0x1000000,
++ SBL_OVF = 0x2000000,
++ MMU_ERR = 0x10000000,
++ OCP_ERR = 0x20000000,
++ HS_VS = 0x80000000
++};
++
++enum isp_callback_type {
++ CBK_CCDC_VD0,
++ CBK_CCDC_VD1,
++ CBK_PREV_DONE,
++ CBK_RESZ_DONE,
++ CBK_MMU_ERR,
++ CBK_H3A_AWB_DONE,
++ CBK_HIST_DONE,
++ CBK_HS_VS,
++ CBK_LSC_ISR,
++ CBK_H3A_AF_DONE,
++ CBK_CATCHALL,
++ CBK_CSIA,
++ CBK_CSIB,
++ CBK_END,
++};
++
++/**
++ * struct isp_reg - Structure for ISP register values.
++ * @reg: 32-bit Register address.
++ * @val: 32-bit Register value.
++ */
++struct isp_reg {
++ enum isp_mem_resources mmio_range;
++ u32 reg;
++ u32 val;
++};
++
++/**
++ * struct isp_interface_config - ISP interface configuration.
++ * @ccdc_par_ser: ISP interface type. 0 - Parallel, 1 - CSIA, 2 - CSIB to CCDC.
++ * @par_bridge: CCDC Bridge input control. Parallel interface.
++ * 0 - Disable, 1 - Enable, first byte->cam_d(bits 7 to 0)
++ * 2 - Enable, first byte -> cam_d(bits 15 to 8)
++ * @par_clk_pol: Pixel clock polarity on the parallel interface.
++ * 0 - Non Inverted, 1 - Inverted
++ * @dataline_shift: Data lane shifter.
++ * 0 - No Shift, 1 - CAMEXT[13 to 2]->CAM[11 to 0]
++ * 2 - CAMEXT[13 to 4]->CAM[9 to 0]
++ * 3 - CAMEXT[13 to 6]->CAM[7 to 0]
++ * @hsvs_syncdetect: HS or VS synchronization signal detection.
++ * 0 - HS Falling, 1 - HS rising
++ * 2 - VS falling, 3 - VS rising
++ * @strobe: Strobe related parameter.
++ * @prestrobe: PreStrobe related parameter.
++ * @shutter: Shutter related parameter.
++ * @hskip: Horizontal Start Pixel performed in Preview module.
++ * @vskip: Vertical Start Line performed in Preview module.
++ * @wenlog: Store the value for the sensor specific wenlog field.
++ * @wait_hs_vs: Wait for this many hs_vs before anything else in the beginning.
++ */
++struct isp_interface_config {
++ enum isp_interface_type ccdc_par_ser;
++ u8 dataline_shift;
++ u32 hsvs_syncdetect;
++ int strobe;
++ int prestrobe;
++ int shutter;
++ u32 prev_sph;
++ u32 prev_slv;
++ u32 wenlog;
++ int wait_hs_vs;
++ union {
++ struct par {
++ unsigned par_bridge:2;
++ unsigned par_clk_pol:1;
++ } par;
++ struct csi {
++ unsigned crc:1;
++ unsigned mode:1;
++ unsigned edge:1;
++ unsigned signalling:1;
++ unsigned strobe_clock_inv:1;
++ unsigned vs_edge:1;
++ unsigned channel:3;
++ unsigned vpclk:2; /* Video port output clock */
++ unsigned int data_start;
++ unsigned int data_size;
++ u32 format; /* V4L2_PIX_FMT_* */
++ } csi;
++ } u;
++};
++
++u32 isp_reg_readl(enum isp_mem_resources isp_mmio_range, u32 reg_offset);
++
++void isp_reg_writel(u32 reg_value, enum isp_mem_resources isp_mmio_range,
++ u32 reg_offset);
++
++static inline void isp_reg_and(enum isp_mem_resources mmio_range, u32 reg,
++ u32 and_bits)
++{
++ u32 v = isp_reg_readl(mmio_range, reg);
++
++ isp_reg_writel(v & and_bits, mmio_range, reg);
++}
++
++static inline void isp_reg_or(enum isp_mem_resources mmio_range, u32 reg,
++ u32 or_bits)
++{
++ u32 v = isp_reg_readl(mmio_range, reg);
++
++ isp_reg_writel(v | or_bits, mmio_range, reg);
++}
++
++static inline void isp_reg_and_or(enum isp_mem_resources mmio_range, u32 reg,
++ u32 and_bits, u32 or_bits)
++{
++ u32 v = isp_reg_readl(mmio_range, reg);
++
++ isp_reg_writel((v & and_bits) | or_bits, mmio_range, reg);
++}
++
++void isp_start(void);
++
++void isp_stop(void);
++
++int isp_buf_queue(struct videobuf_buffer *vb,
++ void (*complete)(struct videobuf_buffer *vb, void *priv),
++ void *priv);
++
++int isp_vbq_setup(struct videobuf_queue *vbq, unsigned int *cnt,
++ unsigned int *size);
++
++int isp_vbq_prepare(struct videobuf_queue *vbq, struct videobuf_buffer *vb,
++ enum v4l2_field field);
++
++void isp_vbq_release(struct videobuf_queue *vbq, struct videobuf_buffer *vb);
++
++int isp_set_callback(enum isp_callback_type type, isp_callback_t callback,
++ isp_vbq_callback_ptr arg1, void *arg2);
++
++int isp_unset_callback(enum isp_callback_type type);
++
++u32 isp_set_xclk(u32 xclk, u8 xclksel);
++
++int isp_configure_interface(struct isp_interface_config *config);
++
++int isp_get(void);
++
++int isp_put(void);
++
++int isp_queryctrl(struct v4l2_queryctrl *a);
++
++int isp_querymenu(struct v4l2_querymenu *a);
++
++int isp_g_ctrl(struct v4l2_control *a);
++
++int isp_s_ctrl(struct v4l2_control *a);
++
++int isp_enum_fmt_cap(struct v4l2_fmtdesc *f);
++
++int isp_try_fmt_cap(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output);
++
++void isp_g_fmt_cap(struct v4l2_pix_format *pix);
++
++int isp_s_fmt_cap(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output);
++
++int isp_g_crop(struct v4l2_crop *a);
++
++int isp_s_crop(struct v4l2_crop *a, struct v4l2_pix_format *pix);
++
++void isp_config_crop(struct v4l2_pix_format *pix);
++
++int isp_try_fmt(struct v4l2_pix_format *pix_input,
++ struct v4l2_pix_format *pix_output);
++
++int isp_handle_private(int cmd, void *arg);
++
++void isp_save_context(struct isp_reg *);
++
++void isp_restore_context(struct isp_reg *);
++
++void isp_print_status(void);
++
++int __init isp_ccdc_init(void);
++int __init isp_hist_init(void);
++int __init isph3a_aewb_init(void);
++int __init isp_preview_init(void);
++int __init isp_resizer_init(void);
++int __init isp_af_init(void);
++int __init isp_csi2_init(void);
++
++void isp_ccdc_cleanup(void);
++void isp_hist_cleanup(void);
++void isph3a_aewb_cleanup(void);
++void isp_preview_cleanup(void);
++void isp_hist_cleanup(void);
++void isp_resizer_cleanup(void);
++void isp_af_exit(void);
++void isp_csi2_cleanup(void);
++
++#endif /* OMAP_ISP_TOP_H */
+diff --git a/drivers/media/video/isp/ispreg.h b/drivers/media/video/isp/ispreg.h
+new file mode 100644
+index 0000000..4f8e1ef
+--- /dev/null
++++ b/drivers/media/video/isp/ispreg.h
+@@ -0,0 +1,1674 @@
++/*
++ * ispreg.h
++ *
++ * Header file for all the ISP module in TI's OMAP3 Camera ISP.
++ * It has the OMAP HW register definitions.
++ *
++ * Copyright (C) 2009 Texas Instruments.
++ * Copyright (C) 2009 Nokia.
++ *
++ * Contributors:
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ * Thara Gopinath <thara@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef __ISPREG_H__
++#define __ISPREG_H__
++
++#include <mach/omap34xx.h>
++
++/* Note: Uncomment below defines as needed for enabling module specific debug
++ * messages
++ */
++
++/*
++ #define OMAP_ISPCTRL_DEBUG
++ #define OMAP_ISPCCDC_DEBUG
++ #define OMAP_ISPPREV_DEBUG
++ #define OMAP_ISPRESZ_DEBUG
++ #define OMAP_ISPMMU_DEBUG
++ #define OMAP_ISPH3A_DEBUG
++ #define OMAP_ISP_AF_DEBUG
++ #define OMAP_ISPHIST_DEBUG
++*/
++
++#ifdef OMAP_ISPCTRL_DEBUG
++#define DPRINTK_ISPCTRL(format, ...) \
++ printk(KERN_INFO "ISPCTRL: " format, ## __VA_ARGS__)
++#define is_ispctrl_debug_enabled() 1
++#else
++#define DPRINTK_ISPCTRL(format, ...)
++#define is_ispctrl_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISPCCDC_DEBUG
++#define DPRINTK_ISPCCDC(format, ...) \
++ printk(KERN_INFO "ISPCCDC: " format, ## __VA_ARGS__)
++#define is_ispccdc_debug_enabled() 1
++#else
++#define DPRINTK_ISPCCDC(format, ...)
++#define is_ispccdc_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISPPREV_DEBUG
++#define DPRINTK_ISPPREV(format, ...) \
++ printk(KERN_INFO "ISPPREV: " format, ## __VA_ARGS__)
++#define is_ispprev_debug_enabled() 1
++#else
++#define DPRINTK_ISPPREV(format, ...)
++#define is_ispprev_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISPRESZ_DEBUG
++#define DPRINTK_ISPRESZ(format, ...) \
++ printk(KERN_INFO "ISPRESZ: " format, ## __VA_ARGS__)
++#define is_ispresz_debug_enabled() 1
++#else
++#define DPRINTK_ISPRESZ(format, ...)
++#define is_ispresz_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISPMMU_DEBUG
++#define DPRINTK_ISPMMU(format, ...) \
++ printk(KERN_INFO "ISPMMU: " format, ## __VA_ARGS__)
++#define is_ispmmu_debug_enabled() 1
++#else
++#define DPRINTK_ISPMMU(format, ...)
++#define is_ispmmu_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISPH3A_DEBUG
++#define DPRINTK_ISPH3A(format, ...) \
++ printk(KERN_INFO "ISPH3A: " format, ## __VA_ARGS__)
++#define is_isph3a_debug_enabled() 1
++#else
++#define DPRINTK_ISPH3A(format, ...)
++#define is_isph3a_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISP_AF_DEBUG
++#define DPRINTK_ISP_AF(format, ...) \
++ printk(KERN_INFO "ISP_AF: " format, ## __VA_ARGS__)
++#define is_isp_af_debug_enabled() 1
++#else
++#define DPRINTK_ISP_AF(format, ...)
++#define is_isp_af_debug_enabled() 0
++#endif
++
++#ifdef OMAP_ISPHIST_DEBUG
++#define DPRINTK_ISPHIST(format, ...) \
++ printk(KERN_INFO "ISPHIST: " format, ## __VA_ARGS__)
++#define is_isphist_debug_enabled() 1
++#else
++#define DPRINTK_ISPHIST(format, ...)
++#define is_isphist_debug_enabled() 0
++#endif
++
++#define ISP_32B_BOUNDARY_BUF 0xFFFFFFE0
++#define ISP_32B_BOUNDARY_OFFSET 0x0000FFE0
++
++#define CM_CAM_MCLK_HZ 216000000
++
++/* ISP Submodules offset */
++
++#define OMAP3ISP_REG_BASE OMAP3430_ISP_BASE
++#define OMAP3ISP_REG(offset) (OMAP3ISP_REG_BASE + (offset))
++
++#define OMAP3ISP_CBUFF_REG_OFFSET 0x0100
++#define OMAP3ISP_CBUFF_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_CBUFF_REG_OFFSET)
++#define OMAP3ISP_CBUFF_REG(offset) (OMAP3ISP_CBUFF_REG_BASE + (offset))
++
++#define OMAP3ISP_CCP2_REG_OFFSET 0x0400
++#define OMAP3ISP_CCP2_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_CCP2_REG_OFFSET)
++#define OMAP3ISP_CCP2_REG(offset) (OMAP3ISP_CCP2_REG_BASE + (offset))
++
++#define OMAP3ISP_CCDC_REG_OFFSET 0x0600
++#define OMAP3ISP_CCDC_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_CCDC_REG_OFFSET)
++#define OMAP3ISP_CCDC_REG(offset) (OMAP3ISP_CCDC_REG_BASE + (offset))
++
++#define OMAP3ISP_HIST_REG_OFFSET 0x0A00
++#define OMAP3ISP_HIST_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_HIST_REG_OFFSET)
++#define OMAP3ISP_HIST_REG(offset) (OMAP3ISP_HIST_REG_BASE + (offset))
++
++#define OMAP3ISP_H3A_REG_OFFSET 0x0C00
++#define OMAP3ISP_H3A_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_H3A_REG_OFFSET)
++#define OMAP3ISP_H3A_REG(offset) (OMAP3ISP_H3A_REG_BASE + (offset))
++
++#define OMAP3ISP_PREV_REG_OFFSET 0x0E00
++#define OMAP3ISP_PREV_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_PREV_REG_OFFSET)
++#define OMAP3ISP_PREV_REG(offset) (OMAP3ISP_PREV_REG_BASE + (offset))
++
++#define OMAP3ISP_RESZ_REG_OFFSET 0x1000
++#define OMAP3ISP_RESZ_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_RESZ_REG_OFFSET)
++#define OMAP3ISP_RESZ_REG(offset) (OMAP3ISP_RESZ_REG_BASE + (offset))
++
++#define OMAP3ISP_SBL_REG_OFFSET 0x1200
++#define OMAP3ISP_SBL_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_SBL_REG_OFFSET)
++#define OMAP3ISP_SBL_REG(offset) (OMAP3ISP_SBL_REG_BASE + (offset))
++
++#define OMAP3ISP_MMU_REG_OFFSET 0x1400
++#define OMAP3ISP_MMU_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_MMU_REG_OFFSET)
++#define OMAP3ISP_MMU_REG(offset) (OMAP3ISP_MMU_REG_BASE + (offset))
++
++#define OMAP3ISP_CSI2A_REG_OFFSET 0x1800
++#define OMAP3ISP_CSI2A_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_CSI2A_REG_OFFSET)
++#define OMAP3ISP_CSI2A_REG(offset) (OMAP3ISP_CSI2A_REG_BASE + (offset))
++
++#define OMAP3ISP_CSI2PHY_REG_OFFSET 0x1970
++#define OMAP3ISP_CSI2PHY_REG_BASE (OMAP3ISP_REG_BASE + \
++ OMAP3ISP_CSI2PHY_REG_OFFSET)
++#define OMAP3ISP_CSI2PHY_REG(offset) (OMAP3ISP_CSI2PHY_REG_BASE + (offset))
++
++/* ISP module register offset */
++
++#define ISP_REVISION (0x000)
++#define ISP_SYSCONFIG (0x004)
++#define ISP_SYSSTATUS (0x008)
++#define ISP_IRQ0ENABLE (0x00C)
++#define ISP_IRQ0STATUS (0x010)
++#define ISP_IRQ1ENABLE (0x014)
++#define ISP_IRQ1STATUS (0x018)
++#define ISP_TCTRL_GRESET_LENGTH (0x030)
++#define ISP_TCTRL_PSTRB_REPLAY (0x034)
++#define ISP_CTRL (0x040)
++#define ISP_SECURE (0x044)
++#define ISP_TCTRL_CTRL (0x050)
++#define ISP_TCTRL_FRAME (0x054)
++#define ISP_TCTRL_PSTRB_DELAY (0x058)
++#define ISP_TCTRL_STRB_DELAY (0x05C)
++#define ISP_TCTRL_SHUT_DELAY (0x060)
++#define ISP_TCTRL_PSTRB_LENGTH (0x064)
++#define ISP_TCTRL_STRB_LENGTH (0x068)
++#define ISP_TCTRL_SHUT_LENGTH (0x06C)
++#define ISP_PING_PONG_ADDR (0x070)
++#define ISP_PING_PONG_MEM_RANGE (0x074)
++#define ISP_PING_PONG_BUF_SIZE (0x078)
++
++/* CSI1 receiver registers (ES2.0) */
++#define ISPCSI1_REVISION (0x000)
++#define ISPCSI1_SYSCONFIG (0x004)
++#define ISPCSI1_SYSSTATUS (0x008)
++#define ISPCSI1_LC01_IRQENABLE (0x00C)
++#define ISPCSI1_LC01_IRQSTATUS (0x010)
++#define ISPCSI1_LC23_IRQENABLE (0x014)
++#define ISPCSI1_LC23_IRQSTATUS (0x018)
++#define ISPCSI1_LCM_IRQENABLE (0x02C)
++#define ISPCSI1_LCM_IRQSTATUS (0x030)
++#define ISPCSI1_CTRL (0x040)
++#define ISPCSI1_DBG (0x044)
++#define ISPCSI1_GNQ (0x048)
++#define ISPCSI1_LCx_CTRL(x) ((0x050)+0x30*(x))
++#define ISPCSI1_LCx_CODE(x) ((0x054)+0x30*(x))
++#define ISPCSI1_LCx_STAT_START(x) ((0x058)+0x30*(x))
++#define ISPCSI1_LCx_STAT_SIZE(x) ((0x05C)+0x30*(x))
++#define ISPCSI1_LCx_SOF_ADDR(x) ((0x060)+0x30*(x))
++#define ISPCSI1_LCx_EOF_ADDR(x) ((0x064)+0x30*(x))
++#define ISPCSI1_LCx_DAT_START(x) ((0x068)+0x30*(x))
++#define ISPCSI1_LCx_DAT_SIZE(x) ((0x06C)+0x30*(x))
++#define ISPCSI1_LCx_DAT_PING_ADDR(x) ((0x070)+0x30*(x))
++#define ISPCSI1_LCx_DAT_PONG_ADDR(x) ((0x074)+0x30*(x))
++#define ISPCSI1_LCx_DAT_OFST(x) ((0x078)+0x30*(x))
++#define ISPCSI1_LCM_CTRL (0x1D0)
++#define ISPCSI1_LCM_VSIZE (0x1D4)
++#define ISPCSI1_LCM_HSIZE (0x1D8)
++#define ISPCSI1_LCM_PREFETCH (0x1DC)
++#define ISPCSI1_LCM_SRC_ADDR (0x1E0)
++#define ISPCSI1_LCM_SRC_OFST (0x1E4)
++#define ISPCSI1_LCM_DST_ADDR (0x1E8)
++#define ISPCSI1_LCM_DST_OFST (0x1EC)
++#define ISP_CSIB_SYSCONFIG ISPCSI1_SYSCONFIG
++#define ISP_CSIA_SYSCONFIG ISPCSI2_SYSCONFIG
++
++/* ISP_CBUFF Registers */
++
++#define ISP_CBUFF_SYSCONFIG (0x010)
++#define ISP_CBUFF_IRQENABLE (0x01C)
++
++#define ISP_CBUFF0_CTRL (0x020)
++#define ISP_CBUFF1_CTRL (0x024)
++
++#define ISP_CBUFF0_START (0x040)
++#define ISP_CBUFF1_START (0x044)
++
++#define ISP_CBUFF0_END (0x050)
++#define ISP_CBUFF1_END (0x054)
++
++#define ISP_CBUFF0_WINDOWSIZE (0x060)
++#define ISP_CBUFF1_WINDOWSIZE (0x064)
++
++#define ISP_CBUFF0_THRESHOLD (0x070)
++#define ISP_CBUFF1_THRESHOLD (0x074)
++
++/* CCDC module register offset */
++
++#define ISPCCDC_PID (0x000)
++#define ISPCCDC_PCR (0x004)
++#define ISPCCDC_SYN_MODE (0x008)
++#define ISPCCDC_HD_VD_WID (0x00C)
++#define ISPCCDC_PIX_LINES (0x010)
++#define ISPCCDC_HORZ_INFO (0x014)
++#define ISPCCDC_VERT_START (0x018)
++#define ISPCCDC_VERT_LINES (0x01C)
++#define ISPCCDC_CULLING (0x020)
++#define ISPCCDC_HSIZE_OFF (0x024)
++#define ISPCCDC_SDOFST (0x028)
++#define ISPCCDC_SDR_ADDR (0x02C)
++#define ISPCCDC_CLAMP (0x030)
++#define ISPCCDC_DCSUB (0x034)
++#define ISPCCDC_COLPTN (0x038)
++#define ISPCCDC_BLKCMP (0x03C)
++#define ISPCCDC_FPC (0x040)
++#define ISPCCDC_FPC_ADDR (0x044)
++#define ISPCCDC_VDINT (0x048)
++#define ISPCCDC_ALAW (0x04C)
++#define ISPCCDC_REC656IF (0x050)
++#define ISPCCDC_CFG (0x054)
++#define ISPCCDC_FMTCFG (0x058)
++#define ISPCCDC_FMT_HORZ (0x05C)
++#define ISPCCDC_FMT_VERT (0x060)
++#define ISPCCDC_FMT_ADDR0 (0x064)
++#define ISPCCDC_FMT_ADDR1 (0x068)
++#define ISPCCDC_FMT_ADDR2 (0x06C)
++#define ISPCCDC_FMT_ADDR3 (0x070)
++#define ISPCCDC_FMT_ADDR4 (0x074)
++#define ISPCCDC_FMT_ADDR5 (0x078)
++#define ISPCCDC_FMT_ADDR6 (0x07C)
++#define ISPCCDC_FMT_ADDR7 (0x080)
++#define ISPCCDC_PRGEVEN0 (0x084)
++#define ISPCCDC_PRGEVEN1 (0x088)
++#define ISPCCDC_PRGODD0 (0x08C)
++#define ISPCCDC_PRGODD1 (0x090)
++#define ISPCCDC_VP_OUT (0x094)
++
++#define ISPCCDC_LSC_CONFIG (0x098)
++#define ISPCCDC_LSC_INITIAL (0x09C)
++#define ISPCCDC_LSC_TABLE_BASE (0x0A0)
++#define ISPCCDC_LSC_TABLE_OFFSET (0x0A4)
++
++/* SBL */
++#define ISPSBL_CCDC_WR_0 (0x028)
++#define ISPSBL_CCDC_WR_0_DATA_READY (1 << 21)
++#define ISPSBL_CCDC_WR_1 (0x02C)
++#define ISPSBL_CCDC_WR_2 (0x030)
++#define ISPSBL_CCDC_WR_3 (0x034)
++
++/* Histogram registers */
++#define ISPHIST_PID (0x000)
++#define ISPHIST_PCR (0x004)
++#define ISPHIST_CNT (0x008)
++#define ISPHIST_WB_GAIN (0x00C)
++#define ISPHIST_R0_HORZ (0x010)
++#define ISPHIST_R0_VERT (0x014)
++#define ISPHIST_R1_HORZ (0x018)
++#define ISPHIST_R1_VERT (0x01C)
++#define ISPHIST_R2_HORZ (0x020)
++#define ISPHIST_R2_VERT (0x024)
++#define ISPHIST_R3_HORZ (0x028)
++#define ISPHIST_R3_VERT (0x02C)
++#define ISPHIST_ADDR (0x030)
++#define ISPHIST_DATA (0x034)
++#define ISPHIST_RADD (0x038)
++#define ISPHIST_RADD_OFF (0x03C)
++#define ISPHIST_H_V_INFO (0x040)
++
++/* H3A module registers */
++#define ISPH3A_PID (0x000)
++#define ISPH3A_PCR (0x004)
++#define ISPH3A_AEWWIN1 (0x04C)
++#define ISPH3A_AEWINSTART (0x050)
++#define ISPH3A_AEWINBLK (0x054)
++#define ISPH3A_AEWSUBWIN (0x058)
++#define ISPH3A_AEWBUFST (0x05C)
++#define ISPH3A_AFPAX1 (0x008)
++#define ISPH3A_AFPAX2 (0x00C)
++#define ISPH3A_AFPAXSTART (0x010)
++#define ISPH3A_AFIIRSH (0x014)
++#define ISPH3A_AFBUFST (0x018)
++#define ISPH3A_AFCOEF010 (0x01C)
++#define ISPH3A_AFCOEF032 (0x020)
++#define ISPH3A_AFCOEF054 (0x024)
++#define ISPH3A_AFCOEF076 (0x028)
++#define ISPH3A_AFCOEF098 (0x02C)
++#define ISPH3A_AFCOEF0010 (0x030)
++#define ISPH3A_AFCOEF110 (0x034)
++#define ISPH3A_AFCOEF132 (0x038)
++#define ISPH3A_AFCOEF154 (0x03C)
++#define ISPH3A_AFCOEF176 (0x040)
++#define ISPH3A_AFCOEF198 (0x044)
++#define ISPH3A_AFCOEF1010 (0x048)
++
++#define ISPPRV_PCR (0x004)
++#define ISPPRV_HORZ_INFO (0x008)
++#define ISPPRV_VERT_INFO (0x00C)
++#define ISPPRV_RSDR_ADDR (0x010)
++#define ISPPRV_RADR_OFFSET (0x014)
++#define ISPPRV_DSDR_ADDR (0x018)
++#define ISPPRV_DRKF_OFFSET (0x01C)
++#define ISPPRV_WSDR_ADDR (0x020)
++#define ISPPRV_WADD_OFFSET (0x024)
++#define ISPPRV_AVE (0x028)
++#define ISPPRV_HMED (0x02C)
++#define ISPPRV_NF (0x030)
++#define ISPPRV_WB_DGAIN (0x034)
++#define ISPPRV_WBGAIN (0x038)
++#define ISPPRV_WBSEL (0x03C)
++#define ISPPRV_CFA (0x040)
++#define ISPPRV_BLKADJOFF (0x044)
++#define ISPPRV_RGB_MAT1 (0x048)
++#define ISPPRV_RGB_MAT2 (0x04C)
++#define ISPPRV_RGB_MAT3 (0x050)
++#define ISPPRV_RGB_MAT4 (0x054)
++#define ISPPRV_RGB_MAT5 (0x058)
++#define ISPPRV_RGB_OFF1 (0x05C)
++#define ISPPRV_RGB_OFF2 (0x060)
++#define ISPPRV_CSC0 (0x064)
++#define ISPPRV_CSC1 (0x068)
++#define ISPPRV_CSC2 (0x06C)
++#define ISPPRV_CSC_OFFSET (0x070)
++#define ISPPRV_CNT_BRT (0x074)
++#define ISPPRV_CSUP (0x078)
++#define ISPPRV_SETUP_YC (0x07C)
++#define ISPPRV_SET_TBL_ADDR (0x080)
++#define ISPPRV_SET_TBL_DATA (0x084)
++#define ISPPRV_CDC_THR0 (0x090)
++#define ISPPRV_CDC_THR1 (ISPPRV_CDC_THR0 + (0x4))
++#define ISPPRV_CDC_THR2 (ISPPRV_CDC_THR0 + (0x4) * 2)
++#define ISPPRV_CDC_THR3 (ISPPRV_CDC_THR0 + (0x4) * 3)
++
++#define ISPPRV_REDGAMMA_TABLE_ADDR 0x0000
++#define ISPPRV_GREENGAMMA_TABLE_ADDR 0x0400
++#define ISPPRV_BLUEGAMMA_TABLE_ADDR 0x0800
++#define ISPPRV_NF_TABLE_ADDR 0x0C00
++#define ISPPRV_YENH_TABLE_ADDR 0x1000
++#define ISPPRV_CFA_TABLE_ADDR 0x1400
++
++#define ISPPRV_MAXOUTPUT_WIDTH 1280
++#define ISPPRV_MAXOUTPUT_WIDTH_ES2 3300
++#define ISPRSZ_MIN_OUTPUT 64
++#define ISPRSZ_MAX_OUTPUT 3312
++
++/* Resizer module register offset */
++#define ISPRSZ_PID (0x000)
++#define ISPRSZ_PCR (0x004)
++#define ISPRSZ_CNT (0x008)
++#define ISPRSZ_OUT_SIZE (0x00C)
++#define ISPRSZ_IN_START (0x010)
++#define ISPRSZ_IN_SIZE (0x014)
++#define ISPRSZ_SDR_INADD (0x018)
++#define ISPRSZ_SDR_INOFF (0x01C)
++#define ISPRSZ_SDR_OUTADD (0x020)
++#define ISPRSZ_SDR_OUTOFF (0x024)
++#define ISPRSZ_HFILT10 (0x028)
++#define ISPRSZ_HFILT32 (0x02C)
++#define ISPRSZ_HFILT54 (0x030)
++#define ISPRSZ_HFILT76 (0x034)
++#define ISPRSZ_HFILT98 (0x038)
++#define ISPRSZ_HFILT1110 (0x03C)
++#define ISPRSZ_HFILT1312 (0x040)
++#define ISPRSZ_HFILT1514 (0x044)
++#define ISPRSZ_HFILT1716 (0x048)
++#define ISPRSZ_HFILT1918 (0x04C)
++#define ISPRSZ_HFILT2120 (0x050)
++#define ISPRSZ_HFILT2322 (0x054)
++#define ISPRSZ_HFILT2524 (0x058)
++#define ISPRSZ_HFILT2726 (0x05C)
++#define ISPRSZ_HFILT2928 (0x060)
++#define ISPRSZ_HFILT3130 (0x064)
++#define ISPRSZ_VFILT10 (0x068)
++#define ISPRSZ_VFILT32 (0x06C)
++#define ISPRSZ_VFILT54 (0x070)
++#define ISPRSZ_VFILT76 (0x074)
++#define ISPRSZ_VFILT98 (0x078)
++#define ISPRSZ_VFILT1110 (0x07C)
++#define ISPRSZ_VFILT1312 (0x080)
++#define ISPRSZ_VFILT1514 (0x084)
++#define ISPRSZ_VFILT1716 (0x088)
++#define ISPRSZ_VFILT1918 (0x08C)
++#define ISPRSZ_VFILT2120 (0x090)
++#define ISPRSZ_VFILT2322 (0x094)
++#define ISPRSZ_VFILT2524 (0x098)
++#define ISPRSZ_VFILT2726 (0x09C)
++#define ISPRSZ_VFILT2928 (0x0A0)
++#define ISPRSZ_VFILT3130 (0x0A4)
++#define ISPRSZ_YENH (0x0A8)
++
++/* MMU module registers */
++#define ISPMMU_REVISION (0x000)
++#define ISPMMU_SYSCONFIG (0x010)
++#define ISPMMU_SYSSTATUS (0x014)
++#define ISPMMU_IRQSTATUS (0x018)
++#define ISPMMU_IRQENABLE (0x01C)
++#define ISPMMU_WALKING_ST (0x040)
++#define ISPMMU_CNTL (0x044)
++#define ISPMMU_FAULT_AD (0x048)
++#define ISPMMU_TTB (0x04C)
++#define ISPMMU_LOCK (0x050)
++#define ISPMMU_LD_TLB (0x054)
++#define ISPMMU_CAM (0x058)
++#define ISPMMU_RAM (0x05C)
++#define ISPMMU_GFLUSH (0x060)
++#define ISPMMU_FLUSH_ENTRY (0x064)
++#define ISPMMU_READ_CAM (0x068)
++#define ISPMMU_READ_RAM (0x06c)
++#define ISPMMU_EMU_FAULT_AD (0x070)
++
++#define ISP_INT_CLR 0xFF113F11
++#define ISPPRV_PCR_EN 1
++#define ISPPRV_PCR_BUSY (1 << 1)
++#define ISPPRV_PCR_SOURCE (1 << 2)
++#define ISPPRV_PCR_ONESHOT (1 << 3)
++#define ISPPRV_PCR_WIDTH (1 << 4)
++#define ISPPRV_PCR_INVALAW (1 << 5)
++#define ISPPRV_PCR_DRKFEN (1 << 6)
++#define ISPPRV_PCR_DRKFCAP (1 << 7)
++#define ISPPRV_PCR_HMEDEN (1 << 8)
++#define ISPPRV_PCR_NFEN (1 << 9)
++#define ISPPRV_PCR_CFAEN (1 << 10)
++#define ISPPRV_PCR_CFAFMT_SHIFT 11
++#define ISPPRV_PCR_CFAFMT_MASK 0x7800
++#define ISPPRV_PCR_CFAFMT_BAYER (0 << 11)
++#define ISPPRV_PCR_CFAFMT_SONYVGA (1 << 11)
++#define ISPPRV_PCR_CFAFMT_RGBFOVEON (2 << 11)
++#define ISPPRV_PCR_CFAFMT_DNSPL (3 << 11)
++#define ISPPRV_PCR_CFAFMT_HONEYCOMB (4 << 11)
++#define ISPPRV_PCR_CFAFMT_RRGGBBFOVEON (5 << 11)
++#define ISPPRV_PCR_YNENHEN (1 << 15)
++#define ISPPRV_PCR_SUPEN (1 << 16)
++#define ISPPRV_PCR_YCPOS_SHIFT 17
++#define ISPPRV_PCR_YCPOS_YCrYCb (0 << 17)
++#define ISPPRV_PCR_YCPOS_YCbYCr (1 << 17)
++#define ISPPRV_PCR_YCPOS_CbYCrY (2 << 17)
++#define ISPPRV_PCR_YCPOS_CrYCbY (3 << 17)
++#define ISPPRV_PCR_RSZPORT (1 << 19)
++#define ISPPRV_PCR_SDRPORT (1 << 20)
++#define ISPPRV_PCR_SCOMP_EN (1 << 21)
++#define ISPPRV_PCR_SCOMP_SFT_SHIFT (22)
++#define ISPPRV_PCR_SCOMP_SFT_MASK (~(7 << 22))
++#define ISPPRV_PCR_GAMMA_BYPASS (1 << 26)
++#define ISPPRV_PCR_DCOREN (1 << 27)
++#define ISPPRV_PCR_DCCOUP (1 << 28)
++#define ISPPRV_PCR_DRK_FAIL (1 << 31)
++
++#define ISPPRV_HORZ_INFO_EPH_SHIFT 0
++#define ISPPRV_HORZ_INFO_EPH_MASK 0x3fff
++#define ISPPRV_HORZ_INFO_SPH_SHIFT 16
++#define ISPPRV_HORZ_INFO_SPH_MASK 0x3fff0
++
++#define ISPPRV_VERT_INFO_ELV_SHIFT 0
++#define ISPPRV_VERT_INFO_ELV_MASK 0x3fff
++#define ISPPRV_VERT_INFO_SLV_SHIFT 16
++#define ISPPRV_VERT_INFO_SLV_MASK 0x3fff0
++
++#define ISPPRV_AVE_EVENDIST_SHIFT 2
++#define ISPPRV_AVE_EVENDIST_1 0x0
++#define ISPPRV_AVE_EVENDIST_2 0x1
++#define ISPPRV_AVE_EVENDIST_3 0x2
++#define ISPPRV_AVE_EVENDIST_4 0x3
++#define ISPPRV_AVE_ODDDIST_SHIFT 4
++#define ISPPRV_AVE_ODDDIST_1 0x0
++#define ISPPRV_AVE_ODDDIST_2 0x1
++#define ISPPRV_AVE_ODDDIST_3 0x2
++#define ISPPRV_AVE_ODDDIST_4 0x3
++
++#define ISPPRV_HMED_THRESHOLD_SHIFT 0
++#define ISPPRV_HMED_EVENDIST (1 << 8)
++#define ISPPRV_HMED_ODDDIST (1 << 9)
++
++#define ISPPRV_WBGAIN_COEF0_SHIFT 0
++#define ISPPRV_WBGAIN_COEF1_SHIFT 8
++#define ISPPRV_WBGAIN_COEF2_SHIFT 16
++#define ISPPRV_WBGAIN_COEF3_SHIFT 24
++
++#define ISPPRV_WBSEL_COEF0 0x0
++#define ISPPRV_WBSEL_COEF1 0x1
++#define ISPPRV_WBSEL_COEF2 0x2
++#define ISPPRV_WBSEL_COEF3 0x3
++
++#define ISPPRV_WBSEL_N0_0_SHIFT 0
++#define ISPPRV_WBSEL_N0_1_SHIFT 2
++#define ISPPRV_WBSEL_N0_2_SHIFT 4
++#define ISPPRV_WBSEL_N0_3_SHIFT 6
++#define ISPPRV_WBSEL_N1_0_SHIFT 8
++#define ISPPRV_WBSEL_N1_1_SHIFT 10
++#define ISPPRV_WBSEL_N1_2_SHIFT 12
++#define ISPPRV_WBSEL_N1_3_SHIFT 14
++#define ISPPRV_WBSEL_N2_0_SHIFT 16
++#define ISPPRV_WBSEL_N2_1_SHIFT 18
++#define ISPPRV_WBSEL_N2_2_SHIFT 20
++#define ISPPRV_WBSEL_N2_3_SHIFT 22
++#define ISPPRV_WBSEL_N3_0_SHIFT 24
++#define ISPPRV_WBSEL_N3_1_SHIFT 26
++#define ISPPRV_WBSEL_N3_2_SHIFT 28
++#define ISPPRV_WBSEL_N3_3_SHIFT 30
++
++#define ISPPRV_CFA_GRADTH_HOR_SHIFT 0
++#define ISPPRV_CFA_GRADTH_VER_SHIFT 8
++
++#define ISPPRV_BLKADJOFF_B_SHIFT 0
++#define ISPPRV_BLKADJOFF_G_SHIFT 8
++#define ISPPRV_BLKADJOFF_R_SHIFT 16
++
++#define ISPPRV_RGB_MAT1_MTX_RR_SHIFT 0
++#define ISPPRV_RGB_MAT1_MTX_GR_SHIFT 16
++
++#define ISPPRV_RGB_MAT2_MTX_BR_SHIFT 0
++#define ISPPRV_RGB_MAT2_MTX_RG_SHIFT 16
++
++#define ISPPRV_RGB_MAT3_MTX_GG_SHIFT 0
++#define ISPPRV_RGB_MAT3_MTX_BG_SHIFT 16
++
++#define ISPPRV_RGB_MAT4_MTX_RB_SHIFT 0
++#define ISPPRV_RGB_MAT4_MTX_GB_SHIFT 16
++
++#define ISPPRV_RGB_MAT5_MTX_BB_SHIFT 0
++
++#define ISPPRV_RGB_OFF1_MTX_OFFG_SHIFT 0
++#define ISPPRV_RGB_OFF1_MTX_OFFR_SHIFT 16
++
++#define ISPPRV_RGB_OFF2_MTX_OFFB_SHIFT 0
++
++#define ISPPRV_CSC0_RY_SHIFT 0
++#define ISPPRV_CSC0_GY_SHIFT 10
++#define ISPPRV_CSC0_BY_SHIFT 20
++
++#define ISPPRV_CSC1_RCB_SHIFT 0
++#define ISPPRV_CSC1_GCB_SHIFT 10
++#define ISPPRV_CSC1_BCB_SHIFT 20
++
++#define ISPPRV_CSC2_RCR_SHIFT 0
++#define ISPPRV_CSC2_GCR_SHIFT 10
++#define ISPPRV_CSC2_BCR_SHIFT 20
++
++#define ISPPRV_CSC_OFFSET_CR_SHIFT 0
++#define ISPPRV_CSC_OFFSET_CB_SHIFT 8
++#define ISPPRV_CSC_OFFSET_Y_SHIFT 16
++
++#define ISPPRV_CNT_BRT_BRT_SHIFT 0
++#define ISPPRV_CNT_BRT_CNT_SHIFT 8
++
++#define ISPPRV_CONTRAST_MAX 0x10
++#define ISPPRV_CONTRAST_MIN 0xFF
++#define ISPPRV_BRIGHT_MIN 0x00
++#define ISPPRV_BRIGHT_MAX 0xFF
++
++#define ISPPRV_CSUP_CSUPG_SHIFT 0
++#define ISPPRV_CSUP_THRES_SHIFT 8
++#define ISPPRV_CSUP_HPYF_SHIFT 16
++
++#define ISPPRV_SETUP_YC_MINC_SHIFT 0
++#define ISPPRV_SETUP_YC_MAXC_SHIFT 8
++#define ISPPRV_SETUP_YC_MINY_SHIFT 16
++#define ISPPRV_SETUP_YC_MAXY_SHIFT 24
++#define ISPPRV_YC_MAX 0xFF
++#define ISPPRV_YC_MIN 0x0
++
++/* Define bit fields within selected registers */
++#define ISP_REVISION_SHIFT 0
++
++#define ISP_SYSCONFIG_AUTOIDLE 0
++#define ISP_SYSCONFIG_SOFTRESET (1 << 1)
++#define ISP_SYSCONFIG_MIDLEMODE_SHIFT 12
++#define ISP_SYSCONFIG_MIDLEMODE_FORCESTANDBY 0x0
++#define ISP_SYSCONFIG_MIDLEMODE_NOSTANBY 0x1
++#define ISP_SYSCONFIG_MIDLEMODE_SMARTSTANDBY 0x2
++
++#define ISP_SYSSTATUS_RESETDONE 0
++
++#define IRQ0ENABLE_CSIA_IRQ 1
++#define IRQ0ENABLE_CSIA_LC1_IRQ (1 << 1)
++#define IRQ0ENABLE_CSIA_LC2_IRQ (1 << 2)
++#define IRQ0ENABLE_CSIA_LC3_IRQ (1 << 3)
++#define IRQ0ENABLE_CSIB_IRQ (1 << 4)
++#define IRQ0ENABLE_CSIB_LC1_IRQ (1 << 5)
++#define IRQ0ENABLE_CSIB_LC2_IRQ (1 << 6)
++#define IRQ0ENABLE_CSIB_LC3_IRQ (1 << 7)
++#define IRQ0ENABLE_CCDC_VD0_IRQ (1 << 8)
++#define IRQ0ENABLE_CCDC_VD1_IRQ (1 << 9)
++#define IRQ0ENABLE_CCDC_VD2_IRQ (1 << 10)
++#define IRQ0ENABLE_CCDC_ERR_IRQ (1 << 11)
++#define IRQ0ENABLE_H3A_AF_DONE_IRQ (1 << 12)
++#define IRQ0ENABLE_H3A_AWB_DONE_IRQ (1 << 13)
++#define IRQ0ENABLE_HIST_DONE_IRQ (1 << 16)
++#define IRQ0ENABLE_CCDC_LSC_DONE_IRQ (1 << 17)
++#define IRQ0ENABLE_CCDC_LSC_PREF_COMP_IRQ (1 << 18)
++#define IRQ0ENABLE_CCDC_LSC_PREF_ERR_IRQ (1 << 19)
++#define IRQ0ENABLE_PRV_DONE_IRQ (1 << 20)
++#define IRQ0ENABLE_RSZ_DONE_IRQ (1 << 24)
++#define IRQ0ENABLE_OVF_IRQ (1 << 25)
++#define IRQ0ENABLE_PING_IRQ (1 << 26)
++#define IRQ0ENABLE_PONG_IRQ (1 << 27)
++#define IRQ0ENABLE_MMU_ERR_IRQ (1 << 28)
++#define IRQ0ENABLE_OCP_ERR_IRQ (1 << 29)
++#define IRQ0ENABLE_SEC_ERR_IRQ (1 << 30)
++#define IRQ0ENABLE_HS_VS_IRQ (1 << 31)
++
++#define IRQ0STATUS_CSIA_IRQ 1
++#define IRQ0STATUS_CSIA_LC1_IRQ (1 << 1)
++#define IRQ0STATUS_CSIA_LC2_IRQ (1 << 2)
++#define IRQ0STATUS_CSIA_LC3_IRQ (1 << 3)
++#define IRQ0STATUS_CSIB_IRQ (1 << 4)
++#define IRQ0STATUS_CSIB_LC1_IRQ (1 << 5)
++#define IRQ0STATUS_CSIB_LC2_IRQ (1 << 6)
++#define IRQ0STATUS_CSIB_LC3_IRQ (1 << 7)
++#define IRQ0STATUS_CCDC_VD0_IRQ (1 << 8)
++#define IRQ0STATUS_CCDC_VD1_IRQ (1 << 9)
++#define IRQ0STATUS_CCDC_VD2_IRQ (1 << 10)
++#define IRQ0STATUS_CCDC_ERR_IRQ (1 << 11)
++#define IRQ0STATUS_H3A_AF_DONE_IRQ (1 << 12)
++#define IRQ0STATUS_H3A_AWB_DONE_IRQ (1 << 13)
++#define IRQ0STATUS_HIST_DONE_IRQ (1 << 16)
++#define IRQ0STATUS_PRV_DONE_IRQ (1 << 20)
++#define IRQ0STATUS_RSZ_DONE_IRQ (1 << 24)
++#define IRQ0STATUS_OVF_IRQ (1 << 25)
++#define IRQ0STATUS_PING_IRQ (1 << 26)
++#define IRQ0STATUS_PONG_IRQ (1 << 27)
++#define IRQ0STATUS_MMU_ERR_IRQ (1 << 28)
++#define IRQ0STATUS_OCP_ERR_IRQ (1 << 29)
++#define IRQ0STATUS_SEC_ERR_IRQ (1 << 30)
++#define IRQ0STATUS_HS_VS_IRQ (1 << 31)
++
++#define TCTRL_GRESET_LEN 0
++
++#define TCTRL_PSTRB_REPLAY_DELAY 0
++#define TCTRL_PSTRB_REPLAY_COUNTER_SHIFT 25
++
++#define ISPCTRL_PAR_SER_CLK_SEL_PARALLEL 0x0
++#define ISPCTRL_PAR_SER_CLK_SEL_CSIA 0x1
++#define ISPCTRL_PAR_SER_CLK_SEL_CSIB 0x2
++#define ISPCTRL_PAR_SER_CLK_SEL_MASK 0xFFFFFFFC
++
++#define ISPCTRL_PAR_BRIDGE_SHIFT 2
++#define ISPCTRL_PAR_BRIDGE_DISABLE (0x0 << 2)
++#define ISPCTRL_PAR_BRIDGE_LENDIAN (0x2 << 2)
++#define ISPCTRL_PAR_BRIDGE_BENDIAN (0x3 << 2)
++
++#define ISPCTRL_PAR_CLK_POL_SHIFT 4
++#define ISPCTRL_PAR_CLK_POL_INV (1 << 4)
++#define ISPCTRL_PING_PONG_EN (1 << 5)
++#define ISPCTRL_SHIFT_SHIFT 6
++#define ISPCTRL_SHIFT_0 (0x0 << 6)
++#define ISPCTRL_SHIFT_2 (0x1 << 6)
++#define ISPCTRL_SHIFT_4 (0x2 << 6)
++#define ISPCTRL_SHIFT_MASK (~(0x3 << 6))
++
++#define ISPCTRL_CCDC_CLK_EN (1 << 8)
++#define ISPCTRL_SCMP_CLK_EN (1 << 9)
++#define ISPCTRL_H3A_CLK_EN (1 << 10)
++#define ISPCTRL_HIST_CLK_EN (1 << 11)
++#define ISPCTRL_PREV_CLK_EN (1 << 12)
++#define ISPCTRL_RSZ_CLK_EN (1 << 13)
++#define ISPCTRL_SYNC_DETECT_SHIFT 14
++#define ISPCTRL_SYNC_DETECT_HSFALL (0x0 << ISPCTRL_SYNC_DETECT_SHIFT)
++#define ISPCTRL_SYNC_DETECT_HSRISE (0x1 << ISPCTRL_SYNC_DETECT_SHIFT)
++#define ISPCTRL_SYNC_DETECT_VSFALL (0x2 << ISPCTRL_SYNC_DETECT_SHIFT)
++#define ISPCTRL_SYNC_DETECT_VSRISE (0x3 << ISPCTRL_SYNC_DETECT_SHIFT)
++#define ISPCTRL_SYNC_DETECT_MASK (0x3 << ISPCTRL_SYNC_DETECT_SHIFT)
++
++#define ISPCTRL_CCDC_RAM_EN (1 << 16)
++#define ISPCTRL_PREV_RAM_EN (1 << 17)
++#define ISPCTRL_SBL_RD_RAM_EN (1 << 18)
++#define ISPCTRL_SBL_WR1_RAM_EN (1 << 19)
++#define ISPCTRL_SBL_WR0_RAM_EN (1 << 20)
++#define ISPCTRL_SBL_AUTOIDLE (1 << 21)
++#define ISPCTRL_SBL_SHARED_RPORTB (1 << 28)
++#define ISPCTRL_JPEG_FLUSH (1 << 30)
++#define ISPCTRL_CCDC_FLUSH (1 << 31)
++
++#define ISPSECURE_SECUREMODE 0
++
++#define ISPTCTRL_CTRL_DIV_LOW 0x0
++#define ISPTCTRL_CTRL_DIV_HIGH 0x1
++#define ISPTCTRL_CTRL_DIV_BYPASS 0x1F
++
++#define ISPTCTRL_CTRL_DIVA_SHIFT 0
++#define ISPTCTRL_CTRL_DIVA_MASK (0x1F << ISPTCTRL_CTRL_DIVA_SHIFT)
++
++#define ISPTCTRL_CTRL_DIVB_SHIFT 5
++#define ISPTCTRL_CTRL_DIVB_MASK (0x1F << ISPTCTRL_CTRL_DIVB_SHIFT)
++
++#define ISPTCTRL_CTRL_DIVC_SHIFT 10
++#define ISPTCTRL_CTRL_DIVC_NOCLOCK (0x0 << 10)
++
++#define ISPTCTRL_CTRL_SHUTEN (1 << 21)
++#define ISPTCTRL_CTRL_PSTRBEN (1 << 22)
++#define ISPTCTRL_CTRL_STRBEN (1 << 23)
++#define ISPTCTRL_CTRL_SHUTPOL (1 << 24)
++#define ISPTCTRL_CTRL_STRBPSTRBPOL (1 << 26)
++
++#define ISPTCTRL_CTRL_INSEL_SHIFT 27
++#define ISPTCTRL_CTRL_INSEL_PARALLEL (0x0 << 27)
++#define ISPTCTRL_CTRL_INSEL_CSIA (0x1 << 27)
++#define ISPTCTRL_CTRL_INSEL_CSIB (0x2 << 27)
++
++#define ISPTCTRL_CTRL_GRESETEn (1 << 29)
++#define ISPTCTRL_CTRL_GRESETPOL (1 << 30)
++#define ISPTCTRL_CTRL_GRESETDIR (1 << 31)
++
++#define ISPTCTRL_FRAME_SHUT_SHIFT 0
++#define ISPTCTRL_FRAME_PSTRB_SHIFT 6
++#define ISPTCTRL_FRAME_STRB_SHIFT 12
++
++#define ISPCCDC_PID_PREV_SHIFT 0
++#define ISPCCDC_PID_CID_SHIFT 8
++#define ISPCCDC_PID_TID_SHIFT 16
++
++#define ISPCCDC_PCR_EN 1
++#define ISPCCDC_PCR_BUSY (1 << 1)
++
++#define ISPCCDC_SYN_MODE_VDHDOUT 0x1
++#define ISPCCDC_SYN_MODE_FLDOUT (1 << 1)
++#define ISPCCDC_SYN_MODE_VDPOL (1 << 2)
++#define ISPCCDC_SYN_MODE_HDPOL (1 << 3)
++#define ISPCCDC_SYN_MODE_FLDPOL (1 << 4)
++#define ISPCCDC_SYN_MODE_EXWEN (1 << 5)
++#define ISPCCDC_SYN_MODE_DATAPOL (1 << 6)
++#define ISPCCDC_SYN_MODE_FLDMODE (1 << 7)
++#define ISPCCDC_SYN_MODE_DATSIZ_MASK 0xFFFFF8FF
++#define ISPCCDC_SYN_MODE_DATSIZ_8_16 (0x0 << 8)
++#define ISPCCDC_SYN_MODE_DATSIZ_12 (0x4 << 8)
++#define ISPCCDC_SYN_MODE_DATSIZ_11 (0x5 << 8)
++#define ISPCCDC_SYN_MODE_DATSIZ_10 (0x6 << 8)
++#define ISPCCDC_SYN_MODE_DATSIZ_8 (0x7 << 8)
++#define ISPCCDC_SYN_MODE_PACK8 (1 << 11)
++#define ISPCCDC_SYN_MODE_INPMOD_MASK 0xFFFFCFFF
++#define ISPCCDC_SYN_MODE_INPMOD_RAW (0 << 12)
++#define ISPCCDC_SYN_MODE_INPMOD_YCBCR16 (1 << 12)
++#define ISPCCDC_SYN_MODE_INPMOD_YCBCR8 (2 << 12)
++#define ISPCCDC_SYN_MODE_LPF (1 << 14)
++#define ISPCCDC_SYN_MODE_FLDSTAT (1 << 15)
++#define ISPCCDC_SYN_MODE_VDHDEN (1 << 16)
++#define ISPCCDC_SYN_MODE_WEN (1 << 17)
++#define ISPCCDC_SYN_MODE_VP2SDR (1 << 18)
++#define ISPCCDC_SYN_MODE_SDR2RSZ (1 << 19)
++
++#define ISPCCDC_HD_VD_WID_VDW_SHIFT 0
++#define ISPCCDC_HD_VD_WID_HDW_SHIFT 16
++
++#define ISPCCDC_PIX_LINES_HLPRF_SHIFT 0
++#define ISPCCDC_PIX_LINES_PPLN_SHIFT 16
++
++#define ISPCCDC_HORZ_INFO_NPH_SHIFT 0
++#define ISPCCDC_HORZ_INFO_NPH_MASK 0xFFFF8000
++#define ISPCCDC_HORZ_INFO_SPH_MASK 0x1000FFFF
++#define ISPCCDC_HORZ_INFO_SPH_SHIFT 16
++
++#define ISPCCDC_VERT_START_SLV0_SHIFT 16
++#define ISPCCDC_VERT_START_SLV0_MASK 0x1000FFFF
++#define ISPCCDC_VERT_START_SLV1_SHIFT 0
++
++#define ISPCCDC_VERT_LINES_NLV_MASK 0xFFFF8000
++#define ISPCCDC_VERT_LINES_NLV_SHIFT 0
++
++#define ISPCCDC_CULLING_CULV_SHIFT 0
++#define ISPCCDC_CULLING_CULHODD_SHIFT 16
++#define ISPCCDC_CULLING_CULHEVN_SHIFT 24
++
++#define ISPCCDC_HSIZE_OFF_SHIFT 0
++
++#define ISPCCDC_SDOFST_FINV (1 << 14)
++#define ISPCCDC_SDOFST_FOFST_1L 0
++#define ISPCCDC_SDOFST_FOFST_4L (3 << 12)
++#define ISPCCDC_SDOFST_LOFST3_SHIFT 0
++#define ISPCCDC_SDOFST_LOFST2_SHIFT 3
++#define ISPCCDC_SDOFST_LOFST1_SHIFT 6
++#define ISPCCDC_SDOFST_LOFST0_SHIFT 9
++#define EVENEVEN 1
++#define ODDEVEN 2
++#define EVENODD 3
++#define ODDODD 4
++
++#define ISPCCDC_CLAMP_OBGAIN_SHIFT 0
++#define ISPCCDC_CLAMP_OBST_SHIFT 10
++#define ISPCCDC_CLAMP_OBSLN_SHIFT 25
++#define ISPCCDC_CLAMP_OBSLEN_SHIFT 28
++#define ISPCCDC_CLAMP_CLAMPEN (1 << 31)
++
++#define ISPCCDC_COLPTN_R_Ye 0x0
++#define ISPCCDC_COLPTN_Gr_Cy 0x1
++#define ISPCCDC_COLPTN_Gb_G 0x2
++#define ISPCCDC_COLPTN_B_Mg 0x3
++#define ISPCCDC_COLPTN_CP0PLC0_SHIFT 0
++#define ISPCCDC_COLPTN_CP0PLC1_SHIFT 2
++#define ISPCCDC_COLPTN_CP0PLC2_SHIFT 4
++#define ISPCCDC_COLPTN_CP0PLC3_SHIFT 6
++#define ISPCCDC_COLPTN_CP1PLC0_SHIFT 8
++#define ISPCCDC_COLPTN_CP1PLC1_SHIFT 10
++#define ISPCCDC_COLPTN_CP1PLC2_SHIFT 12
++#define ISPCCDC_COLPTN_CP1PLC3_SHIFT 14
++#define ISPCCDC_COLPTN_CP2PLC0_SHIFT 16
++#define ISPCCDC_COLPTN_CP2PLC1_SHIFT 18
++#define ISPCCDC_COLPTN_CP2PLC2_SHIFT 20
++#define ISPCCDC_COLPTN_CP2PLC3_SHIFT 22
++#define ISPCCDC_COLPTN_CP3PLC0_SHIFT 24
++#define ISPCCDC_COLPTN_CP3PLC1_SHIFT 26
++#define ISPCCDC_COLPTN_CP3PLC2_SHIFT 28
++#define ISPCCDC_COLPTN_CP3PLC3_SHIFT 30
++
++#define ISPCCDC_BLKCMP_B_MG_SHIFT 0
++#define ISPCCDC_BLKCMP_GB_G_SHIFT 8
++#define ISPCCDC_BLKCMP_GR_CY_SHIFT 16
++#define ISPCCDC_BLKCMP_R_YE_SHIFT 24
++
++#define ISPCCDC_FPC_FPNUM_SHIFT 0
++#define ISPCCDC_FPC_FPCEN (1 << 15)
++#define ISPCCDC_FPC_FPERR (1 << 16)
++
++#define ISPCCDC_VDINT_1_SHIFT 0
++#define ISPCCDC_VDINT_0_SHIFT 16
++#define ISPCCDC_VDINT_0_MASK 0x7FFF
++#define ISPCCDC_VDINT_1_MASK 0x7FFF
++
++#define ISPCCDC_ALAW_GWDI_SHIFT 0
++#define ISPCCDC_ALAW_CCDTBL (1 << 3)
++
++#define ISPCCDC_REC656IF_R656ON 1
++#define ISPCCDC_REC656IF_ECCFVH (1 << 1)
++
++#define ISPCCDC_CFG_BW656 (1 << 5)
++#define ISPCCDC_CFG_FIDMD_SHIFT 6
++#define ISPCCDC_CFG_WENLOG (1 << 8)
++#define ISPCCDC_CFG_WENLOG_AND (0 << 8)
++#define ISPCCDC_CFG_WENLOG_OR (1 << 8)
++#define ISPCCDC_CFG_Y8POS (1 << 11)
++#define ISPCCDC_CFG_BSWD (1 << 12)
++#define ISPCCDC_CFG_MSBINVI (1 << 13)
++#define ISPCCDC_CFG_VDLC (1 << 15)
++
++#define ISPCCDC_FMTCFG_FMTEN 0x1
++#define ISPCCDC_FMTCFG_LNALT (1 << 1)
++#define ISPCCDC_FMTCFG_LNUM_SHIFT 2
++#define ISPCCDC_FMTCFG_PLEN_ODD_SHIFT 4
++#define ISPCCDC_FMTCFG_PLEN_EVEN_SHIFT 8
++#define ISPCCDC_FMTCFG_VPIN_MASK 0xFFFF8000
++#define ISPCCDC_FMTCFG_VPIN_12_3 (0x3 << 12)
++#define ISPCCDC_FMTCFG_VPIN_11_2 (0x4 << 12)
++#define ISPCCDC_FMTCFG_VPIN_10_1 (0x5 << 12)
++#define ISPCCDC_FMTCFG_VPIN_9_0 (0x6 << 12)
++#define ISPCCDC_FMTCFG_VPEN (1 << 15)
++
++#define ISPCCDC_FMTCF_VPIF_FRQ_MASK 0xFFF8FFFF
++#define ISPCCDC_FMTCF_VPIF_FRQ_BY2 (0x0 << 16)
++#define ISPCCDC_FMTCF_VPIF_FRQ_BY3 (0x1 << 16)
++#define ISPCCDC_FMTCF_VPIF_FRQ_BY4 (0x2 << 16)
++#define ISPCCDC_FMTCF_VPIF_FRQ_BY5 (0x3 << 16)
++#define ISPCCDC_FMTCF_VPIF_FRQ_BY6 (0x4 << 16)
++
++#define ISPCCDC_FMT_HORZ_FMTLNH_SHIFT 0
++#define ISPCCDC_FMT_HORZ_FMTSPH_SHIFT 16
++
++#define ISPCCDC_FMT_VERT_FMTLNV_SHIFT 0
++#define ISPCCDC_FMT_VERT_FMTSLV_SHIFT 16
++
++#define ISPCCDC_FMT_HORZ_FMTSPH_MASK 0x1FFF0000
++#define ISPCCDC_FMT_HORZ_FMTLNH_MASK 0x1FFF
++
++#define ISPCCDC_FMT_VERT_FMTSLV_MASK 0x1FFF0000
++#define ISPCCDC_FMT_VERT_FMTLNV_MASK 0x1FFF
++
++#define ISPCCDC_VP_OUT_HORZ_ST_SHIFT 0
++#define ISPCCDC_VP_OUT_HORZ_NUM_SHIFT 4
++#define ISPCCDC_VP_OUT_VERT_NUM_SHIFT 17
++
++#define ISPRSZ_PID_PREV_SHIFT 0
++#define ISPRSZ_PID_CID_SHIFT 8
++#define ISPRSZ_PID_TID_SHIFT 16
++
++#define ISPRSZ_PCR_ENABLE 0x5
++#define ISPRSZ_PCR_BUSY (1 << 1)
++
++#define ISPRSZ_CNT_HRSZ_SHIFT 0
++#define ISPRSZ_CNT_HRSZ_MASK 0x3FF
++#define ISPRSZ_CNT_VRSZ_SHIFT 10
++#define ISPRSZ_CNT_VRSZ_MASK 0xFFC00
++#define ISPRSZ_CNT_HSTPH_SHIFT 20
++#define ISPRSZ_CNT_HSTPH_MASK 0x700000
++#define ISPRSZ_CNT_VSTPH_SHIFT 23
++#define ISPRSZ_CNT_VSTPH_MASK 0x3800000
++#define ISPRSZ_CNT_CBILIN_MASK 0x20000000
++#define ISPRSZ_CNT_INPTYP_MASK 0x08000000
++#define ISPRSZ_CNT_PIXFMT_MASK 0x04000000
++#define ISPRSZ_CNT_YCPOS (1 << 26)
++#define ISPRSZ_CNT_INPTYP (1 << 27)
++#define ISPRSZ_CNT_INPSRC (1 << 28)
++#define ISPRSZ_CNT_CBILIN (1 << 29)
++
++#define ISPRSZ_OUT_SIZE_HORZ_SHIFT 0
++#define ISPRSZ_OUT_SIZE_HORZ_MASK 0x7FF
++#define ISPRSZ_OUT_SIZE_VERT_SHIFT 16
++#define ISPRSZ_OUT_SIZE_VERT_MASK 0x7FF0000
++
++
++#define ISPRSZ_IN_START_HORZ_ST_SHIFT 0
++#define ISPRSZ_IN_START_HORZ_ST_MASK 0x1FFF
++#define ISPRSZ_IN_START_VERT_ST_SHIFT 16
++#define ISPRSZ_IN_START_VERT_ST_MASK 0x1FFF0000
++
++
++#define ISPRSZ_IN_SIZE_HORZ_SHIFT 0
++#define ISPRSZ_IN_SIZE_HORZ_MASK 0x1FFF
++#define ISPRSZ_IN_SIZE_VERT_SHIFT 16
++#define ISPRSZ_IN_SIZE_VERT_MASK 0x1FFF0000
++
++#define ISPRSZ_SDR_INADD_ADDR_SHIFT 0
++#define ISPRSZ_SDR_INADD_ADDR_MASK 0xFFFFFFFF
++
++#define ISPRSZ_SDR_INOFF_OFFSET_SHIFT 0
++#define ISPRSZ_SDR_INOFF_OFFSET_MASK 0xFFFF
++
++#define ISPRSZ_SDR_OUTADD_ADDR_SHIFT 0
++#define ISPRSZ_SDR_OUTADD_ADDR_MASK 0xFFFFFFFF
++
++
++#define ISPRSZ_SDR_OUTOFF_OFFSET_SHIFT 0
++#define ISPRSZ_SDR_OUTOFF_OFFSET_MASK 0xFFFF
++
++#define ISPRSZ_HFILT10_COEF0_SHIFT 0
++#define ISPRSZ_HFILT10_COEF0_MASK 0x3FF
++#define ISPRSZ_HFILT10_COEF1_SHIFT 16
++#define ISPRSZ_HFILT10_COEF1_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT32_COEF2_SHIFT 0
++#define ISPRSZ_HFILT32_COEF2_MASK 0x3FF
++#define ISPRSZ_HFILT32_COEF3_SHIFT 16
++#define ISPRSZ_HFILT32_COEF3_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT54_COEF4_SHIFT 0
++#define ISPRSZ_HFILT54_COEF4_MASK 0x3FF
++#define ISPRSZ_HFILT54_COEF5_SHIFT 16
++#define ISPRSZ_HFILT54_COEF5_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT76_COEFF6_SHIFT 0
++#define ISPRSZ_HFILT76_COEFF6_MASK 0x3FF
++#define ISPRSZ_HFILT76_COEFF7_SHIFT 16
++#define ISPRSZ_HFILT76_COEFF7_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT98_COEFF8_SHIFT 0
++#define ISPRSZ_HFILT98_COEFF8_MASK 0x3FF
++#define ISPRSZ_HFILT98_COEFF9_SHIFT 16
++#define ISPRSZ_HFILT98_COEFF9_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT1110_COEF10_SHIFT 0
++#define ISPRSZ_HFILT1110_COEF10_MASK 0x3FF
++#define ISPRSZ_HFILT1110_COEF11_SHIFT 16
++#define ISPRSZ_HFILT1110_COEF11_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT1312_COEFF12_SHIFT 0
++#define ISPRSZ_HFILT1312_COEFF12_MASK 0x3FF
++#define ISPRSZ_HFILT1312_COEFF13_SHIFT 16
++#define ISPRSZ_HFILT1312_COEFF13_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT1514_COEFF14_SHIFT 0
++#define ISPRSZ_HFILT1514_COEFF14_MASK 0x3FF
++#define ISPRSZ_HFILT1514_COEFF15_SHIFT 16
++#define ISPRSZ_HFILT1514_COEFF15_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT1716_COEF16_SHIFT 0
++#define ISPRSZ_HFILT1716_COEF16_MASK 0x3FF
++#define ISPRSZ_HFILT1716_COEF17_SHIFT 16
++#define ISPRSZ_HFILT1716_COEF17_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT1918_COEF18_SHIFT 0
++#define ISPRSZ_HFILT1918_COEF18_MASK 0x3FF
++#define ISPRSZ_HFILT1918_COEF19_SHIFT 16
++#define ISPRSZ_HFILT1918_COEF19_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT2120_COEF20_SHIFT 0
++#define ISPRSZ_HFILT2120_COEF20_MASK 0x3FF
++#define ISPRSZ_HFILT2120_COEF21_SHIFT 16
++#define ISPRSZ_HFILT2120_COEF21_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT2322_COEF22_SHIFT 0
++#define ISPRSZ_HFILT2322_COEF22_MASK 0x3FF
++#define ISPRSZ_HFILT2322_COEF23_SHIFT 16
++#define ISPRSZ_HFILT2322_COEF23_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT2524_COEF24_SHIFT 0
++#define ISPRSZ_HFILT2524_COEF24_MASK 0x3FF
++#define ISPRSZ_HFILT2524_COEF25_SHIFT 16
++#define ISPRSZ_HFILT2524_COEF25_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT2726_COEF26_SHIFT 0
++#define ISPRSZ_HFILT2726_COEF26_MASK 0x3FF
++#define ISPRSZ_HFILT2726_COEF27_SHIFT 16
++#define ISPRSZ_HFILT2726_COEF27_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT2928_COEF28_SHIFT 0
++#define ISPRSZ_HFILT2928_COEF28_MASK 0x3FF
++#define ISPRSZ_HFILT2928_COEF29_SHIFT 16
++#define ISPRSZ_HFILT2928_COEF29_MASK 0x3FF0000
++
++#define ISPRSZ_HFILT3130_COEF30_SHIFT 0
++#define ISPRSZ_HFILT3130_COEF30_MASK 0x3FF
++#define ISPRSZ_HFILT3130_COEF31_SHIFT 16
++#define ISPRSZ_HFILT3130_COEF31_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT10_COEF0_SHIFT 0
++#define ISPRSZ_VFILT10_COEF0_MASK 0x3FF
++#define ISPRSZ_VFILT10_COEF1_SHIFT 16
++#define ISPRSZ_VFILT10_COEF1_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT32_COEF2_SHIFT 0
++#define ISPRSZ_VFILT32_COEF2_MASK 0x3FF
++#define ISPRSZ_VFILT32_COEF3_SHIFT 16
++#define ISPRSZ_VFILT32_COEF3_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT54_COEF4_SHIFT 0
++#define ISPRSZ_VFILT54_COEF4_MASK 0x3FF
++#define ISPRSZ_VFILT54_COEF5_SHIFT 16
++#define ISPRSZ_VFILT54_COEF5_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT76_COEFF6_SHIFT 0
++#define ISPRSZ_VFILT76_COEFF6_MASK 0x3FF
++#define ISPRSZ_VFILT76_COEFF7_SHIFT 16
++#define ISPRSZ_VFILT76_COEFF7_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT98_COEFF8_SHIFT 0
++#define ISPRSZ_VFILT98_COEFF8_MASK 0x3FF
++#define ISPRSZ_VFILT98_COEFF9_SHIFT 16
++#define ISPRSZ_VFILT98_COEFF9_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT1110_COEF10_SHIFT 0
++#define ISPRSZ_VFILT1110_COEF10_MASK 0x3FF
++#define ISPRSZ_VFILT1110_COEF11_SHIFT 16
++#define ISPRSZ_VFILT1110_COEF11_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT1312_COEFF12_SHIFT 0
++#define ISPRSZ_VFILT1312_COEFF12_MASK 0x3FF
++#define ISPRSZ_VFILT1312_COEFF13_SHIFT 16
++#define ISPRSZ_VFILT1312_COEFF13_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT1514_COEFF14_SHIFT 0
++#define ISPRSZ_VFILT1514_COEFF14_MASK 0x3FF
++#define ISPRSZ_VFILT1514_COEFF15_SHIFT 16
++#define ISPRSZ_VFILT1514_COEFF15_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT1716_COEF16_SHIFT 0
++#define ISPRSZ_VFILT1716_COEF16_MASK 0x3FF
++#define ISPRSZ_VFILT1716_COEF17_SHIFT 16
++#define ISPRSZ_VFILT1716_COEF17_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT1918_COEF18_SHIFT 0
++#define ISPRSZ_VFILT1918_COEF18_MASK 0x3FF
++#define ISPRSZ_VFILT1918_COEF19_SHIFT 16
++#define ISPRSZ_VFILT1918_COEF19_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT2120_COEF20_SHIFT 0
++#define ISPRSZ_VFILT2120_COEF20_MASK 0x3FF
++#define ISPRSZ_VFILT2120_COEF21_SHIFT 16
++#define ISPRSZ_VFILT2120_COEF21_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT2322_COEF22_SHIFT 0
++#define ISPRSZ_VFILT2322_COEF22_MASK 0x3FF
++#define ISPRSZ_VFILT2322_COEF23_SHIFT 16
++#define ISPRSZ_VFILT2322_COEF23_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT2524_COEF24_SHIFT 0
++#define ISPRSZ_VFILT2524_COEF24_MASK 0x3FF
++#define ISPRSZ_VFILT2524_COEF25_SHIFT 16
++#define ISPRSZ_VFILT2524_COEF25_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT2726_COEF26_SHIFT 0
++#define ISPRSZ_VFILT2726_COEF26_MASK 0x3FF
++#define ISPRSZ_VFILT2726_COEF27_SHIFT 16
++#define ISPRSZ_VFILT2726_COEF27_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT2928_COEF28_SHIFT 0
++#define ISPRSZ_VFILT2928_COEF28_MASK 0x3FF
++#define ISPRSZ_VFILT2928_COEF29_SHIFT 16
++#define ISPRSZ_VFILT2928_COEF29_MASK 0x3FF0000
++
++#define ISPRSZ_VFILT3130_COEF30_SHIFT 0
++#define ISPRSZ_VFILT3130_COEF30_MASK 0x3FF
++#define ISPRSZ_VFILT3130_COEF31_SHIFT 16
++#define ISPRSZ_VFILT3130_COEF31_MASK 0x3FF0000
++
++#define ISPRSZ_YENH_CORE_SHIFT 0
++#define ISPRSZ_YENH_CORE_MASK 0xFF
++#define ISPRSZ_YENH_SLOP_SHIFT 8
++#define ISPRSZ_YENH_SLOP_MASK 0xF00
++#define ISPRSZ_YENH_GAIN_SHIFT 12
++#define ISPRSZ_YENH_GAIN_MASK 0xF000
++#define ISPRSZ_YENH_ALGO_SHIFT 16
++#define ISPRSZ_YENH_ALGO_MASK 0x30000
++
++#define ISPH3A_PCR_AEW_ALAW_EN_SHIFT 1
++#define ISPH3A_PCR_AF_MED_TH_SHIFT 3
++#define ISPH3A_PCR_AF_RGBPOS_SHIFT 11
++#define ISPH3A_PCR_AEW_AVE2LMT_SHIFT 22
++#define ISPH3A_PCR_AEW_AVE2LMT_MASK 0xFFC00000
++#define ISPH3A_PCR_BUSYAF (1 << 15)
++#define ISPH3A_PCR_BUSYAEAWB (1 << 18)
++
++#define ISPH3A_AEWWIN1_WINHC_SHIFT 0
++#define ISPH3A_AEWWIN1_WINHC_MASK 0x3F
++#define ISPH3A_AEWWIN1_WINVC_SHIFT 6
++#define ISPH3A_AEWWIN1_WINVC_MASK 0x1FC0
++#define ISPH3A_AEWWIN1_WINW_SHIFT 13
++#define ISPH3A_AEWWIN1_WINW_MASK 0xFE000
++#define ISPH3A_AEWWIN1_WINH_SHIFT 24
++#define ISPH3A_AEWWIN1_WINH_MASK 0x7F000000
++
++#define ISPH3A_AEWINSTART_WINSH_SHIFT 0
++#define ISPH3A_AEWINSTART_WINSH_MASK 0x0FFF
++#define ISPH3A_AEWINSTART_WINSV_SHIFT 16
++#define ISPH3A_AEWINSTART_WINSV_MASK 0x0FFF0000
++
++#define ISPH3A_AEWINBLK_WINH_SHIFT 0
++#define ISPH3A_AEWINBLK_WINH_MASK 0x7F
++#define ISPH3A_AEWINBLK_WINSV_SHIFT 16
++#define ISPH3A_AEWINBLK_WINSV_MASK 0x0FFF0000
++
++#define ISPH3A_AEWSUBWIN_AEWINCH_SHIFT 0
++#define ISPH3A_AEWSUBWIN_AEWINCH_MASK 0x0F
++#define ISPH3A_AEWSUBWIN_AEWINCV_SHIFT 8
++#define ISPH3A_AEWSUBWIN_AEWINCV_MASK 0x0F00
++
++#define ISPHIST_PCR_ENABLE_SHIFT 0
++#define ISPHIST_PCR_ENABLE_MASK 0x01
++#define ISPHIST_PCR_BUSY 0x02
++
++#define ISPHIST_CNT_DATASIZE_SHIFT 8
++#define ISPHIST_CNT_DATASIZE_MASK 0x0100
++#define ISPHIST_CNT_CLEAR_SHIFT 7
++#define ISPHIST_CNT_CLEAR_MASK 0x080
++#define ISPHIST_CNT_CFA_SHIFT 6
++#define ISPHIST_CNT_CFA_MASK 0x040
++#define ISPHIST_CNT_BINS_SHIFT 4
++#define ISPHIST_CNT_BINS_MASK 0x030
++#define ISPHIST_CNT_SOURCE_SHIFT 3
++#define ISPHIST_CNT_SOURCE_MASK 0x08
++#define ISPHIST_CNT_SHIFT_SHIFT 0
++#define ISPHIST_CNT_SHIFT_MASK 0x07
++
++#define ISPHIST_WB_GAIN_WG00_SHIFT 24
++#define ISPHIST_WB_GAIN_WG00_MASK 0xFF000000
++#define ISPHIST_WB_GAIN_WG01_SHIFT 16
++#define ISPHIST_WB_GAIN_WG01_MASK 0xFF0000
++#define ISPHIST_WB_GAIN_WG02_SHIFT 8
++#define ISPHIST_WB_GAIN_WG02_MASK 0xFF00
++#define ISPHIST_WB_GAIN_WG03_SHIFT 0
++#define ISPHIST_WB_GAIN_WG03_MASK 0xFF
++
++#define ISPHIST_REGHORIZ_HSTART_SHIFT 16 /*
++ * REGION 0 to 3 HORZ
++ * and VERT
++ */
++#define ISPHIST_REGHORIZ_HSTART_MASK 0x3FFF0000
++#define ISPHIST_REGHORIZ_HEND_SHIFT 0
++#define ISPHIST_REGHORIZ_HEND_MASK 0x3FFF
++#define ISPHIST_REGVERT_VSTART_SHIFT 16
++#define ISPHIST_REGVERT_VSTART_MASK 0x3FFF0000
++#define ISPHIST_REGVERT_VEND_SHIFT 0
++#define ISPHIST_REGVERT_VEND_MASK 0x3FFF
++
++#define ISPHIST_REGHORIZ_MASK 0x3FFF3FFF
++#define ISPHIST_REGVERT_MASK 0x3FFF3FFF
++
++#define ISPHIST_ADDR_SHIFT 0
++#define ISPHIST_ADDR_MASK 0x3FF
++
++#define ISPHIST_DATA_SHIFT 0
++#define ISPHIST_DATA_MASK 0xFFFFF
++
++#define ISPHIST_RADD_SHIFT 0
++#define ISPHIST_RADD_MASK 0xFFFFFFFF
++
++#define ISPHIST_RADD_OFF_SHIFT 0
++#define ISPHIST_RADD_OFF_MASK 0xFFFF
++
++#define ISPHIST_HV_INFO_HSIZE_SHIFT 16
++#define ISPHIST_HV_INFO_HSIZE_MASK 0x3FFF0000
++#define ISPHIST_HV_INFO_VSIZE_SHIFT 0
++#define ISPHIST_HV_INFO_VSIZE_MASK 0x3FFF
++
++#define ISPHIST_HV_INFO_MASK 0x3FFF3FFF
++
++#define ISPCCDC_LSC_GAIN_MODE_N_MASK 0x700
++#define ISPCCDC_LSC_GAIN_MODE_N_SHIFT 8
++#define ISPCCDC_LSC_GAIN_MODE_M_MASK 0x3800
++#define ISPCCDC_LSC_GAIN_MODE_M_SHIFT 12
++#define ISPCCDC_LSC_GAIN_FORMAT_MASK 0xE
++#define ISPCCDC_LSC_GAIN_FORMAT_SHIFT 1
++#define ISPCCDC_LSC_AFTER_REFORMATTER_MASK (1<<6)
++
++#define ISPCCDC_LSC_INITIAL_X_MASK 0x3F
++#define ISPCCDC_LSC_INITIAL_X_SHIFT 0
++#define ISPCCDC_LSC_INITIAL_Y_MASK 0x3F0000
++#define ISPCCDC_LSC_INITIAL_Y_SHIFT 16
++
++#define ISPMMU_REVISION_REV_MINOR_MASK 0xF
++#define ISPMMU_REVISION_REV_MAJOR_SHIFT 0x4
++
++#define IRQENABLE_MULTIHITFAULT (1<<4)
++#define IRQENABLE_TWFAULT (1<<3)
++#define IRQENABLE_EMUMISS (1<<2)
++#define IRQENABLE_TRANSLNFAULT (1<<1)
++#define IRQENABLE_TLBMISS (1)
++
++#define ISPMMU_MMUCNTL_MMU_EN (1<<1)
++#define ISPMMU_MMUCNTL_TWL_EN (1<<2)
++#define ISPMMU_MMUCNTL_EMUTLBUPDATE (1<<3)
++#define ISPMMU_AUTOIDLE 0x1
++#define ISPMMU_SIDLEMODE_FORCEIDLE 0
++#define ISPMMU_SIDLEMODE_NOIDLE 1
++#define ISPMMU_SIDLEMODE_SMARTIDLE 2
++#define ISPMMU_SIDLEMODE_SHIFT 3
++
++#define ISPCSI1_AUTOIDLE 0x1
++#define ISPCSI1_MIDLEMODE_SHIFT 12
++#define ISPCSI1_MIDLEMODE_FORCESTANDBY 0x0
++#define ISPCSI1_MIDLEMODE_NOSTANDBY 0x1
++#define ISPCSI1_MIDLEMODE_SMARTSTANDBY 0x2
++
++/* CSI2 receiver registers (ES2.0) */
++#define ISPCSI2_REVISION (0x000)
++#define ISPCSI2_SYSCONFIG (0x010)
++#define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT 12
++#define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_MASK \
++ (0x3 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
++#define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_FORCE \
++ (0x0 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
++#define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_NO \
++ (0x1 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
++#define ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SMART \
++ (0x2 << ISPCSI2_SYSCONFIG_MSTANDBY_MODE_SHIFT)
++#define ISPCSI2_SYSCONFIG_SOFT_RESET_SHIFT 1
++#define ISPCSI2_SYSCONFIG_SOFT_RESET_MASK \
++ (0x1 << ISPCSI2_SYSCONFIG_SOFT_RESET_SHIFT)
++#define ISPCSI2_SYSCONFIG_SOFT_RESET_NORMAL \
++ (0x0 << ISPCSI2_SYSCONFIG_SOFT_RESET_SHIFT)
++#define ISPCSI2_SYSCONFIG_SOFT_RESET_RESET \
++ (0x1 << ISPCSI2_SYSCONFIG_SOFT_RESET_SHIFT)
++#define ISPCSI2_SYSCONFIG_AUTO_IDLE_SHIFT 0
++#define ISPCSI2_SYSCONFIG_AUTO_IDLE_MASK \
++ (0x1 << ISPCSI2_SYSCONFIG_AUTO_IDLE_SHIFT)
++#define ISPCSI2_SYSCONFIG_AUTO_IDLE_FREE \
++ (0x0 << ISPCSI2_SYSCONFIG_AUTO_IDLE_SHIFT)
++#define ISPCSI2_SYSCONFIG_AUTO_IDLE_AUTO \
++ (0x1 << ISPCSI2_SYSCONFIG_AUTO_IDLE_SHIFT)
++#define ISPCSI2_SYSSTATUS (0x014)
++#define ISPCSI2_SYSSTATUS_RESET_DONE_SHIFT 0
++#define ISPCSI2_SYSSTATUS_RESET_DONE_MASK \
++ (0x1 << ISPCSI2_SYSSTATUS_RESET_DONE_SHIFT)
++#define ISPCSI2_SYSSTATUS_RESET_DONE_ONGOING \
++ (0x0 << ISPCSI2_SYSSTATUS_RESET_DONE_SHIFT)
++#define ISPCSI2_SYSSTATUS_RESET_DONE_DONE \
++ (0x1 << ISPCSI2_SYSSTATUS_RESET_DONE_SHIFT)
++#define ISPCSI2_IRQSTATUS (0x018)
++#define ISPCSI2_IRQSTATUS_OCP_ERR_IRQ (1 << 14)
++#define ISPCSI2_IRQSTATUS_SHORT_PACKET_IRQ (1 << 13)
++#define ISPCSI2_IRQSTATUS_ECC_CORRECTION_IRQ (1 << 12)
++#define ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ (1 << 11)
++#define ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ (1 << 10)
++#define ISPCSI2_IRQSTATUS_COMPLEXIO1_ERR_IRQ (1 << 9)
++#define ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ (1 << 8)
++#define ISPCSI2_IRQSTATUS_CONTEXT(n) (1 << (n))
++
++#define ISPCSI2_IRQENABLE (0x01C)
++#define ISPCSI2_CTRL (0x040)
++#define ISPCSI2_CTRL_VP_CLK_EN_SHIFT 15
++#define ISPCSI2_CTRL_VP_CLK_EN_MASK (0x1 << ISPCSI2_CTRL_VP_CLK_EN_SHIFT)
++#define ISPCSI2_CTRL_VP_CLK_EN_DISABLE (0x0 << ISPCSI2_CTRL_VP_CLK_EN_SHIFT)
++#define ISPCSI2_CTRL_VP_CLK_EN_ENABLE (0x1 << ISPCSI2_CTRL_VP_CLK_EN_SHIFT)
++
++#define ISPCSI2_CTRL_VP_ONLY_EN_SHIFT 11
++#define ISPCSI2_CTRL_VP_ONLY_EN_MASK (0x1 << ISPCSI2_CTRL_VP_ONLY_EN_SHIFT)
++#define ISPCSI2_CTRL_VP_ONLY_EN_DISABLE (0x0 << ISPCSI2_CTRL_VP_ONLY_EN_SHIFT)
++#define ISPCSI2_CTRL_VP_ONLY_EN_ENABLE (0x1 << ISPCSI2_CTRL_VP_ONLY_EN_SHIFT)
++
++#define ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT 8
++#define ISPCSI2_CTRL_VP_OUT_CTRL_MASK (0x3 << \
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT)
++#define ISPCSI2_CTRL_VP_OUT_CTRL_DISABLE (0x0 << \
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT)
++#define ISPCSI2_CTRL_VP_OUT_CTRL_DIV2 (0x1 << \
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT)
++#define ISPCSI2_CTRL_VP_OUT_CTRL_DIV3 (0x2 << \
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT)
++#define ISPCSI2_CTRL_VP_OUT_CTRL_DIV4 (0x3 << \
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT)
++
++#define ISPCSI2_CTRL_DBG_EN_SHIFT 7
++#define ISPCSI2_CTRL_DBG_EN_MASK (0x1 << ISPCSI2_CTRL_DBG_EN_SHIFT)
++#define ISPCSI2_CTRL_DBG_EN_DISABLE (0x0 << ISPCSI2_CTRL_DBG_EN_SHIFT)
++#define ISPCSI2_CTRL_DBG_EN_ENABLE (0x1 << ISPCSI2_CTRL_DBG_EN_SHIFT)
++
++#define ISPCSI2_CTRL_BURST_SIZE_SHIFT 5
++#define ISPCSI2_CTRL_BURST_SIZE_MASK (0x3 << \
++ ISPCSI2_CTRL_BURST_SIZE_SHIFT)
++#define ISPCSI2_CTRL_BURST_SIZE_MYSTERY_VAL (0x2 << \
++ ISPCSI2_CTRL_BURST_SIZE_SHIFT)
++
++#define ISPCSI2_CTRL_FRAME_SHIFT 3
++#define ISPCSI2_CTRL_FRAME_MASK (0x1 << ISPCSI2_CTRL_FRAME_SHIFT)
++#define ISPCSI2_CTRL_FRAME_DISABLE_IMM (0x0 << ISPCSI2_CTRL_FRAME_SHIFT)
++#define ISPCSI2_CTRL_FRAME_DISABLE_FEC (0x1 << ISPCSI2_CTRL_FRAME_SHIFT)
++
++#define ISPCSI2_CTRL_ECC_EN_SHIFT 2
++#define ISPCSI2_CTRL_ECC_EN_MASK (0x1 << ISPCSI2_CTRL_ECC_EN_SHIFT)
++#define ISPCSI2_CTRL_ECC_EN_DISABLE (0x0 << ISPCSI2_CTRL_ECC_EN_SHIFT)
++#define ISPCSI2_CTRL_ECC_EN_ENABLE (0x1 << ISPCSI2_CTRL_ECC_EN_SHIFT)
++
++#define ISPCSI2_CTRL_SECURE_SHIFT 1
++#define ISPCSI2_CTRL_SECURE_MASK (0x1 << ISPCSI2_CTRL_SECURE_SHIFT)
++#define ISPCSI2_CTRL_SECURE_DISABLE (0x0 << ISPCSI2_CTRL_SECURE_SHIFT)
++#define ISPCSI2_CTRL_SECURE_ENABLE (0x1 << ISPCSI2_CTRL_SECURE_SHIFT)
++
++#define ISPCSI2_CTRL_IF_EN_SHIFT 0
++#define ISPCSI2_CTRL_IF_EN_MASK (0x1 << ISPCSI2_CTRL_IF_EN_SHIFT)
++#define ISPCSI2_CTRL_IF_EN_DISABLE (0x0 << ISPCSI2_CTRL_IF_EN_SHIFT)
++#define ISPCSI2_CTRL_IF_EN_ENABLE (0x1 << ISPCSI2_CTRL_IF_EN_SHIFT)
++
++#define ISPCSI2_DBG_H (0x044)
++#define ISPCSI2_GNQ (0x048)
++#define ISPCSI2_COMPLEXIO_CFG1 (0x050)
++#define ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_SHIFT 29
++#define ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_MASK \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_ONGOING \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_DONE \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_RESET_DONE_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_SHIFT 27
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_MASK \
++ (0x3 << ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_OFF \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_ON \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_ULPW \
++ (0x2 << ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_SHIFT 25
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_MASK \
++ (0x3 << ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_OFF \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_ON \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_ULPW \
++ (0x2 << ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_SHIFT 24
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_MASK \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_DISABLE \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_ENABLE \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_SHIFT)
++
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POL_SHIFT(n) (3 + ((n) * 4))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POL_MASK(n) \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_DATA_POL_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POL_PN(n) \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_DATA_POL_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POL_NP(n) \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_DATA_POL_SHIFT(n))
++
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n) ((n) * 4)
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_MASK(n) \
++ (0x7 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_NC(n) \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_1(n) \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_2(n) \
++ (0x2 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_3(n) \
++ (0x3 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_4(n) \
++ (0x4 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++#define ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_5(n) \
++ (0x5 << ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(n))
++
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_SHIFT 3
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_MASK \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_PN \
++ (0x0 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_NP \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_SHIFT)
++
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT 0
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_MASK \
++ (0x7 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_1 \
++ (0x1 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_2 \
++ (0x2 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_3 \
++ (0x3 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_4 \
++ (0x4 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT)
++#define ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_5 \
++ (0x5 << ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT)
++
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS (0x054)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEALLULPMEXIT (1 << 26)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEALLULPMENTER (1 << 25)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEULPM5 (1 << 24)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEULPM4 (1 << 23)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEULPM3 (1 << 22)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEULPM2 (1 << 21)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_STATEULPM1 (1 << 20)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRCONTROL5 (1 << 19)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRCONTROL4 (1 << 18)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRCONTROL3 (1 << 17)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRCONTROL2 (1 << 16)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRCONTROL1 (1 << 15)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRESC5 (1 << 14)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRESC4 (1 << 13)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRESC3 (1 << 12)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRESC2 (1 << 11)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRESC1 (1 << 10)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTSYNCHS5 (1 << 9)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTSYNCHS4 (1 << 8)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTSYNCHS3 (1 << 7)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTSYNCHS2 (1 << 6)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTSYNCHS1 (1 << 5)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTHS5 (1 << 4)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTHS4 (1 << 3)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTHS3 (1 << 2)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTHS2 (1 << 1)
++#define ISPCSI2_COMPLEXIO1_IRQSTATUS_ERRSOTHS1 1
++
++#define ISPCSI2_SHORT_PACKET (0x05C)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE (0x060)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEALLULPMEXIT (1 << 26)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEALLULPMENTER (1 << 25)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM5 (1 << 24)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM4 (1 << 23)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM3 (1 << 22)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM2 (1 << 21)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM1 (1 << 20)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL5 (1 << 19)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL4 (1 << 18)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL3 (1 << 17)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL2 (1 << 16)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL1 (1 << 15)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC5 (1 << 14)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC4 (1 << 13)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC3 (1 << 12)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC2 (1 << 11)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC1 (1 << 10)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS5 (1 << 9)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS4 (1 << 8)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS3 (1 << 7)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS2 (1 << 6)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS1 (1 << 5)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS5 (1 << 4)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS4 (1 << 3)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS3 (1 << 2)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS2 (1 << 1)
++#define ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS1 1
++#define ISPCSI2_DBG_P (0x068)
++#define ISPCSI2_TIMING (0x06C)
++
++
++#define ISPCSI2_TIMING_FORCE_RX_MODE_IO_SHIFT(n) \
++ ((16 * ((n) - 1)) + 15)
++#define ISPCSI2_TIMING_FORCE_RX_MODE_IO_MASK(n) \
++ (0x1 << ISPCSI2_TIMING_FORCE_RX_MODE_IO_SHIFT(n))
++#define ISPCSI2_TIMING_FORCE_RX_MODE_IO_DISABLE(n) \
++ (0x0 << ISPCSI2_TIMING_FORCE_RX_MODE_IO_SHIFT(n))
++#define ISPCSI2_TIMING_FORCE_RX_MODE_IO_ENABLE(n) \
++ (0x1 << ISPCSI2_TIMING_FORCE_RX_MODE_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_X16_IO_SHIFT(n) ((16 * ((n) - 1)) + 14)
++#define ISPCSI2_TIMING_STOP_STATE_X16_IO_MASK(n) \
++ (0x1 << ISPCSI2_TIMING_STOP_STATE_X16_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_X16_IO_DISABLE(n) \
++ (0x0 << ISPCSI2_TIMING_STOP_STATE_X16_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_X16_IO_ENABLE(n) \
++ (0x1 << ISPCSI2_TIMING_STOP_STATE_X16_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_X4_IO_SHIFT(n) ((16 * ((n) - 1)) + 13)
++#define ISPCSI2_TIMING_STOP_STATE_X4_IO_MASK(n) \
++ (0x1 << ISPCSI2_TIMING_STOP_STATE_X4_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_X4_IO_DISABLE(n) \
++ (0x0 << ISPCSI2_TIMING_STOP_STATE_X4_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_X4_IO_ENABLE(n) \
++ (0x1 << ISPCSI2_TIMING_STOP_STATE_X4_IO_SHIFT(n))
++#define ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_SHIFT(n) (16 * ((n) - 1))
++#define ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_MASK(n) \
++ (0x1fff << ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_SHIFT(n))
++
++#define ISPCSI2_CTX_CTRL1(n) ((0x070) + 0x20 * (n))
++#define ISPCSI2_CTX_CTRL1_COUNT_SHIFT 8
++#define ISPCSI2_CTX_CTRL1_COUNT_MASK (0xFF << \
++ ISPCSI2_CTX_CTRL1_COUNT_SHIFT)
++#define ISPCSI2_CTX_CTRL1_EOF_EN_SHIFT 7
++#define ISPCSI2_CTX_CTRL1_EOF_EN_MASK \
++ (0x1 << ISPCSI2_CTX_CTRL1_EOF_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_EOF_EN_DISABLE \
++ (0x0 << ISPCSI2_CTX_CTRL1_EOF_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_EOF_EN_ENABLE \
++ (0x1 << ISPCSI2_CTX_CTRL1_EOF_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_EOL_EN_SHIFT 6
++#define ISPCSI2_CTX_CTRL1_EOL_EN_MASK \
++ (0x1 << ISPCSI2_CTX_CTRL1_EOL_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_EOL_EN_DISABLE \
++ (0x0 << ISPCSI2_CTX_CTRL1_EOL_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_EOL_EN_ENABLE \
++ (0x1 << ISPCSI2_CTX_CTRL1_EOL_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_CS_EN_SHIFT 5
++#define ISPCSI2_CTX_CTRL1_CS_EN_MASK \
++ (0x1 << ISPCSI2_CTX_CTRL1_CS_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_CS_EN_DISABLE \
++ (0x0 << ISPCSI2_CTX_CTRL1_CS_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_CS_EN_ENABLE \
++ (0x1 << ISPCSI2_CTX_CTRL1_CS_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_SHIFT 4
++#define ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_MASK \
++ (0x1 << ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_DISABLE \
++ (0x0 << ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_ENABLE \
++ (0x1 << ISPCSI2_CTX_CTRL1_COUNT_UNLOCK_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_PING_PONG_SHIFT 3
++#define ISPCSI2_CTX_CTRL1_PING_PONG_MASK \
++ (0x1 << ISPCSI2_CTX_CTRL1_PING_PONG_SHIFT)
++#define ISPCSI2_CTX_CTRL1_CTX_EN_SHIFT 0
++#define ISPCSI2_CTX_CTRL1_CTX_EN_MASK \
++ (0x1 << ISPCSI2_CTX_CTRL1_CTX_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_CTX_EN_DISABLE \
++ (0x0 << ISPCSI2_CTX_CTRL1_CTX_EN_SHIFT)
++#define ISPCSI2_CTX_CTRL1_CTX_EN_ENABLE \
++ (0x1 << ISPCSI2_CTX_CTRL1_CTX_EN_SHIFT)
++
++#define ISPCSI2_CTX_CTRL2(n) ((0x074) + 0x20 * (n))
++#define ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT 11
++#define ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK \
++ (0x3 << ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT)
++#define ISPCSI2_CTX_CTRL2_FORMAT_SHIFT 0
++#define ISPCSI2_CTX_CTRL2_FORMAT_MASK (0x3FF << \
++ ISPCSI2_CTX_CTRL2_FORMAT_SHIFT)
++
++#define ISPCSI2_CTX_DAT_OFST(n) ((0x078) + 0x20 * (n))
++#define ISPCSI2_CTX_DAT_OFST_OFST_SHIFT 5
++#define ISPCSI2_CTX_DAT_OFST_OFST_MASK (0x7FF << \
++ ISPCSI2_CTX_DAT_OFST_OFST_SHIFT)
++
++#define ISPCSI2_CTX_DAT_PING_ADDR(n) ((0x07C) + 0x20 * (n))
++#define ISPCSI2_CTX_DAT_PONG_ADDR(n) ((0x080) + 0x20 * (n))
++#define ISPCSI2_CTX_IRQENABLE(n) ((0x084) + 0x20 * (n))
++#define ISPCSI2_CTX_IRQENABLE_ECC_CORRECTION_IRQ (1 << 8)
++#define ISPCSI2_CTX_IRQENABLE_LINE_NUMBER_IRQ (1 << 7)
++#define ISPCSI2_CTX_IRQENABLE_FRAME_NUMBER_IRQ (1 << 6)
++#define ISPCSI2_CTX_IRQENABLE_CS_IRQ (1 << 5)
++#define ISPCSI2_CTX_IRQENABLE_LE_IRQ (1 << 3)
++#define ISPCSI2_CTX_IRQENABLE_LS_IRQ (1 << 2)
++#define ISPCSI2_CTX_IRQENABLE_FE_IRQ (1 << 1)
++#define ISPCSI2_CTX_IRQENABLE_FS_IRQ 1
++#define ISPCSI2_CTX_IRQSTATUS(n) ((0x088) + 0x20 * (n))
++#define ISPCSI2_CTX_IRQSTATUS_ECC_CORRECTION_IRQ (1 << 8)
++#define ISPCSI2_CTX_IRQSTATUS_LINE_NUMBER_IRQ (1 << 7)
++#define ISPCSI2_CTX_IRQSTATUS_FRAME_NUMBER_IRQ (1 << 6)
++#define ISPCSI2_CTX_IRQSTATUS_CS_IRQ (1 << 5)
++#define ISPCSI2_CTX_IRQSTATUS_LE_IRQ (1 << 3)
++#define ISPCSI2_CTX_IRQSTATUS_LS_IRQ (1 << 2)
++#define ISPCSI2_CTX_IRQSTATUS_FE_IRQ (1 << 1)
++#define ISPCSI2_CTX_IRQSTATUS_FS_IRQ 1
++
++#define ISPCSI2_CTX_CTRL3(n) ((0x08C) + 0x20 * (n))
++#define ISPCSI2_CTX_CTRL3_ALPHA_SHIFT 5
++#define ISPCSI2_CTX_CTRL3_ALPHA_MASK (0x3FFF << \
++ ISPCSI2_CTX_CTRL3_ALPHA_SHIFT)
++
++#define ISPCSI2PHY_CFG0 (0x000)
++#define ISPCSI2PHY_CFG0_THS_TERM_SHIFT 8
++#define ISPCSI2PHY_CFG0_THS_TERM_MASK \
++ (0xFF << ISPCSI2PHY_CFG0_THS_TERM_SHIFT)
++#define ISPCSI2PHY_CFG0_THS_TERM_RESETVAL \
++ (0x04 << ISPCSI2PHY_CFG0_THS_TERM_SHIFT)
++#define ISPCSI2PHY_CFG0_THS_SETTLE_SHIFT 0
++#define ISPCSI2PHY_CFG0_THS_SETTLE_MASK \
++ (0xFF << ISPCSI2PHY_CFG0_THS_SETTLE_SHIFT)
++#define ISPCSI2PHY_CFG0_THS_SETTLE_RESETVAL \
++ (0x27 << ISPCSI2PHY_CFG0_THS_SETTLE_SHIFT)
++#define ISPCSI2PHY_CFG1 (0x004)
++#define ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT 18
++#define ISPCSI2PHY_CFG1_TCLK_TERM_MASK \
++ (0x7F << ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT)
++#define ISPCSI2PHY_CFG1_TCLK_TERM__RESETVAL \
++ (0x00 << ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT)
++#define ISPCSI2PHY_CFG1_RESERVED1_SHIFT 10
++#define ISPCSI2PHY_CFG1_RESERVED1_MASK \
++ (0xFF << ISPCSI2PHY_CFG1_RESERVED1_SHIFT)
++#define ISPCSI2PHY_CFG1_RESERVED1__RESETVAL \
++ (0xB8 << ISPCSI2PHY_CFG1_RESERVED1_SHIFT)
++#define ISPCSI2PHY_CFG1_TCLK_MISS_SHIFT 8
++#define ISPCSI2PHY_CFG1_TCLK_MISS_MASK \
++ (0x3 << ISPCSI2PHY_CFG1_TCLK_MISS_SHIFT)
++#define ISPCSI2PHY_CFG1_TCLK_MISS__RESETVAL \
++ (0x1 << ISPCSI2PHY_CFG1_TCLK_MISS_SHIFT)
++#define ISPCSI2PHY_CFG1_TCLK_SETTLE_SHIFT 0
++#define ISPCSI2PHY_CFG1_TCLK_SETTLE_MASK \
++ (0xFF << ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT)
++#define ISPCSI2PHY_CFG1_TCLK_SETTLE__RESETVAL \
++ (0x0E << ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT)
++#define ISPCSI2PHY_CFG1__RESETVAL (ISPCSI2PHY_CFG1_TCLK_TERM__RESETVAL | \
++ ISPCSI2PHY_CFG1_RESERVED1__RESETVAL | \
++ ISPCSI2PHY_CFG1_TCLK_MISS__RESETVAL | \
++ ISPCSI2PHY_CFG1_TCLK_SETTLE__RESETVAL)
++#define ISPCSI2PHY_CFG1__EDITABLE_MASK (ISPCSI2PHY_CFG1_TCLK_TERM_MASK | \
++ ISPCSI2PHY_CFG1_RESERVED1_MASK | \
++ ISPCSI2PHY_CFG1_TCLK_MISS_MASK | \
++ ISPCSI2PHY_CFG1_TCLK_SETTLE_MASK)
++
++#endif /* __ISPREG_H__ */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0002-omap3isp-Add-ISP-MMU-wrapper.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0002-omap3isp-Add-ISP-MMU-wrapper.patch
new file mode 100644
index 0000000000..cfca26723a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0002-omap3isp-Add-ISP-MMU-wrapper.patch
@@ -0,0 +1,209 @@
+From 731527a7dc26533a878c7c5f36fc148fdcaa21b8 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add ISP MMU wrapper
+
+TODO:
+
+- The ISP driver should start using the IOMMU directly without this wrapper.
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/isp/ispmmu.c | 141 ++++++++++++++++++++++++++++++++++++++
+ drivers/media/video/isp/ispmmu.h | 36 ++++++++++
+ 2 files changed, 177 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/ispmmu.c
+ create mode 100644 drivers/media/video/isp/ispmmu.h
+
+diff --git a/drivers/media/video/isp/ispmmu.c b/drivers/media/video/isp/ispmmu.c
+new file mode 100644
+index 0000000..f872c71
+--- /dev/null
++++ b/drivers/media/video/isp/ispmmu.c
+@@ -0,0 +1,141 @@
++/*
++ * omap iommu wrapper for TI's OMAP3430 Camera ISP
++ *
++ * Copyright (C) 2008--2009 Nokia.
++ *
++ * Contributors:
++ * Hiroshi Doyu <hiroshi.doyu@nokia.com>
++ * Sakari Ailus <sakari.ailus@nokia.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <linux/module.h>
++
++#include "ispmmu.h"
++#include "isp.h"
++
++#include <mach/iommu.h>
++#include <mach/iovmm.h>
++
++#define IOMMU_FLAG (IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_8)
++
++static struct iommu *isp_iommu;
++
++dma_addr_t ispmmu_vmalloc(size_t bytes)
++{
++ return (dma_addr_t)iommu_vmalloc(isp_iommu, 0, bytes, IOMMU_FLAG);
++}
++
++void ispmmu_vfree(const dma_addr_t da)
++{
++ iommu_vfree(isp_iommu, (u32)da);
++}
++
++dma_addr_t ispmmu_kmap(u32 pa, int size)
++{
++ void *da;
++
++ da = (void *)iommu_kmap(isp_iommu, 0, pa, size, IOMMU_FLAG);
++ if (IS_ERR(da))
++ return PTR_ERR(da);
++
++ return (dma_addr_t)da;
++}
++
++void ispmmu_kunmap(dma_addr_t da)
++{
++ iommu_kunmap(isp_iommu, (u32)da);
++}
++
++dma_addr_t ispmmu_vmap(const struct scatterlist *sglist,
++ int sglen)
++{
++ int err;
++ void *da;
++ struct sg_table *sgt;
++ unsigned int i;
++ struct scatterlist *sg, *src = (struct scatterlist *)sglist;
++
++ /*
++ * convert isp sglist to iommu sgt
++ * FIXME: should be fixed in the upper layer?
++ */
++ sgt = kmalloc(sizeof(*sgt), GFP_KERNEL);
++ if (!sgt)
++ return -ENOMEM;
++ err = sg_alloc_table(sgt, sglen, GFP_KERNEL);
++ if (err)
++ goto err_sg_alloc;
++
++ for_each_sg(sgt->sgl, sg, sgt->nents, i)
++ sg_set_buf(sg, phys_to_virt(sg_dma_address(src + i)),
++ sg_dma_len(src + i));
++
++ da = (void *)iommu_vmap(isp_iommu, 0, sgt, IOMMU_FLAG);
++ if (IS_ERR(da))
++ goto err_vmap;
++
++ return (dma_addr_t)da;
++
++err_vmap:
++ sg_free_table(sgt);
++err_sg_alloc:
++ kfree(sgt);
++ return -ENOMEM;
++}
++EXPORT_SYMBOL_GPL(ispmmu_vmap);
++
++void ispmmu_vunmap(dma_addr_t da)
++{
++ struct sg_table *sgt;
++
++ sgt = iommu_vunmap(isp_iommu, (u32)da);
++ if (!sgt)
++ return;
++ sg_free_table(sgt);
++ kfree(sgt);
++}
++EXPORT_SYMBOL_GPL(ispmmu_vunmap);
++
++void ispmmu_save_context(void)
++{
++ if (isp_iommu)
++ iommu_save_ctx(isp_iommu);
++}
++
++void ispmmu_restore_context(void)
++{
++ if (isp_iommu)
++ iommu_restore_ctx(isp_iommu);
++}
++
++int __init ispmmu_init(void)
++{
++ int err = 0;
++
++ isp_get();
++ isp_iommu = iommu_get("isp");
++ if (IS_ERR(isp_iommu)) {
++ err = PTR_ERR(isp_iommu);
++ isp_iommu = NULL;
++ }
++ isp_put();
++
++ return err;
++}
++
++void ispmmu_cleanup(void)
++{
++ isp_get();
++ if (isp_iommu)
++ iommu_put(isp_iommu);
++ isp_put();
++ isp_iommu = NULL;
++}
+diff --git a/drivers/media/video/isp/ispmmu.h b/drivers/media/video/isp/ispmmu.h
+new file mode 100644
+index 0000000..0bc5bcb
+--- /dev/null
++++ b/drivers/media/video/isp/ispmmu.h
+@@ -0,0 +1,36 @@
++/*
++ * omap iommu wrapper for TI's OMAP3430 Camera ISP
++ *
++ * Copyright (C) 2008--2009 Nokia.
++ *
++ * Contributors:
++ * Hiroshi Doyu <hiroshi.doyu@nokia.com>
++ * Sakari Ailus <sakari.ailus@nokia.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_MMU_H
++#define OMAP_ISP_MMU_H
++
++#include <linux/err.h>
++#include <linux/scatterlist.h>
++
++dma_addr_t ispmmu_vmalloc(size_t bytes);
++void ispmmu_vfree(const dma_addr_t da);
++dma_addr_t ispmmu_kmap(u32 pa, int size);
++void ispmmu_kunmap(dma_addr_t da);
++dma_addr_t ispmmu_vmap(const struct scatterlist *sglist, int sglen);
++void ispmmu_vunmap(dma_addr_t da);
++void ispmmu_save_context(void);
++void ispmmu_restore_context(void);
++int ispmmu_init(void);
++void ispmmu_cleanup(void);
++
++#endif /* OMAP_ISP_MMU_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0003-omap3isp-Add-userspace-header.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0003-omap3isp-Add-userspace-header.patch
new file mode 100644
index 0000000000..66c171f544
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0003-omap3isp-Add-userspace-header.patch
@@ -0,0 +1,696 @@
+From 98ca1ef8c6e2561989aeef981131cf5077eab1d1 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add userspace header
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ arch/arm/plat-omap/include/mach/isp_user.h | 676 ++++++++++++++++++++++++++++
+ 1 files changed, 676 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/plat-omap/include/mach/isp_user.h
+
+diff --git a/arch/arm/plat-omap/include/mach/isp_user.h b/arch/arm/plat-omap/include/mach/isp_user.h
+new file mode 100644
+index 0000000..b819e26
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/isp_user.h
+@@ -0,0 +1,676 @@
++/*
++ * isp_user.h
++ *
++ * Include file for OMAP ISP module in TI's OMAP3.
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Mohit Jalori <mjalori@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_USER_H
++#define OMAP_ISP_USER_H
++
++/* ISP Private IOCTLs */
++#define VIDIOC_PRIVATE_ISP_CCDC_CFG \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct ispccdc_update_config)
++#define VIDIOC_PRIVATE_ISP_PRV_CFG \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct ispprv_update_config)
++#define VIDIOC_PRIVATE_ISP_AEWB_CFG \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct isph3a_aewb_config)
++#define VIDIOC_PRIVATE_ISP_AEWB_REQ \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct isph3a_aewb_data)
++#define VIDIOC_PRIVATE_ISP_HIST_CFG \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct isp_hist_config)
++#define VIDIOC_PRIVATE_ISP_HIST_REQ \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct isp_hist_data)
++#define VIDIOC_PRIVATE_ISP_AF_CFG \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct af_configuration)
++#define VIDIOC_PRIVATE_ISP_AF_REQ \
++ _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct isp_af_data)
++
++/* AE/AWB related structures and flags*/
++
++/* Flags for update field */
++#define REQUEST_STATISTICS (1 << 0)
++#define SET_COLOR_GAINS (1 << 1)
++#define SET_DIGITAL_GAIN (1 << 2)
++#define SET_EXPOSURE (1 << 3)
++#define SET_ANALOG_GAIN (1 << 4)
++
++#define MAX_FRAME_COUNT 0x0FFF
++#define MAX_FUTURE_FRAMES 10
++
++#define MAX_SATURATION_LIM 1023
++#define MIN_WIN_H 2
++#define MAX_WIN_H 256
++#define MIN_WIN_W 6
++#define MAX_WIN_W 256
++#define MAX_WINVC 128
++#define MAX_WINHC 36
++#define MAX_WINSTART 4095
++#define MIN_SUB_INC 2
++#define MAX_SUB_INC 32
++
++/* Range Constants */
++#define AF_IIRSH_MIN 0
++#define AF_IIRSH_MAX 4094
++#define AF_PAXEL_HORIZONTAL_COUNT_MIN 0
++#define AF_PAXEL_HORIZONTAL_COUNT_MAX 35
++#define AF_PAXEL_VERTICAL_COUNT_MIN 0
++#define AF_PAXEL_VERTICAL_COUNT_MAX 127
++#define AF_PAXEL_INCREMENT_MIN 0
++#define AF_PAXEL_INCREMENT_MAX 14
++#define AF_PAXEL_HEIGHT_MIN 0
++#define AF_PAXEL_HEIGHT_MAX 127
++#define AF_PAXEL_WIDTH_MIN 0
++#define AF_PAXEL_WIDTH_MAX 127
++#define AF_PAXEL_HZSTART_MIN 2
++#define AF_PAXEL_HZSTART_MAX 4094
++
++#define AF_PAXEL_VTSTART_MIN 0
++#define AF_PAXEL_VTSTART_MAX 4095
++#define AF_THRESHOLD_MAX 255
++#define AF_COEF_MAX 4095
++#define AF_PAXEL_SIZE 48
++
++/**
++ * struct isph3a_aewb_config - AE AWB configuration reset values.
++ * saturation_limit: Saturation limit.
++ * @win_height: Window Height. Range 2 - 256, even values only.
++ * @win_width: Window Width. Range 6 - 256, even values only.
++ * @ver_win_count: Vertical Window Count. Range 1 - 128.
++ * @hor_win_count: Horizontal Window Count. Range 1 - 36.
++ * @ver_win_start: Vertical Window Start. Range 0 - 4095.
++ * @hor_win_start: Horizontal Window Start. Range 0 - 4095.
++ * @blk_ver_win_start: Black Vertical Windows Start. Range 0 - 4095.
++ * @blk_win_height: Black Window Height. Range 2 - 256, even values only.
++ * @subsample_ver_inc: Subsample Vertical points increment Range 2 - 32, even
++ * values only.
++ * @subsample_hor_inc: Subsample Horizontal points increment Range 2 - 32, even
++ * values only.
++ * @alaw_enable: AEW ALAW EN flag.
++ * @aewb_enable: AE AWB stats generation EN flag.
++ */
++struct isph3a_aewb_config {
++ __u16 saturation_limit;
++ __u16 win_height;
++ __u16 win_width;
++ __u16 ver_win_count;
++ __u16 hor_win_count;
++ __u16 ver_win_start;
++ __u16 hor_win_start;
++ __u16 blk_ver_win_start;
++ __u16 blk_win_height;
++ __u16 subsample_ver_inc;
++ __u16 subsample_hor_inc;
++ __u8 alaw_enable;
++ __u8 aewb_enable;
++};
++
++/**
++ * struct isph3a_aewb_data - Structure of data sent to or received from user
++ * @h3a_aewb_statistics_buf: Pointer to pass to user.
++ * @shutter: Shutter speed.
++ * @gain: Sensor analog Gain.
++ * @shutter_cap: Shutter speed for capture.
++ * @gain_cap: Sensor Gain for capture.
++ * @dgain: White balance digital gain.
++ * @wb_gain_b: White balance color gain blue.
++ * @wb_gain_r: White balance color gain red.
++ * @wb_gain_gb: White balance color gain green blue.
++ * @wb_gain_gr: White balance color gain green red.
++ * @frame_number: Frame number of requested stats.
++ * @curr_frame: Current frame number being processed.
++ * @update: Bitwise flags to update parameters.
++ * @ts: Timestamp of returned framestats.
++ * @field_count: Sequence number of returned framestats.
++ */
++struct isph3a_aewb_data {
++ void *h3a_aewb_statistics_buf;
++ __u32 shutter;
++ __u16 gain;
++ __u32 shutter_cap;
++ __u16 gain_cap;
++ __u16 dgain;
++ __u16 wb_gain_b;
++ __u16 wb_gain_r;
++ __u16 wb_gain_gb;
++ __u16 wb_gain_gr;
++ __u16 frame_number;
++ __u16 curr_frame;
++ __u8 update;
++ struct timeval ts;
++ __u32 config_counter;
++ unsigned long field_count;
++};
++
++
++/* Histogram related structs */
++/* Flags for number of bins */
++#define BINS_32 0x0
++#define BINS_64 0x1
++#define BINS_128 0x2
++#define BINS_256 0x3
++
++struct isp_hist_config {
++ __u8 hist_source; /* CCDC or Memory */
++ __u8 input_bit_width; /* Needed o know the size per pixel */
++ __u8 hist_frames; /* Num of frames to be processed and
++ * accumulated
++ */
++ __u8 hist_h_v_info; /* frame-input width and height if source is
++ * memory
++ */
++ __u16 hist_radd; /* frame-input address in memory */
++ __u16 hist_radd_off; /* line-offset for frame-input */
++ __u16 hist_bins; /* number of bins: 32, 64, 128, or 256 */
++ __u16 wb_gain_R; /* White Balance Field-to-Pattern Assignments */
++ __u16 wb_gain_RG; /* White Balance Field-to-Pattern Assignments */
++ __u16 wb_gain_B; /* White Balance Field-to-Pattern Assignments */
++ __u16 wb_gain_BG; /* White Balance Field-to-Pattern Assignments */
++ __u8 num_regions; /* number of regions to be configured */
++ __u16 reg0_hor; /* Region 0 size and position */
++ __u16 reg0_ver; /* Region 0 size and position */
++ __u16 reg1_hor; /* Region 1 size and position */
++ __u16 reg1_ver; /* Region 1 size and position */
++ __u16 reg2_hor; /* Region 2 size and position */
++ __u16 reg2_ver; /* Region 2 size and position */
++ __u16 reg3_hor; /* Region 3 size and position */
++ __u16 reg3_ver; /* Region 3 size and position */
++};
++
++struct isp_hist_data {
++ __u32 *hist_statistics_buf; /* Pointer to pass to user */
++};
++
++/* Auto Focus related structs */
++
++#define AF_NUMBER_OF_COEF 11
++
++/* Flags for update field */
++#define REQUEST_STATISTICS (1 << 0)
++#define LENS_DESIRED_POSITION (1 << 1)
++#define LENS_CURRENT_POSITION (1 << 2)
++
++/**
++ * struct isp_af_xtrastats - Extra statistics related to AF generated stats.
++ * @ts: Timestamp when the frame gets delivered to the user.
++ * @field_count: Field count of the frame delivered to the user.
++ * @lens_position: Lens position when the stats are being generated.
++ */
++struct isp_af_xtrastats {
++ struct timeval ts;
++ unsigned long field_count;
++ __u16 lens_position; /* deprecated */
++};
++
++/**
++ * struct isp_af_data - AF statistics data to transfer between driver and user.
++ * @af_statistics_buf: Pointer to pass to user.
++ * @lens_current_position: Read value of lens absolute position.
++ * @desired_lens_direction: Lens desired location.
++ * @update: Bitwise flags to update parameters.
++ * @frame_number: Data for which frame is desired/given.
++ * @curr_frame: Current frame number being processed by AF module.
++ * @xtrastats: Extra statistics structure.
++ */
++struct isp_af_data {
++ void *af_statistics_buf;
++ __u16 lens_current_position; /* deprecated */
++ __u16 desired_lens_direction; /* deprecated */
++ __u16 update;
++ __u16 frame_number;
++ __u16 curr_frame;
++ __u32 config_counter;
++ struct isp_af_xtrastats xtrastats;
++};
++
++/* enum used for status of specific feature */
++enum af_alaw_enable {
++ H3A_AF_ALAW_DISABLE = 0,
++ H3A_AF_ALAW_ENABLE = 1
++};
++
++enum af_hmf_enable {
++ H3A_AF_HMF_DISABLE = 0,
++ H3A_AF_HMF_ENABLE = 1
++};
++
++enum af_config_flag {
++ H3A_AF_CFG_DISABLE = 0,
++ H3A_AF_CFG_ENABLE = 1
++};
++
++enum af_mode {
++ ACCUMULATOR_SUMMED = 0,
++ ACCUMULATOR_PEAK = 1
++};
++
++/* Red, Green, and blue pixel location in the AF windows */
++enum rgbpos {
++ GR_GB_BAYER = 0, /* GR and GB as Bayer pattern */
++ RG_GB_BAYER = 1, /* RG and GB as Bayer pattern */
++ GR_BG_BAYER = 2, /* GR and BG as Bayer pattern */
++ RG_BG_BAYER = 3, /* RG and BG as Bayer pattern */
++ GG_RB_CUSTOM = 4, /* GG and RB as custom pattern */
++ RB_GG_CUSTOM = 5 /* RB and GG as custom pattern */
++};
++
++/* Contains the information regarding the Horizontal Median Filter */
++struct af_hmf {
++ enum af_hmf_enable enable; /* Status of Horizontal Median Filter */
++ unsigned int threshold; /* Threshhold Value for Horizontal Median
++ * Filter
++ */
++};
++
++/* Contains the information regarding the IIR Filters */
++struct af_iir {
++ unsigned int hz_start_pos; /* IIR Start Register Value */
++ int coeff_set0[AF_NUMBER_OF_COEF]; /*
++ * IIR Filter Coefficient for
++ * Set 0
++ */
++ int coeff_set1[AF_NUMBER_OF_COEF]; /*
++ * IIR Filter Coefficient for
++ * Set 1
++ */
++};
++
++/* Contains the information regarding the Paxels Structure in AF Engine */
++struct af_paxel {
++ unsigned int width; /* Width of the Paxel */
++ unsigned int height; /* Height of the Paxel */
++ unsigned int hz_start; /* Horizontal Start Position */
++ unsigned int vt_start; /* Vertical Start Position */
++ unsigned int hz_cnt; /* Horizontal Count */
++ unsigned int vt_cnt; /* vertical Count */
++ unsigned int line_incr; /* Line Increment */
++};
++/* Contains the parameters required for hardware set up of AF Engine */
++struct af_configuration {
++ enum af_alaw_enable alaw_enable; /*ALWAW status */
++ struct af_hmf hmf_config; /*HMF configurations */
++ enum rgbpos rgb_pos; /*RGB Positions */
++ struct af_iir iir_config; /*IIR filter configurations */
++ struct af_paxel paxel_config; /*Paxel parameters */
++ enum af_mode mode; /*Accumulator mode */
++ enum af_config_flag af_config; /*Flag indicates Engine is configured */
++};
++
++/* ISP CCDC structs */
++
++/* Abstraction layer CCDC configurations */
++#define ISP_ABS_CCDC_ALAW (1 << 0)
++#define ISP_ABS_CCDC_LPF (1 << 1)
++#define ISP_ABS_CCDC_BLCLAMP (1 << 2)
++#define ISP_ABS_CCDC_BCOMP (1 << 3)
++#define ISP_ABS_CCDC_FPC (1 << 4)
++#define ISP_ABS_CCDC_CULL (1 << 5)
++#define ISP_ABS_CCDC_COLPTN (1 << 6)
++#define ISP_ABS_CCDC_CONFIG_LSC (1 << 7)
++#define ISP_ABS_TBL_LSC (1 << 8)
++
++#define RGB_MAX 3
++
++/* Enumeration constants for Alaw input width */
++enum alaw_ipwidth {
++ ALAW_BIT12_3 = 0x3,
++ ALAW_BIT11_2 = 0x4,
++ ALAW_BIT10_1 = 0x5,
++ ALAW_BIT9_0 = 0x6
++};
++
++/* Enumeration constants for Video Port */
++enum vpin {
++ BIT12_3 = 3,
++ BIT11_2 = 4,
++ BIT10_1 = 5,
++ BIT9_0 = 6
++};
++
++enum vpif_freq {
++ PIXCLKBY2,
++ PIXCLKBY3_5,
++ PIXCLKBY4_5,
++ PIXCLKBY5_5,
++ PIXCLKBY6_5
++};
++
++/**
++ * struct ispccdc_lsc_config - Structure for LSC configuration.
++ * @offset: Table Offset of the gain table.
++ * @gain_mode_n: Vertical dimension of a paxel in LSC configuration.
++ * @gain_mode_m: Horizontal dimension of a paxel in LSC configuration.
++ * @gain_format: Gain table format.
++ * @fmtsph: Start pixel horizontal from start of the HS sync pulse.
++ * @fmtlnh: Number of pixels in horizontal direction to use for the data
++ * reformatter.
++ * @fmtslv: Start line from start of VS sync pulse for the data reformatter.
++ * @fmtlnv: Number of lines in vertical direction for the data reformatter.
++ * @initial_x: X position, in pixels, of the first active pixel in reference
++ * to the first active paxel. Must be an even number.
++ * @initial_y: Y position, in pixels, of the first active pixel in reference
++ * to the first active paxel. Must be an even number.
++ * @size: Size of LSC gain table. Filled when loaded from userspace.
++ */
++struct ispccdc_lsc_config {
++ __u16 offset;
++ __u8 gain_mode_n;
++ __u8 gain_mode_m;
++ __u8 gain_format;
++ __u16 fmtsph;
++ __u16 fmtlnh;
++ __u16 fmtslv;
++ __u16 fmtlnv;
++ __u8 initial_x;
++ __u8 initial_y;
++ __u32 size;
++};
++
++/**
++ * struct ispccdc_bclamp - Structure for Optical & Digital black clamp subtract
++ * @obgain: Optical black average gain.
++ * @obstpixel: Start Pixel w.r.t. HS pulse in Optical black sample.
++ * @oblines: Optical Black Sample lines.
++ * @oblen: Optical Black Sample Length.
++ * @dcsubval: Digital Black Clamp subtract value.
++ */
++struct ispccdc_bclamp {
++ __u8 obgain;
++ __u8 obstpixel;
++ __u8 oblines;
++ __u8 oblen;
++ __u16 dcsubval;
++};
++
++/**
++ * ispccdc_fpc - Structure for FPC
++ * @fpnum: Number of faulty pixels to be corrected in the frame.
++ * @fpcaddr: Memory address of the FPC Table
++ */
++struct ispccdc_fpc {
++ __u16 fpnum;
++ __u32 fpcaddr;
++};
++
++/**
++ * ispccdc_blcomp - Structure for Black Level Compensation parameters.
++ * @b_mg: B/Mg pixels. 2's complement. -128 to +127.
++ * @gb_g: Gb/G pixels. 2's complement. -128 to +127.
++ * @gr_cy: Gr/Cy pixels. 2's complement. -128 to +127.
++ * @r_ye: R/Ye pixels. 2's complement. -128 to +127.
++ */
++struct ispccdc_blcomp {
++ __u8 b_mg;
++ __u8 gb_g;
++ __u8 gr_cy;
++ __u8 r_ye;
++};
++
++/**
++ * struct ispccdc_vp - Structure for Video Port parameters
++ * @bitshift_sel: Video port input select. 3 - bits 12-3, 4 - bits 11-2,
++ * 5 - bits 10-1, 6 - bits 9-0.
++ * @freq_sel: Video port data ready frequency. 1 - 1/3.5, 2 - 1/4.5,
++ * 3 - 1/5.5, 4 - 1/6.5.
++ */
++struct ispccdc_vp {
++ enum vpin bitshift_sel;
++ enum vpif_freq freq_sel;
++};
++
++/**
++ * ispccdc_culling - Structure for Culling parameters.
++ * @v_pattern: Vertical culling pattern.
++ * @h_odd: Horizontal Culling pattern for odd lines.
++ * @h_even: Horizontal Culling pattern for even lines.
++ */
++struct ispccdc_culling {
++ __u8 v_pattern;
++ __u16 h_odd;
++ __u16 h_even;
++};
++
++/**
++ * ispccdc_update_config - Structure for CCDC configuration.
++ * @update: Specifies which CCDC registers should be updated.
++ * @flag: Specifies which CCDC functions should be enabled.
++ * @alawip: Enable/Disable A-Law compression.
++ * @bclamp: Black clamp control register.
++ * @blcomp: Black level compensation value for RGrGbB Pixels. 2's complement.
++ * @fpc: Number of faulty pixels corrected in the frame, address of FPC table.
++ * @cull: Cull control register.
++ * @colptn: Color pattern of the sensor.
++ * @lsc: Pointer to LSC gain table.
++ */
++struct ispccdc_update_config {
++ __u16 update;
++ __u16 flag;
++ enum alaw_ipwidth alawip;
++ struct ispccdc_bclamp *bclamp;
++ struct ispccdc_blcomp *blcomp;
++ struct ispccdc_fpc *fpc;
++ struct ispccdc_lsc_config *lsc_cfg;
++ struct ispccdc_culling *cull;
++ __u32 colptn;
++ __u8 *lsc;
++};
++
++/* Preview configuration */
++
++/*Abstraction layer preview configurations*/
++#define ISP_ABS_PREV_LUMAENH (1 << 0)
++#define ISP_ABS_PREV_INVALAW (1 << 1)
++#define ISP_ABS_PREV_HRZ_MED (1 << 2)
++#define ISP_ABS_PREV_CFA (1 << 3)
++#define ISP_ABS_PREV_CHROMA_SUPP (1 << 4)
++#define ISP_ABS_PREV_WB (1 << 5)
++#define ISP_ABS_PREV_BLKADJ (1 << 6)
++#define ISP_ABS_PREV_RGB2RGB (1 << 7)
++#define ISP_ABS_PREV_COLOR_CONV (1 << 8)
++#define ISP_ABS_PREV_YC_LIMIT (1 << 9)
++#define ISP_ABS_PREV_DEFECT_COR (1 << 10)
++#define ISP_ABS_PREV_GAMMABYPASS (1 << 11)
++#define ISP_ABS_TBL_NF (1 << 12)
++#define ISP_ABS_TBL_REDGAMMA (1 << 13)
++#define ISP_ABS_TBL_GREENGAMMA (1 << 14)
++#define ISP_ABS_TBL_BLUEGAMMA (1 << 15)
++
++#define ISPPRV_NF_TBL_SIZE 64
++#define ISPPRV_CFA_TBL_SIZE 576
++#define ISPPRV_GAMMA_TBL_SIZE 1024
++#define ISPPRV_YENH_TBL_SIZE 128
++
++/**
++ * struct ispprev_hmed - Structure for Horizontal Median Filter.
++ * @odddist: Distance between consecutive pixels of same color in the odd line.
++ * @evendist: Distance between consecutive pixels of same color in the even
++ * line.
++ * @thres: Horizontal median filter threshold.
++ */
++struct ispprev_hmed {
++ __u8 odddist;
++ __u8 evendist;
++ __u8 thres;
++};
++
++/*
++ * Enumeration for CFA Formats supported by preview
++ */
++enum cfa_fmt {
++ CFAFMT_BAYER, CFAFMT_SONYVGA, CFAFMT_RGBFOVEON,
++ CFAFMT_DNSPL, CFAFMT_HONEYCOMB, CFAFMT_RRGGBBFOVEON
++};
++
++/**
++ * struct ispprev_cfa - Structure for CFA Inpterpolation.
++ * @cfafmt: CFA Format Enum value supported by preview.
++ * @cfa_gradthrs_vert: CFA Gradient Threshold - Vertical.
++ * @cfa_gradthrs_horz: CFA Gradient Threshold - Horizontal.
++ * @cfa_table: Pointer to the CFA table.
++ */
++struct ispprev_cfa {
++ enum cfa_fmt cfafmt;
++ __u8 cfa_gradthrs_vert;
++ __u8 cfa_gradthrs_horz;
++ __u32 *cfa_table;
++};
++
++/**
++ * struct ispprev_csup - Structure for Chrominance Suppression.
++ * @gain: Gain.
++ * @thres: Threshold.
++ * @hypf_en: Flag to enable/disable the High Pass Filter.
++ */
++struct ispprev_csup {
++ __u8 gain;
++ __u8 thres;
++ __u8 hypf_en;
++};
++
++/**
++ * struct ispprev_wbal - Structure for White Balance.
++ * @dgain: Digital gain (U10Q8).
++ * @coef3: White balance gain - COEF 3 (U8Q5).
++ * @coef2: White balance gain - COEF 2 (U8Q5).
++ * @coef1: White balance gain - COEF 1 (U8Q5).
++ * @coef0: White balance gain - COEF 0 (U8Q5).
++ */
++struct ispprev_wbal {
++ __u16 dgain;
++ __u8 coef3;
++ __u8 coef2;
++ __u8 coef1;
++ __u8 coef0;
++};
++
++/**
++ * struct ispprev_blkadj - Structure for Black Adjustment.
++ * @red: Black level offset adjustment for Red in 2's complement format
++ * @green: Black level offset adjustment for Green in 2's complement format
++ * @blue: Black level offset adjustment for Blue in 2's complement format
++ */
++struct ispprev_blkadj {
++ /*Black level offset adjustment for Red in 2's complement format */
++ __u8 red;
++ /*Black level offset adjustment for Green in 2's complement format */
++ __u8 green;
++ /* Black level offset adjustment for Blue in 2's complement format */
++ __u8 blue;
++};
++
++/**
++ * struct ispprev_rgbtorgb - Structure for RGB to RGB Blending.
++ * @matrix: Blending values(S12Q8 format)
++ * [RR] [GR] [BR]
++ * [RG] [GG] [BG]
++ * [RB] [GB] [BB]
++ * @offset: Blending offset value for R,G,B in 2's complement integer format.
++ */
++struct ispprev_rgbtorgb {
++ __u16 matrix[3][3];
++ __u16 offset[3];
++};
++
++/**
++ * struct ispprev_csc - Structure for Color Space Conversion from RGB-YCbYCr
++ * @matrix: Color space conversion coefficients(S10Q8)
++ * [CSCRY] [CSCGY] [CSCBY]
++ * [CSCRCB] [CSCGCB] [CSCBCB]
++ * [CSCRCR] [CSCGCR] [CSCBCR]
++ * @offset: CSC offset values for Y offset, CB offset and CR offset respectively
++ */
++struct ispprev_csc {
++ __u16 matrix[RGB_MAX][RGB_MAX];
++ __s16 offset[RGB_MAX];
++};
++
++/**
++ * struct ispprev_yclimit - Structure for Y, C Value Limit.
++ * @minC: Minimum C value
++ * @maxC: Maximum C value
++ * @minY: Minimum Y value
++ * @maxY: Maximum Y value
++ */
++struct ispprev_yclimit {
++ __u8 minC;
++ __u8 maxC;
++ __u8 minY;
++ __u8 maxY;
++};
++
++/**
++ * struct ispprev_dcor - Structure for Defect correction.
++ * @couplet_mode_en: Flag to enable or disable the couplet dc Correction in NF
++ * @detect_correct: Thresholds for correction bit 0:10 detect 16:25 correct
++ */
++struct ispprev_dcor {
++ __u8 couplet_mode_en;
++ __u32 detect_correct[4];
++};
++
++/**
++ * struct ispprev_nf - Structure for Noise Filter
++ * @spread: Spread value to be used in Noise Filter
++ * @table: Pointer to the Noise Filter table
++ */
++struct ispprev_nf {
++ __u8 spread;
++ __u32 table[ISPPRV_NF_TBL_SIZE];
++};
++
++/**
++ * struct ispprv_update_config - Structure for Preview Configuration (user).
++ * @update: Specifies which ISP Preview registers should be updated.
++ * @flag: Specifies which ISP Preview functions should be enabled.
++ * @yen: Pointer to luma enhancement table.
++ * @shading_shift: 3bit value of shift used in shading compensation.
++ * @prev_hmed: Pointer to structure containing the odd and even distance.
++ * between the pixels in the image along with the filter threshold.
++ * @prev_cfa: Pointer to structure containing the CFA interpolation table, CFA.
++ * format in the image, vertical and horizontal gradient threshold.
++ * @csup: Pointer to Structure for Chrominance Suppression coefficients.
++ * @prev_wbal: Pointer to structure for White Balance.
++ * @prev_blkadj: Pointer to structure for Black Adjustment.
++ * @rgb2rgb: Pointer to structure for RGB to RGB Blending.
++ * @prev_csc: Pointer to structure for Color Space Conversion from RGB-YCbYCr.
++ * @yclimit: Pointer to structure for Y, C Value Limit.
++ * @prev_dcor: Pointer to structure for defect correction.
++ * @prev_nf: Pointer to structure for Noise Filter
++ * @red_gamma: Pointer to red gamma correction table.
++ * @green_gamma: Pointer to green gamma correction table.
++ * @blue_gamma: Pointer to blue gamma correction table.
++ */
++struct ispprv_update_config {
++ __u16 update;
++ __u16 flag;
++ void *yen;
++ __u32 shading_shift;
++ struct ispprev_hmed *prev_hmed;
++ struct ispprev_cfa *prev_cfa;
++ struct ispprev_csup *csup;
++ struct ispprev_wbal *prev_wbal;
++ struct ispprev_blkadj *prev_blkadj;
++ struct ispprev_rgbtorgb *rgb2rgb;
++ struct ispprev_csc *prev_csc;
++ struct ispprev_yclimit *yclimit;
++ struct ispprev_dcor *prev_dcor;
++ struct ispprev_nf *prev_nf;
++ __u32 *red_gamma;
++ __u32 *green_gamma;
++ __u32 *blue_gamma;
++};
++
++#endif /* OMAP_ISP_USER_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0004-omap3isp-Add-ISP-frontend-CCDC.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0004-omap3isp-Add-ISP-frontend-CCDC.patch
new file mode 100644
index 0000000000..4a161729fd
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0004-omap3isp-Add-ISP-frontend-CCDC.patch
@@ -0,0 +1,1875 @@
+From 9ea796fe5383a6961125a6a18185a901fe8627d7 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add ISP frontend (CCDC)
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/isp/ispccdc.c | 1638 +++++++++++++++++++++++++++++++++++++
+ drivers/media/video/isp/ispccdc.h | 209 +++++
+ 2 files changed, 1847 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/ispccdc.c
+ create mode 100644 drivers/media/video/isp/ispccdc.h
+
+diff --git a/drivers/media/video/isp/ispccdc.c b/drivers/media/video/isp/ispccdc.c
+new file mode 100644
+index 0000000..2574ea2
+--- /dev/null
++++ b/drivers/media/video/isp/ispccdc.c
+@@ -0,0 +1,1638 @@
++/*
++ * ispccdc.c
++ *
++ * Driver Library for CCDC module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Senthilvadivu Guruswamy <svadivu@ti.com>
++ * Pallavi Kulkarni <p-kulkarni@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <linux/mutex.h>
++#include <linux/module.h>
++#include <linux/uaccess.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "ispccdc.h"
++#include "ispmmu.h"
++
++#define LSC_TABLE_INIT_SIZE 50052
++
++static u32 *fpc_table_add;
++static unsigned long fpc_table_add_m;
++
++/**
++ * struct isp_ccdc - Structure for the CCDC module to store its own information
++ * @ccdc_inuse: Flag to determine if CCDC has been reserved or not (0 or 1).
++ * @ccdcout_w: CCDC output width.
++ * @ccdcout_h: CCDC output height.
++ * @ccdcin_w: CCDC input width.
++ * @ccdcin_h: CCDC input height.
++ * @ccdcin_woffset: CCDC input horizontal offset.
++ * @ccdcin_hoffset: CCDC input vertical offset.
++ * @crop_w: Crop width.
++ * @crop_h: Crop weight.
++ * @ccdc_inpfmt: CCDC input format.
++ * @ccdc_outfmt: CCDC output format.
++ * @vpout_en: Video port output enable.
++ * @wen: Data write enable.
++ * @exwen: External data write enable.
++ * @refmt_en: Reformatter enable.
++ * @ccdcslave: CCDC slave mode enable.
++ * @syncif_ipmod: Image
++ * @obclamp_en: Data input format.
++ * @mutexlock: Mutex used to get access to the CCDC.
++ */
++static struct isp_ccdc {
++ u8 ccdc_inuse;
++ u32 ccdcout_w;
++ u32 ccdcout_h;
++ u32 ccdcin_w;
++ u32 ccdcin_h;
++ u32 ccdcin_woffset;
++ u32 ccdcin_hoffset;
++ u32 crop_w;
++ u32 crop_h;
++ u8 ccdc_inpfmt;
++ u8 ccdc_outfmt;
++ u8 vpout_en;
++ u8 wen;
++ u8 exwen;
++ u8 refmt_en;
++ u8 ccdcslave;
++ u8 syncif_ipmod;
++ u8 obclamp_en;
++ u8 pm_state;
++ u8 lsc_enable;
++ int lsc_state;
++ struct mutex mutexlock; /* For checking/modifying ccdc_inuse */
++ u32 wenlog;
++} ispccdc_obj;
++
++static struct ispccdc_lsc_config lsc_config;
++static u8 *lsc_gain_table;
++static unsigned long lsc_ispmmu_addr;
++static int lsc_initialized;
++static u8 *lsc_gain_table_tmp;
++
++/* Structure for saving/restoring CCDC module registers*/
++static struct isp_reg ispccdc_reg_list[] = {
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HD_VD_WID, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PIX_LINES, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HORZ_INFO, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VERT_START, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VERT_LINES, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CULLING, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HSIZE_OFF, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDR_ADDR, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CLAMP, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_DCSUB, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_COLPTN, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_BLKCMP, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC_ADDR, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VDINT, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_ALAW, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_REC656IF, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_HORZ, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_VERT, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR0, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR1, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR2, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR3, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR4, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR5, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR6, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_ADDR7, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PRGEVEN0, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PRGEVEN1, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PRGODD0, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PRGODD1, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VP_OUT, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_CONFIG, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_INITIAL, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_TABLE_BASE, 0},
++ {OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_TABLE_OFFSET, 0},
++ {0, ISP_TOK_TERM, 0}
++};
++
++/**
++ * omap34xx_isp_ccdc_config - Sets CCDC configuration from userspace
++ * @userspace_add: Structure containing CCDC configuration sent from userspace.
++ *
++ * Returns 0 if successful, -EINVAL if the pointer to the configuration
++ * structure is null, or the copy_from_user function fails to copy user space
++ * memory to kernel space memory.
++ **/
++int omap34xx_isp_ccdc_config(void *userspace_add)
++{
++ struct ispccdc_bclamp bclamp_t;
++ struct ispccdc_blcomp blcomp_t;
++ struct ispccdc_fpc fpc_t;
++ struct ispccdc_culling cull_t;
++ struct ispccdc_update_config *ccdc_struct;
++
++ if (userspace_add == NULL)
++ return -EINVAL;
++
++ ccdc_struct = userspace_add;
++
++ if (ISP_ABS_CCDC_ALAW & ccdc_struct->flag) {
++ if (ISP_ABS_CCDC_ALAW & ccdc_struct->update)
++ ispccdc_config_alaw(ccdc_struct->alawip);
++ ispccdc_enable_alaw(1);
++ } else if (ISP_ABS_CCDC_ALAW & ccdc_struct->update)
++ ispccdc_enable_alaw(0);
++
++ if (ISP_ABS_CCDC_LPF & ccdc_struct->flag)
++ ispccdc_enable_lpf(1);
++ else
++ ispccdc_enable_lpf(0);
++
++ if (ISP_ABS_CCDC_BLCLAMP & ccdc_struct->flag) {
++ if (ISP_ABS_CCDC_BLCLAMP & ccdc_struct->update) {
++ if (copy_from_user(&bclamp_t, (struct ispccdc_bclamp *)
++ ccdc_struct->bclamp,
++ sizeof(struct ispccdc_bclamp)))
++ goto copy_from_user_err;
++
++ ispccdc_enable_black_clamp(1);
++ ispccdc_config_black_clamp(bclamp_t);
++ } else
++ ispccdc_enable_black_clamp(1);
++ } else {
++ if (ISP_ABS_CCDC_BLCLAMP & ccdc_struct->update) {
++ if (copy_from_user(&bclamp_t, (struct ispccdc_bclamp *)
++ ccdc_struct->bclamp,
++ sizeof(struct ispccdc_bclamp)))
++ goto copy_from_user_err;
++
++ ispccdc_enable_black_clamp(0);
++ ispccdc_config_black_clamp(bclamp_t);
++ }
++ }
++
++ if (ISP_ABS_CCDC_BCOMP & ccdc_struct->update) {
++ if (copy_from_user(&blcomp_t, (struct ispccdc_blcomp *)
++ ccdc_struct->blcomp,
++ sizeof(blcomp_t)))
++ goto copy_from_user_err;
++
++ ispccdc_config_black_comp(blcomp_t);
++ }
++
++ if (ISP_ABS_CCDC_FPC & ccdc_struct->flag) {
++ if (ISP_ABS_CCDC_FPC & ccdc_struct->update) {
++ if (copy_from_user(&fpc_t, (struct ispccdc_fpc *)
++ ccdc_struct->fpc,
++ sizeof(fpc_t)))
++ goto copy_from_user_err;
++ fpc_table_add = kmalloc(64 + fpc_t.fpnum * 4,
++ GFP_KERNEL | GFP_DMA);
++ if (!fpc_table_add) {
++ printk(KERN_ERR "Cannot allocate memory for"
++ " FPC table");
++ return -ENOMEM;
++ }
++ while (((unsigned long)fpc_table_add & 0xFFFFFFC0)
++ != (unsigned long)fpc_table_add)
++ fpc_table_add++;
++
++ fpc_table_add_m = ispmmu_kmap(virt_to_phys
++ (fpc_table_add),
++ fpc_t.fpnum * 4);
++
++ if (copy_from_user(fpc_table_add, (u32 *)fpc_t.fpcaddr,
++ fpc_t.fpnum * 4))
++ goto copy_from_user_err;
++
++ fpc_t.fpcaddr = fpc_table_add_m;
++ ispccdc_config_fpc(fpc_t);
++ }
++ ispccdc_enable_fpc(1);
++ } else if (ISP_ABS_CCDC_FPC & ccdc_struct->update)
++ ispccdc_enable_fpc(0);
++
++ if (ISP_ABS_CCDC_CULL & ccdc_struct->update) {
++ if (copy_from_user(&cull_t, (struct ispccdc_culling *)
++ ccdc_struct->cull,
++ sizeof(cull_t)))
++ goto copy_from_user_err;
++ ispccdc_config_culling(cull_t);
++ }
++
++ if (is_isplsc_activated()) {
++ if (ISP_ABS_CCDC_CONFIG_LSC & ccdc_struct->flag) {
++ if (ISP_ABS_CCDC_CONFIG_LSC & ccdc_struct->update) {
++ if (copy_from_user(
++ &lsc_config,
++ (struct ispccdc_lsc_config *)
++ ccdc_struct->lsc_cfg,
++ sizeof(struct ispccdc_lsc_config)))
++ goto copy_from_user_err;
++ ispccdc_config_lsc(&lsc_config);
++ }
++ ispccdc_enable_lsc(1);
++ } else if (ISP_ABS_CCDC_CONFIG_LSC & ccdc_struct->update) {
++ ispccdc_enable_lsc(0);
++ }
++ if (ISP_ABS_TBL_LSC & ccdc_struct->update) {
++ if (copy_from_user(lsc_gain_table,
++ ccdc_struct->lsc, lsc_config.size))
++ goto copy_from_user_err;
++ ispccdc_load_lsc(lsc_gain_table, lsc_config.size);
++ }
++ }
++
++ if (ISP_ABS_CCDC_COLPTN & ccdc_struct->update)
++ ispccdc_config_imgattr(ccdc_struct->colptn);
++
++ return 0;
++
++copy_from_user_err:
++ printk(KERN_ERR "CCDC Config:Copy From User Error");
++ return -EINVAL ;
++}
++EXPORT_SYMBOL(omap34xx_isp_ccdc_config);
++
++/**
++ * Set the value to be used for CCDC_CFG.WENLOG.
++ * w - Value of wenlog.
++ */
++void ispccdc_set_wenlog(u32 wenlog)
++{
++ ispccdc_obj.wenlog = wenlog;
++}
++EXPORT_SYMBOL(ispccdc_set_wenlog);
++
++/**
++ * ispccdc_request - Reserves the CCDC module.
++ *
++ * Reserves the CCDC module and assures that is used only once at a time.
++ *
++ * Returns 0 if successful, or -EBUSY if CCDC module is busy.
++ **/
++int ispccdc_request(void)
++{
++ mutex_lock(&ispccdc_obj.mutexlock);
++ if (ispccdc_obj.ccdc_inuse) {
++ mutex_unlock(&ispccdc_obj.mutexlock);
++ DPRINTK_ISPCCDC("ISP_ERR : CCDC Module Busy\n");
++ return -EBUSY;
++ }
++
++ ispccdc_obj.ccdc_inuse = 1;
++ mutex_unlock(&ispccdc_obj.mutexlock);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL, ISPCTRL_CCDC_RAM_EN |
++ ISPCTRL_CCDC_CLK_EN |
++ ISPCTRL_SBL_WR1_RAM_EN);
++ isp_reg_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG, ISPCCDC_CFG_VDLC);
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_request);
++
++/**
++ * ispccdc_free - Frees the CCDC module.
++ *
++ * Frees the CCDC module so it can be used by another process.
++ *
++ * Returns 0 if successful, or -EINVAL if module has been already freed.
++ **/
++int ispccdc_free(void)
++{
++ mutex_lock(&ispccdc_obj.mutexlock);
++ if (!ispccdc_obj.ccdc_inuse) {
++ mutex_unlock(&ispccdc_obj.mutexlock);
++ DPRINTK_ISPCCDC("ISP_ERR: CCDC Module already freed\n");
++ return -EINVAL;
++ }
++
++ ispccdc_obj.ccdc_inuse = 0;
++ mutex_unlock(&ispccdc_obj.mutexlock);
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
++ ~(ISPCTRL_CCDC_CLK_EN |
++ ISPCTRL_CCDC_RAM_EN |
++ ISPCTRL_SBL_WR1_RAM_EN));
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_free);
++
++/**
++ * ispccdc_free_lsc - Frees Lens Shading Compensation table
++ *
++ * Always returns 0.
++ **/
++static int ispccdc_free_lsc(void)
++{
++ if (!lsc_ispmmu_addr)
++ return 0;
++
++ ispccdc_enable_lsc(0);
++ lsc_initialized = 0;
++ isp_reg_writel(0, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_TABLE_BASE);
++ ispmmu_kunmap(lsc_ispmmu_addr);
++ kfree(lsc_gain_table);
++ return 0;
++}
++
++/**
++ * ispccdc_allocate_lsc - Allocate space for Lens Shading Compensation table
++ * @table_size: LSC gain table size.
++ *
++ * Returns 0 if successful, -ENOMEM of its no memory available, or -EINVAL if
++ * table_size is zero.
++ **/
++static int ispccdc_allocate_lsc(u32 table_size)
++{
++ if (table_size == 0)
++ return -EINVAL;
++
++ if ((lsc_config.size >= table_size) && lsc_gain_table)
++ return 0;
++
++ ispccdc_free_lsc();
++
++ lsc_gain_table = kmalloc(table_size, GFP_KERNEL | GFP_DMA);
++
++ if (!lsc_gain_table) {
++ printk(KERN_ERR "Cannot allocate memory for gain tables \n");
++ return -ENOMEM;
++ }
++
++ lsc_ispmmu_addr = ispmmu_kmap(virt_to_phys(lsc_gain_table), table_size);
++ if (lsc_ispmmu_addr <= 0) {
++ printk(KERN_ERR "Cannot map memory for gain tables \n");
++ kfree(lsc_gain_table);
++ return -ENOMEM;
++ }
++
++ return 0;
++}
++
++/**
++ * ispccdc_program_lsc - Program Lens Shading Compensation table.
++ * @table_size: LSC gain table size.
++ *
++ * Returns 0 if successful, or -EINVAL if there's no mapped address for the
++ * table yet.
++ **/
++static int ispccdc_program_lsc(void)
++{
++ if (!lsc_ispmmu_addr)
++ return -EINVAL;
++
++ if (lsc_initialized)
++ return 0;
++
++ isp_reg_writel(lsc_ispmmu_addr, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_TABLE_BASE);
++ lsc_initialized = 1;
++ return 0;
++}
++
++/**
++ * ispccdc_load_lsc - Load Lens Shading Compensation table.
++ * @table_addr: LSC gain table MMU Mapped address.
++ * @table_size: LSC gain table size.
++ *
++ * Returns 0 if successful, -ENOMEM of its no memory available, or -EINVAL if
++ * table_size is zero.
++ **/
++int ispccdc_load_lsc(u8 *table_addr, u32 table_size)
++{
++ int ret;
++
++ if (!is_isplsc_activated())
++ return 0;
++
++ if (!table_addr)
++ return -EINVAL;
++
++ ret = ispccdc_allocate_lsc(table_size);
++ if (ret)
++ return ret;
++
++ if (table_addr != lsc_gain_table)
++ memcpy(lsc_gain_table, table_addr, table_size);
++ ret = ispccdc_program_lsc();
++ if (ret)
++ return ret;
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_load_lsc);
++
++/**
++ * ispccdc_config_lsc - Configures the lens shading compensation module
++ * @lsc_cfg: LSC configuration structure
++ **/
++void ispccdc_config_lsc(struct ispccdc_lsc_config *lsc_cfg)
++{
++ int reg;
++
++ if (!is_isplsc_activated())
++ return;
++
++ ispccdc_enable_lsc(0);
++ isp_reg_writel(lsc_cfg->offset, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_TABLE_OFFSET);
++
++ reg = 0;
++ reg |= lsc_cfg->gain_mode_n << ISPCCDC_LSC_GAIN_MODE_N_SHIFT;
++ reg |= lsc_cfg->gain_mode_m << ISPCCDC_LSC_GAIN_MODE_M_SHIFT;
++ reg |= lsc_cfg->gain_format << ISPCCDC_LSC_GAIN_FORMAT_SHIFT;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_CONFIG);
++
++ reg = 0;
++ reg &= ~ISPCCDC_LSC_INITIAL_X_MASK;
++ reg |= lsc_cfg->initial_x << ISPCCDC_LSC_INITIAL_X_SHIFT;
++ reg &= ~ISPCCDC_LSC_INITIAL_Y_MASK;
++ reg |= lsc_cfg->initial_y << ISPCCDC_LSC_INITIAL_Y_SHIFT;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_INITIAL);
++}
++EXPORT_SYMBOL(ispccdc_config_lsc);
++
++int __ispccdc_enable_lsc(u8 enable)
++{
++ if (!is_isplsc_activated())
++ return -ENODEV;
++
++ if (enable) {
++ if (!ispccdc_busy()) {
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
++ ISPCTRL_SBL_SHARED_RPORTB
++ | ISPCTRL_SBL_RD_RAM_EN);
++
++ isp_reg_or(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_CONFIG, 0x1);
++
++ ispccdc_obj.lsc_state = 1;
++ } else {
++ /* Postpone enabling LSC */
++ ispccdc_obj.lsc_enable = 1;
++ return -EBUSY;
++ }
++ } else {
++ isp_reg_and(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_CONFIG, 0xFFFE);
++ ispccdc_obj.lsc_state = ispccdc_obj.lsc_enable = 0;
++ }
++
++ return 0;
++}
++
++/**
++ * ispccdc_enable_lsc - Enables/Disables the Lens Shading Compensation module.
++ * @enable: 0 Disables LSC, 1 Enables LSC.
++ **/
++void ispccdc_enable_lsc(u8 enable)
++{
++ if (__ispccdc_enable_lsc(enable)) {
++ if (enable)
++ ispccdc_obj.lsc_state = 1;
++ else
++ ispccdc_obj.lsc_state = ispccdc_obj.lsc_enable = 0;
++ }
++}
++EXPORT_SYMBOL(ispccdc_enable_lsc);
++
++void ispccdc_lsc_error_handler(void)
++{
++ int lsc_enable = ispccdc_obj.lsc_state;
++
++ ispccdc_enable_lsc(0);
++
++ ispccdc_obj.lsc_enable = lsc_enable;
++}
++
++/**
++ * ispccdc_config_crop - Configures crop parameters for the ISP CCDC.
++ * @left: Left offset of the crop area.
++ * @top: Top offset of the crop area.
++ * @height: Height of the crop area.
++ * @width: Width of the crop area.
++ *
++ * The following restrictions are applied for the crop settings. If incoming
++ * values do not follow these restrictions then we map the settings to the
++ * closest acceptable crop value.
++ * 1) Left offset is always odd. This can be avoided if we enable byte swap
++ * option for incoming data into CCDC.
++ * 2) Top offset is always even.
++ * 3) Crop height is always even.
++ * 4) Crop width is always a multiple of 16 pixels
++ **/
++void ispccdc_config_crop(u32 left, u32 top, u32 height, u32 width)
++{
++ ispccdc_obj.ccdcin_woffset = left + (left % 2);
++ ispccdc_obj.ccdcin_hoffset = top + (top % 2);
++
++ ispccdc_obj.crop_w = width - (width % 16);
++ ispccdc_obj.crop_h = height + (height % 2);
++
++ DPRINTK_ISPCCDC("\n\tOffsets L %d T %d W %d H %d\n",
++ ispccdc_obj.ccdcin_woffset,
++ ispccdc_obj.ccdcin_hoffset,
++ ispccdc_obj.crop_w,
++ ispccdc_obj.crop_h);
++}
++
++/**
++ * ispccdc_config_datapath - Specifies the input and output modules for CCDC.
++ * @input: Indicates the module that inputs the image to the CCDC.
++ * @output: Indicates the module to which the CCDC outputs the image.
++ *
++ * Configures the default configuration for the CCDC to work with.
++ *
++ * The valid values for the input are CCDC_RAW (0), CCDC_YUV_SYNC (1),
++ * CCDC_YUV_BT (2), and CCDC_OTHERS (3).
++ *
++ * The valid values for the output are CCDC_YUV_RSZ (0), CCDC_YUV_MEM_RSZ (1),
++ * CCDC_OTHERS_VP (2), CCDC_OTHERS_MEM (3), CCDC_OTHERS_VP_MEM (4).
++ *
++ * Returns 0 if successful, or -EINVAL if wrong I/O combination or wrong input
++ * or output values.
++ **/
++int ispccdc_config_datapath(enum ccdc_input input, enum ccdc_output output)
++{
++ u32 syn_mode = 0;
++ struct ispccdc_vp vpcfg;
++ struct ispccdc_syncif syncif;
++ struct ispccdc_bclamp blkcfg;
++
++ u32 colptn = ISPCCDC_COLPTN_Gr_Cy << ISPCCDC_COLPTN_CP0PLC0_SHIFT |
++ ISPCCDC_COLPTN_R_Ye << ISPCCDC_COLPTN_CP0PLC1_SHIFT |
++ ISPCCDC_COLPTN_Gr_Cy << ISPCCDC_COLPTN_CP0PLC2_SHIFT |
++ ISPCCDC_COLPTN_R_Ye << ISPCCDC_COLPTN_CP0PLC3_SHIFT |
++ ISPCCDC_COLPTN_B_Mg << ISPCCDC_COLPTN_CP1PLC0_SHIFT |
++ ISPCCDC_COLPTN_Gb_G << ISPCCDC_COLPTN_CP1PLC1_SHIFT |
++ ISPCCDC_COLPTN_B_Mg << ISPCCDC_COLPTN_CP1PLC2_SHIFT |
++ ISPCCDC_COLPTN_Gb_G << ISPCCDC_COLPTN_CP1PLC3_SHIFT |
++ ISPCCDC_COLPTN_Gr_Cy << ISPCCDC_COLPTN_CP2PLC0_SHIFT |
++ ISPCCDC_COLPTN_R_Ye << ISPCCDC_COLPTN_CP2PLC1_SHIFT |
++ ISPCCDC_COLPTN_Gr_Cy << ISPCCDC_COLPTN_CP2PLC2_SHIFT |
++ ISPCCDC_COLPTN_R_Ye << ISPCCDC_COLPTN_CP2PLC3_SHIFT |
++ ISPCCDC_COLPTN_B_Mg << ISPCCDC_COLPTN_CP3PLC0_SHIFT |
++ ISPCCDC_COLPTN_Gb_G << ISPCCDC_COLPTN_CP3PLC1_SHIFT |
++ ISPCCDC_COLPTN_B_Mg << ISPCCDC_COLPTN_CP3PLC2_SHIFT |
++ ISPCCDC_COLPTN_Gb_G << ISPCCDC_COLPTN_CP3PLC3_SHIFT;
++
++ /* CCDC does not convert the image format */
++ if ((input == CCDC_RAW || input == CCDC_OTHERS) &&
++ output == CCDC_YUV_RSZ) {
++ DPRINTK_ISPCCDC("ISP_ERR: Wrong CCDC I/O Combination\n");
++ return -EINVAL;
++ }
++
++ syn_mode = isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
++
++ switch (output) {
++ case CCDC_YUV_RSZ:
++ syn_mode |= ISPCCDC_SYN_MODE_SDR2RSZ;
++ syn_mode &= ~ISPCCDC_SYN_MODE_WEN;
++ break;
++
++ case CCDC_YUV_MEM_RSZ:
++ syn_mode |= ISPCCDC_SYN_MODE_SDR2RSZ;
++ ispccdc_obj.wen = 1;
++ syn_mode |= ISPCCDC_SYN_MODE_WEN;
++ break;
++
++ case CCDC_OTHERS_VP:
++ syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR;
++ syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ;
++ syn_mode &= ~ISPCCDC_SYN_MODE_WEN;
++ vpcfg.bitshift_sel = BIT9_0;
++ vpcfg.freq_sel = PIXCLKBY2;
++ ispccdc_config_vp(vpcfg);
++ ispccdc_enable_vp(1);
++ break;
++
++ case CCDC_OTHERS_MEM:
++ syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR;
++ syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ;
++ syn_mode |= ISPCCDC_SYN_MODE_WEN;
++ syn_mode &= ~ISPCCDC_SYN_MODE_EXWEN;
++ isp_reg_and(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG,
++ ~ISPCCDC_CFG_WENLOG);
++ vpcfg.bitshift_sel = BIT11_2;
++ vpcfg.freq_sel = PIXCLKBY2;
++ ispccdc_config_vp(vpcfg);
++ ispccdc_enable_vp(0);
++ break;
++
++ case CCDC_OTHERS_VP_MEM:
++ syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR;
++ syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ;
++ syn_mode |= ISPCCDC_SYN_MODE_WEN;
++ syn_mode &= ~ISPCCDC_SYN_MODE_EXWEN;
++
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG,
++ ~ISPCCDC_CFG_WENLOG,
++ ispccdc_obj.wenlog);
++ vpcfg.bitshift_sel = BIT9_0;
++ vpcfg.freq_sel = PIXCLKBY2;
++ ispccdc_config_vp(vpcfg);
++ ispccdc_enable_vp(1);
++ break;
++ default:
++ DPRINTK_ISPCCDC("ISP_ERR: Wrong CCDC Output\n");
++ return -EINVAL;
++ };
++
++ isp_reg_writel(syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
++
++ switch (input) {
++ case CCDC_RAW:
++ syncif.ccdc_mastermode = 0;
++ syncif.datapol = 0;
++ syncif.datsz = DAT10;
++ syncif.fldmode = 0;
++ syncif.fldout = 0;
++ syncif.fldpol = 0;
++ syncif.fldstat = 0;
++ syncif.hdpol = 0;
++ syncif.ipmod = RAW;
++ syncif.vdpol = 0;
++ ispccdc_config_sync_if(syncif);
++ ispccdc_config_imgattr(colptn);
++ blkcfg.dcsubval = 64;
++ ispccdc_config_black_clamp(blkcfg);
++ if (is_isplsc_activated()) {
++ ispccdc_config_lsc(&lsc_config);
++ ispccdc_load_lsc(lsc_gain_table_tmp,
++ LSC_TABLE_INIT_SIZE);
++ }
++
++ break;
++ case CCDC_YUV_SYNC:
++ syncif.ccdc_mastermode = 0;
++ syncif.datapol = 0;
++ syncif.datsz = DAT8;
++ syncif.fldmode = 0;
++ syncif.fldout = 0;
++ syncif.fldpol = 0;
++ syncif.fldstat = 0;
++ syncif.hdpol = 0;
++ syncif.ipmod = YUV16;
++ syncif.vdpol = 1;
++ ispccdc_config_imgattr(0);
++ ispccdc_config_sync_if(syncif);
++ blkcfg.dcsubval = 0;
++ ispccdc_config_black_clamp(blkcfg);
++ break;
++ case CCDC_YUV_BT:
++ break;
++ case CCDC_OTHERS:
++ break;
++ default:
++ DPRINTK_ISPCCDC("ISP_ERR: Wrong CCDC Input\n");
++ return -EINVAL;
++ }
++
++ ispccdc_obj.ccdc_inpfmt = input;
++ ispccdc_obj.ccdc_outfmt = output;
++ ispccdc_print_status();
++ isp_print_status();
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_config_datapath);
++
++/**
++ * ispccdc_config_sync_if - Sets the sync i/f params between sensor and CCDC.
++ * @syncif: Structure containing the sync parameters like field state, CCDC in
++ * master/slave mode, raw/yuv data, polarity of data, field, hs, vs
++ * signals.
++ **/
++void ispccdc_config_sync_if(struct ispccdc_syncif syncif)
++{
++ u32 syn_mode = isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
++
++ syn_mode |= ISPCCDC_SYN_MODE_VDHDEN;
++
++ if (syncif.fldstat)
++ syn_mode |= ISPCCDC_SYN_MODE_FLDSTAT;
++ else
++ syn_mode &= ~ISPCCDC_SYN_MODE_FLDSTAT;
++
++ syn_mode &= ISPCCDC_SYN_MODE_INPMOD_MASK;
++ ispccdc_obj.syncif_ipmod = syncif.ipmod;
++
++ switch (syncif.ipmod) {
++ case RAW:
++ break;
++ case YUV16:
++ syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16;
++ break;
++ case YUV8:
++ syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR8;
++ break;
++ };
++
++ syn_mode &= ISPCCDC_SYN_MODE_DATSIZ_MASK;
++ switch (syncif.datsz) {
++ case DAT8:
++ syn_mode |= ISPCCDC_SYN_MODE_DATSIZ_8;
++ break;
++ case DAT10:
++ syn_mode |= ISPCCDC_SYN_MODE_DATSIZ_10;
++ break;
++ case DAT11:
++ syn_mode |= ISPCCDC_SYN_MODE_DATSIZ_11;
++ break;
++ case DAT12:
++ syn_mode |= ISPCCDC_SYN_MODE_DATSIZ_12;
++ break;
++ };
++
++ if (syncif.fldmode)
++ syn_mode |= ISPCCDC_SYN_MODE_FLDMODE;
++ else
++ syn_mode &= ~ISPCCDC_SYN_MODE_FLDMODE;
++
++ if (syncif.datapol)
++ syn_mode |= ISPCCDC_SYN_MODE_DATAPOL;
++ else
++ syn_mode &= ~ISPCCDC_SYN_MODE_DATAPOL;
++
++ if (syncif.fldpol)
++ syn_mode |= ISPCCDC_SYN_MODE_FLDPOL;
++ else
++ syn_mode &= ~ISPCCDC_SYN_MODE_FLDPOL;
++
++ if (syncif.hdpol)
++ syn_mode |= ISPCCDC_SYN_MODE_HDPOL;
++ else
++ syn_mode &= ~ISPCCDC_SYN_MODE_HDPOL;
++
++ if (syncif.vdpol)
++ syn_mode |= ISPCCDC_SYN_MODE_VDPOL;
++ else
++ syn_mode &= ~ISPCCDC_SYN_MODE_VDPOL;
++
++ if (syncif.ccdc_mastermode) {
++ syn_mode |= ISPCCDC_SYN_MODE_FLDOUT | ISPCCDC_SYN_MODE_VDHDOUT;
++ isp_reg_writel(syncif.hs_width << ISPCCDC_HD_VD_WID_HDW_SHIFT
++ | syncif.vs_width << ISPCCDC_HD_VD_WID_VDW_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_HD_VD_WID);
++
++ isp_reg_writel(syncif.ppln << ISPCCDC_PIX_LINES_PPLN_SHIFT
++ | syncif.hlprf << ISPCCDC_PIX_LINES_HLPRF_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_PIX_LINES);
++ } else
++ syn_mode &= ~(ISPCCDC_SYN_MODE_FLDOUT |
++ ISPCCDC_SYN_MODE_VDHDOUT);
++
++ isp_reg_writel(syn_mode, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE);
++
++ if (!(syncif.bt_r656_en)) {
++ isp_reg_and(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_REC656IF,
++ ~ISPCCDC_REC656IF_R656ON);
++ }
++}
++EXPORT_SYMBOL(ispccdc_config_sync_if);
++
++/**
++ * ispccdc_config_black_clamp - Configures the clamp parameters in CCDC.
++ * @bclamp: Structure containing the optical black average gain, optical black
++ * sample length, sample lines, and the start pixel position of the
++ * samples w.r.t the HS pulse.
++ * Configures the clamp parameters in CCDC. Either if its being used the
++ * optical black clamp, or the digital clamp. If its a digital clamp, then
++ * assures to put a valid DC substraction level.
++ *
++ * Returns always 0 when completed.
++ **/
++int ispccdc_config_black_clamp(struct ispccdc_bclamp bclamp)
++{
++ u32 bclamp_val = 0;
++
++ if (ispccdc_obj.obclamp_en) {
++ bclamp_val |= bclamp.obgain << ISPCCDC_CLAMP_OBGAIN_SHIFT;
++ bclamp_val |= bclamp.oblen << ISPCCDC_CLAMP_OBSLEN_SHIFT;
++ bclamp_val |= bclamp.oblines << ISPCCDC_CLAMP_OBSLN_SHIFT;
++ bclamp_val |= bclamp.obstpixel << ISPCCDC_CLAMP_OBST_SHIFT;
++ isp_reg_writel(bclamp_val, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_CLAMP);
++ } else {
++ if (omap_rev() < OMAP3430_REV_ES2_0)
++ if (ispccdc_obj.syncif_ipmod == YUV16 ||
++ ispccdc_obj.syncif_ipmod == YUV8 ||
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_REC656IF) &
++ ISPCCDC_REC656IF_R656ON)
++ bclamp.dcsubval = 0;
++ isp_reg_writel(bclamp.dcsubval, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_DCSUB);
++ }
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_config_black_clamp);
++
++/**
++ * ispccdc_enable_black_clamp - Enables/Disables the optical black clamp.
++ * @enable: 0 Disables optical black clamp, 1 Enables optical black clamp.
++ *
++ * Enables or disables the optical black clamp. When disabled, the digital
++ * clamp operates.
++ **/
++void ispccdc_enable_black_clamp(u8 enable)
++{
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CLAMP,
++ ~ISPCCDC_CLAMP_CLAMPEN,
++ enable ? ISPCCDC_CLAMP_CLAMPEN : 0);
++ ispccdc_obj.obclamp_en = enable;
++}
++EXPORT_SYMBOL(ispccdc_enable_black_clamp);
++
++/**
++ * ispccdc_config_fpc - Configures the Faulty Pixel Correction parameters.
++ * @fpc: Structure containing the number of faulty pixels corrected in the
++ * frame, address of the FPC table.
++ *
++ * Returns 0 if successful, or -EINVAL if FPC Address is not on the 64 byte
++ * boundary.
++ **/
++int ispccdc_config_fpc(struct ispccdc_fpc fpc)
++{
++ u32 fpc_val = 0;
++
++ fpc_val = isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC);
++
++ if ((fpc.fpcaddr & 0xFFFFFFC0) == fpc.fpcaddr) {
++ isp_reg_writel(fpc_val & (~ISPCCDC_FPC_FPCEN),
++ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC);
++ isp_reg_writel(fpc.fpcaddr,
++ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC_ADDR);
++ } else {
++ DPRINTK_ISPCCDC("FPC Address should be on 64byte boundary\n");
++ return -EINVAL;
++ }
++ isp_reg_writel(fpc_val | (fpc.fpnum << ISPCCDC_FPC_FPNUM_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC);
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_config_fpc);
++
++/**
++ * ispccdc_enable_fpc - Enables the Faulty Pixel Correction.
++ * @enable: 0 Disables FPC, 1 Enables FPC.
++ **/
++void ispccdc_enable_fpc(u8 enable)
++{
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FPC,
++ ~ISPCCDC_FPC_FPCEN,
++ enable ? ISPCCDC_FPC_FPCEN : 0);
++}
++EXPORT_SYMBOL(ispccdc_enable_fpc);
++
++/**
++ * ispccdc_config_black_comp - Configures Black Level Compensation parameters.
++ * @blcomp: Structure containing the black level compensation value for RGrGbB
++ * pixels. in 2's complement.
++ **/
++void ispccdc_config_black_comp(struct ispccdc_blcomp blcomp)
++{
++ u32 blcomp_val = 0;
++
++ blcomp_val |= blcomp.b_mg << ISPCCDC_BLKCMP_B_MG_SHIFT;
++ blcomp_val |= blcomp.gb_g << ISPCCDC_BLKCMP_GB_G_SHIFT;
++ blcomp_val |= blcomp.gr_cy << ISPCCDC_BLKCMP_GR_CY_SHIFT;
++ blcomp_val |= blcomp.r_ye << ISPCCDC_BLKCMP_R_YE_SHIFT;
++
++ isp_reg_writel(blcomp_val, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_BLKCMP);
++}
++EXPORT_SYMBOL(ispccdc_config_black_comp);
++
++/**
++ * ispccdc_config_vp - Configures the Video Port Configuration parameters.
++ * @vpcfg: Structure containing the Video Port input frequency, and the 10 bit
++ * format.
++ **/
++void ispccdc_config_vp(struct ispccdc_vp vpcfg)
++{
++ u32 fmtcfg_vp = isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG);
++
++ fmtcfg_vp &= ISPCCDC_FMTCFG_VPIN_MASK & ISPCCDC_FMTCF_VPIF_FRQ_MASK;
++
++ switch (vpcfg.bitshift_sel) {
++ case BIT9_0:
++ fmtcfg_vp |= ISPCCDC_FMTCFG_VPIN_9_0;
++ break;
++ case BIT10_1:
++ fmtcfg_vp |= ISPCCDC_FMTCFG_VPIN_10_1;
++ break;
++ case BIT11_2:
++ fmtcfg_vp |= ISPCCDC_FMTCFG_VPIN_11_2;
++ break;
++ case BIT12_3:
++ fmtcfg_vp |= ISPCCDC_FMTCFG_VPIN_12_3;
++ break;
++ };
++ switch (vpcfg.freq_sel) {
++ case PIXCLKBY2:
++ fmtcfg_vp |= ISPCCDC_FMTCF_VPIF_FRQ_BY2;
++ break;
++ case PIXCLKBY3_5:
++ fmtcfg_vp |= ISPCCDC_FMTCF_VPIF_FRQ_BY3;
++ break;
++ case PIXCLKBY4_5:
++ fmtcfg_vp |= ISPCCDC_FMTCF_VPIF_FRQ_BY4;
++ break;
++ case PIXCLKBY5_5:
++ fmtcfg_vp |= ISPCCDC_FMTCF_VPIF_FRQ_BY5;
++ break;
++ case PIXCLKBY6_5:
++ fmtcfg_vp |= ISPCCDC_FMTCF_VPIF_FRQ_BY6;
++ break;
++ };
++ isp_reg_writel(fmtcfg_vp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG);
++}
++EXPORT_SYMBOL(ispccdc_config_vp);
++
++/**
++ * ispccdc_enable_vp - Enables the Video Port.
++ * @enable: 0 Disables VP, 1 Enables VP
++ **/
++void ispccdc_enable_vp(u8 enable)
++{
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG,
++ ~ISPCCDC_FMTCFG_VPEN,
++ enable ? ISPCCDC_FMTCFG_VPEN : 0);
++}
++EXPORT_SYMBOL(ispccdc_enable_vp);
++
++/**
++ * ispccdc_config_reformatter - Configures the Reformatter.
++ * @refmt: Structure containing the memory address to format and the bit fields
++ * for the reformatter registers.
++ *
++ * Configures the Reformatter register values if line alternating is disabled.
++ * Else, just enabling line alternating is enough.
++ **/
++void ispccdc_config_reformatter(struct ispccdc_refmt refmt)
++{
++ u32 fmtcfg_val = 0;
++
++ fmtcfg_val = isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG);
++
++ if (refmt.lnalt)
++ fmtcfg_val |= ISPCCDC_FMTCFG_LNALT;
++ else {
++ fmtcfg_val &= ~ISPCCDC_FMTCFG_LNALT;
++ fmtcfg_val &= 0xFFFFF003;
++ fmtcfg_val |= refmt.lnum << ISPCCDC_FMTCFG_LNUM_SHIFT;
++ fmtcfg_val |= refmt.plen_even <<
++ ISPCCDC_FMTCFG_PLEN_EVEN_SHIFT;
++ fmtcfg_val |= refmt.plen_odd << ISPCCDC_FMTCFG_PLEN_ODD_SHIFT;
++
++ isp_reg_writel(refmt.prgeven0, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_PRGEVEN0);
++ isp_reg_writel(refmt.prgeven1, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_PRGEVEN1);
++ isp_reg_writel(refmt.prgodd0, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_PRGODD0);
++ isp_reg_writel(refmt.prgodd1, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_PRGODD1);
++ isp_reg_writel(refmt.fmtaddr0, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR0);
++ isp_reg_writel(refmt.fmtaddr1, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR1);
++ isp_reg_writel(refmt.fmtaddr2, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR2);
++ isp_reg_writel(refmt.fmtaddr3, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR3);
++ isp_reg_writel(refmt.fmtaddr4, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR4);
++ isp_reg_writel(refmt.fmtaddr5, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR5);
++ isp_reg_writel(refmt.fmtaddr6, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR6);
++ isp_reg_writel(refmt.fmtaddr7, OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_ADDR7);
++ }
++ isp_reg_writel(fmtcfg_val, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG);
++}
++EXPORT_SYMBOL(ispccdc_config_reformatter);
++
++/**
++ * ispccdc_enable_reformatter - Enables the Reformatter.
++ * @enable: 0 Disables Reformatter, 1- Enables Data Reformatter
++ **/
++void ispccdc_enable_reformatter(u8 enable)
++{
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG,
++ ~ISPCCDC_FMTCFG_FMTEN,
++ enable ? ISPCCDC_FMTCFG_FMTEN : 0);
++ ispccdc_obj.refmt_en = enable;
++}
++EXPORT_SYMBOL(ispccdc_enable_reformatter);
++
++/**
++ * ispccdc_config_culling - Configures the culling parameters.
++ * @cull: Structure containing the vertical culling pattern, and horizontal
++ * culling pattern for odd and even lines.
++ **/
++void ispccdc_config_culling(struct ispccdc_culling cull)
++{
++ u32 culling_val = 0;
++
++ culling_val |= cull.v_pattern << ISPCCDC_CULLING_CULV_SHIFT;
++ culling_val |= cull.h_even << ISPCCDC_CULLING_CULHEVN_SHIFT;
++ culling_val |= cull.h_odd << ISPCCDC_CULLING_CULHODD_SHIFT;
++
++ isp_reg_writel(culling_val, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CULLING);
++}
++EXPORT_SYMBOL(ispccdc_config_culling);
++
++/**
++ * ispccdc_enable_lpf - Enables the Low-Pass Filter (LPF).
++ * @enable: 0 Disables LPF, 1 Enables LPF
++ **/
++void ispccdc_enable_lpf(u8 enable)
++{
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE,
++ ~ISPCCDC_SYN_MODE_LPF,
++ enable ? ISPCCDC_SYN_MODE_LPF : 0);
++}
++EXPORT_SYMBOL(ispccdc_enable_lpf);
++
++/**
++ * ispccdc_config_alaw - Configures the input width for A-law.
++ * @ipwidth: Input width for A-law
++ **/
++void ispccdc_config_alaw(enum alaw_ipwidth ipwidth)
++{
++ isp_reg_writel(ipwidth << ISPCCDC_ALAW_GWDI_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC, ISPCCDC_ALAW);
++}
++EXPORT_SYMBOL(ispccdc_config_alaw);
++
++/**
++ * ispccdc_enable_alaw - Enables the A-law compression.
++ * @enable: 0 - Disables A-law, 1 - Enables A-law
++ **/
++void ispccdc_enable_alaw(u8 enable)
++{
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_ALAW,
++ ~ISPCCDC_ALAW_CCDTBL,
++ enable ? ISPCCDC_ALAW_CCDTBL : 0);
++}
++EXPORT_SYMBOL(ispccdc_enable_alaw);
++
++/**
++ * ispccdc_config_imgattr - Configures the sensor image specific attributes.
++ * @colptn: Color pattern of the sensor.
++ **/
++void ispccdc_config_imgattr(u32 colptn)
++{
++ isp_reg_writel(colptn, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_COLPTN);
++}
++EXPORT_SYMBOL(ispccdc_config_imgattr);
++
++void ispccdc_config_shadow_registers(void)
++{
++ if (ispccdc_obj.lsc_enable) {
++ ispccdc_enable_lsc(1);
++ ispccdc_obj.lsc_enable = 0;
++ }
++}
++
++/**
++ * ispccdc_try_size - Checks if requested Input/output dimensions are valid
++ * @input_w: input width for the CCDC in number of pixels per line
++ * @input_h: input height for the CCDC in number of lines
++ * @output_w: output width from the CCDC in number of pixels per line
++ * @output_h: output height for the CCDC in number of lines
++ *
++ * Calculates the number of pixels cropped if the reformater is disabled,
++ * Fills up the output width and height variables in the isp_ccdc structure.
++ *
++ * Returns 0 if successful, or -EINVAL if the input width is less than 2 pixels
++ **/
++int ispccdc_try_size(u32 input_w, u32 input_h, u32 *output_w, u32 *output_h)
++{
++ if (input_w < 32 || input_h < 32) {
++ DPRINTK_ISPCCDC("ISP_ERR: CCDC cannot handle input width less"
++ " than 32 pixels or height less than 32\n");
++ return -EINVAL;
++ }
++
++ if (ispccdc_obj.crop_w)
++ *output_w = ispccdc_obj.crop_w;
++ else
++ *output_w = input_w;
++
++ if (ispccdc_obj.crop_h)
++ *output_h = ispccdc_obj.crop_h;
++ else
++ *output_h = input_h;
++
++ if (!ispccdc_obj.refmt_en
++ && ispccdc_obj.ccdc_outfmt != CCDC_OTHERS_MEM
++ && ispccdc_obj.ccdc_outfmt != CCDC_OTHERS_VP_MEM)
++ *output_h -= 1;
++
++ if (ispccdc_obj.ccdc_outfmt == CCDC_OTHERS_MEM
++ || ispccdc_obj.ccdc_outfmt == CCDC_OTHERS_VP_MEM) {
++ if (*output_w % 16) {
++ *output_w -= (*output_w % 16);
++ *output_w += 16;
++ }
++ }
++
++ ispccdc_obj.ccdcout_w = *output_w;
++ ispccdc_obj.ccdcout_h = *output_h;
++ ispccdc_obj.ccdcin_w = input_w;
++ ispccdc_obj.ccdcin_h = input_h;
++
++ DPRINTK_ISPCCDC("try size: ccdcin_w=%u,ccdcin_h=%u,ccdcout_w=%u,"
++ " ccdcout_h=%u\n",
++ ispccdc_obj.ccdcin_w,
++ ispccdc_obj.ccdcin_h,
++ ispccdc_obj.ccdcout_w,
++ ispccdc_obj.ccdcout_h);
++
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_try_size);
++
++/**
++ * ispccdc_config_size - Configure the dimensions of the CCDC input/output
++ * @input_w: input width for the CCDC in number of pixels per line
++ * @input_h: input height for the CCDC in number of lines
++ * @output_w: output width from the CCDC in number of pixels per line
++ * @output_h: output height for the CCDC in number of lines
++ *
++ * Configures the appropriate values stored in the isp_ccdc structure to
++ * HORZ/VERT_INFO registers and the VP_OUT depending on whether the image
++ * is stored in memory or given to the another module in the ISP pipeline.
++ *
++ * Returns 0 if successful, or -EINVAL if try_size was not called before to
++ * validate the requested dimensions.
++ **/
++int ispccdc_config_size(u32 input_w, u32 input_h, u32 output_w, u32 output_h)
++{
++ DPRINTK_ISPCCDC("config size: input_w=%u, input_h=%u, output_w=%u,"
++ " output_h=%u\n",
++ input_w, input_h,
++ output_w, output_h);
++ if (output_w != ispccdc_obj.ccdcout_w
++ || output_h != ispccdc_obj.ccdcout_h) {
++ DPRINTK_ISPCCDC("ISP_ERR : ispccdc_try_size should"
++ " be called before config size\n");
++ return -EINVAL;
++ }
++
++ if (ispccdc_obj.ccdc_outfmt == CCDC_OTHERS_VP) {
++ isp_reg_writel((ispccdc_obj.ccdcin_woffset <<
++ ISPCCDC_FMT_HORZ_FMTSPH_SHIFT) |
++ (ispccdc_obj.ccdcin_w <<
++ ISPCCDC_FMT_HORZ_FMTLNH_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_HORZ);
++ isp_reg_writel((ispccdc_obj.ccdcin_hoffset <<
++ ISPCCDC_FMT_VERT_FMTSLV_SHIFT) |
++ (ispccdc_obj.ccdcin_h <<
++ ISPCCDC_FMT_VERT_FMTLNV_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_VERT);
++ isp_reg_writel((ispccdc_obj.ccdcout_w <<
++ ISPCCDC_VP_OUT_HORZ_NUM_SHIFT) |
++ (ispccdc_obj.ccdcout_h - 1) <<
++ ISPCCDC_VP_OUT_VERT_NUM_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VP_OUT);
++ isp_reg_writel((((ispccdc_obj.ccdcout_h - 25) &
++ ISPCCDC_VDINT_0_MASK) <<
++ ISPCCDC_VDINT_0_SHIFT) |
++ ((50 & ISPCCDC_VDINT_1_MASK) <<
++ ISPCCDC_VDINT_1_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VDINT);
++
++ } else if (ispccdc_obj.ccdc_outfmt == CCDC_OTHERS_MEM) {
++ isp_reg_writel(0, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VP_OUT);
++ if (ispccdc_obj.ccdc_inpfmt == CCDC_RAW) {
++ isp_reg_writel(0 << ISPCCDC_HORZ_INFO_SPH_SHIFT
++ | ((ispccdc_obj.ccdcout_w - 1)
++ << ISPCCDC_HORZ_INFO_NPH_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_HORZ_INFO);
++ } else {
++ isp_reg_writel(0 << ISPCCDC_HORZ_INFO_SPH_SHIFT
++ | ((ispccdc_obj.ccdcout_w - 1)
++ << ISPCCDC_HORZ_INFO_NPH_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_HORZ_INFO);
++ }
++ isp_reg_writel(0 << ISPCCDC_VERT_START_SLV0_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_START);
++ isp_reg_writel((ispccdc_obj.ccdcout_h - 1) <<
++ ISPCCDC_VERT_LINES_NLV_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_LINES);
++
++ ispccdc_config_outlineoffset(ispccdc_obj.ccdcout_w * 2, 0, 0);
++ isp_reg_writel((((ispccdc_obj.ccdcout_h - 2) &
++ ISPCCDC_VDINT_0_MASK) <<
++ ISPCCDC_VDINT_0_SHIFT) |
++ ((100 & ISPCCDC_VDINT_1_MASK) <<
++ ISPCCDC_VDINT_1_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VDINT);
++ } else if (ispccdc_obj.ccdc_outfmt == CCDC_OTHERS_VP_MEM) {
++ isp_reg_writel((0 << ISPCCDC_FMT_HORZ_FMTSPH_SHIFT) |
++ (ispccdc_obj.ccdcin_w <<
++ ISPCCDC_FMT_HORZ_FMTLNH_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_HORZ);
++ isp_reg_writel((0 << ISPCCDC_FMT_VERT_FMTSLV_SHIFT) |
++ ((ispccdc_obj.ccdcin_h) <<
++ ISPCCDC_FMT_VERT_FMTLNV_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_FMT_VERT);
++ isp_reg_writel((ispccdc_obj.ccdcout_w
++ << ISPCCDC_VP_OUT_HORZ_NUM_SHIFT) |
++ ((ispccdc_obj.ccdcout_h - 1) <<
++ ISPCCDC_VP_OUT_VERT_NUM_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VP_OUT);
++ isp_reg_writel(0 << ISPCCDC_HORZ_INFO_SPH_SHIFT |
++ ((ispccdc_obj.ccdcout_w - 1) <<
++ ISPCCDC_HORZ_INFO_NPH_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_HORZ_INFO);
++ isp_reg_writel(0 << ISPCCDC_VERT_START_SLV0_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_START);
++ isp_reg_writel((ispccdc_obj.ccdcout_h - 1) <<
++ ISPCCDC_VERT_LINES_NLV_SHIFT,
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_LINES);
++ ispccdc_config_outlineoffset(ispccdc_obj.ccdcout_w * 2, 0, 0);
++ isp_reg_writel((((ispccdc_obj.ccdcout_h - 2) &
++ ISPCCDC_VDINT_0_MASK) <<
++ ISPCCDC_VDINT_0_SHIFT) |
++ ((100 & ISPCCDC_VDINT_1_MASK) <<
++ ISPCCDC_VDINT_1_SHIFT),
++ OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VDINT);
++ }
++
++ if (is_isplsc_activated()) {
++ if (ispccdc_obj.ccdc_inpfmt == CCDC_RAW) {
++ ispccdc_config_lsc(&lsc_config);
++ ispccdc_load_lsc(lsc_gain_table, lsc_config.size);
++ }
++ }
++
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_config_size);
++
++/**
++ * ispccdc_config_outlineoffset - Configures the output line offset
++ * @offset: Must be twice the Output width and aligned on 32 byte boundary
++ * @oddeven: Specifies the odd/even line pattern to be chosen to store the
++ * output.
++ * @numlines: Set the value 0-3 for +1-4lines, 4-7 for -1-4lines.
++ *
++ * - Configures the output line offset when stored in memory
++ * - Sets the odd/even line pattern to store the output
++ * (EVENEVEN (1), ODDEVEN (2), EVENODD (3), ODDODD (4))
++ * - Configures the number of even and odd line fields in case of rearranging
++ * the lines.
++ *
++ * Returns 0 if successful, or -EINVAL if the offset is not in 32 byte
++ * boundary.
++ **/
++int ispccdc_config_outlineoffset(u32 offset, u8 oddeven, u8 numlines)
++{
++ if ((offset & ISP_32B_BOUNDARY_OFFSET) == offset) {
++ isp_reg_writel((offset & 0xFFFF), OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_HSIZE_OFF);
++ } else {
++ DPRINTK_ISPCCDC("ISP_ERR : Offset should be in 32 byte"
++ " boundary\n");
++ return -EINVAL;
++ }
++
++ isp_reg_and(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
++ ~ISPCCDC_SDOFST_FINV);
++
++ isp_reg_and(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
++ ~ISPCCDC_SDOFST_FOFST_4L);
++
++ switch (oddeven) {
++ case EVENEVEN:
++ isp_reg_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
++ (numlines & 0x7) << ISPCCDC_SDOFST_LOFST0_SHIFT);
++ break;
++ case ODDEVEN:
++ isp_reg_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
++ (numlines & 0x7) << ISPCCDC_SDOFST_LOFST1_SHIFT);
++ break;
++ case EVENODD:
++ isp_reg_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
++ (numlines & 0x7) << ISPCCDC_SDOFST_LOFST2_SHIFT);
++ break;
++ case ODDODD:
++ isp_reg_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST,
++ (numlines & 0x7) << ISPCCDC_SDOFST_LOFST3_SHIFT);
++ break;
++ default:
++ break;
++ }
++ return 0;
++}
++EXPORT_SYMBOL(ispccdc_config_outlineoffset);
++
++/**
++ * ispccdc_set_outaddr - Sets the memory address where the output will be saved
++ * @addr: 32-bit memory address aligned on 32 byte boundary.
++ *
++ * Sets the memory address where the output will be saved.
++ *
++ * Returns 0 if successful, or -EINVAL if the address is not in the 32 byte
++ * boundary.
++ **/
++int ispccdc_set_outaddr(u32 addr)
++{
++ if ((addr & ISP_32B_BOUNDARY_BUF) == addr) {
++ isp_reg_writel(addr, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDR_ADDR);
++ return 0;
++ } else {
++ DPRINTK_ISPCCDC("ISP_ERR : Address should be in 32 byte"
++ " boundary\n");
++ return -EINVAL;
++ }
++
++}
++EXPORT_SYMBOL(ispccdc_set_outaddr);
++
++void __ispccdc_enable(u8 enable)
++{
++ if (enable) {
++ if (ispccdc_obj.lsc_enable
++ && ispccdc_obj.ccdc_inpfmt == CCDC_RAW)
++ ispccdc_enable_lsc(1);
++
++ } else {
++ ispccdc_obj.lsc_enable = ispccdc_obj.lsc_state;
++ }
++
++ isp_reg_and_or(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PCR, ~ISPCCDC_PCR_EN,
++ enable ? ISPCCDC_PCR_EN : 0);
++}
++
++/**
++ * ispccdc_enable - Enables the CCDC module.
++ * @enable: 0 Disables CCDC, 1 Enables CCDC
++ *
++ * Client should configure all the sub modules in CCDC before this.
++ **/
++void ispccdc_enable(u8 enable)
++{
++ __ispccdc_enable(enable);
++ ispccdc_obj.pm_state = enable;
++}
++EXPORT_SYMBOL(ispccdc_enable);
++
++/**
++ * ispccdc_suspend - Suspend the CCDC module.
++ **/
++void ispccdc_suspend(void)
++{
++ if (ispccdc_obj.pm_state) {
++ if (ispccdc_obj.lsc_state)
++ __ispccdc_enable_lsc(0);
++ else if (ispccdc_obj.lsc_enable) {
++ ispccdc_obj.lsc_state = 1;
++ ispccdc_obj.lsc_enable = 0;
++ }
++ __ispccdc_enable(0);
++ }
++}
++EXPORT_SYMBOL(ispccdc_suspend);
++
++/**
++ * ispccdc_resume - Resume the CCDC module.
++ **/
++void ispccdc_resume(void)
++{
++ if (ispccdc_obj.pm_state) {
++ if (ispccdc_obj.lsc_state)
++ __ispccdc_enable_lsc(1);
++ __ispccdc_enable(1);
++ }
++}
++EXPORT_SYMBOL(ispccdc_resume);
++
++/*
++ * Returns zero if the CCDC is idle and the image has been written to
++ * memory, too.
++ */
++int ispccdc_sbl_busy(void)
++{
++ return ispccdc_busy()
++ | (isp_reg_readl(OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_0) &
++ ISPSBL_CCDC_WR_0_DATA_READY)
++ | (isp_reg_readl(OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_1) &
++ ISPSBL_CCDC_WR_0_DATA_READY)
++ | (isp_reg_readl(OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_2) &
++ ISPSBL_CCDC_WR_0_DATA_READY)
++ | (isp_reg_readl(OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_3) &
++ ISPSBL_CCDC_WR_0_DATA_READY);
++}
++EXPORT_SYMBOL(ispccdc_sbl_busy);
++
++/**
++ * ispccdc_busy - Gets busy state of the CCDC.
++ **/
++int ispccdc_busy(void)
++{
++ return isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PCR) &
++ ISPCCDC_PCR_BUSY;
++}
++EXPORT_SYMBOL(ispccdc_busy);
++
++/**
++ * ispccdc_save_context - Saves the values of the CCDC module registers
++ **/
++void ispccdc_save_context(void)
++{
++ DPRINTK_ISPCCDC("Saving context\n");
++ isp_save_context(ispccdc_reg_list);
++}
++EXPORT_SYMBOL(ispccdc_save_context);
++
++/**
++ * ispccdc_restore_context - Restores the values of the CCDC module registers
++ **/
++void ispccdc_restore_context(void)
++{
++ DPRINTK_ISPCCDC("Restoring context\n");
++ isp_restore_context(ispccdc_reg_list);
++}
++EXPORT_SYMBOL(ispccdc_restore_context);
++
++/**
++ * ispccdc_print_status - Prints the values of the CCDC Module registers
++ *
++ * Also prints other debug information stored in the CCDC module.
++ **/
++void ispccdc_print_status(void)
++{
++ if (!is_ispccdc_debug_enabled())
++ return;
++
++ DPRINTK_ISPCCDC("Module in use =%d\n", ispccdc_obj.ccdc_inuse);
++ DPRINTK_ISPCCDC("Accepted CCDC Input (width = %d,Height = %d)\n",
++ ispccdc_obj.ccdcin_w,
++ ispccdc_obj.ccdcin_h);
++ DPRINTK_ISPCCDC("Accepted CCDC Output (width = %d,Height = %d)\n",
++ ispccdc_obj.ccdcout_w,
++ ispccdc_obj.ccdcout_h);
++ DPRINTK_ISPCCDC("###CCDC PCR=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_PCR));
++ DPRINTK_ISPCCDC("ISP_CTRL =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL));
++ switch (ispccdc_obj.ccdc_inpfmt) {
++ case CCDC_RAW:
++ DPRINTK_ISPCCDC("ccdc input format is CCDC_RAW\n");
++ break;
++ case CCDC_YUV_SYNC:
++ DPRINTK_ISPCCDC("ccdc input format is CCDC_YUV_SYNC\n");
++ break;
++ case CCDC_YUV_BT:
++ DPRINTK_ISPCCDC("ccdc input format is CCDC_YUV_BT\n");
++ break;
++ }
++
++ switch (ispccdc_obj.ccdc_outfmt) {
++ case CCDC_OTHERS_VP:
++ DPRINTK_ISPCCDC("ccdc output format is CCDC_OTHERS_VP\n");
++ break;
++ case CCDC_OTHERS_MEM:
++ DPRINTK_ISPCCDC("ccdc output format is CCDC_OTHERS_MEM\n");
++ break;
++ case CCDC_YUV_RSZ:
++ DPRINTK_ISPCCDC("ccdc output format is CCDC_YUV_RSZ\n");
++ break;
++ }
++
++ DPRINTK_ISPCCDC("###ISP_CTRL in ccdc =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL));
++ DPRINTK_ISPCCDC("###ISP_IRQ0ENABLE in ccdc =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE));
++ DPRINTK_ISPCCDC("###ISP_IRQ0STATUS in ccdc =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS));
++ DPRINTK_ISPCCDC("###CCDC SYN_MODE=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE));
++ DPRINTK_ISPCCDC("###CCDC HORZ_INFO=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HORZ_INFO));
++ DPRINTK_ISPCCDC("###CCDC VERT_START=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_START));
++ DPRINTK_ISPCCDC("###CCDC VERT_LINES=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_LINES));
++ DPRINTK_ISPCCDC("###CCDC CULLING=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CULLING));
++ DPRINTK_ISPCCDC("###CCDC HSIZE_OFF=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HSIZE_OFF));
++ DPRINTK_ISPCCDC("###CCDC SDOFST=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDOFST));
++ DPRINTK_ISPCCDC("###CCDC SDR_ADDR=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDR_ADDR));
++ DPRINTK_ISPCCDC("###CCDC CLAMP=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CLAMP));
++ DPRINTK_ISPCCDC("###CCDC COLPTN=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_COLPTN));
++ DPRINTK_ISPCCDC("###CCDC CFG=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG));
++ DPRINTK_ISPCCDC("###CCDC VP_OUT=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_VP_OUT));
++ DPRINTK_ISPCCDC("###CCDC_SDR_ADDR= 0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDR_ADDR));
++ DPRINTK_ISPCCDC("###CCDC FMTCFG=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG));
++ DPRINTK_ISPCCDC("###CCDC FMT_HORZ=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_HORZ));
++ DPRINTK_ISPCCDC("###CCDC FMT_VERT=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMT_VERT));
++ DPRINTK_ISPCCDC("###CCDC LSC_CONFIG=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_CONFIG));
++ DPRINTK_ISPCCDC("###CCDC LSC_INIT=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_INITIAL));
++ DPRINTK_ISPCCDC("###CCDC LSC_TABLE BASE=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_TABLE_BASE));
++ DPRINTK_ISPCCDC("###CCDC LSC TABLE OFFSET=0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_LSC_TABLE_OFFSET));
++}
++EXPORT_SYMBOL(ispccdc_print_status);
++
++/**
++ * isp_ccdc_init - CCDC module initialization.
++ *
++ * Always returns 0
++ **/
++int __init isp_ccdc_init(void)
++{
++ ispccdc_obj.ccdc_inuse = 0;
++ ispccdc_config_crop(0, 0, 0, 0);
++ mutex_init(&ispccdc_obj.mutexlock);
++
++ if (is_isplsc_activated()) {
++ lsc_gain_table_tmp = kmalloc(LSC_TABLE_INIT_SIZE, GFP_KERNEL |
++ GFP_DMA);
++ memset(lsc_gain_table_tmp, 0x40, LSC_TABLE_INIT_SIZE);
++ lsc_config.initial_x = 0;
++ lsc_config.initial_y = 0;
++ lsc_config.gain_mode_n = 0x6;
++ lsc_config.gain_mode_m = 0x6;
++ lsc_config.gain_format = 0x4;
++ lsc_config.offset = 0x60;
++ lsc_config.size = LSC_TABLE_INIT_SIZE;
++ ispccdc_obj.lsc_enable = 1;
++ }
++
++ return 0;
++}
++
++/**
++ * isp_ccdc_cleanup - CCDC module cleanup.
++ **/
++void isp_ccdc_cleanup(void)
++{
++ if (is_isplsc_activated()) {
++ ispccdc_free_lsc();
++ kfree(lsc_gain_table_tmp);
++ }
++
++ if (fpc_table_add_m != 0) {
++ ispmmu_kunmap(fpc_table_add_m);
++ kfree(fpc_table_add);
++ }
++}
+diff --git a/drivers/media/video/isp/ispccdc.h b/drivers/media/video/isp/ispccdc.h
+new file mode 100644
+index 0000000..4ef40a6
+--- /dev/null
++++ b/drivers/media/video/isp/ispccdc.h
+@@ -0,0 +1,209 @@
++/*
++ * ispccdc.h
++ *
++ * Driver header file for CCDC module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Senthilvadivu Guruswamy <svadivu@ti.com>
++ * Pallavi Kulkarni <p-kulkarni@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_CCDC_H
++#define OMAP_ISP_CCDC_H
++
++#include <mach/isp_user.h>
++
++#define is_isplsc_activated() 1
++
++/* Enumeration constants for CCDC input output format */
++enum ccdc_input {
++ CCDC_RAW,
++ CCDC_YUV_SYNC,
++ CCDC_YUV_BT,
++ CCDC_OTHERS
++};
++
++enum ccdc_output {
++ CCDC_YUV_RSZ,
++ CCDC_YUV_MEM_RSZ,
++ CCDC_OTHERS_VP,
++ CCDC_OTHERS_MEM,
++ CCDC_OTHERS_VP_MEM
++};
++
++/* Enumeration constants for the sync interface parameters */
++enum inpmode {
++ RAW,
++ YUV16,
++ YUV8
++};
++enum datasize {
++ DAT8,
++ DAT10,
++ DAT11,
++ DAT12
++};
++
++
++/**
++ * struct ispccdc_syncif - Structure for Sync Interface between sensor and CCDC
++ * @ccdc_mastermode: Master mode. 1 - Master, 0 - Slave.
++ * @fldstat: Field state. 0 - Odd Field, 1 - Even Field.
++ * @ipmod: Input mode.
++ * @datsz: Data size.
++ * @fldmode: 0 - Progressive, 1 - Interlaced.
++ * @datapol: 0 - Positive, 1 - Negative.
++ * @fldpol: 0 - Positive, 1 - Negative.
++ * @hdpol: 0 - Positive, 1 - Negative.
++ * @vdpol: 0 - Positive, 1 - Negative.
++ * @fldout: 0 - Input, 1 - Output.
++ * @hs_width: Width of the Horizontal Sync pulse, used for HS/VS Output.
++ * @vs_width: Width of the Vertical Sync pulse, used for HS/VS Output.
++ * @ppln: Number of pixels per line, used for HS/VS Output.
++ * @hlprf: Number of half lines per frame, used for HS/VS Output.
++ * @bt_r656_en: 1 - Enable ITU-R BT656 mode, 0 - Sync mode.
++ */
++struct ispccdc_syncif {
++ u8 ccdc_mastermode;
++ u8 fldstat;
++ enum inpmode ipmod;
++ enum datasize datsz;
++ u8 fldmode;
++ u8 datapol;
++ u8 fldpol;
++ u8 hdpol;
++ u8 vdpol;
++ u8 fldout;
++ u8 hs_width;
++ u8 vs_width;
++ u8 ppln;
++ u8 hlprf;
++ u8 bt_r656_en;
++};
++
++/**
++ * ispccdc_refmt - Structure for Reformatter parameters
++ * @lnalt: Line alternating mode enable. 0 - Enable, 1 - Disable.
++ * @lnum: Number of output lines from 1 input line. 1 to 4 lines.
++ * @plen_even: Number of program entries in even line minus 1.
++ * @plen_odd: Number of program entries in odd line minus 1.
++ * @prgeven0: Program entries 0-7 for even lines register
++ * @prgeven1: Program entries 8-15 for even lines register
++ * @prgodd0: Program entries 0-7 for odd lines register
++ * @prgodd1: Program entries 8-15 for odd lines register
++ * @fmtaddr0: Output line in which the original pixel is to be placed
++ * @fmtaddr1: Output line in which the original pixel is to be placed
++ * @fmtaddr2: Output line in which the original pixel is to be placed
++ * @fmtaddr3: Output line in which the original pixel is to be placed
++ * @fmtaddr4: Output line in which the original pixel is to be placed
++ * @fmtaddr5: Output line in which the original pixel is to be placed
++ * @fmtaddr6: Output line in which the original pixel is to be placed
++ * @fmtaddr7: Output line in which the original pixel is to be placed
++ */
++struct ispccdc_refmt {
++ u8 lnalt;
++ u8 lnum;
++ u8 plen_even;
++ u8 plen_odd;
++ u32 prgeven0;
++ u32 prgeven1;
++ u32 prgodd0;
++ u32 prgodd1;
++ u32 fmtaddr0;
++ u32 fmtaddr1;
++ u32 fmtaddr2;
++ u32 fmtaddr3;
++ u32 fmtaddr4;
++ u32 fmtaddr5;
++ u32 fmtaddr6;
++ u32 fmtaddr7;
++};
++
++int ispccdc_request(void);
++
++int ispccdc_free(void);
++
++int ispccdc_config_datapath(enum ccdc_input input, enum ccdc_output output);
++
++void ispccdc_config_crop(u32 left, u32 top, u32 height, u32 width);
++
++void ispccdc_config_sync_if(struct ispccdc_syncif syncif);
++
++int ispccdc_config_black_clamp(struct ispccdc_bclamp bclamp);
++
++void ispccdc_enable_black_clamp(u8 enable);
++
++int ispccdc_config_fpc(struct ispccdc_fpc fpc);
++
++void ispccdc_enable_fpc(u8 enable);
++
++void ispccdc_config_black_comp(struct ispccdc_blcomp blcomp);
++
++void ispccdc_config_vp(struct ispccdc_vp vp);
++
++void ispccdc_enable_vp(u8 enable);
++
++void ispccdc_config_reformatter(struct ispccdc_refmt refmt);
++
++void ispccdc_enable_reformatter(u8 enable);
++
++void ispccdc_config_culling(struct ispccdc_culling culling);
++
++void ispccdc_enable_lpf(u8 enable);
++
++void ispccdc_config_alaw(enum alaw_ipwidth ipwidth);
++
++void ispccdc_enable_alaw(u8 enable);
++
++int ispccdc_load_lsc(u8 *table_addr, u32 table_size);
++
++void ispccdc_config_lsc(struct ispccdc_lsc_config *lsc_cfg);
++
++void ispccdc_enable_lsc(u8 enable);
++
++void ispccdc_lsc_error_handler(void);
++
++void ispccdc_config_imgattr(u32 colptn);
++
++void ispccdc_config_shadow_registers(void);
++
++int ispccdc_try_size(u32 input_w, u32 input_h, u32 *output_w, u32 *output_h);
++
++int ispccdc_config_size(u32 input_w, u32 input_h, u32 output_w, u32 output_h);
++
++int ispccdc_config_outlineoffset(u32 offset, u8 oddeven, u8 numlines);
++
++int ispccdc_set_outaddr(u32 addr);
++
++void ispccdc_enable(u8 enable);
++
++void ispccdc_suspend(void);
++
++void ispccdc_resume(void);
++
++int ispccdc_sbl_busy(void);
++
++int ispccdc_busy(void);
++
++void ispccdc_save_context(void);
++
++void ispccdc_restore_context(void);
++
++void ispccdc_print_status(void);
++
++int omap34xx_isp_ccdc_config(void *userspace_add);
++
++void ispccdc_set_wenlog(u32 wenlog);
++
++#endif /* OMAP_ISP_CCDC_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0005-omap3isp-Add-ISP-backend-PRV-and-RSZ.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0005-omap3isp-Add-ISP-backend-PRV-and-RSZ.patch
new file mode 100644
index 0000000000..c549eadc88
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0005-omap3isp-Add-ISP-backend-PRV-and-RSZ.patch
@@ -0,0 +1,3413 @@
+From 926b51afea146826c8076e5fb305eaa0332399b4 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add ISP backend (PRV and RSZ)
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/isp/isppreview.c | 1929 ++++++++++++++++++++++++++++++++++
+ drivers/media/video/isp/isppreview.h | 354 +++++++
+ drivers/media/video/isp/ispresizer.c | 928 ++++++++++++++++
+ drivers/media/video/isp/ispresizer.h | 158 +++
+ 4 files changed, 3369 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/isppreview.c
+ create mode 100644 drivers/media/video/isp/isppreview.h
+ create mode 100644 drivers/media/video/isp/ispresizer.c
+ create mode 100644 drivers/media/video/isp/ispresizer.h
+
+diff --git a/drivers/media/video/isp/isppreview.c b/drivers/media/video/isp/isppreview.c
+new file mode 100644
+index 0000000..17f1abc
+--- /dev/null
++++ b/drivers/media/video/isp/isppreview.c
+@@ -0,0 +1,1929 @@
++/*
++ * isppreview.c
++ *
++ * Driver Library for Preview module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Senthilvadivu Guruswamy <svadivu@ti.com>
++ * Pallavi Kulkarni <p-kulkarni@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <linux/mutex.h>
++#include <linux/module.h>
++#include <linux/uaccess.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "isppreview.h"
++
++static struct ispprev_nf prev_nf_t;
++static struct prev_params *params;
++static int rg_update, gg_update, bg_update, nf_enable, nf_update;
++
++/* Structure for saving/restoring preview module registers */
++static struct isp_reg ispprev_reg_list[] = {
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_HORZ_INFO, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_VERT_INFO, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RSDR_ADDR, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RADR_OFFSET, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_DSDR_ADDR, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_DRKF_OFFSET, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_WSDR_ADDR, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_WADD_OFFSET, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_AVE, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_HMED, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_NF, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_WB_DGAIN, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_WBGAIN, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_WBSEL, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CFA, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_BLKADJOFF, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT1, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT2, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT3, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT4, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT5, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_OFF1, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_OFF2, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC0, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC1, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC2, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC_OFFSET, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CSUP, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_SETUP_YC, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR0, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR1, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR2, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR3, 0x0000},
++ {OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, 0x0000},
++ {0, ISP_TOK_TERM, 0x0000}
++};
++
++
++/* Default values in Office Flourescent Light for RGBtoRGB Blending */
++static struct ispprev_rgbtorgb flr_rgb2rgb = {
++ { /* RGB-RGB Matrix */
++ {0x01E2, 0x0F30, 0x0FEE},
++ {0x0F9B, 0x01AC, 0x0FB9},
++ {0x0FE0, 0x0EC0, 0x0260}
++ }, /* RGB Offset */
++ {0x0000, 0x0000, 0x0000}
++};
++
++/* Default values in Office Flourescent Light for RGB to YUV Conversion*/
++static struct ispprev_csc flr_prev_csc[] = {
++ {
++ { /* CSC Coef Matrix */
++ {66, 129, 25},
++ {-38, -75, 112},
++ {112, -94 , -18}
++ }, /* CSC Offset */
++ {0x0, 0x0, 0x0}
++ },
++ {
++ { /* CSC Coef Matrix BW */
++ {66, 129, 25},
++ {0, 0, 0},
++ {0, 0, 0}
++ }, /* CSC Offset */
++ {0x0, 0x0, 0x0}
++ },
++ {
++ { /* CSC Coef Matrix Sepia */
++ {19, 38, 7},
++ {0, 0, 0},
++ {0, 0, 0}
++ }, /* CSC Offset */
++ {0x0, 0xE7, 0x14}
++ }
++};
++
++
++/* Default values in Office Flourescent Light for CFA Gradient*/
++#define FLR_CFA_GRADTHRS_HORZ 0x28
++#define FLR_CFA_GRADTHRS_VERT 0x28
++
++/* Default values in Office Flourescent Light for Chroma Suppression*/
++#define FLR_CSUP_GAIN 0x0D
++#define FLR_CSUP_THRES 0xEB
++
++/* Default values in Office Flourescent Light for Noise Filter*/
++#define FLR_NF_STRGTH 0x03
++
++/* Default values in Office Flourescent Light for White Balance*/
++#define FLR_WBAL_DGAIN 0x100
++#define FLR_WBAL_COEF0 0x20
++#define FLR_WBAL_COEF1 0x29
++#define FLR_WBAL_COEF2 0x2d
++#define FLR_WBAL_COEF3 0x20
++
++#define FLR_WBAL_COEF0_ES1 0x20
++#define FLR_WBAL_COEF1_ES1 0x23
++#define FLR_WBAL_COEF2_ES1 0x39
++#define FLR_WBAL_COEF3_ES1 0x20
++
++/* Default values in Office Flourescent Light for Black Adjustment*/
++#define FLR_BLKADJ_BLUE 0x0
++#define FLR_BLKADJ_GREEN 0x0
++#define FLR_BLKADJ_RED 0x0
++
++static int update_color_matrix;
++
++/**
++ * struct isp_prev - Structure for storing ISP Preview module information
++ * @prev_inuse: Flag to determine if CCDC has been reserved or not (0 or 1).
++ * @prevout_w: Preview output width.
++ * @prevout_h: Preview output height.
++ * @previn_w: Preview input width.
++ * @previn_h: Preview input height.
++ * @prev_inpfmt: Preview input format.
++ * @prev_outfmt: Preview output format.
++ * @hmed_en: Horizontal median filter enable.
++ * @nf_en: Noise filter enable.
++ * @dcor_en: Defect correction enable.
++ * @cfa_en: Color Filter Array (CFA) interpolation enable.
++ * @csup_en: Chrominance suppression enable.
++ * @yenh_en: Luma enhancement enable.
++ * @fmtavg: Number of horizontal pixels to average in input formatter. The
++ * input width should be a multiple of this number.
++ * @brightness: Brightness in preview module.
++ * @contrast: Contrast in preview module.
++ * @color: Color effect in preview module.
++ * @cfafmt: Color Filter Array (CFA) Format.
++ * @ispprev_mutex: Mutex for isp preview.
++ *
++ * This structure is used to store the OMAP ISP Preview module Information.
++ */
++static struct isp_prev {
++ int pm_state;
++ u8 prev_inuse;
++ u32 prevout_w;
++ u32 prevout_h;
++ u32 previn_w;
++ u32 previn_h;
++ enum preview_input prev_inpfmt;
++ enum preview_output prev_outfmt;
++ u8 hmed_en;
++ u8 nf_en;
++ u8 dcor_en;
++ u8 cfa_en;
++ u8 csup_en;
++ u8 yenh_en;
++ u8 fmtavg;
++ u8 brightness;
++ u8 contrast;
++ enum v4l2_colorfx color;
++ enum cfa_fmt cfafmt;
++ struct mutex ispprev_mutex; /* For checking/modifying prev_inuse */
++ u32 sph;
++ u32 slv;
++} ispprev_obj;
++
++/* Saved parameters */
++static struct prev_params *prev_config_params;
++
++/*
++ * Coeficient Tables for the submodules in Preview.
++ * Array is initialised with the values from.the tables text file.
++ */
++
++/*
++ * CFA Filter Coefficient Table
++ *
++ */
++static u32 cfa_coef_table[] = {
++#include "cfa_coef_table.h"
++};
++
++/*
++ * Gamma Correction Table - Red
++ */
++static u32 redgamma_table[] = {
++#include "redgamma_table.h"
++};
++
++/*
++ * Gamma Correction Table - Green
++ */
++static u32 greengamma_table[] = {
++#include "greengamma_table.h"
++};
++
++/*
++ * Gamma Correction Table - Blue
++ */
++static u32 bluegamma_table[] = {
++#include "bluegamma_table.h"
++};
++
++/*
++ * Noise Filter Threshold table
++ */
++static u32 noise_filter_table[] = {
++#include "noise_filter_table.h"
++};
++
++/*
++ * Luminance Enhancement Table
++ */
++static u32 luma_enhance_table[] = {
++#include "luma_enhance_table.h"
++};
++
++/**
++ * omap34xx_isp_preview_config - Abstraction layer Preview configuration.
++ * @userspace_add: Pointer from Userspace to structure with flags and data to
++ * update.
++ **/
++int omap34xx_isp_preview_config(void *userspace_add)
++{
++ struct ispprev_hmed prev_hmed_t;
++ struct ispprev_cfa prev_cfa_t;
++ struct ispprev_csup csup_t;
++ struct ispprev_wbal prev_wbal_t;
++ struct ispprev_blkadj prev_blkadj_t;
++ struct ispprev_rgbtorgb rgb2rgb_t;
++ struct ispprev_csc prev_csc_t;
++ struct ispprev_yclimit yclimit_t;
++ struct ispprev_dcor prev_dcor_t;
++ struct ispprv_update_config *preview_struct;
++ struct isptables_update isp_table_update;
++ int yen_t[ISPPRV_YENH_TBL_SIZE];
++
++ if (userspace_add == NULL)
++ return -EINVAL;
++
++ preview_struct = userspace_add;
++
++ if (ISP_ABS_PREV_LUMAENH & preview_struct->flag) {
++ if (ISP_ABS_PREV_LUMAENH & preview_struct->update) {
++ if (copy_from_user(yen_t, preview_struct->yen,
++ sizeof(yen_t)))
++ goto err_copy_from_user;
++ isppreview_config_luma_enhancement(yen_t);
++ }
++ params->features |= PREV_LUMA_ENHANCE;
++ } else if (ISP_ABS_PREV_LUMAENH & preview_struct->update)
++ params->features &= ~PREV_LUMA_ENHANCE;
++
++ if (ISP_ABS_PREV_INVALAW & preview_struct->flag) {
++ isppreview_enable_invalaw(1);
++ params->features |= PREV_INVERSE_ALAW;
++ } else {
++ isppreview_enable_invalaw(0);
++ params->features &= ~PREV_INVERSE_ALAW;
++ }
++
++ if (ISP_ABS_PREV_HRZ_MED & preview_struct->flag) {
++ if (ISP_ABS_PREV_HRZ_MED & preview_struct->update) {
++ if (copy_from_user(&prev_hmed_t,
++ (struct ispprev_hmed *)
++ preview_struct->prev_hmed,
++ sizeof(struct ispprev_hmed)))
++ goto err_copy_from_user;
++ isppreview_config_hmed(prev_hmed_t);
++ }
++ isppreview_enable_hmed(1);
++ params->features |= PREV_HORZ_MEDIAN_FILTER;
++ } else if (ISP_ABS_PREV_HRZ_MED & preview_struct->update) {
++ isppreview_enable_hmed(0);
++ params->features &= ~PREV_HORZ_MEDIAN_FILTER;
++ }
++
++ if (ISP_ABS_PREV_CFA & preview_struct->flag) {
++ if (ISP_ABS_PREV_CFA & preview_struct->update) {
++ if (copy_from_user(&prev_cfa_t,
++ (struct ispprev_cfa *)
++ preview_struct->prev_cfa,
++ sizeof(struct ispprev_cfa)))
++ goto err_copy_from_user;
++
++ isppreview_config_cfa(prev_cfa_t);
++ }
++ isppreview_enable_cfa(1);
++ params->features |= PREV_CFA;
++ } else if (ISP_ABS_PREV_CFA & preview_struct->update) {
++ isppreview_enable_cfa(0);
++ params->features &= ~PREV_CFA;
++ }
++
++ if (ISP_ABS_PREV_CHROMA_SUPP & preview_struct->flag) {
++ if (ISP_ABS_PREV_CHROMA_SUPP & preview_struct->update) {
++ if (copy_from_user(&csup_t,
++ (struct ispprev_csup *)
++ preview_struct->csup,
++ sizeof(struct ispprev_csup)))
++ goto err_copy_from_user;
++ isppreview_config_chroma_suppression(csup_t);
++ }
++ isppreview_enable_chroma_suppression(1);
++ params->features |= PREV_CHROMA_SUPPRESS;
++ } else if (ISP_ABS_PREV_CHROMA_SUPP & preview_struct->update) {
++ isppreview_enable_chroma_suppression(0);
++ params->features &= ~PREV_CHROMA_SUPPRESS;
++ }
++
++ if (ISP_ABS_PREV_WB & preview_struct->update) {
++ if (copy_from_user(&prev_wbal_t, (struct ispprev_wbal *)
++ preview_struct->prev_wbal,
++ sizeof(struct ispprev_wbal)))
++ goto err_copy_from_user;
++ isppreview_config_whitebalance(prev_wbal_t);
++ }
++
++ if (ISP_ABS_PREV_BLKADJ & preview_struct->update) {
++ if (copy_from_user(&prev_blkadj_t, (struct ispprev_blkadjl *)
++ preview_struct->prev_blkadj,
++ sizeof(struct ispprev_blkadj)))
++ goto err_copy_from_user;
++ isppreview_config_blkadj(prev_blkadj_t);
++ }
++
++ if (ISP_ABS_PREV_RGB2RGB & preview_struct->update) {
++ if (copy_from_user(&rgb2rgb_t, (struct ispprev_rgbtorgb *)
++ preview_struct->rgb2rgb,
++ sizeof(struct ispprev_rgbtorgb)))
++ goto err_copy_from_user;
++ isppreview_config_rgb_blending(rgb2rgb_t);
++ }
++
++ if (ISP_ABS_PREV_COLOR_CONV & preview_struct->update) {
++ if (copy_from_user(&prev_csc_t, (struct ispprev_csc *)
++ preview_struct->prev_csc,
++ sizeof(struct ispprev_csc)))
++ goto err_copy_from_user;
++ isppreview_config_rgb_to_ycbcr(prev_csc_t);
++ }
++
++ if (ISP_ABS_PREV_YC_LIMIT & preview_struct->update) {
++ if (copy_from_user(&yclimit_t, (struct ispprev_yclimit *)
++ preview_struct->yclimit,
++ sizeof(struct ispprev_yclimit)))
++ goto err_copy_from_user;
++ isppreview_config_yc_range(yclimit_t);
++ }
++
++ if (ISP_ABS_PREV_DEFECT_COR & preview_struct->flag) {
++ if (ISP_ABS_PREV_DEFECT_COR & preview_struct->update) {
++ if (copy_from_user(&prev_dcor_t,
++ (struct ispprev_dcor *)
++ preview_struct->prev_dcor,
++ sizeof(struct ispprev_dcor)))
++ goto err_copy_from_user;
++ isppreview_config_dcor(prev_dcor_t);
++ }
++ isppreview_enable_dcor(1);
++ params->features |= PREV_DEFECT_COR;
++ } else if (ISP_ABS_PREV_DEFECT_COR & preview_struct->update) {
++ isppreview_enable_dcor(0);
++ params->features &= ~PREV_DEFECT_COR;
++ }
++
++ if (ISP_ABS_PREV_GAMMABYPASS & preview_struct->flag) {
++ isppreview_enable_gammabypass(1);
++ params->features |= PREV_GAMMA_BYPASS;
++ } else {
++ isppreview_enable_gammabypass(0);
++ params->features &= ~PREV_GAMMA_BYPASS;
++ }
++
++ isp_table_update.update = preview_struct->update;
++ isp_table_update.flag = preview_struct->flag;
++ isp_table_update.prev_nf = preview_struct->prev_nf;
++ isp_table_update.red_gamma = preview_struct->red_gamma;
++ isp_table_update.green_gamma = preview_struct->green_gamma;
++ isp_table_update.blue_gamma = preview_struct->blue_gamma;
++
++ if (omap34xx_isp_tables_update(&isp_table_update))
++ goto err_copy_from_user;
++
++ return 0;
++
++err_copy_from_user:
++ printk(KERN_ERR "Preview Config: Copy From User Error\n");
++ return -EFAULT;
++}
++EXPORT_SYMBOL_GPL(omap34xx_isp_preview_config);
++
++/**
++ * omap34xx_isp_tables_update - Abstraction layer Tables update.
++ * @isptables_struct: Pointer from Userspace to structure with flags and table
++ * data to update.
++ **/
++int omap34xx_isp_tables_update(struct isptables_update *isptables_struct)
++{
++
++ if (ISP_ABS_TBL_NF & isptables_struct->flag) {
++ nf_enable = 1;
++ params->features |= PREV_NOISE_FILTER;
++ if (ISP_ABS_TBL_NF & isptables_struct->update) {
++ if (copy_from_user(&prev_nf_t, (struct ispprev_nf *)
++ isptables_struct->prev_nf,
++ sizeof(struct ispprev_nf)))
++ goto err_copy_from_user;
++
++ nf_update = 1;
++ } else
++ nf_update = 0;
++ } else {
++ nf_enable = 0;
++ params->features &= ~PREV_NOISE_FILTER;
++ if (ISP_ABS_TBL_NF & isptables_struct->update)
++ nf_update = 1;
++ else
++ nf_update = 0;
++ }
++
++ if (ISP_ABS_TBL_REDGAMMA & isptables_struct->update) {
++ if (copy_from_user(redgamma_table, isptables_struct->red_gamma,
++ sizeof(redgamma_table))) {
++ goto err_copy_from_user;
++ }
++ rg_update = 1;
++ } else
++ rg_update = 0;
++
++ if (ISP_ABS_TBL_GREENGAMMA & isptables_struct->update) {
++ if (copy_from_user(greengamma_table,
++ isptables_struct->green_gamma,
++ sizeof(greengamma_table)))
++ goto err_copy_from_user;
++ gg_update = 1;
++ } else
++ gg_update = 0;
++
++ if (ISP_ABS_TBL_BLUEGAMMA & isptables_struct->update) {
++ if (copy_from_user(bluegamma_table,
++ isptables_struct->blue_gamma,
++ sizeof(bluegamma_table))) {
++ goto err_copy_from_user;
++ }
++ bg_update = 1;
++ } else
++ bg_update = 0;
++
++ return 0;
++
++err_copy_from_user:
++ printk(KERN_ERR "Preview Tables:Copy From User Error\n");
++ return -EFAULT;
++}
++
++/**
++ * isppreview_config_shadow_registers - Program shadow registers for preview.
++ *
++ * Allows user to program shadow registers associated with preview module.
++ **/
++void isppreview_config_shadow_registers()
++{
++ u8 current_brightness_contrast;
++ int ctr, prv_disabled;
++
++ isppreview_query_brightness(&current_brightness_contrast);
++ if (current_brightness_contrast !=
++ (ispprev_obj.brightness * ISPPRV_BRIGHT_UNITS)) {
++ DPRINTK_ISPPREV(" Changing Brightness level to %d\n",
++ ispprev_obj.brightness);
++ isppreview_config_brightness(ispprev_obj.brightness *
++ ISPPRV_BRIGHT_UNITS);
++ }
++
++ isppreview_query_contrast(&current_brightness_contrast);
++ if (current_brightness_contrast !=
++ (ispprev_obj.contrast * ISPPRV_CONTRAST_UNITS)) {
++ DPRINTK_ISPPREV(" Changing Contrast level to %d\n",
++ ispprev_obj.contrast);
++ isppreview_config_contrast(ispprev_obj.contrast *
++ ISPPRV_CONTRAST_UNITS);
++ }
++ if (update_color_matrix) {
++ isppreview_config_rgb_to_ycbcr(flr_prev_csc[ispprev_obj.color]);
++ update_color_matrix = 0;
++ }
++ if (gg_update || rg_update || bg_update || nf_update) {
++ isppreview_enable(0);
++ prv_disabled = 1;
++ }
++
++ if (gg_update) {
++ isp_reg_writel(ISPPRV_TBL_ADDR_GREEN_G_START,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++
++ for (ctr = 0; ctr < ISP_GAMMA_TABLE_SIZE; ctr++) {
++ isp_reg_writel(greengamma_table[ctr],
++ OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_DATA);
++ }
++ gg_update = 0;
++ }
++
++ if (rg_update) {
++ isp_reg_writel(ISPPRV_TBL_ADDR_RED_G_START,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++
++ for (ctr = 0; ctr < ISP_GAMMA_TABLE_SIZE; ctr++) {
++ isp_reg_writel(redgamma_table[ctr],
++ OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_DATA);
++ }
++ rg_update = 0;
++ }
++
++ if (bg_update) {
++ isp_reg_writel(ISPPRV_TBL_ADDR_BLUE_G_START,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++
++ for (ctr = 0; ctr < ISP_GAMMA_TABLE_SIZE; ctr++) {
++ isp_reg_writel(bluegamma_table[ctr],
++ OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_DATA);
++ }
++ bg_update = 0;
++ }
++
++ if (nf_update && nf_enable) {
++ isp_reg_writel(0xC00,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++ isp_reg_writel(prev_nf_t.spread,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_NF);
++ for (ctr = 0; ctr < ISPPRV_NF_TBL_SIZE; ctr++) {
++ isp_reg_writel(prev_nf_t.table[ctr],
++ OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_DATA);
++ }
++ isppreview_enable_noisefilter(1);
++ nf_update = 0;
++ }
++
++ if (~nf_update && nf_enable)
++ isppreview_enable_noisefilter(1);
++
++ if (nf_update && ~nf_enable)
++ isppreview_enable_noisefilter(0);
++
++ if (prv_disabled) {
++ isppreview_enable(1);
++ prv_disabled = 0;
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_config_shadow_registers);
++
++/**
++ * isppreview_request - Reserves the preview module.
++ *
++ * Returns 0 if successful, or -EBUSY if the module was already reserved.
++ **/
++int isppreview_request()
++{
++ mutex_lock(&ispprev_obj.ispprev_mutex);
++ if (ispprev_obj.prev_inuse) {
++ mutex_unlock(&ispprev_obj.ispprev_mutex);
++ printk(KERN_ERR "ISP_ERR : Preview Module Busy\n");
++ return -EBUSY;
++ }
++ ispprev_obj.prev_inuse = 1;
++ mutex_unlock(&ispprev_obj.ispprev_mutex);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL, ISPCTRL_PREV_RAM_EN |
++ ISPCTRL_PREV_CLK_EN |
++ ISPCTRL_SBL_WR1_RAM_EN);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_request);
++
++/**
++ * isppreview_free - Frees the preview module.
++ *
++ * Returns 0 if successful, or -EINVAL if the module was already freed.
++ **/
++int isppreview_free()
++{
++ mutex_lock(&ispprev_obj.ispprev_mutex);
++ if (ispprev_obj.prev_inuse) {
++ ispprev_obj.prev_inuse = 0;
++ mutex_unlock(&ispprev_obj.ispprev_mutex);
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
++ ~(ISPCTRL_PREV_CLK_EN |
++ ISPCTRL_PREV_RAM_EN |
++ ISPCTRL_SBL_WR1_RAM_EN));
++ return 0;
++ } else {
++ mutex_unlock(&ispprev_obj.ispprev_mutex);
++ DPRINTK_ISPPREV("ISP_ERR : Preview Module already freed\n");
++ return -EINVAL;
++ }
++
++}
++EXPORT_SYMBOL_GPL(isppreview_free);
++
++/** isppreview_config_datapath - Specifies input and output modules for Preview
++ * @input: Indicates the module that gives the image to preview.
++ * @output: Indicates the module to which the preview outputs to.
++ *
++ * Configures the default configuration for the CCDC to work with.
++ *
++ * The valid values for the input are PRV_RAW_CCDC (0), PRV_RAW_MEM (1),
++ * PRV_RGBBAYERCFA (2), PRV_COMPCFA (3), PRV_CCDC_DRKF (4), PRV_OTHERS (5).
++ *
++ * The valid values for the output are PREVIEW_RSZ (0), PREVIEW_MEM (1).
++ *
++ * Returns 0 if successful, or -EINVAL if wrong input or output values are
++ * specified.
++ **/
++int isppreview_config_datapath(enum preview_input input,
++ enum preview_output output)
++{
++ u32 pcr = 0;
++ u8 enable = 0;
++ struct prev_params *params = prev_config_params;
++ struct ispprev_yclimit yclimit;
++
++ pcr = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++
++ switch (input) {
++ case PRV_RAW_CCDC:
++ pcr &= ~ISPPRV_PCR_SOURCE;
++ pcr &= ~ISPPRV_PCR_ONESHOT;
++ ispprev_obj.prev_inpfmt = PRV_RAW_CCDC;
++ break;
++ case PRV_RAW_MEM:
++ pcr |= ISPPRV_PCR_SOURCE;
++ pcr |= ISPPRV_PCR_ONESHOT;
++ ispprev_obj.prev_inpfmt = PRV_RAW_MEM;
++ break;
++ case PRV_CCDC_DRKF:
++ pcr |= ISPPRV_PCR_DRKFCAP;
++ pcr |= ISPPRV_PCR_ONESHOT;
++ ispprev_obj.prev_inpfmt = PRV_CCDC_DRKF;
++ break;
++ case PRV_COMPCFA:
++ ispprev_obj.prev_inpfmt = PRV_COMPCFA;
++ break;
++ case PRV_OTHERS:
++ ispprev_obj.prev_inpfmt = PRV_OTHERS;
++ break;
++ case PRV_RGBBAYERCFA:
++ ispprev_obj.prev_inpfmt = PRV_RGBBAYERCFA;
++ break;
++ default:
++ printk(KERN_ERR "ISP_ERR : Wrong Input\n");
++ return -EINVAL;
++ };
++
++ switch (output) {
++ case PREVIEW_RSZ:
++ pcr |= ISPPRV_PCR_RSZPORT;
++ pcr &= ~ISPPRV_PCR_SDRPORT;
++ break;
++ case PREVIEW_MEM:
++ pcr &= ~ISPPRV_PCR_RSZPORT;
++ pcr |= ISPPRV_PCR_SDRPORT;
++ break;
++ default:
++ printk(KERN_ERR "ISP_ERR : Wrong Output\n");
++ return -EINVAL;
++ }
++ ispprev_obj.prev_outfmt = output;
++
++ isp_reg_writel(pcr, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++
++ isppreview_config_ycpos(params->pix_fmt);
++
++ if (params->cfa.cfa_table != NULL)
++ isppreview_config_cfa(params->cfa);
++ if (params->csup.hypf_en == 1)
++ isppreview_config_chroma_suppression(params->csup);
++ if (params->ytable != NULL)
++ isppreview_config_luma_enhancement(params->ytable);
++
++ if (params->gtable.redtable != NULL)
++ isppreview_config_gammacorrn(params->gtable);
++
++ enable = (params->features & PREV_CFA) ? 1 : 0;
++ isppreview_enable_cfa(enable);
++
++ enable = (params->features & PREV_CHROMA_SUPPRESS) ? 1 : 0;
++ isppreview_enable_chroma_suppression(enable);
++
++ enable = (params->features & PREV_LUMA_ENHANCE) ? 1 : 0;
++ isppreview_enable_luma_enhancement(enable);
++
++ enable = (params->features & PREV_NOISE_FILTER) ? 1 : 0;
++ if (enable)
++ isppreview_config_noisefilter(params->nf);
++ isppreview_enable_noisefilter(enable);
++
++ enable = (params->features & PREV_DEFECT_COR) ? 1 : 0;
++ if (enable)
++ isppreview_config_dcor(params->dcor);
++ isppreview_enable_dcor(enable);
++
++ enable = (params->features & PREV_GAMMA_BYPASS) ? 1 : 0;
++ isppreview_enable_gammabypass(enable);
++
++ isppreview_config_whitebalance(params->wbal);
++ isppreview_config_blkadj(params->blk_adj);
++ isppreview_config_rgb_blending(params->rgb2rgb);
++ isppreview_config_rgb_to_ycbcr(params->rgb2ycbcr);
++
++ isppreview_config_contrast(params->contrast * ISPPRV_CONTRAST_UNITS);
++ isppreview_config_brightness(params->brightness * ISPPRV_BRIGHT_UNITS);
++
++ yclimit.minC = ISPPRV_YC_MIN;
++ yclimit.maxC = ISPPRV_YC_MAX;
++ yclimit.minY = ISPPRV_YC_MIN;
++ yclimit.maxY = ISPPRV_YC_MAX;
++ isppreview_config_yc_range(yclimit);
++
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_config_datapath);
++
++/**
++ * isppreview_set_skip - Set the number of rows/columns that should be skipped.
++ * h - Start Pixel Horizontal.
++ * v - Start Line Vertical.
++ **/
++void isppreview_set_skip(u32 h, u32 v)
++{
++ ispprev_obj.sph = h;
++ ispprev_obj.slv = v;
++}
++EXPORT_SYMBOL_GPL(isppreview_set_skip);
++
++/**
++ * isppreview_config_ycpos - Configure byte layout of YUV image.
++ * @mode: Indicates the required byte layout.
++ **/
++void isppreview_config_ycpos(enum preview_ycpos_mode mode)
++{
++ u32 pcr = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++ pcr &= ~ISPPRV_PCR_YCPOS_CrYCbY;
++ pcr |= (mode << ISPPRV_PCR_YCPOS_SHIFT);
++ isp_reg_writel(pcr, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_ycpos);
++
++/**
++ * isppreview_config_averager - Enable / disable / configure averager
++ * @average: Average value to be configured.
++ **/
++void isppreview_config_averager(u8 average)
++{
++ int reg = 0;
++
++ reg = AVE_ODD_PIXEL_DIST | AVE_EVEN_PIXEL_DIST | average;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_PREV, ISPPRV_AVE);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_averager);
++
++/**
++ * isppreview_enable_invalaw - Enable/Disable Inverse A-Law module in Preview.
++ * @enable: 1 - Reverse the A-Law done in CCDC.
++ **/
++void isppreview_enable_invalaw(u8 enable)
++{
++ u32 pcr_val = 0;
++ pcr_val = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++
++ if (enable) {
++ isp_reg_writel(pcr_val | ISPPRV_PCR_WIDTH | ISPPRV_PCR_INVALAW,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++ } else {
++ isp_reg_writel(pcr_val &
++ ~(ISPPRV_PCR_WIDTH | ISPPRV_PCR_INVALAW),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_invalaw);
++
++/**
++ * isppreview_enable_drkframe - Enable/Disable of the darkframe subtract.
++ * @enable: 1 - Acquires memory bandwidth since the pixels in each frame is
++ * subtracted with the pixels in the current frame.
++ *
++ * The proccess is applied for each captured frame.
++ **/
++void isppreview_enable_drkframe(u8 enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_DRKFEN);
++ else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_DRKFEN);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_drkframe);
++
++/**
++ * isppreview_enable_shadcomp - Enables/Disables the shading compensation.
++ * @enable: 1 - Enables the shading compensation.
++ *
++ * If dark frame subtract won't be used, then enable this shading
++ * compensation.
++ **/
++void isppreview_enable_shadcomp(u8 enable)
++{
++
++ if (enable) {
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ISPPRV_PCR_SCOMP_EN);
++ isppreview_enable_drkframe(1);
++ } else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_SCOMP_EN);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_shadcomp);
++
++/**
++ * isppreview_config_drkf_shadcomp - Configures shift value in shading comp.
++ * @scomp_shtval: 3bit value of shift used in shading compensation.
++ **/
++void isppreview_config_drkf_shadcomp(u8 scomp_shtval)
++{
++ u32 pcr_val = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++
++ pcr_val &= ISPPRV_PCR_SCOMP_SFT_MASK;
++ isp_reg_writel(pcr_val | (scomp_shtval << ISPPRV_PCR_SCOMP_SFT_SHIFT),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_drkf_shadcomp);
++
++/**
++ * isppreview_enable_hmed - Enables/Disables of the Horizontal Median Filter.
++ * @enable: 1 - Enables Horizontal Median Filter.
++ **/
++void isppreview_enable_hmed(u8 enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_HMEDEN);
++ else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_HMEDEN);
++ }
++ ispprev_obj.hmed_en = enable ? 1 : 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_hmed);
++
++/**
++ * isppreview_config_hmed - Configures the Horizontal Median Filter.
++ * @prev_hmed: Structure containing the odd and even distance between the
++ * pixels in the image along with the filter threshold.
++ **/
++void isppreview_config_hmed(struct ispprev_hmed prev_hmed)
++{
++
++ u32 odddist = 0;
++ u32 evendist = 0;
++
++ if (prev_hmed.odddist == 1)
++ odddist = ~ISPPRV_HMED_ODDDIST;
++ else
++ odddist = ISPPRV_HMED_ODDDIST;
++
++ if (prev_hmed.evendist == 1)
++ evendist = ~ISPPRV_HMED_EVENDIST;
++ else
++ evendist = ISPPRV_HMED_EVENDIST;
++
++ isp_reg_writel(odddist | evendist | (prev_hmed.thres <<
++ ISPPRV_HMED_THRESHOLD_SHIFT),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_HMED);
++
++}
++EXPORT_SYMBOL_GPL(isppreview_config_hmed);
++
++/**
++ * isppreview_config_noisefilter - Configures the Noise Filter.
++ * @prev_nf: Structure containing the noisefilter table, strength to be used
++ * for the noise filter and the defect correction enable flag.
++ **/
++void isppreview_config_noisefilter(struct ispprev_nf prev_nf)
++{
++ int i = 0;
++
++ isp_reg_writel(prev_nf.spread, OMAP3_ISP_IOMEM_PREV, ISPPRV_NF);
++ isp_reg_writel(ISPPRV_NF_TABLE_ADDR, OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_ADDR);
++ for (i = 0; i < ISPPRV_NF_TBL_SIZE; i++) {
++ isp_reg_writel(prev_nf.table[i], OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_DATA);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_config_noisefilter);
++
++/**
++ * isppreview_config_dcor - Configures the defect correction
++ * @prev_nf: Structure containing the defect correction structure
++ **/
++void isppreview_config_dcor(struct ispprev_dcor prev_dcor)
++{
++ if (prev_dcor.couplet_mode_en) {
++ isp_reg_writel(prev_dcor.detect_correct[0],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR0);
++ isp_reg_writel(prev_dcor.detect_correct[1],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR1);
++ isp_reg_writel(prev_dcor.detect_correct[2],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR2);
++ isp_reg_writel(prev_dcor.detect_correct[3],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CDC_THR3);
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_DCCOUP);
++ } else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_DCCOUP);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_config_dcor);
++
++/**
++ * isppreview_config_cfa - Configures the CFA Interpolation parameters.
++ * @prev_cfa: Structure containing the CFA interpolation table, CFA format
++ * in the image, vertical and horizontal gradient threshold.
++ **/
++void isppreview_config_cfa(struct ispprev_cfa prev_cfa)
++{
++ int i = 0;
++
++ ispprev_obj.cfafmt = prev_cfa.cfafmt;
++
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ (prev_cfa.cfafmt << ISPPRV_PCR_CFAFMT_SHIFT));
++
++ isp_reg_writel(
++ (prev_cfa.cfa_gradthrs_vert << ISPPRV_CFA_GRADTH_VER_SHIFT) |
++ (prev_cfa.cfa_gradthrs_horz << ISPPRV_CFA_GRADTH_HOR_SHIFT),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CFA);
++
++ isp_reg_writel(ISPPRV_CFA_TABLE_ADDR, OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_SET_TBL_ADDR);
++
++ for (i = 0; i < ISPPRV_CFA_TBL_SIZE; i++) {
++ isp_reg_writel(prev_cfa.cfa_table[i],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_DATA);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_config_cfa);
++
++/**
++ * isppreview_config_gammacorrn - Configures the Gamma Correction table values
++ * @gtable: Structure containing the table for red, blue, green gamma table.
++ **/
++void isppreview_config_gammacorrn(struct ispprev_gtable gtable)
++{
++ int i = 0;
++
++ isp_reg_writel(ISPPRV_REDGAMMA_TABLE_ADDR,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++ for (i = 0; i < ISPPRV_GAMMA_TBL_SIZE; i++) {
++ isp_reg_writel(gtable.redtable[i],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_DATA);
++ }
++
++ isp_reg_writel(ISPPRV_GREENGAMMA_TABLE_ADDR,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++ for (i = 0; i < ISPPRV_GAMMA_TBL_SIZE; i++) {
++ isp_reg_writel(gtable.greentable[i],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_DATA);
++ }
++
++ isp_reg_writel(ISPPRV_BLUEGAMMA_TABLE_ADDR,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++ for (i = 0; i < ISPPRV_GAMMA_TBL_SIZE; i++) {
++ isp_reg_writel(gtable.bluetable[i],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_DATA);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_config_gammacorrn);
++
++/**
++ * isppreview_config_luma_enhancement - Sets the Luminance Enhancement table.
++ * @ytable: Structure containing the table for Luminance Enhancement table.
++ **/
++void isppreview_config_luma_enhancement(u32 *ytable)
++{
++ int i = 0;
++
++ isp_reg_writel(ISPPRV_YENH_TABLE_ADDR,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
++ for (i = 0; i < ISPPRV_YENH_TBL_SIZE; i++) {
++ isp_reg_writel(ytable[i],
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_DATA);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_config_luma_enhancement);
++
++/**
++ * isppreview_config_chroma_suppression - Configures the Chroma Suppression.
++ * @csup: Structure containing the threshold value for suppression
++ * and the hypass filter enable flag.
++ **/
++void isppreview_config_chroma_suppression(struct ispprev_csup csup)
++{
++ isp_reg_writel(csup.gain | (csup.thres << ISPPRV_CSUP_THRES_SHIFT) |
++ (csup.hypf_en << ISPPRV_CSUP_HPYF_SHIFT),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CSUP);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_chroma_suppression);
++
++/**
++ * isppreview_enable_noisefilter - Enables/Disables the Noise Filter.
++ * @enable: 1 - Enables the Noise Filter.
++ **/
++void isppreview_enable_noisefilter(u8 enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_NFEN);
++ else
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ~ISPPRV_PCR_NFEN);
++ ispprev_obj.nf_en = enable ? 1 : 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_noisefilter);
++
++/**
++ * isppreview_enable_dcor - Enables/Disables the defect correction.
++ * @enable: 1 - Enables the defect correction.
++ **/
++void isppreview_enable_dcor(u8 enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_DCOREN);
++ else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_DCOREN);
++ }
++ ispprev_obj.dcor_en = enable ? 1 : 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_dcor);
++
++/**
++ * isppreview_enable_cfa - Enable/Disable the CFA Interpolation.
++ * @enable: 1 - Enables the CFA.
++ **/
++void isppreview_enable_cfa(u8 enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_CFAEN);
++ else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_CFAEN);
++ }
++ ispprev_obj.cfa_en = enable ? 1 : 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_cfa);
++
++/**
++ * isppreview_enable_gammabypass - Enables/Disables the GammaByPass
++ * @enable: 1 - Bypasses Gamma - 10bit input is cropped to 8MSB.
++ * 0 - Goes through Gamma Correction. input and output is 10bit.
++ **/
++void isppreview_enable_gammabypass(u8 enable)
++{
++ if (enable) {
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ISPPRV_PCR_GAMMA_BYPASS);
++ } else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_GAMMA_BYPASS);
++ }
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_gammabypass);
++
++/**
++ * isppreview_enable_luma_enhancement - Enables/Disables Luminance Enhancement
++ * @enable: 1 - Enable the Luminance Enhancement.
++ **/
++void isppreview_enable_luma_enhancement(u8 enable)
++{
++ if (enable) {
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ISPPRV_PCR_YNENHEN);
++ } else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_YNENHEN);
++ }
++ ispprev_obj.yenh_en = enable ? 1 : 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_luma_enhancement);
++
++/**
++ * isppreview_enable_chroma_suppression - Enables/Disables Chrominance Suppr.
++ * @enable: 1 - Enable the Chrominance Suppression.
++ **/
++void isppreview_enable_chroma_suppression(u8 enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_SUPEN);
++ else {
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
++ ~ISPPRV_PCR_SUPEN);
++ }
++ ispprev_obj.csup_en = enable ? 1 : 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable_chroma_suppression);
++
++/**
++ * isppreview_config_whitebalance - Configures the White Balance parameters.
++ * @prev_wbal: Structure containing the digital gain and white balance
++ * coefficient.
++ *
++ * Coefficient matrix always with default values.
++ **/
++void isppreview_config_whitebalance(struct ispprev_wbal prev_wbal)
++{
++ u32 val;
++
++ isp_reg_writel(prev_wbal.dgain, OMAP3_ISP_IOMEM_PREV, ISPPRV_WB_DGAIN);
++
++ val = prev_wbal.coef0 << ISPPRV_WBGAIN_COEF0_SHIFT;
++ val |= prev_wbal.coef1 << ISPPRV_WBGAIN_COEF1_SHIFT;
++ val |= prev_wbal.coef2 << ISPPRV_WBGAIN_COEF2_SHIFT;
++ val |= prev_wbal.coef3 << ISPPRV_WBGAIN_COEF3_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_WBGAIN);
++
++ isp_reg_writel(ISPPRV_WBSEL_COEF0 << ISPPRV_WBSEL_N0_0_SHIFT |
++ ISPPRV_WBSEL_COEF1 << ISPPRV_WBSEL_N0_1_SHIFT |
++ ISPPRV_WBSEL_COEF0 << ISPPRV_WBSEL_N0_2_SHIFT |
++ ISPPRV_WBSEL_COEF1 << ISPPRV_WBSEL_N0_3_SHIFT |
++ ISPPRV_WBSEL_COEF2 << ISPPRV_WBSEL_N1_0_SHIFT |
++ ISPPRV_WBSEL_COEF3 << ISPPRV_WBSEL_N1_1_SHIFT |
++ ISPPRV_WBSEL_COEF2 << ISPPRV_WBSEL_N1_2_SHIFT |
++ ISPPRV_WBSEL_COEF3 << ISPPRV_WBSEL_N1_3_SHIFT |
++ ISPPRV_WBSEL_COEF0 << ISPPRV_WBSEL_N2_0_SHIFT |
++ ISPPRV_WBSEL_COEF1 << ISPPRV_WBSEL_N2_1_SHIFT |
++ ISPPRV_WBSEL_COEF0 << ISPPRV_WBSEL_N2_2_SHIFT |
++ ISPPRV_WBSEL_COEF1 << ISPPRV_WBSEL_N2_3_SHIFT |
++ ISPPRV_WBSEL_COEF2 << ISPPRV_WBSEL_N3_0_SHIFT |
++ ISPPRV_WBSEL_COEF3 << ISPPRV_WBSEL_N3_1_SHIFT |
++ ISPPRV_WBSEL_COEF2 << ISPPRV_WBSEL_N3_2_SHIFT |
++ ISPPRV_WBSEL_COEF3 << ISPPRV_WBSEL_N3_3_SHIFT,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_WBSEL);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_whitebalance);
++
++/**
++ * isppreview_config_whitebalance2 - Configures the White Balance parameters.
++ * @prev_wbal: Structure containing the digital gain and white balance
++ * coefficient.
++ *
++ * Coefficient matrix can be changed.
++ **/
++void isppreview_config_whitebalance2(struct prev_white_balance prev_wbal)
++{
++ isp_reg_writel(prev_wbal.wb_dgain,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_WB_DGAIN);
++ isp_reg_writel(prev_wbal.wb_gain[0] |
++ prev_wbal.wb_gain[1] << ISPPRV_WBGAIN_COEF1_SHIFT |
++ prev_wbal.wb_gain[2] << ISPPRV_WBGAIN_COEF2_SHIFT |
++ prev_wbal.wb_gain[3] << ISPPRV_WBGAIN_COEF3_SHIFT,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_WBGAIN);
++
++ isp_reg_writel(
++ prev_wbal.wb_coefmatrix[0][0] << ISPPRV_WBSEL_N0_0_SHIFT |
++ prev_wbal.wb_coefmatrix[0][1] << ISPPRV_WBSEL_N0_1_SHIFT |
++ prev_wbal.wb_coefmatrix[0][2] << ISPPRV_WBSEL_N0_2_SHIFT |
++ prev_wbal.wb_coefmatrix[0][3] << ISPPRV_WBSEL_N0_3_SHIFT |
++ prev_wbal.wb_coefmatrix[1][0] << ISPPRV_WBSEL_N1_0_SHIFT |
++ prev_wbal.wb_coefmatrix[1][1] << ISPPRV_WBSEL_N1_1_SHIFT |
++ prev_wbal.wb_coefmatrix[1][2] << ISPPRV_WBSEL_N1_2_SHIFT |
++ prev_wbal.wb_coefmatrix[1][3] << ISPPRV_WBSEL_N1_3_SHIFT |
++ prev_wbal.wb_coefmatrix[2][0] << ISPPRV_WBSEL_N2_0_SHIFT |
++ prev_wbal.wb_coefmatrix[2][1] << ISPPRV_WBSEL_N2_1_SHIFT |
++ prev_wbal.wb_coefmatrix[2][2] << ISPPRV_WBSEL_N2_2_SHIFT |
++ prev_wbal.wb_coefmatrix[2][3] << ISPPRV_WBSEL_N2_3_SHIFT |
++ prev_wbal.wb_coefmatrix[3][0] << ISPPRV_WBSEL_N3_0_SHIFT |
++ prev_wbal.wb_coefmatrix[3][1] << ISPPRV_WBSEL_N3_1_SHIFT |
++ prev_wbal.wb_coefmatrix[3][2] << ISPPRV_WBSEL_N3_2_SHIFT |
++ prev_wbal.wb_coefmatrix[3][3] << ISPPRV_WBSEL_N3_3_SHIFT,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_WBSEL);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_whitebalance2);
++
++/**
++ * isppreview_config_blkadj - Configures the Black Adjustment parameters.
++ * @prev_blkadj: Structure containing the black adjustment towards red, green,
++ * blue.
++ **/
++void isppreview_config_blkadj(struct ispprev_blkadj prev_blkadj)
++{
++ isp_reg_writel(prev_blkadj.blue |
++ (prev_blkadj.green << ISPPRV_BLKADJOFF_G_SHIFT) |
++ (prev_blkadj.red << ISPPRV_BLKADJOFF_R_SHIFT),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_BLKADJOFF);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_blkadj);
++
++/**
++ * isppreview_config_rgb_blending - Configures the RGB-RGB Blending matrix.
++ * @rgb2rgb: Structure containing the rgb to rgb blending matrix and the rgb
++ * offset.
++ **/
++void isppreview_config_rgb_blending(struct ispprev_rgbtorgb rgb2rgb)
++{
++ u32 val = 0;
++
++ val = (rgb2rgb.matrix[0][0] & 0xfff) << ISPPRV_RGB_MAT1_MTX_RR_SHIFT;
++ val |= (rgb2rgb.matrix[0][1] & 0xfff) << ISPPRV_RGB_MAT1_MTX_GR_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT1);
++
++ val = (rgb2rgb.matrix[0][2] & 0xfff) << ISPPRV_RGB_MAT2_MTX_BR_SHIFT;
++ val |= (rgb2rgb.matrix[1][0] & 0xfff) << ISPPRV_RGB_MAT2_MTX_RG_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT2);
++
++ val = (rgb2rgb.matrix[1][1] & 0xfff) << ISPPRV_RGB_MAT3_MTX_GG_SHIFT;
++ val |= (rgb2rgb.matrix[1][2] & 0xfff) << ISPPRV_RGB_MAT3_MTX_BG_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT3);
++
++ val = (rgb2rgb.matrix[2][0] & 0xfff) << ISPPRV_RGB_MAT4_MTX_RB_SHIFT;
++ val |= (rgb2rgb.matrix[2][1] & 0xfff) << ISPPRV_RGB_MAT4_MTX_GB_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT4);
++
++ val = (rgb2rgb.matrix[2][2] & 0xfff) << ISPPRV_RGB_MAT5_MTX_BB_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT5);
++
++ val = (rgb2rgb.offset[0] & 0x3ff) << ISPPRV_RGB_OFF1_MTX_OFFG_SHIFT;
++ val |= (rgb2rgb.offset[1] & 0x3ff) << ISPPRV_RGB_OFF1_MTX_OFFR_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_OFF1);
++
++ val = (rgb2rgb.offset[2] & 0x3ff) << ISPPRV_RGB_OFF2_MTX_OFFB_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_OFF2);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_rgb_blending);
++
++/**
++ * Configures the RGB-YCbYCr conversion matrix
++ * @prev_csc: Structure containing the RGB to YCbYCr matrix and the
++ * YCbCr offset.
++ **/
++void isppreview_config_rgb_to_ycbcr(struct ispprev_csc prev_csc)
++{
++ u32 val = 0;
++
++ val = (prev_csc.matrix[0][0] & 0x3ff) << ISPPRV_CSC0_RY_SHIFT;
++ val |= (prev_csc.matrix[0][1] & 0x3ff) << ISPPRV_CSC0_GY_SHIFT;
++ val |= (prev_csc.matrix[0][2] & 0x3ff) << ISPPRV_CSC0_BY_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC0);
++
++ val = (prev_csc.matrix[1][0] & 0x3ff) << ISPPRV_CSC1_RCB_SHIFT;
++ val |= (prev_csc.matrix[1][1] & 0x3ff) << ISPPRV_CSC1_GCB_SHIFT;
++ val |= (prev_csc.matrix[1][2] & 0x3ff) << ISPPRV_CSC1_BCB_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC1);
++
++ val = (prev_csc.matrix[2][0] & 0x3ff) << ISPPRV_CSC2_RCR_SHIFT;
++ val |= (prev_csc.matrix[2][1] & 0x3ff) << ISPPRV_CSC2_GCR_SHIFT;
++ val |= (prev_csc.matrix[2][2] & 0x3ff) << ISPPRV_CSC2_BCR_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC2);
++
++ val = (prev_csc.offset[0] & 0xff) << ISPPRV_CSC_OFFSET_CR_SHIFT;
++ val |= (prev_csc.offset[1] & 0xff) << ISPPRV_CSC_OFFSET_CB_SHIFT;
++ val |= (prev_csc.offset[2] & 0xff) << ISPPRV_CSC_OFFSET_Y_SHIFT;
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC_OFFSET);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_rgb_to_ycbcr);
++
++/**
++ * isppreview_query_contrast - Query the contrast.
++ * @contrast: Pointer to hold the current programmed contrast value.
++ **/
++void isppreview_query_contrast(u8 *contrast)
++{
++ u32 brt_cnt_val = 0;
++
++ brt_cnt_val = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT);
++ *contrast = (brt_cnt_val >> ISPPRV_CNT_BRT_CNT_SHIFT) & 0xff;
++ DPRINTK_ISPPREV(" Current brt cnt value in hw is %x\n", brt_cnt_val);
++}
++EXPORT_SYMBOL_GPL(isppreview_query_contrast);
++
++/**
++ * isppreview_update_contrast - Updates the contrast.
++ * @contrast: Pointer to hold the current programmed contrast value.
++ *
++ * Value should be programmed before enabling the module.
++ **/
++void isppreview_update_contrast(u8 *contrast)
++{
++ ispprev_obj.contrast = *contrast;
++}
++EXPORT_SYMBOL_GPL(isppreview_update_contrast);
++
++/**
++ * isppreview_config_contrast - Configures the Contrast.
++ * @contrast: 8 bit value in U8Q4 format.
++ *
++ * Value should be programmed before enabling the module.
++ **/
++void isppreview_config_contrast(u8 contrast)
++{
++ u32 brt_cnt_val = 0;
++
++ brt_cnt_val = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT);
++ brt_cnt_val &= ~(0xff << ISPPRV_CNT_BRT_CNT_SHIFT);
++ contrast &= 0xff;
++ isp_reg_writel(brt_cnt_val | contrast << ISPPRV_CNT_BRT_CNT_SHIFT,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_contrast);
++
++/**
++ * isppreview_get_contrast_range - Gets the range contrast value.
++ * @min_contrast: Pointer to hold the minimum Contrast value.
++ * @max_contrast: Pointer to hold the maximum Contrast value.
++ **/
++void isppreview_get_contrast_range(u8 *min_contrast, u8 *max_contrast)
++{
++ *min_contrast = ISPPRV_CONTRAST_MIN;
++ *max_contrast = ISPPRV_CONTRAST_MAX;
++}
++EXPORT_SYMBOL_GPL(isppreview_get_contrast_range);
++
++/**
++ * isppreview_update_brightness - Updates the brightness in preview module.
++ * @brightness: Pointer to hold the current programmed brightness value.
++ *
++ **/
++void isppreview_update_brightness(u8 *brightness)
++{
++ ispprev_obj.brightness = *brightness;
++}
++EXPORT_SYMBOL_GPL(isppreview_update_brightness);
++
++/**
++ * isppreview_config_brightness - Configures the brightness.
++ * @contrast: 8bitvalue in U8Q0 format.
++ **/
++void isppreview_config_brightness(u8 brightness)
++{
++ u32 brt_cnt_val = 0;
++
++ DPRINTK_ISPPREV("\tConfiguring brightness in ISP: %d\n", brightness);
++ brt_cnt_val = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT);
++ brt_cnt_val &= ~(0xff << ISPPRV_CNT_BRT_BRT_SHIFT);
++ brightness &= 0xff;
++ isp_reg_writel(brt_cnt_val | brightness << ISPPRV_CNT_BRT_BRT_SHIFT,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_brightness);
++
++/**
++ * isppreview_query_brightness - Query the brightness.
++ * @brightness: Pointer to hold the current programmed brightness value.
++ **/
++void isppreview_query_brightness(u8 *brightness)
++{
++ *brightness = isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT);
++}
++EXPORT_SYMBOL_GPL(isppreview_query_brightness);
++
++/**
++ * isppreview_get_brightness_range - Gets the range brightness value
++ * @min_brightness: Pointer to hold the minimum brightness value
++ * @max_brightness: Pointer to hold the maximum brightness value
++ **/
++void isppreview_get_brightness_range(u8 *min_brightness, u8 *max_brightness)
++{
++ *min_brightness = ISPPRV_BRIGHT_MIN;
++ *max_brightness = ISPPRV_BRIGHT_MAX;
++}
++EXPORT_SYMBOL_GPL(isppreview_get_brightness_range);
++
++/**
++ * isppreview_set_color - Sets the color effect.
++ * @mode: Indicates the required color effect.
++ **/
++void isppreview_set_color(u8 *mode)
++{
++ ispprev_obj.color = *mode;
++ update_color_matrix = 1;
++}
++EXPORT_SYMBOL_GPL(isppreview_set_color);
++
++/**
++ * isppreview_get_color - Gets the current color effect.
++ * @mode: Indicates the current color effect.
++ **/
++void isppreview_get_color(u8 *mode)
++{
++ *mode = ispprev_obj.color;
++}
++EXPORT_SYMBOL_GPL(isppreview_get_color);
++
++/**
++ * isppreview_config_yc_range - Configures the max and min Y and C values.
++ * @yclimit: Structure containing the range of Y and C values.
++ **/
++void isppreview_config_yc_range(struct ispprev_yclimit yclimit)
++{
++ isp_reg_writel(yclimit.maxC << ISPPRV_SETUP_YC_MAXC_SHIFT |
++ yclimit.maxY << ISPPRV_SETUP_YC_MAXY_SHIFT |
++ yclimit.minC << ISPPRV_SETUP_YC_MINC_SHIFT |
++ yclimit.minY << ISPPRV_SETUP_YC_MINY_SHIFT,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_SETUP_YC);
++}
++EXPORT_SYMBOL_GPL(isppreview_config_yc_range);
++
++/**
++ * isppreview_try_size - Calculates output dimensions with the modules enabled.
++ * @input_w: input width for the preview in number of pixels per line
++ * @input_h: input height for the preview in number of lines
++ * @output_w: output width from the preview in number of pixels per line
++ * @output_h: output height for the preview in number of lines
++ *
++ * Calculates the number of pixels cropped in the submodules that are enabled,
++ * Fills up the output width height variables in the isp_prev structure.
++ **/
++int isppreview_try_size(u32 input_w, u32 input_h, u32 *output_w, u32 *output_h)
++{
++ u32 prevout_w = input_w;
++ u32 prevout_h = input_h;
++ u32 div = 0;
++ int max_out;
++
++ ispprev_obj.previn_w = input_w;
++ ispprev_obj.previn_h = input_h;
++
++ if (input_w < 32 || input_h < 32) {
++ printk(KERN_ERR "ISP_ERR : preview does not support "
++ "width < 16 or height < 32 \n");
++ return -EINVAL;
++ }
++ if (omap_rev() == OMAP3430_REV_ES1_0)
++ max_out = ISPPRV_MAXOUTPUT_WIDTH;
++ else
++ max_out = ISPPRV_MAXOUTPUT_WIDTH_ES2;
++
++ ispprev_obj.fmtavg = 0;
++
++ if (input_w > max_out) {
++ div = (input_w/max_out);
++ if (div >= 2 && div < 4) {
++ ispprev_obj.fmtavg = 1;
++ prevout_w /= 2;
++ } else if (div >= 4 && div < 8) {
++ ispprev_obj.fmtavg = 2;
++ prevout_w /= 4;
++ } else if (div >= 8) {
++ ispprev_obj.fmtavg = 3;
++ prevout_w /= 8;
++ }
++ }
++
++ if (ispprev_obj.hmed_en)
++ prevout_w -= 4;
++ if (ispprev_obj.nf_en) {
++ prevout_w -= 4;
++ prevout_h -= 4;
++ }
++ if (ispprev_obj.cfa_en) {
++ switch (ispprev_obj.cfafmt) {
++ case CFAFMT_BAYER:
++ case CFAFMT_SONYVGA:
++ prevout_w -= 4;
++ prevout_h -= 4;
++ break;
++ case CFAFMT_RGBFOVEON:
++ case CFAFMT_RRGGBBFOVEON:
++ case CFAFMT_DNSPL:
++ case CFAFMT_HONEYCOMB:
++ prevout_h -= 2;
++ break;
++ };
++ }
++ if (ispprev_obj.yenh_en || ispprev_obj.csup_en)
++ prevout_w -= 2;
++
++ /* Start at the correct row/column by skipping
++ * a Sensor specific amount.
++ */
++ prevout_w -= ispprev_obj.sph;
++ prevout_h -= ispprev_obj.slv;
++
++
++ if (prevout_w % 2)
++ prevout_w -= 1;
++
++ if (ispprev_obj.prev_outfmt == PREVIEW_MEM) {
++ if (((prevout_w * 2) & ISP_32B_BOUNDARY_OFFSET) !=
++ (prevout_w * 2)) {
++ prevout_w = ((prevout_w * 2) &
++ ISP_32B_BOUNDARY_OFFSET) / 2;
++ }
++ }
++ *output_w = prevout_w;
++ ispprev_obj.prevout_w = prevout_w;
++ *output_h = prevout_h;
++ ispprev_obj.prevout_h = prevout_h;
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_try_size);
++
++/**
++ * isppreview_config_size - Sets the size of ISP preview output.
++ * @input_w: input width for the preview in number of pixels per line
++ * @input_h: input height for the preview in number of lines
++ * @output_w: output width from the preview in number of pixels per line
++ * @output_h: output height for the preview in number of lines
++ *
++ * Configures the appropriate values stored in the isp_prev structure to
++ * HORZ/VERT_INFO. Configures PRV_AVE if needed for downsampling as calculated
++ * in trysize.
++ **/
++int isppreview_config_size(u32 input_w, u32 input_h, u32 output_w, u32 output_h)
++{
++ u32 prevsdroff;
++
++ if ((output_w != ispprev_obj.prevout_w) ||
++ (output_h != ispprev_obj.prevout_h)) {
++ printk(KERN_ERR "ISP_ERR : isppreview_try_size should "
++ "be called before config size\n");
++ return -EINVAL;
++ }
++
++ isp_reg_writel((ispprev_obj.sph << ISPPRV_HORZ_INFO_SPH_SHIFT) |
++ (ispprev_obj.previn_w - 1),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_HORZ_INFO);
++ isp_reg_writel((ispprev_obj.slv << ISPPRV_VERT_INFO_SLV_SHIFT) |
++ (ispprev_obj.previn_h - 2),
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_VERT_INFO);
++
++ if (ispprev_obj.cfafmt == CFAFMT_BAYER)
++ isp_reg_writel(ISPPRV_AVE_EVENDIST_2 <<
++ ISPPRV_AVE_EVENDIST_SHIFT |
++ ISPPRV_AVE_ODDDIST_2 <<
++ ISPPRV_AVE_ODDDIST_SHIFT |
++ ispprev_obj.fmtavg,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_AVE);
++
++ if (ispprev_obj.prev_outfmt == PREVIEW_MEM) {
++ prevsdroff = ispprev_obj.prevout_w * 2;
++ if ((prevsdroff & ISP_32B_BOUNDARY_OFFSET) != prevsdroff) {
++ DPRINTK_ISPPREV("ISP_WARN: Preview output buffer line"
++ " size is truncated"
++ " to 32byte boundary\n");
++ prevsdroff &= ISP_32B_BOUNDARY_BUF ;
++ }
++ isppreview_config_outlineoffset(prevsdroff);
++ }
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_config_size);
++
++/**
++ * isppreview_config_inlineoffset - Configures the Read address line offset.
++ * @offset: Line Offset for the input image.
++ **/
++int isppreview_config_inlineoffset(u32 offset)
++{
++ if ((offset & ISP_32B_BOUNDARY_OFFSET) == offset) {
++ isp_reg_writel(offset & 0xffff,
++ OMAP3_ISP_IOMEM_PREV, ISPPRV_RADR_OFFSET);
++ } else {
++ printk(KERN_ERR "ISP_ERR : Offset should be in 32 byte "
++ "boundary\n");
++ return -EINVAL;
++ }
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_config_inlineoffset);
++
++/**
++ * isppreview_set_inaddr - Sets memory address of input frame.
++ * @addr: 32bit memory address aligned on 32byte boundary.
++ *
++ * Configures the memory address from which the input frame is to be read.
++ **/
++int isppreview_set_inaddr(u32 addr)
++{
++ if ((addr & ISP_32B_BOUNDARY_BUF) == addr)
++ isp_reg_writel(addr, OMAP3_ISP_IOMEM_PREV, ISPPRV_RSDR_ADDR);
++ else {
++ printk(KERN_ERR "ISP_ERR: Address should be in 32 byte "
++ "boundary\n");
++ return -EINVAL;
++ }
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_set_inaddr);
++
++/**
++ * isppreview_config_outlineoffset - Configures the Write address line offset.
++ * @offset: Line Offset for the preview output.
++ **/
++int isppreview_config_outlineoffset(u32 offset)
++{
++ if ((offset & ISP_32B_BOUNDARY_OFFSET) != offset) {
++ printk(KERN_ERR "ISP_ERR : Offset should be in 32 byte "
++ "boundary\n");
++ return -EINVAL;
++ }
++ isp_reg_writel(offset & 0xffff, OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_WADD_OFFSET);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_config_outlineoffset);
++
++/**
++ * isppreview_set_outaddr - Sets the memory address to store output frame
++ * @addr: 32bit memory address aligned on 32byte boundary.
++ *
++ * Configures the memory address to which the output frame is written.
++ **/
++int isppreview_set_outaddr(u32 addr)
++{
++ if ((addr & ISP_32B_BOUNDARY_BUF) != addr) {
++ printk(KERN_ERR "ISP_ERR: Address should be in 32 byte "
++ "boundary\n");
++ return -EINVAL;
++ }
++ isp_reg_writel(addr, OMAP3_ISP_IOMEM_PREV, ISPPRV_WSDR_ADDR);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_set_outaddr);
++
++/**
++ * isppreview_config_darklineoffset - Sets the Dark frame address line offset.
++ * @offset: Line Offset for the Darkframe.
++ **/
++int isppreview_config_darklineoffset(u32 offset)
++{
++ if ((offset & ISP_32B_BOUNDARY_OFFSET) != offset) {
++ printk(KERN_ERR "ISP_ERR : Offset should be in 32 byte "
++ "boundary\n");
++ return -EINVAL;
++ }
++ isp_reg_writel(offset & 0xffff, OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_DRKF_OFFSET);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_config_darklineoffset);
++
++/**
++ * isppreview_set_darkaddr - Sets the memory address to store Dark frame.
++ * @addr: 32bit memory address aligned on 32 bit boundary.
++ **/
++int isppreview_set_darkaddr(u32 addr)
++{
++ if ((addr & ISP_32B_BOUNDARY_BUF) != addr) {
++ printk(KERN_ERR "ISP_ERR : Address should be in 32 byte "
++ "boundary\n");
++ return -EINVAL;
++ }
++ isp_reg_writel(addr, OMAP3_ISP_IOMEM_PREV, ISPPRV_DSDR_ADDR);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(isppreview_set_darkaddr);
++
++void __isppreview_enable(int enable)
++{
++ if (enable)
++ isp_reg_or(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ISPPRV_PCR_EN);
++ else
++ isp_reg_and(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR, ~ISPPRV_PCR_EN);
++}
++
++/**
++ * isppreview_enable - Enables the Preview module.
++ * @enable: 1 - Enables the preview module.
++ *
++ * Client should configure all the sub modules in Preview before this.
++ **/
++void isppreview_enable(int enable)
++{
++ __isppreview_enable(enable);
++ ispprev_obj.pm_state = enable;
++}
++EXPORT_SYMBOL_GPL(isppreview_enable);
++
++/**
++ * isppreview_suspend - Suspend Preview module.
++ **/
++void isppreview_suspend(void)
++{
++ if (ispprev_obj.pm_state)
++ __isppreview_enable(0);
++}
++EXPORT_SYMBOL_GPL(isppreview_suspend);
++
++/**
++ * isppreview_resume - Resume Preview module.
++ **/
++void isppreview_resume(void)
++{
++ if (ispprev_obj.pm_state)
++ __isppreview_enable(1);
++}
++EXPORT_SYMBOL_GPL(isppreview_resume);
++
++
++/**
++ * isppreview_busy - Gets busy state of preview module.
++ **/
++int isppreview_busy(void)
++{
++ return isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR) &
++ ISPPRV_PCR_BUSY;
++}
++EXPORT_SYMBOL_GPL(isppreview_busy);
++
++/**
++ * isppreview_get_config - Gets parameters of preview module.
++ **/
++struct prev_params *isppreview_get_config(void)
++{
++ return prev_config_params;
++}
++EXPORT_SYMBOL_GPL(isppreview_get_config);
++
++/**
++ * isppreview_save_context - Saves the values of the preview module registers.
++ **/
++void isppreview_save_context(void)
++{
++ DPRINTK_ISPPREV("Saving context\n");
++ isp_save_context(ispprev_reg_list);
++}
++EXPORT_SYMBOL_GPL(isppreview_save_context);
++
++/**
++ * isppreview_restore_context - Restores the values of preview module registers
++ **/
++void isppreview_restore_context(void)
++{
++ DPRINTK_ISPPREV("Restoring context\n");
++ isp_restore_context(ispprev_reg_list);
++}
++EXPORT_SYMBOL_GPL(isppreview_restore_context);
++
++/**
++ * isppreview_print_status - Prints the values of the Preview Module registers.
++ *
++ * Also prints other debug information stored in the preview moduel.
++ **/
++void isppreview_print_status(void)
++{
++ DPRINTK_ISPPREV("Module in use =%d\n", ispprev_obj.prev_inuse);
++ DPRINTK_ISPPREV("Preview Input format =%d, Output Format =%d\n",
++ ispprev_obj.prev_inpfmt,
++ ispprev_obj.prev_outfmt);
++ DPRINTK_ISPPREV("Accepted Preview Input (width = %d,Height = %d)\n",
++ ispprev_obj.previn_w,
++ ispprev_obj.previn_h);
++ DPRINTK_ISPPREV("Accepted Preview Output (width = %d,Height = %d)\n",
++ ispprev_obj.prevout_w,
++ ispprev_obj.prevout_h);
++ DPRINTK_ISPPREV("###ISP_CTRL in preview =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL));
++ DPRINTK_ISPPREV("###ISP_IRQ0ENABLE in preview =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE));
++ DPRINTK_ISPPREV("###ISP_IRQ0STATUS in preview =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS));
++ DPRINTK_ISPPREV("###PRV PCR =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR));
++ DPRINTK_ISPPREV("###PRV HORZ_INFO =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_HORZ_INFO));
++ DPRINTK_ISPPREV("###PRV VERT_INFO =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_VERT_INFO));
++ DPRINTK_ISPPREV("###PRV WSDR_ADDR =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_WSDR_ADDR));
++ DPRINTK_ISPPREV("###PRV WADD_OFFSET =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_WADD_OFFSET));
++ DPRINTK_ISPPREV("###PRV AVE =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_AVE));
++ DPRINTK_ISPPREV("###PRV HMED =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_HMED));
++ DPRINTK_ISPPREV("###PRV NF =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_NF));
++ DPRINTK_ISPPREV("###PRV WB_DGAIN =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_WB_DGAIN));
++ DPRINTK_ISPPREV("###PRV WBGAIN =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_WBGAIN));
++ DPRINTK_ISPPREV("###PRV WBSEL =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_WBSEL));
++ DPRINTK_ISPPREV("###PRV CFA =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CFA));
++ DPRINTK_ISPPREV("###PRV BLKADJOFF =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_BLKADJOFF));
++ DPRINTK_ISPPREV("###PRV RGB_MAT1 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT1));
++ DPRINTK_ISPPREV("###PRV RGB_MAT2 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT2));
++ DPRINTK_ISPPREV("###PRV RGB_MAT3 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT3));
++ DPRINTK_ISPPREV("###PRV RGB_MAT4 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT4));
++ DPRINTK_ISPPREV("###PRV RGB_MAT5 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_MAT5));
++ DPRINTK_ISPPREV("###PRV RGB_OFF1 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_OFF1));
++ DPRINTK_ISPPREV("###PRV RGB_OFF2 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_RGB_OFF2));
++ DPRINTK_ISPPREV("###PRV CSC0 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC0));
++ DPRINTK_ISPPREV("###PRV CSC1 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC1));
++ DPRINTK_ISPPREV("###PRV CSC2 =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC2));
++ DPRINTK_ISPPREV("###PRV CSC_OFFSET =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CSC_OFFSET));
++ DPRINTK_ISPPREV("###PRV CNT_BRT =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CNT_BRT));
++ DPRINTK_ISPPREV("###PRV CSUP =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_CSUP));
++ DPRINTK_ISPPREV("###PRV SETUP_YC =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_PREV, ISPPRV_SETUP_YC));
++}
++EXPORT_SYMBOL_GPL(isppreview_print_status);
++
++/**
++ * isp_preview_init - Module Initialization.
++ **/
++int __init isp_preview_init(void)
++{
++ int i = 0;
++
++ prev_config_params = kmalloc(sizeof(*prev_config_params), GFP_KERNEL);
++ if (!prev_config_params) {
++ printk(KERN_ERR "Can't get memory for isp_preview params!\n");
++ return -ENOMEM;
++ }
++ params = prev_config_params;
++
++ ispprev_obj.prev_inuse = 0;
++ mutex_init(&ispprev_obj.ispprev_mutex);
++
++ /* Init values */
++ ispprev_obj.sph = 2;
++ ispprev_obj.slv = 0;
++ ispprev_obj.color = V4L2_COLORFX_NONE;
++ ispprev_obj.contrast = ISPPRV_CONTRAST_DEF;
++ params->contrast = ISPPRV_CONTRAST_DEF;
++ ispprev_obj.brightness = ISPPRV_BRIGHT_DEF;
++ params->brightness = ISPPRV_BRIGHT_DEF;
++ params->average = NO_AVE;
++ params->lens_shading_shift = 0;
++ params->pix_fmt = YCPOS_YCrYCb;
++ params->cfa.cfafmt = CFAFMT_BAYER;
++ params->cfa.cfa_table = cfa_coef_table;
++ params->cfa.cfa_gradthrs_horz = FLR_CFA_GRADTHRS_HORZ;
++ params->cfa.cfa_gradthrs_vert = FLR_CFA_GRADTHRS_VERT;
++ params->csup.gain = FLR_CSUP_GAIN;
++ params->csup.thres = FLR_CSUP_THRES;
++ params->csup.hypf_en = 0;
++ params->ytable = luma_enhance_table;
++ params->nf.spread = FLR_NF_STRGTH;
++ memcpy(params->nf.table, noise_filter_table, sizeof(params->nf.table));
++ params->dcor.couplet_mode_en = 1;
++ for (i = 0; i < 4; i++)
++ params->dcor.detect_correct[i] = 0xE;
++ params->gtable.bluetable = bluegamma_table;
++ params->gtable.greentable = greengamma_table;
++ params->gtable.redtable = redgamma_table;
++ params->wbal.dgain = FLR_WBAL_DGAIN;
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ params->wbal.coef0 = FLR_WBAL_COEF0_ES1;
++ params->wbal.coef1 = FLR_WBAL_COEF1_ES1;
++ params->wbal.coef2 = FLR_WBAL_COEF2_ES1;
++ params->wbal.coef3 = FLR_WBAL_COEF3_ES1;
++ } else {
++ params->wbal.coef0 = FLR_WBAL_COEF0;
++ params->wbal.coef1 = FLR_WBAL_COEF1;
++ params->wbal.coef2 = FLR_WBAL_COEF2;
++ params->wbal.coef3 = FLR_WBAL_COEF3;
++ }
++ params->blk_adj.red = FLR_BLKADJ_RED;
++ params->blk_adj.green = FLR_BLKADJ_GREEN;
++ params->blk_adj.blue = FLR_BLKADJ_BLUE;
++ params->rgb2rgb = flr_rgb2rgb;
++ params->rgb2ycbcr = flr_prev_csc[ispprev_obj.color];
++
++ params->features = PREV_CFA | PREV_DEFECT_COR | PREV_NOISE_FILTER;
++ params->features &= ~(PREV_AVERAGER | PREV_INVERSE_ALAW |
++ PREV_HORZ_MEDIAN_FILTER |
++ PREV_GAMMA_BYPASS |
++ PREV_DARK_FRAME_SUBTRACT |
++ PREV_LENS_SHADING |
++ PREV_DARK_FRAME_CAPTURE |
++ PREV_CHROMA_SUPPRESS |
++ PREV_LUMA_ENHANCE);
++ return 0;
++}
++
++/**
++ * isp_preview_cleanup - Module Cleanup.
++ **/
++void isp_preview_cleanup(void)
++{
++ kfree(prev_config_params);
++}
+diff --git a/drivers/media/video/isp/isppreview.h b/drivers/media/video/isp/isppreview.h
+new file mode 100644
+index 0000000..e88c329
+--- /dev/null
++++ b/drivers/media/video/isp/isppreview.h
+@@ -0,0 +1,354 @@
++/*
++ * isppreview.h
++ *
++ * Driver header file for Preview module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Senthilvadivu Guruswamy <svadivu@ti.com>
++ * Pallavi Kulkarni <p-kulkarni@ti.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_PREVIEW_H
++#define OMAP_ISP_PREVIEW_H
++
++#include <mach/isp_user.h>
++/* Isp query control structure */
++
++#define ISPPRV_BRIGHT_STEP 0x1
++#define ISPPRV_BRIGHT_DEF 0x0
++#define ISPPRV_BRIGHT_LOW 0x0
++#define ISPPRV_BRIGHT_HIGH 0xF
++#define ISPPRV_BRIGHT_UNITS 0x7
++
++#define ISPPRV_CONTRAST_STEP 0x1
++#define ISPPRV_CONTRAST_DEF 0x4
++#define ISPPRV_CONTRAST_LOW 0x0
++#define ISPPRV_CONTRAST_HIGH 0xF
++#define ISPPRV_CONTRAST_UNITS 0x4
++
++#define NO_AVE 0x0
++#define AVE_2_PIX 0x1
++#define AVE_4_PIX 0x2
++#define AVE_8_PIX 0x3
++#define AVE_ODD_PIXEL_DIST (1 << 4) /* For Bayer Sensors */
++#define AVE_EVEN_PIXEL_DIST (1 << 2)
++
++#define WB_GAIN_MAX 4
++
++/* Features list */
++#define PREV_AVERAGER (1 << 0)
++#define PREV_INVERSE_ALAW (1 << 1)
++#define PREV_HORZ_MEDIAN_FILTER (1 << 2)
++#define PREV_NOISE_FILTER (1 << 3)
++#define PREV_CFA (1 << 4)
++#define PREV_GAMMA_BYPASS (1 << 5)
++#define PREV_LUMA_ENHANCE (1 << 6)
++#define PREV_CHROMA_SUPPRESS (1 << 7)
++#define PREV_DARK_FRAME_SUBTRACT (1 << 8)
++#define PREV_LENS_SHADING (1 << 9)
++#define PREV_DARK_FRAME_CAPTURE (1 << 10)
++#define PREV_DEFECT_COR (1 << 11)
++
++
++#define ISP_NF_TABLE_SIZE (1 << 10)
++
++#define ISP_GAMMA_TABLE_SIZE (1 << 10)
++
++/* Table addresses */
++#define ISPPRV_TBL_ADDR_RED_G_START 0x00
++#define ISPPRV_TBL_ADDR_BLUE_G_START 0x800
++#define ISPPRV_TBL_ADDR_GREEN_G_START 0x400
++
++/*
++ *Enumeration Constants for input and output format
++ */
++enum preview_input {
++ PRV_RAW_CCDC,
++ PRV_RAW_MEM,
++ PRV_RGBBAYERCFA,
++ PRV_COMPCFA,
++ PRV_CCDC_DRKF,
++ PRV_OTHERS
++};
++enum preview_output {
++ PREVIEW_RSZ,
++ PREVIEW_MEM
++};
++/*
++ * Configure byte layout of YUV image
++ */
++enum preview_ycpos_mode {
++ YCPOS_YCrYCb = 0,
++ YCPOS_YCbYCr = 1,
++ YCPOS_CbYCrY = 2,
++ YCPOS_CrYCbY = 3
++};
++
++/**
++ * struct ispprev_gtable - Structure for Gamma Correction.
++ * @redtable: Pointer to the red gamma table.
++ * @greentable: Pointer to the green gamma table.
++ * @bluetable: Pointer to the blue gamma table.
++ */
++struct ispprev_gtable {
++ u32 *redtable;
++ u32 *greentable;
++ u32 *bluetable;
++};
++
++/**
++ * struct prev_white_balance - Structure for White Balance 2.
++ * @wb_dgain: White balance common gain.
++ * @wb_gain: Individual color gains.
++ * @wb_coefmatrix: Coefficient matrix
++ */
++struct prev_white_balance {
++ u16 wb_dgain; /* white balance common gain */
++ u8 wb_gain[WB_GAIN_MAX]; /* individual color gains */
++ u8 wb_coefmatrix[WB_GAIN_MAX][WB_GAIN_MAX];
++};
++
++/**
++ * struct prev_size_params - Structure for size parameters.
++ * @hstart: Starting pixel.
++ * @vstart: Starting line.
++ * @hsize: Width of input image.
++ * @vsize: Height of input image.
++ * @pixsize: Pixel size of the image in terms of bits.
++ * @in_pitch: Line offset of input image.
++ * @out_pitch: Line offset of output image.
++ */
++struct prev_size_params {
++ unsigned int hstart;
++ unsigned int vstart;
++ unsigned int hsize;
++ unsigned int vsize;
++ unsigned char pixsize;
++ unsigned short in_pitch;
++ unsigned short out_pitch;
++};
++
++/**
++ * struct prev_rgb2ycbcr_coeffs - Structure RGB2YCbCr parameters.
++ * @coeff: Color conversion gains in 3x3 matrix.
++ * @offset: Color conversion offsets.
++ */
++struct prev_rgb2ycbcr_coeffs {
++ short coeff[RGB_MAX][RGB_MAX];
++ short offset[RGB_MAX];
++};
++
++/**
++ * struct prev_darkfrm_params - Structure for Dark frame suppression.
++ * @addr: Memory start address.
++ * @offset: Line offset.
++ */
++struct prev_darkfrm_params {
++ u32 addr;
++ u32 offset;
++ };
++
++/**
++ * struct prev_params - Structure for all configuration
++ * @features: Set of features enabled.
++ * @pix_fmt: Output pixel format.
++ * @cfa: CFA coefficients.
++ * @csup: Chroma suppression coefficients.
++ * @ytable: Pointer to Luma enhancement coefficients.
++ * @nf: Noise filter coefficients.
++ * @dcor: Noise filter coefficients.
++ * @gtable: Gamma coefficients.
++ * @wbal: White Balance parameters.
++ * @blk_adj: Black adjustment parameters.
++ * @rgb2rgb: RGB blending parameters.
++ * @rgb2ycbcr: RGB to ycbcr parameters.
++ * @hmf_params: Horizontal median filter.
++ * @size_params: Size parameters.
++ * @drkf_params: Darkframe parameters.
++ * @lens_shading_shift:
++ * @average: Downsampling rate for averager.
++ * @contrast: Contrast.
++ * @brightness: Brightness.
++ */
++struct prev_params {
++ u16 features;
++ enum preview_ycpos_mode pix_fmt;
++ struct ispprev_cfa cfa;
++ struct ispprev_csup csup;
++ u32 *ytable;
++ struct ispprev_nf nf;
++ struct ispprev_dcor dcor;
++ struct ispprev_gtable gtable;
++ struct ispprev_wbal wbal;
++ struct ispprev_blkadj blk_adj;
++ struct ispprev_rgbtorgb rgb2rgb;
++ struct ispprev_csc rgb2ycbcr;
++ struct ispprev_hmed hmf_params;
++ struct prev_size_params size_params;
++ struct prev_darkfrm_params drkf_params;
++ u8 lens_shading_shift;
++ u8 average;
++ u8 contrast;
++ u8 brightness;
++};
++
++/**
++ * struct isptables_update - Structure for Table Configuration.
++ * @update: Specifies which tables should be updated.
++ * @flag: Specifies which tables should be enabled.
++ * @prev_nf: Pointer to structure for Noise Filter
++ * @lsc: Pointer to LSC gain table. (currently not used)
++ * @red_gamma: Pointer to red gamma correction table.
++ * @green_gamma: Pointer to green gamma correction table.
++ * @blue_gamma: Pointer to blue gamma correction table.
++ */
++struct isptables_update {
++ u16 update;
++ u16 flag;
++ struct ispprev_nf *prev_nf;
++ u32 *lsc;
++ u32 *red_gamma;
++ u32 *green_gamma;
++ u32 *blue_gamma;
++};
++
++void isppreview_config_shadow_registers(void);
++
++int isppreview_request(void);
++
++int isppreview_free(void);
++
++int isppreview_config_datapath(enum preview_input input,
++ enum preview_output output);
++
++void isppreview_config_ycpos(enum preview_ycpos_mode mode);
++
++void isppreview_config_averager(u8 average);
++
++void isppreview_enable_invalaw(u8 enable);
++
++void isppreview_enable_drkframe(u8 enable);
++
++void isppreview_enable_shadcomp(u8 enable);
++
++void isppreview_config_drkf_shadcomp(u8 scomp_shtval);
++
++void isppreview_enable_gammabypass(u8 enable);
++
++void isppreview_enable_hmed(u8 enable);
++
++void isppreview_config_hmed(struct ispprev_hmed);
++
++void isppreview_enable_noisefilter(u8 enable);
++
++void isppreview_config_noisefilter(struct ispprev_nf prev_nf);
++
++void isppreview_enable_dcor(u8 enable);
++
++void isppreview_config_dcor(struct ispprev_dcor prev_dcor);
++
++
++void isppreview_config_cfa(struct ispprev_cfa);
++
++void isppreview_config_gammacorrn(struct ispprev_gtable);
++
++void isppreview_config_chroma_suppression(struct ispprev_csup csup);
++
++void isppreview_enable_cfa(u8 enable);
++
++void isppreview_config_luma_enhancement(u32 *ytable);
++
++void isppreview_enable_luma_enhancement(u8 enable);
++
++void isppreview_enable_chroma_suppression(u8 enable);
++
++void isppreview_config_whitebalance(struct ispprev_wbal);
++
++void isppreview_config_blkadj(struct ispprev_blkadj);
++
++void isppreview_config_rgb_blending(struct ispprev_rgbtorgb);
++
++void isppreview_config_rgb_to_ycbcr(struct ispprev_csc);
++
++void isppreview_update_contrast(u8 *contrast);
++
++void isppreview_query_contrast(u8 *contrast);
++
++void isppreview_config_contrast(u8 contrast);
++
++void isppreview_get_contrast_range(u8 *min_contrast, u8 *max_contrast);
++
++void isppreview_update_brightness(u8 *brightness);
++
++void isppreview_config_brightness(u8 brightness);
++
++void isppreview_get_brightness_range(u8 *min_brightness, u8 *max_brightness);
++
++void isppreview_set_color(u8 *mode);
++
++void isppreview_get_color(u8 *mode);
++
++void isppreview_query_brightness(u8 *brightness);
++
++void isppreview_config_yc_range(struct ispprev_yclimit yclimit);
++
++int isppreview_try_size(u32 input_w, u32 input_h, u32 *output_w,
++ u32 *output_h);
++
++int isppreview_config_size(u32 input_w, u32 input_h, u32 output_w,
++ u32 output_h);
++
++int isppreview_config_inlineoffset(u32 offset);
++
++int isppreview_set_inaddr(u32 addr);
++
++int isppreview_config_outlineoffset(u32 offset);
++
++int isppreview_set_outaddr(u32 addr);
++
++int isppreview_config_darklineoffset(u32 offset);
++
++int isppreview_set_darkaddr(u32 addr);
++
++void isppreview_enable(int enable);
++
++void isppreview_suspend(void);
++
++void isppreview_resume(void);
++
++int isppreview_busy(void);
++
++struct prev_params *isppreview_get_config(void);
++
++void isppreview_print_status(void);
++
++#ifndef CONFIG_ARCH_OMAP3410
++void isppreview_save_context(void);
++#else
++static inline void isppreview_save_context(void) {}
++#endif
++
++#ifndef CONFIG_ARCH_OMAP3410
++void isppreview_restore_context(void);
++#else
++static inline void isppreview_restore_context(void) {}
++#endif
++
++int omap34xx_isp_preview_config(void *userspace_add);
++
++int omap34xx_isp_tables_update(struct isptables_update *isptables_struct);
++
++void isppreview_set_skip(u32 h, u32 v);
++
++#endif/* OMAP_ISP_PREVIEW_H */
+diff --git a/drivers/media/video/isp/ispresizer.c b/drivers/media/video/isp/ispresizer.c
+new file mode 100644
+index 0000000..f78ddb3
+--- /dev/null
++++ b/drivers/media/video/isp/ispresizer.c
+@@ -0,0 +1,928 @@
++/*
++ * ispresizer.c
++ *
++ * Driver Library for Resizer module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C)2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sameer Venkatraman <sameerv@ti.com>
++ * Mohit Jalori
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <linux/module.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "ispresizer.h"
++
++/* Default configuration of resizer,filter coefficients,yenh for camera isp */
++static struct isprsz_yenh ispreszdefaultyenh = {0, 0, 0, 0};
++static struct isprsz_coef ispreszdefcoef = {
++ {
++ 0x0027, 0x00B2, 0x00B2, 0x0027,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ 0x0027, 0x00B2, 0x0027, 0x00B2,
++ },
++ {
++ 0x0000, 0x0100, 0x0000, 0x0000,
++ 0x03FA, 0x00F6, 0x0010, 0x0000,
++ 0x03F9, 0x00DB, 0x002C, 0x0000,
++ 0x03FB, 0x00B3, 0x0053, 0x03FF,
++ 0x03FD, 0x0082, 0x0084, 0x03FD,
++ 0x03FF, 0x0053, 0x00B3, 0x03FB,
++ 0x0000, 0x002C, 0x00DB, 0x03F9,
++ 0x0000, 0x0010, 0x00F6, 0x03FA
++ },
++ {
++ 0x0004, 0x0023, 0x0023, 0x005A,
++ 0x005A, 0x0058, 0x0058, 0x0004,
++ 0x0023, 0x0023, 0x005A, 0x005A,
++ 0x0058, 0x0058, 0x0004, 0x0023,
++ 0x0023, 0x005A, 0x005A, 0x0058,
++ 0x0058, 0x0004, 0x0023, 0x0023,
++ 0x005A, 0x005A, 0x0058, 0x0058
++ },
++ {
++ 0x0004, 0x0023, 0x005A, 0x0058,
++ 0x0023, 0x0004, 0x0000, 0x0002,
++ 0x0018, 0x004d, 0x0060, 0x0031,
++ 0x0008, 0x0000, 0x0001, 0x000f,
++ 0x003f, 0x0062, 0x003f, 0x000f,
++ 0x0001, 0x0000, 0x0008, 0x0031,
++ 0x0060, 0x004d, 0x0018, 0x0002
++ }
++};
++
++/**
++ * struct isp_res - Structure for the resizer module to store its information.
++ * @res_inuse: Indicates if resizer module has been reserved. 1 - Reserved,
++ * 0 - Freed.
++ * @h_startphase: Horizontal starting phase.
++ * @v_startphase: Vertical starting phase.
++ * @h_resz: Horizontal resizing value.
++ * @v_resz: Vertical resizing value.
++ * @outputwidth: Output Image Width in pixels.
++ * @outputheight: Output Image Height in pixels.
++ * @inputwidth: Input Image Width in pixels.
++ * @inputheight: Input Image Height in pixels.
++ * @algo: Algorithm select. 0 - Disable, 1 - [-1 2 -1]/2 high-pass filter,
++ * 2 - [-1 -2 6 -2 -1]/4 high-pass filter.
++ * @ipht_crop: Vertical start line for cropping.
++ * @ipwd_crop: Horizontal start pixel for cropping.
++ * @cropwidth: Crop Width.
++ * @cropheight: Crop Height.
++ * @resinput: Resizer input.
++ * @coeflist: Register configuration for Resizer.
++ * @ispres_mutex: Mutex for isp resizer.
++ */
++static struct isp_res {
++ int pm_state;
++ u8 res_inuse;
++ u8 h_startphase;
++ u8 v_startphase;
++ u16 h_resz;
++ u16 v_resz;
++ u32 outputwidth;
++ u32 outputheight;
++ u32 inputwidth;
++ u32 inputheight;
++ u8 algo;
++ u32 ipht_crop;
++ u32 ipwd_crop;
++ u32 cropwidth;
++ u32 cropheight;
++ dma_addr_t tmp_buf;
++ enum ispresizer_input resinput;
++ struct isprsz_coef coeflist;
++ struct mutex ispres_mutex; /* For checking/modifying res_inuse */
++} ispres_obj;
++
++/* Structure for saving/restoring resizer module registers */
++static struct isp_reg isprsz_reg_list[] = {
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_OUT_SIZE, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_IN_START, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_IN_SIZE, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INADD, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INOFF, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_OUTADD, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_OUTOFF, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT10, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT32, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT54, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT76, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT98, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT1110, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT1312, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT1514, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT1716, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT1918, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT2120, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT2322, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT2524, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT2726, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT2928, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_HFILT3130, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT10, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT32, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT54, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT76, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT98, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT1110, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT1312, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT1514, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT1716, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT1918, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT2120, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT2322, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT2524, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT2726, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT2928, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_VFILT3130, 0x0000},
++ {OMAP3_ISP_IOMEM_RESZ, ISPRSZ_YENH, 0x0000},
++ {0, ISP_TOK_TERM, 0x0000}
++};
++
++/**
++ * ispresizer_config_shadow_registers - Configure shadow registers.
++ **/
++void ispresizer_config_shadow_registers()
++{
++ return;
++}
++EXPORT_SYMBOL(ispresizer_config_shadow_registers);
++
++/**
++ * ispresizer_trycrop - Validate crop dimensions.
++ * @left: Left distance to start position of crop.
++ * @top: Top distance to start position of crop.
++ * @width: Width of input image.
++ * @height: Height of input image.
++ * @ow: Width of output image.
++ * @oh: Height of output image.
++ **/
++void ispresizer_trycrop(u32 left, u32 top, u32 width, u32 height, u32 ow,
++ u32 oh)
++{
++ ispres_obj.cropwidth = width + 6;
++ ispres_obj.cropheight = height + 6;
++ ispresizer_try_size(&ispres_obj.cropwidth, &ispres_obj.cropheight, &ow,
++ &oh);
++ ispres_obj.ipht_crop = top;
++ ispres_obj.ipwd_crop = left;
++}
++EXPORT_SYMBOL(ispresizer_trycrop);
++
++/**
++ * ispresizer_applycrop - Apply crop to input image.
++ **/
++void ispresizer_applycrop(void)
++{
++ ispresizer_config_size(ispres_obj.cropwidth, ispres_obj.cropheight,
++ ispres_obj.outputwidth,
++ ispres_obj.outputheight);
++ return;
++}
++EXPORT_SYMBOL(ispresizer_applycrop);
++
++/**
++ * ispresizer_request - Reserves the Resizer module.
++ *
++ * Allows only one user at a time.
++ *
++ * Returns 0 if successful, or -EBUSY if resizer module was already requested.
++ **/
++int ispresizer_request()
++{
++ mutex_lock(&ispres_obj.ispres_mutex);
++ if (!ispres_obj.res_inuse) {
++ ispres_obj.res_inuse = 1;
++ mutex_unlock(&ispres_obj.ispres_mutex);
++ isp_reg_writel(isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL) |
++ ISPCTRL_SBL_WR0_RAM_EN |
++ ISPCTRL_RSZ_CLK_EN,
++ OMAP3_ISP_IOMEM_MAIN, ISP_CTRL);
++ return 0;
++ } else {
++ mutex_unlock(&ispres_obj.ispres_mutex);
++ printk(KERN_ERR "ISP_ERR : Resizer Module Busy\n");
++ return -EBUSY;
++ }
++}
++EXPORT_SYMBOL(ispresizer_request);
++
++/**
++ * ispresizer_free - Makes Resizer module free.
++ *
++ * Returns 0 if successful, or -EINVAL if resizer module was already freed.
++ **/
++int ispresizer_free()
++{
++ mutex_lock(&ispres_obj.ispres_mutex);
++ if (ispres_obj.res_inuse) {
++ ispres_obj.res_inuse = 0;
++ mutex_unlock(&ispres_obj.ispres_mutex);
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
++ ~(ISPCTRL_RSZ_CLK_EN | ISPCTRL_SBL_WR0_RAM_EN));
++ return 0;
++ } else {
++ mutex_unlock(&ispres_obj.ispres_mutex);
++ DPRINTK_ISPRESZ("ISP_ERR : Resizer Module already freed\n");
++ return -EINVAL;
++ }
++}
++EXPORT_SYMBOL(ispresizer_free);
++
++/**
++ * ispresizer_config_datapath - Specifies which input to use in resizer module
++ * @input: Indicates the module that gives the image to resizer.
++ *
++ * Sets up the default resizer configuration according to the arguments.
++ *
++ * Returns 0 if successful, or -EINVAL if an unsupported input was requested.
++ **/
++int ispresizer_config_datapath(enum ispresizer_input input)
++{
++ u32 cnt = 0;
++ DPRINTK_ISPRESZ("ispresizer_config_datapath()+\n");
++ ispres_obj.resinput = input;
++ switch (input) {
++ case RSZ_OTFLY_YUV:
++ cnt &= ~ISPRSZ_CNT_INPTYP;
++ cnt &= ~ISPRSZ_CNT_INPSRC;
++ ispresizer_set_inaddr(0);
++ ispresizer_config_inlineoffset(0);
++ break;
++ case RSZ_MEM_YUV:
++ cnt |= ISPRSZ_CNT_INPSRC;
++ cnt &= ~ISPRSZ_CNT_INPTYP;
++ break;
++ case RSZ_MEM_COL8:
++ cnt |= ISPRSZ_CNT_INPSRC;
++ cnt |= ISPRSZ_CNT_INPTYP;
++ break;
++ default:
++ printk(KERN_ERR "ISP_ERR : Wrong Input\n");
++ return -EINVAL;
++ }
++ isp_reg_or(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT, cnt);
++ ispresizer_config_ycpos(0);
++ ispresizer_config_filter_coef(&ispreszdefcoef);
++ ispresizer_enable_cbilin(0);
++ ispresizer_config_luma_enhance(&ispreszdefaultyenh);
++ DPRINTK_ISPRESZ("ispresizer_config_datapath()-\n");
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_config_datapath);
++
++/**
++ * ispresizer_try_size - Validates input and output images size.
++ * @input_w: input width for the resizer in number of pixels per line
++ * @input_h: input height for the resizer in number of lines
++ * @output_w: output width from the resizer in number of pixels per line
++ * resizer when writing to memory needs this to be multiple of 16.
++ * @output_h: output height for the resizer in number of lines, must be even.
++ *
++ * Calculates the horizontal and vertical resize ratio, number of pixels to
++ * be cropped in the resizer module and checks the validity of various
++ * parameters. Formula used for calculation is:-
++ *
++ * 8-phase 4-tap mode :-
++ * inputwidth = (32 * sph + (ow - 1) * hrsz + 16) >> 8 + 7
++ * inputheight = (32 * spv + (oh - 1) * vrsz + 16) >> 8 + 4
++ * endpahse for width = ((32 * sph + (ow - 1) * hrsz + 16) >> 5) % 8
++ * endphase for height = ((32 * sph + (oh - 1) * hrsz + 16) >> 5) % 8
++ *
++ * 4-phase 7-tap mode :-
++ * inputwidth = (64 * sph + (ow - 1) * hrsz + 32) >> 8 + 7
++ * inputheight = (64 * spv + (oh - 1) * vrsz + 32) >> 8 + 7
++ * endpahse for width = ((64 * sph + (ow - 1) * hrsz + 32) >> 6) % 4
++ * endphase for height = ((64 * sph + (oh - 1) * hrsz + 32) >> 6) % 4
++ *
++ * Where:
++ * sph = Start phase horizontal
++ * spv = Start phase vertical
++ * ow = Output width
++ * oh = Output height
++ * hrsz = Horizontal resize value
++ * vrsz = Vertical resize value
++ *
++ * Fills up the output/input widht/height, horizontal/vertical resize ratio,
++ * horizontal/vertical crop variables in the isp_res structure.
++ **/
++int ispresizer_try_size(u32 *input_width, u32 *input_height, u32 *output_w,
++ u32 *output_h)
++{
++ u32 rsz, rsz_7, rsz_4;
++ u32 sph;
++ u32 input_w, input_h;
++ int max_in_otf, max_out_7tap;
++
++ input_w = *input_width;
++ input_h = *input_height;
++
++ if (input_w < 32 || input_h < 32) {
++ DPRINTK_ISPCCDC("ISP_ERR: RESIZER cannot handle input width"
++ " less than 32 pixels or height less than"
++ " 32\n");
++ return -EINVAL;
++ }
++ input_w -= 6;
++ input_h -= 6;
++
++ if (input_h > MAX_IN_HEIGHT)
++ return -EINVAL;
++
++ if (*output_w < 16)
++ *output_w = 16;
++
++ if (*output_h < 2)
++ *output_h = 2;
++
++ if (omap_rev() == OMAP3430_REV_ES1_0) {
++ max_in_otf = MAX_IN_WIDTH_ONTHEFLY_MODE;
++ max_out_7tap = MAX_7TAP_VRSZ_OUTWIDTH;
++ } else {
++ max_in_otf = MAX_IN_WIDTH_ONTHEFLY_MODE_ES2;
++ max_out_7tap = MAX_7TAP_VRSZ_OUTWIDTH_ES2;
++ }
++
++ if (ispres_obj.resinput == RSZ_OTFLY_YUV) {
++ if (input_w > max_in_otf)
++ return -EINVAL;
++ } else {
++ if (input_w > MAX_IN_WIDTH_MEMORY_MODE)
++ return -EINVAL;
++ }
++
++ *output_h &= 0xfffffffe;
++ sph = DEFAULTSTPHASE;
++
++ rsz_7 = ((input_h - 7) * 256) / (*output_h - 1);
++ rsz_4 = ((input_h - 4) * 256) / (*output_h - 1);
++
++ rsz = (input_h * 256) / *output_h;
++
++ if (rsz <= MID_RESIZE_VALUE) {
++ rsz = rsz_4;
++ if (rsz < MINIMUM_RESIZE_VALUE) {
++ rsz = MINIMUM_RESIZE_VALUE;
++ *output_h = (((input_h - 4) * 256) / rsz) + 1;
++ printk(KERN_INFO "%s: using output_h %d instead\n",
++ __func__, *output_h);
++ }
++ } else {
++ rsz = rsz_7;
++ if (*output_w > max_out_7tap)
++ *output_w = max_out_7tap;
++ if (rsz > MAXIMUM_RESIZE_VALUE) {
++ rsz = MAXIMUM_RESIZE_VALUE;
++ *output_h = (((input_h - 7) * 256) / rsz) + 1;
++ printk(KERN_INFO "%s: using output_h %d instead\n",
++ __func__, *output_h);
++ }
++ }
++
++ if (rsz > MID_RESIZE_VALUE) {
++ input_h =
++ (((64 * sph) + ((*output_h - 1) * rsz) + 32) / 256) + 7;
++ } else {
++ input_h =
++ (((32 * sph) + ((*output_h - 1) * rsz) + 16) / 256) + 4;
++ }
++
++ ispres_obj.outputheight = *output_h;
++ ispres_obj.v_resz = rsz;
++ ispres_obj.inputheight = input_h;
++ ispres_obj.ipht_crop = DEFAULTSTPIXEL;
++ ispres_obj.v_startphase = sph;
++
++ *output_w &= 0xfffffff0;
++ sph = DEFAULTSTPHASE;
++
++ rsz_7 = ((input_w - 7) * 256) / (*output_w - 1);
++ rsz_4 = ((input_w - 4) * 256) / (*output_w - 1);
++
++ rsz = (input_w * 256) / *output_w;
++ if (rsz > MID_RESIZE_VALUE) {
++ rsz = rsz_7;
++ if (rsz > MAXIMUM_RESIZE_VALUE) {
++ rsz = MAXIMUM_RESIZE_VALUE;
++ *output_w = (((input_w - 7) * 256) / rsz) + 1;
++ *output_w = (*output_w + 0xf) & 0xfffffff0;
++ printk(KERN_INFO "%s: using output_w %d instead\n",
++ __func__, *output_w);
++ }
++ } else {
++ rsz = rsz_4;
++ if (rsz < MINIMUM_RESIZE_VALUE) {
++ rsz = MINIMUM_RESIZE_VALUE;
++ *output_w = (((input_w - 4) * 256) / rsz) + 1;
++ *output_w = (*output_w + 0xf) & 0xfffffff0;
++ printk(KERN_INFO "%s: using output_w %d instead\n",
++ __func__, *output_w);
++ }
++ }
++
++ /* Recalculate input based on TRM equations */
++ if (rsz > MID_RESIZE_VALUE) {
++ input_w =
++ (((64 * sph) + ((*output_w - 1) * rsz) + 32) / 256) + 7;
++ } else {
++ input_w =
++ (((32 * sph) + ((*output_w - 1) * rsz) + 16) / 256) + 7;
++ }
++
++ ispres_obj.outputwidth = *output_w;
++ ispres_obj.h_resz = rsz;
++ ispres_obj.inputwidth = input_w;
++ ispres_obj.ipwd_crop = DEFAULTSTPIXEL;
++ ispres_obj.h_startphase = sph;
++
++ *input_height = input_h;
++ *input_width = input_w;
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_try_size);
++
++/**
++ * ispresizer_config_size - Configures input and output image size.
++ * @input_w: input width for the resizer in number of pixels per line.
++ * @input_h: input height for the resizer in number of lines.
++ * @output_w: output width from the resizer in number of pixels per line.
++ * @output_h: output height for the resizer in number of lines.
++ *
++ * Configures the appropriate values stored in the isp_res structure in the
++ * resizer registers.
++ *
++ * Returns 0 if successful, or -EINVAL if passed values haven't been verified
++ * with ispresizer_try_size() previously.
++ **/
++int ispresizer_config_size(u32 input_w, u32 input_h, u32 output_w,
++ u32 output_h)
++{
++ int i, j;
++ u32 res;
++ DPRINTK_ISPRESZ("ispresizer_config_size()+, input_w = %d,input_h ="
++ " %d, output_w = %d, output_h"
++ " = %d,hresz = %d,vresz = %d,"
++ " hcrop = %d, vcrop = %d,"
++ " hstph = %d, vstph = %d\n",
++ ispres_obj.inputwidth,
++ ispres_obj.inputheight,
++ ispres_obj.outputwidth,
++ ispres_obj.outputheight,
++ ispres_obj.h_resz,
++ ispres_obj.v_resz,
++ ispres_obj.ipwd_crop,
++ ispres_obj.ipht_crop,
++ ispres_obj.h_startphase,
++ ispres_obj.v_startphase);
++ if ((output_w != ispres_obj.outputwidth)
++ || (output_h != ispres_obj.outputheight)) {
++ printk(KERN_ERR "Output parameters passed do not match the"
++ " values calculated by the"
++ " trysize passed w %d, h %d"
++ " \n", output_w , output_h);
++ return -EINVAL;
++ }
++
++ /* Set Resizer input address and offset adderss */
++ ispresizer_config_inlineoffset(isp_reg_readl(OMAP3_ISP_IOMEM_PREV,
++ ISPPRV_WADD_OFFSET));
++
++ res = isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT) &
++ ~(ISPRSZ_CNT_HSTPH_MASK | ISPRSZ_CNT_VSTPH_MASK);
++ isp_reg_writel(res |
++ (ispres_obj.h_startphase << ISPRSZ_CNT_HSTPH_SHIFT) |
++ (ispres_obj.v_startphase << ISPRSZ_CNT_VSTPH_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_CNT);
++ /* Set start address for cropping */
++ isp_reg_writel(ispres_obj.tmp_buf + 2 *
++ (ispres_obj.ipht_crop * ispres_obj.inputwidth +
++ (ispres_obj.ipwd_crop & ~15)),
++ OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INADD);
++
++ isp_reg_writel(
++ ((ispres_obj.ipwd_crop & 15) << ISPRSZ_IN_START_HORZ_ST_SHIFT) |
++ (0x00 << ISPRSZ_IN_START_VERT_ST_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ, ISPRSZ_IN_START);
++
++ isp_reg_writel((0x00 << ISPRSZ_IN_START_HORZ_ST_SHIFT) |
++ (0x00 << ISPRSZ_IN_START_VERT_ST_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_IN_START);
++
++ isp_reg_writel((ispres_obj.inputwidth << ISPRSZ_IN_SIZE_HORZ_SHIFT) |
++ (ispres_obj.inputheight <<
++ ISPRSZ_IN_SIZE_VERT_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_IN_SIZE);
++ if (!ispres_obj.algo) {
++ isp_reg_writel((output_w << ISPRSZ_OUT_SIZE_HORZ_SHIFT) |
++ (output_h << ISPRSZ_OUT_SIZE_VERT_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_OUT_SIZE);
++ } else {
++ isp_reg_writel(((output_w - 4) << ISPRSZ_OUT_SIZE_HORZ_SHIFT) |
++ (output_h << ISPRSZ_OUT_SIZE_VERT_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_OUT_SIZE);
++ }
++
++ res = isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT) &
++ ~(ISPRSZ_CNT_HRSZ_MASK | ISPRSZ_CNT_VRSZ_MASK);
++ isp_reg_writel(res |
++ ((ispres_obj.h_resz - 1) << ISPRSZ_CNT_HRSZ_SHIFT) |
++ ((ispres_obj.v_resz - 1) << ISPRSZ_CNT_VRSZ_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_CNT);
++ if (ispres_obj.h_resz <= MID_RESIZE_VALUE) {
++ j = 0;
++ for (i = 0; i < 16; i++) {
++ isp_reg_writel(
++ (ispres_obj.coeflist.h_filter_coef_4tap[j]
++ << ISPRSZ_HFILT10_COEF0_SHIFT) |
++ (ispres_obj.coeflist.h_filter_coef_4tap[j + 1]
++ << ISPRSZ_HFILT10_COEF1_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_HFILT10 + (i * 0x04));
++ j += 2;
++ }
++ } else {
++ j = 0;
++ for (i = 0; i < 16; i++) {
++ if ((i + 1) % 4 == 0) {
++ isp_reg_writel((ispres_obj.coeflist.
++ h_filter_coef_7tap[j] <<
++ ISPRSZ_HFILT10_COEF0_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_HFILT10 + (i * 0x04));
++ j += 1;
++ } else {
++ isp_reg_writel((ispres_obj.coeflist.
++ h_filter_coef_7tap[j] <<
++ ISPRSZ_HFILT10_COEF0_SHIFT) |
++ (ispres_obj.coeflist.
++ h_filter_coef_7tap[j+1] <<
++ ISPRSZ_HFILT10_COEF1_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_HFILT10 + (i * 0x04));
++ j += 2;
++ }
++ }
++ }
++ if (ispres_obj.v_resz <= MID_RESIZE_VALUE) {
++ j = 0;
++ for (i = 0; i < 16; i++) {
++ isp_reg_writel((ispres_obj.coeflist.
++ v_filter_coef_4tap[j] <<
++ ISPRSZ_VFILT10_COEF0_SHIFT) |
++ (ispres_obj.coeflist.
++ v_filter_coef_4tap[j + 1] <<
++ ISPRSZ_VFILT10_COEF1_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_VFILT10 + (i * 0x04));
++ j += 2;
++ }
++ } else {
++ j = 0;
++ for (i = 0; i < 16; i++) {
++ if ((i + 1) % 4 == 0) {
++ isp_reg_writel((ispres_obj.coeflist.
++ v_filter_coef_7tap[j] <<
++ ISPRSZ_VFILT10_COEF0_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_VFILT10 + (i * 0x04));
++ j += 1;
++ } else {
++ isp_reg_writel((ispres_obj.coeflist.
++ v_filter_coef_7tap[j] <<
++ ISPRSZ_VFILT10_COEF0_SHIFT) |
++ (ispres_obj.coeflist.
++ v_filter_coef_7tap[j+1] <<
++ ISPRSZ_VFILT10_COEF1_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_VFILT10 + (i * 0x04));
++ j += 2;
++ }
++ }
++ }
++
++ ispresizer_config_outlineoffset(output_w*2);
++ DPRINTK_ISPRESZ("ispresizer_config_size()-\n");
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_config_size);
++
++void __ispresizer_enable(int enable)
++{
++ int val;
++ DPRINTK_ISPRESZ("+ispresizer_enable()+\n");
++ if (enable) {
++ val = (isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_PCR) & 0x2) |
++ ISPRSZ_PCR_ENABLE;
++ } else {
++ val = isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_PCR) &
++ ~ISPRSZ_PCR_ENABLE;
++ }
++ isp_reg_writel(val, OMAP3_ISP_IOMEM_RESZ, ISPRSZ_PCR);
++ DPRINTK_ISPRESZ("+ispresizer_enable()-\n");
++}
++
++/**
++ * ispresizer_enable - Enables the resizer module.
++ * @enable: 1 - Enable, 0 - Disable
++ *
++ * Client should configure all the sub modules in resizer before this.
++ **/
++void ispresizer_enable(int enable)
++{
++ __ispresizer_enable(enable);
++ ispres_obj.pm_state = enable;
++}
++EXPORT_SYMBOL(ispresizer_enable);
++
++/**
++ * ispresizer_suspend - Suspend resizer module.
++ **/
++void ispresizer_suspend(void)
++{
++ if (ispres_obj.pm_state)
++ __ispresizer_enable(0);
++}
++EXPORT_SYMBOL(ispresizer_suspend);
++
++/**
++ * ispresizer_resume - Resume resizer module.
++ **/
++void ispresizer_resume(void)
++{
++ if (ispres_obj.pm_state)
++ __ispresizer_enable(1);
++}
++EXPORT_SYMBOL(ispresizer_resume);
++
++/**
++ * ispresizer_busy - Checks if ISP resizer is busy.
++ *
++ * Returns busy field from ISPRSZ_PCR register.
++ **/
++int ispresizer_busy(void)
++{
++ return isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_PCR) &
++ ISPPRV_PCR_BUSY;
++}
++EXPORT_SYMBOL(ispresizer_busy);
++
++/**
++ * ispresizer_config_startphase - Sets the horizontal and vertical start phase.
++ * @hstartphase: horizontal start phase (0 - 7).
++ * @vstartphase: vertical startphase (0 - 7).
++ *
++ * This API just updates the isp_res struct. Actual register write happens in
++ * ispresizer_config_size.
++ **/
++void ispresizer_config_startphase(u8 hstartphase, u8 vstartphase)
++{
++ DPRINTK_ISPRESZ("ispresizer_config_startphase()+\n");
++ ispres_obj.h_startphase = hstartphase;
++ ispres_obj.v_startphase = vstartphase;
++ DPRINTK_ISPRESZ("ispresizer_config_startphase()-\n");
++}
++EXPORT_SYMBOL(ispresizer_config_startphase);
++
++/**
++ * ispresizer_config_ycpos - Specifies if output should be in YC or CY format.
++ * @yc: 0 - YC format, 1 - CY format
++ **/
++void ispresizer_config_ycpos(u8 yc)
++{
++ DPRINTK_ISPRESZ("ispresizer_config_ycpos()+\n");
++ isp_reg_and_or(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT, ~ISPRSZ_CNT_YCPOS,
++ (yc ? ISPRSZ_CNT_YCPOS : 0));
++ DPRINTK_ISPRESZ("ispresizer_config_ycpos()-\n");
++}
++EXPORT_SYMBOL(ispresizer_config_ycpos);
++
++/**
++ * Sets the chrominance algorithm
++ * @cbilin: 0 - chrominance uses same processing as luminance,
++ * 1 - bilinear interpolation processing
++ **/
++void ispresizer_enable_cbilin(u8 enable)
++{
++ DPRINTK_ISPRESZ("ispresizer_enable_cbilin()+\n");
++ isp_reg_and_or(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT, ~ISPRSZ_CNT_CBILIN,
++ (enable ? ISPRSZ_CNT_CBILIN : 0));
++ DPRINTK_ISPRESZ("ispresizer_enable_cbilin()-\n");
++}
++EXPORT_SYMBOL(ispresizer_enable_cbilin);
++
++/**
++ * ispresizer_config_luma_enhance - Configures luminance enhancer parameters.
++ * @yenh: Pointer to structure containing desired values for core, slope, gain
++ * and algo parameters.
++ **/
++void ispresizer_config_luma_enhance(struct isprsz_yenh *yenh)
++{
++ DPRINTK_ISPRESZ("ispresizer_config_luma_enhance()+\n");
++ ispres_obj.algo = yenh->algo;
++ isp_reg_writel((yenh->algo << ISPRSZ_YENH_ALGO_SHIFT) |
++ (yenh->gain << ISPRSZ_YENH_GAIN_SHIFT) |
++ (yenh->slope << ISPRSZ_YENH_SLOP_SHIFT) |
++ (yenh->coreoffset << ISPRSZ_YENH_CORE_SHIFT),
++ OMAP3_ISP_IOMEM_RESZ,
++ ISPRSZ_YENH);
++ DPRINTK_ISPRESZ("ispresizer_config_luma_enhance()-\n");
++}
++EXPORT_SYMBOL(ispresizer_config_luma_enhance);
++
++/**
++ * ispresizer_config_filter_coef - Sets filter coefficients for 4 & 7-tap mode.
++ * This API just updates the isp_res struct.Actual register write happens in
++ * ispresizer_config_size.
++ * @coef: Structure containing horizontal and vertical filter coefficients for
++ * both 4-tap and 7-tap mode.
++ **/
++void ispresizer_config_filter_coef(struct isprsz_coef *coef)
++{
++ int i;
++ DPRINTK_ISPRESZ("ispresizer_config_filter_coef()+\n");
++ for (i = 0; i < 32; i++) {
++ ispres_obj.coeflist.h_filter_coef_4tap[i] =
++ coef->h_filter_coef_4tap[i];
++ ispres_obj.coeflist.v_filter_coef_4tap[i] =
++ coef->v_filter_coef_4tap[i];
++ }
++ for (i = 0; i < 28; i++) {
++ ispres_obj.coeflist.h_filter_coef_7tap[i] =
++ coef->h_filter_coef_7tap[i];
++ ispres_obj.coeflist.v_filter_coef_7tap[i] =
++ coef->v_filter_coef_7tap[i];
++ }
++ DPRINTK_ISPRESZ("ispresizer_config_filter_coef()-\n");
++}
++EXPORT_SYMBOL(ispresizer_config_filter_coef);
++
++/**
++ * ispresizer_config_inlineoffset - Configures the read address line offset.
++ * @offset: Line Offset for the input image.
++ *
++ * Returns 0 if successful, or -EINVAL if offset is not 32 bits aligned.
++ **/
++int ispresizer_config_inlineoffset(u32 offset)
++{
++ DPRINTK_ISPRESZ("ispresizer_config_inlineoffset()+\n");
++ if (offset % 32)
++ return -EINVAL;
++ isp_reg_writel(offset << ISPRSZ_SDR_INOFF_OFFSET_SHIFT,
++ OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INOFF);
++ DPRINTK_ISPRESZ("ispresizer_config_inlineoffset()-\n");
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_config_inlineoffset);
++
++/**
++ * ispresizer_set_inaddr - Sets the memory address of the input frame.
++ * @addr: 32bit memory address aligned on 32byte boundary.
++ *
++ * Returns 0 if successful, or -EINVAL if address is not 32 bits aligned.
++ **/
++int ispresizer_set_inaddr(u32 addr)
++{
++ DPRINTK_ISPRESZ("ispresizer_set_inaddr()+\n");
++ if (addr % 32)
++ return -EINVAL;
++ isp_reg_writel(addr << ISPRSZ_SDR_INADD_ADDR_SHIFT,
++ OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INADD);
++ ispres_obj.tmp_buf = addr;
++ DPRINTK_ISPRESZ("ispresizer_set_inaddr()-\n");
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_set_inaddr);
++
++/**
++ * ispresizer_config_outlineoffset - Configures the write address line offset.
++ * @offset: Line offset for the preview output.
++ *
++ * Returns 0 if successful, or -EINVAL if address is not 32 bits aligned.
++ **/
++int ispresizer_config_outlineoffset(u32 offset)
++{
++ DPRINTK_ISPRESZ("ispresizer_config_outlineoffset()+\n");
++ if (offset % 32)
++ return -EINVAL;
++ isp_reg_writel(offset << ISPRSZ_SDR_OUTOFF_OFFSET_SHIFT,
++ OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_OUTOFF);
++ DPRINTK_ISPRESZ("ispresizer_config_outlineoffset()-\n");
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_config_outlineoffset);
++
++/**
++ * Configures the memory address to which the output frame is written.
++ * @addr: 32bit memory address aligned on 32byte boundary.
++ **/
++int ispresizer_set_outaddr(u32 addr)
++{
++ DPRINTK_ISPRESZ("ispresizer_set_outaddr()+\n");
++ if (addr % 32)
++ return -EINVAL;
++ isp_reg_writel(addr << ISPRSZ_SDR_OUTADD_ADDR_SHIFT,
++ OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_OUTADD);
++ DPRINTK_ISPRESZ("ispresizer_set_outaddr()-\n");
++ return 0;
++}
++EXPORT_SYMBOL(ispresizer_set_outaddr);
++
++/**
++ * ispresizer_save_context - Saves the values of the resizer module registers.
++ **/
++void ispresizer_save_context(void)
++{
++ DPRINTK_ISPRESZ("Saving context\n");
++ isp_save_context(isprsz_reg_list);
++}
++EXPORT_SYMBOL(ispresizer_save_context);
++
++/**
++ * ispresizer_restore_context - Restores resizer module register values.
++ **/
++void ispresizer_restore_context(void)
++{
++ DPRINTK_ISPRESZ("Restoring context\n");
++ isp_restore_context(isprsz_reg_list);
++}
++EXPORT_SYMBOL(ispresizer_restore_context);
++
++/**
++ * ispresizer_print_status - Prints the values of the resizer module registers.
++ **/
++void ispresizer_print_status()
++{
++ if (!is_ispresz_debug_enabled())
++ return;
++ DPRINTK_ISPRESZ("###ISP_CTRL inresizer =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL));
++ DPRINTK_ISPRESZ("###ISP_IRQ0ENABLE in resizer =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE));
++ DPRINTK_ISPRESZ("###ISP_IRQ0STATUS in resizer =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS));
++ DPRINTK_ISPRESZ("###RSZ PCR =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_PCR));
++ DPRINTK_ISPRESZ("###RSZ CNT =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_CNT));
++ DPRINTK_ISPRESZ("###RSZ OUT SIZE =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_OUT_SIZE));
++ DPRINTK_ISPRESZ("###RSZ IN START =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_IN_START));
++ DPRINTK_ISPRESZ("###RSZ IN SIZE =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_IN_SIZE));
++ DPRINTK_ISPRESZ("###RSZ SDR INADD =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INADD));
++ DPRINTK_ISPRESZ("###RSZ SDR INOFF =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_INOFF));
++ DPRINTK_ISPRESZ("###RSZ SDR OUTADD =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_OUTADD));
++ DPRINTK_ISPRESZ("###RSZ SDR OTOFF =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_SDR_OUTOFF));
++ DPRINTK_ISPRESZ("###RSZ YENH =0x%x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_RESZ, ISPRSZ_YENH));
++}
++EXPORT_SYMBOL(ispresizer_print_status);
++
++/**
++ * isp_resizer_init - Module Initialisation.
++ *
++ * Always returns 0.
++ **/
++int __init isp_resizer_init(void)
++{
++ mutex_init(&ispres_obj.ispres_mutex);
++ ispres_obj.pm_state = 0;
++ return 0;
++}
++
++/**
++ * isp_resizer_cleanup - Module Cleanup.
++ **/
++void isp_resizer_cleanup(void)
++{
++}
+diff --git a/drivers/media/video/isp/ispresizer.h b/drivers/media/video/isp/ispresizer.h
+new file mode 100644
+index 0000000..4e92225
+--- /dev/null
++++ b/drivers/media/video/isp/ispresizer.h
+@@ -0,0 +1,158 @@
++/*
++ * ispresizer.h
++ *
++ * Driver header file for Resizer module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sameer Venkatraman <sameerv@ti.com>
++ * Mohit Jalori
++ * Sergio Aguirre <saaguirre@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_RESIZER_H
++#define OMAP_ISP_RESIZER_H
++
++/*
++ * Resizer Constants
++ */
++#define MAX_IN_WIDTH_MEMORY_MODE 4095
++
++#define MAX_IN_WIDTH_ONTHEFLY_MODE 1280
++#define MAX_IN_WIDTH_ONTHEFLY_MODE_ES2 4095
++#define MAX_IN_HEIGHT 4095
++#define MINIMUM_RESIZE_VALUE 64
++#define MAXIMUM_RESIZE_VALUE 1024
++#define MID_RESIZE_VALUE 512
++
++#define MAX_7TAP_HRSZ_OUTWIDTH 1280
++#define MAX_7TAP_VRSZ_OUTWIDTH 640
++
++#define MAX_7TAP_HRSZ_OUTWIDTH_ES2 3300
++#define MAX_7TAP_VRSZ_OUTWIDTH_ES2 1650
++
++#define DEFAULTSTPIXEL 0
++#define DEFAULTSTPHASE 1
++#define DEFAULTHSTPIXEL4TAPMODE 3
++#define FOURPHASE 4
++#define EIGHTPHASE 8
++#define RESIZECONSTANT 256
++#define SHIFTER4TAPMODE 0
++#define SHIFTER7TAPMODE 1
++#define DEFAULTOFFSET 7
++#define OFFSETVERT4TAPMODE 4
++#define OPWDALIGNCONSTANT 0xfffffff0
++
++/*
++ * The client is supposed to call resizer API in the following sequence:
++ * - request()
++ * - config_datatpath()
++ * - optionally config/enable sub modules
++ * - try/config size
++ * - setup callback
++ * - setup in/out memory offsets and ptrs
++ * - enable()
++ * ...
++ * - disable()
++ * - free()
++ */
++
++enum ispresizer_input {
++ RSZ_OTFLY_YUV,
++ RSZ_MEM_YUV,
++ RSZ_MEM_COL8
++};
++
++/**
++ * struct isprsz_coef - Structure for resizer filter coeffcients.
++ * @h_filter_coef_4tap: Horizontal filter coefficients for 8-phase/4-tap
++ * mode (.5x-4x)
++ * @v_filter_coef_4tap: Vertical filter coefficients for 8-phase/4-tap
++ * mode (.5x-4x)
++ * @h_filter_coef_7tap: Horizontal filter coefficients for 4-phase/7-tap
++ * mode (.25x-.5x)
++ * @v_filter_coef_7tap: Vertical filter coefficients for 4-phase/7-tap
++ * mode (.25x-.5x)
++ */
++struct isprsz_coef {
++ u16 h_filter_coef_4tap[32];
++ u16 v_filter_coef_4tap[32];
++ u16 h_filter_coef_7tap[28];
++ u16 v_filter_coef_7tap[28];
++};
++
++/**
++ * struct isprsz_yenh - Structure for resizer luminance enhancer parameters.
++ * @algo: Algorithm select.
++ * @gain: Maximum gain.
++ * @slope: Slope.
++ * @coreoffset: Coring offset.
++ */
++struct isprsz_yenh {
++ u8 algo;
++ u8 gain;
++ u8 slope;
++ u8 coreoffset;
++};
++
++void ispresizer_config_shadow_registers(void);
++
++int ispresizer_request(void);
++
++int ispresizer_free(void);
++
++int ispresizer_config_datapath(enum ispresizer_input input);
++
++void ispresizer_enable_cbilin(u8 enable);
++
++void ispresizer_config_ycpos(u8 yc);
++
++void ispresizer_config_startphase(u8 hstartphase, u8 vstartphase);
++
++void ispresizer_config_filter_coef(struct isprsz_coef *coef);
++
++void ispresizer_config_luma_enhance(struct isprsz_yenh *yenh);
++
++int ispresizer_try_size(u32 *input_w, u32 *input_h, u32 *output_w,
++ u32 *output_h);
++
++void ispresizer_applycrop(void);
++
++void ispresizer_trycrop(u32 left, u32 top, u32 width, u32 height, u32 ow,
++ u32 oh);
++
++int ispresizer_config_size(u32 input_w, u32 input_h, u32 output_w,
++ u32 output_h);
++
++int ispresizer_config_inlineoffset(u32 offset);
++
++int ispresizer_set_inaddr(u32 addr);
++
++int ispresizer_config_outlineoffset(u32 offset);
++
++int ispresizer_set_outaddr(u32 addr);
++
++void ispresizer_enable(int enable);
++
++void ispresizer_suspend(void);
++
++void ispresizer_resume(void);
++
++int ispresizer_busy(void);
++
++void ispresizer_save_context(void);
++
++void ispresizer_restore_context(void);
++
++void ispresizer_print_status(void);
++
++#endif /* OMAP_ISP_RESIZER_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0006-omap3isp-Add-statistics-collection-modules-H3A-and.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0006-omap3isp-Add-statistics-collection-modules-H3A-and.patch
new file mode 100644
index 0000000000..876ce780f0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0006-omap3isp-Add-statistics-collection-modules-H3A-and.patch
@@ -0,0 +1,2741 @@
+From 9a39eab5ed1b70711c3b10de95cd90749293ef7a Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add statistics collection modules (H3A and HIST)
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/isp/isp_af.c | 784 +++++++++++++++++++++++++++++++
+ drivers/media/video/isp/isp_af.h | 125 +++++
+ drivers/media/video/isp/isph3a.c | 932 +++++++++++++++++++++++++++++++++++++
+ drivers/media/video/isp/isph3a.h | 127 +++++
+ drivers/media/video/isp/isphist.c | 608 ++++++++++++++++++++++++
+ drivers/media/video/isp/isphist.h | 105 +++++
+ 6 files changed, 2681 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/isp_af.c
+ create mode 100644 drivers/media/video/isp/isp_af.h
+ create mode 100644 drivers/media/video/isp/isph3a.c
+ create mode 100644 drivers/media/video/isp/isph3a.h
+ create mode 100644 drivers/media/video/isp/isphist.c
+ create mode 100644 drivers/media/video/isp/isphist.h
+
+diff --git a/drivers/media/video/isp/isp_af.c b/drivers/media/video/isp/isp_af.c
+new file mode 100644
+index 0000000..a607b97
+--- /dev/null
++++ b/drivers/media/video/isp/isp_af.c
+@@ -0,0 +1,784 @@
++/*
++ * isp_af.c
++ *
++ * AF module for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++/* Linux specific include files */
++#include <asm/cacheflush.h>
++
++#include <linux/uaccess.h>
++#include <linux/dma-mapping.h>
++#include <asm/atomic.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "isph3a.h"
++#include "isp_af.h"
++#include "ispmmu.h"
++
++/**
++ * struct isp_af_buffer - AF frame stats buffer.
++ * @virt_addr: Virtual address to mmap the buffer.
++ * @phy_addr: Physical address of the buffer.
++ * @addr_align: Virtual Address 32 bytes aligned.
++ * @ispmmu_addr: Address of the buffer mapped by the ISPMMU.
++ * @mmap_addr: Mapped memory area of buffer. For userspace access.
++ * @locked: 1 - Buffer locked from write. 0 - Buffer can be overwritten.
++ * @frame_num: Frame number from which the statistics are taken.
++ * @lens_position: Lens position currently set in the DW9710 Coil motor driver.
++ * @next: Pointer to link next buffer.
++ */
++struct isp_af_buffer {
++ unsigned long virt_addr;
++ unsigned long phy_addr;
++ unsigned long addr_align;
++ unsigned long ispmmu_addr;
++ unsigned long mmap_addr;
++
++ u8 locked;
++ u16 frame_num;
++ u32 config_counter;
++ struct isp_af_xtrastats xtrastats;
++ struct isp_af_buffer *next;
++};
++
++/**
++ * struct isp_af_status - AF status.
++ * @initialized: 1 - Buffers initialized.
++ * @update: 1 - Update registers.
++ * @stats_req: 1 - Future stats requested.
++ * @stats_done: 1 - Stats ready for user.
++ * @frame_req: Number of frame requested for statistics.
++ * @af_buff: Array of statistics buffers to access.
++ * @stats_buf_size: Statistics buffer size.
++ * @curr_cfg_buf_size: Current user configured stats buff size.
++ * @min_buf_size: Minimum statisitics buffer size.
++ * @frame_count: Frame Count.
++ * @stats_wait: Wait primitive for locking/unlocking the stats request.
++ * @buffer_lock: Spinlock for statistics buffers access.
++ */
++static struct isp_af_status {
++ u8 initialized;
++ u8 update;
++ u8 stats_req;
++ u8 stats_done;
++ u16 frame_req;
++
++ struct isp_af_buffer af_buff[H3A_MAX_BUFF];
++ unsigned int stats_buf_size;
++ unsigned int min_buf_size;
++ unsigned int curr_cfg_buf_size;
++
++ int pm_state;
++ u32 frame_count;
++ wait_queue_head_t stats_wait;
++ atomic_t config_counter;
++ spinlock_t buffer_lock; /* For stats buffers read/write sync */
++} afstat;
++
++struct af_device *af_dev_configptr;
++static struct isp_af_buffer *active_buff;
++static int af_major = -1;
++static int camnotify;
++
++/**
++ * isp_af_setxtrastats - Receives extra statistics from prior frames.
++ * @xtrastats: Pointer to structure containing extra statistics fields like
++ * field count and timestamp of frame.
++ *
++ * Called from update_vbq in camera driver
++ **/
++void isp_af_setxtrastats(struct isp_af_xtrastats *xtrastats, u8 updateflag)
++{
++ int i, past_i;
++
++ if (active_buff == NULL)
++ return;
++
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ if (afstat.af_buff[i].frame_num == active_buff->frame_num)
++ break;
++ }
++
++ if (i == H3A_MAX_BUFF)
++ return;
++
++ if (i == 0) {
++ if (afstat.af_buff[H3A_MAX_BUFF - 1].locked == 0)
++ past_i = H3A_MAX_BUFF - 1;
++ else
++ past_i = H3A_MAX_BUFF - 2;
++ } else if (i == 1) {
++ if (afstat.af_buff[0].locked == 0)
++ past_i = 0;
++ else
++ past_i = H3A_MAX_BUFF - 1;
++ } else {
++ if (afstat.af_buff[i - 1].locked == 0)
++ past_i = i - 1;
++ else
++ past_i = i - 2;
++ }
++
++ if (updateflag & AF_UPDATEXS_TS)
++ afstat.af_buff[past_i].xtrastats.ts = xtrastats->ts;
++
++ if (updateflag & AF_UPDATEXS_FIELDCOUNT)
++ afstat.af_buff[past_i].xtrastats.field_count =
++ xtrastats->field_count;
++}
++EXPORT_SYMBOL(isp_af_setxtrastats);
++
++/*
++ * Helper function to update buffer cache pages
++ */
++static void isp_af_update_req_buffer(struct isp_af_buffer *buffer)
++{
++ int size = afstat.stats_buf_size;
++
++ size = PAGE_ALIGN(size);
++ /* Update the kernel pages of the requested buffer */
++ dmac_inv_range((void *)buffer->addr_align, (void *)buffer->addr_align +
++ size);
++}
++
++#define IS_OUT_OF_BOUNDS(value, min, max) \
++ (((value) < (min)) || ((value) > (max)))
++
++/* Function to check paxel parameters */
++int isp_af_check_paxel(void)
++{
++ struct af_paxel *paxel_cfg = &af_dev_configptr->config->paxel_config;
++ struct af_iir *iir_cfg = &af_dev_configptr->config->iir_config;
++
++ /* Check horizontal Count */
++ if (IS_OUT_OF_BOUNDS(paxel_cfg->hz_cnt, AF_PAXEL_HORIZONTAL_COUNT_MIN,
++ AF_PAXEL_HORIZONTAL_COUNT_MAX)) {
++ DPRINTK_ISP_AF("Error : Horizontal Count is incorrect");
++ return -AF_ERR_HZ_COUNT;
++ }
++
++ /*Check Vertical Count */
++ if (IS_OUT_OF_BOUNDS(paxel_cfg->vt_cnt, AF_PAXEL_VERTICAL_COUNT_MIN,
++ AF_PAXEL_VERTICAL_COUNT_MAX)) {
++ DPRINTK_ISP_AF("Error : Vertical Count is incorrect");
++ return -AF_ERR_VT_COUNT;
++ }
++
++ /*Check Height */
++ if (IS_OUT_OF_BOUNDS(paxel_cfg->height, AF_PAXEL_HEIGHT_MIN,
++ AF_PAXEL_HEIGHT_MAX)) {
++ DPRINTK_ISP_AF("Error : Height is incorrect");
++ return -AF_ERR_HEIGHT;
++ }
++
++ /*Check width */
++ if (IS_OUT_OF_BOUNDS(paxel_cfg->width, AF_PAXEL_WIDTH_MIN,
++ AF_PAXEL_WIDTH_MAX)) {
++ DPRINTK_ISP_AF("Error : Width is incorrect");
++ return -AF_ERR_WIDTH;
++ }
++
++ /*Check Line Increment */
++ if (IS_OUT_OF_BOUNDS(paxel_cfg->line_incr, AF_PAXEL_INCREMENT_MIN,
++ AF_PAXEL_INCREMENT_MAX)) {
++ DPRINTK_ISP_AF("Error : Line Increment is incorrect");
++ return -AF_ERR_INCR;
++ }
++
++ /*Check Horizontal Start */
++ if ((paxel_cfg->hz_start % 2 != 0) ||
++ (paxel_cfg->hz_start < (iir_cfg->hz_start_pos + 2)) ||
++ IS_OUT_OF_BOUNDS(paxel_cfg->hz_start,
++ AF_PAXEL_HZSTART_MIN, AF_PAXEL_HZSTART_MAX)) {
++ DPRINTK_ISP_AF("Error : Horizontal Start is incorrect");
++ return -AF_ERR_HZ_START;
++ }
++
++ /*Check Vertical Start */
++ if (IS_OUT_OF_BOUNDS(paxel_cfg->vt_start, AF_PAXEL_VTSTART_MIN,
++ AF_PAXEL_VTSTART_MAX)) {
++ DPRINTK_ISP_AF("Error : Vertical Start is incorrect");
++ return -AF_ERR_VT_START;
++ }
++ return 0;
++}
++
++/**
++ * isp_af_check_iir - Function to check IIR Coefficient.
++ **/
++int isp_af_check_iir(void)
++{
++ struct af_iir *iir_cfg = &af_dev_configptr->config->iir_config;
++ int index;
++
++ for (index = 0; index < AF_NUMBER_OF_COEF; index++) {
++ if ((iir_cfg->coeff_set0[index]) > AF_COEF_MAX) {
++ DPRINTK_ISP_AF("Error : Coefficient for set 0 is "
++ "incorrect");
++ return -AF_ERR_IIR_COEF;
++ }
++
++ if ((iir_cfg->coeff_set1[index]) > AF_COEF_MAX) {
++ DPRINTK_ISP_AF("Error : Coefficient for set 1 is "
++ "incorrect");
++ return -AF_ERR_IIR_COEF;
++ }
++ }
++
++ if (IS_OUT_OF_BOUNDS(iir_cfg->hz_start_pos, AF_IIRSH_MIN,
++ AF_IIRSH_MAX)) {
++ DPRINTK_ISP_AF("Error : IIRSH is incorrect");
++ return -AF_ERR_IIRSH;
++ }
++
++ return 0;
++}
++/**
++ * isp_af_unlock_buffers - Helper function to unlock all buffers.
++ **/
++static void isp_af_unlock_buffers(void)
++{
++ int i;
++ unsigned long irqflags;
++
++ spin_lock_irqsave(&afstat.buffer_lock, irqflags);
++ for (i = 0; i < H3A_MAX_BUFF; i++)
++ afstat.af_buff[i].locked = 0;
++
++ spin_unlock_irqrestore(&afstat.buffer_lock, irqflags);
++}
++
++/*
++ * Helper function to link allocated buffers
++ */
++static void isp_af_link_buffers(void)
++{
++ int i;
++
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ if ((i + 1) < H3A_MAX_BUFF)
++ afstat.af_buff[i].next = &afstat.af_buff[i + 1];
++ else
++ afstat.af_buff[i].next = &afstat.af_buff[0];
++ }
++}
++
++/* Function to perform hardware set up */
++int isp_af_configure(struct af_configuration *afconfig)
++{
++ int result;
++ int buff_size, i;
++ unsigned int busyaf;
++ struct af_configuration *af_curr_cfg = af_dev_configptr->config;
++
++ if (NULL == afconfig) {
++ printk(KERN_ERR "Null argument in configuration. \n");
++ return -EINVAL;
++ }
++
++ memcpy(af_curr_cfg, afconfig, sizeof(struct af_configuration));
++ /* Get the value of PCR register */
++ busyaf = isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR);
++
++ if ((busyaf & AF_BUSYAF) == AF_BUSYAF) {
++ DPRINTK_ISP_AF("AF_register_setup_ERROR : Engine Busy");
++ DPRINTK_ISP_AF("\n Configuration cannot be done ");
++ return -AF_ERR_ENGINE_BUSY;
++ }
++
++ /* Check IIR Coefficient and start Values */
++ result = isp_af_check_iir();
++ if (result < 0)
++ return result;
++
++ /* Check Paxel Values */
++ result = isp_af_check_paxel();
++ if (result < 0)
++ return result;
++
++ /* Check HMF Threshold Values */
++ if (af_curr_cfg->hmf_config.threshold > AF_THRESHOLD_MAX) {
++ DPRINTK_ISP_AF("Error : HMF Threshold is incorrect");
++ return -AF_ERR_THRESHOLD;
++ }
++
++ /* Compute buffer size */
++ buff_size = (af_curr_cfg->paxel_config.hz_cnt + 1) *
++ (af_curr_cfg->paxel_config.vt_cnt + 1) * AF_PAXEL_SIZE;
++
++ afstat.curr_cfg_buf_size = buff_size;
++ /* Deallocate the previous buffers */
++ if (afstat.stats_buf_size && buff_size > afstat.stats_buf_size) {
++ isp_af_enable(0);
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ ispmmu_kunmap(afstat.af_buff[i].ispmmu_addr);
++ dma_free_coherent(
++ NULL, afstat.min_buf_size,
++ (void *)afstat.af_buff[i].virt_addr,
++ (dma_addr_t)afstat.af_buff[i].phy_addr);
++ afstat.af_buff[i].virt_addr = 0;
++ }
++ afstat.stats_buf_size = 0;
++ }
++
++ if (!afstat.af_buff[0].virt_addr) {
++ afstat.stats_buf_size = buff_size;
++ afstat.min_buf_size = PAGE_ALIGN(afstat.stats_buf_size);
++
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ afstat.af_buff[i].virt_addr =
++ (unsigned long)dma_alloc_coherent(
++ NULL,
++ afstat.min_buf_size,
++ (dma_addr_t *)
++ &afstat.af_buff[i].phy_addr,
++ GFP_KERNEL | GFP_DMA);
++ if (afstat.af_buff[i].virt_addr == 0) {
++ printk(KERN_ERR "Can't acquire memory for "
++ "buffer[%d]\n", i);
++ return -ENOMEM;
++ }
++ afstat.af_buff[i].addr_align =
++ afstat.af_buff[i].virt_addr;
++ while ((afstat.af_buff[i].addr_align & 0xFFFFFFC0) !=
++ afstat.af_buff[i].addr_align)
++ afstat.af_buff[i].addr_align++;
++ afstat.af_buff[i].ispmmu_addr =
++ ispmmu_kmap(afstat.af_buff[i].phy_addr,
++ afstat.min_buf_size);
++ }
++ isp_af_unlock_buffers();
++ isp_af_link_buffers();
++
++ /* First active buffer */
++ if (active_buff == NULL)
++ active_buff = &afstat.af_buff[0];
++ isp_af_set_address(active_buff->ispmmu_addr);
++ }
++
++ result = isp_af_register_setup(af_dev_configptr);
++ if (result < 0)
++ return result;
++ af_dev_configptr->size_paxel = buff_size;
++ atomic_inc(&afstat.config_counter);
++ afstat.initialized = 1;
++ afstat.frame_count = 1;
++ active_buff->frame_num = 1;
++ /* Set configuration flag to indicate HW setup done */
++ if (af_curr_cfg->af_config)
++ isp_af_enable(1);
++ else
++ isp_af_enable(0);
++
++ /* Success */
++ return 0;
++}
++EXPORT_SYMBOL(isp_af_configure);
++
++int isp_af_register_setup(struct af_device *af_dev)
++{
++ unsigned int pcr = 0, pax1 = 0, pax2 = 0, paxstart = 0;
++ unsigned int coef = 0;
++ unsigned int base_coef_set0 = 0;
++ unsigned int base_coef_set1 = 0;
++ int index;
++
++ /* Configure Hardware Registers */
++ /* Read PCR Register */
++ pcr = isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR);
++
++ /* Set Accumulator Mode */
++ if (af_dev->config->mode == ACCUMULATOR_PEAK)
++ pcr |= FVMODE;
++ else
++ pcr &= ~FVMODE;
++
++ /* Set A-law */
++ if (af_dev->config->alaw_enable == H3A_AF_ALAW_ENABLE)
++ pcr |= AF_ALAW_EN;
++ else
++ pcr &= ~AF_ALAW_EN;
++
++ /* Set RGB Position */
++ pcr &= ~RGBPOS;
++ pcr |= af_dev->config->rgb_pos << AF_RGBPOS_SHIFT;
++
++ /* HMF Configurations */
++ if (af_dev->config->hmf_config.enable == H3A_AF_HMF_ENABLE) {
++ pcr &= ~AF_MED_EN;
++ /* Enable HMF */
++ pcr |= AF_MED_EN;
++
++ /* Set Median Threshold */
++ pcr &= ~MED_TH;
++ pcr |= af_dev->config->hmf_config.threshold << AF_MED_TH_SHIFT;
++ } else
++ pcr &= ~AF_MED_EN;
++
++ /* Set PCR Register */
++ isp_reg_writel(pcr, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR);
++
++ pax1 &= ~PAXW;
++ pax1 |= af_dev->config->paxel_config.width << AF_PAXW_SHIFT;
++
++ /* Set height in AFPAX1 */
++ pax1 &= ~PAXH;
++ pax1 |= af_dev->config->paxel_config.height;
++
++ isp_reg_writel(pax1, OMAP3_ISP_IOMEM_H3A, ISPH3A_AFPAX1);
++
++ /* Configure AFPAX2 Register */
++ /* Set Line Increment in AFPAX2 Register */
++ pax2 &= ~AFINCV;
++ pax2 |= af_dev->config->paxel_config.line_incr << AF_LINE_INCR_SHIFT;
++ /* Set Vertical Count */
++ pax2 &= ~PAXVC;
++ pax2 |= af_dev->config->paxel_config.vt_cnt << AF_VT_COUNT_SHIFT;
++ /* Set Horizontal Count */
++ pax2 &= ~PAXHC;
++ pax2 |= af_dev->config->paxel_config.hz_cnt;
++ isp_reg_writel(pax2, OMAP3_ISP_IOMEM_H3A, ISPH3A_AFPAX2);
++
++ /* Configure PAXSTART Register */
++ /*Configure Horizontal Start */
++ paxstart &= ~PAXSH;
++ paxstart |= af_dev->config->paxel_config.hz_start << AF_HZ_START_SHIFT;
++ /* Configure Vertical Start */
++ paxstart &= ~PAXSV;
++ paxstart |= af_dev->config->paxel_config.vt_start;
++ isp_reg_writel(paxstart, OMAP3_ISP_IOMEM_H3A, ISPH3A_AFPAXSTART);
++
++ /*SetIIRSH Register */
++ isp_reg_writel(af_dev->config->iir_config.hz_start_pos,
++ OMAP3_ISP_IOMEM_H3A, ISPH3A_AFIIRSH);
++
++ /*Set IIR Filter0 Coefficients */
++ base_coef_set0 = ISPH3A_AFCOEF010;
++ for (index = 0; index <= 8; index += 2) {
++ coef &= ~COEF_MASK0;
++ coef |= af_dev->config->iir_config.coeff_set0[index];
++ coef &= ~COEF_MASK1;
++ coef |= af_dev->config->iir_config.coeff_set0[index + 1] <<
++ AF_COEF_SHIFT;
++ isp_reg_writel(coef, OMAP3_ISP_IOMEM_H3A, base_coef_set0);
++ base_coef_set0 = base_coef_set0 + AFCOEF_OFFSET;
++ }
++
++ /* set AFCOEF0010 Register */
++ isp_reg_writel(af_dev->config->iir_config.coeff_set0[10],
++ OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF010);
++
++ /*Set IIR Filter1 Coefficients */
++
++ base_coef_set1 = ISPH3A_AFCOEF110;
++ for (index = 0; index <= 8; index += 2) {
++ coef &= ~COEF_MASK0;
++ coef |= af_dev->config->iir_config.coeff_set1[index];
++ coef &= ~COEF_MASK1;
++ coef |= af_dev->config->iir_config.coeff_set1[index + 1] <<
++ AF_COEF_SHIFT;
++ isp_reg_writel(coef, OMAP3_ISP_IOMEM_H3A, base_coef_set1);
++
++ base_coef_set1 = base_coef_set1 + AFCOEF_OFFSET;
++ }
++ isp_reg_writel(af_dev->config->iir_config.coeff_set1[10],
++ OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF1010);
++
++ return 0;
++}
++
++/* Function to set address */
++void isp_af_set_address(unsigned long address)
++{
++ isp_reg_writel(address, OMAP3_ISP_IOMEM_H3A, ISPH3A_AFBUFST);
++}
++
++static int isp_af_stats_available(struct isp_af_data *afdata)
++{
++ int i, ret;
++ unsigned long irqflags;
++
++ spin_lock_irqsave(&afstat.buffer_lock, irqflags);
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ DPRINTK_ISP_AF("Checking Stats buff[%d] (%d) for %d\n",
++ i, afstat.af_buff[i].frame_num,
++ afdata->frame_number);
++ if (afdata->frame_number == afstat.af_buff[i].frame_num
++ && afstat.af_buff[i].frame_num != active_buff->frame_num) {
++ afstat.af_buff[i].locked = 1;
++ spin_unlock_irqrestore(&afstat.buffer_lock, irqflags);
++ isp_af_update_req_buffer(&afstat.af_buff[i]);
++ afstat.af_buff[i].frame_num = 0;
++ ret = copy_to_user((void *)afdata->af_statistics_buf,
++ (void *)afstat.af_buff[i].virt_addr,
++ afstat.curr_cfg_buf_size);
++ if (ret) {
++ printk(KERN_ERR "Failed copy_to_user for "
++ "H3A stats buff, %d\n", ret);
++ }
++ afdata->xtrastats.ts = afstat.af_buff[i].xtrastats.ts;
++ afdata->xtrastats.field_count =
++ afstat.af_buff[i].xtrastats.field_count;
++ return 0;
++ }
++ }
++ spin_unlock_irqrestore(&afstat.buffer_lock, irqflags);
++ /* Stats unavailable */
++
++ return -1;
++}
++
++void isp_af_notify(int notify)
++{
++ camnotify = notify;
++ if (camnotify && afstat.initialized) {
++ printk(KERN_DEBUG "Warning Camera Off \n");
++ afstat.stats_req = 0;
++ afstat.stats_done = 1;
++ wake_up_interruptible(&afstat.stats_wait);
++ }
++}
++EXPORT_SYMBOL(isp_af_notify);
++/*
++ * This API allows the user to update White Balance gains, as well as
++ * exposure time and analog gain. It is also used to request frame
++ * statistics.
++ */
++int isp_af_request_statistics(struct isp_af_data *afdata)
++{
++ int ret = 0;
++ u16 frame_diff = 0;
++ u16 frame_cnt = afstat.frame_count;
++ wait_queue_t wqt;
++
++ if (!af_dev_configptr->config->af_config) {
++ printk(KERN_ERR "AF engine not enabled\n");
++ return -EINVAL;
++ }
++
++ if (!(afdata->update & REQUEST_STATISTICS)) {
++ afdata->af_statistics_buf = NULL;
++ goto out;
++ }
++
++ isp_af_unlock_buffers();
++ /* Stats available? */
++ DPRINTK_ISP_AF("Stats available?\n");
++ ret = isp_af_stats_available(afdata);
++ if (!ret)
++ goto out;
++
++ /* Stats in near future? */
++ DPRINTK_ISP_AF("Stats in near future?\n");
++ if (afdata->frame_number > frame_cnt)
++ frame_diff = afdata->frame_number - frame_cnt;
++ else if (afdata->frame_number < frame_cnt) {
++ if (frame_cnt > MAX_FRAME_COUNT - MAX_FUTURE_FRAMES
++ && afdata->frame_number < MAX_FRAME_COUNT) {
++ frame_diff = afdata->frame_number + MAX_FRAME_COUNT -
++ frame_cnt;
++ } else {
++ /* Frame unavailable */
++ frame_diff = MAX_FUTURE_FRAMES + 1;
++ }
++ }
++
++ if (frame_diff > MAX_FUTURE_FRAMES) {
++ printk(KERN_ERR "Invalid frame requested, returning current"
++ " frame stats\n");
++ afdata->frame_number = frame_cnt;
++ }
++ if (!camnotify) {
++ /* Block until frame in near future completes */
++ afstat.frame_req = afdata->frame_number;
++ afstat.stats_req = 1;
++ afstat.stats_done = 0;
++ init_waitqueue_entry(&wqt, current);
++ ret = wait_event_interruptible(afstat.stats_wait,
++ afstat.stats_done == 1);
++ if (ret < 0) {
++ afdata->af_statistics_buf = NULL;
++ return ret;
++ }
++ DPRINTK_ISP_AF("ISP AF request status interrupt raised\n");
++
++ /* Stats now available */
++ ret = isp_af_stats_available(afdata);
++ if (ret) {
++ printk(KERN_ERR "After waiting for stats, stats not"
++ " available!!\n");
++ afdata->af_statistics_buf = NULL;
++ }
++ }
++
++out:
++ afdata->curr_frame = afstat.frame_count;
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_af_request_statistics);
++
++/* This function will handle the H3A interrupt. */
++static void isp_af_isr(unsigned long status, isp_vbq_callback_ptr arg1,
++ void *arg2)
++{
++ u16 frame_align;
++
++ if ((H3A_AF_DONE & status) != H3A_AF_DONE)
++ return;
++
++ /* timestamp stats buffer */
++ do_gettimeofday(&active_buff->xtrastats.ts);
++ active_buff->config_counter = atomic_read(&afstat.config_counter);
++
++ /* Exchange buffers */
++ active_buff = active_buff->next;
++ if (active_buff->locked == 1)
++ active_buff = active_buff->next;
++ isp_af_set_address(active_buff->ispmmu_addr);
++
++ /* Update frame counter */
++ afstat.frame_count++;
++ frame_align = afstat.frame_count;
++ if (afstat.frame_count > MAX_FRAME_COUNT) {
++ afstat.frame_count = 1;
++ frame_align++;
++ }
++ active_buff->frame_num = afstat.frame_count;
++
++ /* Future Stats requested? */
++ if (afstat.stats_req) {
++ /* Is the frame we want already done? */
++ if (frame_align >= afstat.frame_req + 1) {
++ afstat.stats_req = 0;
++ afstat.stats_done = 1;
++ wake_up_interruptible(&afstat.stats_wait);
++ }
++ }
++}
++
++int __isp_af_enable(int enable)
++{
++ unsigned int pcr;
++
++ pcr = isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR);
++
++ /* Set AF_EN bit in PCR Register */
++ if (enable) {
++ if (isp_set_callback(CBK_H3A_AF_DONE, isp_af_isr,
++ (void *)NULL, (void *)NULL)) {
++ printk(KERN_ERR "No callback for AF\n");
++ return -EINVAL;
++ }
++
++ pcr |= AF_EN;
++ } else {
++ isp_unset_callback(CBK_H3A_AF_DONE);
++ pcr &= ~AF_EN;
++ }
++ isp_reg_writel(pcr, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR);
++ return 0;
++}
++
++/* Function to Enable/Disable AF Engine */
++int isp_af_enable(int enable)
++{
++ int rval;
++
++ rval = __isp_af_enable(enable);
++
++ if (!rval)
++ afstat.pm_state = enable;
++
++ return rval;
++}
++
++/* Function to Suspend AF Engine */
++void isp_af_suspend(void)
++{
++ if (afstat.pm_state)
++ __isp_af_enable(0);
++}
++
++/* Function to Resume AF Engine */
++void isp_af_resume(void)
++{
++ if (afstat.pm_state)
++ __isp_af_enable(1);
++}
++
++int isp_af_busy(void)
++{
++ return isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR)
++ & ISPH3A_PCR_BUSYAF;
++}
++
++/* Function to register the AF character device driver. */
++int __init isp_af_init(void)
++{
++ /*allocate memory for device structure and initialize it with 0 */
++ af_dev_configptr = kzalloc(sizeof(struct af_device), GFP_KERNEL);
++ if (!af_dev_configptr)
++ goto err_nomem1;
++
++ active_buff = NULL;
++
++ af_dev_configptr->config = (struct af_configuration *)
++ kzalloc(sizeof(struct af_configuration), GFP_KERNEL);
++
++ if (af_dev_configptr->config == NULL)
++ goto err_nomem2;
++
++ memset(&afstat, 0, sizeof(afstat));
++
++ init_waitqueue_head(&afstat.stats_wait);
++ spin_lock_init(&afstat.buffer_lock);
++
++ return 0;
++
++err_nomem2:
++ kfree(af_dev_configptr);
++err_nomem1:
++ printk(KERN_ERR "Error: kmalloc fail");
++ return -ENOMEM;
++}
++
++void isp_af_exit(void)
++{
++ int i;
++
++ /* Free buffers */
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ if (!afstat.af_buff[i].phy_addr)
++ continue;
++
++ ispmmu_kunmap(afstat.af_buff[i].ispmmu_addr);
++
++ dma_free_coherent(NULL,
++ afstat.min_buf_size,
++ (void *)afstat.af_buff[i].virt_addr,
++ (dma_addr_t)afstat.af_buff[i].phy_addr);
++ }
++ kfree(af_dev_configptr->config);
++ kfree(af_dev_configptr);
++
++ memset(&afstat, 0, sizeof(afstat));
++
++ af_major = -1;
++}
+diff --git a/drivers/media/video/isp/isp_af.h b/drivers/media/video/isp/isp_af.h
+new file mode 100644
+index 0000000..ee2b89f
+--- /dev/null
++++ b/drivers/media/video/isp/isp_af.h
+@@ -0,0 +1,125 @@
++/*
++ * isp_af.h
++ *
++ * Include file for AF module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++/* Device Constants */
++#ifndef OMAP_ISP_AF_H
++#define OMAP_ISP_AF_H
++
++#include <mach/isp_user.h>
++
++#define AF_MAJOR_NUMBER 0
++#define ISPAF_NAME "OMAPISP_AF"
++#define AF_NR_DEVS 1
++#define AF_TIMEOUT ((300 * HZ) / 1000)
++
++
++
++/* Print Macros */
++/*list of error code */
++#define AF_ERR_HZ_COUNT 800 /* Invalid Horizontal Count */
++#define AF_ERR_VT_COUNT 801 /* Invalid Vertical Count */
++#define AF_ERR_HEIGHT 802 /* Invalid Height */
++#define AF_ERR_WIDTH 803 /* Invalid width */
++#define AF_ERR_INCR 804 /* Invalid Increment */
++#define AF_ERR_HZ_START 805 /* Invalid horizontal Start */
++#define AF_ERR_VT_START 806 /* Invalud vertical Start */
++#define AF_ERR_IIRSH 807 /* Invalid IIRSH value */
++#define AF_ERR_IIR_COEF 808 /* Invalid Coefficient */
++#define AF_ERR_SETUP 809 /* Setup not done */
++#define AF_ERR_THRESHOLD 810 /* Invalid Threshold */
++#define AF_ERR_ENGINE_BUSY 811 /* Engine is busy */
++
++#define AFPID 0x0 /* Peripheral Revision
++ * and Class Information
++ */
++
++#define AFCOEF_OFFSET 0x00000004 /* COEFFICIENT BASE
++ * ADDRESS
++ */
++
++/*
++ * PCR fields
++ */
++#define AF_BUSYAF (1 << 15)
++#define FVMODE (1 << 14)
++#define RGBPOS (0x7 << 11)
++#define MED_TH (0xFF << 3)
++#define AF_MED_EN (1 << 2)
++#define AF_ALAW_EN (1 << 1)
++#define AF_EN (1 << 0)
++
++/*
++ * AFPAX1 fields
++ */
++#define PAXW (0x7F << 16)
++#define PAXH 0x7F
++
++/*
++ * AFPAX2 fields
++ */
++#define AFINCV (0xF << 13)
++#define PAXVC (0x7F << 6)
++#define PAXHC 0x3F
++
++/*
++ * AFPAXSTART fields
++ */
++#define PAXSH (0xFFF<<16)
++#define PAXSV 0xFFF
++
++/*
++ * COEFFICIENT MASK
++ */
++
++#define COEF_MASK0 0xFFF
++#define COEF_MASK1 (0xFFF<<16)
++
++/* BIT SHIFTS */
++#define AF_RGBPOS_SHIFT 11
++#define AF_MED_TH_SHIFT 3
++#define AF_PAXW_SHIFT 16
++#define AF_LINE_INCR_SHIFT 13
++#define AF_VT_COUNT_SHIFT 6
++#define AF_HZ_START_SHIFT 16
++#define AF_COEF_SHIFT 16
++
++#define AF_UPDATEXS_TS (1 << 0)
++#define AF_UPDATEXS_FIELDCOUNT (1 << 1)
++#define AF_UPDATEXS_LENSPOS (1 << 2)
++
++/* Structure for device of AF Engine */
++struct af_device {
++ struct af_configuration *config; /*Device configuration structure */
++ int size_paxel; /*Paxel size in bytes */
++};
++
++int isp_af_check_paxel(void);
++int isp_af_check_iir(void);
++int isp_af_register_setup(struct af_device *af_dev);
++int isp_af_enable(int);
++void isp_af_suspend(void);
++void isp_af_resume(void);
++int isp_af_busy(void);
++void isp_af_notify(int notify);
++int isp_af_request_statistics(struct isp_af_data *afdata);
++int isp_af_configure(struct af_configuration *afconfig);
++void isp_af_set_address(unsigned long);
++void isp_af_setxtrastats(struct isp_af_xtrastats *xtrastats, u8 updateflag);
++#endif /* OMAP_ISP_AF_H */
+diff --git a/drivers/media/video/isp/isph3a.c b/drivers/media/video/isp/isph3a.c
+new file mode 100644
+index 0000000..7ff1c5b
+--- /dev/null
++++ b/drivers/media/video/isp/isph3a.c
+@@ -0,0 +1,932 @@
++/*
++ * isph3a.c
++ *
++ * H3A module for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <asm/cacheflush.h>
++
++#include <linux/dma-mapping.h>
++#include <linux/uaccess.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "isph3a.h"
++#include "ispmmu.h"
++#include "isppreview.h"
++
++/**
++ * struct isph3a_aewb_buffer - AE, AWB frame stats buffer.
++ * @virt_addr: Virtual address to mmap the buffer.
++ * @phy_addr: Physical address of the buffer.
++ * @addr_align: Virtual Address 32 bytes aligned.
++ * @ispmmu_addr: Address of the buffer mapped by the ISPMMU.
++ * @mmap_addr: Mapped memory area of buffer. For userspace access.
++ * @locked: 1 - Buffer locked from write. 0 - Buffer can be overwritten.
++ * @frame_num: Frame number from which the statistics are taken.
++ * @next: Pointer to link next buffer.
++ */
++struct isph3a_aewb_buffer {
++ unsigned long virt_addr;
++ unsigned long phy_addr;
++ unsigned long addr_align;
++ unsigned long ispmmu_addr;
++ unsigned long mmap_addr; /* For userspace */
++ struct timeval ts;
++ u32 config_counter;
++
++ u8 locked;
++ u16 frame_num;
++ struct isph3a_aewb_buffer *next;
++};
++
++/**
++ * struct isph3a_aewb_status - AE, AWB status.
++ * @initialized: 1 - Buffers initialized.
++ * @update: 1 - Update registers.
++ * @stats_req: 1 - Future stats requested.
++ * @stats_done: 1 - Stats ready for user.
++ * @frame_req: Number of frame requested for statistics.
++ * @h3a_buff: Array of statistics buffers to access.
++ * @stats_buf_size: Statistics buffer size.
++ * @min_buf_size: Minimum statisitics buffer size.
++ * @win_count: Window Count.
++ * @frame_count: Frame Count.
++ * @stats_wait: Wait primitive for locking/unlocking the stats request.
++ * @buffer_lock: Spinlock for statistics buffers access.
++ */
++static struct isph3a_aewb_status {
++ u8 initialized;
++ u8 update;
++ u8 stats_req;
++ u8 stats_done;
++ u16 frame_req;
++ int pm_state;
++
++ struct isph3a_aewb_buffer h3a_buff[H3A_MAX_BUFF];
++ unsigned int stats_buf_size;
++ unsigned int min_buf_size;
++ unsigned int curr_cfg_buf_size;
++
++ atomic_t config_counter;
++
++ u16 win_count;
++ u32 frame_count;
++ wait_queue_head_t stats_wait;
++ spinlock_t buffer_lock; /* For stats buffers read/write sync */
++} aewbstat;
++
++/**
++ * struct isph3a_aewb_regs - Current value of AE, AWB configuration registers.
++ * reg_pcr: Peripheral control register.
++ * reg_win1: Control register.
++ * reg_start: Start position register.
++ * reg_blk: Black line register.
++ * reg_subwin: Configuration register.
++ */
++static struct isph3a_aewb_regs {
++ u32 reg_pcr;
++ u32 reg_win1;
++ u32 reg_start;
++ u32 reg_blk;
++ u32 reg_subwin;
++} aewb_regs;
++
++static struct isph3a_aewb_config aewb_config_local = {
++ .saturation_limit = 0x3FF,
++ .win_height = 0,
++ .win_width = 0,
++ .ver_win_count = 0,
++ .hor_win_count = 0,
++ .ver_win_start = 0,
++ .hor_win_start = 0,
++ .blk_ver_win_start = 0,
++ .blk_win_height = 0,
++ .subsample_ver_inc = 0,
++ .subsample_hor_inc = 0,
++ .alaw_enable = 0,
++ .aewb_enable = 0,
++};
++
++/* Structure for saving/restoring h3a module registers */
++static struct isp_reg isph3a_reg_list[] = {
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR, 0}, /* Should be the first one */
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWWIN1, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWINSTART, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWINBLK, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWSUBWIN, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWBUFST, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFPAX1, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFPAX2, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFPAXSTART, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFIIRSH, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFBUFST, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF010, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF032, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF054, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF076, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF098, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF0010, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF110, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF132, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF154, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF176, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF198, 0},
++ {OMAP3_ISP_IOMEM_H3A, ISPH3A_AFCOEF1010, 0},
++ {0, ISP_TOK_TERM, 0}
++};
++
++static struct ispprev_wbal h3awb_update;
++static struct isph3a_aewb_buffer *active_buff;
++static struct isph3a_aewb_xtrastats h3a_xtrastats[H3A_MAX_BUFF];
++static int camnotify;
++static int wb_update;
++static void isph3a_print_status(void);
++
++/**
++ * isph3a_aewb_setxtrastats - Receives extra statistics from prior frames.
++ * @xtrastats: Pointer to structure containing extra statistics fields like
++ * field count and timestamp of frame.
++ *
++ * Called from update_vbq in camera driver
++ **/
++void isph3a_aewb_setxtrastats(struct isph3a_aewb_xtrastats *xtrastats)
++{
++ int i;
++
++ if (active_buff == NULL)
++ return;
++
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ if (aewbstat.h3a_buff[i].frame_num != active_buff->frame_num)
++ continue;
++
++ if (i == 0) {
++ if (aewbstat.h3a_buff[H3A_MAX_BUFF - 1].locked == 0) {
++ h3a_xtrastats[H3A_MAX_BUFF - 1] =
++ *xtrastats;
++ } else {
++ h3a_xtrastats[H3A_MAX_BUFF - 2] =
++ *xtrastats;
++ }
++ } else if (i == 1) {
++ if (aewbstat.h3a_buff[0].locked == 0)
++ h3a_xtrastats[0] = *xtrastats;
++ else {
++ h3a_xtrastats[H3A_MAX_BUFF - 1] =
++ *xtrastats;
++ }
++ } else {
++ if (aewbstat.h3a_buff[i - 1].locked == 0)
++ h3a_xtrastats[i - 1] = *xtrastats;
++ else
++ h3a_xtrastats[i - 2] = *xtrastats;
++ }
++ return;
++ }
++}
++EXPORT_SYMBOL(isph3a_aewb_setxtrastats);
++
++void __isph3a_aewb_enable(u8 enable)
++{
++ isp_reg_writel(IRQ0STATUS_H3A_AWB_DONE_IRQ, OMAP3_ISP_IOMEM_MAIN,
++ ISP_IRQ0STATUS);
++
++ if (enable) {
++ aewb_regs.reg_pcr |= ISPH3A_PCR_AEW_EN;
++ DPRINTK_ISPH3A(" H3A enabled \n");
++ } else {
++ aewb_regs.reg_pcr &= ~ISPH3A_PCR_AEW_EN;
++ DPRINTK_ISPH3A(" H3A disabled \n");
++ }
++ isp_reg_and_or(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR, ~ISPH3A_PCR_AEW_EN,
++ (enable ? ISPH3A_PCR_AEW_EN : 0));
++ aewb_config_local.aewb_enable = enable;
++}
++
++/**
++ * isph3a_aewb_enable - Enables AE, AWB engine in the H3A module.
++ * @enable: 1 - Enables the AE & AWB engine.
++ *
++ * Client should configure all the AE & AWB registers in H3A before this.
++ **/
++void isph3a_aewb_enable(u8 enable)
++{
++ __isph3a_aewb_enable(enable);
++ aewbstat.pm_state = enable;
++}
++
++/**
++ * isph3a_aewb_suspend - Suspend AE, AWB engine in the H3A module.
++ **/
++void isph3a_aewb_suspend(void)
++{
++ if (aewbstat.pm_state)
++ __isph3a_aewb_enable(0);
++}
++
++/**
++ * isph3a_aewb_resume - Resume AE, AWB engine in the H3A module.
++ **/
++void isph3a_aewb_resume(void)
++{
++ if (aewbstat.pm_state)
++ __isph3a_aewb_enable(1);
++}
++
++int isph3a_aewb_busy(void)
++{
++ return isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR)
++ & ISPH3A_PCR_BUSYAEAWB;
++}
++
++/**
++ * isph3a_update_wb - Updates WB parameters.
++ *
++ * Needs to be called when no ISP Preview processing is taking place.
++ **/
++void isph3a_update_wb(void)
++{
++ if (wb_update) {
++ isppreview_config_whitebalance(h3awb_update);
++ wb_update = 0;
++ }
++ return;
++}
++EXPORT_SYMBOL(isph3a_update_wb);
++
++/**
++ * isph3a_aewb_update_regs - Helper function to update h3a registers.
++ **/
++static void isph3a_aewb_update_regs(void)
++{
++ isp_reg_writel(aewb_regs.reg_pcr, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR);
++ isp_reg_writel(aewb_regs.reg_win1, OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWWIN1);
++ isp_reg_writel(aewb_regs.reg_start, OMAP3_ISP_IOMEM_H3A,
++ ISPH3A_AEWINSTART);
++ isp_reg_writel(aewb_regs.reg_blk, OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWINBLK);
++ isp_reg_writel(aewb_regs.reg_subwin, OMAP3_ISP_IOMEM_H3A,
++ ISPH3A_AEWSUBWIN);
++
++ aewbstat.update = 0;
++ aewbstat.frame_count = 1;
++}
++
++/**
++ * isph3a_aewb_update_req_buffer - Helper function to update buffer cache pages
++ * @buffer: Pointer to structure
++ **/
++static void isph3a_aewb_update_req_buffer(struct isph3a_aewb_buffer *buffer)
++{
++ int size = aewbstat.stats_buf_size;
++
++ size = PAGE_ALIGN(size);
++ dmac_inv_range((void *)buffer->addr_align,
++ (void *)buffer->addr_align + size);
++}
++
++/**
++ * isph3a_aewb_stats_available - Check for stats available of specified frame.
++ * @aewbdata: Pointer to return AE AWB statistics data
++ *
++ * Returns 0 if successful, or -1 if statistics are unavailable.
++ **/
++static int isph3a_aewb_stats_available(struct isph3a_aewb_data *aewbdata)
++{
++ int i, ret;
++ unsigned long irqflags;
++
++ spin_lock_irqsave(&aewbstat.buffer_lock, irqflags);
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ DPRINTK_ISPH3A("Checking Stats buff[%d] (%d) for %d\n",
++ i, aewbstat.h3a_buff[i].frame_num,
++ aewbdata->frame_number);
++ if ((aewbdata->frame_number !=
++ aewbstat.h3a_buff[i].frame_num) ||
++ (aewbstat.h3a_buff[i].frame_num ==
++ active_buff->frame_num))
++ continue;
++ aewbstat.h3a_buff[i].locked = 1;
++ spin_unlock_irqrestore(&aewbstat.buffer_lock, irqflags);
++ isph3a_aewb_update_req_buffer(&aewbstat.h3a_buff[i]);
++ aewbstat.h3a_buff[i].frame_num = 0;
++ ret = copy_to_user((void *)aewbdata->h3a_aewb_statistics_buf,
++ (void *)aewbstat.h3a_buff[i].virt_addr,
++ aewbstat.curr_cfg_buf_size);
++ if (ret) {
++ printk(KERN_ERR "Failed copy_to_user for "
++ "H3A stats buff, %d\n", ret);
++ }
++ aewbdata->ts = aewbstat.h3a_buff[i].ts;
++ aewbdata->config_counter = aewbstat.h3a_buff[i].config_counter;
++ aewbdata->field_count = h3a_xtrastats[i].field_count;
++ return 0;
++ }
++ spin_unlock_irqrestore(&aewbstat.buffer_lock, irqflags);
++
++ return -1;
++}
++
++/**
++ * isph3a_aewb_link_buffers - Helper function to link allocated buffers.
++ **/
++static void isph3a_aewb_link_buffers(void)
++{
++ int i;
++
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ if ((i + 1) < H3A_MAX_BUFF) {
++ aewbstat.h3a_buff[i].next = &aewbstat.h3a_buff[i + 1];
++ h3a_xtrastats[i].next = &h3a_xtrastats[i + 1];
++ } else {
++ aewbstat.h3a_buff[i].next = &aewbstat.h3a_buff[0];
++ h3a_xtrastats[i].next = &h3a_xtrastats[0];
++ }
++ }
++}
++
++/**
++ * isph3a_aewb_unlock_buffers - Helper function to unlock all buffers.
++ **/
++static void isph3a_aewb_unlock_buffers(void)
++{
++ int i;
++ unsigned long irqflags;
++
++ spin_lock_irqsave(&aewbstat.buffer_lock, irqflags);
++ for (i = 0; i < H3A_MAX_BUFF; i++)
++ aewbstat.h3a_buff[i].locked = 0;
++
++ spin_unlock_irqrestore(&aewbstat.buffer_lock, irqflags);
++}
++
++/**
++ * isph3a_aewb_isr - Callback from ISP driver for H3A AEWB interrupt.
++ * @status: IRQ0STATUS in case of MMU error, 0 for H3A interrupt.
++ * @arg1: Not used as of now.
++ * @arg2: Not used as of now.
++ */
++static void isph3a_aewb_isr(unsigned long status, isp_vbq_callback_ptr arg1,
++ void *arg2)
++{
++ u16 frame_align;
++
++ if ((H3A_AWB_DONE & status) != H3A_AWB_DONE)
++ return;
++
++ do_gettimeofday(&active_buff->ts);
++ active_buff->config_counter = atomic_read(&aewbstat.config_counter);
++ active_buff = active_buff->next;
++ if (active_buff->locked == 1)
++ active_buff = active_buff->next;
++ isp_reg_writel(active_buff->ispmmu_addr, OMAP3_ISP_IOMEM_H3A,
++ ISPH3A_AEWBUFST);
++
++ aewbstat.frame_count++;
++ frame_align = aewbstat.frame_count;
++ if (aewbstat.frame_count > MAX_FRAME_COUNT) {
++ aewbstat.frame_count = 1;
++ frame_align++;
++ }
++ active_buff->frame_num = aewbstat.frame_count;
++
++ if (aewbstat.stats_req) {
++ DPRINTK_ISPH3A("waiting for frame %d\n", aewbstat.frame_req);
++ if (frame_align >= aewbstat.frame_req + 1) {
++ aewbstat.stats_req = 0;
++ aewbstat.stats_done = 1;
++ wake_up_interruptible(&aewbstat.stats_wait);
++ }
++ }
++
++ if (aewbstat.update)
++ isph3a_aewb_update_regs();
++}
++
++/**
++ * isph3a_aewb_set_params - Helper function to check & store user given params.
++ * @user_cfg: Pointer to AE and AWB parameters struct.
++ *
++ * As most of them are busy-lock registers, need to wait until AEW_BUSY = 0 to
++ * program them during ISR.
++ *
++ * Returns 0 if successful, or -EINVAL if any of the parameters are invalid.
++ **/
++static int isph3a_aewb_set_params(struct isph3a_aewb_config *user_cfg)
++{
++ if (unlikely(user_cfg->saturation_limit > MAX_SATURATION_LIM)) {
++ printk(KERN_ERR "Invalid Saturation_limit: %d\n",
++ user_cfg->saturation_limit);
++ return -EINVAL;
++ }
++ if (aewb_config_local.saturation_limit != user_cfg->saturation_limit) {
++ WRITE_SAT_LIM(aewb_regs.reg_pcr, user_cfg->saturation_limit);
++ aewb_config_local.saturation_limit =
++ user_cfg->saturation_limit;
++ aewbstat.update = 1;
++ }
++
++ if (aewb_config_local.alaw_enable != user_cfg->alaw_enable) {
++ WRITE_ALAW(aewb_regs.reg_pcr, user_cfg->alaw_enable);
++ aewb_config_local.alaw_enable = user_cfg->alaw_enable;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->win_height < MIN_WIN_H ||
++ user_cfg->win_height > MAX_WIN_H ||
++ user_cfg->win_height & 0x01)) {
++ printk(KERN_ERR "Invalid window height: %d\n",
++ user_cfg->win_height);
++ return -EINVAL;
++ }
++ if (aewb_config_local.win_height != user_cfg->win_height) {
++ WRITE_WIN_H(aewb_regs.reg_win1, user_cfg->win_height);
++ aewb_config_local.win_height = user_cfg->win_height;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->win_width < MIN_WIN_W ||
++ user_cfg->win_width > MAX_WIN_W ||
++ user_cfg->win_width & 0x01)) {
++ printk(KERN_ERR "Invalid window width: %d\n",
++ user_cfg->win_width);
++ return -EINVAL;
++ }
++ if (aewb_config_local.win_width != user_cfg->win_width) {
++ WRITE_WIN_W(aewb_regs.reg_win1, user_cfg->win_width);
++ aewb_config_local.win_width = user_cfg->win_width;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->ver_win_count < 1 ||
++ user_cfg->ver_win_count > MAX_WINVC)) {
++ printk(KERN_ERR "Invalid vertical window count: %d\n",
++ user_cfg->ver_win_count);
++ return -EINVAL;
++ }
++ if (aewb_config_local.ver_win_count != user_cfg->ver_win_count) {
++ WRITE_VER_C(aewb_regs.reg_win1, user_cfg->ver_win_count);
++ aewb_config_local.ver_win_count = user_cfg->ver_win_count;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->hor_win_count < 1 ||
++ user_cfg->hor_win_count > MAX_WINHC)) {
++ printk(KERN_ERR "Invalid horizontal window count: %d\n",
++ user_cfg->hor_win_count);
++ return -EINVAL;
++ }
++ if (aewb_config_local.hor_win_count != user_cfg->hor_win_count) {
++ WRITE_HOR_C(aewb_regs.reg_win1, user_cfg->hor_win_count);
++ aewb_config_local.hor_win_count = user_cfg->hor_win_count;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->ver_win_start > MAX_WINSTART)) {
++ printk(KERN_ERR "Invalid vertical window start: %d\n",
++ user_cfg->ver_win_start);
++ return -EINVAL;
++ }
++ if (aewb_config_local.ver_win_start != user_cfg->ver_win_start) {
++ WRITE_VER_WIN_ST(aewb_regs.reg_start, user_cfg->ver_win_start);
++ aewb_config_local.ver_win_start = user_cfg->ver_win_start;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->hor_win_start > MAX_WINSTART)) {
++ printk(KERN_ERR "Invalid horizontal window start: %d\n",
++ user_cfg->hor_win_start);
++ return -EINVAL;
++ }
++ if (aewb_config_local.hor_win_start != user_cfg->hor_win_start) {
++ WRITE_HOR_WIN_ST(aewb_regs.reg_start, user_cfg->hor_win_start);
++ aewb_config_local.hor_win_start = user_cfg->hor_win_start;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->blk_ver_win_start > MAX_WINSTART)) {
++ printk(KERN_ERR "Invalid black vertical window start: %d\n",
++ user_cfg->blk_ver_win_start);
++ return -EINVAL;
++ }
++ if (aewb_config_local.blk_ver_win_start !=
++ user_cfg->blk_ver_win_start) {
++ WRITE_BLK_VER_WIN_ST(aewb_regs.reg_blk,
++ user_cfg->blk_ver_win_start);
++ aewb_config_local.blk_ver_win_start =
++ user_cfg->blk_ver_win_start;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->blk_win_height < MIN_WIN_H ||
++ user_cfg->blk_win_height > MAX_WIN_H ||
++ user_cfg->blk_win_height & 0x01)) {
++ printk(KERN_ERR "Invalid black window height: %d\n",
++ user_cfg->blk_win_height);
++ return -EINVAL;
++ }
++ if (aewb_config_local.blk_win_height != user_cfg->blk_win_height) {
++ WRITE_BLK_WIN_H(aewb_regs.reg_blk, user_cfg->blk_win_height);
++ aewb_config_local.blk_win_height = user_cfg->blk_win_height;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->subsample_ver_inc < MIN_SUB_INC ||
++ user_cfg->subsample_ver_inc > MAX_SUB_INC ||
++ user_cfg->subsample_ver_inc & 0x01)) {
++ printk(KERN_ERR "Invalid vertical subsample increment: %d\n",
++ user_cfg->subsample_ver_inc);
++ return -EINVAL;
++ }
++ if (aewb_config_local.subsample_ver_inc !=
++ user_cfg->subsample_ver_inc) {
++ WRITE_SUB_VER_INC(aewb_regs.reg_subwin,
++ user_cfg->subsample_ver_inc);
++ aewb_config_local.subsample_ver_inc =
++ user_cfg->subsample_ver_inc;
++ aewbstat.update = 1;
++ }
++
++ if (unlikely(user_cfg->subsample_hor_inc < MIN_SUB_INC ||
++ user_cfg->subsample_hor_inc > MAX_SUB_INC ||
++ user_cfg->subsample_hor_inc & 0x01)) {
++ printk(KERN_ERR "Invalid horizontal subsample increment: %d\n",
++ user_cfg->subsample_hor_inc);
++ return -EINVAL;
++ }
++ if (aewb_config_local.subsample_hor_inc !=
++ user_cfg->subsample_hor_inc) {
++ WRITE_SUB_HOR_INC(aewb_regs.reg_subwin,
++ user_cfg->subsample_hor_inc);
++ aewb_config_local.subsample_hor_inc =
++ user_cfg->subsample_hor_inc;
++ aewbstat.update = 1;
++ }
++
++ if (!aewbstat.initialized || !aewb_config_local.aewb_enable) {
++ isph3a_aewb_update_regs();
++ aewbstat.initialized = 1;
++ }
++ return 0;
++}
++
++/**
++ * isph3a_aewb_configure - Configure AEWB regs, enable/disable H3A engine.
++ * @aewbcfg: Pointer to AEWB config structure.
++ *
++ * Returns 0 if successful, -EINVAL if aewbcfg pointer is NULL, -ENOMEM if
++ * was unable to allocate memory for the buffer, of other errors if H3A
++ * callback is not set or the parameters for AEWB are invalid.
++ **/
++int isph3a_aewb_configure(struct isph3a_aewb_config *aewbcfg)
++{
++ int ret = 0;
++ int i;
++ int win_count = 0;
++
++ if (NULL == aewbcfg) {
++ printk(KERN_ERR "Null argument in configuration. \n");
++ return -EINVAL;
++ }
++
++ if (!aewbstat.initialized) {
++ DPRINTK_ISPH3A("Setting callback for H3A\n");
++ ret = isp_set_callback(CBK_H3A_AWB_DONE, isph3a_aewb_isr,
++ (void *)NULL, (void *)NULL);
++ if (ret) {
++ printk(KERN_ERR "No callback for H3A\n");
++ return ret;
++ }
++ }
++
++ ret = isph3a_aewb_set_params(aewbcfg);
++ if (ret) {
++ printk(KERN_ERR "Invalid parameters! \n");
++ return ret;
++ }
++
++ win_count = aewbcfg->ver_win_count * aewbcfg->hor_win_count;
++ win_count += aewbcfg->hor_win_count;
++ ret = win_count / 8;
++ win_count += win_count % 8 ? 1 : 0;
++ win_count += ret;
++
++ aewbstat.win_count = win_count;
++ aewbstat.curr_cfg_buf_size = win_count * AEWB_PACKET_SIZE;
++
++ if (aewbstat.stats_buf_size
++ && win_count * AEWB_PACKET_SIZE > aewbstat.stats_buf_size) {
++ DPRINTK_ISPH3A("There was a previous buffer... "
++ "Freeing/unmapping current stat busffs\n");
++ isph3a_aewb_enable(0);
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ ispmmu_kunmap(aewbstat.h3a_buff[i].ispmmu_addr);
++ dma_free_coherent(
++ NULL,
++ aewbstat.min_buf_size,
++ (void *)aewbstat.h3a_buff[i].virt_addr,
++ (dma_addr_t)aewbstat.h3a_buff[i].phy_addr);
++ aewbstat.h3a_buff[i].virt_addr = 0;
++ }
++ aewbstat.stats_buf_size = 0;
++ }
++
++ if (!aewbstat.h3a_buff[0].virt_addr) {
++ aewbstat.stats_buf_size = win_count * AEWB_PACKET_SIZE;
++ aewbstat.min_buf_size = PAGE_ALIGN(aewbstat.stats_buf_size);
++
++ DPRINTK_ISPH3A("Allocating/mapping new stat buffs\n");
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ aewbstat.h3a_buff[i].virt_addr =
++ (unsigned long)dma_alloc_coherent(
++ NULL,
++ aewbstat.min_buf_size,
++ (dma_addr_t *)
++ &aewbstat.h3a_buff[i].phy_addr,
++ GFP_KERNEL | GFP_DMA);
++ if (aewbstat.h3a_buff[i].virt_addr == 0) {
++ printk(KERN_ERR "Can't acquire memory for "
++ "buffer[%d]\n", i);
++ return -ENOMEM;
++ }
++ aewbstat.h3a_buff[i].addr_align =
++ aewbstat.h3a_buff[i].virt_addr;
++ while ((aewbstat.h3a_buff[i].addr_align & 0xFFFFFFC0) !=
++ aewbstat.h3a_buff[i].addr_align)
++ aewbstat.h3a_buff[i].addr_align++;
++ aewbstat.h3a_buff[i].ispmmu_addr =
++ ispmmu_kmap(aewbstat.h3a_buff[i].phy_addr,
++ aewbstat.min_buf_size);
++ }
++ isph3a_aewb_unlock_buffers();
++ isph3a_aewb_link_buffers();
++
++ if (active_buff == NULL)
++ active_buff = &aewbstat.h3a_buff[0];
++
++ isp_reg_writel(active_buff->ispmmu_addr, OMAP3_ISP_IOMEM_H3A,
++ ISPH3A_AEWBUFST);
++ }
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ DPRINTK_ISPH3A("buff[%d] addr is:\n virt 0x%lX\n"
++ " aligned 0x%lX\n"
++ " phys 0x%lX\n"
++ " ispmmu 0x%08lX\n"
++ " mmapped 0x%lX\n"
++ " frame_num %d\n", i,
++ aewbstat.h3a_buff[i].virt_addr,
++ aewbstat.h3a_buff[i].addr_align,
++ aewbstat.h3a_buff[i].phy_addr,
++ aewbstat.h3a_buff[i].ispmmu_addr,
++ aewbstat.h3a_buff[i].mmap_addr,
++ aewbstat.h3a_buff[i].frame_num);
++ }
++
++ active_buff->frame_num = 1;
++
++ atomic_inc(&aewbstat.config_counter);
++ isph3a_aewb_enable(aewbcfg->aewb_enable);
++ isph3a_print_status();
++
++ return 0;
++}
++EXPORT_SYMBOL(isph3a_aewb_configure);
++
++/**
++ * isph3a_aewb_request_statistics - REquest statistics and update gains in AEWB
++ * @aewbdata: Pointer to return AE AWB statistics data.
++ *
++ * This API allows the user to update White Balance gains, as well as
++ * exposure time and analog gain. It is also used to request frame
++ * statistics.
++ *
++ * Returns 0 if successful, -EINVAL when H3A engine is not enabled, or other
++ * errors when setting gains.
++ **/
++int isph3a_aewb_request_statistics(struct isph3a_aewb_data *aewbdata)
++{
++ int ret = 0;
++ u16 frame_diff = 0;
++ u16 frame_cnt = aewbstat.frame_count;
++ wait_queue_t wqt;
++
++ if (!aewb_config_local.aewb_enable) {
++ printk(KERN_ERR "H3A engine not enabled\n");
++ return -EINVAL;
++ }
++
++ DPRINTK_ISPH3A("isph3a_aewb_request_statistics: Enter "
++ "(frame req. => %d, current frame => %d,"
++ "update => %d)\n",
++ aewbdata->frame_number, frame_cnt, aewbdata->update);
++ DPRINTK_ISPH3A("User data received: \n");
++ DPRINTK_ISPH3A("Digital gain = 0x%04x\n", aewbdata->dgain);
++ DPRINTK_ISPH3A("WB gain b *= 0x%04x\n", aewbdata->wb_gain_b);
++ DPRINTK_ISPH3A("WB gain r *= 0x%04x\n", aewbdata->wb_gain_r);
++ DPRINTK_ISPH3A("WB gain gb = 0x%04x\n", aewbdata->wb_gain_gb);
++ DPRINTK_ISPH3A("WB gain gr = 0x%04x\n", aewbdata->wb_gain_gr);
++
++ if (!aewbdata->update) {
++ aewbdata->h3a_aewb_statistics_buf = NULL;
++ goto out;
++ }
++ if (aewbdata->update & SET_DIGITAL_GAIN)
++ h3awb_update.dgain = (u16)aewbdata->dgain;
++ if (aewbdata->update & SET_COLOR_GAINS) {
++ h3awb_update.coef0 = (u8)aewbdata->wb_gain_gr;
++ h3awb_update.coef1 = (u8)aewbdata->wb_gain_r;
++ h3awb_update.coef2 = (u8)aewbdata->wb_gain_b;
++ h3awb_update.coef3 = (u8)aewbdata->wb_gain_gb;
++ }
++ if (aewbdata->update & (SET_COLOR_GAINS | SET_DIGITAL_GAIN))
++ wb_update = 1;
++
++ if (!(aewbdata->update & REQUEST_STATISTICS)) {
++ aewbdata->h3a_aewb_statistics_buf = NULL;
++ goto out;
++ }
++
++ if (aewbdata->frame_number < 1) {
++ printk(KERN_ERR "Illeagal frame number "
++ "requested (%d)\n",
++ aewbdata->frame_number);
++ return -EINVAL;
++ }
++
++ isph3a_aewb_unlock_buffers();
++
++ DPRINTK_ISPH3A("Stats available?\n");
++ ret = isph3a_aewb_stats_available(aewbdata);
++ if (!ret)
++ goto out;
++
++ DPRINTK_ISPH3A("Stats in near future?\n");
++ if (aewbdata->frame_number > frame_cnt)
++ frame_diff = aewbdata->frame_number - frame_cnt;
++ else if (aewbdata->frame_number < frame_cnt) {
++ if ((frame_cnt > (MAX_FRAME_COUNT - MAX_FUTURE_FRAMES)) &&
++ (aewbdata->frame_number < MAX_FRAME_COUNT)) {
++ frame_diff = aewbdata->frame_number + MAX_FRAME_COUNT -
++ frame_cnt;
++ } else
++ frame_diff = MAX_FUTURE_FRAMES + 1;
++ }
++
++ if (frame_diff > MAX_FUTURE_FRAMES) {
++ printk(KERN_ERR "Invalid frame requested, returning current"
++ " frame stats\n");
++ aewbdata->frame_number = frame_cnt;
++ }
++ if (camnotify) {
++ DPRINTK_ISPH3A("NOT Waiting on stats IRQ for frame %d "
++ "because camnotify set\n",
++ aewbdata->frame_number);
++ aewbdata->h3a_aewb_statistics_buf = NULL;
++ goto out;
++ }
++ DPRINTK_ISPH3A("Waiting on stats IRQ for frame %d\n",
++ aewbdata->frame_number);
++ aewbstat.frame_req = aewbdata->frame_number;
++ aewbstat.stats_req = 1;
++ aewbstat.stats_done = 0;
++ init_waitqueue_entry(&wqt, current);
++ ret = wait_event_interruptible(aewbstat.stats_wait,
++ aewbstat.stats_done == 1);
++ if (ret < 0) {
++ printk(KERN_ERR "isph3a_aewb_request_statistics"
++ " Error on wait event %d\n", ret);
++ aewbdata->h3a_aewb_statistics_buf = NULL;
++ return ret;
++ }
++
++ DPRINTK_ISPH3A("ISP AEWB request status interrupt raised\n");
++ ret = isph3a_aewb_stats_available(aewbdata);
++ if (ret) {
++ DPRINTK_ISPH3A("After waiting for stats,"
++ " stats not available!!\n");
++ aewbdata->h3a_aewb_statistics_buf = NULL;
++ }
++out:
++ DPRINTK_ISPH3A("isph3a_aewb_request_statistics: "
++ "aewbdata->h3a_aewb_statistics_buf => %p\n",
++ aewbdata->h3a_aewb_statistics_buf);
++ aewbdata->curr_frame = aewbstat.frame_count;
++
++ return 0;
++}
++EXPORT_SYMBOL(isph3a_aewb_request_statistics);
++
++/**
++ * isph3a_aewb_init - Module Initialisation.
++ *
++ * Always returns 0.
++ **/
++int __init isph3a_aewb_init(void)
++{
++ memset(&aewbstat, 0, sizeof(aewbstat));
++ memset(&aewb_regs, 0, sizeof(aewb_regs));
++
++ init_waitqueue_head(&aewbstat.stats_wait);
++ spin_lock_init(&aewbstat.buffer_lock);
++ return 0;
++}
++
++/**
++ * isph3a_aewb_cleanup - Module exit.
++ **/
++void isph3a_aewb_cleanup(void)
++{
++ int i;
++
++ for (i = 0; i < H3A_MAX_BUFF; i++) {
++ if (!aewbstat.h3a_buff[i].phy_addr)
++ continue;
++
++ ispmmu_kunmap(aewbstat.h3a_buff[i].ispmmu_addr);
++ dma_free_coherent(NULL,
++ aewbstat.min_buf_size,
++ (void *)aewbstat.h3a_buff[i].virt_addr,
++ (dma_addr_t)aewbstat.h3a_buff[i].phy_addr);
++ }
++ memset(&aewbstat, 0, sizeof(aewbstat));
++ memset(&aewb_regs, 0, sizeof(aewb_regs));
++}
++
++/**
++ * isph3a_print_status - Debug print. Values of H3A related registers.
++ **/
++static void isph3a_print_status(void)
++{
++ DPRINTK_ISPH3A("ISPH3A_PCR = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR));
++ DPRINTK_ISPH3A("ISPH3A_AEWWIN1 = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWWIN1));
++ DPRINTK_ISPH3A("ISPH3A_AEWINSTART = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWINSTART));
++ DPRINTK_ISPH3A("ISPH3A_AEWINBLK = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWINBLK));
++ DPRINTK_ISPH3A("ISPH3A_AEWSUBWIN = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWSUBWIN));
++ DPRINTK_ISPH3A("ISPH3A_AEWBUFST = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_H3A, ISPH3A_AEWBUFST));
++ DPRINTK_ISPH3A("stats windows = %d\n", aewbstat.win_count);
++ DPRINTK_ISPH3A("stats buff size = %d\n", aewbstat.stats_buf_size);
++ DPRINTK_ISPH3A("currently configured stats buff size = %d\n",
++ aewbstat.curr_cfg_buf_size);
++}
++
++/**
++ * isph3a_notify - Unblocks user request for statistics when camera is off
++ * @notify: 1 - Camera is turned off
++ *
++ * Used when the user has requested statistics about a future frame, but the
++ * camera is turned off before it happens, and this function unblocks the
++ * request so the user can continue in its program.
++ **/
++void isph3a_notify(int notify)
++{
++ camnotify = notify;
++ if (camnotify && aewbstat.initialized) {
++ printk(KERN_DEBUG "Warning Camera Off \n");
++ aewbstat.stats_req = 0;
++ aewbstat.stats_done = 1;
++ wake_up_interruptible(&aewbstat.stats_wait);
++ }
++}
++EXPORT_SYMBOL(isph3a_notify);
++
++/**
++ * isph3a_save_context - Saves the values of the h3a module registers.
++ **/
++void isph3a_save_context(void)
++{
++ DPRINTK_ISPH3A(" Saving context\n");
++ isp_save_context(isph3a_reg_list);
++ /* Avoid enable during restore ctx */
++ isph3a_reg_list[0].val &= ~ISPH3A_PCR_AEW_EN;
++}
++EXPORT_SYMBOL(isph3a_save_context);
++
++/**
++ * isph3a_restore_context - Restores the values of the h3a module registers.
++ **/
++void isph3a_restore_context(void)
++{
++ DPRINTK_ISPH3A(" Restoring context\n");
++ isp_restore_context(isph3a_reg_list);
++}
++EXPORT_SYMBOL(isph3a_restore_context);
+diff --git a/drivers/media/video/isp/isph3a.h b/drivers/media/video/isp/isph3a.h
+new file mode 100644
+index 0000000..7d4c765
+--- /dev/null
++++ b/drivers/media/video/isp/isph3a.h
+@@ -0,0 +1,127 @@
++/*
++ * isph3a.h
++ *
++ * Include file for H3A module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_H3A_H
++#define OMAP_ISP_H3A_H
++
++#include <mach/isp_user.h>
++
++#define AEWB_PACKET_SIZE 16
++#define H3A_MAX_BUFF 5
++
++/* Flags for changed registers */
++#define PCR_CHNG (1 << 0)
++#define AEWWIN1_CHNG (1 << 1)
++#define AEWINSTART_CHNG (1 << 2)
++#define AEWINBLK_CHNG (1 << 3)
++#define AEWSUBWIN_CHNG (1 << 4)
++#define PRV_WBDGAIN_CHNG (1 << 5)
++#define PRV_WBGAIN_CHNG (1 << 6)
++
++/* ISPH3A REGISTERS bits */
++#define ISPH3A_PCR_AF_EN (1 << 0)
++#define ISPH3A_PCR_AF_ALAW_EN (1 << 1)
++#define ISPH3A_PCR_AF_MED_EN (1 << 2)
++#define ISPH3A_PCR_AF_BUSY (1 << 15)
++#define ISPH3A_PCR_AEW_EN (1 << 16)
++#define ISPH3A_PCR_AEW_ALAW_EN (1 << 17)
++#define ISPH3A_PCR_AEW_BUSY (1 << 18)
++
++#define WRITE_SAT_LIM(reg, sat_limit) \
++ (reg = (reg & (~(ISPH3A_PCR_AEW_AVE2LMT_MASK))) \
++ | (sat_limit << ISPH3A_PCR_AEW_AVE2LMT_SHIFT))
++
++#define WRITE_ALAW(reg, alaw_en) \
++ (reg = (reg & (~(ISPH3A_PCR_AEW_ALAW_EN))) \
++ | ((alaw_en & ISPH3A_PCR_AF_ALAW_EN) \
++ << ISPH3A_PCR_AEW_ALAW_EN_SHIFT))
++
++#define WRITE_WIN_H(reg, height) \
++ (reg = (reg & (~(ISPH3A_AEWWIN1_WINH_MASK))) \
++ | (((height >> 1) - 1) << ISPH3A_AEWWIN1_WINH_SHIFT))
++
++#define WRITE_WIN_W(reg, width) \
++ (reg = (reg & (~(ISPH3A_AEWWIN1_WINW_MASK))) \
++ | (((width >> 1) - 1) << ISPH3A_AEWWIN1_WINW_SHIFT))
++
++#define WRITE_VER_C(reg, ver_count) \
++ (reg = (reg & ~(ISPH3A_AEWWIN1_WINVC_MASK)) \
++ | ((ver_count - 1) << ISPH3A_AEWWIN1_WINVC_SHIFT))
++
++#define WRITE_HOR_C(reg, hor_count) \
++ (reg = (reg & ~(ISPH3A_AEWWIN1_WINHC_MASK)) \
++ | ((hor_count - 1) << ISPH3A_AEWWIN1_WINHC_SHIFT))
++
++#define WRITE_VER_WIN_ST(reg, ver_win_st) \
++ (reg = (reg & ~(ISPH3A_AEWINSTART_WINSV_MASK)) \
++ | (ver_win_st << ISPH3A_AEWINSTART_WINSV_SHIFT))
++
++#define WRITE_HOR_WIN_ST(reg, hor_win_st) \
++ (reg = (reg & ~(ISPH3A_AEWINSTART_WINSH_MASK)) \
++ | (hor_win_st << ISPH3A_AEWINSTART_WINSH_SHIFT))
++
++#define WRITE_BLK_VER_WIN_ST(reg, blk_win_st) \
++ (reg = (reg & ~(ISPH3A_AEWINBLK_WINSV_MASK)) \
++ | (blk_win_st << ISPH3A_AEWINBLK_WINSV_SHIFT))
++
++#define WRITE_BLK_WIN_H(reg, height) \
++ (reg = (reg & ~(ISPH3A_AEWINBLK_WINH_MASK)) \
++ | (((height >> 1) - 1) << ISPH3A_AEWINBLK_WINH_SHIFT))
++
++#define WRITE_SUB_VER_INC(reg, sub_ver_inc) \
++ (reg = (reg & ~(ISPH3A_AEWSUBWIN_AEWINCV_MASK)) \
++ | (((sub_ver_inc >> 1) - 1) << ISPH3A_AEWSUBWIN_AEWINCV_SHIFT))
++
++#define WRITE_SUB_HOR_INC(reg, sub_hor_inc) \
++ (reg = (reg & ~(ISPH3A_AEWSUBWIN_AEWINCH_MASK)) \
++ | (((sub_hor_inc >> 1) - 1) << ISPH3A_AEWSUBWIN_AEWINCH_SHIFT))
++
++/**
++ * struct isph3a_aewb_xtrastats - Structure with extra statistics sent by cam.
++ * @field_count: Sequence number of returned framestats.
++ * @isph3a_aewb_xtrastats: Pointer to next buffer with extra stats.
++ */
++struct isph3a_aewb_xtrastats {
++ unsigned long field_count;
++ struct isph3a_aewb_xtrastats *next;
++};
++
++void isph3a_aewb_setxtrastats(struct isph3a_aewb_xtrastats *xtrastats);
++
++int isph3a_aewb_configure(struct isph3a_aewb_config *aewbcfg);
++
++int isph3a_aewb_request_statistics(struct isph3a_aewb_data *aewbdata);
++
++void isph3a_save_context(void);
++
++void isph3a_restore_context(void);
++
++void isph3a_aewb_enable(u8 enable);
++
++int isph3a_aewb_busy(void);
++
++void isph3a_aewb_suspend(void);
++
++void isph3a_aewb_resume(void);
++
++void isph3a_update_wb(void);
++
++void isph3a_notify(int notify);
++#endif /* OMAP_ISP_H3A_H */
+diff --git a/drivers/media/video/isp/isphist.c b/drivers/media/video/isp/isphist.c
+new file mode 100644
+index 0000000..c6f6a77
+--- /dev/null
++++ b/drivers/media/video/isp/isphist.c
+@@ -0,0 +1,608 @@
++/*
++ * isphist.c
++ *
++ * HISTOGRAM module for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <asm/cacheflush.h>
++
++#include <linux/delay.h>
++#include <linux/dma-mapping.h>
++#include <linux/uaccess.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "isphist.h"
++#include "ispmmu.h"
++
++/**
++ * struct isp_hist_status - Histogram status.
++ * @hist_enable: Enables the histogram module.
++ * @initialized: Flag to indicate that the module is correctly initializated.
++ * @frame_cnt: Actual frame count.
++ * @frame_req: Frame requested by user.
++ * @completed: Flag to indicate if a frame request is completed.
++ */
++struct isp_hist_status {
++ u8 hist_enable;
++ u8 pm_state;
++ u8 initialized;
++ u8 frame_cnt;
++ u8 frame_req;
++ u8 completed;
++} histstat;
++
++/**
++ * struct isp_hist_buffer - Frame histogram buffer.
++ * @virt_addr: Virtual address to mmap the buffer.
++ * @phy_addr: Physical address of the buffer.
++ * @addr_align: Virtual Address 32 bytes aligned.
++ * @ispmmu_addr: Address of the buffer mapped by the ISPMMU.
++ * @mmap_addr: Mapped memory area of buffer. For userspace access.
++ */
++struct isp_hist_buffer {
++ unsigned long virt_addr;
++ unsigned long phy_addr;
++ unsigned long addr_align;
++ unsigned long ispmmu_addr;
++ unsigned long mmap_addr;
++} hist_buff;
++
++/**
++ * struct isp_hist_regs - Current value of Histogram configuration registers.
++ * @reg_pcr: Peripheral control register.
++ * @reg_cnt: Histogram control register.
++ * @reg_wb_gain: Histogram white balance gain register.
++ * @reg_r0_h: Region 0 horizontal register.
++ * @reg_r0_v: Region 0 vertical register.
++ * @reg_r1_h: Region 1 horizontal register.
++ * @reg_r1_v: Region 1 vertical register.
++ * @reg_r2_h: Region 2 horizontal register.
++ * @reg_r2_v: Region 2 vertical register.
++ * @reg_r3_h: Region 3 horizontal register.
++ * @reg_r3_v: Region 3 vertical register.
++ * @reg_hist_addr: Histogram address register.
++ * @reg_hist_data: Histogram data.
++ * @reg_hist_radd: Address register. When input data comes from mem.
++ * @reg_hist_radd_off: Address offset register. When input data comes from mem.
++ * @reg_h_v_info: Image size register. When input data comes from mem.
++ */
++static struct isp_hist_regs {
++ u32 reg_pcr;
++ u32 reg_cnt;
++ u32 reg_wb_gain;
++ u32 reg_r0_h;
++ u32 reg_r0_v;
++ u32 reg_r1_h;
++ u32 reg_r1_v;
++ u32 reg_r2_h;
++ u32 reg_r2_v;
++ u32 reg_r3_h;
++ u32 reg_r3_v;
++ u32 reg_hist_addr;
++ u32 reg_hist_data;
++ u32 reg_hist_radd;
++ u32 reg_hist_radd_off;
++ u32 reg_h_v_info;
++} hist_regs;
++
++/* Structure for saving/restoring histogram module registers */
++struct isp_reg isphist_reg_list[] = {
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_WB_GAIN, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R0_HORZ, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R0_VERT, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R1_HORZ, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R1_VERT, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R2_HORZ, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R2_VERT, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R3_HORZ, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_R3_VERT, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_ADDR, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_RADD, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_RADD_OFF, 0},
++ {OMAP3_ISP_IOMEM_HIST, ISPHIST_H_V_INFO, 0},
++ {0, ISP_TOK_TERM, 0}
++};
++
++static void isp_hist_print_status(void);
++
++void __isp_hist_enable(u8 enable)
++{
++ if (enable)
++ DPRINTK_ISPHIST(" histogram enabled \n");
++ else
++ DPRINTK_ISPHIST(" histogram disabled \n");
++
++ isp_reg_and_or(OMAP3_ISP_IOMEM_HIST, ISPHIST_PCR, ~ISPHIST_PCR_EN,
++ (enable ? ISPHIST_PCR_EN : 0));
++ histstat.hist_enable = enable;
++}
++
++/**
++ * isp_hist_enable - Enables ISP Histogram submodule operation.
++ * @enable: 1 - Enables the histogram submodule.
++ *
++ * Client should configure all the Histogram registers before calling this
++ * function.
++ **/
++void isp_hist_enable(u8 enable)
++{
++ __isp_hist_enable(enable);
++ histstat.pm_state = enable;
++}
++
++/**
++ * isp_hist_suspend - Suspend ISP Histogram submodule.
++ **/
++void isp_hist_suspend(void)
++{
++ if (histstat.pm_state)
++ __isp_hist_enable(0);
++}
++
++/**
++ * isp_hist_resume - Resume ISP Histogram submodule.
++ **/
++void isp_hist_resume(void)
++{
++ if (histstat.pm_state)
++ __isp_hist_enable(1);
++}
++
++int isp_hist_busy(void)
++{
++ return isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_PCR) &
++ ISPHIST_PCR_BUSY;
++}
++
++
++/**
++ * isp_hist_update_regs - Helper function to update Histogram registers.
++ **/
++static void isp_hist_update_regs(void)
++{
++ isp_reg_writel(hist_regs.reg_pcr, OMAP3_ISP_IOMEM_HIST, ISPHIST_PCR);
++ isp_reg_writel(hist_regs.reg_cnt, OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT);
++ isp_reg_writel(hist_regs.reg_wb_gain, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_WB_GAIN);
++ isp_reg_writel(hist_regs.reg_r0_h, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R0_HORZ);
++ isp_reg_writel(hist_regs.reg_r0_v, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R0_VERT);
++ isp_reg_writel(hist_regs.reg_r1_h, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R1_HORZ);
++ isp_reg_writel(hist_regs.reg_r1_v, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R1_VERT);
++ isp_reg_writel(hist_regs.reg_r2_h, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R2_HORZ);
++ isp_reg_writel(hist_regs.reg_r2_v, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R2_VERT);
++ isp_reg_writel(hist_regs.reg_r3_h, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R3_HORZ);
++ isp_reg_writel(hist_regs.reg_r3_v, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_R3_VERT);
++ isp_reg_writel(hist_regs.reg_hist_addr, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_ADDR);
++ isp_reg_writel(hist_regs.reg_hist_data, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_DATA);
++ isp_reg_writel(hist_regs.reg_hist_radd, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_RADD);
++ isp_reg_writel(hist_regs.reg_hist_radd_off, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_RADD_OFF);
++ isp_reg_writel(hist_regs.reg_h_v_info, OMAP3_ISP_IOMEM_HIST,
++ ISPHIST_H_V_INFO);
++}
++
++/**
++ * isp_hist_isr - Callback from ISP driver for HIST interrupt.
++ * @status: IRQ0STATUS in case of MMU error, 0 for hist interrupt.
++ * arg1 and arg2 Not used as of now.
++ **/
++static void isp_hist_isr(unsigned long status, isp_vbq_callback_ptr arg1,
++ void *arg2)
++{
++ isp_hist_enable(0);
++
++ if (!(status & HIST_DONE))
++ return;
++
++ if (!histstat.completed) {
++ if (histstat.frame_req == histstat.frame_cnt) {
++ histstat.frame_cnt = 0;
++ histstat.frame_req = 0;
++ histstat.completed = 1;
++ } else {
++ isp_hist_enable(1);
++ histstat.frame_cnt++;
++ }
++ }
++}
++
++/**
++ * isp_hist_reset_mem - clear Histogram memory before start stats engine.
++ *
++ * Returns 0 after histogram memory was cleared.
++ **/
++static int isp_hist_reset_mem(void)
++{
++ int i;
++
++ isp_reg_or(OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT, ISPHIST_CNT_CLR_EN);
++
++ for (i = 0; i < HIST_MEM_SIZE; i++)
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_DATA);
++
++ isp_reg_and(OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT, ~ISPHIST_CNT_CLR_EN);
++
++ return 0;
++}
++
++/**
++ * isp_hist_set_params - Helper function to check and store user given params.
++ * @user_cfg: Pointer to user configuration structure.
++ *
++ * Returns 0 on success configuration.
++ **/
++static int isp_hist_set_params(struct isp_hist_config *user_cfg)
++{
++
++ int reg_num = 0;
++ int bit_shift = 0;
++
++
++ if (isp_hist_busy())
++ return -EINVAL;
++
++ if (user_cfg->input_bit_width > MIN_BIT_WIDTH)
++ WRITE_DATA_SIZE(hist_regs.reg_cnt, 0);
++ else
++ WRITE_DATA_SIZE(hist_regs.reg_cnt, 1);
++
++ WRITE_SOURCE(hist_regs.reg_cnt, user_cfg->hist_source);
++
++ if (user_cfg->hist_source) {
++ WRITE_HV_INFO(hist_regs.reg_h_v_info, user_cfg->hist_h_v_info);
++
++ if ((user_cfg->hist_radd & ISP_32B_BOUNDARY_BUF) ==
++ user_cfg->hist_radd) {
++ WRITE_RADD(hist_regs.reg_hist_radd,
++ user_cfg->hist_radd);
++ } else {
++ printk(KERN_ERR "Address should be in 32 byte boundary"
++ "\n");
++ return -EINVAL;
++ }
++
++ if ((user_cfg->hist_radd_off & ISP_32B_BOUNDARY_OFFSET) ==
++ user_cfg->hist_radd_off) {
++ WRITE_RADD_OFF(hist_regs.reg_hist_radd_off,
++ user_cfg->hist_radd_off);
++ } else {
++ printk(KERN_ERR "Offset should be in 32 byte boundary"
++ "\n");
++ return -EINVAL;
++ }
++
++ }
++
++ isp_hist_reset_mem();
++ DPRINTK_ISPHIST("ISPHIST: Memory Cleared\n");
++ histstat.frame_req = user_cfg->hist_frames;
++
++ if (unlikely(user_cfg->wb_gain_R > MAX_WB_GAIN ||
++ user_cfg->wb_gain_RG > MAX_WB_GAIN ||
++ user_cfg->wb_gain_B > MAX_WB_GAIN ||
++ user_cfg->wb_gain_BG > MAX_WB_GAIN)) {
++ printk(KERN_ERR "Invalid WB gain\n");
++ return -EINVAL;
++ } else {
++ WRITE_WB_R(hist_regs.reg_wb_gain, user_cfg->wb_gain_R);
++ WRITE_WB_RG(hist_regs.reg_wb_gain, user_cfg->wb_gain_RG);
++ WRITE_WB_B(hist_regs.reg_wb_gain, user_cfg->wb_gain_B);
++ WRITE_WB_BG(hist_regs.reg_wb_gain, user_cfg->wb_gain_BG);
++ }
++
++ /* Regions size and position */
++
++ if (user_cfg->num_regions > MAX_REGIONS)
++ return -EINVAL;
++
++ if (likely((user_cfg->reg0_hor & ISPHIST_REGHORIZ_HEND_MASK) -
++ ((user_cfg->reg0_hor & ISPHIST_REGHORIZ_HSTART_MASK) >>
++ ISPHIST_REGHORIZ_HSTART_SHIFT))) {
++ WRITE_REG_HORIZ(hist_regs.reg_r0_h, user_cfg->reg0_hor);
++ reg_num++;
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++
++ if (likely((user_cfg->reg0_ver & ISPHIST_REGVERT_VEND_MASK) -
++ ((user_cfg->reg0_ver & ISPHIST_REGVERT_VSTART_MASK) >>
++ ISPHIST_REGVERT_VSTART_SHIFT))) {
++ WRITE_REG_VERT(hist_regs.reg_r0_v, user_cfg->reg0_ver);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++
++ if (user_cfg->num_regions >= 1) {
++ if (likely((user_cfg->reg1_hor & ISPHIST_REGHORIZ_HEND_MASK) -
++ ((user_cfg->reg1_hor &
++ ISPHIST_REGHORIZ_HSTART_MASK) >>
++ ISPHIST_REGHORIZ_HSTART_SHIFT))) {
++ WRITE_REG_HORIZ(hist_regs.reg_r1_h, user_cfg->reg1_hor);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++
++ if (likely((user_cfg->reg1_ver & ISPHIST_REGVERT_VEND_MASK) -
++ ((user_cfg->reg1_ver &
++ ISPHIST_REGVERT_VSTART_MASK) >>
++ ISPHIST_REGVERT_VSTART_SHIFT))) {
++ WRITE_REG_VERT(hist_regs.reg_r1_v, user_cfg->reg1_ver);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++ }
++
++ if (user_cfg->num_regions >= 2) {
++ if (likely((user_cfg->reg2_hor & ISPHIST_REGHORIZ_HEND_MASK) -
++ ((user_cfg->reg2_hor &
++ ISPHIST_REGHORIZ_HSTART_MASK) >>
++ ISPHIST_REGHORIZ_HSTART_SHIFT))) {
++ WRITE_REG_HORIZ(hist_regs.reg_r2_h, user_cfg->reg2_hor);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++
++ if (likely((user_cfg->reg2_ver & ISPHIST_REGVERT_VEND_MASK) -
++ ((user_cfg->reg2_ver &
++ ISPHIST_REGVERT_VSTART_MASK) >>
++ ISPHIST_REGVERT_VSTART_SHIFT))) {
++ WRITE_REG_VERT(hist_regs.reg_r2_v, user_cfg->reg2_ver);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++ }
++
++ if (user_cfg->num_regions >= 3) {
++ if (likely((user_cfg->reg3_hor & ISPHIST_REGHORIZ_HEND_MASK) -
++ ((user_cfg->reg3_hor &
++ ISPHIST_REGHORIZ_HSTART_MASK) >>
++ ISPHIST_REGHORIZ_HSTART_SHIFT))) {
++ WRITE_REG_HORIZ(hist_regs.reg_r3_h, user_cfg->reg3_hor);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++
++ if (likely((user_cfg->reg3_ver & ISPHIST_REGVERT_VEND_MASK) -
++ ((user_cfg->reg3_ver &
++ ISPHIST_REGVERT_VSTART_MASK) >>
++ ISPHIST_REGVERT_VSTART_SHIFT))) {
++ WRITE_REG_VERT(hist_regs.reg_r3_v, user_cfg->reg3_ver);
++ } else {
++ printk(KERN_ERR "Invalid Region parameters\n");
++ return -EINVAL;
++ }
++ }
++ reg_num = user_cfg->num_regions;
++ if (unlikely(((user_cfg->hist_bins > BINS_256) &&
++ (user_cfg->hist_bins != BINS_32)) ||
++ ((user_cfg->hist_bins == BINS_256) &&
++ reg_num != 0) || ((user_cfg->hist_bins ==
++ BINS_128) && reg_num >= 2))) {
++ printk(KERN_ERR "Invalid Bins Number: %d\n",
++ user_cfg->hist_bins);
++ return -EINVAL;
++ } else {
++ WRITE_NUM_BINS(hist_regs.reg_cnt, user_cfg->hist_bins);
++ }
++
++ if (user_cfg->input_bit_width > MAX_BIT_WIDTH ||
++ user_cfg->input_bit_width < MIN_BIT_WIDTH) {
++ printk(KERN_ERR "Invalid Bit Width: %d\n",
++ user_cfg->input_bit_width);
++ return -EINVAL;
++ } else {
++ switch (user_cfg->hist_bins) {
++ case BINS_256:
++ bit_shift = user_cfg->input_bit_width - 8;
++ break;
++ case BINS_128:
++ bit_shift = user_cfg->input_bit_width - 7;
++ break;
++ case BINS_64:
++ bit_shift = user_cfg->input_bit_width - 6;
++ break;
++ case BINS_32:
++ bit_shift = user_cfg->input_bit_width - 5;
++ break;
++ default:
++ return -EINVAL;
++ }
++ WRITE_BIT_SHIFT(hist_regs.reg_cnt, bit_shift);
++ }
++
++ isp_hist_update_regs();
++ histstat.initialized = 1;
++
++ return 0;
++}
++
++/**
++ * isp_hist_configure - API to configure HIST registers.
++ * @histcfg: Pointer to user configuration structure.
++ *
++ * Returns 0 on success configuration.
++ **/
++int isp_hist_configure(struct isp_hist_config *histcfg)
++{
++
++ int ret = 0;
++
++ if (NULL == histcfg) {
++ printk(KERN_ERR "Null argument in configuration. \n");
++ return -EINVAL;
++ }
++
++ if (!histstat.initialized) {
++ DPRINTK_ISPHIST("Setting callback for HISTOGRAM\n");
++ ret = isp_set_callback(CBK_HIST_DONE, isp_hist_isr,
++ (void *)NULL, (void *)NULL);
++ if (ret) {
++ printk(KERN_ERR "No callback for HIST\n");
++ return ret;
++ }
++ }
++
++ ret = isp_hist_set_params(histcfg);
++ if (ret) {
++ printk(KERN_ERR "Invalid parameters! \n");
++ return ret;
++ }
++
++ histstat.frame_cnt = 0;
++ histstat.completed = 0;
++ isp_hist_enable(1);
++ isp_hist_print_status();
++
++ return 0;
++}
++EXPORT_SYMBOL(isp_hist_configure);
++
++/**
++ * isp_hist_request_statistics - Request statistics in Histogram.
++ * @histdata: Pointer to data structure.
++ *
++ * This API allows the user to request for histogram statistics.
++ *
++ * Returns 0 on successful request.
++ **/
++int isp_hist_request_statistics(struct isp_hist_data *histdata)
++{
++ int i, ret;
++ u32 curr;
++
++ if (isp_hist_busy())
++ return -EBUSY;
++
++ if (!histstat.completed && histstat.initialized)
++ return -EINVAL;
++
++ isp_reg_or(OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT, ISPHIST_CNT_CLR_EN);
++
++ for (i = 0; i < HIST_MEM_SIZE; i++) {
++ curr = isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_DATA);
++ ret = put_user(curr, histdata->hist_statistics_buf + i);
++ if (ret) {
++ printk(KERN_ERR "Failed copy_to_user for "
++ "HIST stats buff, %d\n", ret);
++ }
++ }
++
++ isp_reg_and(OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT,
++ ~ISPHIST_CNT_CLR_EN);
++ histstat.completed = 0;
++ return 0;
++}
++EXPORT_SYMBOL(isp_hist_request_statistics);
++
++/**
++ * isp_hist_init - Module Initialization.
++ *
++ * Returns 0 if successful.
++ **/
++int __init isp_hist_init(void)
++{
++ memset(&histstat, 0, sizeof(histstat));
++ memset(&hist_regs, 0, sizeof(hist_regs));
++
++ return 0;
++}
++
++/**
++ * isp_hist_cleanup - Module cleanup.
++ **/
++void isp_hist_cleanup(void)
++{
++ memset(&histstat, 0, sizeof(histstat));
++ memset(&hist_regs, 0, sizeof(hist_regs));
++}
++
++/**
++ * isphist_save_context - Saves the values of the histogram module registers.
++ **/
++void isphist_save_context(void)
++{
++ DPRINTK_ISPHIST(" Saving context\n");
++ isp_save_context(isphist_reg_list);
++}
++EXPORT_SYMBOL(isphist_save_context);
++
++/**
++ * isphist_restore_context - Restores the values of the histogram module regs.
++ **/
++void isphist_restore_context(void)
++{
++ DPRINTK_ISPHIST(" Restoring context\n");
++ isp_restore_context(isphist_reg_list);
++}
++EXPORT_SYMBOL(isphist_restore_context);
++
++/**
++ * isp_hist_print_status - Debug print
++ **/
++static void isp_hist_print_status(void)
++{
++ DPRINTK_ISPHIST("ISPHIST_PCR = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_PCR));
++ DPRINTK_ISPHIST("ISPHIST_CNT = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_CNT));
++ DPRINTK_ISPHIST("ISPHIST_WB_GAIN = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_WB_GAIN));
++ DPRINTK_ISPHIST("ISPHIST_R0_HORZ = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R0_HORZ));
++ DPRINTK_ISPHIST("ISPHIST_R0_VERT = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R0_VERT));
++ DPRINTK_ISPHIST("ISPHIST_R1_HORZ = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R1_HORZ));
++ DPRINTK_ISPHIST("ISPHIST_R1_VERT = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R1_VERT));
++ DPRINTK_ISPHIST("ISPHIST_R2_HORZ = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R2_HORZ));
++ DPRINTK_ISPHIST("ISPHIST_R2_VERT = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R2_VERT));
++ DPRINTK_ISPHIST("ISPHIST_R3_HORZ = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R3_HORZ));
++ DPRINTK_ISPHIST("ISPHIST_R3_VERT = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_R3_VERT));
++ DPRINTK_ISPHIST("ISPHIST_ADDR = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_ADDR));
++ DPRINTK_ISPHIST("ISPHIST_RADD = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_RADD));
++ DPRINTK_ISPHIST("ISPHIST_RADD_OFF = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_RADD_OFF));
++ DPRINTK_ISPHIST("ISPHIST_H_V_INFO = 0x%08x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_HIST, ISPHIST_H_V_INFO));
++}
+diff --git a/drivers/media/video/isp/isphist.h b/drivers/media/video/isp/isphist.h
+new file mode 100644
+index 0000000..6b17c4e
+--- /dev/null
++++ b/drivers/media/video/isp/isphist.h
+@@ -0,0 +1,105 @@
++/*
++ * isphist.h
++ *
++ * Header file for HISTOGRAM module in TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_HIST_H
++#define OMAP_ISP_HIST_H
++
++#include <mach/isp_user.h>
++
++#define MAX_REGIONS 0x4
++#define MAX_WB_GAIN 255
++#define MIN_WB_GAIN 0x0
++#define MAX_BIT_WIDTH 14
++#define MIN_BIT_WIDTH 8
++
++#define ISPHIST_PCR_EN (1 << 0)
++#define HIST_MEM_SIZE 1024
++#define ISPHIST_CNT_CLR_EN (1 << 7)
++
++#define WRITE_SOURCE(reg, source) \
++ (reg = (reg & ~(ISPHIST_CNT_SOURCE_MASK)) \
++ | (source << ISPHIST_CNT_SOURCE_SHIFT))
++
++#define WRITE_HV_INFO(reg, hv_info) \
++ (reg = ((reg & ~(ISPHIST_HV_INFO_MASK)) \
++ | (hv_info & ISPHIST_HV_INFO_MASK)))
++
++#define WRITE_RADD(reg, radd) \
++ (reg = (reg & ~(ISPHIST_RADD_MASK)) \
++ | (radd << ISPHIST_RADD_SHIFT))
++
++#define WRITE_RADD_OFF(reg, radd_off) \
++ (reg = (reg & ~(ISPHIST_RADD_OFF_MASK)) \
++ | (radd_off << ISPHIST_RADD_OFF_SHIFT))
++
++#define WRITE_BIT_SHIFT(reg, bit_shift) \
++ (reg = (reg & ~(ISPHIST_CNT_SHIFT_MASK)) \
++ | (bit_shift << ISPHIST_CNT_SHIFT_SHIFT))
++
++#define WRITE_DATA_SIZE(reg, data_size) \
++ (reg = (reg & ~(ISPHIST_CNT_DATASIZE_MASK)) \
++ | (data_size << ISPHIST_CNT_DATASIZE_SHIFT))
++
++#define WRITE_NUM_BINS(reg, num_bins) \
++ (reg = (reg & ~(ISPHIST_CNT_BINS_MASK)) \
++ | (num_bins << ISPHIST_CNT_BINS_SHIFT))
++
++#define WRITE_WB_R(reg, reg_wb_gain) \
++ reg = ((reg & ~(ISPHIST_WB_GAIN_WG00_MASK)) \
++ | (reg_wb_gain << ISPHIST_WB_GAIN_WG00_SHIFT))
++
++#define WRITE_WB_RG(reg, reg_wb_gain) \
++ (reg = (reg & ~(ISPHIST_WB_GAIN_WG01_MASK)) \
++ | (reg_wb_gain << ISPHIST_WB_GAIN_WG01_SHIFT))
++
++#define WRITE_WB_B(reg, reg_wb_gain) \
++ (reg = (reg & ~(ISPHIST_WB_GAIN_WG02_MASK)) \
++ | (reg_wb_gain << ISPHIST_WB_GAIN_WG02_SHIFT))
++
++#define WRITE_WB_BG(reg, reg_wb_gain) \
++ (reg = (reg & ~(ISPHIST_WB_GAIN_WG03_MASK)) \
++ | (reg_wb_gain << ISPHIST_WB_GAIN_WG03_SHIFT))
++
++#define WRITE_REG_HORIZ(reg, reg_n_hor) \
++ (reg = ((reg & ~ISPHIST_REGHORIZ_MASK) \
++ | (reg_n_hor & ISPHIST_REGHORIZ_MASK)))
++
++#define WRITE_REG_VERT(reg, reg_n_vert) \
++ (reg = ((reg & ~ISPHIST_REGVERT_MASK) \
++ | (reg_n_vert & ISPHIST_REGVERT_MASK)))
++
++
++void isp_hist_enable(u8 enable);
++
++int isp_hist_busy(void);
++
++int isp_hist_configure(struct isp_hist_config *histcfg);
++
++int isp_hist_request_statistics(struct isp_hist_data *histdata);
++
++void isphist_save_context(void);
++
++void isp_hist_suspend(void);
++
++void isp_hist_resume(void);
++
++void isphist_restore_context(void);
++
++#endif /* OMAP_ISP_HIST */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0007-omap3isp-Add-CSI2-interface-support.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0007-omap3isp-Add-CSI2-interface-support.patch
new file mode 100644
index 0000000000..842f395388
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0007-omap3isp-Add-CSI2-interface-support.patch
@@ -0,0 +1,2384 @@
+From 9fbe7b786427d981cac890a7407da09232f5d1e2 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add CSI2 interface support
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/isp/ispcsi2.c | 2124 +++++++++++++++++++++++++++++++++++++
+ drivers/media/video/isp/ispcsi2.h | 232 ++++
+ 2 files changed, 2356 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/ispcsi2.c
+ create mode 100644 drivers/media/video/isp/ispcsi2.h
+
+diff --git a/drivers/media/video/isp/ispcsi2.c b/drivers/media/video/isp/ispcsi2.c
+new file mode 100644
+index 0000000..5141b5a
+--- /dev/null
++++ b/drivers/media/video/isp/ispcsi2.c
+@@ -0,0 +1,2124 @@
++/*
++ * ispcsi2.c
++ *
++ * Driver Library for ISP CSI Control module in TI's OMAP3 Camera ISP
++ * ISP CSI interface and IRQ related APIs are defined here.
++ *
++ * Copyright (C) 2009 Texas Instruments.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Dominic Curran <dcurran@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <linux/delay.h>
++#include <media/v4l2-common.h>
++
++#include "isp.h"
++#include "ispreg.h"
++#include "ispcsi2.h"
++
++static struct isp_csi2_cfg current_csi2_cfg;
++static struct isp_csi2_cfg_update current_csi2_cfg_update;
++
++static bool update_complexio_cfg1;
++static bool update_phy_cfg0;
++static bool update_phy_cfg1;
++static bool update_ctx_ctrl1[8];
++static bool update_ctx_ctrl2[8];
++static bool update_ctx_ctrl3[8];
++static bool update_timing;
++static bool update_ctrl;
++static bool uses_videoport;
++
++/**
++ * isp_csi2_complexio_lanes_config - Configuration of CSI2 ComplexIO lanes.
++ * @reqcfg: Pointer to structure containing desired lane configuration
++ *
++ * Validates and saves to internal driver memory the passed configuration.
++ * Returns 0 if successful, or -EINVAL if null pointer is passed, invalid
++ * lane position or polarity is set, and if 2 lanes try to occupy the same
++ * position. To apply this settings, use the isp_csi2_complexio_lanes_update()
++ * function just after calling this function.
++ **/
++int isp_csi2_complexio_lanes_config(struct isp_csi2_lanes_cfg *reqcfg)
++{
++ int i;
++ bool pos_occupied[5] = {false, false, false, false, false};
++ struct isp_csi2_lanes_cfg *currlanes = &current_csi2_cfg.lanes;
++ struct isp_csi2_lanes_cfg_update *currlanes_u =
++ &current_csi2_cfg_update.lanes;
++
++ /* Validating parameters sent by driver */
++ if (reqcfg == NULL) {
++ printk(KERN_ERR "Invalid Complex IO Configuration sent by"
++ " sensor\n");
++ goto err_einval;
++ }
++
++ /* Data lanes verification */
++ for (i = 0; i < 4; i++) {
++ if ((reqcfg->data[i].pol > 1) || (reqcfg->data[i].pos > 5)) {
++ printk(KERN_ERR "Invalid CSI-2 Complex IO configuration"
++ " parameters for data lane #%d\n", i);
++ goto err_einval;
++ }
++ if (pos_occupied[reqcfg->data[i].pos - 1] &&
++ reqcfg->data[i].pos > 0) {
++ printk(KERN_ERR "Lane #%d already occupied\n",
++ reqcfg->data[i].pos);
++ goto err_einval;
++ } else
++ pos_occupied[reqcfg->data[i].pos - 1] = true;
++ }
++
++ /* Clock lane verification */
++ if ((reqcfg->clk.pol > 1) || (reqcfg->clk.pos > 5) ||
++ (reqcfg->clk.pos == 0)) {
++ printk(KERN_ERR "Invalid CSI-2 Complex IO configuration"
++ " parameters for clock lane\n");
++ goto err_einval;
++ }
++ if (pos_occupied[reqcfg->clk.pos - 1]) {
++ printk(KERN_ERR "Lane #%d already occupied",
++ reqcfg->clk.pos);
++ goto err_einval;
++ } else
++ pos_occupied[reqcfg->clk.pos - 1] = true;
++
++ for (i = 0; i < 4; i++) {
++ if (currlanes->data[i].pos != reqcfg->data[i].pos) {
++ currlanes->data[i].pos = reqcfg->data[i].pos;
++ currlanes_u->data[i] = true;
++ update_complexio_cfg1 = true;
++ }
++ if (currlanes->data[i].pol != reqcfg->data[i].pol) {
++ currlanes->data[i].pol = reqcfg->data[i].pol;
++ currlanes_u->data[i] = true;
++ update_complexio_cfg1 = true;
++ }
++ }
++
++ if (currlanes->clk.pos != reqcfg->clk.pos) {
++ currlanes->clk.pos = reqcfg->clk.pos;
++ currlanes_u->clk = true;
++ update_complexio_cfg1 = true;
++ }
++ if (currlanes->clk.pol != reqcfg->clk.pol) {
++ currlanes->clk.pol = reqcfg->clk.pol;
++ currlanes_u->clk = true;
++ update_complexio_cfg1 = true;
++ }
++ return 0;
++err_einval:
++ return -EINVAL;
++}
++
++/**
++ * isp_csi2_complexio_lanes_update - Applies CSI2 ComplexIO lanes configuration.
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_complexio_lanes_config() function.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_complexio_lanes_config() function, unless the force_update flag is
++ * set to true.
++ * Always returns 0.
++ **/
++int isp_csi2_complexio_lanes_update(bool force_update)
++{
++ struct isp_csi2_lanes_cfg *currlanes = &current_csi2_cfg.lanes;
++ struct isp_csi2_lanes_cfg_update *currlanes_u =
++ &current_csi2_cfg_update.lanes;
++ u32 reg;
++ int i;
++
++ if (!update_complexio_cfg1 && !force_update)
++ return 0;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1);
++ for (i = 0; i < 4; i++) {
++ if (currlanes_u->data[i] || force_update) {
++ reg &= ~(ISPCSI2_COMPLEXIO_CFG1_DATA_POL_MASK(i + 1) |
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_MASK(i +
++ 1));
++ reg |= (currlanes->data[i].pol <<
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POL_SHIFT(i + 1));
++ reg |= (currlanes->data[i].pos <<
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(i +
++ 1));
++ currlanes_u->data[i] = false;
++ }
++ }
++
++ if (currlanes_u->clk || force_update) {
++ reg &= ~(ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_MASK |
++ ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_MASK);
++ reg |= (currlanes->clk.pol <<
++ ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_SHIFT);
++ reg |= (currlanes->clk.pos <<
++ ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT);
++ currlanes_u->clk = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1);
++
++ update_complexio_cfg1 = false;
++ return 0;
++}
++
++/**
++ * isp_csi2_complexio_lanes_get - Gets CSI2 ComplexIO lanes configuration.
++ *
++ * Gets settings from HW registers and fills in the internal driver memory
++ * Always returns 0.
++ **/
++int isp_csi2_complexio_lanes_get(void)
++{
++ struct isp_csi2_lanes_cfg *currlanes = &current_csi2_cfg.lanes;
++ struct isp_csi2_lanes_cfg_update *currlanes_u =
++ &current_csi2_cfg_update.lanes;
++ u32 reg;
++ int i;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1);
++ for (i = 0; i < 4; i++) {
++ currlanes->data[i].pol = (reg &
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POL_MASK(i + 1)) >>
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POL_SHIFT(i + 1);
++ currlanes->data[i].pos = (reg &
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_MASK(i + 1)) >>
++ ISPCSI2_COMPLEXIO_CFG1_DATA_POSITION_SHIFT(i + 1);
++ currlanes_u->data[i] = false;
++ }
++ currlanes->clk.pol = (reg & ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_MASK) >>
++ ISPCSI2_COMPLEXIO_CFG1_CLOCK_POL_SHIFT;
++ currlanes->clk.pos = (reg &
++ ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_MASK) >>
++ ISPCSI2_COMPLEXIO_CFG1_CLOCK_POSITION_SHIFT;
++ currlanes_u->clk = false;
++
++ update_complexio_cfg1 = false;
++ return 0;
++}
++
++/**
++ * isp_csi2_complexio_power_status - Gets CSI2 ComplexIO power status.
++ *
++ * Returns 3 possible valid states: ISP_CSI2_POWER_OFF, ISP_CSI2_POWER_ON,
++ * and ISP_CSI2_POWER_ULPW.
++ **/
++static enum isp_csi2_power_cmds isp_csi2_complexio_power_status(void)
++{
++ enum isp_csi2_power_cmds ret;
++ u32 reg;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1) &
++ ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_MASK;
++ switch (reg) {
++ case ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_OFF:
++ ret = ISP_CSI2_POWER_OFF;
++ break;
++ case ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_ON:
++ ret = ISP_CSI2_POWER_ON;
++ break;
++ case ISPCSI2_COMPLEXIO_CFG1_PWR_STATUS_ULPW:
++ ret = ISP_CSI2_POWER_ULPW;
++ break;
++ default:
++ return -EINVAL;
++ }
++ return ret;
++}
++
++/**
++ * isp_csi2_complexio_power_autoswitch - Sets CSI2 ComplexIO power autoswitch.
++ * @enable: Sets or clears the autoswitch function enable flag.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_complexio_power_autoswitch(bool enable)
++{
++ u32 reg;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1);
++ reg &= ~ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_MASK;
++
++ if (enable)
++ reg |= ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_ENABLE;
++ else
++ reg |= ISPCSI2_COMPLEXIO_CFG1_PWR_AUTO_DISABLE;
++
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1);
++ return 0;
++}
++
++/**
++ * isp_csi2_complexio_power - Sets the desired power command for CSI2 ComplexIO.
++ * @power_cmd: Power command to be set.
++ *
++ * Returns 0 if successful, or -EBUSY if the retry count is exceeded.
++ **/
++int isp_csi2_complexio_power(enum isp_csi2_power_cmds power_cmd)
++{
++ enum isp_csi2_power_cmds current_state;
++ u32 reg;
++ u8 retry_count;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1) &
++ ~ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_MASK;
++ switch (power_cmd) {
++ case ISP_CSI2_POWER_OFF:
++ reg |= ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_OFF;
++ break;
++ case ISP_CSI2_POWER_ON:
++ reg |= ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_ON;
++ break;
++ case ISP_CSI2_POWER_ULPW:
++ reg |= ISPCSI2_COMPLEXIO_CFG1_PWR_CMD_ULPW;
++ break;
++ default:
++ printk(KERN_ERR "CSI2: ERROR - Wrong Power command!\n");
++ return -EINVAL;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_COMPLEXIO_CFG1);
++
++ retry_count = 0;
++ do {
++ udelay(50);
++ current_state = isp_csi2_complexio_power_status();
++
++ if (current_state != power_cmd) {
++ printk(KERN_DEBUG "CSI2: Complex IO power command not"
++ " yet taken.");
++ if (++retry_count < 100) {
++ printk(KERN_DEBUG " Retrying...\n");
++ udelay(50);
++ } else {
++ printk(KERN_DEBUG " Retry count exceeded!\n");
++ }
++ }
++ } while ((current_state != power_cmd) && (retry_count < 100));
++
++ if (retry_count == 100)
++ return -EBUSY;
++
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_frame_mode - Configure if_en behaviour for CSI2
++ * @frame_mode: Desired action for IF_EN switch off. 0 - disable IF immediately
++ * 1 - disable after all Frame end Code is received in all
++ * contexts.
++ *
++ * Validates and saves to internal driver memory the passed configuration.
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_frame_mode(enum isp_csi2_frame_mode frame_mode)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->frame_mode != frame_mode) {
++ currctrl->frame_mode = frame_mode;
++ currctrl_u->frame_mode = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_vp_clk_enable - Enables/disables CSI2 Videoport clock.
++ * @vp_clk_enable: Boolean value to specify the Videoport clock state.
++ *
++ * Validates and saves to internal driver memory the passed configuration.
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_vp_clk_enable(bool vp_clk_enable)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->vp_clk_enable != vp_clk_enable) {
++ currctrl->vp_clk_enable = vp_clk_enable;
++ currctrl_u->vp_clk_enable = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_vp_only_enable - Sets CSI2 Videoport clock as exclusive
++ * @vp_only_enable: Boolean value to specify if the Videoport clock is
++ * exclusive, setting the OCP port as disabled.
++ *
++ * Validates and saves to internal driver memory the passed configuration.
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_vp_only_enable(bool vp_only_enable)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->vp_only_enable != vp_only_enable) {
++ currctrl->vp_only_enable = vp_only_enable;
++ currctrl_u->vp_only_enable = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_vp_out_ctrl - Sets CSI2 Videoport clock divider
++ * @vp_out_ctrl: Divider value for setting videoport clock frequency based on
++ * OCP port frequency, valid dividers are between 1 and 4.
++ *
++ * Validates and saves to internal driver memory the passed configuration.
++ * Returns 0 if successful, or -EINVAL if wrong divider value is passed.
++ **/
++int isp_csi2_ctrl_config_vp_out_ctrl(u8 vp_out_ctrl)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if ((vp_out_ctrl == 0) || (vp_out_ctrl > 4)) {
++ printk(KERN_ERR "CSI2: Wrong divisor value. Must be between"
++ " 1 and 4");
++ return -EINVAL;
++ }
++
++ if (currctrl->vp_out_ctrl != vp_out_ctrl) {
++ currctrl->vp_out_ctrl = vp_out_ctrl;
++ currctrl_u->vp_out_ctrl = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_debug_enable - Sets CSI2 debug
++ * @debug_enable: Boolean for setting debug configuration on CSI2.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_debug_enable(bool debug_enable)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->debug_enable != debug_enable) {
++ currctrl->debug_enable = debug_enable;
++ currctrl_u->debug_enable = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_burst_size - Sets CSI2 burst size.
++ * @burst_size: Burst size of the memory saving capability of receiver.
++ *
++ * Returns 0 if successful, or -EINVAL if burst size is wrong.
++ **/
++int isp_csi2_ctrl_config_burst_size(u8 burst_size)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++ if (burst_size > 3) {
++ printk(KERN_ERR "CSI2: Wrong burst size. Must be between"
++ " 0 and 3");
++ return -EINVAL;
++ }
++
++ if (currctrl->burst_size != burst_size) {
++ currctrl->burst_size = burst_size;
++ currctrl_u->burst_size = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_ecc_enable - Enables ECC on CSI2 Receiver
++ * @ecc_enable: Boolean to enable/disable the CSI2 receiver ECC handling.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_ecc_enable(bool ecc_enable)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->ecc_enable != ecc_enable) {
++ currctrl->ecc_enable = ecc_enable;
++ currctrl_u->ecc_enable = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_ecc_enable - Enables ECC on CSI2 Receiver
++ * @ecc_enable: Boolean to enable/disable the CSI2 receiver ECC handling.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_secure_mode(bool secure_mode)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->secure_mode != secure_mode) {
++ currctrl->secure_mode = secure_mode;
++ currctrl_u->secure_mode = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_config_if_enable - Enables CSI2 Receiver interface.
++ * @if_enable: Boolean to enable/disable the CSI2 receiver interface.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_config_if_enable(bool if_enable)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++
++ if (currctrl->if_enable != if_enable) {
++ currctrl->if_enable = if_enable;
++ currctrl_u->if_enable = true;
++ update_ctrl = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_update - Applies CSI2 control configuration.
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_ctrl_config_*() functions.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_ctrl_config_*() functions, unless the force_update flag is
++ * set to true.
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_update(bool force_update)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++ u32 reg;
++
++ if (update_ctrl || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_CTRL);
++ if (currctrl_u->frame_mode || force_update) {
++ reg &= ~ISPCSI2_CTRL_FRAME_MASK;
++ if (currctrl->frame_mode)
++ reg |= ISPCSI2_CTRL_FRAME_DISABLE_FEC;
++ else
++ reg |= ISPCSI2_CTRL_FRAME_DISABLE_IMM;
++ currctrl_u->frame_mode = false;
++ }
++ if (currctrl_u->vp_clk_enable || force_update) {
++ reg &= ~ISPCSI2_CTRL_VP_CLK_EN_MASK;
++ if (currctrl->vp_clk_enable)
++ reg |= ISPCSI2_CTRL_VP_CLK_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTRL_VP_CLK_EN_DISABLE;
++ currctrl_u->vp_clk_enable = false;
++ }
++ if (currctrl_u->vp_only_enable || force_update) {
++ reg &= ~ISPCSI2_CTRL_VP_ONLY_EN_MASK;
++ uses_videoport = currctrl->vp_only_enable;
++ if (currctrl->vp_only_enable)
++ reg |= ISPCSI2_CTRL_VP_ONLY_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTRL_VP_ONLY_EN_DISABLE;
++ currctrl_u->vp_only_enable = false;
++ }
++ if (currctrl_u->vp_out_ctrl || force_update) {
++ reg &= ~ISPCSI2_CTRL_VP_OUT_CTRL_MASK;
++ reg |= (currctrl->vp_out_ctrl - 1) <<
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT;
++ currctrl_u->vp_out_ctrl = false;
++ }
++ if (currctrl_u->debug_enable || force_update) {
++ reg &= ~ISPCSI2_CTRL_DBG_EN_MASK;
++ if (currctrl->debug_enable)
++ reg |= ISPCSI2_CTRL_DBG_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTRL_DBG_EN_DISABLE;
++ currctrl_u->debug_enable = false;
++ }
++ if (currctrl_u->burst_size || force_update) {
++ reg &= ~ISPCSI2_CTRL_BURST_SIZE_MASK;
++ reg |= currctrl->burst_size <<
++ ISPCSI2_CTRL_BURST_SIZE_SHIFT;
++ currctrl_u->burst_size = false;
++ }
++ if (currctrl_u->ecc_enable || force_update) {
++ reg &= ~ISPCSI2_CTRL_ECC_EN_MASK;
++ if (currctrl->ecc_enable)
++ reg |= ISPCSI2_CTRL_ECC_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTRL_ECC_EN_DISABLE;
++ currctrl_u->ecc_enable = false;
++ }
++ if (currctrl_u->secure_mode || force_update) {
++ reg &= ~ISPCSI2_CTRL_SECURE_MASK;
++ if (currctrl->secure_mode)
++ reg |= ISPCSI2_CTRL_SECURE_ENABLE;
++ else
++ reg |= ISPCSI2_CTRL_SECURE_DISABLE;
++ currctrl_u->secure_mode = false;
++ }
++ if (currctrl_u->if_enable || force_update) {
++ reg &= ~ISPCSI2_CTRL_IF_EN_MASK;
++ if (currctrl->if_enable)
++ reg |= ISPCSI2_CTRL_IF_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTRL_IF_EN_DISABLE;
++ currctrl_u->if_enable = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_CTRL);
++ update_ctrl = false;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctrl_get - Gets CSI2 control configuration
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctrl_get(void)
++{
++ struct isp_csi2_ctrl_cfg *currctrl = &current_csi2_cfg.ctrl;
++ struct isp_csi2_ctrl_cfg_update *currctrl_u =
++ &current_csi2_cfg_update.ctrl;
++ u32 reg;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_CTRL);
++ currctrl->frame_mode = (reg & ISPCSI2_CTRL_FRAME_MASK) >>
++ ISPCSI2_CTRL_FRAME_SHIFT;
++ currctrl_u->frame_mode = false;
++
++ if ((reg & ISPCSI2_CTRL_VP_CLK_EN_MASK) ==
++ ISPCSI2_CTRL_VP_CLK_EN_ENABLE)
++ currctrl->vp_clk_enable = true;
++ else
++ currctrl->vp_clk_enable = false;
++ currctrl_u->vp_clk_enable = false;
++
++ if ((reg & ISPCSI2_CTRL_VP_ONLY_EN_MASK) ==
++ ISPCSI2_CTRL_VP_ONLY_EN_ENABLE)
++ currctrl->vp_only_enable = true;
++ else
++ currctrl->vp_only_enable = false;
++ uses_videoport = currctrl->vp_only_enable;
++ currctrl_u->vp_only_enable = false;
++
++ currctrl->vp_out_ctrl = ((reg & ISPCSI2_CTRL_VP_OUT_CTRL_MASK) >>
++ ISPCSI2_CTRL_VP_OUT_CTRL_SHIFT) + 1;
++ currctrl_u->vp_out_ctrl = false;
++
++ if ((reg & ISPCSI2_CTRL_DBG_EN_MASK) == ISPCSI2_CTRL_DBG_EN_ENABLE)
++ currctrl->debug_enable = true;
++ else
++ currctrl->debug_enable = false;
++ currctrl_u->debug_enable = false;
++
++ currctrl->burst_size = (reg & ISPCSI2_CTRL_BURST_SIZE_MASK) >>
++ ISPCSI2_CTRL_BURST_SIZE_SHIFT;
++ currctrl_u->burst_size = false;
++
++ if ((reg & ISPCSI2_CTRL_ECC_EN_MASK) == ISPCSI2_CTRL_ECC_EN_ENABLE)
++ currctrl->ecc_enable = true;
++ else
++ currctrl->ecc_enable = false;
++ currctrl_u->ecc_enable = false;
++
++ if ((reg & ISPCSI2_CTRL_SECURE_MASK) == ISPCSI2_CTRL_SECURE_ENABLE)
++ currctrl->secure_mode = true;
++ else
++ currctrl->secure_mode = false;
++ currctrl_u->secure_mode = false;
++
++ if ((reg & ISPCSI2_CTRL_IF_EN_MASK) == ISPCSI2_CTRL_IF_EN_ENABLE)
++ currctrl->if_enable = true;
++ else
++ currctrl->if_enable = false;
++ currctrl_u->if_enable = false;
++
++ update_ctrl = false;
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_validate - Validates the context number value
++ * @ctxnum: Pointer to variable containing context number.
++ *
++ * If the value is not in range (3 bits), it is being ANDed with 0x7 to force
++ * it to be on range.
++ **/
++static void isp_csi2_ctx_validate(u8 *ctxnum)
++{
++ if (*ctxnum > 7) {
++ printk(KERN_ERR "Invalid context number. Forcing valid"
++ " value...\n");
++ *ctxnum &= ~(0x7);
++ }
++}
++
++/**
++ * isp_csi2_ctx_config_virtual_id - Maps a virtual ID with a CSI2 Rx context
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @virtual_id: CSI2 Virtual ID to associate with specified context number.
++ *
++ * Returns 0 if successful, or -EINVAL if Virtual ID is not in range (0-3).
++ **/
++int isp_csi2_ctx_config_virtual_id(u8 ctxnum, u8 virtual_id)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ if (virtual_id > 3) {
++ printk(KERN_ERR "Wrong requested virtual_id\n");
++ return -EINVAL;
++ }
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->virtual_id != virtual_id) {
++ selected_ctx->virtual_id = virtual_id;
++ selected_ctx_u->virtual_id = true;
++ update_ctx_ctrl2[ctxnum] = true;
++ }
++
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_frame_count - Sets frame count to be received in CSI2 Rx.
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @frame_count: Number of frames to acquire.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_frame_count(u8 ctxnum, u8 frame_count)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->frame_count != frame_count) {
++ selected_ctx->frame_count = frame_count;
++ selected_ctx_u->frame_count = true;
++ update_ctx_ctrl1[ctxnum] = true;
++ }
++
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_format - Maps a pixel format to a specified context.
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @pixformat: V4L2 structure for pixel format.
++ *
++ * Returns 0 if successful, or -EINVAL if the format is not supported by the
++ * receiver.
++ **/
++int isp_csi2_ctx_config_format(u8 ctxnum, u32 pixformat)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++ struct v4l2_pix_format pix;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ pix.pixelformat = pixformat;
++ switch (pix.pixelformat) {
++ case V4L2_PIX_FMT_RGB565:
++ case V4L2_PIX_FMT_RGB565X:
++ case V4L2_PIX_FMT_YUYV:
++ case V4L2_PIX_FMT_UYVY:
++ case V4L2_PIX_FMT_RGB555:
++ case V4L2_PIX_FMT_RGB555X:
++ case V4L2_PIX_FMT_SGRBG10:
++ break;
++ default:
++ printk(KERN_ERR "Context config pixel format unsupported\n");
++ return -EINVAL;
++ }
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ selected_ctx->format = pix;
++ selected_ctx_u->format = true;
++ update_ctx_ctrl2[ctxnum] = true;
++
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_alpha - Sets the alpha value for pixel format
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @alpha: Alpha value.
++ *
++ * Returns 0 if successful, or -EINVAL if the alpha value is bigger than 16383.
++ **/
++int isp_csi2_ctx_config_alpha(u8 ctxnum, u16 alpha)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ if (alpha > 0x3FFF) {
++ printk(KERN_ERR "Wrong alpha value\n");
++ return -EINVAL;
++ }
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->alpha != alpha) {
++ selected_ctx->alpha = alpha;
++ selected_ctx_u->alpha = true;
++ update_ctx_ctrl3[ctxnum] = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_data_offset - Sets the offset between received lines
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @data_offset: Offset between first pixel of each 2 contiguous lines.
++ *
++ * Returns 0 if successful, or -EINVAL if the line offset is bigger than 1023.
++ **/
++int isp_csi2_ctx_config_data_offset(u8 ctxnum, u16 data_offset)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ if (data_offset > 0x3FF) {
++ printk(KERN_ERR "Wrong line offset\n");
++ return -EINVAL;
++ }
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->data_offset != data_offset) {
++ selected_ctx->data_offset = data_offset;
++ selected_ctx_u->data_offset = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_ping_addr - Sets Ping address for CSI2 Rx. buffer saving
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @ping_addr: 32 bit ISP MMU mapped address.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_ping_addr(u8 ctxnum, u32 ping_addr)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ ping_addr &= ~(0x1F);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->ping_addr != ping_addr) {
++ selected_ctx->ping_addr = ping_addr;
++ selected_ctx_u->ping_addr = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_pong_addr - Sets Pong address for CSI2 Rx. buffer saving
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @pong_addr: 32 bit ISP MMU mapped address.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_pong_addr(u8 ctxnum, u32 pong_addr)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ pong_addr &= ~(0x1F);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->pong_addr != pong_addr) {
++ selected_ctx->pong_addr = pong_addr;
++ selected_ctx_u->pong_addr = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_eof_enabled - Enables EOF signal assertion
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @eof_enabled: Boolean to enable/disable EOF signal assertion on received
++ * packets.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_eof_enabled(u8 ctxnum, bool eof_enabled)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->eof_enabled != eof_enabled) {
++ selected_ctx->eof_enabled = eof_enabled;
++ selected_ctx_u->eof_enabled = true;
++ update_ctx_ctrl1[ctxnum] = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_eol_enabled - Enables EOL signal assertion
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @eol_enabled: Boolean to enable/disable EOL signal assertion on received
++ * packets.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_eol_enabled(u8 ctxnum, bool eol_enabled)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->eol_enabled != eol_enabled) {
++ selected_ctx->eol_enabled = eol_enabled;
++ selected_ctx_u->eol_enabled = true;
++ update_ctx_ctrl1[ctxnum] = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_checksum_enabled - Enables Checksum check in rcvd packets
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @checksum_enabled: Boolean to enable/disable Checksum check on received
++ * packets
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_checksum_enabled(u8 ctxnum, bool checksum_enabled)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->checksum_enabled != checksum_enabled) {
++ selected_ctx->checksum_enabled = checksum_enabled;
++ selected_ctx_u->checksum_enabled = true;
++ update_ctx_ctrl1[ctxnum] = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_config_enabled - Enables specified CSI2 context
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @enabled: Boolean to enable/disable specified context.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_config_enabled(u8 ctxnum, bool enabled)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (selected_ctx->enabled != enabled) {
++ selected_ctx->enabled = enabled;
++ selected_ctx_u->enabled = true;
++ update_ctx_ctrl1[ctxnum] = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_update - Applies CSI2 context configuration.
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_ctx_config_*() functions.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_ctx_config_*() functions, unless the force_update flag is
++ * set to true.
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_update(u8 ctxnum, bool force_update)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++ u32 reg;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ if (update_ctx_ctrl1[ctxnum] || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL1(ctxnum));
++ if (selected_ctx_u->frame_count || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL1_COUNT_MASK);
++ reg |= selected_ctx->frame_count <<
++ ISPCSI2_CTX_CTRL1_COUNT_SHIFT;
++ selected_ctx_u->frame_count = false;
++ }
++ if (selected_ctx_u->eof_enabled || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL1_EOF_EN_MASK);
++ if (selected_ctx->eof_enabled)
++ reg |= ISPCSI2_CTX_CTRL1_EOF_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTX_CTRL1_EOF_EN_DISABLE;
++ selected_ctx_u->eof_enabled = false;
++ }
++ if (selected_ctx_u->eol_enabled || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL1_EOL_EN_MASK);
++ if (selected_ctx->eol_enabled)
++ reg |= ISPCSI2_CTX_CTRL1_EOL_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTX_CTRL1_EOL_EN_DISABLE;
++ selected_ctx_u->eol_enabled = false;
++ }
++ if (selected_ctx_u->checksum_enabled || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL1_CS_EN_MASK);
++ if (selected_ctx->checksum_enabled)
++ reg |= ISPCSI2_CTX_CTRL1_CS_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTX_CTRL1_CS_EN_DISABLE;
++ selected_ctx_u->checksum_enabled = false;
++ }
++ if (selected_ctx_u->enabled || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL1_CTX_EN_MASK);
++ if (selected_ctx->enabled)
++ reg |= ISPCSI2_CTX_CTRL1_CTX_EN_ENABLE;
++ else
++ reg |= ISPCSI2_CTX_CTRL1_CTX_EN_DISABLE;
++ selected_ctx_u->enabled = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL1(ctxnum));
++ update_ctx_ctrl1[ctxnum] = false;
++ }
++
++ if (update_ctx_ctrl2[ctxnum] || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL2(ctxnum));
++ if (selected_ctx_u->virtual_id || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK);
++ reg |= selected_ctx->virtual_id <<
++ ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT;
++ selected_ctx_u->virtual_id = false;
++ }
++
++ if (selected_ctx_u->format || force_update) {
++ struct v4l2_pix_format *pix;
++ u16 new_format = 0;
++
++ reg &= ~(ISPCSI2_CTX_CTRL2_FORMAT_MASK);
++ pix = &selected_ctx->format;
++ switch (pix->pixelformat) {
++ case V4L2_PIX_FMT_RGB565:
++ case V4L2_PIX_FMT_RGB565X:
++ new_format = 0x22;
++ break;
++ case V4L2_PIX_FMT_YUYV:
++ case V4L2_PIX_FMT_UYVY:
++ if (uses_videoport)
++ new_format = 0x9E;
++ else
++ new_format = 0x1E;
++ break;
++ case V4L2_PIX_FMT_RGB555:
++ case V4L2_PIX_FMT_RGB555X:
++ new_format = 0xA1;
++ break;
++ case V4L2_PIX_FMT_SGRBG10:
++ if (uses_videoport)
++ new_format = 0x12F;
++ else
++ new_format = 0xAB;
++ break;
++ }
++ reg |= (new_format << ISPCSI2_CTX_CTRL2_FORMAT_SHIFT);
++ selected_ctx_u->format = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL2(ctxnum));
++ update_ctx_ctrl2[ctxnum] = false;
++ }
++
++ if (update_ctx_ctrl3[ctxnum] || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL3(ctxnum));
++ if (selected_ctx_u->alpha || force_update) {
++ reg &= ~(ISPCSI2_CTX_CTRL3_ALPHA_MASK);
++ reg |= (selected_ctx->alpha <<
++ ISPCSI2_CTX_CTRL3_ALPHA_SHIFT);
++ selected_ctx_u->alpha = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL3(ctxnum));
++ update_ctx_ctrl3[ctxnum] = false;
++ }
++
++ if (selected_ctx_u->data_offset) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_OFST(ctxnum));
++ reg &= ~ISPCSI2_CTX_DAT_OFST_OFST_MASK;
++ reg |= selected_ctx->data_offset <<
++ ISPCSI2_CTX_DAT_OFST_OFST_SHIFT;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_OFST(ctxnum));
++ selected_ctx_u->data_offset = false;
++ }
++
++ if (selected_ctx_u->ping_addr) {
++ reg = selected_ctx->ping_addr;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_PING_ADDR(ctxnum));
++ selected_ctx_u->ping_addr = false;
++ }
++
++ if (selected_ctx_u->pong_addr) {
++ reg = selected_ctx->pong_addr;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_PONG_ADDR(ctxnum));
++ selected_ctx_u->pong_addr = false;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_get - Gets specific CSI2 Context configuration
++ * @ctxnum: Context number, valid between 0 and 7 values.
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_get(u8 ctxnum)
++{
++ struct isp_csi2_ctx_cfg *selected_ctx;
++ struct isp_csi2_ctx_cfg_update *selected_ctx_u;
++ u32 reg;
++
++ isp_csi2_ctx_validate(&ctxnum);
++
++ selected_ctx = &current_csi2_cfg.contexts[ctxnum];
++ selected_ctx_u = &current_csi2_cfg_update.contexts[ctxnum];
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_CTX_CTRL1(ctxnum));
++ selected_ctx->frame_count = (reg & ISPCSI2_CTX_CTRL1_COUNT_MASK) >>
++ ISPCSI2_CTX_CTRL1_COUNT_SHIFT;
++ selected_ctx_u->frame_count = false;
++
++ if ((reg & ISPCSI2_CTX_CTRL1_EOF_EN_MASK) ==
++ ISPCSI2_CTX_CTRL1_EOF_EN_ENABLE)
++ selected_ctx->eof_enabled = true;
++ else
++ selected_ctx->eof_enabled = false;
++ selected_ctx_u->eof_enabled = false;
++
++ if ((reg & ISPCSI2_CTX_CTRL1_EOL_EN_MASK) ==
++ ISPCSI2_CTX_CTRL1_EOL_EN_ENABLE)
++ selected_ctx->eol_enabled = true;
++ else
++ selected_ctx->eol_enabled = false;
++ selected_ctx_u->eol_enabled = false;
++
++ if ((reg & ISPCSI2_CTX_CTRL1_CS_EN_MASK) ==
++ ISPCSI2_CTX_CTRL1_CS_EN_ENABLE)
++ selected_ctx->checksum_enabled = true;
++ else
++ selected_ctx->checksum_enabled = false;
++ selected_ctx_u->checksum_enabled = false;
++
++ if ((reg & ISPCSI2_CTX_CTRL1_CTX_EN_MASK) ==
++ ISPCSI2_CTX_CTRL1_CTX_EN_ENABLE)
++ selected_ctx->enabled = true;
++ else
++ selected_ctx->enabled = false;
++ selected_ctx_u->enabled = false;
++ update_ctx_ctrl1[ctxnum] = false;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_CTX_CTRL2(ctxnum));
++
++ selected_ctx->virtual_id = (reg & ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK) >>
++ ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT;
++ selected_ctx_u->virtual_id = false;
++
++ switch ((reg & ISPCSI2_CTX_CTRL2_FORMAT_MASK) >>
++ ISPCSI2_CTX_CTRL2_FORMAT_SHIFT) {
++ case 0x22:
++ selected_ctx->format.pixelformat = V4L2_PIX_FMT_RGB565;
++ break;
++ case 0x9E:
++ case 0x1E:
++ selected_ctx->format.pixelformat = V4L2_PIX_FMT_YUYV;
++ break;
++ case 0xA1:
++ selected_ctx->format.pixelformat = V4L2_PIX_FMT_RGB555;
++ break;
++ case 0xAB:
++ case 0x12F:
++ selected_ctx->format.pixelformat = V4L2_PIX_FMT_SGRBG10;
++ break;
++ }
++ selected_ctx_u->format = false;
++ update_ctx_ctrl2[ctxnum] = false;
++
++ selected_ctx->alpha = (isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL3(ctxnum)) &
++ ISPCSI2_CTX_CTRL3_ALPHA_MASK) >>
++ ISPCSI2_CTX_CTRL3_ALPHA_SHIFT;
++ selected_ctx_u->alpha = false;
++ update_ctx_ctrl3[ctxnum] = false;
++
++ selected_ctx->data_offset = (isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_OFST(ctxnum)) &
++ ISPCSI2_CTX_DAT_OFST_OFST_MASK) >>
++ ISPCSI2_CTX_DAT_OFST_OFST_SHIFT;
++ selected_ctx_u->data_offset = false;
++
++ selected_ctx->ping_addr = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_PING_ADDR(ctxnum));
++ selected_ctx_u->ping_addr = false;
++
++ selected_ctx->pong_addr = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_PONG_ADDR(ctxnum));
++ selected_ctx_u->pong_addr = false;
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_update_all - Applies all CSI2 context configuration.
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_ctx_config_*() functions.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_ctx_config_*() functions, unless the force_update flag is
++ * set to true.
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_update_all(bool force_update)
++{
++ u8 ctxnum;
++
++ for (ctxnum = 0; ctxnum < 8; ctxnum++)
++ isp_csi2_ctx_update(ctxnum, force_update);
++
++ return 0;
++}
++
++/**
++ * isp_csi2_ctx_get_all - Gets all CSI2 Context configurations
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_ctx_get_all(void)
++{
++ u8 ctxnum;
++
++ for (ctxnum = 0; ctxnum < 8; ctxnum++)
++ isp_csi2_ctx_get(ctxnum);
++
++ return 0;
++}
++
++int isp_csi2_phy_config(struct isp_csi2_phy_cfg *desiredphyconfig)
++{
++ struct isp_csi2_phy_cfg *currphy = &current_csi2_cfg.phy;
++ struct isp_csi2_phy_cfg_update *currphy_u =
++ &current_csi2_cfg_update.phy;
++
++ if ((desiredphyconfig->tclk_term > 0x7f) ||
++ (desiredphyconfig->tclk_miss > 0x3)) {
++ printk(KERN_ERR "Invalid PHY configuration sent by the"
++ " driver\n");
++ return -EINVAL;
++ }
++
++ if (currphy->ths_term != desiredphyconfig->ths_term) {
++ currphy->ths_term = desiredphyconfig->ths_term;
++ currphy_u->ths_term = true;
++ update_phy_cfg0 = true;
++ }
++ if (currphy->ths_settle != desiredphyconfig->ths_settle) {
++ currphy->ths_settle = desiredphyconfig->ths_settle;
++ currphy_u->ths_settle = true;
++ update_phy_cfg0 = true;
++ }
++ if (currphy->tclk_term != desiredphyconfig->tclk_term) {
++ currphy->tclk_term = desiredphyconfig->tclk_term;
++ currphy_u->tclk_term = true;
++ update_phy_cfg1 = true;
++ }
++ if (currphy->tclk_miss != desiredphyconfig->tclk_miss) {
++ currphy->tclk_miss = desiredphyconfig->tclk_miss;
++ currphy_u->tclk_miss = true;
++ update_phy_cfg1 = true;
++ }
++ if (currphy->tclk_settle != desiredphyconfig->tclk_settle) {
++ currphy->tclk_settle = desiredphyconfig->tclk_settle;
++ currphy_u->tclk_settle = true;
++ update_phy_cfg1 = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_calc_phy_cfg0 - Calculates D-PHY config based on the MIPIClk speed.
++ * @mipiclk: MIPI clock frequency being used with CSI2 sensor.
++ * @lbound_hs_settle: Lower bound for CSI2 High Speed Settle transition.
++ * @ubound_hs_settle: Upper bound for CSI2 High Speed Settle transition.
++ *
++ * From TRM, we have the same calculation for HS Termination signal.
++ * THS_TERM = ceil( 12.5ns / DDRCLK period ) - 1
++ * But for Settle, we use the mid value between the two passed boundaries from
++ * sensor:
++ * THS_SETTLE = (Upper bound + Lower bound) / 2
++ *
++ * Always returns 0.
++ */
++int isp_csi2_calc_phy_cfg0(u32 mipiclk, u32 lbound_hs_settle,
++ u32 ubound_hs_settle)
++{
++ struct isp_csi2_phy_cfg *currphy = &current_csi2_cfg.phy;
++ struct isp_csi2_phy_cfg_update *currphy_u =
++ &current_csi2_cfg_update.phy;
++ u32 tmp, ddrclk = mipiclk >> 1;
++
++ /* Calculate THS_TERM */
++ tmp = ddrclk / 80000000;
++ if ((ddrclk % 80000000) > 0)
++ tmp++;
++ currphy->ths_term = tmp - 1;
++ currphy_u->ths_term = true;
++
++ /* Calculate THS_SETTLE */
++ currphy->ths_settle = (ubound_hs_settle + lbound_hs_settle) / 2;
++
++ currphy_u->ths_settle = true;
++ isp_csi2_phy_update(true);
++ return 0;
++}
++EXPORT_SYMBOL(isp_csi2_calc_phy_cfg0);
++
++/**
++ * isp_csi2_phy_update - Applies CSI2 D-PHY configuration.
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_phy_config_*() functions.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_phy_config_*() functions, unless the force_update flag is
++ * set to true.
++ * Always returns 0.
++ **/
++int isp_csi2_phy_update(bool force_update)
++{
++ struct isp_csi2_phy_cfg *currphy = &current_csi2_cfg.phy;
++ struct isp_csi2_phy_cfg_update *currphy_u =
++ &current_csi2_cfg_update.phy;
++ u32 reg;
++
++ if (update_phy_cfg0 || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2PHY, ISPCSI2PHY_CFG0);
++ if (currphy_u->ths_term || force_update) {
++ reg &= ~ISPCSI2PHY_CFG0_THS_TERM_MASK;
++ reg |= (currphy->ths_term <<
++ ISPCSI2PHY_CFG0_THS_TERM_SHIFT);
++ currphy_u->ths_term = false;
++ }
++ if (currphy_u->ths_settle || force_update) {
++ reg &= ~ISPCSI2PHY_CFG0_THS_SETTLE_MASK;
++ reg |= (currphy->ths_settle <<
++ ISPCSI2PHY_CFG0_THS_SETTLE_SHIFT);
++ currphy_u->ths_settle = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2PHY, ISPCSI2PHY_CFG0);
++ update_phy_cfg0 = false;
++ }
++
++ if (update_phy_cfg1 || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2PHY, ISPCSI2PHY_CFG1);
++ if (currphy_u->tclk_term || force_update) {
++ reg &= ~ISPCSI2PHY_CFG1_TCLK_TERM_MASK;
++ reg |= (currphy->tclk_term <<
++ ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT);
++ currphy_u->tclk_term = false;
++ }
++ if (currphy_u->tclk_miss || force_update) {
++ reg &= ~ISPCSI2PHY_CFG1_TCLK_MISS_MASK;
++ reg |= (currphy->tclk_miss <<
++ ISPCSI2PHY_CFG1_TCLK_MISS_SHIFT);
++ currphy_u->tclk_miss = false;
++ }
++ if (currphy_u->tclk_settle || force_update) {
++ reg &= ~ISPCSI2PHY_CFG1_TCLK_SETTLE_MASK;
++ reg |= (currphy->tclk_settle <<
++ ISPCSI2PHY_CFG1_TCLK_SETTLE_SHIFT);
++ currphy_u->tclk_settle = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2PHY, ISPCSI2PHY_CFG1);
++ update_phy_cfg1 = false;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_phy_get - Gets CSI2 D-PHY configuration
++ *
++ * Gets settings from HW registers and fills in the internal driver memory
++ * Always returns 0.
++ **/
++int isp_csi2_phy_get(void)
++{
++ struct isp_csi2_phy_cfg *currphy = &current_csi2_cfg.phy;
++ struct isp_csi2_phy_cfg_update *currphy_u =
++ &current_csi2_cfg_update.phy;
++ u32 reg;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2PHY, ISPCSI2PHY_CFG0);
++ currphy->ths_term = (reg & ISPCSI2PHY_CFG0_THS_TERM_MASK) >>
++ ISPCSI2PHY_CFG0_THS_TERM_SHIFT;
++ currphy_u->ths_term = false;
++
++ currphy->ths_settle = (reg & ISPCSI2PHY_CFG0_THS_SETTLE_MASK) >>
++ ISPCSI2PHY_CFG0_THS_SETTLE_SHIFT;
++ currphy_u->ths_settle = false;
++ update_phy_cfg0 = false;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2PHY, ISPCSI2PHY_CFG1);
++
++ currphy->tclk_term = (reg & ISPCSI2PHY_CFG1_TCLK_TERM_MASK) >>
++ ISPCSI2PHY_CFG1_TCLK_TERM_SHIFT;
++ currphy_u->tclk_term = false;
++
++ currphy->tclk_miss = (reg & ISPCSI2PHY_CFG1_TCLK_MISS_MASK) >>
++ ISPCSI2PHY_CFG1_TCLK_MISS_SHIFT;
++ currphy_u->tclk_miss = false;
++
++ currphy->tclk_settle = (reg & ISPCSI2PHY_CFG1_TCLK_SETTLE_MASK) >>
++ ISPCSI2PHY_CFG1_TCLK_SETTLE_SHIFT;
++ currphy_u->tclk_settle = false;
++
++ update_phy_cfg1 = false;
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_config_forcerxmode - Sets Force Rx mode on stop state count
++ * @force_rx_mode: Boolean to enable/disable forcing Rx mode in CSI2 receiver
++ *
++ * Returns 0 if successful, or -EINVAL if wrong ComplexIO number is selected.
++ **/
++int isp_csi2_timings_config_forcerxmode(u8 io, bool force_rx_mode)
++{
++ struct isp_csi2_timings_cfg *currtimings;
++ struct isp_csi2_timings_cfg_update *currtimings_u;
++
++ if (io < 1 || io > 2) {
++ printk(KERN_ERR "CSI2 - Timings config: Invalid IO number\n");
++ return -EINVAL;
++ }
++
++ currtimings = &current_csi2_cfg.timings[io - 1];
++ currtimings_u = &current_csi2_cfg_update.timings[io - 1];
++ if (currtimings->force_rx_mode != force_rx_mode) {
++ currtimings->force_rx_mode = force_rx_mode;
++ currtimings_u->force_rx_mode = true;
++ update_timing = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_config_stopstate_16x - Sets 16x factor for L3 cycles
++ * @stop_state_16x: Boolean to use or not use the 16x multiplier for stop count
++ *
++ * Returns 0 if successful, or -EINVAL if wrong ComplexIO number is selected.
++ **/
++int isp_csi2_timings_config_stopstate_16x(u8 io, bool stop_state_16x)
++{
++ struct isp_csi2_timings_cfg *currtimings;
++ struct isp_csi2_timings_cfg_update *currtimings_u;
++
++ if (io < 1 || io > 2) {
++ printk(KERN_ERR "CSI2 - Timings config: Invalid IO number\n");
++ return -EINVAL;
++ }
++
++ currtimings = &current_csi2_cfg.timings[io - 1];
++ currtimings_u = &current_csi2_cfg_update.timings[io - 1];
++ if (currtimings->stop_state_16x != stop_state_16x) {
++ currtimings->stop_state_16x = stop_state_16x;
++ currtimings_u->stop_state_16x = true;
++ update_timing = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_config_stopstate_4x - Sets 4x factor for L3 cycles
++ * @stop_state_4x: Boolean to use or not use the 4x multiplier for stop count
++ *
++ * Returns 0 if successful, or -EINVAL if wrong ComplexIO number is selected.
++ **/
++int isp_csi2_timings_config_stopstate_4x(u8 io, bool stop_state_4x)
++{
++ struct isp_csi2_timings_cfg *currtimings;
++ struct isp_csi2_timings_cfg_update *currtimings_u;
++
++ if (io < 1 || io > 2) {
++ printk(KERN_ERR "CSI2 - Timings config: Invalid IO number\n");
++ return -EINVAL;
++ }
++
++ currtimings = &current_csi2_cfg.timings[io - 1];
++ currtimings_u = &current_csi2_cfg_update.timings[io - 1];
++ if (currtimings->stop_state_4x != stop_state_4x) {
++ currtimings->stop_state_4x = stop_state_4x;
++ currtimings_u->stop_state_4x = true;
++ update_timing = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_config_stopstate_cnt - Sets L3 cycles
++ * @stop_state_counter: Stop state counter value for L3 cycles
++ *
++ * Returns 0 if successful, or -EINVAL if wrong ComplexIO number is selected.
++ **/
++int isp_csi2_timings_config_stopstate_cnt(u8 io, u16 stop_state_counter)
++{
++ struct isp_csi2_timings_cfg *currtimings;
++ struct isp_csi2_timings_cfg_update *currtimings_u;
++
++ if (io < 1 || io > 2) {
++ printk(KERN_ERR "CSI2 - Timings config: Invalid IO number\n");
++ return -EINVAL;
++ }
++
++ currtimings = &current_csi2_cfg.timings[io - 1];
++ currtimings_u = &current_csi2_cfg_update.timings[io - 1];
++ if (currtimings->stop_state_counter != stop_state_counter) {
++ currtimings->stop_state_counter = (stop_state_counter & 0x1FFF);
++ currtimings_u->stop_state_counter = true;
++ update_timing = true;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_update - Applies specified CSI2 timing configuration.
++ * @io: IO number (1 or 2) which specifies which ComplexIO are we updating
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_timings_config_*() functions.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_timings_config_*() functions, unless the force_update flag is
++ * set to true.
++ * Returns 0 if successful, or -EINVAL if invalid IO number is passed.
++ **/
++int isp_csi2_timings_update(u8 io, bool force_update)
++{
++ struct isp_csi2_timings_cfg *currtimings;
++ struct isp_csi2_timings_cfg_update *currtimings_u;
++ u32 reg;
++
++ if (io < 1 || io > 2) {
++ printk(KERN_ERR "CSI2 - Timings config: Invalid IO number\n");
++ return -EINVAL;
++ }
++
++ currtimings = &current_csi2_cfg.timings[io - 1];
++ currtimings_u = &current_csi2_cfg_update.timings[io - 1];
++
++ if (update_timing || force_update) {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_TIMING);
++ if (currtimings_u->force_rx_mode || force_update) {
++ reg &= ~ISPCSI2_TIMING_FORCE_RX_MODE_IO_MASK(io);
++ if (currtimings->force_rx_mode)
++ reg |= ISPCSI2_TIMING_FORCE_RX_MODE_IO_ENABLE
++ (io);
++ else
++ reg |= ISPCSI2_TIMING_FORCE_RX_MODE_IO_DISABLE
++ (io);
++ currtimings_u->force_rx_mode = false;
++ }
++ if (currtimings_u->stop_state_16x || force_update) {
++ reg &= ~ISPCSI2_TIMING_STOP_STATE_X16_IO_MASK(io);
++ if (currtimings->stop_state_16x)
++ reg |= ISPCSI2_TIMING_STOP_STATE_X16_IO_ENABLE
++ (io);
++ else
++ reg |= ISPCSI2_TIMING_STOP_STATE_X16_IO_DISABLE
++ (io);
++ currtimings_u->stop_state_16x = false;
++ }
++ if (currtimings_u->stop_state_4x || force_update) {
++ reg &= ~ISPCSI2_TIMING_STOP_STATE_X4_IO_MASK(io);
++ if (currtimings->stop_state_4x) {
++ reg |= ISPCSI2_TIMING_STOP_STATE_X4_IO_ENABLE
++ (io);
++ } else {
++ reg |= ISPCSI2_TIMING_STOP_STATE_X4_IO_DISABLE
++ (io);
++ }
++ currtimings_u->stop_state_4x = false;
++ }
++ if (currtimings_u->stop_state_counter || force_update) {
++ reg &= ~ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_MASK(io);
++ reg |= currtimings->stop_state_counter <<
++ ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_SHIFT(io);
++ currtimings_u->stop_state_counter = false;
++ }
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_TIMING);
++ update_timing = false;
++ }
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_get - Gets specific CSI2 ComplexIO timing configuration
++ * @io: IO number (1 or 2) which specifies which ComplexIO are we getting
++ *
++ * Gets settings from HW registers and fills in the internal driver memory
++ * Returns 0 if successful, or -EINVAL if invalid IO number is passed.
++ **/
++int isp_csi2_timings_get(u8 io)
++{
++ struct isp_csi2_timings_cfg *currtimings;
++ struct isp_csi2_timings_cfg_update *currtimings_u;
++ u32 reg;
++
++ if (io < 1 || io > 2) {
++ printk(KERN_ERR "CSI2 - Timings config: Invalid IO number\n");
++ return -EINVAL;
++ }
++
++ currtimings = &current_csi2_cfg.timings[io - 1];
++ currtimings_u = &current_csi2_cfg_update.timings[io - 1];
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_TIMING);
++ if ((reg & ISPCSI2_TIMING_FORCE_RX_MODE_IO_MASK(io)) ==
++ ISPCSI2_TIMING_FORCE_RX_MODE_IO_ENABLE(io))
++ currtimings->force_rx_mode = true;
++ else
++ currtimings->force_rx_mode = false;
++ currtimings_u->force_rx_mode = false;
++
++ if ((reg & ISPCSI2_TIMING_STOP_STATE_X16_IO_MASK(io)) ==
++ ISPCSI2_TIMING_STOP_STATE_X16_IO_ENABLE(io))
++ currtimings->stop_state_16x = true;
++ else
++ currtimings->stop_state_16x = false;
++ currtimings_u->stop_state_16x = false;
++
++ if ((reg & ISPCSI2_TIMING_STOP_STATE_X4_IO_MASK(io)) ==
++ ISPCSI2_TIMING_STOP_STATE_X4_IO_ENABLE(io))
++ currtimings->stop_state_4x = true;
++ else
++ currtimings->stop_state_4x = false;
++ currtimings_u->stop_state_4x = false;
++
++ currtimings->stop_state_counter = (reg &
++ ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_MASK(io)) >>
++ ISPCSI2_TIMING_STOP_STATE_COUNTER_IO_SHIFT(io);
++ currtimings_u->stop_state_counter = false;
++ update_timing = false;
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_update_all - Applies specified CSI2 timing configuration.
++ * @force_update: Flag to force rewrite of registers, even if they haven't been
++ * updated with the isp_csi2_timings_config_*() functions.
++ *
++ * It only saves settings when they were previously updated using the
++ * isp_csi2_timings_config_*() functions, unless the force_update flag is
++ * set to true.
++ * Always returns 0.
++ **/
++int isp_csi2_timings_update_all(bool force_update)
++{
++ int i;
++
++ for (i = 1; i < 3; i++)
++ isp_csi2_timings_update(i, force_update);
++ return 0;
++}
++
++/**
++ * isp_csi2_timings_get_all - Gets all CSI2 ComplexIO timing configurations
++ *
++ * Always returns 0.
++ **/
++int isp_csi2_timings_get_all(void)
++{
++ int i;
++
++ for (i = 1; i < 3; i++)
++ isp_csi2_timings_get(i);
++ return 0;
++}
++
++/**
++ * isp_csi2_isr - CSI2 interrupt handling.
++ **/
++void isp_csi2_isr(void)
++{
++ u32 csi2_irqstatus, cpxio1_irqstatus, ctxirqstatus;
++
++ csi2_irqstatus = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_IRQSTATUS);
++ isp_reg_writel(csi2_irqstatus, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_IRQSTATUS);
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_COMPLEXIO1_ERR_IRQ) {
++ cpxio1_irqstatus = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_COMPLEXIO1_IRQSTATUS);
++ isp_reg_writel(cpxio1_irqstatus, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_COMPLEXIO1_IRQSTATUS);
++ printk(KERN_ERR "CSI2: ComplexIO Error IRQ %x\n",
++ cpxio1_irqstatus);
++ }
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_CONTEXT(0)) {
++ ctxirqstatus = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQSTATUS(0));
++ isp_reg_writel(ctxirqstatus, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQSTATUS(0));
++ }
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_OCP_ERR_IRQ)
++ printk(KERN_ERR "CSI2: OCP Transmission Error\n");
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_SHORT_PACKET_IRQ)
++ printk(KERN_ERR "CSI2: Short packet receive error\n");
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_ECC_CORRECTION_IRQ)
++ printk(KERN_DEBUG "CSI2: ECC correction done\n");
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ)
++ printk(KERN_ERR "CSI2: ECC correction failed\n");
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ)
++ printk(KERN_ERR "CSI2: ComplexIO #2 failed\n");
++
++ if (csi2_irqstatus & ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ)
++ printk(KERN_ERR "CSI2: FIFO overflow error\n");
++
++ return;
++}
++EXPORT_SYMBOL(isp_csi2_isr);
++
++/**
++ * isp_csi2_irq_complexio1_set - Enables CSI2 ComplexIO IRQs.
++ * @enable: Enable/disable CSI2 ComplexIO #1 interrupts
++ **/
++void isp_csi2_irq_complexio1_set(int enable)
++{
++ u32 reg;
++ reg = ISPCSI2_COMPLEXIO1_IRQENABLE_STATEALLULPMEXIT |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_STATEALLULPMENTER |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM5 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL5 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC5 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS5 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS5 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM4 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL4 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC4 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS4 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS4 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM3 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL3 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC3 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS3 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS3 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM2 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL2 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC2 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS2 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS2 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_STATEULPM1 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRCONTROL1 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRESC1 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTSYNCHS1 |
++ ISPCSI2_COMPLEXIO1_IRQENABLE_ERRSOTHS1;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_COMPLEXIO1_IRQSTATUS);
++ if (enable) {
++ reg |= isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_COMPLEXIO1_IRQENABLE);
++ } else
++ reg = 0;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_COMPLEXIO1_IRQENABLE);
++}
++EXPORT_SYMBOL(isp_csi2_irq_complexio1_set);
++
++/**
++ * isp_csi2_irq_ctx_set - Enables CSI2 Context IRQs.
++ * @enable: Enable/disable CSI2 Context interrupts
++ **/
++void isp_csi2_irq_ctx_set(int enable)
++{
++ u32 reg;
++ int i;
++
++ reg = ISPCSI2_CTX_IRQSTATUS_FS_IRQ | ISPCSI2_CTX_IRQSTATUS_FE_IRQ;
++ for (i = 0; i < 8; i++) {
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQSTATUS(i));
++ if (enable) {
++ isp_reg_or(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQENABLE(i), reg);
++ } else {
++ isp_reg_writel(0, OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQENABLE(i));
++ }
++ }
++
++}
++EXPORT_SYMBOL(isp_csi2_irq_ctx_set);
++
++/**
++ * isp_csi2_irq_status_set - Enables CSI2 Status IRQs.
++ * @enable: Enable/disable CSI2 Status interrupts
++ **/
++void isp_csi2_irq_status_set(int enable)
++{
++ u32 reg;
++ reg = ISPCSI2_IRQSTATUS_OCP_ERR_IRQ |
++ ISPCSI2_IRQSTATUS_SHORT_PACKET_IRQ |
++ ISPCSI2_IRQSTATUS_ECC_CORRECTION_IRQ |
++ ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ |
++ ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ |
++ ISPCSI2_IRQSTATUS_COMPLEXIO1_ERR_IRQ |
++ ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ |
++ ISPCSI2_IRQSTATUS_CONTEXT(0);
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_IRQSTATUS);
++ if (enable)
++ reg |= isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_IRQENABLE);
++ else
++ reg = 0;
++
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_IRQENABLE);
++}
++EXPORT_SYMBOL(isp_csi2_irq_status_set);
++
++/**
++ * isp_csi2_irq_status_set - Enables main CSI2 IRQ.
++ * @enable: Enable/disable main CSI2 interrupt
++ **/
++void isp_csi2_irq_set(int enable)
++{
++ isp_reg_writel(IRQ0STATUS_CSIA_IRQ, OMAP3_ISP_IOMEM_MAIN,
++ ISP_IRQ0STATUS);
++ isp_reg_and_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~IRQ0ENABLE_CSIA_IRQ,
++ (enable ? IRQ0ENABLE_CSIA_IRQ : 0));
++}
++EXPORT_SYMBOL(isp_csi2_irq_set);
++
++/**
++ * isp_csi2_irq_all_set - Enable/disable CSI2 interrupts.
++ * @enable: 0-Disable, 1-Enable.
++ **/
++void isp_csi2_irq_all_set(int enable)
++{
++ if (enable) {
++ isp_csi2_irq_complexio1_set(enable);
++ isp_csi2_irq_ctx_set(enable);
++ isp_csi2_irq_status_set(enable);
++ isp_csi2_irq_set(enable);
++ } else {
++ isp_csi2_irq_set(enable);
++ isp_csi2_irq_status_set(enable);
++ isp_csi2_irq_ctx_set(enable);
++ isp_csi2_irq_complexio1_set(enable);
++ }
++ return;
++}
++EXPORT_SYMBOL(isp_csi2_irq_all_set);
++
++/**
++ * isp_csi2_reset - Resets the CSI2 module.
++ *
++ * Returns 0 if successful, or -EBUSY if power command didn't respond.
++ **/
++int isp_csi2_reset(void)
++{
++ u32 reg;
++ u8 soft_reset_retries = 0;
++ int i;
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_SYSCONFIG);
++ reg |= ISPCSI2_SYSCONFIG_SOFT_RESET_RESET;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_SYSCONFIG);
++
++ do {
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_SYSSTATUS) &
++ ISPCSI2_SYSSTATUS_RESET_DONE_MASK;
++ if (reg == ISPCSI2_SYSSTATUS_RESET_DONE_DONE)
++ break;
++ soft_reset_retries++;
++ if (soft_reset_retries < 5)
++ udelay(100);
++ } while (soft_reset_retries < 5);
++
++ if (soft_reset_retries == 5) {
++ printk(KERN_ERR "CSI2: Soft reset try count exceeded!\n");
++ return -EBUSY;
++ }
++
++ reg = isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_SYSCONFIG);
++ reg &= ~ISPCSI2_SYSCONFIG_MSTANDBY_MODE_MASK;
++ reg |= ISPCSI2_SYSCONFIG_MSTANDBY_MODE_NO;
++ reg &= ~ISPCSI2_SYSCONFIG_AUTO_IDLE_MASK;
++ isp_reg_writel(reg, OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_SYSCONFIG);
++
++ uses_videoport = false;
++ update_complexio_cfg1 = false;
++ update_phy_cfg0 = false;
++ update_phy_cfg1 = false;
++ for (i = 0; i < 8; i++) {
++ update_ctx_ctrl1[i] = false;
++ update_ctx_ctrl2[i] = false;
++ update_ctx_ctrl3[i] = false;
++ }
++ update_timing = false;
++ update_ctrl = false;
++
++ isp_csi2_complexio_lanes_get();
++ isp_csi2_ctrl_get();
++ isp_csi2_ctx_get_all();
++ isp_csi2_phy_get();
++ isp_csi2_timings_get_all();
++
++ isp_csi2_complexio_power_autoswitch(true);
++ isp_csi2_complexio_power(ISP_CSI2_POWER_ON);
++
++ isp_csi2_timings_config_forcerxmode(1, true);
++ isp_csi2_timings_config_stopstate_cnt(1, 0x1FF);
++ isp_csi2_timings_update_all(true);
++
++ return 0;
++}
++
++/**
++ * isp_csi2_enable - Enables the CSI2 module.
++ * @enable: Enables/disables the CSI2 module.
++ **/
++void isp_csi2_enable(int enable)
++{
++ if (enable) {
++ isp_csi2_ctx_config_enabled(0, true);
++ isp_csi2_ctx_config_eof_enabled(0, true);
++ isp_csi2_ctx_config_checksum_enabled(0, true);
++ isp_csi2_ctx_update(0, false);
++
++ isp_csi2_ctrl_config_ecc_enable(true);
++ isp_csi2_ctrl_config_if_enable(true);
++ isp_csi2_ctrl_update(false);
++ } else {
++ isp_csi2_ctx_config_enabled(0, false);
++ isp_csi2_ctx_config_eof_enabled(0, false);
++ isp_csi2_ctx_config_checksum_enabled(0, false);
++ isp_csi2_ctx_update(0, false);
++
++ isp_csi2_ctrl_config_ecc_enable(false);
++ isp_csi2_ctrl_config_if_enable(false);
++ isp_csi2_ctrl_update(false);
++ }
++}
++EXPORT_SYMBOL(isp_csi2_enable);
++
++/**
++ * isp_csi2_regdump - Prints CSI2 debug information.
++ **/
++void isp_csi2_regdump(void)
++{
++ printk(KERN_DEBUG "-------------Register dump-------------\n");
++
++ printk(KERN_DEBUG "ISP_CTRL: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_CTRL));
++ printk(KERN_DEBUG "ISP_TCTRL_CTRL: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_MAIN, ISP_TCTRL_CTRL));
++
++ printk(KERN_DEBUG "ISPCCDC_SDR_ADDR: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SDR_ADDR));
++ printk(KERN_DEBUG "ISPCCDC_SYN_MODE: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_SYN_MODE));
++ printk(KERN_DEBUG "ISPCCDC_CFG: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CFG));
++ printk(KERN_DEBUG "ISPCCDC_FMTCFG: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_FMTCFG));
++ printk(KERN_DEBUG "ISPCCDC_HSIZE_OFF: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HSIZE_OFF));
++ printk(KERN_DEBUG "ISPCCDC_HORZ_INFO: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC, ISPCCDC_HORZ_INFO));
++ printk(KERN_DEBUG "ISPCCDC_VERT_START: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_START));
++ printk(KERN_DEBUG "ISPCCDC_VERT_LINES: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CCDC,
++ ISPCCDC_VERT_LINES));
++
++ printk(KERN_DEBUG "ISPCSI2_COMPLEXIO_CFG1: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_COMPLEXIO_CFG1));
++ printk(KERN_DEBUG "ISPCSI2_SYSSTATUS: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_SYSSTATUS));
++ printk(KERN_DEBUG "ISPCSI2_SYSCONFIG: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_SYSCONFIG));
++ printk(KERN_DEBUG "ISPCSI2_IRQENABLE: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_IRQENABLE));
++ printk(KERN_DEBUG "ISPCSI2_IRQSTATUS: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_IRQSTATUS));
++
++ printk(KERN_DEBUG "ISPCSI2_CTX_IRQENABLE(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQENABLE(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTX_IRQSTATUS(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_IRQSTATUS(0)));
++ printk(KERN_DEBUG "ISPCSI2_TIMING: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_TIMING));
++ printk(KERN_DEBUG "ISPCSI2PHY_CFG0: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2PHY,
++ ISPCSI2PHY_CFG0));
++ printk(KERN_DEBUG "ISPCSI2PHY_CFG1: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2PHY,
++ ISPCSI2PHY_CFG1));
++ printk(KERN_DEBUG "ISPCSI2_CTX_CTRL1(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL1(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTX_CTRL2(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL2(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTX_CTRL3(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_CTRL3(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTX_DAT_OFST(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_OFST(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTX_DAT_PING_ADDR(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_PING_ADDR(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTX_DAT_PONG_ADDR(0): %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A,
++ ISPCSI2_CTX_DAT_PONG_ADDR(0)));
++ printk(KERN_DEBUG "ISPCSI2_CTRL: %x\n",
++ isp_reg_readl(OMAP3_ISP_IOMEM_CSI2A, ISPCSI2_CTRL));
++ printk(KERN_DEBUG "---------------------------------------\n");
++}
++
++/**
++ * isp_csi2_cleanup - Routine for module driver cleanup
++ **/
++void isp_csi2_cleanup(void)
++{
++ return;
++}
++
++/**
++ * isp_csi2_init - Routine for module driver init
++ **/
++int __init isp_csi2_init(void)
++{
++ int i;
++
++ update_complexio_cfg1 = false;
++ update_phy_cfg0 = false;
++ update_phy_cfg1 = false;
++ for (i = 0; i < 8; i++) {
++ update_ctx_ctrl1[i] = false;
++ update_ctx_ctrl2[i] = false;
++ update_ctx_ctrl3[i] = false;
++ }
++ update_timing = false;
++ update_ctrl = false;
++
++ memset(&current_csi2_cfg, 0, sizeof(current_csi2_cfg));
++ memset(&current_csi2_cfg_update, 0, sizeof(current_csi2_cfg_update));
++ return 0;
++}
++
++MODULE_AUTHOR("Texas Instruments");
++MODULE_DESCRIPTION("ISP CSI2 Receiver Module");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/media/video/isp/ispcsi2.h b/drivers/media/video/isp/ispcsi2.h
+new file mode 100644
+index 0000000..4582c96
+--- /dev/null
++++ b/drivers/media/video/isp/ispcsi2.h
+@@ -0,0 +1,232 @@
++/*
++ * ispcsi2.h
++ *
++ * Copyright (C) 2009 Texas Instruments.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Dominic Curran <dcurran@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_ISP_CSI2_API_H
++#define OMAP_ISP_CSI2_API_H
++#include <linux/videodev2.h>
++
++enum isp_csi2_irqevents {
++ OCP_ERR_IRQ = 0x4000,
++ SHORT_PACKET_IRQ = 0x2000,
++ ECC_CORRECTION_IRQ = 0x1000,
++ ECC_NO_CORRECTION_IRQ = 0x800,
++ COMPLEXIO2_ERR_IRQ = 0x400,
++ COMPLEXIO1_ERR_IRQ = 0x200,
++ FIFO_OVF_IRQ = 0x100,
++ CONTEXT7 = 0x80,
++ CONTEXT6 = 0x40,
++ CONTEXT5 = 0x20,
++ CONTEXT4 = 0x10,
++ CONTEXT3 = 0x8,
++ CONTEXT2 = 0x4,
++ CONTEXT1 = 0x2,
++ CONTEXT0 = 0x1,
++};
++
++enum isp_csi2_ctx_irqevents {
++ CTX_ECC_CORRECTION = 0x100,
++ CTX_LINE_NUMBER = 0x80,
++ CTX_FRAME_NUMBER = 0x40,
++ CTX_CS = 0x20,
++ CTX_LE = 0x8,
++ CTX_LS = 0x4,
++ CTX_FE = 0x2,
++ CTX_FS = 0x1,
++};
++
++enum isp_csi2_power_cmds {
++ ISP_CSI2_POWER_OFF,
++ ISP_CSI2_POWER_ON,
++ ISP_CSI2_POWER_ULPW,
++};
++
++enum isp_csi2_frame_mode {
++ ISP_CSI2_FRAME_IMMEDIATE,
++ ISP_CSI2_FRAME_AFTERFEC,
++};
++
++struct csi2_lanecfg {
++ u8 pos;
++ u8 pol;
++};
++
++struct isp_csi2_lanes_cfg {
++ struct csi2_lanecfg data[4];
++ struct csi2_lanecfg clk;
++};
++
++struct isp_csi2_lanes_cfg_update {
++ bool data[4];
++ bool clk;
++};
++
++struct isp_csi2_phy_cfg {
++ u8 ths_term;
++ u8 ths_settle;
++ u8 tclk_term;
++ unsigned tclk_miss:1;
++ u8 tclk_settle;
++};
++
++struct isp_csi2_phy_cfg_update {
++ bool ths_term;
++ bool ths_settle;
++ bool tclk_term;
++ bool tclk_miss;
++ bool tclk_settle;
++};
++
++struct isp_csi2_ctx_cfg {
++ u8 virtual_id;
++ u8 frame_count;
++ struct v4l2_pix_format format;
++ u16 alpha;
++ u16 data_offset;
++ u32 ping_addr;
++ u32 pong_addr;
++ bool eof_enabled;
++ bool eol_enabled;
++ bool checksum_enabled;
++ bool enabled;
++};
++
++struct isp_csi2_ctx_cfg_update {
++ bool virtual_id;
++ bool frame_count;
++ bool format;
++ bool alpha;
++ bool data_offset;
++ bool ping_addr;
++ bool pong_addr;
++ bool eof_enabled;
++ bool eol_enabled;
++ bool checksum_enabled;
++ bool enabled;
++};
++
++struct isp_csi2_timings_cfg {
++ bool force_rx_mode;
++ bool stop_state_16x;
++ bool stop_state_4x;
++ u16 stop_state_counter;
++};
++
++struct isp_csi2_timings_cfg_update {
++ bool force_rx_mode;
++ bool stop_state_16x;
++ bool stop_state_4x;
++ bool stop_state_counter;
++};
++
++struct isp_csi2_ctrl_cfg {
++ bool vp_clk_enable;
++ bool vp_only_enable;
++ u8 vp_out_ctrl;
++ bool debug_enable;
++ u8 burst_size;
++ enum isp_csi2_frame_mode frame_mode;
++ bool ecc_enable;
++ bool secure_mode;
++ bool if_enable;
++};
++
++struct isp_csi2_ctrl_cfg_update {
++ bool vp_clk_enable;
++ bool vp_only_enable;
++ bool vp_out_ctrl;
++ bool debug_enable;
++ bool burst_size;
++ bool frame_mode;
++ bool ecc_enable;
++ bool secure_mode;
++ bool if_enable;
++};
++
++struct isp_csi2_cfg {
++ struct isp_csi2_lanes_cfg lanes;
++ struct isp_csi2_phy_cfg phy;
++ struct isp_csi2_ctx_cfg contexts[8];
++ struct isp_csi2_timings_cfg timings[2];
++ struct isp_csi2_ctrl_cfg ctrl;
++};
++
++struct isp_csi2_cfg_update {
++ struct isp_csi2_lanes_cfg_update lanes;
++ struct isp_csi2_phy_cfg_update phy;
++ struct isp_csi2_ctx_cfg_update contexts[8];
++ struct isp_csi2_timings_cfg_update timings[2];
++ struct isp_csi2_ctrl_cfg_update ctrl;
++};
++
++int isp_csi2_complexio_lanes_config(struct isp_csi2_lanes_cfg *reqcfg);
++int isp_csi2_complexio_lanes_update(bool force_update);
++int isp_csi2_complexio_lanes_get(void);
++int isp_csi2_complexio_power_autoswitch(bool enable);
++int isp_csi2_complexio_power(enum isp_csi2_power_cmds power_cmd);
++int isp_csi2_ctrl_config_frame_mode(enum isp_csi2_frame_mode frame_mode);
++int isp_csi2_ctrl_config_vp_clk_enable(bool vp_clk_enable);
++int isp_csi2_ctrl_config_vp_only_enable(bool vp_only_enable);
++int isp_csi2_ctrl_config_debug_enable(bool debug_enable);
++int isp_csi2_ctrl_config_burst_size(u8 burst_size);
++int isp_csi2_ctrl_config_ecc_enable(bool ecc_enable);
++int isp_csi2_ctrl_config_secure_mode(bool secure_mode);
++int isp_csi2_ctrl_config_if_enable(bool if_enable);
++int isp_csi2_ctrl_config_vp_out_ctrl(u8 vp_out_ctrl);
++int isp_csi2_ctrl_update(bool force_update);
++int isp_csi2_ctrl_get(void);
++int isp_csi2_ctx_config_virtual_id(u8 ctxnum, u8 virtual_id);
++int isp_csi2_ctx_config_frame_count(u8 ctxnum, u8 frame_count);
++int isp_csi2_ctx_config_format(u8 ctxnum, u32 pixformat);
++int isp_csi2_ctx_config_alpha(u8 ctxnum, u16 alpha);
++int isp_csi2_ctx_config_data_offset(u8 ctxnum, u16 data_offset);
++int isp_csi2_ctx_config_ping_addr(u8 ctxnum, u32 ping_addr);
++int isp_csi2_ctx_config_pong_addr(u8 ctxnum, u32 pong_addr);
++int isp_csi2_ctx_config_eof_enabled(u8 ctxnum, bool eof_enabled);
++int isp_csi2_ctx_config_eol_enabled(u8 ctxnum, bool eol_enabled);
++int isp_csi2_ctx_config_checksum_enabled(u8 ctxnum, bool checksum_enabled);
++int isp_csi2_ctx_config_enabled(u8 ctxnum, bool enabled);
++int isp_csi2_ctx_update(u8 ctxnum, bool force_update);
++int isp_csi2_ctx_get(u8 ctxnum);
++int isp_csi2_ctx_update_all(bool force_update);
++int isp_csi2_ctx_get_all(void);
++int isp_csi2_phy_config(struct isp_csi2_phy_cfg *desiredphyconfig);
++int isp_csi2_calc_phy_cfg0(u32 mipiclk, u32 lbound_hs_settle,
++ u32 ubound_hs_settle);
++int isp_csi2_phy_update(bool force_update);
++int isp_csi2_phy_get(void);
++int isp_csi2_timings_config_forcerxmode(u8 io, bool force_rx_mode);
++int isp_csi2_timings_config_stopstate_16x(u8 io, bool stop_state_16x);
++int isp_csi2_timings_config_stopstate_4x(u8 io, bool stop_state_4x);
++int isp_csi2_timings_config_stopstate_cnt(u8 io, u16 stop_state_counter);
++int isp_csi2_timings_update(u8 io, bool force_update);
++int isp_csi2_timings_get(u8 io);
++int isp_csi2_timings_update_all(bool force_update);
++int isp_csi2_timings_get_all(void);
++void isp_csi2_irq_complexio1_set(int enable);
++void isp_csi2_irq_ctx_set(int enable);
++void isp_csi2_irq_status_set(int enable);
++void isp_csi2_irq_set(int enable);
++void isp_csi2_irq_all_set(int enable);
++
++void isp_csi2_isr(void);
++int isp_csi2_reset(void);
++void isp_csi2_enable(int enable);
++void isp_csi2_regdump(void);
++
++#endif /* OMAP_ISP_CSI2_H */
++
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0008-omap3isp-Add-ISP-tables.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0008-omap3isp-Add-ISP-tables.patch
new file mode 100644
index 0000000000..db023e514d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0008-omap3isp-Add-ISP-tables.patch
@@ -0,0 +1,4018 @@
+From 5de7cb2cac5f7d76cb025ddc8fb09c99a1007e08 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:02 +0200
+Subject: [PATCH] omap3isp: Add ISP tables
+
+* Blue Gamma gain table
+* CFA gain table
+* Green Gamma gain table
+* Luma Enhancement gain table
+* Noise filter gain table
+* Red Gamma gain table
+
+TODO:
+
+- Get rid of this kind of tables. Either generate them at runtime or
+ use a user space program to fill defaults.
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/isp/bluegamma_table.h | 1040 ++++++++++++++++++++++++++
+ drivers/media/video/isp/cfa_coef_table.h | 603 +++++++++++++++
+ drivers/media/video/isp/greengamma_table.h | 1040 ++++++++++++++++++++++++++
+ drivers/media/video/isp/luma_enhance_table.h | 144 ++++
+ drivers/media/video/isp/noise_filter_table.h | 79 ++
+ drivers/media/video/isp/redgamma_table.h | 1040 ++++++++++++++++++++++++++
+ 6 files changed, 3946 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/bluegamma_table.h
+ create mode 100644 drivers/media/video/isp/cfa_coef_table.h
+ create mode 100644 drivers/media/video/isp/greengamma_table.h
+ create mode 100644 drivers/media/video/isp/luma_enhance_table.h
+ create mode 100644 drivers/media/video/isp/noise_filter_table.h
+ create mode 100644 drivers/media/video/isp/redgamma_table.h
+
+diff --git a/drivers/media/video/isp/bluegamma_table.h b/drivers/media/video/isp/bluegamma_table.h
+new file mode 100644
+index 0000000..301382a
+--- /dev/null
++++ b/drivers/media/video/isp/bluegamma_table.h
+@@ -0,0 +1,1040 @@
++/*
++ * bluegamma_table.h
++ *
++ * Gamma Table values for BLUE for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++0,
++0,
++1,
++2,
++3,
++3,
++4,
++5,
++6,
++8,
++10,
++12,
++14,
++16,
++18,
++20,
++22,
++23,
++25,
++26,
++28,
++29,
++31,
++32,
++34,
++35,
++36,
++37,
++39,
++40,
++41,
++42,
++43,
++44,
++45,
++46,
++47,
++48,
++49,
++50,
++51,
++52,
++52,
++53,
++54,
++55,
++56,
++57,
++58,
++59,
++60,
++61,
++62,
++63,
++63,
++64,
++65,
++66,
++66,
++67,
++68,
++69,
++69,
++70,
++71,
++72,
++72,
++73,
++74,
++75,
++75,
++76,
++77,
++78,
++78,
++79,
++80,
++81,
++81,
++82,
++83,
++84,
++84,
++85,
++86,
++87,
++88,
++88,
++89,
++90,
++91,
++91,
++92,
++93,
++94,
++94,
++95,
++96,
++97,
++97,
++98,
++98,
++99,
++99,
++100,
++100,
++101,
++101,
++102,
++103,
++104,
++104,
++105,
++106,
++107,
++108,
++108,
++109,
++110,
++111,
++111,
++112,
++113,
++114,
++114,
++115,
++116,
++117,
++117,
++118,
++119,
++119,
++120,
++120,
++121,
++121,
++122,
++122,
++123,
++123,
++124,
++124,
++125,
++125,
++126,
++126,
++127,
++127,
++128,
++128,
++129,
++129,
++130,
++130,
++131,
++131,
++132,
++132,
++133,
++133,
++134,
++134,
++135,
++135,
++136,
++136,
++137,
++137,
++138,
++138,
++139,
++139,
++140,
++140,
++141,
++141,
++142,
++142,
++143,
++143,
++144,
++144,
++145,
++145,
++146,
++146,
++147,
++147,
++148,
++148,
++149,
++149,
++150,
++150,
++151,
++151,
++152,
++152,
++153,
++153,
++153,
++153,
++154,
++154,
++154,
++154,
++155,
++155,
++156,
++156,
++157,
++157,
++158,
++158,
++158,
++159,
++159,
++159,
++160,
++160,
++160,
++161,
++161,
++162,
++162,
++163,
++163,
++164,
++164,
++164,
++164,
++165,
++165,
++165,
++165,
++166,
++166,
++167,
++167,
++168,
++168,
++169,
++169,
++170,
++170,
++170,
++170,
++171,
++171,
++171,
++171,
++172,
++172,
++173,
++173,
++174,
++174,
++175,
++175,
++176,
++176,
++176,
++176,
++177,
++177,
++177,
++177,
++178,
++178,
++178,
++178,
++179,
++179,
++179,
++179,
++180,
++180,
++180,
++180,
++181,
++181,
++181,
++181,
++182,
++182,
++182,
++182,
++183,
++183,
++183,
++183,
++184,
++184,
++184,
++184,
++185,
++185,
++185,
++185,
++186,
++186,
++186,
++186,
++187,
++187,
++187,
++187,
++188,
++188,
++188,
++188,
++189,
++189,
++189,
++189,
++190,
++190,
++190,
++190,
++191,
++191,
++191,
++191,
++192,
++192,
++192,
++192,
++193,
++193,
++193,
++193,
++194,
++194,
++194,
++194,
++195,
++195,
++195,
++195,
++196,
++196,
++196,
++196,
++197,
++197,
++197,
++197,
++198,
++198,
++198,
++198,
++199,
++199,
++199,
++199,
++200,
++200,
++200,
++200,
++201,
++201,
++201,
++201,
++202,
++202,
++202,
++203,
++203,
++203,
++203,
++204,
++204,
++204,
++204,
++205,
++205,
++205,
++205,
++206,
++206,
++206,
++206,
++207,
++207,
++207,
++207,
++208,
++208,
++208,
++208,
++209,
++209,
++209,
++209,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++212,
++212,
++212,
++212,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++214,
++214,
++214,
++214,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++216,
++216,
++216,
++216,
++217,
++217,
++217,
++217,
++218,
++218,
++218,
++218,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++220,
++220,
++220,
++220,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++222,
++222,
++222,
++222,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++224,
++224,
++224,
++224,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++226,
++226,
++226,
++226,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++228,
++228,
++228,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++230,
++230,
++230,
++230,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++233,
++233,
++233,
++233,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++235,
++235,
++235,
++235,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++237,
++237,
++237,
++237,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++239,
++239,
++239,
++239,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++241,
++241,
++241,
++241,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++243,
++243,
++243,
++243,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++245,
++245,
++245,
++245,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++247,
++247,
++247,
++247,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++249,
++249,
++249,
++249,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++251,
++251,
++251,
++251,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++254,
++254,
++254,
++254,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255
+diff --git a/drivers/media/video/isp/cfa_coef_table.h b/drivers/media/video/isp/cfa_coef_table.h
+new file mode 100644
+index 0000000..8cafa1f
+--- /dev/null
++++ b/drivers/media/video/isp/cfa_coef_table.h
+@@ -0,0 +1,603 @@
++/*
++ * cfa_coef_table.h
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ *
++ * Contact: Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ *
++ * Written by Gjorgji Rosikopulos
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++244,
++0,
++247,
++0,
++12,
++27,
++36,
++247,
++250,
++0,
++27,
++0,
++4,
++250,
++12,
++244,
++248,
++0,
++0,
++0,
++0,
++40,
++0,
++0,
++244,
++12,
++250,
++4,
++0,
++27,
++0,
++250,
++247,
++36,
++27,
++12,
++0,
++247,
++0,
++244,
++0,
++0,
++40,
++0,
++0,
++0,
++0,
++248,
++244,
++0,
++247,
++0,
++12,
++27,
++36,
++247,
++250,
++0,
++27,
++0,
++4,
++250,
++12,
++244,
++248,
++0,
++0,
++0,
++0,
++40,
++0,
++0,
++244,
++12,
++250,
++4,
++0,
++27,
++0,
++250,
++247,
++36,
++27,
++12,
++0,
++247,
++0,
++244,
++0,
++0,
++40,
++0,
++0,
++0,
++0,
++248,
++244,
++0,
++247,
++0,
++12,
++27,
++36,
++247,
++250,
++0,
++27,
++0,
++4,
++250,
++12,
++244,
++248,
++0,
++0,
++0,
++0,
++40,
++0,
++0,
++244,
++12,
++250,
++4,
++0,
++27,
++0,
++250,
++247,
++36,
++27,
++12,
++0,
++247,
++0,
++244,
++0,
++0,
++40,
++0,
++0,
++0,
++0,
++248,
++0,
++247,
++0,
++244,
++247,
++36,
++27,
++12,
++0,
++27,
++0,
++250,
++244,
++12,
++250,
++4,
++0,
++0,
++0,
++248,
++0,
++0,
++40,
++0,
++4,
++250,
++12,
++244,
++250,
++0,
++27,
++0,
++12,
++27,
++36,
++247,
++244,
++0,
++247,
++0,
++0,
++40,
++0,
++0,
++248,
++0,
++0,
++0,
++0,
++247,
++0,
++244,
++247,
++36,
++27,
++12,
++0,
++27,
++0,
++250,
++244,
++12,
++250,
++4,
++0,
++0,
++0,
++248,
++0,
++0,
++40,
++0,
++4,
++250,
++12,
++244,
++250,
++0,
++27,
++0,
++12,
++27,
++36,
++247,
++244,
++0,
++247,
++0,
++0,
++40,
++0,
++0,
++248,
++0,
++0,
++0,
++0,
++247,
++0,
++244,
++247,
++36,
++27,
++12,
++0,
++27,
++0,
++250,
++244,
++12,
++250,
++4,
++0,
++0,
++0,
++248,
++0,
++0,
++40,
++0,
++4,
++250,
++12,
++244,
++250,
++0,
++27,
++0,
++12,
++27,
++36,
++247,
++244,
++0,
++247,
++0,
++0,
++40,
++0,
++0,
++248,
++0,
++0,
++0,
++4,
++250,
++12,
++244,
++250,
++0,
++27,
++0,
++12,
++27,
++36,
++247,
++244,
++0,
++247,
++0,
++0,
++0,
++0,
++248,
++0,
++0,
++40,
++0,
++0,
++247,
++0,
++244,
++247,
++36,
++27,
++12,
++0,
++27,
++0,
++250,
++244,
++12,
++250,
++4,
++0,
++40,
++0,
++0,
++248,
++0,
++0,
++0,
++4,
++250,
++12,
++244,
++250,
++0,
++27,
++0,
++12,
++27,
++36,
++247,
++244,
++0,
++247,
++0,
++0,
++0,
++0,
++248,
++0,
++0,
++40,
++0,
++0,
++247,
++0,
++244,
++247,
++36,
++27,
++12,
++0,
++27,
++0,
++250,
++244,
++12,
++250,
++4,
++0,
++40,
++0,
++0,
++248,
++0,
++0,
++0,
++4,
++250,
++12,
++244,
++250,
++0,
++27,
++0,
++12,
++27,
++36,
++247,
++244,
++0,
++247,
++0,
++0,
++0,
++0,
++248,
++0,
++0,
++40,
++0,
++0,
++247,
++0,
++244,
++247,
++36,
++27,
++12,
++0,
++27,
++0,
++250,
++244,
++12,
++250,
++4,
++0,
++40,
++0,
++0,
++248,
++0,
++0,
++0,
++244,
++12,
++250,
++4,
++0,
++27,
++0,
++250,
++247,
++36,
++27,
++12,
++0,
++247,
++0,
++244,
++248,
++0,
++0,
++0,
++0,
++40,
++0,
++0,
++244,
++0,
++247,
++0,
++12,
++27,
++36,
++247,
++250,
++0,
++27,
++0,
++4,
++250,
++12,
++244,
++0,
++0,
++40,
++0,
++0,
++0,
++0,
++248,
++244,
++12,
++250,
++4,
++0,
++27,
++0,
++250,
++247,
++36,
++27,
++12,
++0,
++247,
++0,
++244,
++248,
++0,
++0,
++0,
++0,
++40,
++0,
++0,
++244,
++0,
++247,
++0,
++12,
++27,
++36,
++247,
++250,
++0,
++27,
++0,
++4,
++250,
++12,
++244,
++0,
++0,
++40,
++0,
++0,
++0,
++0,
++248,
++244,
++12,
++250,
++4,
++0,
++27,
++0,
++250,
++247,
++36,
++27,
++12,
++0,
++247,
++0,
++244,
++248,
++0,
++0,
++0,
++0,
++40,
++0,
++0,
++244,
++0,
++247,
++0,
++12,
++27,
++36,
++247,
++250,
++0,
++27,
++0,
++4,
++250,
++12,
++244,
++0,
++0,
++40,
++0,
++0,
++0,
++0,
++248
++
+diff --git a/drivers/media/video/isp/greengamma_table.h b/drivers/media/video/isp/greengamma_table.h
+new file mode 100644
+index 0000000..0f5c5e4
+--- /dev/null
++++ b/drivers/media/video/isp/greengamma_table.h
+@@ -0,0 +1,1040 @@
++/*
++ * greengamma_table.h
++ *
++ * Gamma Table values for GREEN for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++0,
++0,
++1,
++2,
++3,
++3,
++4,
++5,
++6,
++8,
++10,
++12,
++14,
++16,
++18,
++20,
++22,
++23,
++25,
++26,
++28,
++29,
++31,
++32,
++34,
++35,
++36,
++37,
++39,
++40,
++41,
++42,
++43,
++44,
++45,
++46,
++47,
++48,
++49,
++50,
++51,
++52,
++52,
++53,
++54,
++55,
++56,
++57,
++58,
++59,
++60,
++61,
++62,
++63,
++63,
++64,
++65,
++66,
++66,
++67,
++68,
++69,
++69,
++70,
++71,
++72,
++72,
++73,
++74,
++75,
++75,
++76,
++77,
++78,
++78,
++79,
++80,
++81,
++81,
++82,
++83,
++84,
++84,
++85,
++86,
++87,
++88,
++88,
++89,
++90,
++91,
++91,
++92,
++93,
++94,
++94,
++95,
++96,
++97,
++97,
++98,
++98,
++99,
++99,
++100,
++100,
++101,
++101,
++102,
++103,
++104,
++104,
++105,
++106,
++107,
++108,
++108,
++109,
++110,
++111,
++111,
++112,
++113,
++114,
++114,
++115,
++116,
++117,
++117,
++118,
++119,
++119,
++120,
++120,
++121,
++121,
++122,
++122,
++123,
++123,
++124,
++124,
++125,
++125,
++126,
++126,
++127,
++127,
++128,
++128,
++129,
++129,
++130,
++130,
++131,
++131,
++132,
++132,
++133,
++133,
++134,
++134,
++135,
++135,
++136,
++136,
++137,
++137,
++138,
++138,
++139,
++139,
++140,
++140,
++141,
++141,
++142,
++142,
++143,
++143,
++144,
++144,
++145,
++145,
++146,
++146,
++147,
++147,
++148,
++148,
++149,
++149,
++150,
++150,
++151,
++151,
++152,
++152,
++153,
++153,
++153,
++153,
++154,
++154,
++154,
++154,
++155,
++155,
++156,
++156,
++157,
++157,
++158,
++158,
++158,
++159,
++159,
++159,
++160,
++160,
++160,
++161,
++161,
++162,
++162,
++163,
++163,
++164,
++164,
++164,
++164,
++165,
++165,
++165,
++165,
++166,
++166,
++167,
++167,
++168,
++168,
++169,
++169,
++170,
++170,
++170,
++170,
++171,
++171,
++171,
++171,
++172,
++172,
++173,
++173,
++174,
++174,
++175,
++175,
++176,
++176,
++176,
++176,
++177,
++177,
++177,
++177,
++178,
++178,
++178,
++178,
++179,
++179,
++179,
++179,
++180,
++180,
++180,
++180,
++181,
++181,
++181,
++181,
++182,
++182,
++182,
++182,
++183,
++183,
++183,
++183,
++184,
++184,
++184,
++184,
++185,
++185,
++185,
++185,
++186,
++186,
++186,
++186,
++187,
++187,
++187,
++187,
++188,
++188,
++188,
++188,
++189,
++189,
++189,
++189,
++190,
++190,
++190,
++190,
++191,
++191,
++191,
++191,
++192,
++192,
++192,
++192,
++193,
++193,
++193,
++193,
++194,
++194,
++194,
++194,
++195,
++195,
++195,
++195,
++196,
++196,
++196,
++196,
++197,
++197,
++197,
++197,
++198,
++198,
++198,
++198,
++199,
++199,
++199,
++199,
++200,
++200,
++200,
++200,
++201,
++201,
++201,
++201,
++202,
++202,
++202,
++203,
++203,
++203,
++203,
++204,
++204,
++204,
++204,
++205,
++205,
++205,
++205,
++206,
++206,
++206,
++206,
++207,
++207,
++207,
++207,
++208,
++208,
++208,
++208,
++209,
++209,
++209,
++209,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++212,
++212,
++212,
++212,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++214,
++214,
++214,
++214,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++216,
++216,
++216,
++216,
++217,
++217,
++217,
++217,
++218,
++218,
++218,
++218,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++220,
++220,
++220,
++220,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++222,
++222,
++222,
++222,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++224,
++224,
++224,
++224,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++226,
++226,
++226,
++226,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++228,
++228,
++228,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++230,
++230,
++230,
++230,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++233,
++233,
++233,
++233,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++235,
++235,
++235,
++235,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++237,
++237,
++237,
++237,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++239,
++239,
++239,
++239,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++241,
++241,
++241,
++241,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++243,
++243,
++243,
++243,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++245,
++245,
++245,
++245,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++247,
++247,
++247,
++247,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++249,
++249,
++249,
++249,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++251,
++251,
++251,
++251,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++254,
++254,
++254,
++254,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255
+diff --git a/drivers/media/video/isp/luma_enhance_table.h b/drivers/media/video/isp/luma_enhance_table.h
+new file mode 100644
+index 0000000..99c8b05
+--- /dev/null
++++ b/drivers/media/video/isp/luma_enhance_table.h
+@@ -0,0 +1,144 @@
++/*
++ * luma_enhance_table.h
++ *
++ * Luminance Enhancement table values for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1047552,
++1048575,
++1047551,
++1046527,
++1045503,
++1044479,
++1043455,
++1042431,
++1041407,
++1040383,
++1039359,
++1038335,
++1037311,
++1036287,
++1035263,
++1034239,
++1033215,
++1032191,
++1031167,
++1030143,
++1028096,
++1028096,
++1028096,
++1028096,
++1028096,
++1028096,
++1028096,
++1028096,
++1028096,
++1028096,
++1028100,
++1032196,
++1036292,
++1040388,
++1044484,
++0,
++0,
++0,
++5,
++5125,
++10245,
++15365,
++20485,
++25605,
++30720,
++30720,
++30720,
++30720,
++30720,
++30720,
++30720,
++30720,
++30720,
++30720,
++30720,
++31743,
++30719,
++29695,
++28671,
++27647,
++26623,
++25599,
++24575,
++23551,
++22527,
++21503,
++20479,
++19455,
++18431,
++17407,
++16383,
++15359,
++14335,
++13311,
++12287,
++11263,
++10239,
++9215,
++8191,
++7167,
++6143,
++5119,
++4095,
++3071,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024,
++1024
+diff --git a/drivers/media/video/isp/noise_filter_table.h b/drivers/media/video/isp/noise_filter_table.h
+new file mode 100644
+index 0000000..7345f90
+--- /dev/null
++++ b/drivers/media/video/isp/noise_filter_table.h
+@@ -0,0 +1,79 @@
++/*
++ * noise_filter_table.h
++ *
++ * Noise Filter Table values for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++16,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31,
++31
+diff --git a/drivers/media/video/isp/redgamma_table.h b/drivers/media/video/isp/redgamma_table.h
+new file mode 100644
+index 0000000..ad0232a
+--- /dev/null
++++ b/drivers/media/video/isp/redgamma_table.h
+@@ -0,0 +1,1040 @@
++/*
++ * redgamma_table.h
++ *
++ * Gamma Table values for RED for TI's OMAP3 Camera ISP
++ *
++ * Copyright (C) 2009 Texas Instruments, Inc.
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++0,
++0,
++1,
++2,
++3,
++3,
++4,
++5,
++6,
++8,
++10,
++12,
++14,
++16,
++18,
++20,
++22,
++23,
++25,
++26,
++28,
++29,
++31,
++32,
++34,
++35,
++36,
++37,
++39,
++40,
++41,
++42,
++43,
++44,
++45,
++46,
++47,
++48,
++49,
++50,
++51,
++52,
++52,
++53,
++54,
++55,
++56,
++57,
++58,
++59,
++60,
++61,
++62,
++63,
++63,
++64,
++65,
++66,
++66,
++67,
++68,
++69,
++69,
++70,
++71,
++72,
++72,
++73,
++74,
++75,
++75,
++76,
++77,
++78,
++78,
++79,
++80,
++81,
++81,
++82,
++83,
++84,
++84,
++85,
++86,
++87,
++88,
++88,
++89,
++90,
++91,
++91,
++92,
++93,
++94,
++94,
++95,
++96,
++97,
++97,
++98,
++98,
++99,
++99,
++100,
++100,
++101,
++101,
++102,
++103,
++104,
++104,
++105,
++106,
++107,
++108,
++108,
++109,
++110,
++111,
++111,
++112,
++113,
++114,
++114,
++115,
++116,
++117,
++117,
++118,
++119,
++119,
++120,
++120,
++121,
++121,
++122,
++122,
++123,
++123,
++124,
++124,
++125,
++125,
++126,
++126,
++127,
++127,
++128,
++128,
++129,
++129,
++130,
++130,
++131,
++131,
++132,
++132,
++133,
++133,
++134,
++134,
++135,
++135,
++136,
++136,
++137,
++137,
++138,
++138,
++139,
++139,
++140,
++140,
++141,
++141,
++142,
++142,
++143,
++143,
++144,
++144,
++145,
++145,
++146,
++146,
++147,
++147,
++148,
++148,
++149,
++149,
++150,
++150,
++151,
++151,
++152,
++152,
++153,
++153,
++153,
++153,
++154,
++154,
++154,
++154,
++155,
++155,
++156,
++156,
++157,
++157,
++158,
++158,
++158,
++159,
++159,
++159,
++160,
++160,
++160,
++161,
++161,
++162,
++162,
++163,
++163,
++164,
++164,
++164,
++164,
++165,
++165,
++165,
++165,
++166,
++166,
++167,
++167,
++168,
++168,
++169,
++169,
++170,
++170,
++170,
++170,
++171,
++171,
++171,
++171,
++172,
++172,
++173,
++173,
++174,
++174,
++175,
++175,
++176,
++176,
++176,
++176,
++177,
++177,
++177,
++177,
++178,
++178,
++178,
++178,
++179,
++179,
++179,
++179,
++180,
++180,
++180,
++180,
++181,
++181,
++181,
++181,
++182,
++182,
++182,
++182,
++183,
++183,
++183,
++183,
++184,
++184,
++184,
++184,
++185,
++185,
++185,
++185,
++186,
++186,
++186,
++186,
++187,
++187,
++187,
++187,
++188,
++188,
++188,
++188,
++189,
++189,
++189,
++189,
++190,
++190,
++190,
++190,
++191,
++191,
++191,
++191,
++192,
++192,
++192,
++192,
++193,
++193,
++193,
++193,
++194,
++194,
++194,
++194,
++195,
++195,
++195,
++195,
++196,
++196,
++196,
++196,
++197,
++197,
++197,
++197,
++198,
++198,
++198,
++198,
++199,
++199,
++199,
++199,
++200,
++200,
++200,
++200,
++201,
++201,
++201,
++201,
++202,
++202,
++202,
++203,
++203,
++203,
++203,
++204,
++204,
++204,
++204,
++205,
++205,
++205,
++205,
++206,
++206,
++206,
++206,
++207,
++207,
++207,
++207,
++208,
++208,
++208,
++208,
++209,
++209,
++209,
++209,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++210,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++211,
++212,
++212,
++212,
++212,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++213,
++214,
++214,
++214,
++214,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++215,
++216,
++216,
++216,
++216,
++217,
++217,
++217,
++217,
++218,
++218,
++218,
++218,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++219,
++220,
++220,
++220,
++220,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++221,
++222,
++222,
++222,
++222,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++223,
++224,
++224,
++224,
++224,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++225,
++226,
++226,
++226,
++226,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++227,
++228,
++228,
++228,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++229,
++230,
++230,
++230,
++230,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++231,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++232,
++233,
++233,
++233,
++233,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++234,
++235,
++235,
++235,
++235,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++236,
++237,
++237,
++237,
++237,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++238,
++239,
++239,
++239,
++239,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++240,
++241,
++241,
++241,
++241,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++242,
++243,
++243,
++243,
++243,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++244,
++245,
++245,
++245,
++245,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++246,
++247,
++247,
++247,
++247,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++248,
++249,
++249,
++249,
++249,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++250,
++251,
++251,
++251,
++251,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++252,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++253,
++254,
++254,
++254,
++254,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255,
++255
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0009-omap34xxcam-Add-camera-driver.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0009-omap34xxcam-Add-camera-driver.patch
new file mode 100644
index 0000000000..22074be148
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/omap3camera/0009-omap34xxcam-Add-camera-driver.patch
@@ -0,0 +1,2249 @@
+From 0edf5a50dc0164db5bc71b1a5d1aa8bb1838262c Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+Date: Tue, 10 Mar 2009 10:49:03 +0200
+Subject: [PATCH] omap34xxcam: Add camera driver
+
+This is the camera driver for the OMAP 3 camera ISP and v4l2-int-device
+sensors, lenses and (led) flashes. There are a few connections to OMAP
+3 left but after those have been broken this is hardware independent.
+Namely, the OMAP 3 ISP must offer a standard interface through
+v4l2_subdev (or v4l2-int-device) first.
+
+This driver has originated from the omap24xxcam camera driver written
+specifically for OMAP 2.
+
+TODO:
+
+- Convert to use v4l2_subdev instead of v4l2-int-device.
+
+Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
+---
+ drivers/media/video/Kconfig | 9 +
+ drivers/media/video/Makefile | 2 +
+ drivers/media/video/omap34xxcam.c | 1966 +++++++++++++++++++++++++++++++++++++
+ drivers/media/video/omap34xxcam.h | 207 ++++
+ 4 files changed, 2184 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/omap34xxcam.c
+ create mode 100644 drivers/media/video/omap34xxcam.h
+
+diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
+index 19cf3b8..3cdb5a4 100644
+--- a/drivers/media/video/Kconfig
++++ b/drivers/media/video/Kconfig
+@@ -711,6 +711,15 @@ config VIDEO_CAFE_CCIC
+ CMOS camera controller. This is the controller found on first-
+ generation OLPC systems.
+
++config VIDEO_OMAP3
++ tristate "OMAP 3 Camera support"
++ select VIDEOBUF_GEN
++ select VIDEOBUF_DMA_SG
++ select OMAP_IOMMU
++ depends on VIDEO_V4L2 && ARCH_OMAP34XX
++ ---help---
++ Driver for an OMAP 3 camera controller.
++
+ config SOC_CAMERA
+ tristate "SoC camera support"
+ depends on VIDEO_V4L2 && HAS_DMA
+diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
+index e654270..74a684e 100644
+--- a/drivers/media/video/Makefile
++++ b/drivers/media/video/Makefile
+@@ -108,6 +108,8 @@ obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
+
+ obj-y += isp/
+
++obj-$(CONFIG_VIDEO_OMAP3) += omap34xxcam.o
++
+ obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
+
+ obj-$(CONFIG_USB_DABUSB) += dabusb.o
+diff --git a/drivers/media/video/omap34xxcam.c b/drivers/media/video/omap34xxcam.c
+new file mode 100644
+index 0000000..00fdbf2
+--- /dev/null
++++ b/drivers/media/video/omap34xxcam.c
+@@ -0,0 +1,1966 @@
++/*
++ * omap34xxcam.c
++ *
++ * Copyright (C) 2006--2009 Nokia Corporation
++ * Copyright (C) 2007--2009 Texas Instruments
++ *
++ * Contact: Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ *
++ * Originally based on the OMAP 2 camera driver.
++ *
++ * Written by Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Mohit Jalori
++ * Sameer Venkatraman
++ * Leonides Martinez
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <linux/io.h>
++#include <linux/clk.h>
++#include <linux/pci.h> /* needed for videobufs */
++#include <linux/delay.h>
++#include <linux/kernel.h>
++#include <linux/interrupt.h>
++#include <linux/videodev2.h>
++#include <linux/version.h>
++#include <linux/platform_device.h>
++
++#include <media/v4l2-common.h>
++#include <media/v4l2-ioctl.h>
++
++#include "omap34xxcam.h"
++#include "isp/isp.h"
++#include "isp/ispmmu.h"
++#include "isp/ispreg.h"
++#include "isp/ispccdc.h"
++#include "isp/isph3a.h"
++#include "isp/isp_af.h"
++#include "isp/isphist.h"
++#include "isp/isppreview.h"
++#include "isp/ispresizer.h"
++
++#define OMAP34XXCAM_VERSION KERNEL_VERSION(0, 0, 0)
++
++/* global variables */
++static struct omap34xxcam_device *omap34xxcam;
++
++/*
++ *
++ * Sensor handling.
++ *
++ */
++
++/**
++ * omap34xxcam_slave_power_set - set slave power state
++ * @vdev: per-video device data structure
++ * @power: new power state
++ */
++static int omap34xxcam_slave_power_set(struct omap34xxcam_videodev *vdev,
++ enum v4l2_power power,
++ int mask)
++{
++ int rval = 0, i = 0;
++
++ BUG_ON(!mutex_is_locked(&vdev->mutex));
++
++#ifdef OMAP34XXCAM_POWEROFF_DELAY
++ vdev->power_state_wish = -1;
++#endif
++
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ if (vdev->slave[i] == v4l2_int_device_dummy())
++ continue;
++
++ if (!(mask & (1 << i))
++ || power == vdev->power_state[i])
++ continue;
++
++ rval = vidioc_int_s_power(vdev->slave[i], power);
++
++ if (rval && power != V4L2_POWER_OFF) {
++ power = V4L2_POWER_OFF;
++ goto out;
++ }
++
++ vdev->power_state[i] = power;
++ }
++
++ return 0;
++
++out:
++ for (i--; i >= 0; i--) {
++ if (vdev->slave[i] == v4l2_int_device_dummy())
++ continue;
++
++ if (!(mask & (1 << i)))
++ continue;
++
++ vidioc_int_s_power(vdev->slave[i], power);
++ vdev->power_state[i] = power;
++ }
++
++ return rval;
++}
++
++#ifdef OMAP34XXCAM_POWEROFF_DELAY
++static void omap34xxcam_slave_power_work(struct work_struct *work)
++{
++ struct omap34xxcam_videodev *vdev =
++ container_of(work, struct omap34xxcam_videodev, poweroff_work);
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->power_state_wish != -1)
++ omap34xxcam_slave_power_set(vdev, vdev->power_state_wish,
++ vdev->power_state_mask);
++
++ mutex_unlock(&vdev->mutex);
++}
++
++static void omap34xxcam_slave_power_timer(unsigned long ptr)
++{
++ struct omap34xxcam_videodev *vdev = (void *)ptr;
++
++ schedule_work(&vdev->poweroff_work);
++}
++
++/**
++ * omap34xxcam_slave_power_suggest - delayed power state change
++ *
++ * @vdev: per-video device data structure
++ * @power: new power state
++ */
++static void omap34xxcam_slave_power_suggest(struct omap34xxcam_videodev *vdev,
++ enum v4l2_power power,
++ int mask)
++{
++ BUG_ON(!mutex_is_locked(&vdev->mutex));
++
++ del_timer(&vdev->poweroff_timer);
++
++ vdev->power_state_wish = power;
++ vdev->power_state_mask = mask;
++
++ mod_timer(&vdev->poweroff_timer, jiffies + OMAP34XXCAM_POWEROFF_DELAY);
++}
++#else /* OMAP34XXCAM_POWEROFF_DELAY */
++#define omap34xxcam_slave_power_suggest(a, b, c) do {} while (0)
++#endif /* OMAP34XXCAM_POWEROFF_DELAY */
++
++/**
++ * omap34xxcam_update_vbq - Updates VBQ with completed input buffer
++ * @vb: ptr. to standard V4L2 video buffer structure
++ *
++ * Updates video buffer queue with completed buffer passed as
++ * input parameter. Also updates ISP H3A timestamp and field count
++ * statistics.
++ */
++void omap34xxcam_vbq_complete(struct videobuf_buffer *vb, void *priv)
++{
++ struct omap34xxcam_fh *fh = priv;
++
++ do_gettimeofday(&vb->ts);
++ vb->field_count = atomic_add_return(2, &fh->field_count);
++
++ wake_up(&vb->done);
++}
++
++/**
++ * omap34xxcam_vbq_setup - Calcs size and num of buffs allowed in queue
++ * @vbq: ptr. to standard V4L2 video buffer queue structure
++ * @cnt: ptr to location to hold the count of buffers to be in the queue
++ * @size: ptr to location to hold the size of a frame
++ *
++ * Calculates the number of buffers of current image size that can be
++ * supported by the available capture memory.
++ */
++static int omap34xxcam_vbq_setup(struct videobuf_queue *vbq, unsigned int *cnt,
++ unsigned int *size)
++{
++ struct omap34xxcam_fh *fh = vbq->priv_data;
++ struct omap34xxcam_videodev *vdev = fh->vdev;
++
++ if (*cnt <= 0)
++ *cnt = VIDEO_MAX_FRAME; /* supply a default number of buffers */
++
++ if (*cnt > VIDEO_MAX_FRAME)
++ *cnt = VIDEO_MAX_FRAME;
++
++ *size = vdev->pix.sizeimage;
++
++ while (*size * *cnt > fh->vdev->vdev_sensor_config.capture_mem)
++ (*cnt)--;
++
++ return isp_vbq_setup(vbq, cnt, size);
++}
++
++/**
++ * omap34xxcam_vbq_release - Free resources for input VBQ and VB
++ * @vbq: ptr. to standard V4L2 video buffer queue structure
++ * @vb: ptr to standard V4L2 video buffer structure
++ *
++ * Unmap and free all memory associated with input VBQ and VB, also
++ * unmap the address in ISP MMU. Reset the VB state.
++ */
++static void omap34xxcam_vbq_release(struct videobuf_queue *vbq,
++ struct videobuf_buffer *vb)
++{
++ if (!vbq->streaming) {
++ isp_vbq_release(vbq, vb);
++ videobuf_dma_unmap(vbq, videobuf_to_dma(vb));
++ videobuf_dma_free(videobuf_to_dma(vb));
++ vb->state = VIDEOBUF_NEEDS_INIT;
++ }
++ return;
++}
++
++/**
++ * omap34xxcam_vbq_prepare - V4L2 video ops buf_prepare handler
++ * @vbq: ptr. to standard V4L2 video buffer queue structure
++ * @vb: ptr to standard V4L2 video buffer structure
++ * @field: standard V4L2 field enum
++ *
++ * Verifies there is sufficient locked memory for the requested
++ * buffer, or if there is not, allocates, locks and initializes
++ * it.
++ */
++static int omap34xxcam_vbq_prepare(struct videobuf_queue *vbq,
++ struct videobuf_buffer *vb,
++ enum v4l2_field field)
++{
++ struct omap34xxcam_fh *fh = vbq->priv_data;
++ struct omap34xxcam_videodev *vdev = fh->vdev;
++ int err = 0;
++
++ /*
++ * Accessing pix here is okay since it's constant while
++ * streaming is on (and we only get called then).
++ */
++ if (vb->baddr) {
++ /* This is a userspace buffer. */
++ if (vdev->pix.sizeimage > vb->bsize)
++ /* The buffer isn't big enough. */
++ return -EINVAL;
++ } else {
++ if (vb->state != VIDEOBUF_NEEDS_INIT
++ && vdev->pix.sizeimage > vb->bsize)
++ /*
++ * We have a kernel bounce buffer that has
++ * already been allocated.
++ */
++ omap34xxcam_vbq_release(vbq, vb);
++ }
++
++ vb->size = vdev->pix.bytesperline * vdev->pix.height;
++ vb->width = vdev->pix.width;
++ vb->height = vdev->pix.height;
++ vb->field = field;
++
++ if (vb->state == VIDEOBUF_NEEDS_INIT) {
++ err = videobuf_iolock(vbq, vb, NULL);
++ if (!err) {
++ /* isp_addr will be stored locally inside isp code */
++ err = isp_vbq_prepare(vbq, vb, field);
++ }
++ }
++
++ if (!err)
++ vb->state = VIDEOBUF_PREPARED;
++ else
++ omap34xxcam_vbq_release(vbq, vb);
++
++ return err;
++}
++
++/**
++ * omap34xxcam_vbq_queue - V4L2 video ops buf_queue handler
++ * @vbq: ptr. to standard V4L2 video buffer queue structure
++ * @vb: ptr to standard V4L2 video buffer structure
++ *
++ * Maps the video buffer to sgdma and through the isp, sets
++ * the isp buffer done callback and sets the video buffer state
++ * to active.
++ */
++static void omap34xxcam_vbq_queue(struct videobuf_queue *vbq,
++ struct videobuf_buffer *vb)
++{
++ struct omap34xxcam_fh *fh = vbq->priv_data;
++
++ vb->state = VIDEOBUF_ACTIVE;
++
++ isp_buf_queue(vb, omap34xxcam_vbq_complete, (void *)fh);
++}
++
++static struct videobuf_queue_ops omap34xxcam_vbq_ops = {
++ .buf_setup = omap34xxcam_vbq_setup,
++ .buf_prepare = omap34xxcam_vbq_prepare,
++ .buf_queue = omap34xxcam_vbq_queue,
++ .buf_release = omap34xxcam_vbq_release,
++};
++
++/*
++ *
++ * IOCTL interface.
++ *
++ */
++
++/**
++ * vidioc_querycap - V4L2 query capabilities IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @cap: ptr to standard V4L2 capability structure
++ *
++ * Fill in the V4L2 capabliity structure for the camera device
++ */
++static int vidioc_querycap(struct file *file, void *fh,
++ struct v4l2_capability *cap)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++
++ strlcpy(cap->driver, CAM_SHORT_NAME, sizeof(cap->driver));
++ strlcpy(cap->card, vdev->vfd->name, sizeof(cap->card));
++ cap->version = OMAP34XXCAM_VERSION;
++ if (vdev->vdev_sensor != v4l2_int_device_dummy())
++ cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
++
++ return 0;
++}
++
++/**
++ * vidioc_enum_fmt_vid_cap - V4L2 enumerate format capabilities IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @f: ptr to standard V4L2 format description structure
++ *
++ * Fills in enumerate format capabilities information for sensor (if SOC
++ * sensor attached) or ISP (if raw sensor attached).
++ */
++static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh,
++ struct v4l2_fmtdesc *f)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ if (vdev->vdev_sensor_config.sensor_isp)
++ rval = vidioc_int_enum_fmt_cap(vdev->vdev_sensor, f);
++ else
++ rval = isp_enum_fmt_cap(f);
++
++ return rval;
++}
++
++/**
++ * vidioc_g_fmt_vid_cap - V4L2 get format capabilities IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @f: ptr to standard V4L2 format structure
++ *
++ * Fills in format capabilities for sensor (if SOC sensor attached) or ISP
++ * (if raw sensor attached).
++ */
++static int vidioc_g_fmt_vid_cap(struct file *file, void *fh,
++ struct v4l2_format *f)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++ f->fmt.pix = vdev->pix;
++ mutex_unlock(&vdev->mutex);
++
++ return 0;
++}
++
++static int try_pix_parm(struct omap34xxcam_videodev *vdev,
++ struct v4l2_pix_format *best_pix_in,
++ struct v4l2_pix_format *wanted_pix_out,
++ struct v4l2_fract *best_ival)
++{
++ int fps;
++ int fmtd_index;
++ int rval;
++ struct v4l2_pix_format best_pix_out;
++
++ if (best_ival->numerator == 0
++ || best_ival->denominator == 0)
++ *best_ival = vdev->vdev_sensor_config.ival_default;
++
++ fps = best_ival->denominator / best_ival->numerator;
++
++ best_ival->denominator = 0;
++ best_pix_out.height = INT_MAX >> 1;
++ best_pix_out.width = best_pix_out.height;
++
++ for (fmtd_index = 0; ; fmtd_index++) {
++ int size_index;
++ struct v4l2_fmtdesc fmtd;
++
++ fmtd.index = fmtd_index;
++ fmtd.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ rval = vidioc_int_enum_fmt_cap(vdev->vdev_sensor, &fmtd);
++ if (rval)
++ break;
++ dev_info(&vdev->vfd->dev, "trying fmt %8.8x (%d)\n",
++ fmtd.pixelformat, fmtd_index);
++ /*
++ * Get supported resolutions.
++ */
++ for (size_index = 0; ; size_index++) {
++ struct v4l2_frmsizeenum frms;
++ struct v4l2_pix_format pix_tmp_in, pix_tmp_out;
++ int ival_index;
++
++ frms.index = size_index;
++ frms.pixel_format = fmtd.pixelformat;
++
++ rval = vidioc_int_enum_framesizes(vdev->vdev_sensor,
++ &frms);
++ if (rval)
++ break;
++
++ pix_tmp_in.pixelformat = frms.pixel_format;
++ pix_tmp_in.width = frms.discrete.width;
++ pix_tmp_in.height = frms.discrete.height;
++ pix_tmp_out = *wanted_pix_out;
++ /* Don't do upscaling. */
++ if (pix_tmp_out.width > pix_tmp_in.width)
++ pix_tmp_out.width = pix_tmp_in.width;
++ if (pix_tmp_out.height > pix_tmp_in.height)
++ pix_tmp_out.height = pix_tmp_in.height;
++ rval = isp_try_fmt_cap(&pix_tmp_in, &pix_tmp_out);
++ if (rval)
++ return rval;
++
++ dev_info(&vdev->vfd->dev, "this w %d\th %d\tfmt %8.8x\t"
++ "-> w %d\th %d\t fmt %8.8x"
++ "\twanted w %d\th %d\t fmt %8.8x\n",
++ pix_tmp_in.width, pix_tmp_in.height,
++ pix_tmp_in.pixelformat,
++ pix_tmp_out.width, pix_tmp_out.height,
++ pix_tmp_out.pixelformat,
++ wanted_pix_out->width, wanted_pix_out->height,
++ wanted_pix_out->pixelformat);
++
++#define IS_SMALLER_OR_EQUAL(pix1, pix2) \
++ ((pix1)->width + (pix1)->height \
++ < (pix2)->width + (pix2)->height)
++#define SIZE_DIFF(pix1, pix2) \
++ (abs((pix1)->width - (pix2)->width) \
++ + abs((pix1)->height - (pix2)->height))
++
++ /*
++ * Don't use modes that are farther from wanted size
++ * that what we already got.
++ */
++ if (SIZE_DIFF(&pix_tmp_out, wanted_pix_out)
++ > SIZE_DIFF(&best_pix_out, wanted_pix_out)) {
++ dev_info(&vdev->vfd->dev, "size diff bigger: "
++ "w %d\th %d\tw %d\th %d\n",
++ pix_tmp_out.width, pix_tmp_out.height,
++ best_pix_out.width,
++ best_pix_out.height);
++ continue;
++ }
++
++ /*
++ * There's an input mode that can provide output
++ * closer to wanted.
++ */
++ if (SIZE_DIFF(&pix_tmp_out, wanted_pix_out)
++ < SIZE_DIFF(&best_pix_out, wanted_pix_out)) {
++ /* Force renegotation of fps etc. */
++ best_ival->denominator = 0;
++ dev_info(&vdev->vfd->dev, "renegotiate: "
++ "w %d\th %d\tw %d\th %d\n",
++ pix_tmp_out.width, pix_tmp_out.height,
++ best_pix_out.width,
++ best_pix_out.height);
++ }
++
++ for (ival_index = 0; ; ival_index++) {
++ struct v4l2_frmivalenum frmi;
++
++ frmi.index = ival_index;
++ frmi.pixel_format = frms.pixel_format;
++ frmi.width = frms.discrete.width;
++ frmi.height = frms.discrete.height;
++ /* FIXME: try to fix standard... */
++ frmi.reserved[0] = 0xdeafbeef;
++
++ rval = vidioc_int_enum_frameintervals(
++ vdev->vdev_sensor, &frmi);
++ if (rval)
++ break;
++
++ dev_info(&vdev->vfd->dev, "fps %d\n",
++ frmi.discrete.denominator
++ / frmi.discrete.numerator);
++
++ if (best_ival->denominator == 0)
++ goto do_it_now;
++
++ /*
++ * We aim to use maximum resolution
++ * from the sensor, provided that the
++ * fps is at least as close as on the
++ * current mode.
++ */
++#define FPS_ABS_DIFF(fps, ival) abs(fps - (ival).denominator / (ival).numerator)
++
++ /* Select mode with closest fps. */
++ if (FPS_ABS_DIFF(fps, frmi.discrete)
++ < FPS_ABS_DIFF(fps, *best_ival)) {
++ dev_info(&vdev->vfd->dev, "closer fps: "
++ "fps %d\t fps %d\n",
++ FPS_ABS_DIFF(fps,
++ frmi.discrete),
++ FPS_ABS_DIFF(fps, *best_ival));
++ goto do_it_now;
++ }
++
++ /*
++ * Select bigger resolution if it's available
++ * at same fps.
++ */
++ if (frmi.width + frmi.height
++ > best_pix_in->width + best_pix_in->height
++ && FPS_ABS_DIFF(fps, frmi.discrete)
++ <= FPS_ABS_DIFF(fps, *best_ival)) {
++ dev_info(&vdev->vfd->dev, "bigger res, "
++ "same fps: "
++ "w %d\th %d\tw %d\th %d\n",
++ frmi.width, frmi.height,
++ best_pix_in->width,
++ best_pix_in->height);
++ goto do_it_now;
++ }
++
++ dev_info(&vdev->vfd->dev, "falling through\n");
++
++ continue;
++
++do_it_now:
++ *best_ival = frmi.discrete;
++ best_pix_out = pix_tmp_out;
++ best_pix_in->width = frmi.width;
++ best_pix_in->height = frmi.height;
++ best_pix_in->pixelformat = frmi.pixel_format;
++
++ dev_info(&vdev->vfd->dev,
++ "best_pix_in: w %d\th %d\tfmt %8.8x"
++ "\tival %d/%d\n",
++ best_pix_in->width,
++ best_pix_in->height,
++ best_pix_in->pixelformat,
++ best_ival->numerator,
++ best_ival->denominator);
++ }
++ }
++ }
++
++ if (best_ival->denominator == 0)
++ return -EINVAL;
++
++ *wanted_pix_out = best_pix_out;
++
++ dev_info(&vdev->vfd->dev, "w %d, h %d, fmt %8.8x -> w %d, h %d\n",
++ best_pix_in->width, best_pix_in->height,
++ best_pix_in->pixelformat,
++ best_pix_out.width, best_pix_out.height);
++
++ return isp_try_fmt_cap(best_pix_in, wanted_pix_out);
++}
++
++static int s_pix_parm(struct omap34xxcam_videodev *vdev,
++ struct v4l2_pix_format *best_pix,
++ struct v4l2_pix_format *pix,
++ struct v4l2_fract *best_ival)
++{
++ struct v4l2_streamparm a;
++ struct v4l2_format fmt;
++ int rval;
++
++ rval = try_pix_parm(vdev, best_pix, pix, best_ival);
++ if (rval)
++ return rval;
++
++ rval = isp_s_fmt_cap(best_pix, pix);
++ if (rval)
++ return rval;
++
++ fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ fmt.fmt.pix = *best_pix;
++ rval = vidioc_int_s_fmt_cap(vdev->vdev_sensor, &fmt);
++ if (rval)
++ return rval;
++
++ a.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ a.parm.capture.timeperframe = *best_ival;
++ rval = vidioc_int_s_parm(vdev->vdev_sensor, &a);
++
++ return rval;
++}
++
++/**
++ * vidioc_s_fmt_vid_cap - V4L2 set format capabilities IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @f: ptr to standard V4L2 format structure
++ *
++ * Attempts to set input format with the sensor driver (first) and then the
++ * ISP. Returns the return code from vidioc_g_fmt_vid_cap().
++ */
++static int vidioc_s_fmt_vid_cap(struct file *file, void *fh,
++ struct v4l2_format *f)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ struct v4l2_pix_format pix_tmp;
++ struct v4l2_fract timeperframe;
++ int rval;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++ if (vdev->streaming) {
++ rval = -EBUSY;
++ goto out;
++ }
++
++ vdev->want_pix = f->fmt.pix;
++
++ timeperframe = vdev->want_timeperframe;
++
++ rval = s_pix_parm(vdev, &pix_tmp, &f->fmt.pix, &timeperframe);
++ if (!rval)
++ vdev->pix = f->fmt.pix;
++
++out:
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_try_fmt_vid_cap - V4L2 try format capabilities IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @f: ptr to standard V4L2 format structure
++ *
++ * Checks if the given format is supported by the sensor driver and
++ * by the ISP.
++ */
++static int vidioc_try_fmt_vid_cap(struct file *file, void *fh,
++ struct v4l2_format *f)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ struct v4l2_pix_format pix_tmp;
++ struct v4l2_fract timeperframe;
++ int rval;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++
++ timeperframe = vdev->want_timeperframe;
++
++ rval = try_pix_parm(vdev, &pix_tmp, &f->fmt.pix, &timeperframe);
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_reqbufs - V4L2 request buffers IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @b: ptr to standard V4L2 request buffers structure
++ *
++ * Attempts to get a buffer from the buffer queue associated with the
++ * fh through the video buffer library API.
++ */
++static int vidioc_reqbufs(struct file *file, void *fh,
++ struct v4l2_requestbuffers *b)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++ if (vdev->streaming) {
++ mutex_unlock(&vdev->mutex);
++ return -EBUSY;
++ }
++
++ rval = videobuf_reqbufs(&ofh->vbq, b);
++
++ mutex_unlock(&vdev->mutex);
++
++ /*
++ * Either videobuf_reqbufs failed or the buffers are not
++ * memory-mapped (which would need special attention).
++ */
++ if (rval < 0 || b->memory != V4L2_MEMORY_MMAP)
++ goto out;
++
++out:
++ return rval;
++}
++
++/**
++ * vidioc_querybuf - V4L2 query buffer IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @b: ptr to standard V4L2 buffer structure
++ *
++ * Attempts to fill in the v4l2_buffer structure for the buffer queue
++ * associated with the fh through the video buffer library API.
++ */
++static int vidioc_querybuf(struct file *file, void *fh, struct v4l2_buffer *b)
++{
++ struct omap34xxcam_fh *ofh = fh;
++
++ return videobuf_querybuf(&ofh->vbq, b);
++}
++
++/**
++ * vidioc_qbuf - V4L2 queue buffer IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @b: ptr to standard V4L2 buffer structure
++ *
++ * Attempts to queue the v4l2_buffer on the buffer queue
++ * associated with the fh through the video buffer library API.
++ */
++static int vidioc_qbuf(struct file *file, void *fh, struct v4l2_buffer *b)
++{
++ struct omap34xxcam_fh *ofh = fh;
++
++ return videobuf_qbuf(&ofh->vbq, b);
++}
++
++/**
++ * vidioc_dqbuf - V4L2 dequeue buffer IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @b: ptr to standard V4L2 buffer structure
++ *
++ * Attempts to dequeue the v4l2_buffer from the buffer queue
++ * associated with the fh through the video buffer library API. If the
++ * buffer is a user space buffer, then this function will also requeue it,
++ * as user does not expect to do this.
++ */
++static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ int rval;
++
++videobuf_dqbuf_again:
++ rval = videobuf_dqbuf(&ofh->vbq, b, file->f_flags & O_NONBLOCK);
++
++ /*
++ * This is a hack. We don't want to show -EIO to the user
++ * space. Requeue the buffer and try again if we're not doing
++ * this in non-blocking mode.
++ */
++ if (rval == -EIO) {
++ videobuf_qbuf(&ofh->vbq, b);
++ if (!(file->f_flags & O_NONBLOCK))
++ goto videobuf_dqbuf_again;
++ /*
++ * We don't have a videobuf_buffer now --- maybe next
++ * time...
++ */
++ rval = -EAGAIN;
++ }
++
++ return rval;
++}
++
++/**
++ * vidioc_streamon - V4L2 streamon IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @i: V4L2 buffer type
++ *
++ * Attempts to start streaming by enabling the sensor interface and turning
++ * on video buffer streaming through the video buffer library API. Upon
++ * success the function returns 0, otherwise an error code is returned.
++ */
++static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++ if (vdev->streaming) {
++ rval = -EBUSY;
++ goto out;
++ }
++
++ rval = omap34xxcam_slave_power_set(vdev, V4L2_POWER_ON,
++ OMAP34XXCAM_SLAVE_POWER_SENSOR_LENS);
++ if (rval) {
++ dev_dbg(&vdev->vfd->dev,
++ "omap34xxcam_slave_power_set failed\n");
++ goto out;
++ }
++
++ rval = videobuf_streamon(&ofh->vbq);
++ if (rval)
++ omap34xxcam_slave_power_set(
++ vdev, V4L2_POWER_OFF,
++ OMAP34XXCAM_SLAVE_POWER_SENSOR_LENS);
++ else
++ vdev->streaming = file;
++
++out:
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_streamoff - V4L2 streamoff IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @i: V4L2 buffer type
++ *
++ * Attempts to stop streaming by flushing all scheduled work, waiting on
++ * any queued buffers to complete and then stopping the ISP and turning
++ * off video buffer streaming through the video buffer library API. Upon
++ * success the function returns 0, otherwise an error code is returned.
++ */
++static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ struct videobuf_queue *q = &ofh->vbq;
++ int rval;
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->streaming == file)
++ isp_stop();
++
++ rval = videobuf_streamoff(q);
++ if (!rval) {
++ vdev->streaming = NULL;
++
++ omap34xxcam_slave_power_set(vdev, V4L2_POWER_STANDBY,
++ OMAP34XXCAM_SLAVE_POWER_SENSOR);
++ omap34xxcam_slave_power_suggest(vdev, V4L2_POWER_STANDBY,
++ OMAP34XXCAM_SLAVE_POWER_LENS);
++ }
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_enum_input - V4L2 enumerate input IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @inp: V4L2 input type information structure
++ *
++ * Fills in v4l2_input structure. Returns 0.
++ */
++static int vidioc_enum_input(struct file *file, void *fh,
++ struct v4l2_input *inp)
++{
++ if (inp->index > 0)
++ return -EINVAL;
++
++ strlcpy(inp->name, "camera", sizeof(inp->name));
++ inp->type = V4L2_INPUT_TYPE_CAMERA;
++
++ return 0;
++}
++
++/**
++ * vidioc_g_input - V4L2 get input IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @i: address to hold index of input supported
++ *
++ * Sets index to 0.
++ */
++static int vidioc_g_input(struct file *file, void *fh, unsigned int *i)
++{
++ *i = 0;
++
++ return 0;
++}
++
++/**
++ * vidioc_s_input - V4L2 set input IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @i: index of input selected
++ *
++ * 0 is only index supported.
++ */
++static int vidioc_s_input(struct file *file, void *fh, unsigned int i)
++{
++ if (i > 0)
++ return -EINVAL;
++
++ return 0;
++}
++
++/**
++ * vidioc_queryctrl - V4L2 query control IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 query control ioctl structure
++ *
++ * If the requested control is supported, returns the control information
++ * in the v4l2_queryctrl structure. Otherwise, returns -EINVAL if the
++ * control is not supported. If the sensor being used is a "smart sensor",
++ * this request is passed to the sensor driver, otherwise the ISP is
++ * queried and if it does not support the requested control, the request
++ * is forwarded to the "raw" sensor driver to see if it supports it.
++ */
++static int vidioc_queryctrl(struct file *file, void *fh,
++ struct v4l2_queryctrl *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ struct v4l2_queryctrl a_tmp;
++ int best_slave = -1;
++ u32 best_ctrl = (u32)-1;
++ int i;
++
++ if (vdev->vdev_sensor_config.sensor_isp)
++ return vidioc_int_queryctrl(vdev->vdev_sensor, a);
++
++ /* No next flags: try slaves directly. */
++ if (!(a->id & V4L2_CTRL_FLAG_NEXT_CTRL)) {
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ if (!vidioc_int_queryctrl(vdev->slave[i], a))
++ return 0;
++ }
++ return isp_queryctrl(a);
++ }
++
++ /* Find slave with smallest next control id. */
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ a_tmp = *a;
++
++ if (vidioc_int_queryctrl(vdev->slave[i], &a_tmp))
++ continue;
++
++ if (a_tmp.id < best_ctrl) {
++ best_slave = i;
++ best_ctrl = a_tmp.id;
++ }
++ }
++
++ a_tmp = *a;
++ if (!isp_queryctrl(&a_tmp)) {
++ if (a_tmp.id < best_ctrl) {
++ *a = a_tmp;
++
++ return 0;
++ }
++ }
++
++ if (best_slave == -1)
++ return -EINVAL;
++
++ a->id = best_ctrl;
++ return vidioc_int_queryctrl(vdev->slave[best_slave], a);
++}
++
++/**
++ * vidioc_querymenu - V4L2 query menu IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 query menu ioctl structure
++ *
++ * If the requested control is supported, returns the menu information
++ * in the v4l2_querymenu structure. Otherwise, returns -EINVAL if the
++ * control is not supported or is not a menu. If the sensor being used
++ * is a "smart sensor", this request is passed to the sensor driver,
++ * otherwise the ISP is queried and if it does not support the requested
++ * menu control, the request is forwarded to the "raw" sensor driver to
++ * see if it supports it.
++ */
++static int vidioc_querymenu(struct file *file, void *fh,
++ struct v4l2_querymenu *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int i;
++
++ if (vdev->vdev_sensor_config.sensor_isp)
++ return vidioc_int_querymenu(vdev->vdev_sensor, a);
++
++ /* Try slaves directly. */
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ if (!vidioc_int_querymenu(vdev->slave[i], a))
++ return 0;
++ }
++ return isp_querymenu(a);
++}
++
++static int vidioc_g_ext_ctrls(struct file *file, void *fh,
++ struct v4l2_ext_controls *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int i, ctrl_idx, rval = 0;
++
++ mutex_lock(&vdev->mutex);
++
++ for (ctrl_idx = 0; ctrl_idx < a->count; ctrl_idx++) {
++ struct v4l2_control ctrl;
++
++ ctrl.id = a->controls[ctrl_idx].id;
++
++ if (vdev->vdev_sensor_config.sensor_isp) {
++ rval = vidioc_int_g_ctrl(vdev->vdev_sensor, &ctrl);
++ } else {
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ rval = vidioc_int_g_ctrl(vdev->slave[i], &ctrl);
++ if (!rval)
++ break;
++ }
++ }
++
++ if (rval)
++ rval = isp_g_ctrl(&ctrl);
++
++ if (rval) {
++ a->error_idx = ctrl_idx;
++ break;
++ }
++
++ a->controls[ctrl_idx].value = ctrl.value;
++ }
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++static int vidioc_s_ext_ctrls(struct file *file, void *fh,
++ struct v4l2_ext_controls *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int i, ctrl_idx, rval = 0;
++
++ mutex_lock(&vdev->mutex);
++
++ for (ctrl_idx = 0; ctrl_idx < a->count; ctrl_idx++) {
++ struct v4l2_control ctrl;
++
++ ctrl.id = a->controls[ctrl_idx].id;
++ ctrl.value = a->controls[ctrl_idx].value;
++
++ if (vdev->vdev_sensor_config.sensor_isp) {
++ rval = vidioc_int_s_ctrl(vdev->vdev_sensor, &ctrl);
++ } else {
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ rval = vidioc_int_s_ctrl(vdev->slave[i], &ctrl);
++ if (!rval)
++ break;
++ }
++ }
++
++ if (rval)
++ rval = isp_s_ctrl(&ctrl);
++
++ if (rval) {
++ a->error_idx = ctrl_idx;
++ break;
++ }
++
++ a->controls[ctrl_idx].value = ctrl.value;
++ }
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_g_parm - V4L2 get parameters IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 stream parameters structure
++ *
++ * If request is for video capture buffer type, handles request by
++ * forwarding to sensor driver.
++ */
++static int vidioc_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval;
++
++ if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++ rval = vidioc_int_g_parm(vdev->vdev_sensor, a);
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_s_parm - V4L2 set parameters IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 stream parameters structure
++ *
++ * If request is for video capture buffer type, handles request by
++ * first getting current stream parameters from sensor, then forwarding
++ * request to set new parameters to sensor driver. It then attempts to
++ * enable the sensor interface with the new parameters. If this fails, it
++ * reverts back to the previous parameters.
++ */
++static int vidioc_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ struct v4l2_pix_format pix_tmp_sensor, pix_tmp;
++ int rval;
++
++ if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
++ return -EINVAL;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++ if (vdev->streaming) {
++ rval = -EBUSY;
++ goto out;
++ }
++
++ vdev->want_timeperframe = a->parm.capture.timeperframe;
++
++ pix_tmp = vdev->want_pix;
++
++ rval = s_pix_parm(vdev, &pix_tmp_sensor, &pix_tmp,
++ &a->parm.capture.timeperframe);
++
++out:
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_cropcap - V4L2 crop capture IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 crop capture structure
++ *
++ * If using a "smart" sensor, just forwards request to the sensor driver,
++ * otherwise fills in the v4l2_cropcap values locally.
++ */
++static int vidioc_cropcap(struct file *file, void *fh, struct v4l2_cropcap *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ struct v4l2_cropcap *cropcap = a;
++ int rval;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++
++ rval = vidioc_int_cropcap(vdev->vdev_sensor, a);
++
++ if (rval && !vdev->vdev_sensor_config.sensor_isp) {
++ struct v4l2_format f;
++
++ /* cropcap failed, try to do this via g_fmt_cap */
++ rval = vidioc_int_g_fmt_cap(vdev->vdev_sensor, &f);
++ if (!rval) {
++ cropcap->bounds.top = 0;
++ cropcap->bounds.left = 0;
++ cropcap->bounds.width = f.fmt.pix.width;
++ cropcap->bounds.height = f.fmt.pix.height;
++ cropcap->defrect = cropcap->bounds;
++ cropcap->pixelaspect.numerator = 1;
++ cropcap->pixelaspect.denominator = 1;
++ }
++ }
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_g_crop - V4L2 get capture crop IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 crop structure
++ *
++ * If using a "smart" sensor, just forwards request to the sensor driver,
++ * otherwise calls the isp functions to fill in current crop values.
++ */
++static int vidioc_g_crop(struct file *file, void *fh, struct v4l2_crop *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval = 0;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->vdev_sensor_config.sensor_isp)
++ rval = vidioc_int_g_crop(vdev->vdev_sensor, a);
++ else
++ rval = isp_g_crop(a);
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++/**
++ * vidioc_s_crop - V4L2 set capture crop IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @a: standard V4L2 crop structure
++ *
++ * If using a "smart" sensor, just forwards request to the sensor driver,
++ * otherwise calls the isp functions to set the current crop values.
++ */
++static int vidioc_s_crop(struct file *file, void *fh, struct v4l2_crop *a)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval = 0;
++
++ if (vdev->vdev_sensor == v4l2_int_device_dummy())
++ return -EINVAL;
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->vdev_sensor_config.sensor_isp)
++ rval = vidioc_int_s_crop(vdev->vdev_sensor, a);
++ else
++ rval = isp_s_crop(a, &vdev->pix);
++
++ mutex_unlock(&vdev->mutex);
++
++ return rval;
++}
++
++static int vidioc_enum_framesizes(struct file *file, void *fh,
++ struct v4l2_frmsizeenum *frms)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ u32 pixel_format;
++ int rval;
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->vdev_sensor_config.sensor_isp) {
++ rval = vidioc_int_enum_framesizes(vdev->vdev_sensor, frms);
++ } else {
++ pixel_format = frms->pixel_format;
++ frms->pixel_format = -1; /* ISP does format conversion */
++ rval = vidioc_int_enum_framesizes(vdev->vdev_sensor, frms);
++ frms->pixel_format = pixel_format;
++ }
++
++ mutex_unlock(&vdev->mutex);
++ return rval;
++}
++
++static int vidioc_enum_frameintervals(struct file *file, void *fh,
++ struct v4l2_frmivalenum *frmi)
++{
++ struct omap34xxcam_fh *ofh = fh;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ u32 pixel_format;
++ int rval;
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->vdev_sensor_config.sensor_isp) {
++ rval = vidioc_int_enum_frameintervals(vdev->vdev_sensor, frmi);
++ } else {
++ pixel_format = frmi->pixel_format;
++ frmi->pixel_format = -1; /* ISP does format conversion */
++ rval = vidioc_int_enum_frameintervals(vdev->vdev_sensor, frmi);
++ frmi->pixel_format = pixel_format;
++ }
++
++ mutex_unlock(&vdev->mutex);
++ return rval;
++}
++
++/**
++ * vidioc_default - private IOCTL handler
++ * @file: ptr. to system file structure
++ * @fh: ptr to hold address of omap34xxcam_fh struct (per-filehandle data)
++ * @cmd: ioctl cmd value
++ * @arg: ioctl arg value
++ *
++ * If the sensor being used is a "smart sensor", this request is returned to
++ * caller with -EINVAL err code. Otherwise if the control id is the private
++ * VIDIOC_PRIVATE_ISP_AEWB_REQ to update the analog gain or exposure,
++ * then this request is forwared directly to the sensor to incorporate the
++ * feedback. The request is then passed on to the ISP private IOCTL handler,
++ * isp_handle_private()
++ */
++static long vidioc_default(struct file *file, void *fh, int cmd, void *arg)
++{
++ struct omap34xxcam_fh *ofh = file->private_data;
++ struct omap34xxcam_videodev *vdev = ofh->vdev;
++ int rval;
++
++ if (vdev->vdev_sensor_config.sensor_isp) {
++ rval = -EINVAL;
++ } else {
++ switch (cmd) {
++ case VIDIOC_PRIVATE_ISP_AEWB_REQ:
++ {
++ /* Need to update sensor first */
++ struct isph3a_aewb_data *data;
++ struct v4l2_control vc;
++
++ data = (struct isph3a_aewb_data *) arg;
++ if (data->update & SET_EXPOSURE) {
++ dev_info(&vdev->vfd->dev, "using "
++ "VIDIOC_PRIVATE_ISP_AEWB_REQ to set "
++ "exposure is deprecated!\n");
++ vc.id = V4L2_CID_EXPOSURE;
++ vc.value = data->shutter;
++ mutex_lock(&vdev->mutex);
++ rval = vidioc_int_s_ctrl(vdev->vdev_sensor,
++ &vc);
++ mutex_unlock(&vdev->mutex);
++ if (rval)
++ goto out;
++ }
++ if (data->update & SET_ANALOG_GAIN) {
++ dev_info(&vdev->vfd->dev, "using "
++ "VIDIOC_PRIVATE_ISP_AEWB_REQ to set "
++ "gain is deprecated!\n");
++ vc.id = V4L2_CID_GAIN;
++ vc.value = data->gain;
++ mutex_lock(&vdev->mutex);
++ rval = vidioc_int_s_ctrl(vdev->vdev_sensor,
++ &vc);
++ mutex_unlock(&vdev->mutex);
++ if (rval)
++ goto out;
++ }
++ }
++ break;
++ case VIDIOC_PRIVATE_ISP_AF_REQ: {
++ /* Need to update lens first */
++ struct isp_af_data *data;
++ struct v4l2_control vc;
++
++ if (!vdev->vdev_lens) {
++ rval = -EINVAL;
++ goto out;
++ }
++ data = (struct isp_af_data *) arg;
++ if (data->update & LENS_DESIRED_POSITION) {
++ dev_info(&vdev->vfd->dev, "using "
++ "VIDIOC_PRIVATE_ISP_AF_REQ to set "
++ "lens position is deprecated!\n");
++ vc.id = V4L2_CID_FOCUS_ABSOLUTE;
++ vc.value = data->desired_lens_direction;
++ mutex_lock(&vdev->mutex);
++ rval = vidioc_int_s_ctrl(vdev->vdev_lens, &vc);
++ mutex_unlock(&vdev->mutex);
++ if (rval)
++ goto out;
++ }
++ }
++ break;
++ }
++
++ mutex_lock(&vdev->mutex);
++ rval = isp_handle_private(cmd, arg);
++ mutex_unlock(&vdev->mutex);
++ }
++out:
++ return rval;
++}
++
++/*
++ *
++ * File operations.
++ *
++ */
++
++/**
++ * omap34xxcam_poll - file operations poll handler
++ * @file: ptr. to system file structure
++ * @wait: system poll table structure
++ *
++ */
++static unsigned int omap34xxcam_poll(struct file *file,
++ struct poll_table_struct *wait)
++{
++ struct omap34xxcam_fh *fh = file->private_data;
++ struct omap34xxcam_videodev *vdev = fh->vdev;
++ struct videobuf_buffer *vb;
++
++ mutex_lock(&vdev->mutex);
++ if (vdev->streaming != file) {
++ mutex_unlock(&vdev->mutex);
++ return POLLERR;
++ }
++ mutex_unlock(&vdev->mutex);
++
++ mutex_lock(&fh->vbq.vb_lock);
++ if (list_empty(&fh->vbq.stream)) {
++ mutex_unlock(&fh->vbq.vb_lock);
++ return POLLERR;
++ }
++ vb = list_entry(fh->vbq.stream.next, struct videobuf_buffer, stream);
++ mutex_unlock(&fh->vbq.vb_lock);
++
++ poll_wait(file, &vb->done, wait);
++
++ if (vb->state == VIDEOBUF_DONE || vb->state == VIDEOBUF_ERROR)
++ return POLLIN | POLLRDNORM;
++
++ return 0;
++}
++
++/**
++ * omap34xxcam_mmap - file operations mmap handler
++ * @file: ptr. to system file structure
++ * @vma: system virt. mem. area structure
++ *
++ * Maps a virtual memory area via the video buffer API
++ */
++static int omap34xxcam_mmap(struct file *file, struct vm_area_struct *vma)
++{
++ struct omap34xxcam_fh *fh = file->private_data;
++ return videobuf_mmap_mapper(&fh->vbq, vma);
++}
++
++/**
++ * omap34xxcam_open - file operations open handler
++ * @inode: ptr. to system inode structure
++ * @file: ptr. to system file structure
++ *
++ * Allocates and initializes the per-filehandle data (omap34xxcam_fh),
++ * enables the sensor, opens/initializes the ISP interface and the
++ * video buffer queue. Note that this function will allow multiple
++ * file handles to be open simultaneously, however only the first
++ * handle opened will initialize the ISP. It is the application
++ * responsibility to only use one handle for streaming and the others
++ * for control only.
++ * This function returns 0 upon success and -ENODEV upon error.
++ */
++static int omap34xxcam_open(struct file *file)
++{
++ int rval = 0;
++ struct omap34xxcam_videodev *vdev = NULL;
++ struct omap34xxcam_device *cam = omap34xxcam;
++ struct omap34xxcam_fh *fh;
++ struct v4l2_format format;
++ int i;
++
++ for (i = 0; i < OMAP34XXCAM_VIDEODEVS; i++) {
++ if (cam->vdevs[i].vfd
++ && cam->vdevs[i].vfd->minor ==
++ iminor(file->f_dentry->d_inode)) {
++ vdev = &cam->vdevs[i];
++ break;
++ }
++ }
++
++ if (!vdev || !vdev->vfd)
++ return -ENODEV;
++
++ fh = kzalloc(sizeof(*fh), GFP_KERNEL);
++ if (fh == NULL)
++ return -ENOMEM;
++
++ mutex_lock(&vdev->mutex);
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ if (vdev->slave[i] != v4l2_int_device_dummy()
++ && !try_module_get(vdev->slave[i]->module)) {
++ mutex_unlock(&vdev->mutex);
++ dev_err(&vdev->vfd->dev, "can't try_module_get %s\n",
++ vdev->slave[i]->name);
++ rval = -ENODEV;
++ goto out_try_module_get;
++ }
++ }
++
++ if (atomic_inc_return(&vdev->users) == 1) {
++ rval = isp_get();
++ if (rval < 0) {
++ dev_err(&vdev->vfd->dev, "can't get isp\n");
++ goto out_isp_get;
++ }
++ if (omap34xxcam_slave_power_set(vdev, V4L2_POWER_ON,
++ OMAP34XXCAM_SLAVE_POWER_ALL)) {
++ dev_err(&vdev->vfd->dev, "can't power up slaves\n");
++ rval = -EBUSY;
++ goto out_slave_power_set_standby;
++ }
++ omap34xxcam_slave_power_set(
++ vdev, V4L2_POWER_STANDBY,
++ OMAP34XXCAM_SLAVE_POWER_SENSOR);
++ omap34xxcam_slave_power_suggest(
++ vdev, V4L2_POWER_STANDBY,
++ OMAP34XXCAM_SLAVE_POWER_LENS);
++ }
++
++ fh->vdev = vdev;
++
++ if (!vdev->pix.width
++ && vdev->vdev_sensor != v4l2_int_device_dummy()) {
++ memset(&format, 0, sizeof(format));
++ if (vidioc_int_g_fmt_cap(vdev->vdev_sensor, &format)) {
++ dev_err(&vdev->vfd->dev,
++ "can't get current pix from sensor!\n");
++ goto out_vidioc_int_g_fmt_cap;
++ }
++ if (!vdev->vdev_sensor_config.sensor_isp) {
++ struct v4l2_pix_format pix = format.fmt.pix;
++ if (isp_s_fmt_cap(&pix, &format.fmt.pix)) {
++ dev_err(&vdev->vfd->dev,
++ "isp doesn't like the sensor!\n");
++ goto out_isp_s_fmt_cap;
++ }
++ }
++ vdev->pix = format.fmt.pix;
++ }
++
++ mutex_unlock(&vdev->mutex);
++
++ file->private_data = fh;
++
++ spin_lock_init(&fh->vbq_lock);
++
++ videobuf_queue_sg_init(&fh->vbq, &omap34xxcam_vbq_ops, NULL,
++ &fh->vbq_lock, V4L2_BUF_TYPE_VIDEO_CAPTURE,
++ V4L2_FIELD_NONE,
++ sizeof(struct videobuf_buffer), fh);
++
++ return 0;
++
++out_isp_s_fmt_cap:
++out_vidioc_int_g_fmt_cap:
++ omap34xxcam_slave_power_set(vdev, V4L2_POWER_OFF,
++ OMAP34XXCAM_SLAVE_POWER_ALL);
++out_slave_power_set_standby:
++ isp_put();
++
++out_isp_get:
++ atomic_dec(&vdev->users);
++ mutex_unlock(&vdev->mutex);
++
++out_try_module_get:
++ for (i--; i >= 0; i--)
++ if (vdev->slave[i] != v4l2_int_device_dummy())
++ module_put(vdev->slave[i]->module);
++
++ kfree(fh);
++
++ return rval;
++}
++
++/**
++ * omap34xxcam_release - file operations release handler
++ * @inode: ptr. to system inode structure
++ * @file: ptr. to system file structure
++ *
++ * Complement of omap34xxcam_open. This function will flush any scheduled
++ * work, disable the sensor, close the ISP interface, stop the
++ * video buffer queue from streaming and free the per-filehandle data
++ * (omap34xxcam_fh). Note that because multiple open file handles
++ * are allowed, this function will only close the ISP and disable the
++ * sensor when the last open file handle (by count) is closed.
++ * This function returns 0.
++ */
++static int omap34xxcam_release(struct file *file)
++{
++ struct omap34xxcam_fh *fh = file->private_data;
++ struct omap34xxcam_videodev *vdev = fh->vdev;
++ int i;
++
++ mutex_lock(&vdev->mutex);
++ if (vdev->streaming == file) {
++ isp_stop();
++ videobuf_streamoff(&fh->vbq);
++ omap34xxcam_slave_power_set(
++ vdev, V4L2_POWER_STANDBY,
++ OMAP34XXCAM_SLAVE_POWER_SENSOR);
++ omap34xxcam_slave_power_suggest(
++ vdev, V4L2_POWER_STANDBY,
++ OMAP34XXCAM_SLAVE_POWER_LENS);
++ vdev->streaming = NULL;
++ }
++
++ if (atomic_dec_return(&vdev->users) == 0) {
++ omap34xxcam_slave_power_set(vdev, V4L2_POWER_OFF,
++ OMAP34XXCAM_SLAVE_POWER_ALL);
++ isp_put();
++ }
++ mutex_unlock(&vdev->mutex);
++
++ file->private_data = NULL;
++
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++)
++ if (vdev->slave[i] != v4l2_int_device_dummy())
++ module_put(vdev->slave[i]->module);
++
++ kfree(fh);
++
++ return 0;
++}
++
++static struct v4l2_file_operations omap34xxcam_fops = {
++ .owner = THIS_MODULE,
++ .unlocked_ioctl = video_ioctl2,
++ .poll = omap34xxcam_poll,
++ .mmap = omap34xxcam_mmap,
++ .open = omap34xxcam_open,
++ .release = omap34xxcam_release,
++};
++
++static void omap34xxcam_vfd_name_update(struct omap34xxcam_videodev *vdev)
++{
++ struct video_device *vfd = vdev->vfd;
++ int i;
++
++ strlcpy(vfd->name, CAM_SHORT_NAME, sizeof(vfd->name));
++ for (i = 0; i <= OMAP34XXCAM_SLAVE_FLASH; i++) {
++ strlcat(vfd->name, "/", sizeof(vfd->name));
++ if (vdev->slave[i] == v4l2_int_device_dummy())
++ continue;
++ strlcat(vfd->name, vdev->slave[i]->name, sizeof(vfd->name));
++ }
++ dev_info(&vdev->vfd->dev, "video%d is now %s\n", vfd->num, vfd->name);
++}
++
++/**
++ * omap34xxcam_device_unregister - V4L2 detach handler
++ * @s: ptr. to standard V4L2 device information structure
++ *
++ * Detach sensor and unregister and release the video device.
++ */
++static void omap34xxcam_device_unregister(struct v4l2_int_device *s)
++{
++ struct omap34xxcam_videodev *vdev = s->u.slave->master->priv;
++ struct omap34xxcam_hw_config hwc;
++
++ BUG_ON(vidioc_int_g_priv(s, &hwc) < 0);
++
++ mutex_lock(&vdev->mutex);
++
++ if (vdev->slave[hwc.dev_type] != v4l2_int_device_dummy()) {
++ vdev->slave[hwc.dev_type] = v4l2_int_device_dummy();
++ vdev->slaves--;
++ omap34xxcam_vfd_name_update(vdev);
++ }
++
++ if (vdev->slaves == 0 && vdev->vfd) {
++ if (vdev->vfd->minor == -1) {
++ /*
++ * The device was never registered, so release the
++ * video_device struct directly.
++ */
++ video_device_release(vdev->vfd);
++ } else {
++ /*
++ * The unregister function will release the
++ * video_device struct as well as
++ * unregistering it.
++ */
++ video_unregister_device(vdev->vfd);
++ }
++ vdev->vfd = NULL;
++ }
++
++ mutex_unlock(&vdev->mutex);
++}
++
++static const struct v4l2_ioctl_ops omap34xxcam_ioctl_ops = {
++ .vidioc_querycap = vidioc_querycap,
++ .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
++ .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
++ .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
++ .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
++ .vidioc_reqbufs = vidioc_reqbufs,
++ .vidioc_querybuf = vidioc_querybuf,
++ .vidioc_qbuf = vidioc_qbuf,
++ .vidioc_dqbuf = vidioc_dqbuf,
++ .vidioc_streamon = vidioc_streamon,
++ .vidioc_streamoff = vidioc_streamoff,
++ .vidioc_enum_input = vidioc_enum_input,
++ .vidioc_g_input = vidioc_g_input,
++ .vidioc_s_input = vidioc_s_input,
++ .vidioc_queryctrl = vidioc_queryctrl,
++ .vidioc_querymenu = vidioc_querymenu,
++ .vidioc_g_ext_ctrls = vidioc_g_ext_ctrls,
++ .vidioc_s_ext_ctrls = vidioc_s_ext_ctrls,
++ .vidioc_g_parm = vidioc_g_parm,
++ .vidioc_s_parm = vidioc_s_parm,
++ .vidioc_cropcap = vidioc_cropcap,
++ .vidioc_g_crop = vidioc_g_crop,
++ .vidioc_s_crop = vidioc_s_crop,
++ .vidioc_enum_framesizes = vidioc_enum_framesizes,
++ .vidioc_enum_frameintervals = vidioc_enum_frameintervals,
++ .vidioc_default = vidioc_default,
++};
++
++/**
++ * omap34xxcam_device_register - V4L2 attach handler
++ * @s: ptr. to standard V4L2 device information structure
++ *
++ * Allocates and initializes the V4L2 video_device structure, initializes
++ * the sensor, and finally
++ registers the device with V4L2 based on the
++ * video_device structure.
++ *
++ * Returns 0 on success, otherwise an appropriate error code on
++ * failure.
++ */
++static int omap34xxcam_device_register(struct v4l2_int_device *s)
++{
++ struct omap34xxcam_videodev *vdev = s->u.slave->master->priv;
++ struct omap34xxcam_hw_config hwc;
++ int rval;
++
++ /* We need to check rval just once. The place is here. */
++ if (vidioc_int_g_priv(s, &hwc))
++ return -ENODEV;
++
++ if (vdev->index != hwc.dev_index)
++ return -ENODEV;
++
++ if (hwc.dev_type < 0 || hwc.dev_type > OMAP34XXCAM_SLAVE_FLASH)
++ return -EINVAL;
++
++ if (vdev->slave[hwc.dev_type] != v4l2_int_device_dummy())
++ return -EBUSY;
++
++ mutex_lock(&vdev->mutex);
++ if (atomic_read(&vdev->users)) {
++ printk(KERN_ERR "%s: we're open (%d), can't register\n",
++ __func__, atomic_read(&vdev->users));
++ mutex_unlock(&vdev->mutex);
++ return -EBUSY;
++ }
++
++ vdev->slaves++;
++ vdev->slave[hwc.dev_type] = s;
++ vdev->slave_config[hwc.dev_type] = hwc;
++
++ if (hwc.dev_type == OMAP34XXCAM_SLAVE_SENSOR) {
++ rval = isp_get();
++ if (rval < 0) {
++ printk(KERN_ERR "%s: can't get ISP, "
++ "sensor init failed\n", __func__);
++ goto err;
++ }
++ }
++ rval = omap34xxcam_slave_power_set(vdev, V4L2_POWER_ON,
++ 1 << hwc.dev_type);
++ if (rval)
++ goto err_omap34xxcam_slave_power_set;
++ if (hwc.dev_type == OMAP34XXCAM_SLAVE_SENSOR) {
++ struct v4l2_format format;
++
++ format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ rval = vidioc_int_g_fmt_cap(vdev->vdev_sensor, &format);
++ if (rval)
++ rval = -EBUSY;
++
++ vdev->want_pix = format.fmt.pix;
++ }
++ omap34xxcam_slave_power_set(vdev, V4L2_POWER_OFF, 1 << hwc.dev_type);
++ if (hwc.dev_type == OMAP34XXCAM_SLAVE_SENSOR)
++ isp_put();
++
++ if (rval)
++ goto err;
++
++ /* Are we the first slave? */
++ if (vdev->slaves == 1) {
++ /* initialize the video_device struct */
++ vdev->vfd = video_device_alloc();
++ if (!vdev->vfd) {
++ printk(KERN_ERR "%s: could not allocate "
++ "video device struct\n", __func__);
++ rval = -ENOMEM;
++ goto err;
++ }
++ vdev->vfd->release = video_device_release;
++ vdev->vfd->minor = -1;
++ vdev->vfd->fops = &omap34xxcam_fops;
++ vdev->vfd->ioctl_ops = &omap34xxcam_ioctl_ops;
++ video_set_drvdata(vdev->vfd, vdev);
++
++ if (video_register_device(vdev->vfd, VFL_TYPE_GRABBER,
++ hwc.dev_minor) < 0) {
++ printk(KERN_ERR "%s: could not register V4L device\n",
++ __func__);
++ vdev->vfd->minor = -1;
++ rval = -EBUSY;
++ goto err;
++ }
++ }
++
++ omap34xxcam_vfd_name_update(vdev);
++
++ mutex_unlock(&vdev->mutex);
++
++ return 0;
++
++err_omap34xxcam_slave_power_set:
++ if (hwc.dev_type == OMAP34XXCAM_SLAVE_SENSOR)
++ isp_put();
++
++err:
++ if (s == vdev->slave[hwc.dev_type]) {
++ vdev->slave[hwc.dev_type] = v4l2_int_device_dummy();
++ vdev->slaves--;
++ }
++
++ mutex_unlock(&vdev->mutex);
++ omap34xxcam_device_unregister(s);
++
++ return rval;
++}
++
++static struct v4l2_int_master omap34xxcam_master = {
++ .attach = omap34xxcam_device_register,
++ .detach = omap34xxcam_device_unregister,
++};
++
++/*
++ *
++ * Module initialisation and deinitialisation
++ *
++ */
++
++static void omap34xxcam_exit(void)
++{
++ struct omap34xxcam_device *cam = omap34xxcam;
++ int i;
++
++ if (!cam)
++ return;
++
++ for (i = 0; i < OMAP34XXCAM_VIDEODEVS; i++) {
++ if (cam->vdevs[i].cam == NULL)
++ continue;
++
++ v4l2_int_device_unregister(&cam->vdevs[i].master);
++ cam->vdevs[i].cam = NULL;
++ }
++
++ omap34xxcam = NULL;
++
++ kfree(cam);
++}
++
++static int __init omap34xxcam_init(void)
++{
++ struct omap34xxcam_device *cam;
++ int i;
++
++ cam = kzalloc(sizeof(*cam), GFP_KERNEL);
++ if (!cam) {
++ printk(KERN_ERR "%s: could not allocate memory\n", __func__);
++ return -ENOMEM;
++ }
++
++ omap34xxcam = cam;
++
++ for (i = 0; i < OMAP34XXCAM_VIDEODEVS; i++) {
++ struct omap34xxcam_videodev *vdev = &cam->vdevs[i];
++ struct v4l2_int_device *m = &vdev->master;
++
++ m->module = THIS_MODULE;
++ strlcpy(m->name, CAM_NAME, sizeof(m->name));
++ m->type = v4l2_int_type_master;
++ m->u.master = &omap34xxcam_master;
++ m->priv = vdev;
++
++ mutex_init(&vdev->mutex);
++ vdev->index = i;
++ vdev->cam = cam;
++ vdev->vdev_sensor =
++ vdev->vdev_lens =
++ vdev->vdev_flash = v4l2_int_device_dummy();
++#ifdef OMAP34XXCAM_POWEROFF_DELAY
++ setup_timer(&vdev->poweroff_timer,
++ omap34xxcam_slave_power_timer, (unsigned long)vdev);
++ INIT_WORK(&vdev->poweroff_work, omap34xxcam_slave_power_work);
++#endif /* OMAP34XXCAM_POWEROFF_DELAY */
++
++ if (v4l2_int_device_register(m))
++ goto err;
++ }
++
++ return 0;
++
++err:
++ omap34xxcam_exit();
++ return -ENODEV;
++}
++
++MODULE_AUTHOR("Sakari Ailus <sakari.ailus@nokia.com>");
++MODULE_DESCRIPTION("OMAP34xx Video for Linux camera driver");
++MODULE_LICENSE("GPL");
++
++late_initcall(omap34xxcam_init);
++module_exit(omap34xxcam_exit);
+diff --git a/drivers/media/video/omap34xxcam.h b/drivers/media/video/omap34xxcam.h
+new file mode 100644
+index 0000000..9859d15
+--- /dev/null
++++ b/drivers/media/video/omap34xxcam.h
+@@ -0,0 +1,207 @@
++/*
++ * omap34xxcam.h
++ *
++ * Copyright (C) 2006--2009 Nokia Corporation
++ * Copyright (C) 2007--2009 Texas Instruments
++ *
++ * Contact: Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ *
++ * Originally based on the OMAP 2 camera driver.
++ *
++ * Written by Sakari Ailus <sakari.ailus@nokia.com>
++ * Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Mohit Jalori
++ * Sameer Venkatraman
++ * Leonides Martinez
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#ifndef OMAP34XXCAM_H
++#define OMAP34XXCAM_H
++
++#include <media/v4l2-int-device.h>
++#include "isp/isp.h"
++
++#define CAM_NAME "omap34xxcam"
++#define CAM_SHORT_NAME "omap3"
++
++#define OMAP_ISP_AF (1 << 4)
++#define OMAP_ISP_HIST (1 << 5)
++#define OMAP34XXCAM_XCLK_NONE -1
++#define OMAP34XXCAM_XCLK_A 0
++#define OMAP34XXCAM_XCLK_B 1
++
++#define OMAP34XXCAM_SLAVE_SENSOR 0
++#define OMAP34XXCAM_SLAVE_LENS 1
++#define OMAP34XXCAM_SLAVE_FLASH 2 /* This is the last slave! */
++
++/* mask for omap34xxcam_slave_power_set */
++#define OMAP34XXCAM_SLAVE_POWER_SENSOR (1 << OMAP34XXCAM_SLAVE_SENSOR)
++#define OMAP34XXCAM_SLAVE_POWER_LENS (1 << OMAP34XXCAM_SLAVE_LENS)
++#define OMAP34XXCAM_SLAVE_POWER_SENSOR_LENS \
++ (OMAP34XXCAM_SLAVE_POWER_SENSOR | OMAP34XXCAM_SLAVE_POWER_LENS)
++#define OMAP34XXCAM_SLAVE_POWER_FLASH (1 << OMAP34XXCAM_SLAVE_FLASH)
++#define OMAP34XXCAM_SLAVE_POWER_ALL -1
++
++#define OMAP34XXCAM_VIDEODEVS 4
++
++/* #define OMAP34XXCAM_POWEROFF_DELAY (2 * HZ) */
++
++struct omap34xxcam_device;
++struct omap34xxcam_videodev;
++
++struct omap34xxcam_sensor_config {
++ int xclk;
++ int sensor_isp;
++ u32 capture_mem;
++ struct v4l2_fract ival_default;
++};
++
++struct omap34xxcam_lens_config {
++};
++
++struct omap34xxcam_flash_config {
++};
++
++/**
++ * struct omap34xxcam_hw_config - struct for vidioc_int_g_priv ioctl
++ * @xclk: OMAP34XXCAM_XCLK_A or OMAP34XXCAM_XCLK_B
++ * @sensor_isp: Is sensor smart/SOC or raw
++ * @s_pix_sparm: Access function to set pix and sparm.
++ * Pix will override sparm
++ */
++struct omap34xxcam_hw_config {
++ int dev_index; /* Index in omap34xxcam_sensors */
++ int dev_minor; /* Video device minor number */
++ int dev_type; /* OMAP34XXCAM_SLAVE_* */
++ union {
++ struct omap34xxcam_sensor_config sensor;
++ struct omap34xxcam_lens_config lens;
++ struct omap34xxcam_flash_config flash;
++ } u;
++};
++
++/**
++ * struct omap34xxcam_videodev - per /dev/video* structure
++ * @mutex: serialises access to this structure
++ * @cam: pointer to cam hw structure
++ * @master: we are v4l2_int_device master
++ * @sensor: sensor device
++ * @lens: lens device
++ * @flash: flash device
++ * @slaves: how many slaves we have at the moment
++ * @vfd: our video device
++ * @capture_mem: maximum kernel-allocated capture memory
++ * @if_u: sensor interface stuff
++ * @index: index of this structure in cam->vdevs
++ * @users: how many users we have
++ * @power_state: Current power state
++ * @power_state_wish: New power state when poweroff_timer expires
++ * @power_state_mask: Bitmask of devices to set the new power state
++ * @poweroff_timer: Timer for dispatching poweroff_work
++ * @poweroff_work: Work for slave power state change
++ * @sensor_config: ISP-speicific sensor configuration
++ * @lens_config: ISP-speicific lens configuration
++ * @flash_config: ISP-speicific flash configuration
++ * @want_timeperframe: Desired timeperframe
++ * @want_pix: Desired pix
++ * @pix: Current pix
++ * @streaming: streaming file handle, if streaming is enabled
++ */
++struct omap34xxcam_videodev {
++ struct mutex mutex; /* serialises access to this structure */
++
++ struct omap34xxcam_device *cam;
++ struct v4l2_int_device master;
++
++#define vdev_sensor slave[OMAP34XXCAM_SLAVE_SENSOR]
++#define vdev_lens slave[OMAP34XXCAM_SLAVE_LENS]
++#define vdev_flash slave[OMAP34XXCAM_SLAVE_FLASH]
++ struct v4l2_int_device *slave[OMAP34XXCAM_SLAVE_FLASH + 1];
++
++ /* number of slaves attached */
++ int slaves;
++
++ /*** video device parameters ***/
++ struct video_device *vfd;
++ int capture_mem;
++
++ /*** general driver state information ***/
++ int index;
++ atomic_t users;
++ enum v4l2_power power_state[OMAP34XXCAM_SLAVE_FLASH + 1];
++#ifdef OMAP34XXCAM_POWEROFF_DELAY
++ enum v4l2_power power_state_wish;
++ int power_state_mask;
++ struct timer_list poweroff_timer;
++ struct work_struct poweroff_work;
++#endif /* OMAP34XXCAM_POWEROFF_DELAY */
++
++#define vdev_sensor_config slave_config[OMAP34XXCAM_SLAVE_SENSOR].u.sensor
++#define vdev_lens_config slave_config[OMAP34XXCAM_SLAVE_LENS].u.lens
++#define vdev_flash_config slave_config[OMAP34XXCAM_SLAVE_FLASH].u.flash
++ struct omap34xxcam_hw_config slave_config[OMAP34XXCAM_SLAVE_FLASH + 1];
++
++ /*** capture data ***/
++ struct file *streaming;
++ struct v4l2_fract want_timeperframe;
++ struct v4l2_pix_format want_pix;
++ spinlock_t pix_lock;
++ struct v4l2_pix_format pix;
++};
++
++/**
++ * struct omap34xxcam_device - per-device data structure
++ * @mutex: mutex serialises access to this structure
++ * @sgdma_in_queue: Number or sgdma requests in scatter-gather queue,
++ * protected by the lock above.
++ * @sgdma: ISP sgdma subsystem information structure
++ * @dma_notify: DMA notify flag
++ * @dev: device structure
++ * @vdevs: /dev/video specific structures
++ * @fck: camera module fck clock information
++ * @ick: camera module ick clock information
++ */
++struct omap34xxcam_device {
++ struct mutex mutex; /* serialises access to this structure */
++
++ /*** interfaces and device ***/
++ struct omap34xxcam_videodev vdevs[OMAP34XXCAM_VIDEODEVS];
++
++ /*** camera module clocks ***/
++ struct clk *fck;
++ struct clk *ick;
++ bool sensor_if_enabled;
++};
++
++/**
++ * struct omap34xxcam_fh - per-filehandle data structure
++ * @vbq_lock: spinlock for the videobuf queue
++ * @vbq: V4L2 video buffer queue structure
++ * @field_count: field counter for videobuf_buffer
++ * @vdev: our /dev/video specific structure
++ */
++struct omap34xxcam_fh {
++ spinlock_t vbq_lock; /* spinlock for the videobuf queue */
++ struct videobuf_queue vbq;
++ atomic_t field_count;
++ struct omap34xxcam_videodev *vdev;
++};
++
++#endif /* ifndef OMAP34XXCAM_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0023-OMAP-Resizer-Basic-Resizer-refreshed-with-latest-gi.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0023-OMAP-Resizer-Basic-Resizer-refreshed-with-latest-gi.patch
new file mode 100644
index 0000000000..3390599292
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0023-OMAP-Resizer-Basic-Resizer-refreshed-with-latest-gi.patch
@@ -0,0 +1,1890 @@
+From 38f3cd5564a466e5251fc2ff47e0504148922304 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <vaibhav@psp-nfs-02.india.ti.com>
+Date: Wed, 29 Apr 2009 17:18:56 +0530
+Subject: [PATCH 23/26] OMAP-Resizer: Basic Resizer refreshed with latest gitorious tree
+
+This is same resizer driver patch posted by Sergio onto
+mailing list quite a some time back. This commit refreshes
+the same patch on top of latest gitorious.org tree.
+
+List of New/Modified files:
+ modified: drivers/media/video/Kconfig
+ modified: drivers/media/video/isp/Makefile
+ modified: drivers/media/video/isp/isp.c
+ modified: drivers/media/video/isp/ispreg.h
+ new file: drivers/media/video/isp/omap_resizer.c
+ new file: include/linux/omap_resizer.h
+
+TODO:
+ - Resizer driver needs to be independent from camera and ISP
+ - Custom patches implemented ontop of PSP1.0.2 release
+ to fix some V4L2-buf layer issues.
+ -
+---
+ drivers/media/video/Kconfig | 7 +
+ drivers/media/video/isp/Makefile | 4 +
+ drivers/media/video/isp/isp.c | 15 +
+ drivers/media/video/isp/omap_resizer.c | 1634 ++++++++++++++++++++++++++++++++
+ include/linux/omap_resizer.h | 136 +++
+ 5 files changed, 1796 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/isp/omap_resizer.c
+ create mode 100644 include/linux/omap_resizer.h
+
+diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
+index 3cdb5a4..d2b4ae1 100644
+--- a/drivers/media/video/Kconfig
++++ b/drivers/media/video/Kconfig
+@@ -720,6 +720,13 @@ config VIDEO_OMAP3
+ ---help---
+ Driver for an OMAP 3 camera controller.
+
++config VIDEO_OMAP34XX_ISP_RESIZER
++ tristate "OMAP ISP Resizer"
++ depends on VIDEO_V4L2 && ARCH_OMAP34XX
++ select VIDEOBUF_GEN
++ select VIDEOBUF_DMA_SG
++ select OMAP_IOMMU
++
+ config SOC_CAMERA
+ tristate "SoC camera support"
+ depends on VIDEO_V4L2 && HAS_DMA
+diff --git a/drivers/media/video/isp/Makefile b/drivers/media/video/isp/Makefile
+index f14d617..d171fb9 100644
+--- a/drivers/media/video/isp/Makefile
++++ b/drivers/media/video/isp/Makefile
+@@ -7,6 +7,10 @@ else
+ isp-mod-objs += \
+ isp.o ispccdc.o ispmmu.o \
+ isppreview.o ispresizer.o isph3a.o isphist.o isp_af.o ispcsi2.o
++
++obj-$(CONFIG_VIDEO_OMAP34XX_ISP_RESIZER) += \
++ omap_resizer.o
++
+ endif
+
+ obj-$(CONFIG_VIDEO_OMAP3) += isp-mod.o
+diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c
+index 54c839b..f1f92b4 100644
+--- a/drivers/media/video/isp/isp.c
++++ b/drivers/media/video/isp/isp.c
+@@ -505,6 +505,12 @@ int isp_set_callback(enum isp_callback_type type, isp_callback_t callback,
+ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
+ IRQ0ENABLE_PRV_DONE_IRQ);
+ break;
++ case CBK_RESZ_DONE:
++ isp_reg_writel(IRQ0ENABLE_RSZ_DONE_IRQ,
++ OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0STATUS);
++ isp_reg_or(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ IRQ0ENABLE_RSZ_DONE_IRQ);
++ break;
+ default:
+ break;
+ }
+@@ -556,6 +562,10 @@ int isp_unset_callback(enum isp_callback_type type)
+ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
+ ~IRQ0ENABLE_PRV_DONE_IRQ);
+ break;
++ case CBK_RESZ_DONE:
++ isp_reg_and(OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE,
++ ~IRQ0ENABLE_RSZ_DONE_IRQ);
++ break;
+ default:
+ break;
+ }
+@@ -938,6 +948,11 @@ static irqreturn_t omap34xx_isp_isr(int irq, void *_isp)
+ if (!ispresizer_busy())
+ ispresizer_config_shadow_registers();
+ isp_buf_process(bufs);
++ } else {
++ if (irqdis->isp_callbk[CBK_RESZ_DONE])
++ irqdis->isp_callbk[CBK_RESZ_DONE](RESZ_DONE,
++ irqdis->isp_callbk_arg1[CBK_RESZ_DONE],
++ irqdis->isp_callbk_arg2[CBK_RESZ_DONE]);
+ }
+ }
+
+diff --git a/drivers/media/video/isp/omap_resizer.c b/drivers/media/video/isp/omap_resizer.c
+new file mode 100644
+index 0000000..54bc425
+--- /dev/null
++++ b/drivers/media/video/isp/omap_resizer.c
+@@ -0,0 +1,1634 @@
++/*
++ * drivers/media/video/isp/omap_resizer.c
++ *
++ * Wrapper for Resizer module in TI's OMAP3430 ISP
++ *
++ * Copyright (C) 2008 Texas Instruments, Inc.
++ *
++ * Contributors:
++ * Sergio Aguirre <saaguirre@ti.com>
++ * Troy Laramy <t-laramy@ti.com>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#include <linux/mutex.h>
++#include <linux/cdev.h>
++#include <linux/delay.h>
++#include <linux/device.h>
++#include <linux/fs.h>
++#include <linux/mm.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/io.h>
++#include <linux/uaccess.h>
++#include <media/v4l2-dev.h>
++#include <asm/cacheflush.h>
++
++#include "isp.h"
++#include "ispmmu.h"
++#include "ispreg.h"
++#include "ispresizer.h"
++#include <linux/omap_resizer.h>
++
++#define OMAP_REZR_NAME "omap-resizer"
++
++/* Defines and Constants*/
++#define MAX_CHANNELS 16
++#define MAX_IMAGE_WIDTH 2047
++#define MAX_IMAGE_WIDTH_HIGH 2047
++#define ALIGNMENT 16
++#define CHANNEL_BUSY 1
++#define CHANNEL_FREE 0
++#define PIXEL_EVEN 2
++#define RATIO_MULTIPLIER 256
++/* Bit position Macro */
++/* macro for bit set and clear */
++#define BITSET(variable, bit) ((variable) | (1 << bit))
++#define BITRESET(variable, bit) ((variable) & ~(0x00000001 << (bit)))
++#define SET_BIT_INPUTRAM 28
++#define SET_BIT_CBLIN 29
++#define SET_BIT_INPTYP 27
++#define SET_BIT_YCPOS 26
++#define INPUT_RAM 1
++#define UP_RSZ_RATIO 64
++#define DOWN_RSZ_RATIO 512
++#define UP_RSZ_RATIO1 513
++#define DOWN_RSZ_RATIO1 1024
++#define RSZ_IN_SIZE_VERT_SHIFT 16
++#define MAX_HORZ_PIXEL_8BIT 31
++#define MAX_HORZ_PIXEL_16BIT 15
++#define NUM_PHASES 8
++#define NUM_TAPS 4
++#define NUM_D2PH 4 /* for downsampling * 2+x ~ 4x,
++ * number of phases
++ */
++#define NUM_D2TAPS 7 /* for downsampling * 2+x ~ 4x,
++ * number of taps
++ */
++#define ALIGN32 32
++#define MAX_COEF_COUNTER 16
++#define COEFF_ADDRESS_OFFSET 0x04
++
++/* Global structure which contains information about number of channels
++ and protection variables */
++struct device_params {
++
++ unsigned char opened; /* state of the device */
++ struct completion compl_isr; /* Completion for interrupt */
++ struct mutex reszwrap_mutex; /* Semaphore for array */
++
++ struct videobuf_queue_ops vbq_ops; /* videobuf queue operations */
++};
++
++/* Register mapped structure which contains the every register
++ information */
++struct resizer_config {
++ u32 rsz_pcr; /* pcr register mapping
++ * variable.
++ */
++ u32 rsz_in_start; /* in_start register mapping
++ * variable.
++ */
++ u32 rsz_in_size; /* in_size register mapping
++ * variable.
++ */
++ u32 rsz_out_size; /* out_size register mapping
++ * variable.
++ */
++ u32 rsz_cnt; /* rsz_cnt register mapping
++ * variable.
++ */
++ u32 rsz_sdr_inadd; /* sdr_inadd register mapping
++ * variable.
++ */
++ u32 rsz_sdr_inoff; /* sdr_inoff register mapping
++ * variable.
++ */
++ u32 rsz_sdr_outadd; /* sdr_outadd register mapping
++ * variable.
++ */
++ u32 rsz_sdr_outoff; /* sdr_outbuff register
++ * mapping variable.
++ */
++ u32 rsz_coeff_horz[16]; /* horizontal coefficients
++ * mapping array.
++ */
++ u32 rsz_coeff_vert[16]; /* vertical coefficients
++ * mapping array.
++ */
++ u32 rsz_yehn; /* yehn(luma)register mapping
++ * variable.
++ */
++};
++
++struct rsz_mult {
++ int in_hsize; /* input frame horizontal
++ * size.
++ */
++ int in_vsize; /* input frame vertical size.
++ */
++ int out_hsize; /* output frame horizontal
++ * size.
++ */
++ int out_vsize; /* output frame vertical
++ * size.
++ */
++ int in_pitch; /* offset between two rows of
++ * input frame.
++ */
++ int out_pitch; /* offset between two rows of
++ * output frame.
++ */
++ int end_hsize;
++ int end_vsize;
++ int num_htap; /* 0 = 7tap; 1 = 4tap */
++ int num_vtap; /* 0 = 7tap; 1 = 4tap */
++ int active;
++ int inptyp;
++ int vrsz;
++ int hrsz;
++ int hstph; /* for specifying horizontal
++ * starting phase.
++ */
++ int vstph;
++ int pix_fmt; /* # defined, UYVY or YUYV. */
++ int cbilin; /* # defined, filter with luma
++ * or bi-linear.
++ */
++ u16 tap4filt_coeffs[32]; /* horizontal filter
++ * coefficients.
++ */
++ u16 tap7filt_coeffs[32]; /* vertical filter
++ * coefficients.
++ */
++};
++/* Channel specific structure contains information regarding
++ the every channel */
++struct channel_config {
++ struct resizer_config register_config; /* Instance of register set
++ * mapping structure
++ */
++ int status; /* Specifies whether the
++ * channel is busy or not
++ */
++ struct mutex chanprotection_mutex;
++ enum config_done config_state;
++ u8 input_buf_index;
++ u8 output_buf_index;
++
++};
++
++/* per-filehandle data structure */
++struct rsz_fh {
++ struct rsz_params *params;
++ struct channel_config *config;
++ struct rsz_mult *multipass; /* Multipass to support
++ * resizing ration outside
++ * of 0.25x to 4x
++ */
++ spinlock_t vbq_lock; /* spinlock for videobuf
++ * queues.
++ */
++ enum v4l2_buf_type type;
++ struct videobuf_queue vbq;
++ struct device_params *device;
++
++ dma_addr_t isp_addr_read; /* Input/Output address */
++ dma_addr_t isp_addr_write; /* Input/Output address */
++ u32 rsz_bufsize; /* channel specific buffersize
++ */
++};
++
++static struct device_params *device_config;
++static struct device *rsz_device;
++static int rsz_major = -1;
++/* functions declaration */
++static void rsz_hardware_setup(struct channel_config *rsz_conf_chan);
++static int rsz_set_params(struct rsz_mult *multipass, struct rsz_params *,
++ struct channel_config *);
++static int rsz_get_params(struct rsz_params *, struct channel_config *);
++static void rsz_copy_data(struct rsz_mult *multipass,
++ struct rsz_params *params);
++static void rsz_isr(unsigned long status, isp_vbq_callback_ptr arg1,
++ void *arg2);
++static void rsz_calculate_crop(struct channel_config *rsz_conf_chan,
++ struct rsz_cropsize *cropsize);
++static int rsz_set_multipass(struct rsz_mult *multipass,
++ struct channel_config *rsz_conf_chan);
++static int rsz_set_ratio(struct rsz_mult *multipass,
++ struct channel_config *rsz_conf_chan);
++static void rsz_config_ratio(struct rsz_mult *multipass,
++ struct channel_config *rsz_conf_chan);
++
++/**
++ * rsz_hardware_setup - Sets hardware configuration registers
++ * @rsz_conf_chan: Structure containing channel configuration
++ *
++ * Set hardware configuration registers
++ **/
++static void rsz_hardware_setup(struct channel_config *rsz_conf_chan)
++{
++ int coeffcounter;
++ int coeffoffset = 0;
++
++ omap_writel(rsz_conf_chan->register_config.rsz_cnt,
++ OMAP3ISP_RESZ_REG(ISPRSZ_CNT));
++
++ omap_writel(rsz_conf_chan->register_config.rsz_in_start,
++ OMAP3ISP_RESZ_REG(ISPRSZ_IN_START));
++ omap_writel(rsz_conf_chan->register_config.rsz_in_size,
++ OMAP3ISP_RESZ_REG(ISPRSZ_IN_SIZE));
++
++ omap_writel(rsz_conf_chan->register_config.rsz_out_size,
++ OMAP3ISP_RESZ_REG(ISPRSZ_OUT_SIZE));
++ omap_writel(rsz_conf_chan->register_config.rsz_sdr_inadd,
++ OMAP3ISP_RESZ_REG(ISPRSZ_SDR_INADD));
++ omap_writel(rsz_conf_chan->register_config.rsz_sdr_inoff,
++ OMAP3ISP_RESZ_REG(ISPRSZ_SDR_INOFF));
++ omap_writel(rsz_conf_chan->register_config.rsz_sdr_outadd,
++ OMAP3ISP_RESZ_REG(ISPRSZ_SDR_OUTADD));
++ omap_writel(rsz_conf_chan->register_config.rsz_sdr_outoff,
++ OMAP3ISP_RESZ_REG(ISPRSZ_SDR_OUTOFF));
++ omap_writel(rsz_conf_chan->register_config.rsz_yehn, OMAP3ISP_RESZ_REG(ISPRSZ_YENH));
++
++ for (coeffcounter = 0; coeffcounter < MAX_COEF_COUNTER;
++ coeffcounter++) {
++ omap_writel(rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter],
++ OMAP3ISP_RESZ_REG(ISPRSZ_HFILT10
++ + coeffoffset));
++
++ omap_writel(rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter],
++ OMAP3ISP_RESZ_REG(ISPRSZ_VFILT10
++ + coeffoffset));
++ coeffoffset = coeffoffset + COEFF_ADDRESS_OFFSET;
++ }
++}
++
++/**
++ * rsz_start - Enables Resizer Wrapper
++ * @arg: Currently not used.
++ * @device: Structure containing ISP resizer wrapper global information
++ *
++ * Submits a resizing task specified by the rsz_resize structure. The call can
++ * either be blocked until the task is completed or returned immediately based
++ * on the value of the blocking argument in the rsz_resize structure. If it is
++ * blocking, the status of the task can be checked by calling ioctl
++ * RSZ_G_STATUS. Only one task can be outstanding for each logical channel.
++ *
++ * Returns 0 if successful, or -EINVAL if could not set callback for RSZR IRQ
++ * event or the state of the channel is not configured.
++ **/
++int rsz_start(int *arg, struct rsz_fh *fh)
++{
++ struct channel_config *rsz_conf_chan = fh->config;
++ struct rsz_mult *multipass = fh->multipass;
++ struct videobuf_queue *q = &fh->vbq;
++ int ret;
++
++ if (rsz_conf_chan->config_state) {
++ dev_err(rsz_device, "State not configured \n");
++ goto err_einval;
++ }
++
++ rsz_conf_chan->status = CHANNEL_BUSY;
++
++ rsz_hardware_setup(rsz_conf_chan);
++
++ if (isp_set_callback(CBK_RESZ_DONE, rsz_isr, (void *) NULL,
++ (void *)NULL)) {
++ dev_err(rsz_device, "No callback for RSZR\n");
++ goto err_einval;
++ }
++mult:
++ device_config->compl_isr.done = 0;
++
++ ispresizer_enable(1);
++
++ ret = wait_for_completion_interruptible(&device_config->compl_isr);
++ if (ret != 0) {
++ dev_dbg(rsz_device, "Unexpected exit from "
++ "wait_for_completion_interruptible\n");
++ wait_for_completion(&device_config->compl_isr);
++ }
++
++ if (multipass->active) {
++ rsz_set_multipass(multipass, rsz_conf_chan);
++ goto mult;
++ }
++
++ if (fh->isp_addr_read) {
++ ispmmu_unmap(fh->isp_addr_read);
++ fh->isp_addr_read = 0;
++ }
++ if (fh->isp_addr_write) {
++ ispmmu_unmap(fh->isp_addr_write);
++ fh->isp_addr_write = 0;
++ }
++
++ rsz_conf_chan->status = CHANNEL_FREE;
++ q->bufs[rsz_conf_chan->input_buf_index]->state = VIDEOBUF_NEEDS_INIT;
++ q->bufs[rsz_conf_chan->output_buf_index]->state = VIDEOBUF_NEEDS_INIT;
++ rsz_conf_chan->register_config.rsz_sdr_outadd = 0;
++ rsz_conf_chan->register_config.rsz_sdr_inadd = 0;
++
++ /* Unmap and free the DMA memory allocated for buffers */
++ videobuf_dma_unmap(q, videobuf_to_dma(
++ q->bufs[rsz_conf_chan->input_buf_index]));
++ videobuf_dma_unmap(q, videobuf_to_dma(
++ q->bufs[rsz_conf_chan->output_buf_index]));
++ videobuf_dma_free(videobuf_to_dma(
++ q->bufs[rsz_conf_chan->input_buf_index]));
++ videobuf_dma_free(videobuf_to_dma(
++ q->bufs[rsz_conf_chan->output_buf_index]));
++
++ isp_unset_callback(CBK_RESZ_DONE);
++
++ return 0;
++err_einval:
++ return -EINVAL;
++}
++
++/**
++ * rsz_set_multipass - Set resizer multipass
++ * @rsz_conf_chan: Structure containing channel configuration
++ *
++ * Returns always 0
++ **/
++static int rsz_set_multipass(struct rsz_mult *multipass,
++ struct channel_config *rsz_conf_chan)
++{
++ multipass->in_hsize = multipass->out_hsize;
++ multipass->in_vsize = multipass->out_vsize;
++ multipass->out_hsize = multipass->end_hsize;
++ multipass->out_vsize = multipass->end_vsize;
++
++ multipass->out_pitch = (multipass->inptyp ? multipass->out_hsize
++ : (multipass->out_hsize * 2));
++ multipass->in_pitch = (multipass->inptyp ? multipass->in_hsize
++ : (multipass->in_hsize * 2));
++
++ rsz_set_ratio(multipass, rsz_conf_chan);
++ rsz_config_ratio(multipass, rsz_conf_chan);
++ rsz_hardware_setup(rsz_conf_chan);
++ return 0;
++}
++
++/**
++ * rsz_copy_data - Copy data
++ * @params: Structure containing the Resizer Wrapper parameters
++ *
++ * Copy data
++ **/
++static void rsz_copy_data(struct rsz_mult *multipass, struct rsz_params *params)
++{
++ int i;
++ multipass->in_hsize = params->in_hsize;
++ multipass->in_vsize = params->in_vsize;
++ multipass->out_hsize = params->out_hsize;
++ multipass->out_vsize = params->out_vsize;
++ multipass->end_hsize = params->out_hsize;
++ multipass->end_vsize = params->out_vsize;
++ multipass->in_pitch = params->in_pitch;
++ multipass->out_pitch = params->out_pitch;
++ multipass->hstph = params->hstph;
++ multipass->vstph = params->vstph;
++ multipass->inptyp = params->inptyp;
++ multipass->pix_fmt = params->pix_fmt;
++ multipass->cbilin = params->cbilin;
++
++ for (i = 0; i < 32; i++) {
++ multipass->tap4filt_coeffs[i] = params->tap4filt_coeffs[i];
++ multipass->tap7filt_coeffs[i] = params->tap7filt_coeffs[i];
++ }
++}
++
++/**
++ * rsz_set_params - Set parameters for resizer wrapper
++ * @params: Structure containing the Resizer Wrapper parameters
++ * @rsz_conf_chan: Structure containing channel configuration
++ *
++ * Used to set the parameters of the Resizer hardware, including input and
++ * output image size, horizontal and vertical poly-phase filter coefficients,
++ * luma enchancement filter coefficients, etc.
++ **/
++static int rsz_set_params(struct rsz_mult *multipass, struct rsz_params *params,
++ struct channel_config *rsz_conf_chan)
++{
++ int mul = 1;
++ if ((params->yenh_params.type < 0) || (params->yenh_params.type > 2)) {
++ dev_err(rsz_device, "rsz_set_params: Wrong yenh type\n");
++ return -EINVAL;
++ }
++ if ((params->in_vsize <= 0) || (params->in_hsize <= 0) ||
++ (params->out_vsize <= 0) || (params->out_hsize <= 0) ||
++ (params->in_pitch <= 0) || (params->out_pitch <= 0)) {
++ dev_err(rsz_device, "rsz_set_params: Invalid size params\n");
++ return -EINVAL;
++ }
++ if ((params->inptyp != RSZ_INTYPE_YCBCR422_16BIT) &&
++ (params->inptyp != RSZ_INTYPE_PLANAR_8BIT)) {
++ dev_err(rsz_device, "rsz_set_params: Invalid input type\n");
++ return -EINVAL;
++ }
++ if ((params->pix_fmt != RSZ_PIX_FMT_UYVY) &&
++ (params->pix_fmt != RSZ_PIX_FMT_YUYV)) {
++ dev_err(rsz_device, "rsz_set_params: Invalid pixel format\n");
++ return -EINVAL;
++ }
++ if (params->inptyp == RSZ_INTYPE_YCBCR422_16BIT)
++ mul = 2;
++ else
++ mul = 1;
++ if (params->in_pitch < (params->in_hsize * mul)) {
++ dev_err(rsz_device, "rsz_set_params: Pitch is incorrect\n");
++ return -EINVAL;
++ }
++ if (params->out_pitch < (params->out_hsize * mul)) {
++ dev_err(rsz_device, "rsz_set_params: Out pitch cannot be less"
++ " than out hsize\n");
++ return -EINVAL;
++ }
++ /* Output H size should be even */
++ if ((params->out_hsize % PIXEL_EVEN) != 0) {
++ dev_err(rsz_device, "rsz_set_params: Output H size should"
++ " be even\n");
++ return -EINVAL;
++ }
++ if (params->horz_starting_pixel < 0) {
++ dev_err(rsz_device, "rsz_set_params: Horz start pixel cannot"
++ " be less than zero\n");
++ return -EINVAL;
++ }
++
++ rsz_copy_data(multipass, params);
++ if (0 != rsz_set_ratio(multipass, rsz_conf_chan))
++ goto err_einval;
++
++ if (params->yenh_params.type) {
++ if ((multipass->num_htap && multipass->out_hsize >
++ 1280) ||
++ (!multipass->num_htap && multipass->out_hsize >
++ 640))
++ goto err_einval;
++ }
++
++ if (INPUT_RAM)
++ params->vert_starting_pixel = 0;
++
++ rsz_conf_chan->register_config.rsz_in_start =
++ (params->vert_starting_pixel
++ << ISPRSZ_IN_SIZE_VERT_SHIFT)
++ & ISPRSZ_IN_SIZE_VERT_MASK;
++
++ if (params->inptyp == RSZ_INTYPE_PLANAR_8BIT) {
++ if (params->horz_starting_pixel > MAX_HORZ_PIXEL_8BIT)
++ goto err_einval;
++ }
++ if (params->inptyp == RSZ_INTYPE_YCBCR422_16BIT) {
++ if (params->horz_starting_pixel > MAX_HORZ_PIXEL_16BIT)
++ goto err_einval;
++ }
++
++ rsz_conf_chan->register_config.rsz_in_start |=
++ params->horz_starting_pixel
++ & ISPRSZ_IN_START_HORZ_ST_MASK;
++
++ rsz_conf_chan->register_config.rsz_yehn =
++ (params->yenh_params.type
++ << ISPRSZ_YENH_ALGO_SHIFT)
++ & ISPRSZ_YENH_ALGO_MASK;
++
++ if (params->yenh_params.type) {
++ rsz_conf_chan->register_config.rsz_yehn |=
++ params->yenh_params.core
++ & ISPRSZ_YENH_CORE_MASK;
++
++ rsz_conf_chan->register_config.rsz_yehn |=
++ (params->yenh_params.gain
++ << ISPRSZ_YENH_GAIN_SHIFT)
++ & ISPRSZ_YENH_GAIN_MASK;
++
++ rsz_conf_chan->register_config.rsz_yehn |=
++ (params->yenh_params.slop
++ << ISPRSZ_YENH_SLOP_SHIFT)
++ & ISPRSZ_YENH_SLOP_MASK;
++ }
++
++ rsz_config_ratio(multipass, rsz_conf_chan);
++
++ rsz_conf_chan->config_state = STATE_CONFIGURED;
++
++ return 0;
++err_einval:
++ return -EINVAL;
++}
++
++/**
++ * rsz_set_ratio - Set ratio
++ * @rsz_conf_chan: Structure containing channel configuration
++ *
++ * Returns 0 if successful, -EINVAL if invalid output size, upscaling ratio is
++ * being requested, or other ratio configuration value is out of bounds
++ **/
++static int rsz_set_ratio(struct rsz_mult *multipass,
++ struct channel_config *rsz_conf_chan)
++{
++ int alignment = 0;
++
++ rsz_conf_chan->register_config.rsz_cnt = 0;
++
++ if ((multipass->out_hsize > MAX_IMAGE_WIDTH) ||
++ (multipass->out_vsize > MAX_IMAGE_WIDTH)) {
++ dev_err(rsz_device, "Invalid output size!");
++ goto err_einval;
++ }
++ if (multipass->cbilin) {
++ rsz_conf_chan->register_config.rsz_cnt =
++ BITSET(rsz_conf_chan->register_config.rsz_cnt,
++ SET_BIT_CBLIN);
++ }
++ if (INPUT_RAM) {
++ rsz_conf_chan->register_config.rsz_cnt =
++ BITSET(rsz_conf_chan->register_config.rsz_cnt,
++ SET_BIT_INPUTRAM);
++ }
++ if (multipass->inptyp == RSZ_INTYPE_PLANAR_8BIT) {
++ rsz_conf_chan->register_config.rsz_cnt =
++ BITSET(rsz_conf_chan->register_config.rsz_cnt,
++ SET_BIT_INPTYP);
++ } else {
++ rsz_conf_chan->register_config.rsz_cnt =
++ BITRESET(rsz_conf_chan->register_config.
++ rsz_cnt, SET_BIT_INPTYP);
++
++ if (multipass->pix_fmt == RSZ_PIX_FMT_UYVY) {
++ rsz_conf_chan->register_config.rsz_cnt =
++ BITRESET(rsz_conf_chan->register_config.
++ rsz_cnt, SET_BIT_YCPOS);
++ } else if (multipass->pix_fmt == RSZ_PIX_FMT_YUYV) {
++ rsz_conf_chan->register_config.rsz_cnt =
++ BITSET(rsz_conf_chan->register_config.
++ rsz_cnt, SET_BIT_YCPOS);
++ }
++
++ }
++ multipass->vrsz =
++ (multipass->in_vsize * RATIO_MULTIPLIER) / multipass->out_vsize;
++ multipass->hrsz =
++ (multipass->in_hsize * RATIO_MULTIPLIER) / multipass->out_hsize;
++ if (UP_RSZ_RATIO > multipass->vrsz || UP_RSZ_RATIO > multipass->hrsz) {
++ dev_err(rsz_device, "Upscaling ratio not supported!");
++ goto err_einval;
++ }
++ multipass->vrsz = (multipass->in_vsize - NUM_D2TAPS) * RATIO_MULTIPLIER
++ / (multipass->out_vsize - 1);
++ multipass->hrsz = ((multipass->in_hsize - NUM_D2TAPS)
++ * RATIO_MULTIPLIER) /
++ (multipass->out_hsize - 1);
++
++ if (multipass->hrsz <= 512) {
++ multipass->hrsz = (multipass->in_hsize - NUM_TAPS)
++ * RATIO_MULTIPLIER
++ / (multipass->out_hsize - 1);
++ if (multipass->hrsz < 64)
++ multipass->hrsz = 64;
++ if (multipass->hrsz > 512)
++ multipass->hrsz = 512;
++ if (multipass->hstph > NUM_PHASES)
++ goto err_einval;
++ multipass->num_htap = 1;
++ } else if (multipass->hrsz >= 513 && multipass->hrsz <= 1024) {
++ if (multipass->hstph > NUM_D2PH)
++ goto err_einval;
++ multipass->num_htap = 0;
++ }
++
++ if (multipass->vrsz <= 512) {
++ multipass->vrsz = (multipass->in_vsize - NUM_TAPS)
++ * RATIO_MULTIPLIER
++ / (multipass->out_vsize - 1);
++ if (multipass->vrsz < 64)
++ multipass->vrsz = 64;
++ if (multipass->vrsz > 512)
++ multipass->vrsz = 512;
++ if (multipass->vstph > NUM_PHASES)
++ goto err_einval;
++ multipass->num_vtap = 1;
++ } else if (multipass->vrsz >= 513 && multipass->vrsz <= 1024) {
++ if (multipass->vstph > NUM_D2PH)
++ goto err_einval;
++ multipass->num_vtap = 0;
++ }
++
++ if ((multipass->in_pitch) % ALIGN32) {
++ dev_err(rsz_device, "Invalid input pitch: %d \n",
++ multipass->in_pitch);
++ goto err_einval;
++ }
++ if ((multipass->out_pitch) % ALIGN32) {
++ dev_err(rsz_device, "Invalid output pitch %d \n",
++ multipass->out_pitch);
++ goto err_einval;
++ }
++
++ if (multipass->vrsz < 256 &&
++ (multipass->in_vsize < multipass->out_vsize)) {
++ if (multipass->inptyp == RSZ_INTYPE_PLANAR_8BIT)
++ alignment = ALIGNMENT;
++ else if (multipass->inptyp == RSZ_INTYPE_YCBCR422_16BIT)
++ alignment = (ALIGNMENT / 2);
++ else
++ dev_err(rsz_device, "Invalid input type\n");
++
++ if (!(((multipass->out_hsize % PIXEL_EVEN) == 0)
++ && (multipass->out_hsize % alignment) == 0)) {
++ dev_err(rsz_device, "wrong hsize\n");
++ goto err_einval;
++ }
++ }
++ if (multipass->hrsz >= 64 && multipass->hrsz <= 1024) {
++ if (multipass->out_hsize > MAX_IMAGE_WIDTH) {
++ dev_err(rsz_device, "wrong width\n");
++ goto err_einval;
++ }
++ multipass->active = 0;
++
++ } else if (multipass->hrsz > 1024) {
++ if (multipass->out_hsize > MAX_IMAGE_WIDTH) {
++ dev_err(rsz_device, "wrong width\n");
++ goto err_einval;
++ }
++ if (multipass->hstph > NUM_D2PH)
++ goto err_einval;
++ multipass->num_htap = 0;
++ multipass->out_hsize = multipass->in_hsize * 256 / 1024;
++ if (multipass->out_hsize % ALIGN32) {
++ multipass->out_hsize +=
++ abs((multipass->out_hsize % ALIGN32) - ALIGN32);
++ }
++ multipass->out_pitch = ((multipass->inptyp) ?
++ multipass->out_hsize :
++ (multipass->out_hsize * 2));
++ multipass->hrsz = ((multipass->in_hsize - NUM_D2TAPS)
++ * RATIO_MULTIPLIER)
++ / (multipass->out_hsize - 1);
++ multipass->active = 1;
++
++ }
++
++ if (multipass->vrsz > 1024) {
++ if (multipass->out_vsize > MAX_IMAGE_WIDTH_HIGH) {
++ dev_err(rsz_device, "wrong width\n");
++ goto err_einval;
++ }
++
++ multipass->out_vsize = multipass->in_vsize * 256 / 1024;
++ multipass->vrsz = ((multipass->in_vsize - NUM_D2TAPS)
++ * RATIO_MULTIPLIER)
++ / (multipass->out_vsize - 1);
++ multipass->active = 1;
++ multipass->num_vtap = 0;
++
++ }
++ rsz_conf_chan->register_config.rsz_out_size =
++ multipass->out_hsize
++ & ISPRSZ_OUT_SIZE_HORZ_MASK;
++
++ rsz_conf_chan->register_config.rsz_out_size |=
++ (multipass->out_vsize
++ << ISPRSZ_OUT_SIZE_VERT_SHIFT)
++ & ISPRSZ_OUT_SIZE_VERT_MASK;
++
++ rsz_conf_chan->register_config.rsz_sdr_inoff =
++ multipass->in_pitch
++ & ISPRSZ_SDR_INOFF_OFFSET_MASK;
++
++ rsz_conf_chan->register_config.rsz_sdr_outoff =
++ multipass->out_pitch
++ & ISPRSZ_SDR_OUTOFF_OFFSET_MASK;
++
++ if (multipass->hrsz >= 64 && multipass->hrsz <= 512) {
++ if (multipass->hstph > NUM_PHASES)
++ goto err_einval;
++ } else if (multipass->hrsz >= 64 && multipass->hrsz <= 512) {
++ if (multipass->hstph > NUM_D2PH)
++ goto err_einval;
++ }
++
++ rsz_conf_chan->register_config.rsz_cnt |=
++ (multipass->hstph
++ << ISPRSZ_CNT_HSTPH_SHIFT)
++ & ISPRSZ_CNT_HSTPH_MASK;
++
++ if (multipass->vrsz >= 64 && multipass->hrsz <= 512) {
++ if (multipass->vstph > NUM_PHASES)
++ goto err_einval;
++ } else if (multipass->vrsz >= 64 && multipass->vrsz <= 512) {
++ if (multipass->vstph > NUM_D2PH)
++ goto err_einval;
++ }
++
++ rsz_conf_chan->register_config.rsz_cnt |=
++ (multipass->vstph
++ << ISPRSZ_CNT_VSTPH_SHIFT)
++ & ISPRSZ_CNT_VSTPH_MASK;
++
++ rsz_conf_chan->register_config.rsz_cnt |=
++ (multipass->hrsz - 1)
++ & ISPRSZ_CNT_HRSZ_MASK;
++
++ rsz_conf_chan->register_config.rsz_cnt |=
++ ((multipass->vrsz - 1)
++ << ISPRSZ_CNT_VRSZ_SHIFT)
++ & ISPRSZ_CNT_VRSZ_MASK;
++
++ return 0;
++err_einval:
++ return -EINVAL;
++}
++
++/**
++ * rsz_config_ratio - Configure ratio
++ * @rsz_conf_chan: Structure containing channel configuration
++ *
++ * Configure ratio
++ **/
++static void rsz_config_ratio(struct rsz_mult *multipass,
++ struct channel_config *rsz_conf_chan)
++{
++ int hsize;
++ int vsize;
++ int coeffcounter;
++
++ if (multipass->hrsz <= 512) {
++ hsize = ((32 * multipass->hstph + (multipass->out_hsize - 1)
++ * multipass->hrsz + 16) >> 8) + 7;
++ } else {
++ hsize = ((64 * multipass->hstph + (multipass->out_hsize - 1)
++ * multipass->hrsz + 32) >> 8) + 7;
++ }
++ if (multipass->vrsz <= 512) {
++ vsize = ((32 * multipass->vstph + (multipass->out_vsize - 1)
++ * multipass->vrsz + 16) >> 8) + 4;
++ } else {
++ vsize = ((64 * multipass->vstph + (multipass->out_vsize - 1)
++ * multipass->vrsz + 32) >> 8) + 7;
++ }
++ rsz_conf_chan->register_config.rsz_in_size = hsize;
++
++ rsz_conf_chan->register_config.rsz_in_size |=
++ ((vsize << ISPRSZ_IN_SIZE_VERT_SHIFT)
++ & ISPRSZ_IN_SIZE_VERT_MASK);
++
++ for (coeffcounter = 0; coeffcounter < MAX_COEF_COUNTER;
++ coeffcounter++) {
++ if (multipass->num_htap) {
++ rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter] =
++ (multipass->tap4filt_coeffs[2
++ * coeffcounter]
++ & ISPRSZ_HFILT10_COEF0_MASK);
++ rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter] |=
++ ((multipass->tap4filt_coeffs[2
++ * coeffcounter + 1]
++ << ISPRSZ_HFILT10_COEF1_SHIFT)
++ & ISPRSZ_HFILT10_COEF1_MASK);
++ } else {
++ rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter] =
++ (multipass->tap7filt_coeffs[2
++ * coeffcounter]
++ & ISPRSZ_HFILT10_COEF0_MASK);
++
++ rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter] |=
++ ((multipass->tap7filt_coeffs[2
++ * coeffcounter + 1]
++ << ISPRSZ_HFILT10_COEF1_SHIFT)
++ & ISPRSZ_HFILT10_COEF1_MASK);
++ }
++
++ if (multipass->num_vtap) {
++ rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter] =
++ (multipass->tap4filt_coeffs[2
++ * coeffcounter]
++ & ISPRSZ_VFILT10_COEF0_MASK);
++
++ rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter] |=
++ ((multipass->tap4filt_coeffs[2
++ * coeffcounter + 1]
++ << ISPRSZ_VFILT10_COEF1_SHIFT) &
++ ISPRSZ_VFILT10_COEF1_MASK);
++ } else {
++ rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter] =
++ (multipass->tap7filt_coeffs[2
++ * coeffcounter]
++ & ISPRSZ_VFILT10_COEF0_MASK);
++ rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter] |=
++ ((multipass->tap7filt_coeffs[2
++ * coeffcounter + 1]
++ << ISPRSZ_VFILT10_COEF1_SHIFT)
++ & ISPRSZ_VFILT10_COEF1_MASK);
++ }
++ }
++}
++
++/**
++ * rsz_get_params - Gets the parameter values
++ * @params: Structure containing the Resizer Wrapper parameters
++ * @rsz_conf_chan: Structure containing channel configuration
++ *
++ * Used to get the Resizer hardware settings associated with the
++ * current logical channel represented by fd.
++ **/
++static int rsz_get_params(struct rsz_params *params,
++ struct channel_config *rsz_conf_chan)
++{
++ int coeffcounter;
++
++ if (rsz_conf_chan->config_state) {
++ dev_err(rsz_device, "state not configured\n");
++ return -EINVAL;
++ }
++
++ params->in_hsize = rsz_conf_chan->register_config.rsz_in_size
++ & ISPRSZ_IN_SIZE_HORZ_MASK;
++ params->in_vsize = (rsz_conf_chan->register_config.rsz_in_size
++ & ISPRSZ_IN_SIZE_VERT_MASK)
++ >> ISPRSZ_IN_SIZE_VERT_SHIFT;
++
++ params->in_pitch = rsz_conf_chan->register_config.rsz_sdr_inoff
++ & ISPRSZ_SDR_INOFF_OFFSET_MASK;
++
++ params->out_hsize = rsz_conf_chan->register_config.rsz_out_size
++ & ISPRSZ_OUT_SIZE_HORZ_MASK;
++
++ params->out_vsize = (rsz_conf_chan->register_config.rsz_out_size
++ & ISPRSZ_OUT_SIZE_VERT_MASK)
++ >> ISPRSZ_OUT_SIZE_VERT_SHIFT;
++
++ params->out_pitch = rsz_conf_chan->register_config.rsz_sdr_outoff
++ & ISPRSZ_SDR_OUTOFF_OFFSET_MASK;
++
++ params->cbilin = (rsz_conf_chan->register_config.rsz_cnt
++ & SET_BIT_CBLIN) >> SET_BIT_CBLIN;
++
++ params->inptyp = (rsz_conf_chan->register_config.rsz_cnt
++ & ISPRSZ_CNT_INPTYP_MASK)
++ >> SET_BIT_INPTYP;
++ params->horz_starting_pixel = ((rsz_conf_chan->register_config.
++ rsz_in_start
++ & ISPRSZ_IN_START_HORZ_ST_MASK));
++ params->vert_starting_pixel = ((rsz_conf_chan->register_config.
++ rsz_in_start
++ & ISPRSZ_IN_START_VERT_ST_MASK)
++ >> ISPRSZ_IN_START_VERT_ST_SHIFT);
++
++ params->hstph = ((rsz_conf_chan->register_config.rsz_cnt
++ & ISPRSZ_CNT_HSTPH_MASK
++ >> ISPRSZ_CNT_HSTPH_SHIFT));
++ params->vstph = ((rsz_conf_chan->register_config.rsz_cnt
++ & ISPRSZ_CNT_VSTPH_MASK
++ >> ISPRSZ_CNT_VSTPH_SHIFT));
++
++ for (coeffcounter = 0; coeffcounter < MAX_COEF_COUNTER;
++ coeffcounter++) {
++ params->tap4filt_coeffs[2 * coeffcounter] =
++ rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter]
++ & ISPRSZ_HFILT10_COEF0_MASK;
++
++ params->tap4filt_coeffs[2 * coeffcounter + 1] =
++ (rsz_conf_chan->register_config.
++ rsz_coeff_horz[coeffcounter]
++ & ISPRSZ_HFILT10_COEF1_MASK)
++ >> ISPRSZ_HFILT10_COEF1_SHIFT;
++
++ params->tap7filt_coeffs[2 * coeffcounter] =
++ rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter]
++ & ISPRSZ_VFILT10_COEF0_MASK;
++
++ params->tap7filt_coeffs[2 * coeffcounter + 1] =
++ (rsz_conf_chan->register_config.
++ rsz_coeff_vert[coeffcounter]
++ & ISPRSZ_VFILT10_COEF1_MASK)
++ >> ISPRSZ_VFILT10_COEF1_SHIFT;
++
++ }
++
++ params->yenh_params.type = (rsz_conf_chan->register_config.rsz_yehn
++ & ISPRSZ_YENH_ALGO_MASK)
++ >> ISPRSZ_YENH_ALGO_SHIFT;
++
++ params->yenh_params.core = rsz_conf_chan->register_config.rsz_yehn
++ & ISPRSZ_YENH_CORE_MASK;
++
++ params->yenh_params.gain = (rsz_conf_chan->register_config.rsz_yehn
++ & ISPRSZ_YENH_GAIN_MASK)
++ >> ISPRSZ_YENH_GAIN_SHIFT;
++
++ params->yenh_params.slop = (rsz_conf_chan->register_config.rsz_yehn
++ & ISPRSZ_YENH_SLOP_MASK)
++ >> ISPRSZ_YENH_SLOP_SHIFT;
++
++ params->pix_fmt = ((rsz_conf_chan->register_config.rsz_cnt
++ & ISPRSZ_CNT_PIXFMT_MASK)
++ >> SET_BIT_YCPOS);
++
++ if (params->pix_fmt)
++ params->pix_fmt = RSZ_PIX_FMT_UYVY;
++ else
++ params->pix_fmt = RSZ_PIX_FMT_YUYV;
++
++ return 0;
++}
++
++/**
++ * rsz_calculate_crop - Calculate Crop values
++ * @rsz_conf_chan: Structure containing channel configuration
++ * @cropsize: Structure containing crop parameters
++ *
++ * Calculate Crop values
++ **/
++static void rsz_calculate_crop(struct channel_config *rsz_conf_chan,
++ struct rsz_cropsize *cropsize)
++{
++ int luma_enable;
++
++ cropsize->hcrop = 0;
++ cropsize->vcrop = 0;
++
++ luma_enable = (rsz_conf_chan->register_config.rsz_yehn
++ & ISPRSZ_YENH_ALGO_MASK)
++ >> ISPRSZ_YENH_ALGO_SHIFT;
++
++ if (luma_enable)
++ cropsize->hcrop += 2;
++}
++
++/**
++ * rsz_vbq_release - Videobuffer queue release
++ * @q: Structure containing the videobuffer queue file handle, and device
++ * structure which contains the actual configuration.
++ * @vb: Structure containing the videobuffer used for resizer processing.
++ **/
++static void rsz_vbq_release(struct videobuf_queue *q,
++ struct videobuf_buffer *vb)
++{
++ int i;
++ struct rsz_fh *fh = q->priv_data;
++
++ for (i = 0; i < VIDEO_MAX_FRAME; i++) {
++ struct videobuf_dmabuf *dma = NULL;
++ if (!q->bufs[i])
++ continue;
++ if (q->bufs[i]->memory != V4L2_MEMORY_MMAP)
++ continue;
++ dma = videobuf_to_dma(q->bufs[i]);
++ videobuf_dma_unmap(q, dma);
++ videobuf_dma_free(dma);
++ }
++
++ ispmmu_unmap(fh->isp_addr_read);
++ ispmmu_unmap(fh->isp_addr_write);
++ fh->isp_addr_read = 0;
++ fh->isp_addr_write = 0;
++ spin_lock(&fh->vbq_lock);
++ vb->state = VIDEOBUF_NEEDS_INIT;
++ spin_unlock(&fh->vbq_lock);
++
++}
++
++/**
++ * rsz_vbq_setup - Sets up the videobuffer size and validates count.
++ * @q: Structure containing the videobuffer queue file handle, and device
++ * structure which contains the actual configuration.
++ * @cnt: Number of buffers requested
++ * @size: Size in bytes of the buffer used for previewing
++ *
++ * Always returns 0.
++ **/
++static int rsz_vbq_setup(struct videobuf_queue *q, unsigned int *cnt,
++ unsigned int *size)
++{
++ struct rsz_fh *fh = q->priv_data;
++ struct rsz_mult *multipass = fh->multipass;
++ u32 insize, outsize;
++
++ spin_lock(&fh->vbq_lock);
++ if (*cnt <= 0)
++ *cnt = VIDEO_MAX_FRAME;
++
++ if (*cnt > VIDEO_MAX_FRAME)
++ *cnt = VIDEO_MAX_FRAME;
++
++ outsize = multipass->out_pitch * multipass->out_vsize;
++ insize = multipass->in_pitch * multipass->in_vsize;
++ if (*cnt == 1 && (outsize > insize)) {
++ dev_err(rsz_device, "2 buffers are required for Upscaling "
++ "mode\n");
++ goto err_einval;
++ }
++ if (!fh->params->in_hsize || !fh->params->in_vsize) {
++ dev_err(rsz_device, "Can't setup buffer size\n");
++ goto err_einval;
++ } else {
++ if (outsize > insize)
++ *size = outsize;
++ else
++ *size = insize;
++
++ fh->rsz_bufsize = *size;
++ }
++ spin_unlock(&fh->vbq_lock);
++
++ return 0;
++err_einval:
++ spin_unlock(&fh->vbq_lock);
++ return -EINVAL;
++}
++
++/**
++ * rsz_vbq_prepare - Videobuffer is prepared and mmapped.
++ * @q: Structure containing the videobuffer queue file handle, and device
++ * structure which contains the actual configuration.
++ * @vb: Structure containing the videobuffer used for resizer processing.
++ * @field: Type of field to set in videobuffer device.
++ *
++ * Returns 0 if successful, or -EINVAL if buffer couldn't get allocated, or
++ * -EIO if the ISP MMU mapping fails
++ **/
++static int rsz_vbq_prepare(struct videobuf_queue *q,
++ struct videobuf_buffer *vb,
++ enum v4l2_field field)
++{
++ struct rsz_fh *fh = q->priv_data;
++ struct channel_config *rsz_conf_chan = fh->config;
++ struct rsz_mult *multipass = fh->multipass;
++ int err = 0;
++ unsigned int isp_addr, insize, outsize;
++ struct videobuf_dmabuf *dma = videobuf_to_dma(vb);
++
++ spin_lock(&fh->vbq_lock);
++ if (vb->baddr) {
++ vb->size = fh->rsz_bufsize;
++ vb->bsize = fh->rsz_bufsize;
++ } else {
++ spin_unlock(&fh->vbq_lock);
++ dev_err(rsz_device, "No user buffer allocated\n");
++ goto out;
++ }
++ if (vb->i) {
++ vb->width = fh->params->out_hsize;
++ vb->height = fh->params->out_vsize;
++ } else {
++ vb->width = fh->params->in_hsize;
++ vb->height = fh->params->in_vsize;
++ }
++
++ vb->field = field;
++ spin_unlock(&fh->vbq_lock);
++
++ if (vb->state == VIDEOBUF_NEEDS_INIT) {
++ err = videobuf_iolock(q, vb, NULL);
++ if (!err) {
++ isp_addr = ispmmu_map_sg(dma->sglist, dma->sglen);
++ if (!isp_addr)
++ err = -EIO;
++ else {
++ if (vb->i) {
++ rsz_conf_chan->register_config.
++ rsz_sdr_outadd
++ = isp_addr;
++ fh->isp_addr_write = isp_addr;
++ rsz_conf_chan->output_buf_index = vb->i;
++ } else {
++ rsz_conf_chan->register_config.
++ rsz_sdr_inadd
++ = isp_addr;
++ rsz_conf_chan->input_buf_index = vb->i;
++ outsize = multipass->out_pitch *
++ multipass->out_vsize;
++ insize = multipass->in_pitch *
++ multipass->in_vsize;
++ if (outsize < insize) {
++ rsz_conf_chan->register_config.
++ rsz_sdr_outadd
++ = isp_addr;
++ rsz_conf_chan->
++ output_buf_index =
++ vb->i;
++ }
++
++ fh->isp_addr_read = isp_addr;
++ }
++ }
++ }
++
++ }
++
++ if (!err) {
++ spin_lock(&fh->vbq_lock);
++ vb->state = VIDEOBUF_PREPARED;
++ spin_unlock(&fh->vbq_lock);
++ flush_cache_user_range(NULL, vb->baddr, (vb->baddr
++ + vb->bsize));
++ } else
++ rsz_vbq_release(q, vb);
++
++out:
++ return err;
++}
++
++static void rsz_vbq_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
++{
++ return;
++}
++
++/**
++ * rsz_open - Initializes and opens the Resizer Wrapper
++ * @inode: Inode structure associated with the Resizer Wrapper
++ * @filp: File structure associated with the Resizer Wrapper
++ *
++ * Returns 0 if successful, -EBUSY if its already opened or the ISP module is
++ * not available, or -ENOMEM if its unable to allocate the device in kernel
++ * space memory.
++ **/
++static int rsz_open(struct inode *inode, struct file *filp)
++{
++ int ret = 0;
++ struct channel_config *rsz_conf_chan;
++ struct rsz_fh *fh;
++ struct device_params *device = device_config;
++ struct rsz_params *params;
++ struct rsz_mult *multipass;
++
++ if ((filp->f_flags & O_NONBLOCK) == O_NONBLOCK) {
++ printk(KERN_DEBUG "omap-resizer: Device is opened in "
++ "non blocking mode\n");
++ } else {
++ printk(KERN_DEBUG "omap-resizer: Device is opened in blocking "
++ "mode\n");
++ }
++ fh = kzalloc(sizeof(struct rsz_fh), GFP_KERNEL);
++ if (NULL == fh)
++ return -ENOMEM;
++
++ isp_get();
++
++ rsz_conf_chan = kzalloc(sizeof(struct channel_config), GFP_KERNEL);
++ if (rsz_conf_chan == NULL) {
++ dev_err(rsz_device, "\n cannot allocate memory to config");
++ ret = -ENOMEM;
++ goto err_enomem0;
++ }
++ params = kzalloc(sizeof(struct rsz_params), GFP_KERNEL);
++ if (params == NULL) {
++ dev_err(rsz_device, "\n cannot allocate memory to params");
++ ret = -ENOMEM;
++ goto err_enomem1;
++ }
++ multipass = kzalloc(sizeof(struct rsz_mult), GFP_KERNEL);
++ if (multipass == NULL) {
++ dev_err(rsz_device, "\n cannot allocate memory to multipass");
++ ret = -ENOMEM;
++ goto err_enomem2;
++ }
++
++ fh->multipass = multipass;
++ fh->params = params;
++ fh->config = rsz_conf_chan;
++
++ if (mutex_lock_interruptible(&device->reszwrap_mutex)) {
++ ret = -EINTR;
++ goto err_enomem2;
++ }
++ device->opened++;
++ mutex_unlock(&device->reszwrap_mutex);
++
++ rsz_conf_chan->config_state = STATE_NOT_CONFIGURED;
++ rsz_conf_chan->status = CHANNEL_FREE;
++
++ filp->private_data = fh;
++ fh->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ fh->device = device;
++
++ videobuf_queue_sg_init(&fh->vbq, &device->vbq_ops, NULL,
++ &fh->vbq_lock, fh->type,
++ V4L2_FIELD_NONE,
++ sizeof(struct videobuf_buffer), fh);
++
++ spin_lock_init(&fh->vbq_lock);
++ mutex_init(&rsz_conf_chan->chanprotection_mutex);
++
++ return 0;
++err_enomem2:
++ kfree(params);
++err_enomem1:
++ kfree(rsz_conf_chan);
++err_enomem0:
++ kfree(fh);
++ return ret;
++}
++
++/**
++ * rsz_release - Releases Resizer Wrapper and frees up allocated memory
++ * @inode: Inode structure associated with the Resizer Wrapper
++ * @filp: File structure associated with the Resizer Wrapper
++ *
++ * Returns 0 if successful, or -EBUSY if channel is being used.
++ **/
++static int rsz_release(struct inode *inode, struct file *filp)
++{
++ u32 timeout = 0;
++ struct rsz_fh *fh = filp->private_data;
++ struct channel_config *rsz_conf_chan = fh->config;
++ struct rsz_params *params = fh->params;
++ struct rsz_mult *multipass = fh->multipass;
++ struct videobuf_queue *q = &fh->vbq;
++
++ while ((rsz_conf_chan->status != CHANNEL_FREE) && (timeout < 20)) {
++ timeout++;
++ schedule();
++ }
++ if (mutex_lock_interruptible(&device_config->reszwrap_mutex))
++ return -EINTR;
++ device_config->opened--;
++ mutex_unlock(&device_config->reszwrap_mutex);
++ /* This will Free memory allocated to the buffers,
++ * and flushes the queue
++ */
++ videobuf_queue_cancel(q);
++ fh->params = NULL;
++ fh->config = NULL;
++
++ fh->rsz_bufsize = 0;
++ filp->private_data = NULL;
++
++ kfree(rsz_conf_chan);
++ kfree(params);
++ kfree(multipass);
++ kfree(fh);
++
++ isp_put();
++
++ return 0;
++}
++
++/**
++ * rsz_mmap - Memory maps the Resizer Wrapper module.
++ * @file: File structure associated with the Resizer Wrapper
++ * @vma: Virtual memory area structure.
++ *
++ * Returns 0 if successful, or returned value by the videobuf_mmap_mapper()
++ * function.
++ **/
++static int rsz_mmap(struct file *file, struct vm_area_struct *vma)
++{
++ struct rsz_fh *fh = file->private_data;
++
++ return videobuf_mmap_mapper(&fh->vbq, vma);
++}
++
++/**
++ * rsz_ioctl - I/O control function for Resizer Wrapper
++ * @inode: Inode structure associated with the Resizer Wrapper.
++ * @file: File structure associated with the Resizer Wrapper.
++ * @cmd: Type of command to execute.
++ * @arg: Argument to send to requested command.
++ *
++ * Returns 0 if successful, -EBUSY if channel is being used, -1 if bad command
++ * passed or access is denied, -EFAULT if copy_from_user() or copy_to_user()
++ * fails, -EINVAL if parameter validation fails or parameter structure is not
++ * present.
++ **/
++static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
++ unsigned long arg)
++{
++ int ret = 0;
++ struct rsz_fh *fh = file->private_data;
++ struct device_params *device = fh->device;
++ struct channel_config *rsz_conf_chan = fh->config;
++
++ if ((_IOC_TYPE(cmd) != RSZ_IOC_BASE)
++ || (_IOC_NR(cmd) > RSZ_IOC_MAXNR)) {
++ dev_err(rsz_device, "Bad command value \n");
++ return -1;
++ }
++
++ if (_IOC_DIR(cmd) & _IOC_READ)
++ ret = !access_ok(VERIFY_WRITE, (void *)arg, _IOC_SIZE(cmd));
++ else if (_IOC_DIR(cmd) & _IOC_WRITE)
++ ret = !access_ok(VERIFY_READ, (void *)arg, _IOC_SIZE(cmd));
++
++ if (ret) {
++ dev_err(rsz_device, "Access denied\n");
++ return -1;
++ }
++
++ switch (cmd) {
++ case RSZ_REQBUF:
++ {
++ struct v4l2_requestbuffers req_buf;
++ if (copy_from_user(&req_buf, (struct v4l2_requestbuffers *)arg,
++ sizeof(struct v4l2_requestbuffers))) {
++ return -EFAULT;
++ }
++ if (mutex_lock_interruptible(&rsz_conf_chan->
++ chanprotection_mutex))
++ return -EINTR;
++ ret = videobuf_reqbufs(&fh->vbq, (void *)&req_buf);
++ mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
++ break;
++ }
++ case RSZ_QUERYBUF:
++ {
++ struct v4l2_buffer buf;
++ if (copy_from_user(&buf, (struct v4l2_buffer *)arg,
++ sizeof(struct v4l2_buffer))) {
++ return -EFAULT;
++ }
++ if (mutex_lock_interruptible(&rsz_conf_chan->
++ chanprotection_mutex))
++ return -EINTR;
++ ret = videobuf_querybuf(&fh->vbq, (void *)&buf);
++ mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
++ if (copy_to_user((struct v4l2_buffer *)arg, &buf,
++ sizeof(struct v4l2_buffer)))
++ return -EFAULT;
++ break;
++ }
++ case RSZ_QUEUEBUF:
++ {
++ struct v4l2_buffer buf;
++ if (copy_from_user(&buf, (struct v4l2_buffer *)arg,
++ sizeof(struct v4l2_buffer))) {
++ return -EFAULT;
++ }
++ if (mutex_lock_interruptible(&rsz_conf_chan->
++ chanprotection_mutex))
++ return -EINTR;
++ ret = videobuf_qbuf(&fh->vbq, (void *)&buf);
++ mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
++ break;
++ }
++ case RSZ_S_PARAM:
++ {
++ struct rsz_params *params = fh->params;
++ if (copy_from_user(params, (struct rsz_params *)arg,
++ sizeof(struct rsz_params))) {
++ return -EFAULT;
++ }
++ if (mutex_lock_interruptible(&rsz_conf_chan->
++ chanprotection_mutex))
++ return -EINTR;
++ ret = rsz_set_params(fh->multipass, params, rsz_conf_chan);
++ mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
++ break;
++ }
++ case RSZ_G_PARAM:
++ ret = rsz_get_params((struct rsz_params *)arg, rsz_conf_chan);
++ break;
++
++ case RSZ_G_STATUS:
++ {
++ struct rsz_status *status;
++ status = (struct rsz_status *)arg;
++ status->chan_busy = rsz_conf_chan->status;
++ status->hw_busy = ispresizer_busy();
++ status->src = INPUT_RAM;
++ break;
++ }
++ case RSZ_RESIZE:
++ if (file->f_flags & O_NONBLOCK) {
++ if (ispresizer_busy())
++ return -EBUSY;
++ else {
++ if (!mutex_trylock(&device->reszwrap_mutex))
++ return -EBUSY;
++ }
++ } else {
++ if (mutex_lock_interruptible(&device->reszwrap_mutex))
++ return -EINTR;
++ }
++ ret = rsz_start((int *)arg, fh);
++ mutex_unlock(&device->reszwrap_mutex);
++ break;
++ case RSZ_GET_CROPSIZE:
++ rsz_calculate_crop(rsz_conf_chan, (struct rsz_cropsize *)arg);
++ break;
++
++ default:
++ dev_err(rsz_device, "resizer_ioctl: Invalid Command Value");
++ return -EINVAL;
++ }
++
++ return (long)ret;
++}
++
++static struct file_operations rsz_fops = {
++ .owner = THIS_MODULE,
++ .open = rsz_open,
++ .release = rsz_release,
++ .mmap = rsz_mmap,
++ .unlocked_ioctl = rsz_unlocked_ioctl,
++};
++
++/**
++ * rsz_isr - Interrupt Service Routine for Resizer wrapper
++ * @status: ISP IRQ0STATUS register value
++ * @arg1: Currently not used
++ * @arg2: Currently not used
++ *
++ * Interrupt Service Routine for Resizer wrapper
++ **/
++static void rsz_isr(unsigned long status, isp_vbq_callback_ptr arg1, void *arg2)
++{
++
++ if ((status & RESZ_DONE) != RESZ_DONE)
++ return;
++
++ complete(&(device_config->compl_isr));
++
++}
++
++/**
++ * resizer_platform_release - Acts when Reference count is zero
++ * @device: Structure containing ISP resizer wrapper global information
++ *
++ * This is called when the reference count goes to zero.
++ **/
++static void resizer_platform_release(struct device *device)
++{
++}
++
++/**
++ * resizer_probe - Checks for device presence
++ * @device: Structure containing details of the current device.
++ *
++ * Always returns 0.
++ **/
++static int __init resizer_probe(struct platform_device *device)
++{
++ return 0;
++}
++
++/**
++ * resizer_remove - Handles the removal of the driver
++ * @omap_resizer_device: Structure containing details of the current device.
++ *
++ * Always returns 0.
++ **/
++static int resizer_remove(struct platform_device *omap_resizer_device)
++{
++ return 0;
++}
++
++static struct class *rsz_class;
++static struct cdev c_dev;
++static dev_t dev;
++static struct platform_device omap_resizer_device = {
++ .name = OMAP_REZR_NAME,
++ .id = 2,
++ .dev = {
++ .release = resizer_platform_release,}
++};
++
++static struct platform_driver omap_resizer_driver = {
++ .probe = resizer_probe,
++ .remove = resizer_remove,
++ .driver = {
++ .bus = &platform_bus_type,
++ .name = OMAP_REZR_NAME,
++ },
++};
++
++/**
++ * omap_rsz_init - Initialization of Resizer Wrapper
++ *
++ * Returns 0 if successful, -ENOMEM if could not allocate memory, -ENODEV if
++ * could not register the wrapper as a character device, or other errors if the
++ * device or driver can't register.
++ **/
++static int __init omap_rsz_init(void)
++{
++ int ret = 0;
++ struct device_params *device;
++ device = kzalloc(sizeof(struct device_params), GFP_KERNEL);
++ if (!device) {
++ dev_err(rsz_device, OMAP_REZR_NAME ": could not allocate "
++ "memory\n");
++ return -ENOMEM;
++ }
++
++ ret = alloc_chrdev_region(&dev, 0, 1, OMAP_REZR_NAME);
++ if (ret < 0) {
++ dev_err(rsz_device, OMAP_REZR_NAME ": intialization failed. "
++ "Could not allocate region "
++ "for character device\n");
++ kfree(device);
++ return -ENODEV;
++ }
++
++ /* Register the driver in the kernel */
++ /* Initialize of character device */
++ cdev_init(&c_dev, &rsz_fops);
++ c_dev.owner = THIS_MODULE;
++ c_dev.ops = &rsz_fops;
++
++ /* Addding character device */
++ ret = cdev_add(&c_dev, dev, 1);
++ if (ret) {
++ dev_err(rsz_device, OMAP_REZR_NAME ": Error adding "
++ "device - %d\n", ret);
++ goto fail2;
++ }
++ rsz_major = MAJOR(dev);
++
++ /* register driver as a platform driver */
++ ret = platform_driver_register(&omap_resizer_driver);
++ if (ret) {
++ dev_err(rsz_device, OMAP_REZR_NAME
++ ": Failed to register platform driver!\n");
++ goto fail3;
++ }
++
++ /* Register the drive as a platform device */
++ ret = platform_device_register(&omap_resizer_device);
++ if (ret) {
++ dev_err(rsz_device, OMAP_REZR_NAME
++ ": Failed to register platform device!\n");
++ goto fail4;
++ }
++
++ rsz_class = class_create(THIS_MODULE, OMAP_REZR_NAME);
++ if (!rsz_class) {
++ dev_err(rsz_device, OMAP_REZR_NAME
++ ": Failed to create class!\n");
++ goto fail5;
++ }
++
++ /* make entry in the devfs */
++ rsz_device = device_create(rsz_class, rsz_device,
++ MKDEV(rsz_major, 0), NULL,
++ OMAP_REZR_NAME);
++ dev_dbg(rsz_device, OMAP_REZR_NAME ": Registered Resizer Wrapper\n");
++ device->opened = 0;
++
++ device->vbq_ops.buf_setup = rsz_vbq_setup;
++ device->vbq_ops.buf_prepare = rsz_vbq_prepare;
++ device->vbq_ops.buf_release = rsz_vbq_release;
++ device->vbq_ops.buf_queue = rsz_vbq_queue;
++ init_completion(&device->compl_isr);
++ mutex_init(&device->reszwrap_mutex);
++
++ device_config = device;
++ return 0;
++
++fail5:
++ platform_device_unregister(&omap_resizer_device);
++fail4:
++ platform_driver_unregister(&omap_resizer_driver);
++fail3:
++ cdev_del(&c_dev);
++fail2:
++ unregister_chrdev_region(dev, 1);
++ kfree(device);
++ return ret;
++}
++
++/**
++ * omap_rsz_exit - Close of Resizer Wrapper
++ **/
++void __exit omap_rsz_exit(void)
++{
++ device_destroy(rsz_class, dev);
++ class_destroy(rsz_class);
++ platform_device_unregister(&omap_resizer_device);
++ platform_driver_unregister(&omap_resizer_driver);
++ cdev_del(&c_dev);
++ unregister_chrdev_region(dev, 1);
++ kfree(device_config);
++}
++
++module_init(omap_rsz_init)
++module_exit(omap_rsz_exit)
++
++MODULE_AUTHOR("Texas Instruments");
++MODULE_DESCRIPTION("OMAP ISP Resizer");
++MODULE_LICENSE("GPL");
+diff --git a/include/linux/omap_resizer.h b/include/linux/omap_resizer.h
+new file mode 100644
+index 0000000..5ac0c88
+--- /dev/null
++++ b/include/linux/omap_resizer.h
+@@ -0,0 +1,136 @@
++/*
++ * drivers/media/video/isp/omap_resizer.h
++ *
++ * Include file for Resizer module wrapper in TI's OMAP3430 ISP
++ *
++ * Copyright (C) 2008 Texas Instruments, Inc.
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ */
++
++#ifndef OMAP_RESIZER_H
++#define OMAP_RESIZER_H
++
++#include <linux/types.h>
++
++/* ioctls definition */
++#define RSZ_IOC_BASE 'R'
++#define RSZ_IOC_MAXNR 8
++
++/*Ioctl options which are to be passed while calling the ioctl*/
++#define RSZ_REQBUF _IOWR(RSZ_IOC_BASE, 1,\
++ struct v4l2_requestbuffers)
++#define RSZ_QUERYBUF _IOWR(RSZ_IOC_BASE, 2, struct v4l2_buffer)
++#define RSZ_S_PARAM _IOWR(RSZ_IOC_BASE, 3, struct rsz_params)
++#define RSZ_G_PARAM _IOWR(RSZ_IOC_BASE, 4, struct rsz_params)
++#define RSZ_RESIZE _IOWR(RSZ_IOC_BASE, 5, __s32)
++#define RSZ_G_STATUS _IOWR(RSZ_IOC_BASE, 6, struct rsz_status)
++#define RSZ_QUEUEBUF _IOWR(RSZ_IOC_BASE, 7, struct v4l2_buffer)
++#define RSZ_GET_CROPSIZE _IOWR(RSZ_IOC_BASE, 8, struct rsz_cropsize)
++
++#define RSZ_INTYPE_YCBCR422_16BIT 0
++#define RSZ_INTYPE_PLANAR_8BIT 1
++#define RSZ_PIX_FMT_UYVY 1 /* cb:y:cr:y */
++#define RSZ_PIX_FMT_YUYV 0 /* y:cb:y:cr */
++
++enum config_done {
++ STATE_CONFIGURED, /* Resizer driver configured
++ * by application.
++ */
++ STATE_NOT_CONFIGURED /* Resizer driver not
++ * configured by application.
++ */
++};
++
++/* Structure Definitions */
++
++/* used to luma enhancement options */
++
++struct rsz_yenh {
++ __s32 type; /* represents luma enable or
++ * disable.
++ */
++ __u8 gain; /* represents gain. */
++ __u8 slop; /* represents slop. */
++ __u8 core; /* Represents core value. */
++};
++
++/* Conatins all the parameters for resizing. This structure
++ * is used to configure resiser parameters
++ */
++struct rsz_params {
++ __s32 in_hsize; /* input frame horizontal
++ * size.
++ */
++ __s32 in_vsize; /* input frame vertical size */
++ __s32 in_pitch; /* offset between two rows of
++ * input frame.
++ */
++ __s32 inptyp; /* for determining 16 bit or
++ * 8 bit data.
++ */
++ __s32 vert_starting_pixel; /* for specifying vertical
++ * starting pixel in input.
++ */
++ __s32 horz_starting_pixel; /* for specyfing horizontal
++ * starting pixel in input.
++ */
++ __s32 cbilin; /* # defined, filter with luma
++ * or bi-linear interpolation.
++ */
++ __s32 pix_fmt; /* # defined, UYVY or YUYV */
++ __s32 out_hsize; /* output frame horizontal
++ * size.
++ */
++ __s32 out_vsize; /* output frame vertical
++ * size.
++ */
++ __s32 out_pitch; /* offset between two rows of
++ * output frame.
++ */
++ __s32 hstph; /* for specifying horizontal
++ * starting phase.
++ */
++ __s32 vstph; /* for specifying vertical
++ * starting phase.
++ */
++ __u16 tap4filt_coeffs[32]; /* horizontal filter
++ * coefficients.
++ */
++ __u16 tap7filt_coeffs[32]; /* vertical filter
++ * coefficients.
++ */
++ struct rsz_yenh yenh_params;
++};
++
++/* Contains the status of hardware and channel */
++struct rsz_status {
++ __s32 chan_busy; /* 1: channel is busy,
++ * 0: channel is not busy
++ */
++ __s32 hw_busy; /* 1: hardware is busy,
++ * 0: hardware is not busy
++ */
++ __s32 src; /* # defined, can be either
++ * SD-RAM or CCDC/PREVIEWER
++ */
++};
++
++/* Passed by application for getting crop size */
++struct rsz_cropsize {
++ __u32 hcrop; /* Number of pixels per line
++ * cropped in output image.
++ */
++
++ __u32 vcrop; /* Number of lines cropped
++ * in output image.
++ */
++};
++
++#endif
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0024-OMAP3-Resizer-V4L2-buf-layer-issues-fixed.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0024-OMAP3-Resizer-V4L2-buf-layer-issues-fixed.patch
new file mode 100644
index 0000000000..2c3023643e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0024-OMAP3-Resizer-V4L2-buf-layer-issues-fixed.patch
@@ -0,0 +1,729 @@
+From ad3bbadb7fc39a946dfd0cdac19e2ec8647b2c2c Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <vaibhav@psp-nfs-02.india.ti.com>
+Date: Wed, 29 Apr 2009 17:20:27 +0530
+Subject: [PATCH 24/26] OMAP3-Resizer: V4L2-buf layer issues fixed
+
+V4L2-Buffer layer issues fixed under this commit.
+This patch is same as available with PSP1.0.2 release
+
+The discussion is initiated on this with V4L2 mailing list.
+
+Please note that this patch is not being tested.
+---
+ drivers/media/video/isp/omap_resizer.c | 417 ++++++++++++++++++++++++--------
+ include/linux/omap_resizer.h | 3 +-
+ 2 files changed, 321 insertions(+), 99 deletions(-)
+
+diff --git a/drivers/media/video/isp/omap_resizer.c b/drivers/media/video/isp/omap_resizer.c
+index 54bc425..8059c70 100644
+--- a/drivers/media/video/isp/omap_resizer.c
++++ b/drivers/media/video/isp/omap_resizer.c
+@@ -28,6 +28,7 @@
+ #include <linux/platform_device.h>
+ #include <linux/io.h>
+ #include <linux/uaccess.h>
++#include <linux/pci.h>
+ #include <media/v4l2-dev.h>
+ #include <asm/cacheflush.h>
+
+@@ -76,6 +77,10 @@
+ #define MAX_COEF_COUNTER 16
+ #define COEFF_ADDRESS_OFFSET 0x04
+
++#define RSZ_DEF_REQ_EXP 0xE /* Default read operation expand
++ * for the Resizer driver; value
++ * taken from Davinci.
++ */
+ /* Global structure which contains information about number of channels
+ and protection variables */
+ struct device_params {
+@@ -85,6 +90,7 @@ struct device_params {
+ struct mutex reszwrap_mutex; /* Semaphore for array */
+
+ struct videobuf_queue_ops vbq_ops; /* videobuf queue operations */
++ unsigned long extra_page_addr;
+ };
+
+ /* Register mapped structure which contains the every register
+@@ -126,6 +132,9 @@ struct resizer_config {
+ u32 rsz_yehn; /* yehn(luma)register mapping
+ * variable.
+ */
++ u32 sdr_req_exp; /* Configuration for Non
++ * real time read expand
++ */
+ };
+
+ struct rsz_mult {
+@@ -179,6 +188,7 @@ struct channel_config {
+ * channel is busy or not
+ */
+ struct mutex chanprotection_mutex;
++ int buf_address[VIDEO_MAX_FRAME];
+ enum config_done config_state;
+ u8 input_buf_index;
+ u8 output_buf_index;
+@@ -200,8 +210,6 @@ struct rsz_fh {
+ struct videobuf_queue vbq;
+ struct device_params *device;
+
+- dma_addr_t isp_addr_read; /* Input/Output address */
+- dma_addr_t isp_addr_write; /* Input/Output address */
+ u32 rsz_bufsize; /* channel specific buffersize
+ */
+ };
+@@ -227,6 +235,10 @@ static int rsz_set_ratio(struct rsz_mult *multipass,
+ static void rsz_config_ratio(struct rsz_mult *multipass,
+ struct channel_config *rsz_conf_chan);
+
++static void inline rsz_set_exp(unsigned int exp)
++{
++ omap_writel(((exp & 0x3FF) << 10), OMAP3ISP_SBL_REG(0xF8));
++}
+ /**
+ * rsz_hardware_setup - Sets hardware configuration registers
+ * @rsz_conf_chan: Structure containing channel configuration
+@@ -271,12 +283,15 @@ static void rsz_hardware_setup(struct channel_config *rsz_conf_chan)
+ + coeffoffset));
+ coeffoffset = coeffoffset + COEFF_ADDRESS_OFFSET;
+ }
++ /* Configure the read expand register */
++ rsz_set_exp(rsz_conf_chan->register_config.sdr_req_exp);
+ }
+
+ /**
+ * rsz_start - Enables Resizer Wrapper
+ * @arg: Currently not used.
+- * @device: Structure containing ISP resizer wrapper global information
++ * @fh: File structure containing ISP resizer information specific to
++ * channel opened.
+ *
+ * Submits a resizing task specified by the rsz_resize structure. The call can
+ * either be blocked until the task is completed or returned immediately based
+@@ -292,12 +307,18 @@ int rsz_start(int *arg, struct rsz_fh *fh)
+ struct channel_config *rsz_conf_chan = fh->config;
+ struct rsz_mult *multipass = fh->multipass;
+ struct videobuf_queue *q = &fh->vbq;
++ struct videobuf_buffer *buf;
+ int ret;
+
+ if (rsz_conf_chan->config_state) {
+ dev_err(rsz_device, "State not configured \n");
+ goto err_einval;
+ }
++ if (!rsz_conf_chan->register_config.rsz_sdr_inadd ||
++ !rsz_conf_chan->register_config.rsz_sdr_outadd) {
++ dev_err(rsz_device, "address is null\n");
++ goto err_einval;
++ }
+
+ rsz_conf_chan->status = CHANNEL_BUSY;
+
+@@ -325,33 +346,22 @@ mult:
+ goto mult;
+ }
+
+- if (fh->isp_addr_read) {
+- ispmmu_unmap(fh->isp_addr_read);
+- fh->isp_addr_read = 0;
+- }
+- if (fh->isp_addr_write) {
+- ispmmu_unmap(fh->isp_addr_write);
+- fh->isp_addr_write = 0;
+- }
+-
+ rsz_conf_chan->status = CHANNEL_FREE;
+- q->bufs[rsz_conf_chan->input_buf_index]->state = VIDEOBUF_NEEDS_INIT;
+- q->bufs[rsz_conf_chan->output_buf_index]->state = VIDEOBUF_NEEDS_INIT;
+ rsz_conf_chan->register_config.rsz_sdr_outadd = 0;
+ rsz_conf_chan->register_config.rsz_sdr_inadd = 0;
+
+- /* Unmap and free the DMA memory allocated for buffers */
+- videobuf_dma_unmap(q, videobuf_to_dma(
+- q->bufs[rsz_conf_chan->input_buf_index]));
+- videobuf_dma_unmap(q, videobuf_to_dma(
+- q->bufs[rsz_conf_chan->output_buf_index]));
+- videobuf_dma_free(videobuf_to_dma(
+- q->bufs[rsz_conf_chan->input_buf_index]));
+- videobuf_dma_free(videobuf_to_dma(
+- q->bufs[rsz_conf_chan->output_buf_index]));
+-
+ isp_unset_callback(CBK_RESZ_DONE);
+
++ /* Empty the Videobuf queue which was filled during the qbuf */
++ buf = q->bufs[rsz_conf_chan->input_buf_index];
++ buf->state = VIDEOBUF_IDLE;
++ list_del(&buf->stream);
++ if (rsz_conf_chan->input_buf_index != rsz_conf_chan->output_buf_index) {
++ buf = q->bufs[rsz_conf_chan->output_buf_index];
++ buf->state = VIDEOBUF_IDLE;
++ list_del(&buf->stream);
++ }
++
+ return 0;
+ err_einval:
+ return -EINVAL;
+@@ -359,6 +369,8 @@ err_einval:
+
+ /**
+ * rsz_set_multipass - Set resizer multipass
++ * @multipass: Structure containing channel configuration
++ for multipass support
+ * @rsz_conf_chan: Structure containing channel configuration
+ *
+ * Returns always 0
+@@ -384,6 +396,8 @@ static int rsz_set_multipass(struct rsz_mult *multipass,
+
+ /**
+ * rsz_copy_data - Copy data
++ * @multipass: Structure containing channel configuration
++ for multipass support
+ * @params: Structure containing the Resizer Wrapper parameters
+ *
+ * Copy data
+@@ -413,6 +427,8 @@ static void rsz_copy_data(struct rsz_mult *multipass, struct rsz_params *params)
+
+ /**
+ * rsz_set_params - Set parameters for resizer wrapper
++ * @multipass: Structure containing channel configuration
++ for multipass support
+ * @params: Structure containing the Resizer Wrapper parameters
+ * @rsz_conf_chan: Structure containing channel configuration
+ *
+@@ -524,6 +540,8 @@ static int rsz_set_params(struct rsz_mult *multipass, struct rsz_params *params,
+ }
+
+ rsz_config_ratio(multipass, rsz_conf_chan);
++ /* Default value for read expand:Taken from Davinci */
++ rsz_conf_chan->register_config.sdr_req_exp = RSZ_DEF_REQ_EXP;
+
+ rsz_conf_chan->config_state = STATE_CONFIGURED;
+
+@@ -534,6 +552,8 @@ err_einval:
+
+ /**
+ * rsz_set_ratio - Set ratio
++ * @multipass: Structure containing channel configuration
++ for multipass support
+ * @rsz_conf_chan: Structure containing channel configuration
+ *
+ * Returns 0 if successful, -EINVAL if invalid output size, upscaling ratio is
+@@ -548,7 +568,8 @@ static int rsz_set_ratio(struct rsz_mult *multipass,
+
+ if ((multipass->out_hsize > MAX_IMAGE_WIDTH) ||
+ (multipass->out_vsize > MAX_IMAGE_WIDTH)) {
+- dev_err(rsz_device, "Invalid output size!");
++ dev_err(rsz_device, "Invalid output size! - %d", \
++ multipass->out_hsize);
+ goto err_einval;
+ }
+ if (multipass->cbilin) {
+@@ -758,6 +779,8 @@ err_einval:
+
+ /**
+ * rsz_config_ratio - Configure ratio
++ * @multipass: Structure containing channel configuration
++ for multipass support
+ * @rsz_conf_chan: Structure containing channel configuration
+ *
+ * Configure ratio
+@@ -789,6 +812,20 @@ static void rsz_config_ratio(struct rsz_mult *multipass,
+ ((vsize << ISPRSZ_IN_SIZE_VERT_SHIFT)
+ & ISPRSZ_IN_SIZE_VERT_MASK);
+
++ /* This is another workaround for the ISP-MMU translation fault.
++ For the parameters whose image size comes exactly to PAGE_SIZE
++ generates ISP-MMU translation fault. The root-cause is the equation
++ input width = (32*sph + (ow - 1)*hrsz + 16) >> 8 + 7
++ = (64*sph + (ow - 1)*hrsz + 32) >> 8 + 7
++ input height = (32*spv + (oh - 1)*vrsz + 16) >> 8 + 4
++ = (64*spv + (oh - 1)*vrsz + 32) >> 8 + 7
++
++ we are adjusting the input width to suit for Resizer module,
++ application should use this configuration henceforth.
++ */
++ multipass->in_hsize = hsize;
++ multipass->in_vsize = vsize;
++
+ for (coeffcounter = 0; coeffcounter < MAX_COEF_COUNTER;
+ coeffcounter++) {
+ if (multipass->num_htap) {
+@@ -990,24 +1027,15 @@ static void rsz_calculate_crop(struct channel_config *rsz_conf_chan,
+ static void rsz_vbq_release(struct videobuf_queue *q,
+ struct videobuf_buffer *vb)
+ {
+- int i;
+ struct rsz_fh *fh = q->priv_data;
++ struct videobuf_dmabuf *dma = NULL;
+
+- for (i = 0; i < VIDEO_MAX_FRAME; i++) {
+- struct videobuf_dmabuf *dma = NULL;
+- if (!q->bufs[i])
+- continue;
+- if (q->bufs[i]->memory != V4L2_MEMORY_MMAP)
+- continue;
+- dma = videobuf_to_dma(q->bufs[i]);
+- videobuf_dma_unmap(q, dma);
+- videobuf_dma_free(dma);
+- }
++ dma = videobuf_to_dma(q->bufs[vb->i]);
++ videobuf_dma_unmap(q, dma);
++ videobuf_dma_free(dma);
++ ispmmu_unmap(fh->config->buf_address[vb->i]);
++ fh->config->buf_address[vb->i] = 0;
+
+- ispmmu_unmap(fh->isp_addr_read);
+- ispmmu_unmap(fh->isp_addr_write);
+- fh->isp_addr_read = 0;
+- fh->isp_addr_write = 0;
+ spin_lock(&fh->vbq_lock);
+ vb->state = VIDEOBUF_NEEDS_INIT;
+ spin_unlock(&fh->vbq_lock);
+@@ -1062,7 +1090,105 @@ err_einval:
+ spin_unlock(&fh->vbq_lock);
+ return -EINVAL;
+ }
++/*
++ * This function is work around for the videobuf_iolock API,
++ * for User memory allocated with ioremap (VM_IO flag) the API
++ * get_user_pages fails.
++ *
++ * To fulfill this requirement, we have completely ignored VM layer of
++ * Linux, and configuring the ISP MMU with physical address.
++ */
++static int omap_videobuf_dma_init_user(struct videobuf_buffer *vb,
++ unsigned long physp, unsigned long asize)
++{
++ struct videobuf_dmabuf *dma;
++ struct scatterlist *sglist;
++ unsigned long data, first, last;
++ int len, i = 0;
++
++ dma = videobuf_to_dma(vb);
++ data = vb->baddr;
++
++ first = (data & PAGE_MASK) >> PAGE_SHIFT;
++ last = ((data+asize-1) & PAGE_MASK) >> PAGE_SHIFT;
++ dma->offset = data & ~PAGE_MASK;
++ dma->nr_pages = last-first+1;
++
++ dma->direction = PCI_DMA_FROMDEVICE;
++ /*
++ * Allocate array of sglen + 1, to add entry of extra page
++ * for input buffer. Driver always uses 0th buffer as input buffer.
++ */
++ len = dma->nr_pages + (vb->i ? 0 : 1);
++ sglist = kcalloc(len, sizeof(*sglist), GFP_KERNEL);
++ if (NULL == sglist)
++ return -ENOMEM;
++
++ sglist[0].offset = 0;
++ sglist[0].length = PAGE_SIZE - dma->offset;
++ sglist[0].dma_address = (dma_addr_t)physp;
++ physp += sglist[0].length;
++ /*
++ * Iterate in a loop for the number of pages
++ */
++ for (i = 1; i < (len - (vb->i ? 0 : 1)); i++) {
++ sglist[i].offset = 0;
++ sglist[i].length = PAGE_SIZE;
++ sglist[i].dma_address = (dma_addr_t)physp;
++ physp += PAGE_SIZE;
++ }
++ if (0 == vb->i) {
++ sglist[i].offset = 0;
++ sglist[i].length = PAGE_SIZE;
++ sglist[i].dma_address =
++ (dma_addr_t)device_config->extra_page_addr;
++ }
++ dma->sglist = sglist;
++ dma->sglen = len;
++ return 0;
++
++ }
++/*
++ * This function is workaround for the issue, where ISP-MMU generated
++ * translation fault for specific params whose size is aligned to PAGE_SIZE.
++
++ * As a workaround we are padding one extra page for input buffer. This page
++ * we are allocating during init time and will not be released through-out
++ * life time of resizer driver. Please note that Resizer module only reads
++ * from this extra page.
++ */
++int omap_create_sg(struct videobuf_queue *q, struct videobuf_dmabuf *dma)
++{
++ struct scatterlist *sglist;
++ int sglen;
+
++ sglen = dma->sglen;
++ sglist = kcalloc(sglen + 1, sizeof(*sglist), GFP_KERNEL);
++ if (NULL == sglist)
++ return -ENOMEM;
++ /*
++ * Copy the sglist locally
++ */
++ memcpy(sglist, dma->sglist, sglen * sizeof(*sglist));
++ /*
++ * Release the old sglist, since we already copied it locally
++ */
++ videobuf_dma_unmap(q, dma);
++ /*
++ * Add extra entry to sglist to work with specific params, whose
++ * buffer address alined to PAGE_SIZE.
++ */
++ sglist[sglen].offset = 0;
++ sglist[sglen].length = PAGE_SIZE;
++ sglist[sglen].dma_address = (dma_addr_t)device_config->extra_page_addr;
++ sglen++;
++ /*
++ * Save the sglist for mapping to ISP-MMU space
++ */
++ dma->sglist = sglist;
++ dma->sglen = sglen;
++ return 0;
++}
+ /**
+ * rsz_vbq_prepare - Videobuffer is prepared and mmapped.
+ * @q: Structure containing the videobuffer queue file handle, and device
+@@ -1079,19 +1205,24 @@ static int rsz_vbq_prepare(struct videobuf_queue *q,
+ {
+ struct rsz_fh *fh = q->priv_data;
+ struct channel_config *rsz_conf_chan = fh->config;
+- struct rsz_mult *multipass = fh->multipass;
+ int err = 0;
+ unsigned int isp_addr, insize, outsize;
+- struct videobuf_dmabuf *dma = videobuf_to_dma(vb);
+-
++ struct rsz_mult *multipass = fh->multipass;
+ spin_lock(&fh->vbq_lock);
+ if (vb->baddr) {
++ /* Check for 32 byte alignement */
++ if (vb->baddr != (vb->baddr & ~0x1F)) {
++ spin_unlock(&fh->vbq_lock);
++ dev_err(rsz_device, "Buffer address should be aligned \
++ to 32 byte\n");
++ return -EINVAL;
++ }
+ vb->size = fh->rsz_bufsize;
+ vb->bsize = fh->rsz_bufsize;
+ } else {
+ spin_unlock(&fh->vbq_lock);
+ dev_err(rsz_device, "No user buffer allocated\n");
+- goto out;
++ return -EINVAL;
+ }
+ if (vb->i) {
+ vb->width = fh->params->out_hsize;
+@@ -1103,55 +1234,128 @@ static int rsz_vbq_prepare(struct videobuf_queue *q,
+
+ vb->field = field;
+ spin_unlock(&fh->vbq_lock);
++ /*
++ * Calculate input and output sizes, will be used while mapping
++ * user pages
++ */
++ outsize = multipass->out_pitch * multipass->out_vsize;
++ insize = multipass->in_pitch * multipass->in_vsize;
+
+ if (vb->state == VIDEOBUF_NEEDS_INIT) {
+- err = videobuf_iolock(q, vb, NULL);
+- if (!err) {
+- isp_addr = ispmmu_map_sg(dma->sglist, dma->sglen);
+- if (!isp_addr)
+- err = -EIO;
+- else {
+- if (vb->i) {
+- rsz_conf_chan->register_config.
+- rsz_sdr_outadd
+- = isp_addr;
+- fh->isp_addr_write = isp_addr;
+- rsz_conf_chan->output_buf_index = vb->i;
+- } else {
++ struct videobuf_dmabuf *dma;
++ struct vm_area_struct *vma;
++ spin_lock(&fh->vbq_lock);
++ dma = videobuf_to_dma(vb);
++ vma = find_vma(current->mm, vb->baddr);
++ if ((vma) && (vma->vm_flags & VM_IO) && (vma->vm_pgoff)) {
++ /* This will catch ioremaped buffers to the kernel.
++ * It gives two possible scenarios -
++ * - Driver allocates buffer using either
++ * dma_alloc_coherent or get_free_pages,
++ * and maps to user space using
++ * io_remap_pfn_range/remap_pfn_range
++ * - Drivers maps memory outside from Linux using
++ * io_remap
++ */
++ unsigned long physp = 0, asize;
++ asize = vb->i ? outsize : insize;
++ if ((vb->baddr + asize) > vma->vm_end) {
++ spin_unlock(&fh->vbq_lock);
++ dev_err(rsz_device, "User Buffer Allocation:" \
++ "err=%lu[%lu]\n",\
++ (vma->vm_end - vb->baddr), asize);
++ return -ENOMEM;
++ }
++ physp = (vma->vm_pgoff << PAGE_SHIFT) +
++ (vb->baddr - vma->vm_start);
++ err = omap_videobuf_dma_init_user(vb, physp, asize);
++ spin_unlock(&fh->vbq_lock);
++ if (0 != err)
++ return err;
++ } else {
++ err = videobuf_iolock(q, vb, NULL);
++ /*
++ * In case of user pointer mode, the get_user_pages
++ * will fail if user has allocated less memory than
++ * vb->size. But it is not error from resizer driver
++ * point of view. so handled seperately
++ */
++ if ((err < 0) && (dma->nr_pages > 0))
++ err = videobuf_dma_map(q, dma);
++ if (err)
++ goto buf_release;
++ /*
++ * Add one extra page for input buffer
++ */
++ if (0 == vb->i)
++ err = omap_create_sg(q, dma);
++ if (err)
++ goto buf_release;
++ spin_unlock(&fh->vbq_lock);
++ }
++ isp_addr = ispmmu_map_sg(dma->sglist, dma->sglen);
++ if (!isp_addr)
++ err = -EIO;
++ else {
++ if (vb->i) {
++ rsz_conf_chan->buf_address[vb->i] = isp_addr;
++ rsz_conf_chan->register_config.
++ rsz_sdr_outadd
++ = isp_addr;
++ rsz_conf_chan->output_buf_index = vb->i;
++ } else {
++ rsz_conf_chan->buf_address[vb->i] = isp_addr;
++ rsz_conf_chan->register_config.
++ rsz_sdr_inadd
++ = isp_addr;
++ rsz_conf_chan->input_buf_index = vb->i;
++ if (outsize < insize && rsz_conf_chan->
++ register_config.
++ rsz_sdr_outadd == 0) {
+ rsz_conf_chan->register_config.
+- rsz_sdr_inadd
+- = isp_addr;
+- rsz_conf_chan->input_buf_index = vb->i;
+- outsize = multipass->out_pitch *
+- multipass->out_vsize;
+- insize = multipass->in_pitch *
+- multipass->in_vsize;
+- if (outsize < insize) {
+- rsz_conf_chan->register_config.
+- rsz_sdr_outadd
+- = isp_addr;
+- rsz_conf_chan->
+- output_buf_index =
+- vb->i;
+- }
+-
+- fh->isp_addr_read = isp_addr;
++ rsz_sdr_outadd
++ = isp_addr;
++ rsz_conf_chan->
++ output_buf_index =
++ vb->i;
+ }
+ }
+ }
+
+- }
++ } else {
++ if(vb->i) {
++ rsz_conf_chan->register_config.
++ rsz_sdr_outadd =
++ rsz_conf_chan->buf_address[vb->i];
++ rsz_conf_chan->output_buf_index = vb->i;
++ } else {
++ rsz_conf_chan->register_config.
++ rsz_sdr_inadd =
++ rsz_conf_chan->buf_address[vb->i];
++ rsz_conf_chan->input_buf_index = vb->i;
++ if(outsize < insize && rsz_conf_chan->
++ register_config.
++ rsz_sdr_outadd == 0) {
++ rsz_conf_chan->register_config.
++ rsz_sdr_outadd
++ = rsz_conf_chan->buf_address[vb->i];
++ rsz_conf_chan->output_buf_index = vb->i;
++ }
++
++ }
+
++ }
+ if (!err) {
+ spin_lock(&fh->vbq_lock);
+ vb->state = VIDEOBUF_PREPARED;
+ spin_unlock(&fh->vbq_lock);
+- flush_cache_user_range(NULL, vb->baddr, (vb->baddr
+- + vb->bsize));
+ } else
+ rsz_vbq_release(q, vb);
+
+-out:
++ return err;
++buf_release:
++ spin_unlock(&fh->vbq_lock);
++ rsz_vbq_release(q, vb);
+ return err;
+ }
+
+@@ -1255,7 +1459,8 @@ err_enomem0:
+ **/
+ static int rsz_release(struct inode *inode, struct file *filp)
+ {
+- u32 timeout = 0;
++ int i;
++ unsigned int timeout = 0;
+ struct rsz_fh *fh = filp->private_data;
+ struct channel_config *rsz_conf_chan = fh->config;
+ struct rsz_params *params = fh->params;
+@@ -1266,17 +1471,17 @@ static int rsz_release(struct inode *inode, struct file *filp)
+ timeout++;
+ schedule();
+ }
+- if (mutex_lock_interruptible(&device_config->reszwrap_mutex))
+- return -EINTR;
+- device_config->opened--;
+- mutex_unlock(&device_config->reszwrap_mutex);
+- /* This will Free memory allocated to the buffers,
+- * and flushes the queue
+- */
+- videobuf_queue_cancel(q);
+- fh->params = NULL;
+- fh->config = NULL;
++ /* Free memory allocated to the buffers */
++ for (i = 0 ; i < VIDEO_MAX_FRAME ; i++) {
++ struct videobuf_dmabuf *dma = NULL;
++ if (!q->bufs[i])
++ continue;
++ dma = videobuf_to_dma(q->bufs[i]);
++ videobuf_dma_unmap(q, dma);
++ videobuf_dma_free(dma);
++ }
+
++ videobuf_mmap_free(q);
+ fh->rsz_bufsize = 0;
+ filp->private_data = NULL;
+
+@@ -1286,7 +1491,8 @@ static int rsz_release(struct inode *inode, struct file *filp)
+ kfree(fh);
+
+ isp_put();
+-
++ fh->params = NULL;
++ fh->config = NULL;
+ return 0;
+ }
+
+@@ -1353,6 +1559,12 @@ static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
+ chanprotection_mutex))
+ return -EINTR;
+ ret = videobuf_reqbufs(&fh->vbq, (void *)&req_buf);
++ if (ret >= 0) {
++ if (copy_to_user((struct v4l2_requestbuffers *)arg,
++ &req_buf, sizeof(struct
++ v4l2_requestbuffers)))
++ return -EFAULT;
++ }
+ mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
+ break;
+ }
+@@ -1394,11 +1606,7 @@ static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
+ sizeof(struct rsz_params))) {
+ return -EFAULT;
+ }
+- if (mutex_lock_interruptible(&rsz_conf_chan->
+- chanprotection_mutex))
+- return -EINTR;
+- ret = rsz_set_params(fh->multipass, params, rsz_conf_chan);
+- mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
++ ret = rsz_set_params(fh->multipass, fh->params, rsz_conf_chan);
+ break;
+ }
+ case RSZ_G_PARAM:
+@@ -1433,6 +1641,12 @@ static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
+ rsz_calculate_crop(rsz_conf_chan, (struct rsz_cropsize *)arg);
+ break;
+
++ case RSZ_S_EXP:
++ if (mutex_lock_interruptible(&rsz_conf_chan->chanprotection_mutex))
++ return -EINTR;
++ rsz_conf_chan->register_config.sdr_req_exp = *((unsigned int *)arg);
++ mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
++ break;
+ default:
+ dev_err(rsz_device, "resizer_ioctl: Invalid Command Value");
+ return -EINVAL;
+@@ -1535,14 +1749,18 @@ static int __init omap_rsz_init(void)
+ "memory\n");
+ return -ENOMEM;
+ }
+-
++ device->extra_page_addr = __get_free_pages(GFP_KERNEL | GFP_DMA, 0);
++ if (!device->extra_page_addr) {
++ dev_err(rsz_device, OMAP_REZR_NAME ":Allocation failed. ");
++ kfree(device);
++ return -ENOMEM;
++ }
+ ret = alloc_chrdev_region(&dev, 0, 1, OMAP_REZR_NAME);
+ if (ret < 0) {
+ dev_err(rsz_device, OMAP_REZR_NAME ": intialization failed. "
+ "Could not allocate region "
+ "for character device\n");
+- kfree(device);
+- return -ENODEV;
++ goto fail1;
+ }
+
+ /* Register the driver in the kernel */
+@@ -1608,6 +1826,8 @@ fail3:
+ cdev_del(&c_dev);
+ fail2:
+ unregister_chrdev_region(dev, 1);
++fail1:
++ free_pages((unsigned long)device->extra_page_addr, 0);
+ kfree(device);
+ return ret;
+ }
+@@ -1623,6 +1843,7 @@ void __exit omap_rsz_exit(void)
+ platform_driver_unregister(&omap_resizer_driver);
+ cdev_del(&c_dev);
+ unregister_chrdev_region(dev, 1);
++ free_pages((unsigned long)device_config->extra_page_addr, 0);
+ kfree(device_config);
+ }
+
+diff --git a/include/linux/omap_resizer.h b/include/linux/omap_resizer.h
+index 5ac0c88..47b8dd8 100644
+--- a/include/linux/omap_resizer.h
++++ b/include/linux/omap_resizer.h
+@@ -21,7 +21,7 @@
+
+ /* ioctls definition */
+ #define RSZ_IOC_BASE 'R'
+-#define RSZ_IOC_MAXNR 8
++#define RSZ_IOC_MAXNR 9
+
+ /*Ioctl options which are to be passed while calling the ioctl*/
+ #define RSZ_REQBUF _IOWR(RSZ_IOC_BASE, 1,\
+@@ -33,6 +33,7 @@
+ #define RSZ_G_STATUS _IOWR(RSZ_IOC_BASE, 6, struct rsz_status)
+ #define RSZ_QUEUEBUF _IOWR(RSZ_IOC_BASE, 7, struct v4l2_buffer)
+ #define RSZ_GET_CROPSIZE _IOWR(RSZ_IOC_BASE, 8, struct rsz_cropsize)
++#define RSZ_S_EXP _IOWR(RSZ_IOC_BASE, 9, __s32)
+
+ #define RSZ_INTYPE_YCBCR422_16BIT 0
+ #define RSZ_INTYPE_PLANAR_8BIT 1
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0025-OMAP3-Resizer-Build-issues-fixed.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0025-OMAP3-Resizer-Build-issues-fixed.patch
new file mode 100644
index 0000000000..143a846e3c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/resizer/0025-OMAP3-Resizer-Build-issues-fixed.patch
@@ -0,0 +1,36 @@
+From 9fec955e98b4ef7922f629e3a81d2d1af216e028 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <vaibhav@psp-nfs-02.india.ti.com>
+Date: Wed, 29 Apr 2009 18:12:42 +0530
+Subject: [PATCH 25/26] OMAP3-Resizer: Build issues fixed
+
+There were some building issues with latest gitorious tree,
+fixed them.
+---
+ drivers/media/video/isp/omap_resizer.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/media/video/isp/omap_resizer.c b/drivers/media/video/isp/omap_resizer.c
+index 8059c70..dd90b24 100644
+--- a/drivers/media/video/isp/omap_resizer.c
++++ b/drivers/media/video/isp/omap_resizer.c
+@@ -1033,7 +1033,7 @@ static void rsz_vbq_release(struct videobuf_queue *q,
+ dma = videobuf_to_dma(q->bufs[vb->i]);
+ videobuf_dma_unmap(q, dma);
+ videobuf_dma_free(dma);
+- ispmmu_unmap(fh->config->buf_address[vb->i]);
++ ispmmu_vunmap(fh->config->buf_address[vb->i]);
+ fh->config->buf_address[vb->i] = 0;
+
+ spin_lock(&fh->vbq_lock);
+@@ -1293,7 +1293,7 @@ static int rsz_vbq_prepare(struct videobuf_queue *q,
+ goto buf_release;
+ spin_unlock(&fh->vbq_lock);
+ }
+- isp_addr = ispmmu_map_sg(dma->sglist, dma->sglen);
++ isp_addr = ispmmu_vmap(dma->sglist, dma->sglen);
+ if (!isp_addr)
+ err = -EIO;
+ else {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0001-V4L2-Add-COLORFX-user-control.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0001-V4L2-Add-COLORFX-user-control.patch
new file mode 100644
index 0000000000..d9e4243b4a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0001-V4L2-Add-COLORFX-user-control.patch
@@ -0,0 +1,44 @@
+From ad422f476ce04636f911557bbfd066c516e9b472 Mon Sep 17 00:00:00 2001
+From: Aguirre Rodriguez, Sergio Alberto <saaguirre@ti.com>
+Date: Tue, 20 Jan 2009 16:29:26 -0600
+Subject: [PATCH] V4L2: Add COLORFX user control
+
+From 07396d67b39bf7bcc81440d3e72d253ad6c54f11 Mon Sep 17 00:00:00 2001
+From: Sergio Aguirre <saaguirre@ti.com>
+Date: Tue, 20 Jan 2009 15:34:43 -0600
+Subject: [PATCH v2] V4L2: Add COLORFX user control
+
+This is a common feature on many cameras. the options are:
+Default colors,
+B & W,
+Sepia
+
+Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
+---
+ include/linux/videodev2.h | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
+index 5571dbe..8e4e25e 100644
+--- a/include/linux/videodev2.h
++++ b/include/linux/videodev2.h
+@@ -879,8 +879,15 @@ enum v4l2_power_line_frequency {
+ #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
+ #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
+ #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
++#define V4L2_CID_COLORFX (V4L2_CID_BASE+31)
++enum v4l2_colorfx {
++ V4L2_COLORFX_NONE = 0,
++ V4L2_COLORFX_BW = 1,
++ V4L2_COLORFX_SEPIA = 2,
++};
++
+ /* last CID + 1 */
+-#define V4L2_CID_LASTP1 (V4L2_CID_BASE+31)
++#define V4L2_CID_LASTP1 (V4L2_CID_BASE+32)
+
+ /* MPEG-class control IDs defined by V4L2 */
+ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0002-V4L-Int-if-v4l2_int_device_try_attach_all-requires.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0002-V4L-Int-if-v4l2_int_device_try_attach_all-requires.patch
new file mode 100644
index 0000000000..45e27a2fda
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0002-V4L-Int-if-v4l2_int_device_try_attach_all-requires.patch
@@ -0,0 +1,50 @@
+From 5b007183d51543624bc9f582966f245a64157b57 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@nokia.com>
+Date: Fri, 31 Oct 2008 11:51:30 +0200
+Subject: [PATCH] V4L: Int if: v4l2_int_device_try_attach_all requires mutex
+
+Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
+---
+ drivers/media/video/v4l2-int-device.c | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/media/video/v4l2-int-device.c b/drivers/media/video/v4l2-int-device.c
+index a935bae..eb8dc84 100644
+--- a/drivers/media/video/v4l2-int-device.c
++++ b/drivers/media/video/v4l2-int-device.c
+@@ -32,7 +32,7 @@
+ static DEFINE_MUTEX(mutex);
+ static LIST_HEAD(int_list);
+
+-void v4l2_int_device_try_attach_all(void)
++static void __v4l2_int_device_try_attach_all(void)
+ {
+ struct v4l2_int_device *m, *s;
+
+@@ -66,6 +66,14 @@ void v4l2_int_device_try_attach_all(void)
+ }
+ }
+ }
++
++void v4l2_int_device_try_attach_all(void)
++{
++ mutex_lock(&mutex);
++ __v4l2_int_device_try_attach_all();
++ mutex_unlock(&mutex);
++}
++
+ EXPORT_SYMBOL_GPL(v4l2_int_device_try_attach_all);
+
+ static int ioctl_sort_cmp(const void *a, const void *b)
+@@ -89,7 +97,7 @@ int v4l2_int_device_register(struct v4l2_int_device *d)
+ &ioctl_sort_cmp, NULL);
+ mutex_lock(&mutex);
+ list_add(&d->head, &int_list);
+- v4l2_int_device_try_attach_all();
++ __v4l2_int_device_try_attach_all();
+ mutex_unlock(&mutex);
+
+ return 0;
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0003-V4L-Int-if-Dummy-slave.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0003-V4L-Int-if-Dummy-slave.patch
new file mode 100644
index 0000000000..829810fab0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0003-V4L-Int-if-Dummy-slave.patch
@@ -0,0 +1,61 @@
+From cc1d76e0f50321e80f7f50e9e214de2c9a45628a Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@nokia.com>
+Date: Wed, 22 Oct 2008 18:41:20 +0300
+Subject: [PATCH] V4L: Int if: Dummy slave
+
+This patch implements a dummy slave that has no functionality. Helps
+managing slaves in the OMAP 3 camera driver; no need to check for NULL
+pointers.
+
+Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
+---
+ drivers/media/video/v4l2-int-device.c | 19 +++++++++++++++++++
+ include/media/v4l2-int-device.h | 2 ++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/media/video/v4l2-int-device.c b/drivers/media/video/v4l2-int-device.c
+index eb8dc84..483ee2e 100644
+--- a/drivers/media/video/v4l2-int-device.c
++++ b/drivers/media/video/v4l2-int-device.c
+@@ -67,6 +67,25 @@ static void __v4l2_int_device_try_attach_all(void)
+ }
+ }
+
++static struct v4l2_int_slave dummy_slave = {
++ /* Dummy pointer to avoid underflow in find_ioctl. */
++ .ioctls = (void *)sizeof(struct v4l2_int_ioctl_desc),
++ .num_ioctls = 0,
++};
++
++static struct v4l2_int_device dummy = {
++ .type = v4l2_int_type_slave,
++ .u = {
++ .slave = &dummy_slave,
++ },
++};
++
++struct v4l2_int_device *v4l2_int_device_dummy()
++{
++ return &dummy;
++}
++EXPORT_SYMBOL_GPL(v4l2_int_device_dummy);
++
+ void v4l2_int_device_try_attach_all(void)
+ {
+ mutex_lock(&mutex);
+diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
+index fbf5855..5d254c4 100644
+--- a/include/media/v4l2-int-device.h
++++ b/include/media/v4l2-int-device.h
+@@ -84,6 +84,8 @@ struct v4l2_int_device {
+ void *priv;
+ };
+
++struct v4l2_int_device *v4l2_int_device_dummy(void);
++
+ void v4l2_int_device_try_attach_all(void);
+
+ int v4l2_int_device_register(struct v4l2_int_device *d);
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0004-V4L-int-device-add-support-for-VIDIOC_QUERYMENU.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0004-V4L-int-device-add-support-for-VIDIOC_QUERYMENU.patch
new file mode 100644
index 0000000000..b81b20419e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0004-V4L-int-device-add-support-for-VIDIOC_QUERYMENU.patch
@@ -0,0 +1,33 @@
+From e041e57cafca24cf92430cdf3cc091060a271e19 Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@nokia.com>
+Date: Fri, 31 Oct 2008 10:20:31 +0200
+Subject: [PATCH] V4L: int device: add support for VIDIOC_QUERYMENU
+
+Signed-off-by: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
+---
+ include/media/v4l2-int-device.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
+index 5d254c4..81f4863 100644
+--- a/include/media/v4l2-int-device.h
++++ b/include/media/v4l2-int-device.h
+@@ -178,6 +178,7 @@ enum v4l2_int_ioctl_num {
+ vidioc_int_s_fmt_cap_num,
+ vidioc_int_try_fmt_cap_num,
+ vidioc_int_queryctrl_num,
++ vidioc_int_querymenu_num,
+ vidioc_int_g_ctrl_num,
+ vidioc_int_s_ctrl_num,
+ vidioc_int_cropcap_num,
+@@ -282,6 +283,7 @@ V4L2_INT_WRAPPER_1(g_fmt_cap, struct v4l2_format, *);
+ V4L2_INT_WRAPPER_1(s_fmt_cap, struct v4l2_format, *);
+ V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *);
+ V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *);
++V4L2_INT_WRAPPER_1(querymenu, struct v4l2_querymenu, *);
+ V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *);
+ V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *);
+ V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *);
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0005-V4L-Int-if-Add-vidioc_int_querycap.patch b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0005-V4L-Int-if-Add-vidioc_int_querycap.patch
new file mode 100644
index 0000000000..a9e06290fa
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/isp/v4l/0005-V4L-Int-if-Add-vidioc_int_querycap.patch
@@ -0,0 +1,35 @@
+From dc05ee10583dca44e0f8d4109bd1397ee3c5ffae Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@nokia.com>
+Date: Thu, 2 Oct 2008 11:55:07 +0300
+Subject: [PATCH] V4L: Int if: Add vidioc_int_querycap
+
+Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
+---
+ include/media/v4l2-int-device.h | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
+index 81f4863..2830ae1 100644
+--- a/include/media/v4l2-int-device.h
++++ b/include/media/v4l2-int-device.h
+@@ -173,7 +173,8 @@ enum v4l2_int_ioctl_num {
+ * "Proper" V4L ioctls, as in struct video_device.
+ *
+ */
+- vidioc_int_enum_fmt_cap_num = 1,
++ vidioc_int_querycap_num = 1,
++ vidioc_int_enum_fmt_cap_num,
+ vidioc_int_g_fmt_cap_num,
+ vidioc_int_s_fmt_cap_num,
+ vidioc_int_try_fmt_cap_num,
+@@ -278,6 +279,7 @@ enum v4l2_int_ioctl_num {
+ return desc; \
+ }
+
++V4L2_INT_WRAPPER_1(querycap, struct v4l2_capability, *);
+ V4L2_INT_WRAPPER_1(enum_fmt_cap, struct v4l2_fmtdesc, *);
+ V4L2_INT_WRAPPER_1(g_fmt_cap, struct v4l2_format, *);
+ V4L2_INT_WRAPPER_1(s_fmt_cap, struct v4l2_format, *);
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/make-alignment-visible.diff b/recipes/linux/linux-kexecboot-2.6.29/make-alignment-visible.diff
new file mode 100644
index 0000000000..9b3958f82a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/make-alignment-visible.diff
@@ -0,0 +1,26 @@
+From: Mans Rullgard <mans@mansr.com>
+Date: Mon, 13 Oct 2008 19:32:16 +0000 (+0100)
+Subject: ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
+X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=60d60f0ca47fcf4fbb649e45aa64f5a0a4c2f2c8
+
+ARM: Add prompt for CONFIG_ALIGNMENT_TRAP
+
+This adds a prompt text for CONFIG_ALIGNMENT_TRAP, thus making it
+visible in make *config.
+
+Signed-off-by: Mans Rullgard <mans@mansr.com>
+---
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 61314f6..18d3119 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -971,7 +971,7 @@ config LEDS_CPU
+ will overrule the CPU usage LED.
+
+ config ALIGNMENT_TRAP
+- bool
++ bool "Enable alignment trap"
+ depends on CPU_CP15_MMU
+ default y if !ARCH_EBSA110
+ help
diff --git a/recipes/linux/linux-kexecboot-2.6.29/mmctiming.patch b/recipes/linux/linux-kexecboot-2.6.29/mmctiming.patch
new file mode 100644
index 0000000000..ec540ab3cb
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/mmctiming.patch
@@ -0,0 +1,16 @@
+Index: git/drivers/mmc/core/core.c
+===================================================================
+--- git.orig/drivers/mmc/core/core.c
++++ git/drivers/mmc/core/core.c
+@@ -284,9 +284,9 @@ void mmc_set_data_timeout(struct mmc_dat
+ * The limit is really 250 ms, but that is
+ * insufficient for some crappy cards.
+ */
+- limit_us = 300000;
++ limit_us = 500000;
+ else
+- limit_us = 100000;
++ limit_us = 200000;
+
+ /*
+ * SDHC cards always use these fixed values.
diff --git a/recipes/linux/linux-kexecboot-2.6.29/modedb-hd720.patch b/recipes/linux/linux-kexecboot-2.6.29/modedb-hd720.patch
new file mode 100644
index 0000000000..0166de651a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/modedb-hd720.patch
@@ -0,0 +1,13 @@
+--- orig/drivers/video/modedb.c.orig 2009-04-07 11:40:10.000000000 +0200
++++ git/drivers/video/modedb.c 2009-04-07 10:35:29.000000000 +0200
+@@ -44,6 +44,10 @@
+ NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
+ 0, FB_VMODE_NONINTERLACED
+ }, {
++ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */
++ "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5,
++ 0, FB_VMODE_NONINTERLACED
++ }, {
+ /* 800x600 @ 56 Hz, 35.15 kHz hsync */
+ NULL, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2,
+ 0, FB_VMODE_NONINTERLACED
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0001-USB-musb-only-turn-off-vbus-in-OTG-hosts.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0001-USB-musb-only-turn-off-vbus-in-OTG-hosts.patch
new file mode 100644
index 0000000000..a7898d1440
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0001-USB-musb-only-turn-off-vbus-in-OTG-hosts.patch
@@ -0,0 +1,43 @@
+From a9199e8ab6d6fb105aa251d6bf2192e7eafac8ee Mon Sep 17 00:00:00 2001
+From: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
+Date: Tue, 24 Mar 2009 17:22:53 -0700
+Subject: [PATCH] USB: musb: only turn off vbus in OTG hosts
+
+Except on DaVinci, VBUS is now switched off as part of idling the
+USB link (after a_wait_bcon) whenever a device is disconnected
+from host. This is correct for OTG hosts, where either SRP or
+an ID interrupt could turn VBUS on again.
+
+However, for non-OTG hosts there's no way to turn VBUS on again,
+so the host becomes unusable. And the procfs entry which once
+allowed a manual workaround for this is now gone.
+
+This patch adds an is_otg_enabled() check before scheduling the
+switch-off timer in disconnect path, supporting a "classic host"
+mode where SRP is unavailable.
+
+[ dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: tweak patch description ]
+
+Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index af77e46..338cd16 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -769,7 +769,7 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ case OTG_STATE_A_SUSPEND:
+ usb_hcd_resume_root_hub(musb_to_hcd(musb));
+ musb_root_disconnect(musb);
+- if (musb->a_wait_bcon != 0)
++ if (musb->a_wait_bcon != 0 && is_otg_enabled(musb))
+ musb_platform_try_idle(musb, jiffies
+ + msecs_to_jiffies(musb->a_wait_bcon));
+ break;
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0002-USB-composite-avoid-inconsistent-lock-state.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0002-USB-composite-avoid-inconsistent-lock-state.patch
new file mode 100644
index 0000000000..5cb7bcb065
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0002-USB-composite-avoid-inconsistent-lock-state.patch
@@ -0,0 +1,76 @@
+From 83eb44b1c84f99d9a5c67612bd94b4ed7c43f64c Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Date: Tue, 24 Mar 2009 17:22:49 -0700
+Subject: [PATCH] USB: composite: avoid inconsistent lock state
+
+Avoid the following INFO from lock debugging:
+
+[ 369.126112] =================================
+[ 369.132063] [ INFO: inconsistent lock state ]
+[ 369.136457] 2.6.28-maemo1 #1
+[ 369.139387] ---------------------------------
+[ 369.143782] inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
+[ 369.149855] swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
+[ 369.154890] (&cdev->lock){+-..}, at: [<bf1979f0>] composite_disconnect+0x1c/0]
+[ 369.163404] {hardirq-on-W} state was registered at:
+[ 369.168348] [<c00788a8>] __lock_acquire+0x5d0/0x7d8
+[ 369.173506] [<c0078b14>] lock_acquire+0x64/0x78
+[ 369.178266] [<c0263a34>] _spin_lock+0x4c/0x80
+[ 369.182905] [<bf19597c>] usb_function_deactivate+0x20/0x70 [g_nokia]
+[ 369.189527] [<bf1a0a88>] 0xbf1a0a88
+[ 369.193281] [<bf19f450>] 0xbf19f450
+[ 369.197004] [<bf19fa3c>] 0xbf19fa3c
+[ 369.200758] [<bf1a03a0>] 0xbf1a03a0
+[ 369.204481] [<bf19f254>] 0xbf19f254
+[ 369.208204] [<bf1a0158>] 0xbf1a0158
+[ 369.211927] [<bf1a130c>] 0xbf1a130c
+[ 369.215650] [<c01c21f0>] usb_gadget_register_driver+0x12c/0x28c
+[ 369.221846] [<bf1a06bc>] 0xbf1a06bc
+[ 369.225569] [<bf1a06e8>] 0xbf1a06e8
+[ 369.229322] [<c002c2dc>] __exception_text_end+0x64/0x19c
+[ 369.234877] [<c0081628>] sys_init_module+0x9c/0x194
+[ 369.240004] [<c002c8e0>] ret_fast_syscall+0x0/0x2c
+[ 369.245039] [<ffffffff>] 0xffffffff
+[ 369.248793] irq event stamp: 218356
+[ 369.252302] hardirqs last enabled at (218355): [<c003a77c>] omap3_enter_idle+8
+[ 369.260420] hardirqs last disabled at (218356): [<c0264774>] __irq_svc+0x34/0x0
+[ 369.267927] softirqs last enabled at (218348): [<c00585a4>] __do_softirq+0x134
+[ 369.275892] softirqs last disabled at (218335): [<c005899c>] irq_exit+0x60/0xb0
+[ 369.283308]
+[ 369.283308] other info that might help us debug this:
+[ 369.289930] no locks held by swapper/0.
+
+Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
+Signed-off-by: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
+---
+ drivers/usb/gadget/composite.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
+index 5d11c29..40f1da7 100644
+--- a/drivers/usb/gadget/composite.c
++++ b/drivers/usb/gadget/composite.c
+@@ -149,16 +149,17 @@ done:
+ int usb_function_deactivate(struct usb_function *function)
+ {
+ struct usb_composite_dev *cdev = function->config->cdev;
++ unsigned long flags;
+ int status = 0;
+
+- spin_lock(&cdev->lock);
++ spin_lock_irqsave(&cdev->lock, flags);
+
+ if (cdev->deactivations == 0)
+ status = usb_gadget_disconnect(cdev->gadget);
+ if (status == 0)
+ cdev->deactivations++;
+
+- spin_unlock(&cdev->lock);
++ spin_unlock_irqrestore(&cdev->lock, flags);
+ return status;
+ }
+
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0003-USB-musb-NAK-timeout-scheme-on-bulk-RX-endpoint.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0003-USB-musb-NAK-timeout-scheme-on-bulk-RX-endpoint.patch
new file mode 100644
index 0000000000..fadad9e44a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0003-USB-musb-NAK-timeout-scheme-on-bulk-RX-endpoint.patch
@@ -0,0 +1,218 @@
+From ba7b26e69f4bb41f10be444c5fded853330f82b5 Mon Sep 17 00:00:00 2001
+From: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
+Date: Tue, 24 Mar 2009 17:22:51 -0700
+Subject: [PATCH] USB: musb: NAK timeout scheme on bulk RX endpoint
+
+Fixes endpoint starvation issue when more than one bulk QH is
+multiplexed on the reserved bulk RX endpoint, which is normal
+for cases like serial and ethernet adapters.
+
+This patch sets the NAK timeout interval for such QHs, and when
+a timeout triggers the next QH will be scheduled. (This resembles
+the bulk scheduling done in hardware by EHCI, OHCI, and UHCI.)
+
+This scheme doesn't work for devices which are connected to a
+high to full speed tree (transaction translator) as there is
+no NAK timeout interrupt from the musb controller from such
+devices.
+
+Tested with PIO, Inventra DMA, CPPI DMA.
+
+[ dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: fold in start_urb() update;
+ clarify only for bulk RX; don't accidentally clear WZC bits ]
+
+Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
+Cc: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 112 ++++++++++++++++++++++++++++++++----------
+ 1 files changed, 85 insertions(+), 27 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index 6dbbd07..bd1d5ae 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -64,11 +64,8 @@
+ *
+ * - DMA (Mentor/OMAP) ...has at least toggle update problems
+ *
+- * - Still no traffic scheduling code to make NAKing for bulk or control
+- * transfers unable to starve other requests; or to make efficient use
+- * of hardware with periodic transfers. (Note that network drivers
+- * commonly post bulk reads that stay pending for a long time; these
+- * would make very visible trouble.)
++ * - [23-feb-2009] minimal traffic scheduling to avoid bulk RX packet
++ * starvation ... nothing yet for TX, interrupt, or bulk.
+ *
+ * - Not tested with HNP, but some SRP paths seem to behave.
+ *
+@@ -88,11 +85,8 @@
+ *
+ * CONTROL transfers all go through ep0. BULK ones go through dedicated IN
+ * and OUT endpoints ... hardware is dedicated for those "async" queue(s).
+- *
+ * (Yes, bulk _could_ use more of the endpoints than that, and would even
+- * benefit from it ... one remote device may easily be NAKing while others
+- * need to perform transfers in that same direction. The same thing could
+- * be done in software though, assuming dma cooperates.)
++ * benefit from it.)
+ *
+ * INTERUPPT and ISOCHRONOUS transfers are scheduled to the other endpoints.
+ * So far that scheduling is both dumb and optimistic: the endpoint will be
+@@ -201,8 +195,9 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ len = urb->iso_frame_desc[0].length;
+ break;
+ default: /* bulk, interrupt */
+- buf = urb->transfer_buffer;
+- len = urb->transfer_buffer_length;
++ /* actual_length may be nonzero on retry paths */
++ buf = urb->transfer_buffer + urb->actual_length;
++ len = urb->transfer_buffer_length - urb->actual_length;
+ }
+
+ DBG(4, "qh %p urb %p dev%d ep%d%s%s, hw_ep %d, %p/%d\n",
+@@ -1045,7 +1040,8 @@ irqreturn_t musb_h_ep0_irq(struct musb *musb)
+
+ /* NOTE: this code path would be a good place to PAUSE a
+ * control transfer, if another one is queued, so that
+- * ep0 is more likely to stay busy.
++ * ep0 is more likely to stay busy. That's already done
++ * for bulk RX transfers.
+ *
+ * if (qh->ring.next != &musb->control), then
+ * we have a candidate... NAKing is *NOT* an error
+@@ -1197,6 +1193,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ /* NOTE: this code path would be a good place to PAUSE a
+ * transfer, if there's some other (nonperiodic) tx urb
+ * that could use this fifo. (dma complicates it...)
++ * That's already done for bulk RX transfers.
+ *
+ * if (bulk && qh->ring.next != &musb->out_bulk), then
+ * we have a candidate... NAKing is *NOT* an error
+@@ -1358,6 +1355,50 @@ finish:
+
+ #endif
+
++/* Schedule next QH from musb->in_bulk and move the current qh to
++ * the end; avoids starvation for other endpoints.
++ */
++static void musb_bulk_rx_nak_timeout(struct musb *musb, struct musb_hw_ep *ep)
++{
++ struct dma_channel *dma;
++ struct urb *urb;
++ void __iomem *mbase = musb->mregs;
++ void __iomem *epio = ep->regs;
++ struct musb_qh *cur_qh, *next_qh;
++ u16 rx_csr;
++
++ musb_ep_select(mbase, ep->epnum);
++ dma = is_dma_capable() ? ep->rx_channel : NULL;
++
++ /* clear nak timeout bit */
++ rx_csr = musb_readw(epio, MUSB_RXCSR);
++ rx_csr |= MUSB_RXCSR_H_WZC_BITS;
++ rx_csr &= ~MUSB_RXCSR_DATAERROR;
++ musb_writew(epio, MUSB_RXCSR, rx_csr);
++
++ cur_qh = first_qh(&musb->in_bulk);
++ if (cur_qh) {
++ urb = next_urb(cur_qh);
++ if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) {
++ dma->status = MUSB_DMA_STATUS_CORE_ABORT;
++ musb->dma_controller->channel_abort(dma);
++ urb->actual_length += dma->actual_len;
++ dma->actual_len = 0L;
++ }
++ musb_save_toggle(ep, 1, urb);
++
++ /* move cur_qh to end of queue */
++ list_move_tail(&cur_qh->ring, &musb->in_bulk);
++
++ /* get the next qh from musb->in_bulk */
++ next_qh = first_qh(&musb->in_bulk);
++
++ /* set rx_reinit and schedule the next qh */
++ ep->rx_reinit = 1;
++ musb_start_urb(musb, 1, next_qh);
++ }
++}
++
+ /*
+ * Service an RX interrupt for the given IN endpoint; docs cover bulk, iso,
+ * and high-bandwidth IN transfer cases.
+@@ -1421,18 +1462,26 @@ void musb_host_rx(struct musb *musb, u8 epnum)
+ } else if (rx_csr & MUSB_RXCSR_DATAERROR) {
+
+ if (USB_ENDPOINT_XFER_ISOC != qh->type) {
+- /* NOTE this code path would be a good place to PAUSE a
+- * transfer, if there's some other (nonperiodic) rx urb
+- * that could use this fifo. (dma complicates it...)
++ DBG(6, "RX end %d NAK timeout\n", epnum);
++
++ /* NOTE: NAKing is *NOT* an error, so we want to
++ * continue. Except ... if there's a request for
++ * another QH, use that instead of starving it.
+ *
+- * if (bulk && qh->ring.next != &musb->in_bulk), then
+- * we have a candidate... NAKing is *NOT* an error
++ * Devices like Ethernet and serial adapters keep
++ * reads posted at all times, which will starve
++ * other devices without this logic.
+ */
+- DBG(6, "RX end %d NAK timeout\n", epnum);
++ if (usb_pipebulk(urb->pipe)
++ && qh->mux == 1
++ && !list_is_singular(&musb->in_bulk)) {
++ musb_bulk_rx_nak_timeout(musb, hw_ep);
++ return;
++ }
+ musb_ep_select(mbase, epnum);
+- musb_writew(epio, MUSB_RXCSR,
+- MUSB_RXCSR_H_WZC_BITS
+- | MUSB_RXCSR_H_REQPKT);
++ rx_csr |= MUSB_RXCSR_H_WZC_BITS;
++ rx_csr &= ~MUSB_RXCSR_DATAERROR;
++ musb_writew(epio, MUSB_RXCSR, rx_csr);
+
+ goto finish;
+ } else {
+@@ -1756,6 +1805,17 @@ static int musb_schedule(
+ head = &musb->in_bulk;
+ else
+ head = &musb->out_bulk;
++
++ /* Enable bulk RX NAK timeout scheme when bulk requests are
++ * multiplexed. This scheme doen't work in high speed to full
++ * speed scenario as NAK interrupts are not coming from a
++ * full speed device connected to a high speed device.
++ * NAK timeout interval is 8 (128 uframe or 16ms) for HS and
++ * 4 (8 frame or 8ms) for FS device.
++ */
++ if (is_in && qh->dev)
++ qh->intv_reg =
++ (USB_SPEED_HIGH == qh->dev->speed) ? 8 : 4;
+ goto success;
+ } else if (best_end < 0) {
+ return -ENOSPC;
+@@ -1888,13 +1948,11 @@ static int musb_urb_enqueue(
+ *
+ * The downside of disabling this is that transfer scheduling
+ * gets VERY unfair for nonperiodic transfers; a misbehaving
+- * peripheral could make that hurt. Or for reads, one that's
+- * perfectly normal: network and other drivers keep reads
+- * posted at all times, having one pending for a week should
+- * be perfectly safe.
++ * peripheral could make that hurt. That's perfectly normal
++ * for reads from network or serial adapters ... so we have
++ * partial NAKlimit support for bulk RX.
+ *
+- * The upside of disabling it is avoidng transfer scheduling
+- * code to put this aside for while.
++ * The upside of disabling it is simpler transfer scheduling.
+ */
+ interval = 0;
+ }
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0004-USB-musb-rewrite-host-periodic-endpoint-allocation.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0004-USB-musb-rewrite-host-periodic-endpoint-allocation.patch
new file mode 100644
index 0000000000..438f11cf7a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0004-USB-musb-rewrite-host-periodic-endpoint-allocation.patch
@@ -0,0 +1,106 @@
+From 9ebf351bcd28a89a0b1ba8d0496fffbc72421611 Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Tue, 24 Mar 2009 17:22:50 -0700
+Subject: [PATCH] USB: musb: rewrite host periodic endpoint allocation
+
+The current MUSB host code doesn't make use of all the available
+FIFOs in for periodic transfers since it wrongly assumes the RX
+and TX sides of any given hw_ep always share one FIFO.
+
+Change: use 'in_qh' and 'out_qh' fields of the 'struct musb_hw_ep'
+to check the endpoint's business; get rid of the now-unused 'periodic'
+array in the 'struct musb'. Also optimize a loop induction variable
+in the endpoint lookup code.
+
+(Based on a previous patch from Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>)
+
+[ dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: clarify description and origin
+ of this fix; whitespace ]
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Cc: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.h | 1 -
+ drivers/usb/musb/musb_host.c | 28 +++++++++++-----------------
+ 2 files changed, 11 insertions(+), 18 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
+index 630946a..adf1806 100644
+--- a/drivers/usb/musb/musb_core.h
++++ b/drivers/usb/musb/musb_core.h
+@@ -331,7 +331,6 @@ struct musb {
+ struct list_head control; /* of musb_qh */
+ struct list_head in_bulk; /* of musb_qh */
+ struct list_head out_bulk; /* of musb_qh */
+- struct musb_qh *periodic[32]; /* tree of interrupt+iso */
+ #endif
+
+ /* called with IRQs blocked; ON/nonzero implies starting a session,
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index bd1d5ae..499c431 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -390,7 +390,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
+ * de-allocated if it's tracked and allocated;
+ * and where we'd update the schedule tree...
+ */
+- musb->periodic[ep->epnum] = NULL;
+ kfree(qh);
+ qh = NULL;
+ break;
+@@ -1760,31 +1759,27 @@ static int musb_schedule(
+
+ /* else, periodic transfers get muxed to other endpoints */
+
+- /* FIXME this doesn't consider direction, so it can only
+- * work for one half of the endpoint hardware, and assumes
+- * the previous cases handled all non-shared endpoints...
+- */
+-
+- /* we know this qh hasn't been scheduled, so all we need to do
++ /*
++ * We know this qh hasn't been scheduled, so all we need to do
+ * is choose which hardware endpoint to put it on ...
+ *
+ * REVISIT what we really want here is a regular schedule tree
+- * like e.g. OHCI uses, but for now musb->periodic is just an
+- * array of the _single_ logical endpoint associated with a
+- * given physical one (identity mapping logical->physical).
+- *
+- * that simplistic approach makes TT scheduling a lot simpler;
+- * there is none, and thus none of its complexity...
++ * like e.g. OHCI uses.
+ */
+ best_diff = 4096;
+ best_end = -1;
+
+- for (epnum = 1; epnum < musb->nr_endpoints; epnum++) {
++ for (epnum = 1, hw_ep = musb->endpoints + 1;
++ epnum < musb->nr_endpoints;
++ epnum++, hw_ep++) {
+ int diff;
+
+- if (musb->periodic[epnum])
++ if (is_in || hw_ep->is_shared_fifo) {
++ if (hw_ep->in_qh != NULL)
++ continue;
++ } else if (hw_ep->out_qh != NULL)
+ continue;
+- hw_ep = &musb->endpoints[epnum];
++
+ if (hw_ep == musb->bulk_ep)
+ continue;
+
+@@ -1824,7 +1819,6 @@ static int musb_schedule(
+ idle = 1;
+ qh->mux = 0;
+ hw_ep = musb->endpoints + best_end;
+- musb->periodic[best_end] = qh;
+ DBG(4, "qh %p periodic slot %d\n", qh, best_end);
+ success:
+ if (head) {
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0005-USB-TWL-disable-VUSB-regulators-when-cable-unplugg.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0005-USB-TWL-disable-VUSB-regulators-when-cable-unplugg.patch
new file mode 100644
index 0000000000..db3481b87b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0005-USB-TWL-disable-VUSB-regulators-when-cable-unplugg.patch
@@ -0,0 +1,181 @@
+From 60e7ce93befe795357db05001fe4caab522a421d Mon Sep 17 00:00:00 2001
+From: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Date: Tue, 24 Mar 2009 17:22:57 -0700
+Subject: [PATCH] USB: TWL: disable VUSB regulators when cable unplugged
+
+This patch disables USB regulators VUSB1V5, VUSB1V8, and VUSB3V1
+when the USB cable is unplugged to reduce power consumption.
+Added a depencency from twl4030 usb driver to TWL_REGULATOR.
+
+Signed-off-by: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi-sMOQStClEysAvxtiuMwx3w@public.gmane.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
+---
+ drivers/usb/otg/Kconfig | 2 +-
+ drivers/usb/otg/twl4030-usb.c | 73 ++++++++++++++++++++++++++++++++++++-----
+ 2 files changed, 65 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
+index ee55b44..5790a5b 100644
+--- a/drivers/usb/otg/Kconfig
++++ b/drivers/usb/otg/Kconfig
+@@ -43,7 +43,7 @@ config ISP1301_OMAP
+
+ config TWL4030_USB
+ tristate "TWL4030 USB Transceiver Driver"
+- depends on TWL4030_CORE
++ depends on TWL4030_CORE && REGULATOR_TWL4030
+ select USB_OTG_UTILS
+ help
+ Enable this to support the USB OTG transceiver on TWL4030
+diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
+index 416e441..d9478d0 100644
+--- a/drivers/usb/otg/twl4030-usb.c
++++ b/drivers/usb/otg/twl4030-usb.c
+@@ -34,6 +34,8 @@
+ #include <linux/delay.h>
+ #include <linux/usb/otg.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/regulator/consumer.h>
++#include <linux/err.h>
+
+
+ /* Register defines */
+@@ -246,6 +248,11 @@ struct twl4030_usb {
+ struct otg_transceiver otg;
+ struct device *dev;
+
++ /* TWL4030 internal USB regulator supplies */
++ struct regulator *usb1v5;
++ struct regulator *usb1v8;
++ struct regulator *usb3v1;
++
+ /* for vbus reporting with irqs disabled */
+ spinlock_t lock;
+
+@@ -434,6 +441,18 @@ static void twl4030_phy_power(struct twl4030_usb *twl, int on)
+
+ pwr = twl4030_usb_read(twl, PHY_PWR_CTRL);
+ if (on) {
++ regulator_enable(twl->usb3v1);
++ regulator_enable(twl->usb1v8);
++ /*
++ * Disabling usb3v1 regulator (= writing 0 to VUSB3V1_DEV_GRP
++ * in twl4030) resets the VUSB_DEDICATED2 register. This reset
++ * enables VUSB3V1_SLEEP bit that remaps usb3v1 ACTIVE state to
++ * SLEEP. We work around this by clearing the bit after usv3v1
++ * is re-activated. This ensures that VUSB3V1 is really active.
++ */
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0,
++ VUSB_DEDICATED2);
++ regulator_enable(twl->usb1v5);
+ pwr &= ~PHY_PWR_PHYPWD;
+ WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0);
+ twl4030_usb_write(twl, PHY_CLK_CTRL,
+@@ -443,6 +462,9 @@ static void twl4030_phy_power(struct twl4030_usb *twl, int on)
+ } else {
+ pwr |= PHY_PWR_PHYPWD;
+ WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0);
++ regulator_disable(twl->usb1v5);
++ regulator_disable(twl->usb1v8);
++ regulator_disable(twl->usb3v1);
+ }
+ }
+
+@@ -468,7 +490,7 @@ static void twl4030_phy_resume(struct twl4030_usb *twl)
+ twl->asleep = 0;
+ }
+
+-static void twl4030_usb_ldo_init(struct twl4030_usb *twl)
++static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
+ {
+ /* Enable writing to power configuration registers */
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0xC0, PROTECT_KEY);
+@@ -480,20 +502,45 @@ static void twl4030_usb_ldo_init(struct twl4030_usb *twl)
+ /* input to VUSB3V1 LDO is from VBAT, not VBUS */
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x14, VUSB_DEDICATED1);
+
+- /* turn on 3.1V regulator */
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x20, VUSB3V1_DEV_GRP);
++ /* Initialize 3.1V regulator */
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB3V1_DEV_GRP);
++
++ twl->usb3v1 = regulator_get(twl->dev, "usb3v1");
++ if (IS_ERR(twl->usb3v1))
++ return -ENODEV;
++
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB3V1_TYPE);
+
+- /* turn on 1.5V regulator */
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x20, VUSB1V5_DEV_GRP);
++ /* Initialize 1.5V regulator */
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V5_DEV_GRP);
++
++ twl->usb1v5 = regulator_get(twl->dev, "usb1v5");
++ if (IS_ERR(twl->usb1v5))
++ goto fail1;
++
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V5_TYPE);
+
+- /* turn on 1.8V regulator */
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x20, VUSB1V8_DEV_GRP);
++ /* Initialize 1.8V regulator */
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V8_DEV_GRP);
++
++ twl->usb1v8 = regulator_get(twl->dev, "usb1v8");
++ if (IS_ERR(twl->usb1v8))
++ goto fail2;
++
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE);
+
+ /* disable access to power configuration registers */
+ twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0, PROTECT_KEY);
++
++ return 0;
++
++fail2:
++ regulator_put(twl->usb1v5);
++ twl->usb1v5 = NULL;
++fail1:
++ regulator_put(twl->usb3v1);
++ twl->usb3v1 = NULL;
++ return -ENODEV;
+ }
+
+ static ssize_t twl4030_usb_vbus_show(struct device *dev,
+@@ -598,7 +645,7 @@ static int __init twl4030_usb_probe(struct platform_device *pdev)
+ {
+ struct twl4030_usb_data *pdata = pdev->dev.platform_data;
+ struct twl4030_usb *twl;
+- int status;
++ int status, err;
+
+ if (!pdata) {
+ dev_dbg(&pdev->dev, "platform_data not available\n");
+@@ -622,7 +669,12 @@ static int __init twl4030_usb_probe(struct platform_device *pdev)
+ /* init spinlock for workqueue */
+ spin_lock_init(&twl->lock);
+
+- twl4030_usb_ldo_init(twl);
++ err = twl4030_usb_ldo_init(twl);
++ if (err) {
++ dev_err(&pdev->dev, "ldo init failed\n");
++ kfree(twl);
++ return err;
++ }
+ otg_set_transceiver(&twl->otg);
+
+ platform_set_drvdata(pdev, twl);
+@@ -688,6 +740,9 @@ static int __exit twl4030_usb_remove(struct platform_device *pdev)
+ twl4030_usb_clear_bits(twl, POWER_CTRL, POWER_CTRL_OTG_ENAB);
+
+ twl4030_phy_power(twl, 0);
++ regulator_put(twl->usb1v5);
++ regulator_put(twl->usb1v8);
++ regulator_put(twl->usb3v1);
+
+ kfree(twl);
+
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0006-USB-gadget-composite-device-level-suspend-resume-h.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0006-USB-gadget-composite-device-level-suspend-resume-h.patch
new file mode 100644
index 0000000000..3f49a4d636
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0006-USB-gadget-composite-device-level-suspend-resume-h.patch
@@ -0,0 +1,84 @@
+From 7eef82d231578140c6000d04846a48bdaf341a65 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Tue, 24 Mar 2009 17:23:19 -0700
+Subject: [PATCH] USB: gadget: composite device-level suspend/resume hooks
+
+Address one open question in the composite gadget framework:
+Yes, we should have device-level suspend/resume callbacks
+in addition to the function-level ones. We have at least one
+scenario (with gadget zero in OTG test mode) that's awkward
+to handle without it.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Cc: Felipe Balbi <felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
+---
+ drivers/usb/gadget/composite.c | 8 ++++++--
+ include/linux/usb/composite.h | 8 ++++++++
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
+index 40f1da7..59e8523 100644
+--- a/drivers/usb/gadget/composite.c
++++ b/drivers/usb/gadget/composite.c
+@@ -1014,7 +1014,7 @@ composite_suspend(struct usb_gadget *gadget)
+ struct usb_composite_dev *cdev = get_gadget_data(gadget);
+ struct usb_function *f;
+
+- /* REVISIT: should we have config and device level
++ /* REVISIT: should we have config level
+ * suspend/resume callbacks?
+ */
+ DBG(cdev, "suspend\n");
+@@ -1024,6 +1024,8 @@ composite_suspend(struct usb_gadget *gadget)
+ f->suspend(f);
+ }
+ }
++ if (composite->suspend)
++ composite->suspend(cdev);
+ }
+
+ static void
+@@ -1032,10 +1034,12 @@ composite_resume(struct usb_gadget *gadget)
+ struct usb_composite_dev *cdev = get_gadget_data(gadget);
+ struct usb_function *f;
+
+- /* REVISIT: should we have config and device level
++ /* REVISIT: should we have config level
+ * suspend/resume callbacks?
+ */
+ DBG(cdev, "resume\n");
++ if (composite->resume)
++ composite->resume(cdev);
+ if (cdev->config) {
+ list_for_each_entry(f, &cdev->config->functions, list) {
+ if (f->resume)
+diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
+index 935c380..acd7b0f 100644
+--- a/include/linux/usb/composite.h
++++ b/include/linux/usb/composite.h
+@@ -244,6 +244,10 @@ int usb_add_config(struct usb_composite_dev *,
+ * value; it should return zero on successful initialization.
+ * @unbind: Reverses @bind(); called as a side effect of unregistering
+ * this driver.
++ * @suspend: Notifies when the host stops sending USB traffic,
++ * after function notifications
++ * @resume: Notifies configuration when the host restarts USB traffic,
++ * before function notifications
+ *
+ * Devices default to reporting self powered operation. Devices which rely
+ * on bus powered operation should report this in their @bind() method.
+@@ -268,6 +272,10 @@ struct usb_composite_driver {
+
+ int (*bind)(struct usb_composite_dev *);
+ int (*unbind)(struct usb_composite_dev *);
++
++ /* global suspend hooks */
++ void (*suspend)(struct usb_composite_dev *);
++ void (*resume)(struct usb_composite_dev *);
+ };
+
+ extern int usb_composite_register(struct usb_composite_driver *);
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0007-usb-gadget-fix-ethernet-link-reports-to-ethtool.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0007-usb-gadget-fix-ethernet-link-reports-to-ethtool.patch
new file mode 100644
index 0000000000..a89bc2ff5c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0007-usb-gadget-fix-ethernet-link-reports-to-ethtool.patch
@@ -0,0 +1,47 @@
+From 00c4bd07a64061ec9ab9c35f5bf01ec6187138f4 Mon Sep 17 00:00:00 2001
+From: Jonathan McDowell <noodles-4QvXXjU8Dv4@public.gmane.org>
+Date: Thu, 26 Mar 2009 00:45:27 -0700
+Subject: [PATCH] usb gadget: fix ethernet link reports to ethtool
+
+The g_ether USB gadget driver currently decides whether or not there's a
+link to report back for eth_get_link based on if the USB link speed is
+set. The USB gadget speed is however often set even before the device is
+enumerated. It seems more sensible to only report a "link" if we're
+actually connected to a host that wants to talk to us. The patch below
+does this for me - tested with the PXA27x UDC driver.
+
+Signed-Off-By: Jonathan McDowell <noodles-4QvXXjU8Dv4@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/gadget/u_ether.c | 8 +-------
+ 1 files changed, 1 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
+index 96d65ca..4007770 100644
+--- a/drivers/usb/gadget/u_ether.c
++++ b/drivers/usb/gadget/u_ether.c
+@@ -175,12 +175,6 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p)
+ strlcpy(p->bus_info, dev_name(&dev->gadget->dev), sizeof p->bus_info);
+ }
+
+-static u32 eth_get_link(struct net_device *net)
+-{
+- struct eth_dev *dev = netdev_priv(net);
+- return dev->gadget->speed != USB_SPEED_UNKNOWN;
+-}
+-
+ /* REVISIT can also support:
+ * - WOL (by tracking suspends and issuing remote wakeup)
+ * - msglevel (implies updated messaging)
+@@ -189,7 +183,7 @@ static u32 eth_get_link(struct net_device *net)
+
+ static struct ethtool_ops ops = {
+ .get_drvinfo = eth_get_drvinfo,
+- .get_link = eth_get_link
++ .get_link = ethtool_op_get_link,
+ };
+
+ static void defer_kevent(struct eth_dev *dev, int flag)
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0008-usb-musb_host-minor-enqueue-locking-fix-v2.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0008-usb-musb_host-minor-enqueue-locking-fix-v2.patch
new file mode 100644
index 0000000000..8627825b5a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0008-usb-musb_host-minor-enqueue-locking-fix-v2.patch
@@ -0,0 +1,60 @@
+From c3b527a21104b6bb61558fba6c65aa80f63e0772 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Thu, 26 Mar 2009 17:36:57 -0700
+Subject: [PATCH] usb: musb_host, minor enqueue locking fix (v2)
+
+Someone noted that the enqueue path used an unlocked access
+for usb_host_endpoint->hcpriv ... fix that, by being safe
+and always accessing it under spinlock protection.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 17 ++++++++---------
+ 1 files changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index 499c431..ff09595 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -1841,7 +1841,7 @@ static int musb_urb_enqueue(
+ unsigned long flags;
+ struct musb *musb = hcd_to_musb(hcd);
+ struct usb_host_endpoint *hep = urb->ep;
+- struct musb_qh *qh = hep->hcpriv;
++ struct musb_qh *qh;
+ struct usb_endpoint_descriptor *epd = &hep->desc;
+ int ret;
+ unsigned type_reg;
+@@ -1853,22 +1853,21 @@ static int musb_urb_enqueue(
+
+ spin_lock_irqsave(&musb->lock, flags);
+ ret = usb_hcd_link_urb_to_ep(hcd, urb);
++ qh = ret ? NULL : hep->hcpriv;
++ if (qh)
++ urb->hcpriv = qh;
+ spin_unlock_irqrestore(&musb->lock, flags);
+- if (ret)
+- return ret;
+
+ /* DMA mapping was already done, if needed, and this urb is on
+- * hep->urb_list ... so there's little to do unless hep wasn't
+- * yet scheduled onto a live qh.
++ * hep->urb_list now ... so we're done, unless hep wasn't yet
++ * scheduled onto a live qh.
+ *
+ * REVISIT best to keep hep->hcpriv valid until the endpoint gets
+ * disabled, testing for empty qh->ring and avoiding qh setup costs
+ * except for the first urb queued after a config change.
+ */
+- if (qh) {
+- urb->hcpriv = qh;
+- return 0;
+- }
++ if (qh || ret)
++ return ret;
+
+ /* Allocate and initialize qh, minimizing the work done each time
+ * hw_ep gets reprogrammed, or with irqs blocked. Then schedule it.
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0009-usb-musb_host-fix-ep0-fifo-flushing.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0009-usb-musb_host-fix-ep0-fifo-flushing.patch
new file mode 100644
index 0000000000..09fc0a17d0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0009-usb-musb_host-fix-ep0-fifo-flushing.patch
@@ -0,0 +1,93 @@
+From 48ce47b15bfd420982ee275c595a9139eb6fabf7 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Thu, 26 Mar 2009 17:38:30 -0700
+Subject: [PATCH] usb: musb_host, fix ep0 fifo flushing
+
+The MUSB host side can't share generic TX FIFO flush logic
+with EP0; the EP0 TX status register bits are different
+from those for other entpoints.
+
+Resolve this issue by providing a new EP0-specific routine
+to flush and reset the FIFO, which pays careful attention to
+restrictions listed in the latest programmer's guide. This
+gets rid of an open issue whereby the usbtest control write
+test (#14) failed.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 38 +++++++++++++++++++++++++-------------
+ 1 files changed, 25 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index ff09595..a5d75aa 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -125,6 +125,29 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
+ }
+ }
+
++static void musb_h_ep0_flush_fifo(struct musb_hw_ep *ep)
++{
++ void __iomem *epio = ep->regs;
++ u16 csr;
++ int retries = 5;
++
++ /* scrub any data left in the fifo */
++ do {
++ csr = musb_readw(epio, MUSB_TXCSR);
++ if (!(csr & (MUSB_CSR0_TXPKTRDY | MUSB_CSR0_RXPKTRDY)))
++ break;
++ musb_writew(epio, MUSB_TXCSR, MUSB_CSR0_FLUSHFIFO);
++ csr = musb_readw(epio, MUSB_TXCSR);
++ udelay(10);
++ } while (--retries);
++
++ WARN(!retries, "Could not flush host TX%d fifo: csr: %04x\n",
++ ep->epnum, csr);
++
++ /* and reset for the next transfer */
++ musb_writew(epio, MUSB_TXCSR, 0);
++}
++
+ /*
+ * Start transmit. Caller is responsible for locking shared resources.
+ * musb must be locked.
+@@ -693,11 +716,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ musb_writew(epio, MUSB_TXCSR, csr);
+ csr = musb_readw(epio, MUSB_TXCSR);
+ } else {
+- /* endpoint 0: just flush */
+- musb_writew(epio, MUSB_CSR0,
+- csr | MUSB_CSR0_FLUSHFIFO);
+- musb_writew(epio, MUSB_CSR0,
+- csr | MUSB_CSR0_FLUSHFIFO);
++ musb_h_ep0_flush_fifo(hw_ep);
+ }
+
+ /* target addr and (for multipoint) hub addr/port */
+@@ -1063,11 +1082,7 @@ irqreturn_t musb_h_ep0_irq(struct musb *musb)
+ csr &= ~MUSB_CSR0_H_NAKTIMEOUT;
+ musb_writew(epio, MUSB_CSR0, csr);
+ } else {
+- csr |= MUSB_CSR0_FLUSHFIFO;
+- musb_writew(epio, MUSB_CSR0, csr);
+- musb_writew(epio, MUSB_CSR0, csr);
+- csr &= ~MUSB_CSR0_H_NAKTIMEOUT;
+- musb_writew(epio, MUSB_CSR0, csr);
++ musb_h_ep0_flush_fifo(hw_ep);
+ }
+
+ musb_writeb(epio, MUSB_NAKLIMIT0, 0);
+@@ -1081,9 +1096,6 @@ irqreturn_t musb_h_ep0_irq(struct musb *musb)
+ * SHOULD NEVER HAPPEN! */
+ ERR("no URB for end 0\n");
+
+- musb_writew(epio, MUSB_CSR0, MUSB_CSR0_FLUSHFIFO);
+- musb_writew(epio, MUSB_CSR0, MUSB_CSR0_FLUSHFIFO);
+- musb_writew(epio, MUSB_CSR0, 0);
+
+ goto done;
+ }
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0010-musb-sanitize-clearing-TXCSR-DMA-bits-take-2.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0010-musb-sanitize-clearing-TXCSR-DMA-bits-take-2.patch
new file mode 100644
index 0000000000..bcbe3bbe39
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0010-musb-sanitize-clearing-TXCSR-DMA-bits-take-2.patch
@@ -0,0 +1,361 @@
+From c99f4a68268801a2e2ffbef9766c3ac89e4fb22c Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Thu, 26 Mar 2009 18:27:47 -0700
+Subject: [PATCH] musb: sanitize clearing TXCSR DMA bits (take 2)
+
+The MUSB code clears TXCSR_DMAMODE incorrectly in several
+places, either asserting that TXCSR_DMAENAB is clear (when
+sometimes it isn't) or clearing both bits together. Recent
+versions of the programmer's guide require DMAENAB to be
+cleared first, although some older ones didn't.
+
+Fix this and while at it:
+
+ - In musb_gadget::txstate(), stop clearing the AUTOSET
+ and DMAMODE bits for the CPPI case since they never
+ get set anyway (the former bit is reserved on DaVinci);
+ but do clear the DMAENAB bit on the DMA error path.
+
+ - In musb_host::musb_ep_program(), remove the duplicate
+ DMA controller specific code code clearing the TXCSR
+ previous state, add the code to clear TXCSR DMA bits
+ on the Inventra DMA error path, to replace such code
+ (executed late) on the PIO path.
+
+ - In musbhsdma::dma_channel_abort()/dma_controller_irq(),
+ add/use the 'offset' variable to avoid MUSB_EP_OFFSET()
+ invocations on every RXCSR/TXCSR access.
+
+[dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: don't introduce CamelCase,
+shrink diff]
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_gadget.c | 33 +++++++++++------
+ drivers/usb/musb/musb_host.c | 79 ++++++++++++++++------------------------
+ drivers/usb/musb/musbhsdma.c | 59 ++++++++++++++++++------------
+ 3 files changed, 90 insertions(+), 81 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index c7ebd08..f79440c 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -165,9 +165,15 @@ static void nuke(struct musb_ep *ep, const int status)
+ if (is_dma_capable() && ep->dma) {
+ struct dma_controller *c = ep->musb->dma_controller;
+ int value;
++
+ if (ep->is_in) {
++ /*
++ * The programming guide says that we must not clear
++ * the DMAMODE bit before DMAENAB, so we only
++ * clear it in the second write...
++ */
+ musb_writew(epio, MUSB_TXCSR,
+- 0 | MUSB_TXCSR_FLUSHFIFO);
++ MUSB_TXCSR_DMAMODE | MUSB_TXCSR_FLUSHFIFO);
+ musb_writew(epio, MUSB_TXCSR,
+ 0 | MUSB_TXCSR_FLUSHFIFO);
+ } else {
+@@ -230,7 +236,7 @@ static inline int max_ep_writesize(struct musb *musb, struct musb_ep *ep)
+ | IN token(s) are recd from Host.
+ | -> DMA interrupt on completion
+ | calls TxAvail.
+- | -> stop DMA, ~DmaEenab,
++ | -> stop DMA, ~DMAENAB,
+ | -> set TxPktRdy for last short pkt or zlp
+ | -> Complete Request
+ | -> Continue next request (call txstate)
+@@ -315,9 +321,17 @@ static void txstate(struct musb *musb, struct musb_request *req)
+ request->dma, request_size);
+ if (use_dma) {
+ if (musb_ep->dma->desired_mode == 0) {
+- /* ASSERT: DMAENAB is clear */
+- csr &= ~(MUSB_TXCSR_AUTOSET |
+- MUSB_TXCSR_DMAMODE);
++ /*
++ * We must not clear the DMAMODE bit
++ * before the DMAENAB bit -- and the
++ * latter doesn't always get cleared
++ * before we get here...
++ */
++ csr &= ~(MUSB_TXCSR_AUTOSET
++ | MUSB_TXCSR_DMAENAB);
++ musb_writew(epio, MUSB_TXCSR, csr
++ | MUSB_TXCSR_P_WZC_BITS);
++ csr &= ~MUSB_TXCSR_DMAMODE;
+ csr |= (MUSB_TXCSR_DMAENAB |
+ MUSB_TXCSR_MODE);
+ /* against programming guide */
+@@ -334,10 +348,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
+
+ #elif defined(CONFIG_USB_TI_CPPI_DMA)
+ /* program endpoint CSR first, then setup DMA */
+- csr &= ~(MUSB_TXCSR_AUTOSET
+- | MUSB_TXCSR_DMAMODE
+- | MUSB_TXCSR_P_UNDERRUN
+- | MUSB_TXCSR_TXPKTRDY);
++ csr &= ~(MUSB_TXCSR_P_UNDERRUN | MUSB_TXCSR_TXPKTRDY);
+ csr |= MUSB_TXCSR_MODE | MUSB_TXCSR_DMAENAB;
+ musb_writew(epio, MUSB_TXCSR,
+ (MUSB_TXCSR_P_WZC_BITS & ~MUSB_TXCSR_P_UNDERRUN)
+@@ -364,8 +375,8 @@ static void txstate(struct musb *musb, struct musb_request *req)
+ if (!use_dma) {
+ c->channel_release(musb_ep->dma);
+ musb_ep->dma = NULL;
+- /* ASSERT: DMAENAB clear */
+- csr &= ~(MUSB_TXCSR_DMAMODE | MUSB_TXCSR_MODE);
++ csr &= ~MUSB_TXCSR_DMAENAB;
++ musb_writew(epio, MUSB_TXCSR, csr);
+ /* invariant: prequest->buf is non-null */
+ }
+ #elif defined(CONFIG_USB_TUSB_OMAP_DMA)
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index a5d75aa..6591282 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -590,10 +590,17 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
+ csr = musb_readw(ep->regs, MUSB_TXCSR);
+ if (csr & MUSB_TXCSR_MODE) {
+ musb_h_tx_flush_fifo(ep);
++ csr = musb_readw(ep->regs, MUSB_TXCSR);
+ musb_writew(ep->regs, MUSB_TXCSR,
+- MUSB_TXCSR_FRCDATATOG);
++ csr | MUSB_TXCSR_FRCDATATOG);
+ }
+- /* clear mode (and everything else) to enable Rx */
++
++ /*
++ * Clear the MODE bit (and everything else) to enable Rx.
++ * NOTE: we mustn't clear the DMAMODE bit before DMAENAB.
++ */
++ if (csr & MUSB_TXCSR_DMAMODE)
++ musb_writew(ep->regs, MUSB_TXCSR, MUSB_TXCSR_DMAMODE);
+ musb_writew(ep->regs, MUSB_TXCSR, 0);
+
+ /* scrub all previous state, clearing toggle */
+@@ -690,12 +697,17 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+
+ /* general endpoint setup */
+ if (epnum) {
+- /* ASSERT: TXCSR_DMAENAB was already cleared */
+-
+ /* flush all old state, set default */
+ musb_h_tx_flush_fifo(hw_ep);
++
++ /*
++ * We must not clear the DMAMODE bit before or in
++ * the same cycle with the DMAENAB bit, so we clear
++ * the latter first...
++ */
+ csr &= ~(MUSB_TXCSR_H_NAKTIMEOUT
+- | MUSB_TXCSR_DMAMODE
++ | MUSB_TXCSR_AUTOSET
++ | MUSB_TXCSR_DMAENAB
+ | MUSB_TXCSR_FRCDATATOG
+ | MUSB_TXCSR_H_RXSTALL
+ | MUSB_TXCSR_H_ERROR
+@@ -703,16 +715,15 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ );
+ csr |= MUSB_TXCSR_MODE;
+
+- if (usb_gettoggle(urb->dev,
+- qh->epnum, 1))
++ if (usb_gettoggle(urb->dev, qh->epnum, 1))
+ csr |= MUSB_TXCSR_H_WR_DATATOGGLE
+ | MUSB_TXCSR_H_DATATOGGLE;
+ else
+ csr |= MUSB_TXCSR_CLRDATATOG;
+
+- /* twice in case of double packet buffering */
+ musb_writew(epio, MUSB_TXCSR, csr);
+ /* REVISIT may need to clear FLUSHFIFO ... */
++ csr &= ~MUSB_TXCSR_DMAMODE;
+ musb_writew(epio, MUSB_TXCSR, csr);
+ csr = musb_readw(epio, MUSB_TXCSR);
+ } else {
+@@ -755,34 +766,19 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+
+ #ifdef CONFIG_USB_INVENTRA_DMA
+ if (dma_channel) {
+-
+- /* clear previous state */
+- csr = musb_readw(epio, MUSB_TXCSR);
+- csr &= ~(MUSB_TXCSR_AUTOSET
+- | MUSB_TXCSR_DMAMODE
+- | MUSB_TXCSR_DMAENAB);
+- csr |= MUSB_TXCSR_MODE;
+- musb_writew(epio, MUSB_TXCSR,
+- csr | MUSB_TXCSR_MODE);
+-
+ qh->segsize = min(len, dma_channel->max_len);
+-
+ if (qh->segsize <= packet_sz)
+ dma_channel->desired_mode = 0;
+ else
+ dma_channel->desired_mode = 1;
+
+-
+ if (dma_channel->desired_mode == 0) {
+- csr &= ~(MUSB_TXCSR_AUTOSET
+- | MUSB_TXCSR_DMAMODE);
++ /* Against the programming guide */
+ csr |= (MUSB_TXCSR_DMAENAB);
+- /* against programming guide */
+ } else
+ csr |= (MUSB_TXCSR_AUTOSET
+ | MUSB_TXCSR_DMAENAB
+ | MUSB_TXCSR_DMAMODE);
+-
+ musb_writew(epio, MUSB_TXCSR, csr);
+
+ dma_ok = dma_controller->channel_program(
+@@ -799,6 +795,17 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ else
+ hw_ep->rx_channel = NULL;
+ dma_channel = NULL;
++
++ /*
++ * The programming guide says that we must
++ * clear the DMAENAB bit before DMAMODE...
++ */
++ csr = musb_readw(epio, MUSB_TXCSR);
++ csr &= ~(MUSB_TXCSR_DMAENAB
++ | MUSB_TXCSR_AUTOSET);
++ musb_writew(epio, MUSB_TXCSR, csr);
++ csr &= ~MUSB_TXCSR_DMAMODE;
++ musb_writew(epio, MUSB_TXCSR, csr);
+ }
+ }
+ #endif
+@@ -806,18 +813,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ /* candidate for DMA */
+ if ((is_cppi_enabled() || tusb_dma_omap()) && dma_channel) {
+
+- /* program endpoint CSRs first, then setup DMA.
+- * assume CPPI setup succeeds.
+- * defer enabling dma.
+- */
+- csr = musb_readw(epio, MUSB_TXCSR);
+- csr &= ~(MUSB_TXCSR_AUTOSET
+- | MUSB_TXCSR_DMAMODE
+- | MUSB_TXCSR_DMAENAB);
+- csr |= MUSB_TXCSR_MODE;
+- musb_writew(epio, MUSB_TXCSR,
+- csr | MUSB_TXCSR_MODE);
+-
++ /* Defer enabling DMA */
+ dma_channel->actual_len = 0L;
+ qh->segsize = len;
+
+@@ -846,20 +842,9 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ }
+
+ if (load_count) {
+- /* ASSERT: TXCSR_DMAENAB was already cleared */
+-
+ /* PIO to load FIFO */
+ qh->segsize = load_count;
+ musb_write_fifo(hw_ep, load_count, buf);
+- csr = musb_readw(epio, MUSB_TXCSR);
+- csr &= ~(MUSB_TXCSR_DMAENAB
+- | MUSB_TXCSR_DMAMODE
+- | MUSB_TXCSR_AUTOSET);
+- /* write CSR */
+- csr |= MUSB_TXCSR_MODE;
+-
+- if (epnum)
+- musb_writew(epio, MUSB_TXCSR, csr);
+ }
+
+ /* re-enable interrupt */
+diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
+index 8662e9e..40709c3 100644
+--- a/drivers/usb/musb/musbhsdma.c
++++ b/drivers/usb/musb/musbhsdma.c
+@@ -195,30 +195,32 @@ static int dma_channel_abort(struct dma_channel *channel)
+ void __iomem *mbase = musb_channel->controller->base;
+
+ u8 bchannel = musb_channel->idx;
++ int offset;
+ u16 csr;
+
+ if (channel->status == MUSB_DMA_STATUS_BUSY) {
+ if (musb_channel->transmit) {
+-
+- csr = musb_readw(mbase,
+- MUSB_EP_OFFSET(musb_channel->epnum,
+- MUSB_TXCSR));
+- csr &= ~(MUSB_TXCSR_AUTOSET |
+- MUSB_TXCSR_DMAENAB |
+- MUSB_TXCSR_DMAMODE);
+- musb_writew(mbase,
+- MUSB_EP_OFFSET(musb_channel->epnum, MUSB_TXCSR),
+- csr);
++ offset = MUSB_EP_OFFSET(musb_channel->epnum,
++ MUSB_TXCSR);
++
++ /*
++ * The programming guide says that we must clear
++ * the DMAENAB bit before the DMAMODE bit...
++ */
++ csr = musb_readw(mbase, offset);
++ csr &= ~(MUSB_TXCSR_AUTOSET | MUSB_TXCSR_DMAENAB);
++ musb_writew(mbase, offset, csr);
++ csr &= ~MUSB_TXCSR_DMAMODE;
++ musb_writew(mbase, offset, csr);
+ } else {
+- csr = musb_readw(mbase,
+- MUSB_EP_OFFSET(musb_channel->epnum,
+- MUSB_RXCSR));
++ offset = MUSB_EP_OFFSET(musb_channel->epnum,
++ MUSB_RXCSR);
++
++ csr = musb_readw(mbase, offset);
+ csr &= ~(MUSB_RXCSR_AUTOCLEAR |
+ MUSB_RXCSR_DMAENAB |
+ MUSB_RXCSR_DMAMODE);
+- musb_writew(mbase,
+- MUSB_EP_OFFSET(musb_channel->epnum, MUSB_RXCSR),
+- csr);
++ musb_writew(mbase, offset, csr);
+ }
+
+ musb_writew(mbase,
+@@ -296,14 +298,25 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data)
+ && ((channel->desired_mode == 0)
+ || (channel->actual_len &
+ (musb_channel->max_packet_sz - 1)))
+- ) {
++ ) {
++ u8 epnum = musb_channel->epnum;
++ int offset = MUSB_EP_OFFSET(epnum,
++ MUSB_TXCSR);
++ u16 txcsr;
++
++ /*
++ * The programming guide says that we
++ * must clear DMAENAB before DMAMODE.
++ */
++ musb_ep_select(mbase, epnum);
++ txcsr = musb_readw(mbase, offset);
++ txcsr &= ~(MUSB_TXCSR_DMAENAB
++ | MUSB_TXCSR_AUTOSET);
++ musb_writew(mbase, offset, txcsr);
+ /* Send out the packet */
+- musb_ep_select(mbase,
+- musb_channel->epnum);
+- musb_writew(mbase, MUSB_EP_OFFSET(
+- musb_channel->epnum,
+- MUSB_TXCSR),
+- MUSB_TXCSR_TXPKTRDY);
++ txcsr &= ~MUSB_TXCSR_DMAMODE;
++ txcsr |= MUSB_TXCSR_TXPKTRDY;
++ musb_writew(mbase, offset, txcsr);
+ } else {
+ musb_dma_completion(
+ musb,
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0011-musb-fix-isochronous-TXDMA-take-2.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0011-musb-fix-isochronous-TXDMA-take-2.patch
new file mode 100644
index 0000000000..7d546e10b0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0011-musb-fix-isochronous-TXDMA-take-2.patch
@@ -0,0 +1,417 @@
+From 035cd4a26e9b1638b4b0419b98409026176563ca Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Thu, 26 Mar 2009 18:29:19 -0700
+Subject: [PATCH] musb: fix isochronous TXDMA (take 2)
+
+Multi-frame isochronous TX URBs transfers in DMA mode never
+complete with CPPI DMA because musb_host_tx() doesn't restart
+DMA on the second frame, only emitting a debug message.
+With Inventra DMA they complete, but in PIO mode. To fix:
+
+ - Factor out programming of the DMA transfer from
+ musb_ep_program() into musb_tx_dma_program();
+
+ - Reorder the code at the end of musb_host_tx() to
+ facilitate the fallback to PIO iff DMA fails;
+
+ - Handle the buffer offset consistently for both
+ PIO and DMA modes;
+
+ - Add an argument to musb_ep_program() for the same
+ reason (it only worked correctly with non-zero
+ offset of the first frame in PIO mode);
+
+ - Set the completed isochronous frame descriptor's
+ 'actual_length' and 'status' fields correctly in
+ DMA mode.
+
+Also, since CPPI reportedly doesn't like sending isochronous
+packets in the RNDIS mode, change the criterion for this
+mode to be used only for multi-packet transfers. (There's
+no need for that mode in the single-packet case anyway.)
+
+[ dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: split comment paragraph
+into bullet list, shrink patch delta, style tweaks ]
+
+Signed-off-by: Pavel Kiryukhin <pkiryukhin-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/cppi_dma.c | 1 +
+ drivers/usb/musb/musb_host.c | 227 +++++++++++++++++++-----------------------
+ 2 files changed, 105 insertions(+), 123 deletions(-)
+
+diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
+index 569ef0f..ac7227c 100644
+--- a/drivers/usb/musb/cppi_dma.c
++++ b/drivers/usb/musb/cppi_dma.c
+@@ -579,6 +579,7 @@ cppi_next_tx_segment(struct musb *musb, struct cppi_channel *tx)
+ * trigger the "send a ZLP?" confusion.
+ */
+ rndis = (maxpacket & 0x3f) == 0
++ && length > maxpacket
+ && length < 0xffff
+ && (length % maxpacket) != 0;
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index 6591282..f6e84a0 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -96,8 +96,8 @@
+
+
+ static void musb_ep_program(struct musb *musb, u8 epnum,
+- struct urb *urb, unsigned int nOut,
+- u8 *buf, u32 len);
++ struct urb *urb, int is_out,
++ u8 *buf, u32 offset, u32 len);
+
+ /*
+ * Clear TX fifo. Needed to avoid BABBLE errors.
+@@ -189,9 +189,10 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ {
+ u16 frame;
+ u32 len;
+- void *buf;
+ void __iomem *mbase = musb->mregs;
+ struct urb *urb = next_urb(qh);
++ void *buf = urb->transfer_buffer;
++ u32 offset = 0;
+ struct musb_hw_ep *hw_ep = qh->hw_ep;
+ unsigned pipe = urb->pipe;
+ u8 address = usb_pipedevice(pipe);
+@@ -214,7 +215,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ case USB_ENDPOINT_XFER_ISOC:
+ qh->iso_idx = 0;
+ qh->frame = 0;
+- buf = urb->transfer_buffer + urb->iso_frame_desc[0].offset;
++ offset = urb->iso_frame_desc[0].offset;
+ len = urb->iso_frame_desc[0].length;
+ break;
+ default: /* bulk, interrupt */
+@@ -232,14 +233,14 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ case USB_ENDPOINT_XFER_ISOC: s = "-iso"; break;
+ default: s = "-intr"; break;
+ }; s; }),
+- epnum, buf, len);
++ epnum, buf + offset, len);
+
+ /* Configure endpoint */
+ if (is_in || hw_ep->is_shared_fifo)
+ hw_ep->in_qh = qh;
+ else
+ hw_ep->out_qh = qh;
+- musb_ep_program(musb, epnum, urb, !is_in, buf, len);
++ musb_ep_program(musb, epnum, urb, !is_in, buf, offset, len);
+
+ /* transmit may have more work: start it when it is time */
+ if (is_in)
+@@ -250,7 +251,6 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ case USB_ENDPOINT_XFER_ISOC:
+ case USB_ENDPOINT_XFER_INT:
+ DBG(3, "check whether there's still time for periodic Tx\n");
+- qh->iso_idx = 0;
+ frame = musb_readw(mbase, MUSB_FRAME);
+ /* FIXME this doesn't implement that scheduling policy ...
+ * or handle framecounter wrapping
+@@ -631,14 +631,68 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
+ ep->rx_reinit = 0;
+ }
+
++static bool musb_tx_dma_program(struct dma_controller *dma,
++ struct musb_hw_ep *hw_ep, struct musb_qh *qh,
++ struct urb *urb, u32 offset, u32 length)
++{
++ struct dma_channel *channel = hw_ep->tx_channel;
++ void __iomem *epio = hw_ep->regs;
++ u16 pkt_size = qh->maxpacket;
++ u16 csr;
++ u8 mode;
++
++#ifdef CONFIG_USB_INVENTRA_DMA
++ if (length > channel->max_len)
++ length = channel->max_len;
++
++ csr = musb_readw(epio, MUSB_TXCSR);
++ if (length > pkt_size) {
++ mode = 1;
++ csr |= MUSB_TXCSR_AUTOSET
++ | MUSB_TXCSR_DMAMODE
++ | MUSB_TXCSR_DMAENAB;
++ } else {
++ mode = 0;
++ csr &= ~(MUSB_TXCSR_AUTOSET | MUSB_TXCSR_DMAMODE);
++ csr |= MUSB_TXCSR_DMAENAB; /* against programmer's guide */
++ }
++ channel->desired_mode = mode;
++ musb_writew(epio, MUSB_TXCSR, csr);
++#else
++ if (!is_cppi_enabled() && !tusb_dma_omap())
++ return false;
++
++ channel->actual_len = 0;
++
++ /*
++ * TX uses "RNDIS" mode automatically but needs help
++ * to identify the zero-length-final-packet case.
++ */
++ mode = (urb->transfer_flags & URB_ZERO_PACKET) ? 1 : 0;
++#endif
++
++ qh->segsize = length;
++
++ if (!dma->channel_program(channel, pkt_size, mode,
++ urb->transfer_dma + offset, length)) {
++ dma->channel_release(channel);
++ hw_ep->tx_channel = NULL;
++
++ csr = musb_readw(epio, MUSB_TXCSR);
++ csr &= ~(MUSB_TXCSR_AUTOSET | MUSB_TXCSR_DMAENAB);
++ musb_writew(epio, MUSB_TXCSR, csr | MUSB_TXCSR_H_WZC_BITS);
++ return false;
++ }
++ return true;
++}
+
+ /*
+ * Program an HDRC endpoint as per the given URB
+ * Context: irqs blocked, controller lock held
+ */
+ static void musb_ep_program(struct musb *musb, u8 epnum,
+- struct urb *urb, unsigned int is_out,
+- u8 *buf, u32 len)
++ struct urb *urb, int is_out,
++ u8 *buf, u32 offset, u32 len)
+ {
+ struct dma_controller *dma_controller;
+ struct dma_channel *dma_channel;
+@@ -764,82 +818,9 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ else
+ load_count = min((u32) packet_sz, len);
+
+-#ifdef CONFIG_USB_INVENTRA_DMA
+- if (dma_channel) {
+- qh->segsize = min(len, dma_channel->max_len);
+- if (qh->segsize <= packet_sz)
+- dma_channel->desired_mode = 0;
+- else
+- dma_channel->desired_mode = 1;
+-
+- if (dma_channel->desired_mode == 0) {
+- /* Against the programming guide */
+- csr |= (MUSB_TXCSR_DMAENAB);
+- } else
+- csr |= (MUSB_TXCSR_AUTOSET
+- | MUSB_TXCSR_DMAENAB
+- | MUSB_TXCSR_DMAMODE);
+- musb_writew(epio, MUSB_TXCSR, csr);
+-
+- dma_ok = dma_controller->channel_program(
+- dma_channel, packet_sz,
+- dma_channel->desired_mode,
+- urb->transfer_dma,
+- qh->segsize);
+- if (dma_ok) {
+- load_count = 0;
+- } else {
+- dma_controller->channel_release(dma_channel);
+- if (is_out)
+- hw_ep->tx_channel = NULL;
+- else
+- hw_ep->rx_channel = NULL;
+- dma_channel = NULL;
+-
+- /*
+- * The programming guide says that we must
+- * clear the DMAENAB bit before DMAMODE...
+- */
+- csr = musb_readw(epio, MUSB_TXCSR);
+- csr &= ~(MUSB_TXCSR_DMAENAB
+- | MUSB_TXCSR_AUTOSET);
+- musb_writew(epio, MUSB_TXCSR, csr);
+- csr &= ~MUSB_TXCSR_DMAMODE;
+- musb_writew(epio, MUSB_TXCSR, csr);
+- }
+- }
+-#endif
+-
+- /* candidate for DMA */
+- if ((is_cppi_enabled() || tusb_dma_omap()) && dma_channel) {
+-
+- /* Defer enabling DMA */
+- dma_channel->actual_len = 0L;
+- qh->segsize = len;
+-
+- /* TX uses "rndis" mode automatically, but needs help
+- * to identify the zero-length-final-packet case.
+- */
+- dma_ok = dma_controller->channel_program(
+- dma_channel, packet_sz,
+- (urb->transfer_flags
+- & URB_ZERO_PACKET)
+- == URB_ZERO_PACKET,
+- urb->transfer_dma,
+- qh->segsize);
+- if (dma_ok) {
+- load_count = 0;
+- } else {
+- dma_controller->channel_release(dma_channel);
+- hw_ep->tx_channel = NULL;
+- dma_channel = NULL;
+-
+- /* REVISIT there's an error path here that
+- * needs handling: can't do dma, but
+- * there's no pio buffer address...
+- */
+- }
+- }
++ if (dma_channel && musb_tx_dma_program(dma_controller,
++ hw_ep, qh, urb, offset, len))
++ load_count = 0;
+
+ if (load_count) {
+ /* PIO to load FIFO */
+@@ -899,7 +880,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ dma_channel, packet_sz,
+ !(urb->transfer_flags
+ & URB_SHORT_NOT_OK),
+- urb->transfer_dma,
++ urb->transfer_dma + offset,
+ qh->segsize);
+ if (!dma_ok) {
+ dma_controller->channel_release(
+@@ -1142,8 +1123,8 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ int pipe;
+ bool done = false;
+ u16 tx_csr;
+- size_t wLength = 0;
+- u8 *buf = NULL;
++ size_t length = 0;
++ size_t offset = 0;
+ struct urb *urb;
+ struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
+ void __iomem *epio = hw_ep->regs;
+@@ -1161,7 +1142,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ /* with CPPI, DMA sometimes triggers "extra" irqs */
+ if (!urb) {
+ DBG(4, "extra TX%d ready, csr %04x\n", epnum, tx_csr);
+- goto finish;
++ return;
+ }
+
+ pipe = urb->pipe;
+@@ -1198,7 +1179,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ musb_writew(epio, MUSB_TXCSR,
+ MUSB_TXCSR_H_WZC_BITS
+ | MUSB_TXCSR_TXPKTRDY);
+- goto finish;
++ return;
+ }
+
+ if (status) {
+@@ -1230,29 +1211,28 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ /* second cppi case */
+ if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) {
+ DBG(4, "extra TX%d ready, csr %04x\n", epnum, tx_csr);
+- goto finish;
+-
++ return;
+ }
+
+- /* REVISIT this looks wrong... */
+ if (!status || dma || usb_pipeisoc(pipe)) {
+ if (dma)
+- wLength = dma->actual_len;
++ length = dma->actual_len;
+ else
+- wLength = qh->segsize;
+- qh->offset += wLength;
++ length = qh->segsize;
++ qh->offset += length;
+
+ if (usb_pipeisoc(pipe)) {
+ struct usb_iso_packet_descriptor *d;
+
+ d = urb->iso_frame_desc + qh->iso_idx;
+- d->actual_length = qh->segsize;
++ d->actual_length = length;
++ d->status = status;
+ if (++qh->iso_idx >= urb->number_of_packets) {
+ done = true;
+ } else {
+ d++;
+- buf = urb->transfer_buffer + d->offset;
+- wLength = d->length;
++ offset = d->offset;
++ length = d->length;
+ }
+ } else if (dma) {
+ done = true;
+@@ -1265,10 +1245,8 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ & URB_ZERO_PACKET))
+ done = true;
+ if (!done) {
+- buf = urb->transfer_buffer
+- + qh->offset;
+- wLength = urb->transfer_buffer_length
+- - qh->offset;
++ offset = qh->offset;
++ length = urb->transfer_buffer_length - offset;
+ }
+ }
+ }
+@@ -1287,28 +1265,31 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ urb->status = status;
+ urb->actual_length = qh->offset;
+ musb_advance_schedule(musb, urb, hw_ep, USB_DIR_OUT);
++ return;
++ } else if (usb_pipeisoc(pipe) && dma) {
++ if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb,
++ offset, length))
++ return;
++ } else if (tx_csr & MUSB_TXCSR_DMAENAB) {
++ DBG(1, "not complete, but DMA enabled?\n");
++ return;
++ }
+
+- } else if (!(tx_csr & MUSB_TXCSR_DMAENAB)) {
+- /* WARN_ON(!buf); */
+-
+- /* REVISIT: some docs say that when hw_ep->tx_double_buffered,
+- * (and presumably, fifo is not half-full) we should write TWO
+- * packets before updating TXCSR ... other docs disagree ...
+- */
+- /* PIO: start next packet in this URB */
+- if (wLength > qh->maxpacket)
+- wLength = qh->maxpacket;
+- musb_write_fifo(hw_ep, wLength, buf);
+- qh->segsize = wLength;
+-
+- musb_ep_select(mbase, epnum);
+- musb_writew(epio, MUSB_TXCSR,
+- MUSB_TXCSR_H_WZC_BITS | MUSB_TXCSR_TXPKTRDY);
+- } else
+- DBG(1, "not complete, but dma enabled?\n");
++ /*
++ * PIO: start next packet in this URB.
++ *
++ * REVISIT: some docs say that when hw_ep->tx_double_buffered,
++ * (and presumably, FIFO is not half-full) we should write *two*
++ * packets before updating TXCSR; other docs disagree...
++ */
++ if (length > qh->maxpacket)
++ length = qh->maxpacket;
++ musb_write_fifo(hw_ep, length, urb->transfer_buffer + offset);
++ qh->segsize = length;
+
+-finish:
+- return;
++ musb_ep_select(mbase, epnum);
++ musb_writew(epio, MUSB_TXCSR,
++ MUSB_TXCSR_H_WZC_BITS | MUSB_TXCSR_TXPKTRDY);
+ }
+
+
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch
new file mode 100644
index 0000000000..2bbde84c16
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch
@@ -0,0 +1,56 @@
+From b9a61b80ea89d9d6d78a23d96a28df94fd612298 Mon Sep 17 00:00:00 2001
+From: Kim Kyuwon <q1.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
+Date: Thu, 26 Mar 2009 18:56:51 -0700
+Subject: [PATCH] musb: fix possible panic while resuming
+
+During driver resume processing, musb could cause a kernel panic.
+Fix by enabling the clock earlier, with the resume_early method.
+
+Signed-off-by: Kim Kyuwon <q1.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.c | 8 ++------
+ 1 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index 338cd16..3019725 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -2170,16 +2170,13 @@ static int musb_suspend(struct platform_device *pdev, pm_message_t message)
+ return 0;
+ }
+
+-static int musb_resume(struct platform_device *pdev)
++static int musb_resume_early(struct platform_device *pdev)
+ {
+- unsigned long flags;
+ struct musb *musb = dev_to_musb(&pdev->dev);
+
+ if (!musb->clock)
+ return 0;
+
+- spin_lock_irqsave(&musb->lock, flags);
+-
+ if (musb->set_clock)
+ musb->set_clock(musb->clock, 1);
+ else
+@@ -2189,7 +2186,6 @@ static int musb_resume(struct platform_device *pdev)
+ * unless for some reason the whole soc powered down and we're
+ * not treating that as a whole-system restart (e.g. swsusp)
+ */
+- spin_unlock_irqrestore(&musb->lock, flags);
+ return 0;
+ }
+
+@@ -2207,7 +2203,7 @@ static struct platform_driver musb_driver = {
+ .remove = __devexit_p(musb_remove),
+ .shutdown = musb_shutdown,
+ .suspend = musb_suspend,
+- .resume = musb_resume,
++ .resume_early = musb_resume_early,
+ };
+
+ /*-------------------------------------------------------------------------*/
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0013-musb_host-refactor-musb_save_toggle-take-2.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0013-musb_host-refactor-musb_save_toggle-take-2.patch
new file mode 100644
index 0000000000..0202871d41
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0013-musb_host-refactor-musb_save_toggle-take-2.patch
@@ -0,0 +1,91 @@
+From 2658f7c9029967501cd4d749364f2e02d02eebd5 Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:54:21 -0700
+Subject: [PATCH] musb_host: refactor musb_save_toggle() (take 2)
+
+Refactor musb_save_toggle() as follows:
+
+ - replace 'struct musb_hw_ep *ep' parameter by 'struct
+ musb_qh *qh' to avoid re-calculating this value
+
+ - move usb_settogle() call out of the *if* operator.
+
+This is a net minor shrink of source and object code.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 35 ++++++++++++-----------------------
+ 1 files changed, 12 insertions(+), 23 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index f6e84a0..dc32ce4 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -318,35 +318,24 @@ __acquires(musb->lock)
+ spin_lock(&musb->lock);
+ }
+
+-/* for bulk/interrupt endpoints only */
+-static inline void
+-musb_save_toggle(struct musb_hw_ep *ep, int is_in, struct urb *urb)
++/* For bulk/interrupt endpoints only */
++static inline void musb_save_toggle(struct musb_qh *qh, int is_in,
++ struct urb *urb)
+ {
+- struct usb_device *udev = urb->dev;
++ void __iomem *epio = qh->hw_ep->regs;
+ u16 csr;
+- void __iomem *epio = ep->regs;
+- struct musb_qh *qh;
+
+- /* FIXME: the current Mentor DMA code seems to have
++ /*
++ * FIXME: the current Mentor DMA code seems to have
+ * problems getting toggle correct.
+ */
+
+- if (is_in || ep->is_shared_fifo)
+- qh = ep->in_qh;
++ if (is_in)
++ csr = musb_readw(epio, MUSB_RXCSR) & MUSB_RXCSR_H_DATATOGGLE;
+ else
+- qh = ep->out_qh;
++ csr = musb_readw(epio, MUSB_TXCSR) & MUSB_TXCSR_H_DATATOGGLE;
+
+- if (!is_in) {
+- csr = musb_readw(epio, MUSB_TXCSR);
+- usb_settoggle(udev, qh->epnum, 1,
+- (csr & MUSB_TXCSR_H_DATATOGGLE)
+- ? 1 : 0);
+- } else {
+- csr = musb_readw(epio, MUSB_RXCSR);
+- usb_settoggle(udev, qh->epnum, 0,
+- (csr & MUSB_RXCSR_H_DATATOGGLE)
+- ? 1 : 0);
+- }
++ usb_settoggle(urb->dev, qh->epnum, !is_in, csr ? 1 : 0);
+ }
+
+ /* caller owns controller lock, irqs are blocked */
+@@ -362,7 +351,7 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
+ switch (qh->type) {
+ case USB_ENDPOINT_XFER_BULK:
+ case USB_ENDPOINT_XFER_INT:
+- musb_save_toggle(ep, is_in, urb);
++ musb_save_toggle(qh, is_in, urb);
+ break;
+ case USB_ENDPOINT_XFER_ISOC:
+ if (status == 0 && urb->error_count)
+@@ -1362,7 +1351,7 @@ static void musb_bulk_rx_nak_timeout(struct musb *musb, struct musb_hw_ep *ep)
+ urb->actual_length += dma->actual_len;
+ dma->actual_len = 0L;
+ }
+- musb_save_toggle(ep, 1, urb);
++ musb_save_toggle(cur_qh, 1, urb);
+
+ /* move cur_qh to end of queue */
+ list_move_tail(&cur_qh->ring, &musb->in_bulk);
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0014-musb_gadget-suppress-parasitic-TX-interrupts-with.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0014-musb_gadget-suppress-parasitic-TX-interrupts-with.patch
new file mode 100644
index 0000000000..08e08a8538
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0014-musb_gadget-suppress-parasitic-TX-interrupts-with.patch
@@ -0,0 +1,32 @@
+From 7766f2ea909b73f56d21746485069e02839b75f1 Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:53:32 -0700
+Subject: [PATCH] musb_gadget: suppress "parasitic" TX interrupts with CPPI
+
+Suppress "parasitic" endpoint interrupts in the DMA mode
+when using CPPI DMA driver; they're caused by the MUSB gadget
+driver using the DMA request mode 0 instead of the mode 1.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_gadget.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index f79440c..bc197b2 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -349,7 +349,8 @@ static void txstate(struct musb *musb, struct musb_request *req)
+ #elif defined(CONFIG_USB_TI_CPPI_DMA)
+ /* program endpoint CSR first, then setup DMA */
+ csr &= ~(MUSB_TXCSR_P_UNDERRUN | MUSB_TXCSR_TXPKTRDY);
+- csr |= MUSB_TXCSR_MODE | MUSB_TXCSR_DMAENAB;
++ csr |= MUSB_TXCSR_DMAENAB | MUSB_TXCSR_DMAMODE |
++ MUSB_TXCSR_MODE;
+ musb_writew(epio, MUSB_TXCSR,
+ (MUSB_TXCSR_P_WZC_BITS & ~MUSB_TXCSR_P_UNDERRUN)
+ | csr);
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0015-musb_gadget-fix-unhandled-endpoint-0-IRQs.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0015-musb_gadget-fix-unhandled-endpoint-0-IRQs.patch
new file mode 100644
index 0000000000..7115b152d9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0015-musb_gadget-fix-unhandled-endpoint-0-IRQs.patch
@@ -0,0 +1,202 @@
+From 5424305125492a2417bde7c6d23ee4b84e25f6be Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:52:43 -0700
+Subject: [PATCH] musb_gadget: fix unhandled endpoint 0 IRQs
+
+The gadget EP0 code routinely ignores an interrupt at end of
+the data phase because of musb_g_ep0_giveback() resetting the
+state machine to "idle, waiting for SETUP" phase prematurely.
+
+The driver also prematurely leaves the status phase on
+receiving the SetupEnd interrupt.
+
+As there were still unhandled endpoint 0 interrupts happening
+from time to time after fixing these issues, there turned to
+be yet another culprit: two distinct gadget states collapsed
+into one.
+
+The (missing) state that comes after STATUS IN/OUT states was
+typically indiscernible from them since the corresponding
+interrupts tend to happen within too little period of time
+(due to only a zero-length status packet in between) and so
+they got coalesced; yet this state is not the same as the next
+one which is associated with the reception of a SETUP packet.
+
+Adding this extra state seems to have fixed the rest of the
+unhandled interrupts that generic_interrupt() and
+davinci_interrupt() hid by faking their result and only
+emitting a debug message -- so, stop doing that.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/davinci.c | 7 +----
+ drivers/usb/musb/musb_core.c | 8 +-----
+ drivers/usb/musb/musb_core.h | 3 +-
+ drivers/usb/musb/musb_gadget_ep0.c | 45 +++++++++++++++++++++++++++++++----
+ 4 files changed, 43 insertions(+), 20 deletions(-)
+
+diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
+index 2dc7606..399c435 100644
+--- a/drivers/usb/musb/davinci.c
++++ b/drivers/usb/musb/davinci.c
+@@ -357,12 +357,7 @@ static irqreturn_t davinci_interrupt(int irq, void *__hci)
+
+ spin_unlock_irqrestore(&musb->lock, flags);
+
+- /* REVISIT we sometimes get unhandled IRQs
+- * (e.g. ep0). not clear why...
+- */
+- if (retval != IRQ_HANDLED)
+- DBG(5, "unhandled? %08x\n", tmp);
+- return IRQ_HANDLED;
++ return retval;
+ }
+
+ int musb_platform_set_mode(struct musb *musb, u8 mode)
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index 3019725..a1de43b 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -1481,13 +1481,7 @@ static irqreturn_t generic_interrupt(int irq, void *__hci)
+
+ spin_unlock_irqrestore(&musb->lock, flags);
+
+- /* REVISIT we sometimes get spurious IRQs on g_ep0
+- * not clear why...
+- */
+- if (retval != IRQ_HANDLED)
+- DBG(5, "spurious?\n");
+-
+- return IRQ_HANDLED;
++ return retval;
+ }
+
+ #else
+diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
+index adf1806..f56a56c 100644
+--- a/drivers/usb/musb/musb_core.h
++++ b/drivers/usb/musb/musb_core.h
+@@ -171,7 +171,8 @@ enum musb_h_ep0_state {
+
+ /* peripheral side ep0 states */
+ enum musb_g_ep0_state {
+- MUSB_EP0_STAGE_SETUP, /* idle, waiting for setup */
++ MUSB_EP0_STAGE_IDLE, /* idle, waiting for SETUP */
++ MUSB_EP0_STAGE_SETUP, /* received SETUP */
+ MUSB_EP0_STAGE_TX, /* IN data */
+ MUSB_EP0_STAGE_RX, /* OUT data */
+ MUSB_EP0_STAGE_STATUSIN, /* (after OUT data) */
+diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c
+index 3f5e30d..ec0e899 100644
+--- a/drivers/usb/musb/musb_gadget_ep0.c
++++ b/drivers/usb/musb/musb_gadget_ep0.c
+@@ -4,6 +4,7 @@
+ * Copyright 2005 Mentor Graphics Corporation
+ * Copyright (C) 2005-2006 by Texas Instruments
+ * Copyright (C) 2006-2007 Nokia Corporation
++ * Copyright (C) 2008-2009 MontaVista Software, Inc. <source-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -58,7 +59,8 @@
+ static char *decode_ep0stage(u8 stage)
+ {
+ switch (stage) {
+- case MUSB_EP0_STAGE_SETUP: return "idle";
++ case MUSB_EP0_STAGE_IDLE: return "idle";
++ case MUSB_EP0_STAGE_SETUP: return "setup";
+ case MUSB_EP0_STAGE_TX: return "in";
+ case MUSB_EP0_STAGE_RX: return "out";
+ case MUSB_EP0_STAGE_ACKWAIT: return "wait";
+@@ -628,7 +630,7 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb)
+ musb_writew(regs, MUSB_CSR0,
+ csr & ~MUSB_CSR0_P_SENTSTALL);
+ retval = IRQ_HANDLED;
+- musb->ep0_state = MUSB_EP0_STAGE_SETUP;
++ musb->ep0_state = MUSB_EP0_STAGE_IDLE;
+ csr = musb_readw(regs, MUSB_CSR0);
+ }
+
+@@ -636,7 +638,18 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb)
+ if (csr & MUSB_CSR0_P_SETUPEND) {
+ musb_writew(regs, MUSB_CSR0, MUSB_CSR0_P_SVDSETUPEND);
+ retval = IRQ_HANDLED;
+- musb->ep0_state = MUSB_EP0_STAGE_SETUP;
++ /* Transition into the early status phase */
++ switch (musb->ep0_state) {
++ case MUSB_EP0_STAGE_TX:
++ musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT;
++ break;
++ case MUSB_EP0_STAGE_RX:
++ musb->ep0_state = MUSB_EP0_STAGE_STATUSIN;
++ break;
++ default:
++ ERR("SetupEnd came in a wrong ep0stage %s",
++ decode_ep0stage(musb->ep0_state));
++ }
+ csr = musb_readw(regs, MUSB_CSR0);
+ /* NOTE: request may need completion */
+ }
+@@ -697,11 +710,31 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb)
+ if (req)
+ musb_g_ep0_giveback(musb, req);
+ }
++
++ /*
++ * In case when several interrupts can get coalesced,
++ * check to see if we've already received a SETUP packet...
++ */
++ if (csr & MUSB_CSR0_RXPKTRDY)
++ goto setup;
++
++ retval = IRQ_HANDLED;
++ musb->ep0_state = MUSB_EP0_STAGE_IDLE;
++ break;
++
++ case MUSB_EP0_STAGE_IDLE:
++ /*
++ * This state is typically (but not always) indiscernible
++ * from the status states since the corresponding interrupts
++ * tend to happen within too little period of time (with only
++ * a zero-length packet in between) and so get coalesced...
++ */
+ retval = IRQ_HANDLED;
+ musb->ep0_state = MUSB_EP0_STAGE_SETUP;
+ /* FALLTHROUGH */
+
+ case MUSB_EP0_STAGE_SETUP:
++setup:
+ if (csr & MUSB_CSR0_RXPKTRDY) {
+ struct usb_ctrlrequest setup;
+ int handled = 0;
+@@ -783,7 +816,7 @@ irqreturn_t musb_g_ep0_irq(struct musb *musb)
+ stall:
+ DBG(3, "stall (%d)\n", handled);
+ musb->ackpend |= MUSB_CSR0_P_SENDSTALL;
+- musb->ep0_state = MUSB_EP0_STAGE_SETUP;
++ musb->ep0_state = MUSB_EP0_STAGE_IDLE;
+ finish:
+ musb_writew(regs, MUSB_CSR0,
+ musb->ackpend);
+@@ -803,7 +836,7 @@ finish:
+ /* "can't happen" */
+ WARN_ON(1);
+ musb_writew(regs, MUSB_CSR0, MUSB_CSR0_P_SENDSTALL);
+- musb->ep0_state = MUSB_EP0_STAGE_SETUP;
++ musb->ep0_state = MUSB_EP0_STAGE_IDLE;
+ break;
+ }
+
+@@ -959,7 +992,7 @@ static int musb_g_ep0_halt(struct usb_ep *e, int value)
+
+ csr |= MUSB_CSR0_P_SENDSTALL;
+ musb_writew(regs, MUSB_CSR0, csr);
+- musb->ep0_state = MUSB_EP0_STAGE_SETUP;
++ musb->ep0_state = MUSB_EP0_STAGE_IDLE;
+ musb->ackpend = 0;
+ break;
+ default:
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0016-musb_host-factor-out-musb_ep_-get-set-_qh.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0016-musb_host-factor-out-musb_ep_-get-set-_qh.patch
new file mode 100644
index 0000000000..a2f54ff47b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0016-musb_host-factor-out-musb_ep_-get-set-_qh.patch
@@ -0,0 +1,146 @@
+From f9ca8154cf395ec00129f12016697ef610a826ff Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:55:16 -0700
+Subject: [PATCH] musb_host: factor out musb_ep_{get|set}_qh()
+
+Factor out the often used code to get/set the active 'qh'
+pointer for the hardware endpoint. Change the way the case
+of a shared FIFO is handled by setting *both* 'in_qh' and
+'out_qh' fields of 'struct musb_hw_ep'. That seems more
+consistent and makes getting to the current 'qh' easy when
+the code knows the direction beforehand.
+
+While at it, turn some assignments into intializers and
+fix declaration style in the vicinity.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 56 ++++++++++++++++-------------------------
+ 1 files changed, 22 insertions(+), 34 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index dc32ce4..bc89079 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -178,6 +178,19 @@ static inline void cppi_host_txdma_start(struct musb_hw_ep *ep)
+ musb_writew(ep->regs, MUSB_TXCSR, txcsr);
+ }
+
++static void musb_ep_set_qh(struct musb_hw_ep *ep, int is_in, struct musb_qh *qh)
++{
++ if (is_in != 0 || ep->is_shared_fifo)
++ ep->in_qh = qh;
++ if (is_in == 0 || ep->is_shared_fifo)
++ ep->out_qh = qh;
++}
++
++static struct musb_qh *musb_ep_get_qh(struct musb_hw_ep *ep, int is_in)
++{
++ return is_in ? ep->in_qh : ep->out_qh;
++}
++
+ /*
+ * Start the URB at the front of an endpoint's queue
+ * end must be claimed from the caller.
+@@ -207,7 +220,6 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ case USB_ENDPOINT_XFER_CONTROL:
+ /* control transfers always start with SETUP */
+ is_in = 0;
+- hw_ep->out_qh = qh;
+ musb->ep0_stage = MUSB_EP0_START;
+ buf = urb->setup_packet;
+ len = 8;
+@@ -236,10 +248,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
+ epnum, buf + offset, len);
+
+ /* Configure endpoint */
+- if (is_in || hw_ep->is_shared_fifo)
+- hw_ep->in_qh = qh;
+- else
+- hw_ep->out_qh = qh;
++ musb_ep_set_qh(hw_ep, is_in, qh);
+ musb_ep_program(musb, epnum, urb, !is_in, buf, offset, len);
+
+ /* transmit may have more work: start it when it is time */
+@@ -374,11 +383,8 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
+ else
+ ep->tx_reinit = 1;
+
+- /* clobber old pointers to this qh */
+- if (is_in || ep->is_shared_fifo)
+- ep->in_qh = NULL;
+- else
+- ep->out_qh = NULL;
++ /* Clobber old pointers to this qh */
++ musb_ep_set_qh(ep, is_in, NULL);
+ qh->hep->hcpriv = NULL;
+
+ switch (qh->type) {
+@@ -421,12 +427,7 @@ static void
+ musb_advance_schedule(struct musb *musb, struct urb *urb,
+ struct musb_hw_ep *hw_ep, int is_in)
+ {
+- struct musb_qh *qh;
+-
+- if (is_in || hw_ep->is_shared_fifo)
+- qh = hw_ep->in_qh;
+- else
+- qh = hw_ep->out_qh;
++ struct musb_qh *qh = musb_ep_get_qh(hw_ep, is_in);
+
+ if (urb->status == -EINPROGRESS)
+ qh = musb_giveback(qh, urb, 0);
+@@ -689,15 +690,8 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
+ void __iomem *mbase = musb->mregs;
+ struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
+ void __iomem *epio = hw_ep->regs;
+- struct musb_qh *qh;
+- u16 packet_sz;
+-
+- if (!is_out || hw_ep->is_shared_fifo)
+- qh = hw_ep->in_qh;
+- else
+- qh = hw_ep->out_qh;
+-
+- packet_sz = qh->maxpacket;
++ struct musb_qh *qh = musb_ep_get_qh(hw_ep, !is_out);
++ u16 packet_sz = qh->maxpacket;
+
+ DBG(3, "%s hw%d urb %p spd%d dev%d ep%d%s "
+ "h_addr%02x h_port%02x bytes %d\n",
+@@ -1114,17 +1108,14 @@ void musb_host_tx(struct musb *musb, u8 epnum)
+ u16 tx_csr;
+ size_t length = 0;
+ size_t offset = 0;
+- struct urb *urb;
+ struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
+ void __iomem *epio = hw_ep->regs;
+- struct musb_qh *qh = hw_ep->is_shared_fifo ? hw_ep->in_qh
+- : hw_ep->out_qh;
++ struct musb_qh *qh = hw_ep->out_qh;
++ struct urb *urb = next_urb(qh);
+ u32 status = 0;
+ void __iomem *mbase = musb->mregs;
+ struct dma_channel *dma;
+
+- urb = next_urb(qh);
+-
+ musb_ep_select(mbase, epnum);
+ tx_csr = musb_readw(epio, MUSB_TXCSR);
+
+@@ -1741,10 +1732,7 @@ static int musb_schedule(
+ epnum++, hw_ep++) {
+ int diff;
+
+- if (is_in || hw_ep->is_shared_fifo) {
+- if (hw_ep->in_qh != NULL)
+- continue;
+- } else if (hw_ep->out_qh != NULL)
++ if (musb_ep_get_qh(hw_ep, is_in) != NULL)
+ continue;
+
+ if (hw_ep == musb->bulk_ep)
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0017-musb_host-refactor-URB-giveback.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0017-musb_host-refactor-URB-giveback.patch
new file mode 100644
index 0000000000..4a520dff87
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0017-musb_host-refactor-URB-giveback.patch
@@ -0,0 +1,132 @@
+From 013056a09afd324e729d64b9a0e66a004604e1d6 Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:58:31 -0700
+Subject: [PATCH] musb_host: refactor URB giveback
+
+As musb_advance_schedule() is now the only remaning
+caller of musb_giveback() (and the only valid context
+of such call), just fold the latter into the former
+and then rename __musb_giveback() into musb_giveback().
+
+This is a net minor shrink.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 54 +++++++++++++++--------------------------
+ 1 files changed, 20 insertions(+), 34 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index bc89079..e833959 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -292,9 +292,8 @@ start:
+ }
+ }
+
+-/* caller owns controller lock, irqs are blocked */
+-static void
+-__musb_giveback(struct musb *musb, struct urb *urb, int status)
++/* Context: caller owns controller lock, IRQs are blocked */
++static void musb_giveback(struct musb *musb, struct urb *urb, int status)
+ __releases(musb->lock)
+ __acquires(musb->lock)
+ {
+@@ -347,14 +346,22 @@ static inline void musb_save_toggle(struct musb_qh *qh, int is_in,
+ usb_settoggle(urb->dev, qh->epnum, !is_in, csr ? 1 : 0);
+ }
+
+-/* caller owns controller lock, irqs are blocked */
+-static struct musb_qh *
+-musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
++/*
++ * Advance this hardware endpoint's queue, completing the specified URB and
++ * advancing to either the next URB queued to that qh, or else invalidating
++ * that qh and advancing to the next qh scheduled after the current one.
++ *
++ * Context: caller owns controller lock, IRQs are blocked
++ */
++static void musb_advance_schedule(struct musb *musb, struct urb *urb,
++ struct musb_hw_ep *hw_ep, int is_in)
+ {
++ struct musb_qh *qh = musb_ep_get_qh(hw_ep, is_in);
+ struct musb_hw_ep *ep = qh->hw_ep;
+- struct musb *musb = ep->musb;
+- int is_in = usb_pipein(urb->pipe);
+ int ready = qh->is_ready;
++ int status;
++
++ status = (urb->status == -EINPROGRESS) ? 0 : urb->status;
+
+ /* save toggle eagerly, for paranoia */
+ switch (qh->type) {
+@@ -363,13 +370,13 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
+ musb_save_toggle(qh, is_in, urb);
+ break;
+ case USB_ENDPOINT_XFER_ISOC:
+- if (status == 0 && urb->error_count)
++ if (urb->error_count)
+ status = -EXDEV;
+ break;
+ }
+
+ qh->is_ready = 0;
+- __musb_giveback(musb, urb, status);
++ musb_giveback(musb, urb, status);
+ qh->is_ready = ready;
+
+ /* reclaim resources (and bandwidth) ASAP; deschedule it, and
+@@ -413,31 +420,10 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
+ break;
+ }
+ }
+- return qh;
+-}
+-
+-/*
+- * Advance this hardware endpoint's queue, completing the specified urb and
+- * advancing to either the next urb queued to that qh, or else invalidating
+- * that qh and advancing to the next qh scheduled after the current one.
+- *
+- * Context: caller owns controller lock, irqs are blocked
+- */
+-static void
+-musb_advance_schedule(struct musb *musb, struct urb *urb,
+- struct musb_hw_ep *hw_ep, int is_in)
+-{
+- struct musb_qh *qh = musb_ep_get_qh(hw_ep, is_in);
+-
+- if (urb->status == -EINPROGRESS)
+- qh = musb_giveback(qh, urb, 0);
+- else
+- qh = musb_giveback(qh, urb, urb->status);
+
+ if (qh != NULL && qh->is_ready) {
+ DBG(4, "... next ep%d %cX urb %p\n",
+- hw_ep->epnum, is_in ? 'R' : 'T',
+- next_urb(qh));
++ hw_ep->epnum, is_in ? 'R' : 'T', next_urb(qh));
+ musb_start_urb(musb, is_in, qh);
+ }
+ }
+@@ -2080,7 +2066,7 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+
+ ret = 0;
+ qh->is_ready = 0;
+- __musb_giveback(musb, urb, 0);
++ musb_giveback(musb, urb, 0);
+ qh->is_ready = ready;
+
+ /* If nothing else (usually musb_giveback) is using it
+@@ -2164,7 +2150,7 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
+ * will activate any of these as it advances.
+ */
+ while (!list_empty(&hep->urb_list))
+- __musb_giveback(musb, next_urb(qh), -ESHUTDOWN);
++ musb_giveback(musb, next_urb(qh), -ESHUTDOWN);
+
+ hep->hcpriv = NULL;
+ list_del(&qh->ring);
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0018-musb-split-out-CPPI-interrupt-handler.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0018-musb-split-out-CPPI-interrupt-handler.patch
new file mode 100644
index 0000000000..bf3d6e7021
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0018-musb-split-out-CPPI-interrupt-handler.patch
@@ -0,0 +1,167 @@
+From b91b067c531c9322f3719951b07303e790b13475 Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:59:46 -0700
+Subject: [PATCH] musb: split out CPPI interrupt handler
+
+As DaVinci DM646x has a dedicated CPPI DMA interrupt, replace
+cppi_completion() (which has always been kind of layering
+violation) by a complete CPPI interrupt handler.
+
+[ dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org: only cppi_dma.c needs platform
+device header, not cppi_dma.h ]
+
+Signed-off-by: Dmitry Krivoschekov <dkrivoschekov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/cppi_dma.c | 34 +++++++++++++++++++++++++++++++---
+ drivers/usb/musb/cppi_dma.h | 6 ++++--
+ drivers/usb/musb/davinci.c | 14 ++++----------
+ 3 files changed, 39 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
+index ac7227c..6ff3c67 100644
+--- a/drivers/usb/musb/cppi_dma.c
++++ b/drivers/usb/musb/cppi_dma.c
+@@ -6,6 +6,7 @@
+ * The TUSB6020, using VLYNQ, has CPPI that looks much like DaVinci.
+ */
+
++#include <linux/platform_device.h>
+ #include <linux/usb.h>
+
+ #include "musb_core.h"
+@@ -1145,17 +1146,27 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch)
+ return completed;
+ }
+
+-void cppi_completion(struct musb *musb, u32 rx, u32 tx)
++irqreturn_t cppi_interrupt(int irq, void *dev_id)
+ {
+- void __iomem *tibase;
+- int i, index;
++ struct musb *musb = dev_id;
+ struct cppi *cppi;
++ void __iomem *tibase;
+ struct musb_hw_ep *hw_ep = NULL;
++ u32 rx, tx;
++ int i, index;
+
+ cppi = container_of(musb->dma_controller, struct cppi, controller);
+
+ tibase = musb->ctrl_base;
+
++ tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG);
++ rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG);
++
++ if (!tx && !rx)
++ return IRQ_NONE;
++
++ DBG(4, "CPPI IRQ Tx%x Rx%x\n", tx, rx);
++
+ /* process TX channels */
+ for (index = 0; tx; tx = tx >> 1, index++) {
+ struct cppi_channel *tx_ch;
+@@ -1293,6 +1304,8 @@ void cppi_completion(struct musb *musb, u32 rx, u32 tx)
+
+ /* write to CPPI EOI register to re-enable interrupts */
+ musb_writel(tibase, DAVINCI_CPPI_EOI_REG, 0);
++
++ return IRQ_HANDLED;
+ }
+
+ /* Instantiate a software object representing a DMA controller. */
+@@ -1300,6 +1313,9 @@ struct dma_controller *__init
+ dma_controller_create(struct musb *musb, void __iomem *mregs)
+ {
+ struct cppi *controller;
++ struct device *dev = musb->controller;
++ struct platform_device *pdev = to_platform_device(dev);
++ int irq = platform_get_irq(pdev, 1);
+
+ controller = kzalloc(sizeof *controller, GFP_KERNEL);
+ if (!controller)
+@@ -1330,6 +1346,15 @@ dma_controller_create(struct musb *musb, void __iomem *mregs)
+ return NULL;
+ }
+
++ if (irq > 0) {
++ if (request_irq(irq, cppi_interrupt, 0, "cppi-dma", musb)) {
++ dev_err(dev, "request_irq %d failed!\n", irq);
++ dma_controller_destroy(&controller->controller);
++ return NULL;
++ }
++ controller->irq = irq;
++ }
++
+ return &controller->controller;
+ }
+
+@@ -1342,6 +1367,9 @@ void dma_controller_destroy(struct dma_controller *c)
+
+ cppi = container_of(c, struct cppi, controller);
+
++ if (cppi->irq)
++ free_irq(cppi->irq, cppi->musb);
++
+ /* assert: caller stopped the controller first */
+ dma_pool_destroy(cppi->pool);
+
+diff --git a/drivers/usb/musb/cppi_dma.h b/drivers/usb/musb/cppi_dma.h
+index 729b407..8a39de3 100644
+--- a/drivers/usb/musb/cppi_dma.h
++++ b/drivers/usb/musb/cppi_dma.h
+@@ -119,6 +119,8 @@ struct cppi {
+ void __iomem *mregs; /* Mentor regs */
+ void __iomem *tibase; /* TI/CPPI regs */
+
++ int irq;
++
+ struct cppi_channel tx[4];
+ struct cppi_channel rx[4];
+
+@@ -127,7 +129,7 @@ struct cppi {
+ struct list_head tx_complete;
+ };
+
+-/* irq handling hook */
+-extern void cppi_completion(struct musb *, u32 rx, u32 tx);
++/* CPPI IRQ handler */
++extern irqreturn_t cppi_interrupt(int, void *);
+
+ #endif /* end of ifndef _CPPI_DMA_H_ */
+diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
+index 399c435..9fd74bf 100644
+--- a/drivers/usb/musb/davinci.c
++++ b/drivers/usb/musb/davinci.c
+@@ -250,6 +250,7 @@ static irqreturn_t davinci_interrupt(int irq, void *__hci)
+ irqreturn_t retval = IRQ_NONE;
+ struct musb *musb = __hci;
+ void __iomem *tibase = musb->ctrl_base;
++ struct cppi *cppi;
+ u32 tmp;
+
+ spin_lock_irqsave(&musb->lock, flags);
+@@ -266,16 +267,9 @@ static irqreturn_t davinci_interrupt(int irq, void *__hci)
+ /* CPPI interrupts share the same IRQ line, but have their own
+ * mask, state, "vector", and EOI registers.
+ */
+- if (is_cppi_enabled()) {
+- u32 cppi_tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG);
+- u32 cppi_rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG);
+-
+- if (cppi_tx || cppi_rx) {
+- DBG(4, "CPPI IRQ t%x r%x\n", cppi_tx, cppi_rx);
+- cppi_completion(musb, cppi_rx, cppi_tx);
+- retval = IRQ_HANDLED;
+- }
+- }
++ cppi = container_of(musb->dma_controller, struct cppi, controller);
++ if (is_cppi_enabled() && musb->dma_controller && !cppi->irq)
++ retval = cppi_interrupt(irq, __hci);
+
+ /* ack and handle non-CPPI interrupts */
+ tmp = musb_readl(tibase, DAVINCI_USB_INT_SRC_MASKED_REG);
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0019-musb_host-simplify-check-for-active-URB.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0019-musb_host-simplify-check-for-active-URB.patch
new file mode 100644
index 0000000000..c0e57155c8
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0019-musb_host-simplify-check-for-active-URB.patch
@@ -0,0 +1,158 @@
+From 69242ddd26151d45f46011cf7abc581b14699fb2 Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:56:26 -0700
+Subject: [PATCH] musb_host: simplify check for active URB
+
+The existance of the scheduling list shouldn't matter in
+determining whether there's currectly an URB executing on a
+hardware endpoint. What should actually matter is the 'in_qh'
+or 'out_qh' fields of the 'struct musb_hw_ep' -- those are
+set in musb_start_urb() and cleared in musb_giveback() when
+the endpoint's URB list drains. Hence we should be able to
+replace the big *switch* statements in musb_urb_dequeue()
+and musb_h_disable() with mere musb_ep_get_qh() calls...
+
+While at it, do some more changes:
+
+ - add 'is_in' variable to musb_urb_dequeue();
+
+ - remove the unnecessary 'epnum' variable from musb_h_disable();
+
+ - fix the comment style in the vicinity.
+
+This is a minor shrink of source and object code.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 72 ++++++++---------------------------------
+ 1 files changed, 14 insertions(+), 58 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index e833959..e121e0e 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -2008,14 +2008,14 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+ {
+ struct musb *musb = hcd_to_musb(hcd);
+ struct musb_qh *qh;
+- struct list_head *sched;
+ unsigned long flags;
++ int is_in = usb_pipein(urb->pipe);
+ int ret;
+
+ DBG(4, "urb=%p, dev%d ep%d%s\n", urb,
+ usb_pipedevice(urb->pipe),
+ usb_pipeendpoint(urb->pipe),
+- usb_pipein(urb->pipe) ? "in" : "out");
++ is_in ? "in" : "out");
+
+ spin_lock_irqsave(&musb->lock, flags);
+ ret = usb_hcd_check_unlink_urb(hcd, urb, status);
+@@ -2026,45 +2026,23 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+ if (!qh)
+ goto done;
+
+- /* Any URB not actively programmed into endpoint hardware can be
++ /*
++ * Any URB not actively programmed into endpoint hardware can be
+ * immediately given back; that's any URB not at the head of an
+ * endpoint queue, unless someday we get real DMA queues. And even
+ * if it's at the head, it might not be known to the hardware...
+ *
+- * Otherwise abort current transfer, pending dma, etc.; urb->status
++ * Otherwise abort current transfer, pending DMA, etc.; urb->status
+ * has already been updated. This is a synchronous abort; it'd be
+ * OK to hold off until after some IRQ, though.
++ *
++ * NOTE: qh is invalid unless !list_empty(&hep->urb_list)
+ */
+- if (!qh->is_ready || urb->urb_list.prev != &qh->hep->urb_list)
+- ret = -EINPROGRESS;
+- else {
+- switch (qh->type) {
+- case USB_ENDPOINT_XFER_CONTROL:
+- sched = &musb->control;
+- break;
+- case USB_ENDPOINT_XFER_BULK:
+- if (qh->mux == 1) {
+- if (usb_pipein(urb->pipe))
+- sched = &musb->in_bulk;
+- else
+- sched = &musb->out_bulk;
+- break;
+- }
+- default:
+- /* REVISIT when we get a schedule tree, periodic
+- * transfers won't always be at the head of a
+- * singleton queue...
+- */
+- sched = NULL;
+- break;
+- }
+- }
+-
+- /* NOTE: qh is invalid unless !list_empty(&hep->urb_list) */
+- if (ret < 0 || (sched && qh != first_qh(sched))) {
++ if (!qh->is_ready
++ || urb->urb_list.prev != &qh->hep->urb_list
++ || musb_ep_get_qh(qh->hw_ep, is_in) != qh) {
+ int ready = qh->is_ready;
+
+- ret = 0;
+ qh->is_ready = 0;
+ musb_giveback(musb, urb, 0);
+ qh->is_ready = ready;
+@@ -2088,13 +2066,11 @@ done:
+ static void
+ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
+ {
+- u8 epnum = hep->desc.bEndpointAddress;
++ u8 is_in = hep->desc.bEndpointAddress & USB_DIR_IN;
+ unsigned long flags;
+ struct musb *musb = hcd_to_musb(hcd);
+- u8 is_in = epnum & USB_DIR_IN;
+ struct musb_qh *qh;
+ struct urb *urb;
+- struct list_head *sched;
+
+ spin_lock_irqsave(&musb->lock, flags);
+
+@@ -2102,31 +2078,11 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
+ if (qh == NULL)
+ goto exit;
+
+- switch (qh->type) {
+- case USB_ENDPOINT_XFER_CONTROL:
+- sched = &musb->control;
+- break;
+- case USB_ENDPOINT_XFER_BULK:
+- if (qh->mux == 1) {
+- if (is_in)
+- sched = &musb->in_bulk;
+- else
+- sched = &musb->out_bulk;
+- break;
+- }
+- default:
+- /* REVISIT when we get a schedule tree, periodic transfers
+- * won't always be at the head of a singleton queue...
+- */
+- sched = NULL;
+- break;
+- }
+-
+- /* NOTE: qh is invalid unless !list_empty(&hep->urb_list) */
++ /* NOTE: qh is invalid unless !list_empty(&hep->urb_list) */
+
+- /* kick first urb off the hardware, if needed */
++ /* Kick the first URB off the hardware, if needed */
+ qh->is_ready = 0;
+- if (!sched || qh == first_qh(sched)) {
++ if (musb_ep_get_qh(qh->hw_ep, is_in) == qh) {
+ urb = next_urb(qh);
+
+ /* make software (then hardware) stop ASAP */
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0020-musb_host-streamline-musb_cleanup_urb-calls.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0020-musb_host-streamline-musb_cleanup_urb-calls.patch
new file mode 100644
index 0000000000..d89eaadd61
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0020-musb_host-streamline-musb_cleanup_urb-calls.patch
@@ -0,0 +1,58 @@
+From d408894fa4263440ed8a9e68566bacea7e6f6bed Mon Sep 17 00:00:00 2001
+From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Date: Fri, 27 Mar 2009 12:57:50 -0700
+Subject: [PATCH] musb_host: streamline musb_cleanup_urb() calls
+
+The argument for the 'is_in' parameter of musb_cleanup_urb()
+is always extracted from an URB that's passed to the function.
+So that parameter is superfluous; remove it.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_host.c | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index e121e0e..71e835e 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -1950,14 +1950,15 @@ done:
+ * called with controller locked, irqs blocked
+ * that hardware queue advances to the next transfer, unless prevented
+ */
+-static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh, int is_in)
++static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh)
+ {
+ struct musb_hw_ep *ep = qh->hw_ep;
+ void __iomem *epio = ep->regs;
+ unsigned hw_end = ep->epnum;
+ void __iomem *regs = ep->musb->mregs;
+- u16 csr;
++ int is_in = usb_pipein(urb->pipe);
+ int status = 0;
++ u16 csr;
+
+ musb_ep_select(regs, hw_end);
+
+@@ -2056,7 +2057,7 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+ kfree(qh);
+ }
+ } else
+- ret = musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
++ ret = musb_cleanup_urb(urb, qh);
+ done:
+ spin_unlock_irqrestore(&musb->lock, flags);
+ return ret;
+@@ -2090,7 +2091,7 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
+ urb->status = -ESHUTDOWN;
+
+ /* cleanup */
+- musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
++ musb_cleanup_urb(urb, qh);
+
+ /* Then nuke all the others ... and advance the
+ * queue on hw_ep (e.g. bulk ring) when we're done.
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0021-twl4030-usb-fix-minor-reporting-goofage.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0021-twl4030-usb-fix-minor-reporting-goofage.patch
new file mode 100644
index 0000000000..d9733f92b0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0021-twl4030-usb-fix-minor-reporting-goofage.patch
@@ -0,0 +1,70 @@
+From c4804e5a447275553c55bbb0ab1748954cb8fbfc Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Tue, 31 Mar 2009 12:26:10 -0700
+Subject: [PATCH] twl4030-usb: fix minor reporting goofage
+
+Fix a reporting glitch in the twl4030 USB transceiver code.
+It wasn't properly distinguishing the two types of active
+USB link: ID grounded, vs not. In the current code that
+distinction doesn't much matter; in the future this bugfix
+should help support better USB controller communications.
+
+Provide a comment sorting out some of the cryptic bits of
+the manual: different sections use different names for
+key signals, and the register definitions don't help much
+without the explanations and diagrams.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/otg/twl4030-usb.c | 26 +++++++++++++++++++-------
+ 1 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
+index d9478d0..f740390 100644
+--- a/drivers/usb/otg/twl4030-usb.c
++++ b/drivers/usb/otg/twl4030-usb.c
+@@ -217,6 +217,7 @@
+
+ /* In module TWL4030_MODULE_PM_MASTER */
+ #define PROTECT_KEY 0x0E
++#define STS_HW_CONDITIONS 0x0F
+
+ /* In module TWL4030_MODULE_PM_RECEIVER */
+ #define VUSB_DEDICATED1 0x7D
+@@ -351,15 +352,26 @@ static enum linkstat twl4030_usb_linkstat(struct twl4030_usb *twl)
+ int status;
+ int linkstat = USB_LINK_UNKNOWN;
+
+- /* STS_HW_CONDITIONS */
+- status = twl4030_readb(twl, TWL4030_MODULE_PM_MASTER, 0x0f);
++ /*
++ * For ID/VBUS sensing, see manual section 15.4.8 ...
++ * except when using only battery backup power, two
++ * comparators produce VBUS_PRES and ID_PRES signals,
++ * which don't match docs elsewhere. But ... BIT(7)
++ * and BIT(2) of STS_HW_CONDITIONS, respectively, do
++ * seem to match up. If either is true the USB_PRES
++ * signal is active, the OTG module is activated, and
++ * its interrupt may be raised (may wake the system).
++ */
++ status = twl4030_readb(twl, TWL4030_MODULE_PM_MASTER,
++ STS_HW_CONDITIONS);
+ if (status < 0)
+ dev_err(twl->dev, "USB link status err %d\n", status);
+- else if (status & BIT(7))
+- linkstat = USB_LINK_VBUS;
+- else if (status & BIT(2))
+- linkstat = USB_LINK_ID;
+- else
++ else if (status & (BIT(7) | BIT(2))) {
++ if (status & BIT(2))
++ linkstat = USB_LINK_ID;
++ else
++ linkstat = USB_LINK_VBUS;
++ } else
+ linkstat = USB_LINK_NONE;
+
+ dev_dbg(twl->dev, "HW_CONDITIONS 0x%02x/%d; link %d\n",
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch
new file mode 100644
index 0000000000..16b5b9908b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch
@@ -0,0 +1,38 @@
+From ba59a0812ba0e223bd0af8f4dea6c971b6289696 Mon Sep 17 00:00:00 2001
+From: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
+Date: Thu, 2 Apr 2009 12:07:08 -0700
+Subject: [PATCH] musb: use dma mode 1 for TX if transfer size equals maxpacket (v2)
+
+Currently, with Inventra DMA, we use Mode 0 if transfer size is less
+than or equal to the endpoint's maxpacket size. This requires that
+we explicitly set TXPKTRDY for that transfer.
+
+However the musb_g_tx code will not set TXPKTRDY twice if the last
+transfer is exactly equal to maxpacket, even if request->zero is set.
+Using Mode 1 will solve this; a better fix might be in musb_g_tx().
+
+Without this change, musb will not correctly send out a ZLP if the
+last transfer is the maxpacket size and request->zero is set.
+
+Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_gadget.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index bc197b2..e8f920c 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -310,7 +310,7 @@ static void txstate(struct musb *musb, struct musb_request *req)
+ /* setup DMA, then program endpoint CSR */
+ request_size = min(request->length,
+ musb_ep->dma->max_len);
+- if (request_size <= musb_ep->packet_sz)
++ if (request_size < musb_ep->packet_sz)
+ musb_ep->dma->desired_mode = 0;
+ else
+ musb_ep->dma->desired_mode = 1;
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0023-musb-add-high-bandwidth-ISO-support.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0023-musb-add-high-bandwidth-ISO-support.patch
new file mode 100644
index 0000000000..3038dd171d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0023-musb-add-high-bandwidth-ISO-support.patch
@@ -0,0 +1,187 @@
+From 2e049a88b729ae2fdc0ecdabad1857810bd62737 Mon Sep 17 00:00:00 2001
+From: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
+Date: Fri, 3 Apr 2009 16:16:17 -0700
+Subject: [PATCH] musb: add high bandwidth ISO support
+
+Tested on OMAP3 host side with Creative (Live! Cam Optia) USB camera
+which uses high bandwidth isochronous IN endpoints. FIFO mode 4 is
+updated to provide the needed 4K endpoint buffer without breaking
+the g_nokia composite gadget configuration. (This is the only
+gadget driver known to use enough endpoints to notice the change.)
+
+Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.c | 19 ++++++++---------
+ drivers/usb/musb/musb_core.h | 3 ++
+ drivers/usb/musb/musb_host.c | 47 +++++++++++++++++++++++++++++++----------
+ drivers/usb/musb/musb_host.h | 1 +
+ 4 files changed, 48 insertions(+), 22 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index a1de43b..d953305 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -1068,14 +1068,13 @@ static struct fifo_cfg __initdata mode_4_cfg[] = {
+ { .hw_ep_num = 8, .style = FIFO_RX, .maxpacket = 512, },
+ { .hw_ep_num = 9, .style = FIFO_TX, .maxpacket = 512, },
+ { .hw_ep_num = 9, .style = FIFO_RX, .maxpacket = 512, },
+-{ .hw_ep_num = 10, .style = FIFO_TX, .maxpacket = 512, },
+-{ .hw_ep_num = 10, .style = FIFO_RX, .maxpacket = 512, },
+-{ .hw_ep_num = 11, .style = FIFO_TX, .maxpacket = 512, },
+-{ .hw_ep_num = 11, .style = FIFO_RX, .maxpacket = 512, },
+-{ .hw_ep_num = 12, .style = FIFO_TX, .maxpacket = 512, },
+-{ .hw_ep_num = 12, .style = FIFO_RX, .maxpacket = 512, },
+-{ .hw_ep_num = 13, .style = FIFO_TX, .maxpacket = 512, },
+-{ .hw_ep_num = 13, .style = FIFO_RX, .maxpacket = 512, },
++{ .hw_ep_num = 10, .style = FIFO_TX, .maxpacket = 256, },
++{ .hw_ep_num = 10, .style = FIFO_RX, .maxpacket = 64, },
++{ .hw_ep_num = 11, .style = FIFO_TX, .maxpacket = 256, },
++{ .hw_ep_num = 11, .style = FIFO_RX, .maxpacket = 64, },
++{ .hw_ep_num = 12, .style = FIFO_TX, .maxpacket = 256, },
++{ .hw_ep_num = 12, .style = FIFO_RX, .maxpacket = 64, },
++{ .hw_ep_num = 13, .style = FIFO_RXTX, .maxpacket = 4096, },
+ { .hw_ep_num = 14, .style = FIFO_RXTX, .maxpacket = 1024, },
+ { .hw_ep_num = 15, .style = FIFO_RXTX, .maxpacket = 1024, },
+ };
+@@ -1335,11 +1334,11 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
+ }
+ if (reg & MUSB_CONFIGDATA_HBRXE) {
+ strcat(aInfo, ", HB-ISO Rx");
+- strcat(aInfo, " (X)"); /* no driver support */
++ musb->hb_iso_rx = true;
+ }
+ if (reg & MUSB_CONFIGDATA_HBTXE) {
+ strcat(aInfo, ", HB-ISO Tx");
+- strcat(aInfo, " (X)"); /* no driver support */
++ musb->hb_iso_tx = true;
+ }
+ if (reg & MUSB_CONFIGDATA_SOFTCONE)
+ strcat(aInfo, ", SoftConn");
+diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
+index f56a56c..0ac4faf 100644
+--- a/drivers/usb/musb/musb_core.h
++++ b/drivers/usb/musb/musb_core.h
+@@ -387,6 +387,9 @@ struct musb {
+ unsigned is_multipoint:1;
+ unsigned ignore_disconnect:1; /* during bus resets */
+
++ unsigned hb_iso_rx:1; /* high bandwidth iso rx? */
++ unsigned hb_iso_tx:1; /* high bandwidth iso tx? */
++
+ #ifdef C_MP_TX
+ unsigned bulk_split:1;
+ #define can_bulk_split(musb,type) \
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index 71e835e..ece5122 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -602,7 +602,8 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
+ musb_writeb(ep->regs, MUSB_RXTYPE, qh->type_reg);
+ musb_writeb(ep->regs, MUSB_RXINTERVAL, qh->intv_reg);
+ /* NOTE: bulk combining rewrites high bits of maxpacket */
+- musb_writew(ep->regs, MUSB_RXMAXP, qh->maxpacket);
++ musb_writew(ep->regs, MUSB_RXMAXP,
++ qh->maxpacket | ((qh->hb_mult - 1) << 11));
+
+ ep->rx_reinit = 0;
+ }
+@@ -624,9 +625,10 @@ static bool musb_tx_dma_program(struct dma_controller *dma,
+ csr = musb_readw(epio, MUSB_TXCSR);
+ if (length > pkt_size) {
+ mode = 1;
+- csr |= MUSB_TXCSR_AUTOSET
+- | MUSB_TXCSR_DMAMODE
+- | MUSB_TXCSR_DMAENAB;
++ csr |= MUSB_TXCSR_DMAMODE | MUSB_TXCSR_DMAENAB;
++ /* autoset shouldn't be set in high bandwidth */
++ if (qh->hb_mult == 1)
++ csr |= MUSB_TXCSR_AUTOSET;
+ } else {
+ mode = 0;
+ csr &= ~(MUSB_TXCSR_AUTOSET | MUSB_TXCSR_DMAMODE);
+@@ -1432,6 +1434,10 @@ void musb_host_rx(struct musb *musb, u8 epnum)
+ /* packet error reported later */
+ iso_err = true;
+ }
++ } else if (rx_csr & MUSB_RXCSR_INCOMPRX) {
++ DBG(3, "end %d high bandwidth incomplete ISO packet RX\n",
++ epnum);
++ status = -EPROTO;
+ }
+
+ /* faults abort the transfer */
+@@ -1639,7 +1645,11 @@ void musb_host_rx(struct musb *musb, u8 epnum)
+ val &= ~MUSB_RXCSR_H_AUTOREQ;
+ else
+ val |= MUSB_RXCSR_H_AUTOREQ;
+- val |= MUSB_RXCSR_AUTOCLEAR | MUSB_RXCSR_DMAENAB;
++ val |= MUSB_RXCSR_DMAENAB;
++
++ /* autoclear shouldn't be set in high bandwidth */
++ if (qh->hb_mult == 1)
++ val |= MUSB_RXCSR_AUTOCLEAR;
+
+ musb_writew(epio, MUSB_RXCSR,
+ MUSB_RXCSR_H_WZC_BITS | val);
+@@ -1725,9 +1735,10 @@ static int musb_schedule(
+ continue;
+
+ if (is_in)
+- diff = hw_ep->max_packet_sz_rx - qh->maxpacket;
++ diff = hw_ep->max_packet_sz_rx;
+ else
+- diff = hw_ep->max_packet_sz_tx - qh->maxpacket;
++ diff = hw_ep->max_packet_sz_tx;
++ diff -= (qh->maxpacket * qh->hb_mult);
+
+ if (diff >= 0 && best_diff > diff) {
+ best_diff = diff;
+@@ -1830,15 +1841,27 @@ static int musb_urb_enqueue(
+ qh->is_ready = 1;
+
+ qh->maxpacket = le16_to_cpu(epd->wMaxPacketSize);
++ qh->type = usb_endpoint_type(epd);
+
+- /* no high bandwidth support yet */
+- if (qh->maxpacket & ~0x7ff) {
+- ret = -EMSGSIZE;
+- goto done;
++ /* Bits 11 & 12 of wMaxPacketSize encode high bandwidth multiplier.
++ * Some musb cores don't support high bandwidth ISO transfers; and
++ * we don't (yet!) support high bandwidth interrupt transfers.
++ */
++ qh->hb_mult = 1 + ((qh->maxpacket >> 11) & 0x03);
++ if (qh->hb_mult > 1) {
++ int ok = (qh->type == USB_ENDPOINT_XFER_ISOC);
++
++ if (ok)
++ ok = (usb_pipein(urb->pipe) && musb->hb_iso_rx)
++ || (usb_pipeout(urb->pipe) && musb->hb_iso_tx);
++ if (!ok) {
++ ret = -EMSGSIZE;
++ goto done;
++ }
++ qh->maxpacket &= 0x7ff;
+ }
+
+ qh->epnum = usb_endpoint_num(epd);
+- qh->type = usb_endpoint_type(epd);
+
+ /* NOTE: urb->dev->devnum is wrong during SET_ADDRESS */
+ qh->addr_reg = (u8) usb_pipedevice(urb->pipe);
+diff --git a/drivers/usb/musb/musb_host.h b/drivers/usb/musb/musb_host.h
+index 0b7fbcd..14b0077 100644
+--- a/drivers/usb/musb/musb_host.h
++++ b/drivers/usb/musb/musb_host.h
+@@ -67,6 +67,7 @@ struct musb_qh {
+ u8 is_ready; /* safe to modify hw_ep */
+ u8 type; /* XFERTYPE_* */
+ u8 epnum;
++ u8 hb_mult; /* high bandwidth pkts per uf */
+ u16 maxpacket;
+ u16 frame; /* for periodic schedule */
+ unsigned iso_idx; /* in urb->iso_frame_desc[] */
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0024-USB-otg-adding-nop-usb-transceiver.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0024-USB-otg-adding-nop-usb-transceiver.patch
new file mode 100644
index 0000000000..67004d7ec6
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0024-USB-otg-adding-nop-usb-transceiver.patch
@@ -0,0 +1,259 @@
+From de835357b3597af5304742cbd89771d70533292a Mon Sep 17 00:00:00 2001
+From: Ajay Kumar Gupta <ajay.gupta@ti.com>
+Date: Fri, 6 Feb 2009 17:32:35 +0530
+Subject: [PATCH] USB: otg: adding nop usb transceiver
+
+NOP transceiver is used by all the usb transceiver which are mostly
+autonomous and doesn't require any programming or which are built
+into the usb ip itself.NOP transceiver only allocates the memory
+for struct xceiv and calls otg_set_transceiver() so function call
+to otg_get_transceiver() will return a valid transceiver.
+
+NOP transceiver device should be registered by calling
+usb_nop_xceiv_register() from platform files.
+
+Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
+Cc: Felipe Balbi <felipe.balbi@nokia.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/usb/otg/Kconfig | 8 ++
+ drivers/usb/otg/Makefile | 1 +
+ drivers/usb/otg/nop-usb-xceiv.c | 180 +++++++++++++++++++++++++++++++++++++++
+ include/linux/usb/otg.h | 4 +
+ 4 files changed, 193 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/usb/otg/nop-usb-xceiv.c
+
+diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
+index 5790a5b..aa884d0 100644
+--- a/drivers/usb/otg/Kconfig
++++ b/drivers/usb/otg/Kconfig
+@@ -51,4 +51,12 @@ config TWL4030_USB
+ This transceiver supports high and full speed devices plus,
+ in host mode, low speed.
+
++config NOP_USB_XCEIV
++ tristate "NOP USB Transceiver Driver"
++ select USB_OTG_UTILS
++ help
++ this driver is to be used by all the usb transceiver which are either
++ built-in with usb ip or which are autonomous and doesn't require any
++ phy programming such as ISP1x04 etc.
++
+ endif # USB || OTG
+diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
+index d73c7cf..2081678 100644
+--- a/drivers/usb/otg/Makefile
++++ b/drivers/usb/otg/Makefile
+@@ -9,6 +9,7 @@ obj-$(CONFIG_USB_OTG_UTILS) += otg.o
+ obj-$(CONFIG_USB_GPIO_VBUS) += gpio_vbus.o
+ obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
+ obj-$(CONFIG_TWL4030_USB) += twl4030-usb.o
++obj-$(CONFIG_NOP_USB_XCEIV) += nop-usb-xceiv.o
+
+ ccflags-$(CONFIG_USB_DEBUG) += -DDEBUG
+ ccflags-$(CONFIG_USB_GADGET_DEBUG) += -DDEBUG
+diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
+new file mode 100644
+index 0000000..4b933f6
+--- /dev/null
++++ b/drivers/usb/otg/nop-usb-xceiv.c
+@@ -0,0 +1,180 @@
++/*
++ * drivers/usb/otg/nop-usb-xceiv.c
++ *
++ * NOP USB transceiver for all USB transceiver which are either built-in
++ * into USB IP or which are mostly autonomous.
++ *
++ * Copyright (C) 2009 Texas Instruments Inc
++ * Author: Ajay Kumar Gupta <ajay.gupta@ti.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ * Current status:
++ * this is to add "nop" transceiver for all those phy which is
++ * autonomous such as isp1504 etc.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/dma-mapping.h>
++#include <linux/usb/otg.h>
++
++struct nop_usb_xceiv {
++ struct otg_transceiver otg;
++ struct device *dev;
++};
++
++static u64 nop_xceiv_dmamask = DMA_32BIT_MASK;
++
++static struct platform_device nop_xceiv_device = {
++ .name = "nop_usb_xceiv",
++ .id = -1,
++ .dev = {
++ .dma_mask = &nop_xceiv_dmamask,
++ .coherent_dma_mask = DMA_32BIT_MASK,
++ .platform_data = NULL,
++ },
++};
++
++void usb_nop_xceiv_register(void)
++{
++ if (platform_device_register(&nop_xceiv_device) < 0) {
++ printk(KERN_ERR "Unable to register usb nop transceiver\n");
++ return;
++ }
++}
++
++void usb_nop_xceiv_unregister(void)
++{
++ platform_device_unregister(&nop_xceiv_device);
++}
++
++static inline struct nop_usb_xceiv *xceiv_to_nop(struct otg_transceiver *x)
++{
++ return container_of(x, struct nop_usb_xceiv, otg);
++}
++
++static int nop_set_suspend(struct otg_transceiver *x, int suspend)
++{
++ return 0;
++}
++
++static int nop_set_peripheral(struct otg_transceiver *x,
++ struct usb_gadget *gadget)
++{
++ struct nop_usb_xceiv *nop;
++
++ if (!x)
++ return -ENODEV;
++
++ nop = xceiv_to_nop(x);
++
++ if (!gadget) {
++ nop->otg.gadget = NULL;
++ return -ENODEV;
++ }
++
++ nop->otg.gadget = gadget;
++ nop->otg.state = OTG_STATE_B_IDLE;
++ return 0;
++}
++
++static int nop_set_host(struct otg_transceiver *x, struct usb_bus *host)
++{
++ struct nop_usb_xceiv *nop;
++
++ if (!x)
++ return -ENODEV;
++
++ nop = xceiv_to_nop(x);
++
++ if (!host) {
++ nop->otg.host = NULL;
++ return -ENODEV;
++ }
++
++ nop->otg.host = host;
++ return 0;
++}
++
++static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev)
++{
++ struct nop_usb_xceiv *nop;
++ int err;
++
++ nop = kzalloc(sizeof *nop, GFP_KERNEL);
++ if (!nop)
++ return -ENOMEM;
++
++ nop->dev = &pdev->dev;
++ nop->otg.dev = nop->dev;
++ nop->otg.label = "nop-xceiv";
++ nop->otg.state = OTG_STATE_UNDEFINED;
++ nop->otg.set_host = nop_set_host;
++ nop->otg.set_peripheral = nop_set_peripheral;
++ nop->otg.set_suspend = nop_set_suspend;
++
++ err = otg_set_transceiver(&nop->otg);
++ if (err) {
++ dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
++ err);
++ goto exit;
++ }
++
++ platform_set_drvdata(pdev, nop);
++
++ return 0;
++exit:
++ kfree(nop);
++ return err;
++}
++
++static int __devexit nop_usb_xceiv_remove(struct platform_device *pdev)
++{
++ struct nop_usb_xceiv *nop = platform_get_drvdata(pdev);
++
++ otg_set_transceiver(NULL);
++
++ platform_set_drvdata(pdev, NULL);
++ kfree(nop);
++
++ return 0;
++}
++
++static struct platform_driver nop_usb_xceiv_driver = {
++ .probe = nop_usb_xceiv_probe,
++ .remove = __devexit_p(nop_usb_xceiv_remove),
++ .driver = {
++ .name = "nop_usb_xceiv",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init nop_usb_xceiv_init(void)
++{
++ return platform_driver_register(&nop_usb_xceiv_driver);
++}
++subsys_initcall(nop_usb_xceiv_init);
++
++static void __exit nop_usb_xceiv_exit(void)
++{
++ platform_driver_unregister(&nop_usb_xceiv_driver);
++}
++module_exit(nop_usb_xceiv_exit);
++
++MODULE_ALIAS("platform:nop_usb_xceiv");
++MODULE_AUTHOR("Texas Instruments Inc");
++MODULE_DESCRIPTION("NOP USB Transceiver driver");
++MODULE_LICENSE("GPL");
+diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
+index 94df4fe..54f2424 100644
+--- a/include/linux/usb/otg.h
++++ b/include/linux/usb/otg.h
+@@ -80,6 +80,10 @@ struct otg_transceiver {
+
+ /* for board-specific init logic */
+ extern int otg_set_transceiver(struct otg_transceiver *);
++#ifdef CONFIG_NOP_USB_XCEIV
++extern void usb_nop_xceiv_register(void);
++extern void usb_nop_xceiv_unregister(void);
++#endif
+
+
+ /* for usb host and peripheral controller drivers */
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch
new file mode 100644
index 0000000000..21fe7bea17
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch
@@ -0,0 +1,90 @@
+From ae4f027580168814f734cf3c41a662a7f10c744c Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Tue, 31 Mar 2009 12:28:31 -0700
+Subject: [PATCH] nop-usb-xceiv: behave when linked as a module
+
+The NOP OTG transceiver driver needs to be usable from modules.
+Make sure its symbols are always accessible at both compile and
+link time, and make sure the device instance is allocated from
+the heap so that device lifetime rules are obeyed.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/otg/nop-usb-xceiv.c | 25 ++++++++++---------------
+ include/linux/usb/otg.h | 4 ++--
+ 2 files changed, 12 insertions(+), 17 deletions(-)
+
+diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
+index 4b933f6..9ed5ea5 100644
+--- a/drivers/usb/otg/nop-usb-xceiv.c
++++ b/drivers/usb/otg/nop-usb-xceiv.c
+@@ -22,8 +22,8 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Current status:
+- * this is to add "nop" transceiver for all those phy which is
+- * autonomous such as isp1504 etc.
++ * This provides a "nop" transceiver for PHYs which are
++ * autonomous such as isp1504, isp1707, etc.
+ */
+
+ #include <linux/module.h>
+@@ -36,30 +36,25 @@ struct nop_usb_xceiv {
+ struct device *dev;
+ };
+
+-static u64 nop_xceiv_dmamask = DMA_32BIT_MASK;
+-
+-static struct platform_device nop_xceiv_device = {
+- .name = "nop_usb_xceiv",
+- .id = -1,
+- .dev = {
+- .dma_mask = &nop_xceiv_dmamask,
+- .coherent_dma_mask = DMA_32BIT_MASK,
+- .platform_data = NULL,
+- },
+-};
++static struct platform_device *pd;
+
+ void usb_nop_xceiv_register(void)
+ {
+- if (platform_device_register(&nop_xceiv_device) < 0) {
++ if (pd)
++ return;
++ pd = platform_device_register_simple("nop_usb_xceiv", -1, NULL, 0);
++ if (!pd) {
+ printk(KERN_ERR "Unable to register usb nop transceiver\n");
+ return;
+ }
+ }
++EXPORT_SYMBOL(usb_nop_xceiv_register);
+
+ void usb_nop_xceiv_unregister(void)
+ {
+- platform_device_unregister(&nop_xceiv_device);
++ platform_device_unregister(pd);
+ }
++EXPORT_SYMBOL(usb_nop_xceiv_unregister);
+
+ static inline struct nop_usb_xceiv *xceiv_to_nop(struct otg_transceiver *x)
+ {
+diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
+index 54f2424..7df8bae 100644
+--- a/include/linux/usb/otg.h
++++ b/include/linux/usb/otg.h
+@@ -80,10 +80,10 @@ struct otg_transceiver {
+
+ /* for board-specific init logic */
+ extern int otg_set_transceiver(struct otg_transceiver *);
+-#ifdef CONFIG_NOP_USB_XCEIV
++
++/* sometimes transceivers are accessed only through e.g. ULPI */
+ extern void usb_nop_xceiv_register(void);
+ extern void usb_nop_xceiv_unregister(void);
+-#endif
+
+
+ /* for usb host and peripheral controller drivers */
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0026-musb-proper-hookup-to-transceiver-drivers.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0026-musb-proper-hookup-to-transceiver-drivers.patch
new file mode 100644
index 0000000000..035a6c7676
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0026-musb-proper-hookup-to-transceiver-drivers.patch
@@ -0,0 +1,1109 @@
+From 43ee46723ffa9dd43d611362064d235440aa04e7 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Tue, 31 Mar 2009 12:30:04 -0700
+Subject: [PATCH] musb: proper hookup to transceiver drivers
+
+Let the otg_transceiver in MUSB be managed by an external driver;
+don't assume it's integrated. OMAP3 chips need it to be external,
+and there may be ways to interact with the transceiver which add
+functionality to the system.
+
+Platform init code is responsible for setting up the transeciver,
+probably using the NOP transceiver for integrated transceivers.
+External ones will use whatever the board init code provided,
+such as twl4030 or something more hands-off.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/Kconfig | 2 +
+ drivers/usb/musb/blackfin.c | 11 +++-
+ drivers/usb/musb/davinci.c | 33 +++++++++-----
+ drivers/usb/musb/musb_core.c | 96 +++++++++++++++++++++------------------
+ drivers/usb/musb/musb_core.h | 2 +-
+ drivers/usb/musb/musb_gadget.c | 38 +++++++--------
+ drivers/usb/musb/musb_host.c | 2 +-
+ drivers/usb/musb/musb_virthub.c | 20 ++++----
+ drivers/usb/musb/omap2430.c | 62 +++++++++----------------
+ drivers/usb/musb/tusb6010.c | 70 ++++++++++++++++++-----------
+ 10 files changed, 181 insertions(+), 155 deletions(-)
+
+diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
+index 9985db0..9eea991 100644
+--- a/drivers/usb/musb/Kconfig
++++ b/drivers/usb/musb/Kconfig
+@@ -10,6 +10,7 @@ comment "Enable Host or Gadget support to see Inventra options"
+ config USB_MUSB_HDRC
+ depends on (USB || USB_GADGET) && HAVE_CLK
+ depends on !SUPERH
++ select NOP_USB_XCEIV if ARCH_DAVINCI
+ select TWL4030_USB if MACH_OMAP_3430SDP
+ select USB_OTG_UTILS
+ tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
+@@ -55,6 +56,7 @@ comment "Blackfin high speed USB Support"
+ config USB_TUSB6010
+ boolean "TUSB 6010 support"
+ depends on USB_MUSB_HDRC && !USB_MUSB_SOC
++ select NOP_USB_XCEIV
+ default y
+ help
+ The TUSB 6010 chip, from Texas Instruments, connects a discrete
+diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
+index 7861348..f2f66eb 100644
+--- a/drivers/usb/musb/blackfin.c
++++ b/drivers/usb/musb/blackfin.c
+@@ -143,7 +143,7 @@ static void musb_conn_timer_handler(unsigned long _musb)
+ u16 val;
+
+ spin_lock_irqsave(&musb->lock, flags);
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_IDLE:
+ case OTG_STATE_A_WAIT_BCON:
+ /* Start a new session */
+@@ -154,7 +154,7 @@ static void musb_conn_timer_handler(unsigned long _musb)
+ val = musb_readw(musb->mregs, MUSB_DEVCTL);
+ if (!(val & MUSB_DEVCTL_BDEVICE)) {
+ gpio_set_value(musb->config->gpio_vrsel, 1);
+- musb->xceiv.state = OTG_STATE_A_WAIT_BCON;
++ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+ } else {
+ gpio_set_value(musb->config->gpio_vrsel, 0);
+
+@@ -247,6 +247,11 @@ int __init musb_platform_init(struct musb *musb)
+ }
+ gpio_direction_output(musb->config->gpio_vrsel, 0);
+
++ usb_nop_xceiv_register();
++ musb->xceiv = otg_get_transceiver();
++ if (!musb->xceiv)
++ return -ENODEV;
++
+ if (ANOMALY_05000346) {
+ bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value);
+ SSYNC();
+@@ -291,7 +296,7 @@ int __init musb_platform_init(struct musb *musb)
+ musb_conn_timer_handler, (unsigned long) musb);
+ }
+ if (is_peripheral_enabled(musb))
+- musb->xceiv.set_power = bfin_set_power;
++ musb->xceiv->set_power = bfin_set_power;
+
+ musb->isr = blackfin_interrupt;
+
+diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
+index 9fd74bf..81de742 100644
+--- a/drivers/usb/musb/davinci.c
++++ b/drivers/usb/musb/davinci.c
+@@ -200,7 +200,7 @@ static void otg_timer(unsigned long _musb)
+ DBG(7, "poll devctl %02x (%s)\n", devctl, otg_state_string(musb));
+
+ spin_lock_irqsave(&musb->lock, flags);
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_WAIT_VFALL:
+ /* Wait till VBUS falls below SessionEnd (~0.2V); the 1.3 RTL
+ * seems to mis-handle session "start" otherwise (or in our
+@@ -211,7 +211,7 @@ static void otg_timer(unsigned long _musb)
+ mod_timer(&otg_workaround, jiffies + POLL_SECONDS * HZ);
+ break;
+ }
+- musb->xceiv.state = OTG_STATE_A_WAIT_VRISE;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+ musb_writel(musb->ctrl_base, DAVINCI_USB_INT_SET_REG,
+ MUSB_INTR_VBUSERROR << DAVINCI_USB_USBINT_SHIFT);
+ break;
+@@ -236,7 +236,7 @@ static void otg_timer(unsigned long _musb)
+ if (devctl & MUSB_DEVCTL_BDEVICE)
+ mod_timer(&otg_workaround, jiffies + POLL_SECONDS * HZ);
+ else
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ break;
+ default:
+ break;
+@@ -310,21 +310,21 @@ static irqreturn_t davinci_interrupt(int irq, void *__hci)
+ * to stop registering in devctl.
+ */
+ musb->int_usb &= ~MUSB_INTR_VBUSERROR;
+- musb->xceiv.state = OTG_STATE_A_WAIT_VFALL;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VFALL;
+ mod_timer(&otg_workaround, jiffies + POLL_SECONDS * HZ);
+ WARNING("VBUS error workaround (delay coming)\n");
+ } else if (is_host_enabled(musb) && drvvbus) {
+ musb->is_active = 1;
+ MUSB_HST_MODE(musb);
+- musb->xceiv.default_a = 1;
+- musb->xceiv.state = OTG_STATE_A_WAIT_VRISE;
++ musb->xceiv->default_a = 1;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+ portstate(musb->port1_status |= USB_PORT_STAT_POWER);
+ del_timer(&otg_workaround);
+ } else {
+ musb->is_active = 0;
+ MUSB_DEV_MODE(musb);
+- musb->xceiv.default_a = 0;
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->default_a = 0;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ portstate(musb->port1_status &= ~USB_PORT_STAT_POWER);
+ }
+
+@@ -346,7 +346,7 @@ static irqreturn_t davinci_interrupt(int irq, void *__hci)
+
+ /* poll for ID change */
+ if (is_otg_enabled(musb)
+- && musb->xceiv.state == OTG_STATE_B_IDLE)
++ && musb->xceiv->state == OTG_STATE_B_IDLE)
+ mod_timer(&otg_workaround, jiffies + POLL_SECONDS * HZ);
+
+ spin_unlock_irqrestore(&musb->lock, flags);
+@@ -365,6 +365,11 @@ int __init musb_platform_init(struct musb *musb)
+ void __iomem *tibase = musb->ctrl_base;
+ u32 revision;
+
++ usb_nop_xceiv_register();
++ musb->xceiv = otg_get_transceiver();
++ if (!musb->xceiv)
++ return -ENODEV;
++
+ musb->mregs += DAVINCI_BASE_OFFSET;
+
+ clk_enable(musb->clock);
+@@ -372,7 +377,7 @@ int __init musb_platform_init(struct musb *musb)
+ /* returns zero if e.g. not clocked */
+ revision = musb_readl(tibase, DAVINCI_USB_VERSION_REG);
+ if (revision == 0)
+- return -ENODEV;
++ goto fail;
+
+ if (is_host_enabled(musb))
+ setup_timer(&otg_workaround, otg_timer, (unsigned long) musb);
+@@ -396,6 +401,10 @@ int __init musb_platform_init(struct musb *musb)
+
+ musb->isr = davinci_interrupt;
+ return 0;
++
++fail:
++ usb_nop_xceiv_unregister();
++ return -ENODEV;
+ }
+
+ int musb_platform_exit(struct musb *musb)
+@@ -406,7 +415,7 @@ int musb_platform_exit(struct musb *musb)
+ davinci_source_power(musb, 0 /*off*/, 1);
+
+ /* delay, to avoid problems with module reload */
+- if (is_host_enabled(musb) && musb->xceiv.default_a) {
++ if (is_host_enabled(musb) && musb->xceiv->default_a) {
+ int maxdelay = 30;
+ u8 devctl, warn = 0;
+
+@@ -435,5 +444,7 @@ int musb_platform_exit(struct musb *musb)
+
+ clk_disable(musb->clock);
+
++ usb_nop_xceiv_unregister();
++
+ return 0;
+ }
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index d953305..ac150af 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -267,7 +267,7 @@ void musb_load_testpacket(struct musb *musb)
+
+ const char *otg_state_string(struct musb *musb)
+ {
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_IDLE: return "a_idle";
+ case OTG_STATE_A_WAIT_VRISE: return "a_wait_vrise";
+ case OTG_STATE_A_WAIT_BCON: return "a_wait_bcon";
+@@ -302,11 +302,11 @@ void musb_otg_timer_func(unsigned long data)
+ unsigned long flags;
+
+ spin_lock_irqsave(&musb->lock, flags);
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_B_WAIT_ACON:
+ DBG(1, "HNP: b_wait_acon timeout; back to b_peripheral\n");
+ musb_g_disconnect(musb);
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ musb->is_active = 0;
+ break;
+ case OTG_STATE_A_WAIT_BCON:
+@@ -331,20 +331,20 @@ void musb_hnp_stop(struct musb *musb)
+ void __iomem *mbase = musb->mregs;
+ u8 reg;
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_PERIPHERAL:
+ case OTG_STATE_A_WAIT_VFALL:
+ case OTG_STATE_A_WAIT_BCON:
+ DBG(1, "HNP: Switching back to A-host\n");
+ musb_g_disconnect(musb);
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ MUSB_HST_MODE(musb);
+ musb->is_active = 0;
+ break;
+ case OTG_STATE_B_HOST:
+ DBG(1, "HNP: Disabling HR\n");
+ hcd->self.is_b_host = 0;
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ MUSB_DEV_MODE(musb);
+ reg = musb_readb(mbase, MUSB_POWER);
+ reg |= MUSB_POWER_SUSPENDM;
+@@ -402,7 +402,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+
+ if (devctl & MUSB_DEVCTL_HM) {
+ #ifdef CONFIG_USB_MUSB_HDRC_HCD
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_SUSPEND:
+ /* remote wakeup? later, GetPortStatus
+ * will stop RESUME signaling
+@@ -425,12 +425,12 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ musb->rh_timer = jiffies
+ + msecs_to_jiffies(20);
+
+- musb->xceiv.state = OTG_STATE_A_HOST;
++ musb->xceiv->state = OTG_STATE_A_HOST;
+ musb->is_active = 1;
+ usb_hcd_resume_root_hub(musb_to_hcd(musb));
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ musb->is_active = 1;
+ MUSB_DEV_MODE(musb);
+ break;
+@@ -441,11 +441,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ }
+ #endif
+ } else {
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ #ifdef CONFIG_USB_MUSB_HDRC_HCD
+ case OTG_STATE_A_SUSPEND:
+ /* possibly DISCONNECT is upcoming */
+- musb->xceiv.state = OTG_STATE_A_HOST;
++ musb->xceiv->state = OTG_STATE_A_HOST;
+ usb_hcd_resume_root_hub(musb_to_hcd(musb));
+ break;
+ #endif
+@@ -490,7 +490,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ */
+ musb_writeb(mbase, MUSB_DEVCTL, MUSB_DEVCTL_SESSION);
+ musb->ep0_stage = MUSB_EP0_START;
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ MUSB_HST_MODE(musb);
+ musb_set_vbus(musb, 1);
+
+@@ -516,7 +516,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ * REVISIT: do delays from lots of DEBUG_KERNEL checks
+ * make trouble here, keeping VBUS < 4.4V ?
+ */
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_HOST:
+ /* recovery is dicey once we've gotten past the
+ * initial stages of enumeration, but if VBUS
+@@ -602,11 +602,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ MUSB_HST_MODE(musb);
+
+ /* indicate new connection to OTG machine */
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_B_PERIPHERAL:
+ if (int_usb & MUSB_INTR_SUSPEND) {
+ DBG(1, "HNP: SUSPEND+CONNECT, now b_host\n");
+- musb->xceiv.state = OTG_STATE_B_HOST;
++ musb->xceiv->state = OTG_STATE_B_HOST;
+ hcd->self.is_b_host = 1;
+ int_usb &= ~MUSB_INTR_SUSPEND;
+ } else
+@@ -614,13 +614,13 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+ DBG(1, "HNP: Waiting to switch to b_host state\n");
+- musb->xceiv.state = OTG_STATE_B_HOST;
++ musb->xceiv->state = OTG_STATE_B_HOST;
+ hcd->self.is_b_host = 1;
+ break;
+ default:
+ if ((devctl & MUSB_DEVCTL_VBUS)
+ == (3 << MUSB_DEVCTL_VBUS_SHIFT)) {
+- musb->xceiv.state = OTG_STATE_A_HOST;
++ musb->xceiv->state = OTG_STATE_A_HOST;
+ hcd->self.is_b_host = 0;
+ }
+ break;
+@@ -650,7 +650,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ }
+ } else if (is_peripheral_capable()) {
+ DBG(1, "BUS RESET as %s\n", otg_state_string(musb));
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ #ifdef CONFIG_USB_OTG
+ case OTG_STATE_A_SUSPEND:
+ /* We need to ignore disconnect on suspend
+@@ -673,12 +673,12 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ case OTG_STATE_B_WAIT_ACON:
+ DBG(1, "HNP: RESET (%s), to b_peripheral\n",
+ otg_state_string(musb));
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ musb_g_reset(musb);
+ break;
+ #endif
+ case OTG_STATE_B_IDLE:
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ /* FALLTHROUGH */
+ case OTG_STATE_B_PERIPHERAL:
+ musb_g_reset(musb);
+@@ -763,7 +763,7 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ MUSB_MODE(musb), devctl);
+ handled = IRQ_HANDLED;
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ #ifdef CONFIG_USB_MUSB_HDRC_HCD
+ case OTG_STATE_A_HOST:
+ case OTG_STATE_A_SUSPEND:
+@@ -805,7 +805,7 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ otg_state_string(musb), devctl, power);
+ handled = IRQ_HANDLED;
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ #ifdef CONFIG_USB_MUSB_OTG
+ case OTG_STATE_A_PERIPHERAL:
+ /*
+@@ -817,10 +817,10 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ case OTG_STATE_B_PERIPHERAL:
+ musb_g_suspend(musb);
+ musb->is_active = is_otg_enabled(musb)
+- && musb->xceiv.gadget->b_hnp_enable;
++ && musb->xceiv->gadget->b_hnp_enable;
+ if (musb->is_active) {
+ #ifdef CONFIG_USB_MUSB_OTG
+- musb->xceiv.state = OTG_STATE_B_WAIT_ACON;
++ musb->xceiv->state = OTG_STATE_B_WAIT_ACON;
+ DBG(1, "HNP: Setting timer for b_ase0_brst\n");
+ musb_otg_timer.data = (unsigned long)musb;
+ mod_timer(&musb_otg_timer, jiffies
+@@ -834,9 +834,9 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ + msecs_to_jiffies(musb->a_wait_bcon));
+ break;
+ case OTG_STATE_A_HOST:
+- musb->xceiv.state = OTG_STATE_A_SUSPEND;
++ musb->xceiv->state = OTG_STATE_A_SUSPEND;
+ musb->is_active = is_otg_enabled(musb)
+- && musb->xceiv.host->b_hnp_enable;
++ && musb->xceiv->host->b_hnp_enable;
+ break;
+ case OTG_STATE_B_HOST:
+ /* Transition to B_PERIPHERAL, see 6.8.2.6 p 44 */
+@@ -1681,7 +1681,7 @@ musb_vbus_store(struct device *dev, struct device_attribute *attr,
+
+ spin_lock_irqsave(&musb->lock, flags);
+ musb->a_wait_bcon = val;
+- if (musb->xceiv.state == OTG_STATE_A_WAIT_BCON)
++ if (musb->xceiv->state == OTG_STATE_A_WAIT_BCON)
+ musb->is_active = 0;
+ musb_platform_try_idle(musb, jiffies + msecs_to_jiffies(val));
+ spin_unlock_irqrestore(&musb->lock, flags);
+@@ -1742,8 +1742,8 @@ static void musb_irq_work(struct work_struct *data)
+ struct musb *musb = container_of(data, struct musb, irq_work);
+ static int old_state;
+
+- if (musb->xceiv.state != old_state) {
+- old_state = musb->xceiv.state;
++ if (musb->xceiv->state != old_state) {
++ old_state = musb->xceiv->state;
+ sysfs_notify(&musb->controller->kobj, NULL, "mode");
+ }
+ }
+@@ -1840,7 +1840,7 @@ static void musb_free(struct musb *musb)
+ }
+
+ #ifdef CONFIG_USB_MUSB_OTG
+- put_device(musb->xceiv.dev);
++ put_device(musb->xceiv->dev);
+ #endif
+
+ #ifdef CONFIG_USB_MUSB_HDRC_HCD
+@@ -1921,10 +1921,18 @@ bad_config:
+ }
+ }
+
+- /* assume vbus is off */
+-
+- /* platform adjusts musb->mregs and musb->isr if needed,
+- * and activates clocks
++ /* The musb_platform_init() call:
++ * - adjusts musb->mregs and musb->isr if needed,
++ * - may initialize an integrated tranceiver
++ * - initializes musb->xceiv, usually by otg_get_transceiver()
++ * - activates clocks.
++ * - stops powering VBUS
++ * - assigns musb->board_set_vbus if host mode is enabled
++ *
++ * There are various transciever configurations. Blackfin,
++ * DaVinci, TUSB60x0, and others integrate them. OMAP3 uses
++ * external/discrete ones in various flavors (twl4030 family,
++ * isp1504, non-OTG, etc) mostly hooking up through ULPI.
+ */
+ musb->isr = generic_interrupt;
+ status = musb_platform_init(musb);
+@@ -1992,17 +2000,17 @@ bad_config:
+ ? "DMA" : "PIO",
+ musb->nIrq);
+
+-#ifdef CONFIG_USB_MUSB_HDRC_HCD
+- /* host side needs more setup, except for no-host modes */
+- if (musb->board_mode != MUSB_PERIPHERAL) {
++ /* host side needs more setup */
++ if (is_host_enabled(musb)) {
+ struct usb_hcd *hcd = musb_to_hcd(musb);
+
+- if (musb->board_mode == MUSB_OTG)
++ otg_set_host(musb->xceiv, &hcd->self);
++
++ if (is_otg_enabled(musb))
+ hcd->self.otg_port = 1;
+- musb->xceiv.host = &hcd->self;
++ musb->xceiv->host = &hcd->self;
+ hcd->power_budget = 2 * (plat->power ? : 250);
+ }
+-#endif /* CONFIG_USB_MUSB_HDRC_HCD */
+
+ /* For the host-only role, we can activate right away.
+ * (We expect the ID pin to be forcibly grounded!!)
+@@ -2010,8 +2018,8 @@ bad_config:
+ */
+ if (!is_otg_enabled(musb) && is_host_enabled(musb)) {
+ MUSB_HST_MODE(musb);
+- musb->xceiv.default_a = 1;
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->default_a = 1;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+
+ status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
+ if (status)
+@@ -2026,8 +2034,8 @@ bad_config:
+
+ } else /* peripheral is enabled */ {
+ MUSB_DEV_MODE(musb);
+- musb->xceiv.default_a = 0;
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->default_a = 0;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+
+ status = musb_gadget_setup(musb);
+ if (status)
+diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
+index 0ac4faf..c3ee348 100644
+--- a/drivers/usb/musb/musb_core.h
++++ b/drivers/usb/musb/musb_core.h
+@@ -356,7 +356,7 @@ struct musb {
+ u16 int_rx;
+ u16 int_tx;
+
+- struct otg_transceiver xceiv;
++ struct otg_transceiver *xceiv;
+
+ int nIrq;
+ unsigned irq_wake:1;
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index e8f920c..2fbfba5 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -1406,7 +1406,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget)
+
+ spin_lock_irqsave(&musb->lock, flags);
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_B_PERIPHERAL:
+ /* NOTE: OTG state machine doesn't include B_SUSPENDED;
+ * that's part of the standard usb 1.1 state machine, and
+@@ -1508,9 +1508,9 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)
+ {
+ struct musb *musb = gadget_to_musb(gadget);
+
+- if (!musb->xceiv.set_power)
++ if (!musb->xceiv->set_power)
+ return -EOPNOTSUPP;
+- return otg_set_power(&musb->xceiv, mA);
++ return otg_set_power(musb->xceiv, mA);
+ }
+
+ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
+@@ -1733,11 +1733,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+
+ spin_lock_irqsave(&musb->lock, flags);
+
+- /* REVISIT always use otg_set_peripheral(), handling
+- * issues including the root hub one below ...
+- */
+- musb->xceiv.gadget = &musb->g;
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ otg_set_peripheral(musb->xceiv, &musb->g);
+ musb->is_active = 1;
+
+ /* FIXME this ignores the softconnect flag. Drivers are
+@@ -1749,6 +1745,8 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+ if (!is_otg_enabled(musb))
+ musb_start(musb);
+
++ otg_set_peripheral(musb->xceiv, &musb->g);
++
+ spin_unlock_irqrestore(&musb->lock, flags);
+
+ if (is_otg_enabled(musb)) {
+@@ -1762,8 +1760,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+ if (retval < 0) {
+ DBG(1, "add_hcd failed, %d\n", retval);
+ spin_lock_irqsave(&musb->lock, flags);
+- musb->xceiv.gadget = NULL;
+- musb->xceiv.state = OTG_STATE_UNDEFINED;
++ otg_set_peripheral(musb->xceiv, NULL);
+ musb->gadget_driver = NULL;
+ musb->g.dev.driver = NULL;
+ spin_unlock_irqrestore(&musb->lock, flags);
+@@ -1846,8 +1843,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+
+ (void) musb_gadget_vbus_draw(&musb->g, 0);
+
+- musb->xceiv.state = OTG_STATE_UNDEFINED;
++ musb->xceiv->state = OTG_STATE_UNDEFINED;
+ stop_activity(musb, driver);
++ otg_set_peripheral(musb->xceiv, NULL);
+
+ DBG(3, "unregistering driver %s\n", driver->function);
+ spin_unlock_irqrestore(&musb->lock, flags);
+@@ -1883,7 +1881,7 @@ EXPORT_SYMBOL(usb_gadget_unregister_driver);
+ void musb_g_resume(struct musb *musb)
+ {
+ musb->is_suspended = 0;
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_B_IDLE:
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+@@ -1909,10 +1907,10 @@ void musb_g_suspend(struct musb *musb)
+ devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
+ DBG(3, "devctl %02x\n", devctl);
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_B_IDLE:
+ if ((devctl & MUSB_DEVCTL_VBUS) == MUSB_DEVCTL_VBUS)
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ break;
+ case OTG_STATE_B_PERIPHERAL:
+ musb->is_suspended = 1;
+@@ -1958,22 +1956,22 @@ void musb_g_disconnect(struct musb *musb)
+ spin_lock(&musb->lock);
+ }
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ default:
+ #ifdef CONFIG_USB_MUSB_OTG
+ DBG(2, "Unhandled disconnect %s, setting a_idle\n",
+ otg_state_string(musb));
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ break;
+ case OTG_STATE_A_PERIPHERAL:
+- musb->xceiv.state = OTG_STATE_A_WAIT_VFALL;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VFALL;
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+ case OTG_STATE_B_HOST:
+ #endif
+ case OTG_STATE_B_PERIPHERAL:
+ case OTG_STATE_B_IDLE:
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ break;
+ case OTG_STATE_B_SRP_INIT:
+ break;
+@@ -2029,10 +2027,10 @@ __acquires(musb->lock)
+ * or else after HNP, as A-Device
+ */
+ if (devctl & MUSB_DEVCTL_BDEVICE) {
+- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ musb->g.is_a_peripheral = 0;
+ } else if (is_otg_enabled(musb)) {
+- musb->xceiv.state = OTG_STATE_A_PERIPHERAL;
++ musb->xceiv->state = OTG_STATE_A_PERIPHERAL;
+ musb->g.is_a_peripheral = 1;
+ } else
+ WARN_ON(1);
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
+index ece5122..795dabe 100644
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -2169,7 +2169,7 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
+ {
+ struct musb *musb = hcd_to_musb(hcd);
+
+- if (musb->xceiv.state == OTG_STATE_A_SUSPEND)
++ if (musb->xceiv->state == OTG_STATE_A_SUSPEND)
+ return 0;
+
+ if (is_host_active(musb) && musb->is_active) {
+diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
+index e0e9ce5..7e7900f 100644
+--- a/drivers/usb/musb/musb_virthub.c
++++ b/drivers/usb/musb/musb_virthub.c
+@@ -78,18 +78,18 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
+ DBG(3, "Root port suspended, power %02x\n", power);
+
+ musb->port1_status |= USB_PORT_STAT_SUSPEND;
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_HOST:
+- musb->xceiv.state = OTG_STATE_A_SUSPEND;
++ musb->xceiv->state = OTG_STATE_A_SUSPEND;
+ musb->is_active = is_otg_enabled(musb)
+- && musb->xceiv.host->b_hnp_enable;
++ && musb->xceiv->host->b_hnp_enable;
+ musb_platform_try_idle(musb, 0);
+ break;
+ #ifdef CONFIG_USB_MUSB_OTG
+ case OTG_STATE_B_HOST:
+- musb->xceiv.state = OTG_STATE_B_WAIT_ACON;
++ musb->xceiv->state = OTG_STATE_B_WAIT_ACON;
+ musb->is_active = is_otg_enabled(musb)
+- && musb->xceiv.host->b_hnp_enable;
++ && musb->xceiv->host->b_hnp_enable;
+ musb_platform_try_idle(musb, 0);
+ break;
+ #endif
+@@ -116,7 +116,7 @@ static void musb_port_reset(struct musb *musb, bool do_reset)
+ void __iomem *mbase = musb->mregs;
+
+ #ifdef CONFIG_USB_MUSB_OTG
+- if (musb->xceiv.state == OTG_STATE_B_IDLE) {
++ if (musb->xceiv->state == OTG_STATE_B_IDLE) {
+ DBG(2, "HNP: Returning from HNP; no hub reset from b_idle\n");
+ musb->port1_status &= ~USB_PORT_STAT_RESET;
+ return;
+@@ -186,14 +186,14 @@ void musb_root_disconnect(struct musb *musb)
+ usb_hcd_poll_rh_status(musb_to_hcd(musb));
+ musb->is_active = 0;
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_HOST:
+ case OTG_STATE_A_SUSPEND:
+- musb->xceiv.state = OTG_STATE_A_WAIT_BCON;
++ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+ musb->is_active = 0;
+ break;
+ case OTG_STATE_A_WAIT_VFALL:
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ break;
+ default:
+ DBG(1, "host disconnect (%s)\n", otg_state_string(musb));
+@@ -332,7 +332,7 @@ int musb_hub_control(
+ musb->port1_status |= USB_PORT_STAT_C_SUSPEND << 16;
+ usb_hcd_poll_rh_status(musb_to_hcd(musb));
+ /* NOTE: it might really be A_WAIT_BCON ... */
+- musb->xceiv.state = OTG_STATE_A_HOST;
++ musb->xceiv->state = OTG_STATE_A_HOST;
+ }
+
+ put_unaligned(cpu_to_le32(musb->port1_status
+diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
+index 901dffd..5f67b03 100644
+--- a/drivers/usb/musb/omap2430.c
++++ b/drivers/usb/musb/omap2430.c
+@@ -62,17 +62,17 @@ static void musb_do_idle(unsigned long _musb)
+
+ devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_WAIT_BCON:
+ devctl &= ~MUSB_DEVCTL_SESSION;
+ musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
+
+ devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
+ if (devctl & MUSB_DEVCTL_BDEVICE) {
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ MUSB_DEV_MODE(musb);
+ } else {
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ MUSB_HST_MODE(musb);
+ }
+ break;
+@@ -90,7 +90,7 @@ static void musb_do_idle(unsigned long _musb)
+ musb->port1_status |= USB_PORT_STAT_C_SUSPEND << 16;
+ usb_hcd_poll_rh_status(musb_to_hcd(musb));
+ /* NOTE: it might really be A_WAIT_BCON ... */
+- musb->xceiv.state = OTG_STATE_A_HOST;
++ musb->xceiv->state = OTG_STATE_A_HOST;
+ }
+ break;
+ #endif
+@@ -98,9 +98,9 @@ static void musb_do_idle(unsigned long _musb)
+ case OTG_STATE_A_HOST:
+ devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
+ if (devctl & MUSB_DEVCTL_BDEVICE)
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ else
+- musb->xceiv.state = OTG_STATE_A_WAIT_BCON;
++ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+ #endif
+ default:
+ break;
+@@ -119,7 +119,7 @@ void musb_platform_try_idle(struct musb *musb, unsigned long timeout)
+
+ /* Never idle if active, or when VBUS timeout is not set as host */
+ if (musb->is_active || ((musb->a_wait_bcon == 0)
+- && (musb->xceiv.state == OTG_STATE_A_WAIT_BCON))) {
++ && (musb->xceiv->state == OTG_STATE_A_WAIT_BCON))) {
+ DBG(4, "%s active, deleting timer\n", otg_state_string(musb));
+ del_timer(&musb_idle_timer);
+ last_timer = jiffies;
+@@ -164,8 +164,8 @@ static void omap_set_vbus(struct musb *musb, int is_on)
+
+ if (is_on) {
+ musb->is_active = 1;
+- musb->xceiv.default_a = 1;
+- musb->xceiv.state = OTG_STATE_A_WAIT_VRISE;
++ musb->xceiv->default_a = 1;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+ devctl |= MUSB_DEVCTL_SESSION;
+
+ MUSB_HST_MODE(musb);
+@@ -176,8 +176,8 @@ static void omap_set_vbus(struct musb *musb, int is_on)
+ * jumping right to B_IDLE...
+ */
+
+- musb->xceiv.default_a = 0;
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->default_a = 0;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ devctl &= ~MUSB_DEVCTL_SESSION;
+
+ MUSB_DEV_MODE(musb);
+@@ -189,10 +189,6 @@ static void omap_set_vbus(struct musb *musb, int is_on)
+ otg_state_string(musb),
+ musb_readb(musb->mregs, MUSB_DEVCTL));
+ }
+-static int omap_set_power(struct otg_transceiver *x, unsigned mA)
+-{
+- return 0;
+-}
+
+ static int musb_platform_resume(struct musb *musb);
+
+@@ -203,24 +199,6 @@ int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
+ devctl |= MUSB_DEVCTL_SESSION;
+ musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
+
+- switch (musb_mode) {
+-#ifdef CONFIG_USB_MUSB_HDRC_HCD
+- case MUSB_HOST:
+- otg_set_host(&musb->xceiv, musb->xceiv.host);
+- break;
+-#endif
+-#ifdef CONFIG_USB_GADGET_MUSB_HDRC
+- case MUSB_PERIPHERAL:
+- otg_set_peripheral(&musb->xceiv, musb->xceiv.gadget);
+- break;
+-#endif
+-#ifdef CONFIG_USB_MUSB_OTG
+- case MUSB_OTG:
+- break;
+-#endif
+- default:
+- return -EINVAL;
+- }
+ return 0;
+ }
+
+@@ -232,6 +210,16 @@ int __init musb_platform_init(struct musb *musb)
+ omap_cfg_reg(AE5_2430_USB0HS_STP);
+ #endif
+
++ /* We require some kind of external transceiver, hooked
++ * up through ULPI. TWL4030-family PMICs include one,
++ * which needs a driver, drivers aren't always needed.
++ */
++ musb->xceiv = otg_get_transceiver();
++ if (!musb->xceiv) {
++ pr_err("HS USB OTG: no transceiver configured\n");
++ return -ENODEV;
++ }
++
+ musb_platform_resume(musb);
+
+ l = omap_readl(OTG_SYSCONFIG);
+@@ -258,8 +246,6 @@ int __init musb_platform_init(struct musb *musb)
+
+ if (is_host_enabled(musb))
+ musb->board_set_vbus = omap_set_vbus;
+- if (is_peripheral_enabled(musb))
+- musb->xceiv.set_power = omap_set_power;
+ musb->a_wait_bcon = MUSB_TIMEOUT_A_WAIT_BCON;
+
+ setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
+@@ -283,8 +269,7 @@ int musb_platform_suspend(struct musb *musb)
+ l |= ENABLEWAKEUP; /* enable wakeup */
+ omap_writel(l, OTG_SYSCONFIG);
+
+- if (musb->xceiv.set_suspend)
+- musb->xceiv.set_suspend(&musb->xceiv, 1);
++ otg_set_suspend(musb->xceiv, 1);
+
+ if (musb->set_clock)
+ musb->set_clock(musb->clock, 0);
+@@ -301,8 +286,7 @@ static int musb_platform_resume(struct musb *musb)
+ if (!musb->clock)
+ return 0;
+
+- if (musb->xceiv.set_suspend)
+- musb->xceiv.set_suspend(&musb->xceiv, 0);
++ otg_set_suspend(musb->xceiv, 0);
+
+ if (musb->set_clock)
+ musb->set_clock(musb->clock, 1);
+diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
+index 9e20fd0..c473dec 100644
+--- a/drivers/usb/musb/tusb6010.c
++++ b/drivers/usb/musb/tusb6010.c
+@@ -260,6 +260,8 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
+ tusb_fifo_read_unaligned(fifo, buf, len);
+ }
+
++static struct musb *the_musb;
++
+ #ifdef CONFIG_USB_GADGET_MUSB_HDRC
+
+ /* This is used by gadget drivers, and OTG transceiver logic, allowing
+@@ -270,7 +272,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
+ */
+ static int tusb_draw_power(struct otg_transceiver *x, unsigned mA)
+ {
+- struct musb *musb = container_of(x, struct musb, xceiv);
++ struct musb *musb = the_musb;
+ void __iomem *tbase = musb->ctrl_base;
+ u32 reg;
+
+@@ -420,7 +422,7 @@ static void musb_do_idle(unsigned long _musb)
+
+ spin_lock_irqsave(&musb->lock, flags);
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_WAIT_BCON:
+ if ((musb->a_wait_bcon != 0)
+ && (musb->idle_timeout == 0
+@@ -484,7 +486,7 @@ void musb_platform_try_idle(struct musb *musb, unsigned long timeout)
+
+ /* Never idle if active, or when VBUS timeout is not set as host */
+ if (musb->is_active || ((musb->a_wait_bcon == 0)
+- && (musb->xceiv.state == OTG_STATE_A_WAIT_BCON))) {
++ && (musb->xceiv->state == OTG_STATE_A_WAIT_BCON))) {
+ DBG(4, "%s active, deleting timer\n", otg_state_string(musb));
+ del_timer(&musb_idle_timer);
+ last_timer = jiffies;
+@@ -533,8 +535,8 @@ static void tusb_source_power(struct musb *musb, int is_on)
+ if (musb->set_clock)
+ musb->set_clock(musb->clock, 1);
+ timer = OTG_TIMER_MS(OTG_TIME_A_WAIT_VRISE);
+- musb->xceiv.default_a = 1;
+- musb->xceiv.state = OTG_STATE_A_WAIT_VRISE;
++ musb->xceiv->default_a = 1;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+ devctl |= MUSB_DEVCTL_SESSION;
+
+ conf |= TUSB_DEV_CONF_USB_HOST_MODE;
+@@ -547,24 +549,24 @@ static void tusb_source_power(struct musb *musb, int is_on)
+ /* If ID pin is grounded, we want to be a_idle */
+ otg_stat = musb_readl(tbase, TUSB_DEV_OTG_STAT);
+ if (!(otg_stat & TUSB_DEV_OTG_STAT_ID_STATUS)) {
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_WAIT_VRISE:
+ case OTG_STATE_A_WAIT_BCON:
+- musb->xceiv.state = OTG_STATE_A_WAIT_VFALL;
++ musb->xceiv->state = OTG_STATE_A_WAIT_VFALL;
+ break;
+ case OTG_STATE_A_WAIT_VFALL:
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ break;
+ default:
+- musb->xceiv.state = OTG_STATE_A_IDLE;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
+ }
+ musb->is_active = 0;
+- musb->xceiv.default_a = 1;
++ musb->xceiv->default_a = 1;
+ MUSB_HST_MODE(musb);
+ } else {
+ musb->is_active = 0;
+- musb->xceiv.default_a = 0;
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->default_a = 0;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ MUSB_DEV_MODE(musb);
+ }
+
+@@ -675,7 +677,7 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)
+ else
+ default_a = is_host_enabled(musb);
+ DBG(2, "Default-%c\n", default_a ? 'A' : 'B');
+- musb->xceiv.default_a = default_a;
++ musb->xceiv->default_a = default_a;
+ tusb_source_power(musb, default_a);
+
+ /* Don't allow idling immediately */
+@@ -687,7 +689,7 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)
+ if (int_src & TUSB_INT_SRC_VBUS_SENSE_CHNG) {
+
+ /* B-dev state machine: no vbus ~= disconnect */
+- if ((is_otg_enabled(musb) && !musb->xceiv.default_a)
++ if ((is_otg_enabled(musb) && !musb->xceiv->default_a)
+ || !is_host_enabled(musb)) {
+ #ifdef CONFIG_USB_MUSB_HDRC_HCD
+ /* ? musb_root_disconnect(musb); */
+@@ -702,9 +704,9 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)
+
+ if (otg_stat & TUSB_DEV_OTG_STAT_SESS_END) {
+ DBG(1, "Forcing disconnect (no interrupt)\n");
+- if (musb->xceiv.state != OTG_STATE_B_IDLE) {
++ if (musb->xceiv->state != OTG_STATE_B_IDLE) {
+ /* INTR_DISCONNECT can hide... */
+- musb->xceiv.state = OTG_STATE_B_IDLE;
++ musb->xceiv->state = OTG_STATE_B_IDLE;
+ musb->int_usb |= MUSB_INTR_DISCONNECT;
+ }
+ musb->is_active = 0;
+@@ -718,7 +720,7 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)
+ DBG(2, "vbus change, %s, otg %03x\n",
+ otg_state_string(musb), otg_stat);
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_IDLE:
+ DBG(2, "Got SRP, turning on VBUS\n");
+ musb_set_vbus(musb, 1);
+@@ -766,7 +768,7 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)
+
+ DBG(4, "%s timer, %03x\n", otg_state_string(musb), otg_stat);
+
+- switch (musb->xceiv.state) {
++ switch (musb->xceiv->state) {
+ case OTG_STATE_A_WAIT_VRISE:
+ /* VBUS has probably been valid for a while now,
+ * but may well have bounced out of range a bit
+@@ -778,7 +780,7 @@ tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *tbase)
+ DBG(2, "devctl %02x\n", devctl);
+ break;
+ }
+- musb->xceiv.state = OTG_STATE_A_WAIT_BCON;
++ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+ musb->is_active = 0;
+ idle_timeout = jiffies
+ + msecs_to_jiffies(musb->a_wait_bcon);
+@@ -1094,9 +1096,14 @@ int __init musb_platform_init(struct musb *musb)
+ {
+ struct platform_device *pdev;
+ struct resource *mem;
+- void __iomem *sync;
++ void __iomem *sync = NULL;
+ int ret;
+
++ usb_nop_xceiv_register();
++ musb->xceiv = otg_get_transceiver();
++ if (!musb->xceiv)
++ return -ENODEV;
++
+ pdev = to_platform_device(musb->controller);
+
+ /* dma address for async dma */
+@@ -1107,14 +1114,16 @@ int __init musb_platform_init(struct musb *musb)
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ if (!mem) {
+ pr_debug("no sync dma resource?\n");
+- return -ENODEV;
++ ret = -ENODEV;
++ goto done;
+ }
+ musb->sync = mem->start;
+
+ sync = ioremap(mem->start, mem->end - mem->start + 1);
+ if (!sync) {
+ pr_debug("ioremap for sync failed\n");
+- return -ENOMEM;
++ ret = -ENOMEM;
++ goto done;
+ }
+ musb->sync_va = sync;
+
+@@ -1127,28 +1136,37 @@ int __init musb_platform_init(struct musb *musb)
+ if (ret) {
+ printk(KERN_ERR "Could not start tusb6010 (%d)\n",
+ ret);
+- return -ENODEV;
++ goto done;
+ }
+ musb->isr = tusb_interrupt;
+
+ if (is_host_enabled(musb))
+ musb->board_set_vbus = tusb_source_power;
+- if (is_peripheral_enabled(musb))
+- musb->xceiv.set_power = tusb_draw_power;
++ if (is_peripheral_enabled(musb)) {
++ musb->xceiv->set_power = tusb_draw_power;
++ the_musb = musb;
++ }
+
+ setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
+
++done:
++ if (ret < 0) {
++ if (sync)
++ iounmap(sync);
++ usb_nop_xceiv_unregister();
++ }
+ return ret;
+ }
+
+ int musb_platform_exit(struct musb *musb)
+ {
+ del_timer_sync(&musb_idle_timer);
++ the_musb = NULL;
+
+ if (musb->board_set_power)
+ musb->board_set_power(0);
+
+ iounmap(musb->sync_va);
+-
++ usb_nop_xceiv_unregister();
+ return 0;
+ }
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0027-musb-otg-timer-cleanup.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0027-musb-otg-timer-cleanup.patch
new file mode 100644
index 0000000000..f41b766cfe
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0027-musb-otg-timer-cleanup.patch
@@ -0,0 +1,198 @@
+From b4b8c1e7604784b9877f07400ff2a718118ef05c Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Tue, 31 Mar 2009 12:32:12 -0700
+Subject: [PATCH] musb: otg timer cleanup
+
+Minor cleanup of OTG timer handling:
+ * unify decls for OTG time constants, in the core header
+ * set up and use that timer in a more normal way
+ * move to the driver struct, so it's usable outside core
+
+And tighten use and setup of T(a_wait_bcon) so that if it's used,
+it's always valid. (If that timer expires, the A-device will
+stop powering VBUS. For non-OTG systems, that will be a surprise.)
+No behavioral changes, other than more consistency when applying
+that core HNP timeout.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.c | 41 ++++++++++++++++++++++-------------------
+ drivers/usb/musb/musb_core.h | 14 +++++++++++---
+ drivers/usb/musb/omap2430.c | 2 --
+ 3 files changed, 33 insertions(+), 24 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index ac150af..05c5dd3 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -112,6 +112,7 @@
+ #include "davinci.h"
+ #endif
+
++#define TA_WAIT_BCON(m) max_t(int, (m)->a_wait_bcon, OTG_TIME_A_WAIT_BCON)
+
+
+ unsigned musb_debug;
+@@ -288,12 +289,6 @@ const char *otg_state_string(struct musb *musb)
+ #ifdef CONFIG_USB_MUSB_OTG
+
+ /*
+- * See also USB_OTG_1-3.pdf 6.6.5 Timers
+- * REVISIT: Are the other timers done in the hardware?
+- */
+-#define TB_ASE0_BRST 100 /* Min 3.125 ms */
+-
+-/*
+ * Handles OTG hnp timeouts, such as b_ase0_brst
+ */
+ void musb_otg_timer_func(unsigned long data)
+@@ -320,10 +315,8 @@ void musb_otg_timer_func(unsigned long data)
+ spin_unlock_irqrestore(&musb->lock, flags);
+ }
+
+-static DEFINE_TIMER(musb_otg_timer, musb_otg_timer_func, 0, 0);
+-
+ /*
+- * Stops the B-device HNP state. Caller must take care of locking.
++ * Stops the HNP transition. Caller must take care of locking.
+ */
+ void musb_hnp_stop(struct musb *musb)
+ {
+@@ -661,11 +654,12 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ musb_g_reset(musb);
+ /* FALLTHROUGH */
+ case OTG_STATE_A_WAIT_BCON: /* OPT TD.4.7-900ms */
+- DBG(1, "HNP: Setting timer as %s\n",
+- otg_state_string(musb));
+- musb_otg_timer.data = (unsigned long)musb;
+- mod_timer(&musb_otg_timer, jiffies
+- + msecs_to_jiffies(100));
++ /* never use invalid T(a_wait_bcon) */
++ DBG(1, "HNP: in %s, %d msec timeout\n",
++ otg_state_string(musb),
++ TA_WAIT_BCON(musb));
++ mod_timer(&musb->otg_timer, jiffies
++ + msecs_to_jiffies(TA_WAIT_BCON(musb)));
+ break;
+ case OTG_STATE_A_PERIPHERAL:
+ musb_hnp_stop(musb);
+@@ -822,9 +816,9 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ #ifdef CONFIG_USB_MUSB_OTG
+ musb->xceiv->state = OTG_STATE_B_WAIT_ACON;
+ DBG(1, "HNP: Setting timer for b_ase0_brst\n");
+- musb_otg_timer.data = (unsigned long)musb;
+- mod_timer(&musb_otg_timer, jiffies
+- + msecs_to_jiffies(TB_ASE0_BRST));
++ mod_timer(&musb->otg_timer, jiffies
++ + msecs_to_jiffies(
++ OTG_TIME_B_ASE0_BRST));
+ #endif
+ }
+ break;
+@@ -1680,7 +1674,8 @@ musb_vbus_store(struct device *dev, struct device_attribute *attr,
+ }
+
+ spin_lock_irqsave(&musb->lock, flags);
+- musb->a_wait_bcon = val;
++ /* force T(a_wait_bcon) to be zero/unlimited *OR* valid */
++ musb->a_wait_bcon = val ? max_t(int, val, OTG_TIME_A_WAIT_BCON) : 0 ;
+ if (musb->xceiv->state == OTG_STATE_A_WAIT_BCON)
+ musb->is_active = 0;
+ musb_platform_try_idle(musb, jiffies + msecs_to_jiffies(val));
+@@ -1699,10 +1694,13 @@ musb_vbus_show(struct device *dev, struct device_attribute *attr, char *buf)
+
+ spin_lock_irqsave(&musb->lock, flags);
+ val = musb->a_wait_bcon;
++ /* FIXME get_vbus_status() is normally #defined as false...
++ * and is effectively TUSB-specific.
++ */
+ vbus = musb_platform_get_vbus_status(musb);
+ spin_unlock_irqrestore(&musb->lock, flags);
+
+- return sprintf(buf, "Vbus %s, timeout %lu\n",
++ return sprintf(buf, "Vbus %s, timeout %lu msec\n",
+ vbus ? "on" : "off", val);
+ }
+ static DEVICE_ATTR(vbus, 0644, musb_vbus_show, musb_vbus_store);
+@@ -1775,6 +1773,7 @@ allocate_instance(struct device *dev,
+ hcd->uses_new_polling = 1;
+
+ musb->vbuserr_retry = VBUSERR_RETRY_COUNT;
++ musb->a_wait_bcon = OTG_TIME_A_WAIT_BCON;
+ #else
+ musb = kzalloc(sizeof *musb, GFP_KERNEL);
+ if (!musb)
+@@ -1969,6 +1968,10 @@ bad_config:
+ if (status < 0)
+ goto fail2;
+
++#ifdef CONFIG_USB_OTG
++ setup_timer(&musb->otg_timer, musb_otg_timer_func, (unsigned long) musb);
++#endif
++
+ /* Init IRQ workqueue before request_irq */
+ INIT_WORK(&musb->irq_work, musb_irq_work);
+
+diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
+index c3ee348..cf3ccb0 100644
+--- a/drivers/usb/musb/musb_core.h
++++ b/drivers/usb/musb/musb_core.h
+@@ -40,6 +40,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/smp_lock.h>
+ #include <linux/errno.h>
++#include <linux/timer.h>
+ #include <linux/clk.h>
+ #include <linux/device.h>
+ #include <linux/usb/ch9.h>
+@@ -180,10 +181,15 @@ enum musb_g_ep0_state {
+ MUSB_EP0_STAGE_ACKWAIT, /* after zlp, before statusin */
+ } __attribute__ ((packed));
+
+-/* OTG protocol constants */
++/*
++ * OTG protocol constants. See USB OTG 1.3 spec,
++ * sections 5.5 "Device Timings" and 6.6.5 "Timers".
++ */
+ #define OTG_TIME_A_WAIT_VRISE 100 /* msec (max) */
+-#define OTG_TIME_A_WAIT_BCON 0 /* 0=infinite; min 1000 msec */
+-#define OTG_TIME_A_IDLE_BDIS 200 /* msec (min) */
++#define OTG_TIME_A_WAIT_BCON 1100 /* min 1 second */
++#define OTG_TIME_A_AIDL_BDIS 200 /* min 200 msec */
++#define OTG_TIME_B_ASE0_BRST 100 /* min 3.125 ms */
++
+
+ /*************************** REGISTER ACCESS ********************************/
+
+@@ -332,6 +338,8 @@ struct musb {
+ struct list_head control; /* of musb_qh */
+ struct list_head in_bulk; /* of musb_qh */
+ struct list_head out_bulk; /* of musb_qh */
++
++ struct timer_list otg_timer;
+ #endif
+
+ /* called with IRQs blocked; ON/nonzero implies starting a session,
+diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
+index 5f67b03..3fbc807 100644
+--- a/drivers/usb/musb/omap2430.c
++++ b/drivers/usb/musb/omap2430.c
+@@ -45,7 +45,6 @@
+ #define get_cpu_rev() 2
+ #endif
+
+-#define MUSB_TIMEOUT_A_WAIT_BCON 1100
+
+ static struct timer_list musb_idle_timer;
+
+@@ -246,7 +245,6 @@ int __init musb_platform_init(struct musb *musb)
+
+ if (is_host_enabled(musb))
+ musb->board_set_vbus = omap_set_vbus;
+- musb->a_wait_bcon = MUSB_TIMEOUT_A_WAIT_BCON;
+
+ setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
+
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0028-musb-make-initial-HNP-roleswitch-work-v2.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0028-musb-make-initial-HNP-roleswitch-work-v2.patch
new file mode 100644
index 0000000000..6269016223
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0028-musb-make-initial-HNP-roleswitch-work-v2.patch
@@ -0,0 +1,133 @@
+From a637c5056ef52fbb7c41eb7537a9ec3d150231ad Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Thu, 2 Apr 2009 10:16:11 -0700
+Subject: [PATCH] musb: make initial HNP roleswitch work (v2)
+
+Minor HNP bugfixes, so the initial role switch works:
+
+ - A-Device:
+ * disconnect-during-suspend enters A_PERIPHERAL state
+ * kill OTG timer after reset as A_PERIPHERAL ...
+ * ... and also pass that reset to the gadget
+ * once HNP succeeds, clear the "ignore_disconnect" flag
+ * from A_PERIPHERAL, disconnect transitions to A_WAIT_BCON
+
+ - B-Device:
+ * kill OTG timer on entry to B_HOST state (HNP succeeded)
+ * once HNP succeeds, clear "ignore_disconnect" flag
+ * kick the root hub only _after_ the state is adjusted
+
+Other state transitions are left alone. Notably, exit paths from
+the "roles have switched" state ... A_PERIPHERAL handling of that
+stays seriously broken.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.c | 27 ++++++++++++++++-----------
+ drivers/usb/musb/musb_gadget.c | 2 +-
+ drivers/usb/musb/musb_virthub.c | 11 ++++++++++-
+ 3 files changed, 27 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index 05c5dd3..9dc995a 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -587,28 +587,23 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ if (devctl & MUSB_DEVCTL_LSDEV)
+ musb->port1_status |= USB_PORT_STAT_LOW_SPEED;
+
+- if (hcd->status_urb)
+- usb_hcd_poll_rh_status(hcd);
+- else
+- usb_hcd_resume_root_hub(hcd);
+-
+- MUSB_HST_MODE(musb);
+-
+ /* indicate new connection to OTG machine */
+ switch (musb->xceiv->state) {
+ case OTG_STATE_B_PERIPHERAL:
+ if (int_usb & MUSB_INTR_SUSPEND) {
+ DBG(1, "HNP: SUSPEND+CONNECT, now b_host\n");
+- musb->xceiv->state = OTG_STATE_B_HOST;
+- hcd->self.is_b_host = 1;
+ int_usb &= ~MUSB_INTR_SUSPEND;
++ goto b_host;
+ } else
+ DBG(1, "CONNECT as b_peripheral???\n");
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+- DBG(1, "HNP: Waiting to switch to b_host state\n");
++ DBG(1, "HNP: CONNECT, now b_host\n");
++b_host:
+ musb->xceiv->state = OTG_STATE_B_HOST;
+ hcd->self.is_b_host = 1;
++ musb->ignore_disconnect = 0;
++ del_timer(&musb->otg_timer);
+ break;
+ default:
+ if ((devctl & MUSB_DEVCTL_VBUS)
+@@ -618,6 +613,14 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ }
+ break;
+ }
++
++ /* poke the root hub */
++ MUSB_HST_MODE(musb);
++ if (hcd->status_urb)
++ usb_hcd_poll_rh_status(hcd);
++ else
++ usb_hcd_resume_root_hub(hcd);
++
+ DBG(1, "CONNECT (%s) devctl %02x\n",
+ otg_state_string(musb), devctl);
+ }
+@@ -662,7 +665,9 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
+ + msecs_to_jiffies(TA_WAIT_BCON(musb)));
+ break;
+ case OTG_STATE_A_PERIPHERAL:
+- musb_hnp_stop(musb);
++ musb->ignore_disconnect = 0;
++ del_timer(&musb->otg_timer);
++ musb_g_reset(musb);
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+ DBG(1, "HNP: RESET (%s), to b_peripheral\n",
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index 2fbfba5..7dd3d59 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -1964,7 +1964,7 @@ void musb_g_disconnect(struct musb *musb)
+ musb->xceiv->state = OTG_STATE_A_IDLE;
+ break;
+ case OTG_STATE_A_PERIPHERAL:
+- musb->xceiv->state = OTG_STATE_A_WAIT_VFALL;
++ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+ case OTG_STATE_B_HOST:
+diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
+index 7e7900f..14f7cf3 100644
+--- a/drivers/usb/musb/musb_virthub.c
++++ b/drivers/usb/musb/musb_virthub.c
+@@ -187,8 +187,17 @@ void musb_root_disconnect(struct musb *musb)
+ musb->is_active = 0;
+
+ switch (musb->xceiv->state) {
+- case OTG_STATE_A_HOST:
+ case OTG_STATE_A_SUSPEND:
++#ifdef CONFIG_USB_MUSB_OTG
++ if (is_otg_enabled(musb)
++ && musb->xceiv->host->b_hnp_enable) {
++ musb->xceiv->state = OTG_STATE_A_PERIPHERAL;
++ musb->g.is_a_peripheral = 1;
++ break;
++ }
++#endif
++ /* FALLTHROUGH */
++ case OTG_STATE_A_HOST:
+ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
+ musb->is_active = 0;
+ break;
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/musb/0029-musb-support-disconnect-after-HNP-roleswitch.patch b/recipes/linux/linux-kexecboot-2.6.29/musb/0029-musb-support-disconnect-after-HNP-roleswitch.patch
new file mode 100644
index 0000000000..fc34fb983e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/musb/0029-musb-support-disconnect-after-HNP-roleswitch.patch
@@ -0,0 +1,145 @@
+From 4288b7df4ae6629a4fb14aca2c489da01d4d19c3 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+Date: Tue, 31 Mar 2009 12:35:09 -0700
+Subject: [PATCH] musb: support disconnect after HNP roleswitch
+
+Adjust HNP state machines in MUSB driver so that they handle the
+case where the cable is disconnected. The A-side machine was
+very wrong (unrecoverable); the B-Side was much less so.
+
+ - A_PERIPHERAL ... as usual, the non-observability of the ID
+ pin through Mentor's registers makes trouble. We can't go
+ directly to A_WAIT_VFALL to end the session and start the
+ disconnect processing. We can however sense link suspending,
+ go to A_WAIT_BCON, and from there use OTG timeouts to finally
+ trigger that A_WAIT_VFALL transition. (Hoping that nobody
+ reconnects quickly to that port and notices the wrong state.)
+
+ - B_HOST ... actually clear the Host Request (HR) bit as the
+ messages say, disconnect the peripheral from the root hub,
+ and don't detour through a suspend state. (In some cases
+ this would eventually have cleaned up.)
+
+Also adjust the A_SUSPEND transition to respect the A_AIDL_BDIS
+timeout, so if HNP doesn't trigger quickly enough the A_WAIT_VFALL
+transition happens as it should.
+
+Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
+---
+ drivers/usb/musb/musb_core.c | 41 +++++++++++++++++++++++++++-----------
+ drivers/usb/musb/musb_gadget.c | 2 +
+ drivers/usb/musb/musb_virthub.c | 4 +++
+ 3 files changed, 35 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index 9dc995a..5770ccb 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -304,9 +304,11 @@ void musb_otg_timer_func(unsigned long data)
+ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
+ musb->is_active = 0;
+ break;
++ case OTG_STATE_A_SUSPEND:
+ case OTG_STATE_A_WAIT_BCON:
+- DBG(1, "HNP: a_wait_bcon timeout; back to a_host\n");
+- musb_hnp_stop(musb);
++ DBG(1, "HNP: %s timeout\n", otg_state_string(musb));
++ musb_set_vbus(musb, 0);
++ musb->xceiv->state = OTG_STATE_A_WAIT_VFALL;
+ break;
+ default:
+ DBG(1, "HNP: Unhandled mode %s\n", otg_state_string(musb));
+@@ -324,15 +326,12 @@ void musb_hnp_stop(struct musb *musb)
+ void __iomem *mbase = musb->mregs;
+ u8 reg;
+
++ DBG(1, "HNP: stop from %s\n", otg_state_string(musb));
++
+ switch (musb->xceiv->state) {
+ case OTG_STATE_A_PERIPHERAL:
+- case OTG_STATE_A_WAIT_VFALL:
+- case OTG_STATE_A_WAIT_BCON:
+- DBG(1, "HNP: Switching back to A-host\n");
+ musb_g_disconnect(musb);
+- musb->xceiv->state = OTG_STATE_A_IDLE;
+- MUSB_HST_MODE(musb);
+- musb->is_active = 0;
++ DBG(1, "HNP: back to %s\n", otg_state_string(musb));
+ break;
+ case OTG_STATE_B_HOST:
+ DBG(1, "HNP: Disabling HR\n");
+@@ -775,7 +774,16 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ #endif /* HOST */
+ #ifdef CONFIG_USB_MUSB_OTG
+ case OTG_STATE_B_HOST:
+- musb_hnp_stop(musb);
++ /* REVISIT this behaves for "real disconnect"
++ * cases; make sure the other transitions from
++ * from B_HOST act right too. The B_HOST code
++ * in hnp_stop() is currently not used...
++ */
++ musb_root_disconnect(musb);
++ musb_to_hcd(musb)->self.is_b_host = 0;
++ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
++ MUSB_DEV_MODE(musb);
++ musb_g_disconnect(musb);
+ break;
+ case OTG_STATE_A_PERIPHERAL:
+ musb_hnp_stop(musb);
+@@ -807,10 +815,19 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
+ switch (musb->xceiv->state) {
+ #ifdef CONFIG_USB_MUSB_OTG
+ case OTG_STATE_A_PERIPHERAL:
+- /*
+- * We cannot stop HNP here, devctl BDEVICE might be
+- * still set.
++ /* We also come here if the cable is removed, since
++ * this silicon doesn't report ID-no-longer-grounded.
++ *
++ * We depend on T(a_wait_bcon) to shut us down, and
++ * hope users don't do anything dicey during this
++ * undesired detour through A_WAIT_BCON.
+ */
++ musb_hnp_stop(musb);
++ usb_hcd_resume_root_hub(musb_to_hcd(musb));
++ musb_root_disconnect(musb);
++ musb_platform_try_idle(musb, jiffies
++ + msecs_to_jiffies(musb->a_wait_bcon
++ ? : OTG_TIME_A_WAIT_BCON));
+ break;
+ #endif
+ case OTG_STATE_B_PERIPHERAL:
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index 7dd3d59..8b3c4e2 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -1962,9 +1962,11 @@ void musb_g_disconnect(struct musb *musb)
+ DBG(2, "Unhandled disconnect %s, setting a_idle\n",
+ otg_state_string(musb));
+ musb->xceiv->state = OTG_STATE_A_IDLE;
++ MUSB_HST_MODE(musb);
+ break;
+ case OTG_STATE_A_PERIPHERAL:
+ musb->xceiv->state = OTG_STATE_A_WAIT_BCON;
++ MUSB_HST_MODE(musb);
+ break;
+ case OTG_STATE_B_WAIT_ACON:
+ case OTG_STATE_B_HOST:
+diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
+index 14f7cf3..e8ef925 100644
+--- a/drivers/usb/musb/musb_virthub.c
++++ b/drivers/usb/musb/musb_virthub.c
+@@ -83,6 +83,10 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
+ musb->xceiv->state = OTG_STATE_A_SUSPEND;
+ musb->is_active = is_otg_enabled(musb)
+ && musb->xceiv->host->b_hnp_enable;
++ if (musb->is_active)
++ mod_timer(&musb->otg_timer, jiffies
++ + msecs_to_jiffies(
++ OTG_TIME_A_AIDL_BDIS));
+ musb_platform_try_idle(musb, 0);
+ break;
+ #ifdef CONFIG_USB_MUSB_OTG
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/no-cortex-deadlock.patch b/recipes/linux/linux-kexecboot-2.6.29/no-cortex-deadlock.patch
new file mode 100644
index 0000000000..78547c8969
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/no-empty-flash-warnings.patch b/recipes/linux/linux-kexecboot-2.6.29/no-empty-flash-warnings.patch
new file mode 100644
index 0000000000..ab344b0449
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/no-harry-potter.diff b/recipes/linux/linux-kexecboot-2.6.29/no-harry-potter.diff
new file mode 100644
index 0000000000..2bb20ab9c0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/no-harry-potter.diff
@@ -0,0 +1,11 @@
+--- /tmp/Makefile 2008-04-24 14:36:20.509598016 +0200
++++ git/arch/arm/Makefile 2008-04-24 14:36:31.949546584 +0200
+@@ -47,7 +47,7 @@
+ # Note that GCC does not numerically define an architecture version
+ # macro, but instead defines a whole series of macros which makes
+ # testing for a specific architecture or later rather impossible.
+-arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
++arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
+ arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
+ # Only override the compiler option if ARMv6. The ARMv6K extensions are
+ # always available in ARMv7
diff --git a/recipes/linux/linux-kexecboot-2.6.29/omap-2430-lcd.patch b/recipes/linux/linux-kexecboot-2.6.29/omap-2430-lcd.patch
new file mode 100644
index 0000000000..8f8a687c06
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/omap-2430-lcd.patch
@@ -0,0 +1,11 @@
+--- git/drivers/video/omap/lcd_2430sdp.c.orig 2007-08-13 14:35:17.000000000 -0700
++++ git/drivers/video/omap/lcd_2430sdp.c 2007-08-13 14:35:55.000000000 -0700
+@@ -32,7 +32,7 @@
+ #define LCD_PANEL_BACKLIGHT_GPIO 91
+ #define LCD_PANEL_ENABLE_GPIO 154
+ #define LCD_PIXCLOCK_MAX 5400 /* freq 5.4 MHz */
+-#define PM_RECEIVER TWL4030_MODULE_PM_RECIEVER
++#define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER
+ #define ENABLE_VAUX2_DEDICATED 0x09
+ #define ENABLE_VAUX2_DEV_GRP 0x20
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/omap1710h3/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omap1710h3/defconfig
new file mode 100644
index 0000000000..21f7c54e4e
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/omap2420h4/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omap2420h4/defconfig
new file mode 100644
index 0000000000..c1133eef9a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/omap2430sdp/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omap2430sdp/defconfig
new file mode 100644
index 0000000000..f3897e48a3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/omap3-pandora/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omap3-pandora/defconfig
new file mode 100644
index 0000000000..8ac420cc31
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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=n
+
+#
+# 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-kexecboot-2.6.29/omap3evm/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omap3evm/defconfig
new file mode 100644
index 0000000000..05f1dddaad
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/omap3evm/defconfig
@@ -0,0 +1,2126 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-omap1
+# Thu Jul 16 16:20:40 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 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_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=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_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 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=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_IOMMU 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=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+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 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=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_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 is not set
+
+#
+# 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_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_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_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_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=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_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_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+CONFIG_FIXED_PHY=y
+CONFIG_MDIO_BITBANG=y
+# CONFIG_MDIO_GPIO 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=y
+# 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=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
+
+#
+# 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 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_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_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=y
+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=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=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
+# 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_VIDEO_OMAP3 is not set
+# CONFIG_VIDEO_OMAP34XX_ISP_RESIZER 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=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_BOOTLOADER_INIT is not set
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_VRAM_SIZE=4
+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 is not set
+CONFIG_PANEL_SHARP_LS037V7DW01=y
+# 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=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_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 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_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 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_I2C_AND_SPI=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_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 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_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 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_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_SIEMENS_MPI 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_OPTICON is not set
+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_IMX 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_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=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_NOP_USB_XCEIV=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_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 is not set
+# 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=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=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
+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=m
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=m
+# 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=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 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=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_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=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=m
+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-kexecboot-2.6.29/omap3evm/omap3evm-dss2.diff b/recipes/linux/linux-kexecboot-2.6.29/omap3evm/omap3evm-dss2.diff
new file mode 100644
index 0000000000..60832e72ca
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/omap3evm/omap3evm-lcd-redtint.diff b/recipes/linux/linux-kexecboot-2.6.29/omap3evm/omap3evm-lcd-redtint.diff
new file mode 100644
index 0000000000..54ea3c9f68
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/omap5912osk/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omap5912osk/defconfig
new file mode 100644
index 0000000000..3c334868ea
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/omapzoom/defconfig b/recipes/linux/linux-kexecboot-2.6.29/omapzoom/defconfig
new file mode 100644
index 0000000000..aa11eb04fc
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/omapzoom/defconfig
@@ -0,0 +1,1951 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-omap1
+# Mon Mar 30 15:25:29 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=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=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=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 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=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=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_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=y
+# 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 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=n
+
+#
+# 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_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=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_BRIDGE=m
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# 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 is not set
+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 is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIBRF6150 is not set
+# CONFIG_BT_HCIH4P is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+# 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=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=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=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 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=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 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=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+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 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 is not set
+# CONFIG_ENC28J60 is not set
+CONFIG_SMC911X=y
+# 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 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 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
+
+#
+# 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=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_CDCETHER=y
+# 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=y
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+CONFIG_USB_NET_RNDIS_HOST=y
+CONFIG_USB_NET_CDC_SUBSET=y
+# 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=y
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+CONFIG_PPPOL2TP=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_JOYDEV=m
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_TWL4030=y
+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_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=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 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=y
+# 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=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+# CONFIG_W1_MASTER_DS1WM is not set
+# CONFIG_W1_MASTER_GPIO is not set
+CONFIG_HDQ_MASTER_OMAP=y
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# 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=y
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_TWL4030_BCI_BATTERY=y
+# CONFIG_BATTERY_BQ27x00 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=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_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_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_TVP514X 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_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VIDEO_CLASS is not set
+# CONFIG_USB_GSPCA is not set
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_ZR364XX 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_DAB=y
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=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=y
+CONFIG_FB_BOTH_ENDIAN=y
+# CONFIG_FB_BIG_ENDIAN is not set
+# CONFIG_FB_LITTLE_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=y
+CONFIG_FB_OMAP_LCD_VGA=y
+# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=14
+# CONFIG_OMAP2_DSS 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_GENERIC=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO 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=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=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 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=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_CAIAQ=y
+# CONFIG_SND_USB_CAIAQ_INPUT is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_SOC_I2C_AND_SPI=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 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 is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+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_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 is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+# 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=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=y
+CONFIG_USB_M66592=y
+# 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=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 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=y
+CONFIG_LEDS_OMAP_PWM=y
+# 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=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 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=y
+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=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=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=y
+# CONFIG_NFS_V4 is not set
+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_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=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=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_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=y
+# 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=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 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_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=y
+CONFIG_CRC_ITU_T=y
+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-kexecboot-2.6.29/overo/defconfig b/recipes/linux/linux-kexecboot-2.6.29/overo/defconfig
new file mode 100644
index 0000000000..0101ca5099
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/overo/defconfig
@@ -0,0 +1,2248 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-omap1
+# Wed Apr 8 18:20: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=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_IOMMU 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=" 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 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
+# 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_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=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_VIDEO_OMAP3 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=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO 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 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=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_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 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-kexecboot-2.6.29/overo/ehci.patch b/recipes/linux/linux-kexecboot-2.6.29/overo/ehci.patch
new file mode 100644
index 0000000000..72c6b9bec3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/read_die_ids.patch b/recipes/linux/linux-kexecboot-2.6.29/read_die_ids.patch
new file mode 100644
index 0000000000..3f6c930cc1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-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-kexecboot-2.6.29/timer-suppression.patch b/recipes/linux/linux-kexecboot-2.6.29/timer-suppression.patch
new file mode 100644
index 0000000000..04362c96e3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/timer-suppression.patch
@@ -0,0 +1,43 @@
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index b854a89..26f5569 100644
+--- a/kernel/time/tick-sched.c
++++ b/kernel/time/tick-sched.c
+@@ -253,6 +253,16 @@ void tick_nohz_stop_sched_tick(void)
+
+ /* Schedule the tick, if we are at least one jiffie off */
+ if ((long)delta_jiffies >= 1) {
++ /*
++ * calculate the expiry time for the next timer wheel
++ * timer
++ */
++ expires = ktime_add_ns(last_update, tick_period.tv64 *
++ delta_jiffies);
++
++ /* Skip reprogram of event if its not changed */
++ if(ts->tick_stopped && ktime_equal(expires, dev->next_event))
++ goto out2;
+
+ if (delta_jiffies > 1)
+ cpu_set(cpu, nohz_cpu_mask);
+@@ -304,12 +314,7 @@ void tick_nohz_stop_sched_tick(void)
+ goto out;
+ }
+
+- /*
+- * calculate the expiry time for the next timer wheel
+- * timer
+- */
+- expires = ktime_add_ns(last_update, tick_period.tv64 *
+- delta_jiffies);
++ /* Mark expiries */
+ ts->idle_expires = expires;
+
+ if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
+@@ -328,6 +333,7 @@ void tick_nohz_stop_sched_tick(void)
+ tick_do_update_jiffies64(ktime_get());
+ cpu_clear(cpu, nohz_cpu_mask);
+ }
++out2:
+ raise_softirq_irqoff(TIMER_SOFTIRQ);
+ out:
+ ts->next_jiffies = next_jiffies;
diff --git a/recipes/linux/linux-kexecboot-2.6.29/touchscreen.patch b/recipes/linux/linux-kexecboot-2.6.29/touchscreen.patch
new file mode 100644
index 0000000000..2325c401e4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/touchscreen.patch
@@ -0,0 +1,22 @@
+diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
+index d8109ae..f8ce669 100644
+--- a/arch/arm/mach-omap2/board-omap3evm.c
++++ b/arch/arm/mach-omap2/board-omap3evm.c
+@@ -128,8 +128,16 @@ static int ads7846_get_pendown_state(void)
+ }
+
+ struct ads7846_platform_data ads7846_config = {
++ .x_max = 0x0fff,
++ .y_max = 0x0fff,
++ .x_plate_ohms = 180,
++ .pressure_max = 255,
++ .debounce_max = 10,
++ .debounce_tol = 3,
++ .debounce_rep = 1,
+ .get_pendown_state = ads7846_get_pendown_state,
+ .keep_vref_on = 1,
++ .settle_delay_usecs = 150,
+ };
+
+ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/usbttyfix.patch b/recipes/linux/linux-kexecboot-2.6.29/usbttyfix.patch
new file mode 100644
index 0000000000..997705a31b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/usbttyfix.patch
@@ -0,0 +1,29 @@
+To get USB HOST mode working on USB OTG Port with USB TTY enabled U-boot
+
+Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
+---
+--- linux-2.6.git/drivers/usb/musb/omap2430.c 2009-01-19 22:42:18.000000000 +0530
++++ linux-2.6.git/drivers/usb/musb/omap2430.c 2009-02-19 12:45:22.000000000 +0530
+@@ -33,6 +33,7 @@
+ #include <linux/list.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
++#include <linux/i2c/twl4030.h>
+
+ #include <asm/mach-types.h>
+ #include <mach/hardware.h>
+@@ -233,6 +234,14 @@ int __init musb_platform_init(struct mus
+ omap_cfg_reg(AE5_2430_USB0HS_STP);
+ #endif
+
++ /* Reset MUSB Controller */
++ omap_writel(SOFTRST,OTG_SYSCONFIG);
++
++#if defined(CONFIG_TWL4030_USB)
++ /* Reset the TWL USB PHY */
++ twl4030_i2c_write_u8(TWL4030_MODULE_USB, 0x60, 0x4);
++#endif
++
+ musb->xceiv = *x;
+ musb_platform_resume(musb);
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/vfp/01-vfp-pm.patch b/recipes/linux/linux-kexecboot-2.6.29/vfp/01-vfp-pm.patch
new file mode 100644
index 0000000000..70d4d1efc5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/vfp/01-vfp-pm.patch
@@ -0,0 +1,128 @@
+From: Ben Dooks <ben-linux@fluff.org>
+Date: Thu, 18 Dec 2008 10:26:54 +0000 (+0100)
+Subject: 5349/1: VFP: Add PM code to save and restore current VFP state
+X-Git-Url: http://siarhei.siamashka.name/gitweb/?p=linux-omap-2.6.git;a=commitdiff_plain;h=d504d72ad38e54b5feda67e956834348d6a500e1
+
+5349/1: VFP: Add PM code to save and restore current VFP state
+
+[ARM] 5349/1: VFP: Add PM code to save and restore current VFP state
+
+When CONFIG_PM is selected, the VFP code does not have any handler
+installed to deal with either saving the VFP state of the current
+task, nor does it do anything to try and restore the VFP after a
+resume.
+
+On resume, the VFP will have been reset and the co-processor access
+control registers are in an indeterminate state (very probably the
+CP10 and CP11 the VFP uses will have been disabled by the ARM core
+reset). When this happens, resume will break as soon as it tries to
+unfreeze the tasks and restart scheduling.
+
+Add a sys device to allow us to hook the suspend call to save the
+current thread state if the thread is using VFP and a resume hook
+which restores the CP10/CP11 access and ensures the VFP is disabled
+so that the lazy swapping will take place on next access.
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+
+diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h
+index c85860b..8de86e4 100644
+--- a/arch/arm/vfp/vfp.h
++++ b/arch/arm/vfp/vfp.h
+@@ -377,6 +377,6 @@ struct op {
+ u32 flags;
+ };
+
+-#ifdef CONFIG_SMP
++#if defined(CONFIG_SMP) || defined(CONFIG_PM)
+ extern void vfp_save_state(void *location, u32 fpexc);
+ #endif
+diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
+index a62dcf7..b21f43f 100644
+--- a/arch/arm/vfp/vfphw.S
++++ b/arch/arm/vfp/vfphw.S
+@@ -166,7 +166,7 @@ process_exception:
+ @ retry the faulted instruction
+ ENDPROC(vfp_support_entry)
+
+-#ifdef CONFIG_SMP
++#if defined(CONFIG_SMP) || defined(CONFIG_PM)
+ ENTRY(vfp_save_state)
+ @ Save the current VFP state
+ @ r0 - save location
+diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
+index 67ca340..9f476a1 100644
+--- a/arch/arm/vfp/vfpmodule.c
++++ b/arch/arm/vfp/vfpmodule.c
+@@ -322,6 +322,61 @@ static void vfp_enable(void *unused)
+ set_copro_access(access | CPACC_FULL(10) | CPACC_FULL(11));
+ }
+
++#ifdef CONFIG_PM
++#include <linux/sysdev.h>
++
++static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state)
++{
++ struct thread_info *ti = current_thread_info();
++ u32 fpexc = fmrx(FPEXC);
++
++ /* if vfp is on, then save state for resumption */
++ if (fpexc & FPEXC_EN) {
++ printk(KERN_DEBUG "%s: saving vfp state\n", __func__);
++ vfp_save_state(&ti->vfpstate, fpexc);
++
++ /* disable, just in case */
++ fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
++ }
++
++ /* clear any information we had about last context state */
++ memset(last_VFP_context, 0, sizeof(last_VFP_context));
++
++ return 0;
++}
++
++static int vfp_pm_resume(struct sys_device *dev)
++{
++ /* ensure we have access to the vfp */
++ vfp_enable(NULL);
++
++ /* and disable it to ensure the next usage restores the state */
++ fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
++
++ return 0;
++}
++
++static struct sysdev_class vfp_pm_sysclass = {
++ .name = "vfp",
++ .suspend = vfp_pm_suspend,
++ .resume = vfp_pm_resume,
++};
++
++static struct sys_device vfp_pm_sysdev = {
++ .cls = &vfp_pm_sysclass,
++};
++
++static void vfp_pm_init(void)
++{
++ sysdev_class_register(&vfp_pm_sysclass);
++ sysdev_register(&vfp_pm_sysdev);
++}
++
++
++#else
++static inline void vfp_pm_init(void) { }
++#endif /* CONFIG_PM */
++
+ #include <linux/smp.h>
+
+ /*
+@@ -365,6 +420,7 @@ static int __init vfp_init(void)
+ vfp_vector = vfp_support_entry;
+
+ thread_register_notifier(&vfp_notifier_block);
++ vfp_pm_init();
+
+ /*
+ * We detected VFP, and the support code is
diff --git a/recipes/linux/linux-kexecboot-2.6.29/vfp/02-vfp-ptrace.patch b/recipes/linux/linux-kexecboot-2.6.29/vfp/02-vfp-ptrace.patch
new file mode 100644
index 0000000000..feba206f95
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/vfp/02-vfp-ptrace.patch
@@ -0,0 +1,231 @@
+From: Catalin Marinas <catalin.marinas@arm.com>
+Date: Wed, 11 Feb 2009 11:12:56 +0000 (+0100)
+Subject: 5387/1: Add ptrace VFP support on ARM
+X-Git-Url: http://siarhei.siamashka.name/gitweb/?p=linux-omap-2.6.git;a=commitdiff_plain;h=4dd5beb2244f15c895aba46474bd89545327d1a6
+
+5387/1: Add ptrace VFP support on ARM
+
+[ARM] 5387/1: Add ptrace VFP support on ARM
+
+This patch adds ptrace support for setting and getting the VFP registers
+using PTRACE_SETVFPREGS and PTRACE_GETVFPREGS. The user_vfp structure
+defined in asm/user.h contains 32 double registers (to cover VFPv3 and
+Neon hardware) and the FPSCR register.
+
+Cc: Paul Brook <paul@codesourcery.com>
+Cc: Daniel Jacobowitz <dan@codesourcery.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+
+diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
+index 7319261..236a06b 100644
+--- a/arch/arm/include/asm/ptrace.h
++++ b/arch/arm/include/asm/ptrace.h
+@@ -27,6 +27,8 @@
+ /* PTRACE_SYSCALL is 24 */
+ #define PTRACE_GETCRUNCHREGS 25
+ #define PTRACE_SETCRUNCHREGS 26
++#define PTRACE_GETVFPREGS 27
++#define PTRACE_SETVFPREGS 28
+
+ /*
+ * PSR bits
+diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
+index 68b9ec8..b9dc8a8 100644
+--- a/arch/arm/include/asm/thread_info.h
++++ b/arch/arm/include/asm/thread_info.h
+@@ -113,6 +113,8 @@ extern void iwmmxt_task_restore(struct thread_info *, void *);
+ extern void iwmmxt_task_release(struct thread_info *);
+ extern void iwmmxt_task_switch(struct thread_info *);
+
++extern void vfp_sync_state(struct thread_info *thread);
++
+ #endif
+
+ /*
+diff --git a/arch/arm/include/asm/user.h b/arch/arm/include/asm/user.h
+index 825c1e7..df95e05 100644
+--- a/arch/arm/include/asm/user.h
++++ b/arch/arm/include/asm/user.h
+@@ -81,4 +81,13 @@ struct user{
+ #define HOST_TEXT_START_ADDR (u.start_code)
+ #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
++/*
++ * User specific VFP registers. If only VFPv2 is present, registers 16 to 31
++ * are ignored by the ptrace system call.
++ */
++struct user_vfp {
++ unsigned long long fpregs[32];
++ unsigned long fpscr;
++};
++
+ #endif /* _ARM_USER_H */
+diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
+index df653ea..89882a1 100644
+--- a/arch/arm/kernel/ptrace.c
++++ b/arch/arm/kernel/ptrace.c
+@@ -653,6 +653,54 @@ static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp)
+ }
+ #endif
+
++#ifdef CONFIG_VFP
++/*
++ * Get the child VFP state.
++ */
++static int ptrace_getvfpregs(struct task_struct *tsk, void __user *data)
++{
++ struct thread_info *thread = task_thread_info(tsk);
++ union vfp_state *vfp = &thread->vfpstate;
++ struct user_vfp __user *ufp = data;
++
++ vfp_sync_state(thread);
++
++ /* copy the floating point registers */
++ if (copy_to_user(&ufp->fpregs, &vfp->hard.fpregs,
++ sizeof(vfp->hard.fpregs)))
++ return -EFAULT;
++
++ /* copy the status and control register */
++ if (put_user(vfp->hard.fpscr, &ufp->fpscr))
++ return -EFAULT;
++
++ return 0;
++}
++
++/*
++ * Set the child VFP state.
++ */
++static int ptrace_setvfpregs(struct task_struct *tsk, void __user *data)
++{
++ struct thread_info *thread = task_thread_info(tsk);
++ union vfp_state *vfp = &thread->vfpstate;
++ struct user_vfp __user *ufp = data;
++
++ vfp_sync_state(thread);
++
++ /* copy the floating point registers */
++ if (copy_from_user(&vfp->hard.fpregs, &ufp->fpregs,
++ sizeof(vfp->hard.fpregs)))
++ return -EFAULT;
++
++ /* copy the status and control register */
++ if (get_user(vfp->hard.fpscr, &ufp->fpscr))
++ return -EFAULT;
++
++ return 0;
++}
++#endif
++
+ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+ {
+ int ret;
+@@ -775,6 +823,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+ break;
+ #endif
+
++#ifdef CONFIG_VFP
++ case PTRACE_GETVFPREGS:
++ ret = ptrace_getvfpregs(child, (void __user *)data);
++ break;
++
++ case PTRACE_SETVFPREGS:
++ ret = ptrace_setvfpregs(child, (void __user *)data);
++ break;
++#endif
++
+ default:
+ ret = ptrace_request(child, request, addr, data);
+ break;
+diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h
+index 8de86e4..c8c98dd 100644
+--- a/arch/arm/vfp/vfp.h
++++ b/arch/arm/vfp/vfp.h
+@@ -377,6 +377,4 @@ struct op {
+ u32 flags;
+ };
+
+-#if defined(CONFIG_SMP) || defined(CONFIG_PM)
+ extern void vfp_save_state(void *location, u32 fpexc);
+-#endif
+diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
+index b21f43f..902d396 100644
+--- a/arch/arm/vfp/vfphw.S
++++ b/arch/arm/vfp/vfphw.S
+@@ -166,7 +166,6 @@ process_exception:
+ @ retry the faulted instruction
+ ENDPROC(vfp_support_entry)
+
+-#if defined(CONFIG_SMP) || defined(CONFIG_PM)
+ ENTRY(vfp_save_state)
+ @ Save the current VFP state
+ @ r0 - save location
+@@ -181,7 +180,6 @@ ENTRY(vfp_save_state)
+ stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
+ mov pc, lr
+ ENDPROC(vfp_save_state)
+-#endif
+
+ last_VFP_context_address:
+ .word last_VFP_context
+diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
+index 9f476a1..7e12390 100644
+--- a/arch/arm/vfp/vfpmodule.c
++++ b/arch/arm/vfp/vfpmodule.c
+@@ -377,6 +377,55 @@ static void vfp_pm_init(void)
+ static inline void vfp_pm_init(void) { }
+ #endif /* CONFIG_PM */
+
++/*
++ * Synchronise the hardware VFP state of a thread other than current with the
++ * saved one. This function is used by the ptrace mechanism.
++ */
++#ifdef CONFIG_SMP
++void vfp_sync_state(struct thread_info *thread)
++{
++ /*
++ * On SMP systems, the VFP state is automatically saved at every
++ * context switch. We mark the thread VFP state as belonging to a
++ * non-existent CPU so that the saved one will be reloaded when
++ * needed.
++ */
++ thread->vfpstate.hard.cpu = NR_CPUS;
++}
++#else
++void vfp_sync_state(struct thread_info *thread)
++{
++ unsigned int cpu = get_cpu();
++ u32 fpexc = fmrx(FPEXC);
++
++ /*
++ * If VFP is enabled, the previous state was already saved and
++ * last_VFP_context updated.
++ */
++ if (fpexc & FPEXC_EN)
++ goto out;
++
++ if (!last_VFP_context[cpu])
++ goto out;
++
++ /*
++ * Save the last VFP state on this CPU.
++ */
++ fmxr(FPEXC, fpexc | FPEXC_EN);
++ vfp_save_state(last_VFP_context[cpu], fpexc);
++ fmxr(FPEXC, fpexc);
++
++ /*
++ * Set the context to NULL to force a reload the next time the thread
++ * uses the VFP.
++ */
++ last_VFP_context[cpu] = NULL;
++
++out:
++ put_cpu();
++}
++#endif
++
+ #include <linux/smp.h>
+
+ /*
diff --git a/recipes/linux/linux-kexecboot-2.6.29/vfp/03-vfp-corruption.patch b/recipes/linux/linux-kexecboot-2.6.29/vfp/03-vfp-corruption.patch
new file mode 100644
index 0000000000..216d4f5eaa
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/vfp/03-vfp-corruption.patch
@@ -0,0 +1,136 @@
+From: George G. Davis <gdavis@mvista.com>
+Date: Wed, 1 Apr 2009 18:27:18 +0000 (+0100)
+Subject: 5440/1: Fix VFP state corruption due to preemption during VFP exceptions
+X-Git-Url: http://siarhei.siamashka.name/gitweb/?p=linux-omap-2.6.git;a=commitdiff_plain;h=4f7720780dc4a298a6d59c0ec39f7687022cc36f
+
+5440/1: Fix VFP state corruption due to preemption during VFP exceptions
+
+[ARM] 5440/1: Fix VFP state corruption due to preemption during VFP exceptions
+
+We've observed that ARM VFP state can be corrupted during VFP exception
+handling when PREEMPT is enabled. The exact conditions are difficult
+to reproduce but appear to occur during VFP exception handling when a
+task causes a VFP exception which is handled via VFP_bounce and is then
+preempted by yet another task which in turn causes yet another VFP
+exception. Since the VFP_bounce code is not preempt safe, VFP state then
+becomes corrupt. In order to prevent preemption from occuring while
+handling a VFP exception, this patch disables preemption while handling
+VFP exceptions.
+
+Signed-off-by: George G. Davis <gdavis@mvista.com>
+Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+
+diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
+index ba592a9..a2bed62 100644
+--- a/arch/arm/vfp/entry.S
++++ b/arch/arm/vfp/entry.S
+@@ -15,13 +15,16 @@
+ * r10 = thread_info structure
+ * lr = failure return
+ */
+-#include <linux/linkage.h>
+-#include <linux/init.h>
+-#include <asm/asm-offsets.h>
+-#include <asm/assembler.h>
++#include <asm/thread_info.h>
+ #include <asm/vfpmacros.h>
++#include "../kernel/entry-header.S"
+
+ ENTRY(do_vfp)
++#ifdef CONFIG_PREEMPT
++ ldr r4, [r10, #TI_PREEMPT] @ get preempt count
++ add r11, r4, #1 @ increment it
++ str r11, [r10, #TI_PREEMPT]
++#endif
+ enable_irq
+ ldr r4, .LCvfp
+ ldr r11, [r10, #TI_CPU] @ CPU number
+@@ -30,6 +33,12 @@ ENTRY(do_vfp)
+ ENDPROC(do_vfp)
+
+ ENTRY(vfp_null_entry)
++#ifdef CONFIG_PREEMPT
++ get_thread_info r10
++ ldr r4, [r10, #TI_PREEMPT] @ get preempt count
++ sub r11, r4, #1 @ decrement it
++ str r11, [r10, #TI_PREEMPT]
++#endif
+ mov pc, lr
+ ENDPROC(vfp_null_entry)
+
+@@ -41,6 +50,12 @@ ENDPROC(vfp_null_entry)
+
+ __INIT
+ ENTRY(vfp_testing_entry)
++#ifdef CONFIG_PREEMPT
++ get_thread_info r10
++ ldr r4, [r10, #TI_PREEMPT] @ get preempt count
++ sub r11, r4, #1 @ decrement it
++ str r11, [r10, #TI_PREEMPT]
++#endif
+ ldr r0, VFP_arch_address
+ str r5, [r0] @ known non-zero value
+ mov pc, r9 @ we have handled the fault
+diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
+index 902d396..ea0a156 100644
+--- a/arch/arm/vfp/vfphw.S
++++ b/arch/arm/vfp/vfphw.S
+@@ -131,6 +131,12 @@ check_for_exception:
+ VFPFMXR FPEXC, r1 @ restore FPEXC last
+ sub r2, r2, #4
+ str r2, [sp, #S_PC] @ retry the instruction
++#ifdef CONFIG_PREEMPT
++ get_thread_info r10
++ ldr r4, [r10, #TI_PREEMPT] @ get preempt count
++ sub r11, r4, #1 @ decrement it
++ str r11, [r10, #TI_PREEMPT]
++#endif
+ mov pc, r9 @ we think we have handled things
+
+
+@@ -149,6 +155,12 @@ look_for_VFP_exceptions:
+ @ not recognised by VFP
+
+ DBGSTR "not VFP"
++#ifdef CONFIG_PREEMPT
++ get_thread_info r10
++ ldr r4, [r10, #TI_PREEMPT] @ get preempt count
++ sub r11, r4, #1 @ decrement it
++ str r11, [r10, #TI_PREEMPT]
++#endif
+ mov pc, lr
+
+ process_exception:
+diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
+index 75457b3..01599c4 100644
+--- a/arch/arm/vfp/vfpmodule.c
++++ b/arch/arm/vfp/vfpmodule.c
+@@ -266,7 +266,7 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
+ * on VFP subarch 1.
+ */
+ vfp_raise_exceptions(VFP_EXCEPTION_ERROR, trigger, fpscr, regs);
+- return;
++ goto exit;
+ }
+
+ /*
+@@ -297,7 +297,7 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
+ * the FPEXC.FP2V bit is valid only if FPEXC.EX is 1.
+ */
+ if (fpexc ^ (FPEXC_EX | FPEXC_FP2V))
+- return;
++ goto exit;
+
+ /*
+ * The barrier() here prevents fpinst2 being read
+@@ -310,6 +310,8 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
+ exceptions = vfp_emulate_instruction(trigger, orig_fpscr, regs);
+ if (exceptions)
+ vfp_raise_exceptions(exceptions, trigger, orig_fpscr, regs);
++ exit:
++ preempt_enable();
+ }
+
+ static void vfp_enable(void *unused)
diff --git a/recipes/linux/linux-kexecboot-2.6.29/vfp/04-vfp-threads.patch b/recipes/linux/linux-kexecboot-2.6.29/vfp/04-vfp-threads.patch
new file mode 100644
index 0000000000..221b2774a1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/vfp/04-vfp-threads.patch
@@ -0,0 +1,98 @@
+From: Imre Deak <imre.deak@nokia.com>
+Date: Wed, 1 Jul 2009 21:20:59 +0000 (+0300)
+Subject: So far vfp_sync_state worked only for threads other than the current one. This worked...
+X-Git-Url: http://siarhei.siamashka.name/gitweb/?p=linux-omap-2.6.git;a=commitdiff_plain;h=23671113997664ae55c8132fc4a56e676d5b46c7
+
+So far vfp_sync_state worked only for threads other than the current one. This worked for tracing other threads, but not for PTRACE_TRACEME. Syncing for the current thread will also be needed by an upcoming patch adding support for VFP context save / restore around signal handlers.
+
+For SMP we need get_cpu now, since we have to protect the FPEXC
+register, other than this things remained the same for threads other
+than the current.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+
+diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
+index 01599c4..969b77a 100644
+--- a/arch/arm/vfp/vfpmodule.c
++++ b/arch/arm/vfp/vfpmodule.c
+@@ -380,12 +380,19 @@ static inline void vfp_pm_init(void) { }
+ #endif /* CONFIG_PM */
+
+ /*
+- * Synchronise the hardware VFP state of a thread other than current with the
+- * saved one. This function is used by the ptrace mechanism.
++ * Synchronise the hardware VFP state of a thread with the saved one.
++ * This function is used by the ptrace mechanism and the signal handler path.
+ */
+-#ifdef CONFIG_SMP
+ void vfp_sync_state(struct thread_info *thread)
+ {
++ unsigned int cpu = get_cpu();
++ u32 fpexc = fmrx(FPEXC);
++ int vfp_enabled;
++ int self;
++
++ vfp_enabled = fpexc & FPEXC_EN;
++ self = thread == current_thread_info();
++#ifdef CONFIG_SMP
+ /*
+ * On SMP systems, the VFP state is automatically saved at every
+ * context switch. We mark the thread VFP state as belonging to a
+@@ -393,18 +400,22 @@ void vfp_sync_state(struct thread_info *thread)
+ * needed.
+ */
+ thread->vfpstate.hard.cpu = NR_CPUS;
+-}
+-#else
+-void vfp_sync_state(struct thread_info *thread)
+-{
+- unsigned int cpu = get_cpu();
+- u32 fpexc = fmrx(FPEXC);
+-
+ /*
+- * If VFP is enabled, the previous state was already saved and
+- * last_VFP_context updated.
++ * Only the current thread's saved VFP context can be out-of-date.
++ * For others there is nothing else to do, since we already ensured
++ * force loading above.
+ */
+- if (fpexc & FPEXC_EN)
++ if (!self)
++ goto out;
++#endif
++ /*
++ * If the VFP is enabled only the current thread's saved VFP
++ * context can get out-of-date. For other threads the context
++ * was updated when the current thread started to use the VFP.
++ * This also means that the context will be reloaded next time
++ * the thread uses the VFP, so no need to enforce it.
++ */
++ if (vfp_enabled && !self)
+ goto out;
+
+ if (!last_VFP_context[cpu])
+@@ -413,8 +424,14 @@ void vfp_sync_state(struct thread_info *thread)
+ /*
+ * Save the last VFP state on this CPU.
+ */
+- fmxr(FPEXC, fpexc | FPEXC_EN);
++ if (!vfp_enabled)
++ fmxr(FPEXC, fpexc | FPEXC_EN);
+ vfp_save_state(last_VFP_context[cpu], fpexc);
++ /*
++ * Disable VFP in case it was enabled so that the force reload
++ * can happen.
++ */
++ fpexc &= ~FPEXC_EN;
+ fmxr(FPEXC, fpexc);
+
+ /*
+@@ -426,7 +443,6 @@ void vfp_sync_state(struct thread_info *thread)
+ out:
+ put_cpu();
+ }
+-#endif
+
+ #include <linux/smp.h>
+
diff --git a/recipes/linux/linux-kexecboot-2.6.29/vfp/05-vfp-signal-handlers.patch b/recipes/linux/linux-kexecboot-2.6.29/vfp/05-vfp-signal-handlers.patch
new file mode 100644
index 0000000000..f648188584
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.29/vfp/05-vfp-signal-handlers.patch
@@ -0,0 +1,148 @@
+From: Imre Deak <imre.deak@nokia.com>
+Date: Wed, 1 Jul 2009 21:21:06 +0000 (+0300)
+Subject: Signal handlers can use floating point, so prevent them to corrupt the main thread...
+X-Git-Url: http://siarhei.siamashka.name/gitweb/?p=linux-omap-2.6.git;a=commitdiff_plain;h=4daa6b5d833c401a9de6f136ea23daa971fc4fdc
+
+Signal handlers can use floating point, so prevent them to corrupt the main thread's VFP context. So far there were two signal stack frame formats defined based on the VFP implementation, but recently a new user struct was added for ptrace that covers all possibilities, so use it for the signal stack too.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+
+diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h
+index bf65e9f..5534653 100644
+--- a/arch/arm/include/asm/ucontext.h
++++ b/arch/arm/include/asm/ucontext.h
+@@ -59,23 +59,19 @@ struct iwmmxt_sigframe {
+ #endif /* CONFIG_IWMMXT */
+
+ #ifdef CONFIG_VFP
+-#if __LINUX_ARM_ARCH__ < 6
+-/* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra
+- * word after the registers, and a word of padding at the end for
+- * alignment. */
+ #define VFP_MAGIC 0x56465001
+-#define VFP_STORAGE_SIZE 152
+-#else
+-#define VFP_MAGIC 0x56465002
+-#define VFP_STORAGE_SIZE 144
+-#endif
+
+ struct vfp_sigframe
+ {
+ unsigned long magic;
+ unsigned long size;
+- union vfp_state storage;
+-};
++ struct user_vfp ufp;
++ unsigned long reserved;
++} __attribute__((__aligned__(8)));
++
++/* 8 byte for magic and size, 260 byte for ufp and 4 byte padding */
++#define VFP_STORAGE_SIZE sizeof(struct vfp_sigframe)
++
+ #endif /* CONFIG_VFP */
+
+ /*
+@@ -91,7 +87,7 @@ struct aux_sigframe {
+ #ifdef CONFIG_IWMMXT
+ struct iwmmxt_sigframe iwmmxt;
+ #endif
+-#if 0 && defined CONFIG_VFP /* Not yet saved. */
++#ifdef CONFIG_VFP
+ struct vfp_sigframe vfp;
+ #endif
+ /* Something that isn't a valid magic number for any coprocessor. */
+diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
+index 80b8b5c..a5ef7f5 100644
+--- a/arch/arm/kernel/signal.c
++++ b/arch/arm/kernel/signal.c
+@@ -196,6 +196,67 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame)
+
+ #endif
+
++#ifdef CONFIG_VFP
++
++static int preserve_vfp_context(struct vfp_sigframe __user *frame)
++{
++ struct thread_info *thread = current_thread_info();
++ struct vfp_hard_struct *h = &thread->vfpstate.hard;
++ const unsigned long magic = VFP_MAGIC;
++ const unsigned long size = VFP_STORAGE_SIZE;
++ int err = 0;
++
++ vfp_sync_state(thread);
++ __put_user_error(magic, &frame->magic, err);
++ __put_user_error(size, &frame->size, err);
++
++ /*
++ * Copy the floating point registers. There can be unused
++ * registers see asm/hwcap.h for details.
++ */
++ err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs,
++ sizeof(h->fpregs));
++ /*
++ * Copy the status and control register.
++ */
++ __put_user_error(h->fpscr, &frame->ufp.fpscr, err);
++
++ return err ? -EFAULT : 0;
++}
++
++static int restore_vfp_context(struct vfp_sigframe __user *frame)
++{
++ struct thread_info *thread = current_thread_info();
++ struct vfp_hard_struct *h = &thread->vfpstate.hard;
++ unsigned long magic;
++ unsigned long size;
++ int err = 0;
++
++ vfp_sync_state(thread);
++ __get_user_error(magic, &frame->magic, err);
++ __get_user_error(size, &frame->size, err);
++
++ if (err)
++ return -EFAULT;
++ if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE)
++ return -EINVAL;
++
++ /*
++ * Copy the floating point registers. There can be unused
++ * registers see asm/hwcap.h for details.
++ */
++ err |= __copy_from_user(&h->fpregs, &frame->ufp.fpregs,
++ sizeof(h->fpregs));
++ /*
++ * Copy the status and control register.
++ */
++ __get_user_error(h->fpscr, &frame->ufp.fpscr, err);
++
++ return err ? -EFAULT : 0;
++}
++
++#endif
++
+ /*
+ * Do a signal return; undo the signal stack. These are aligned to 64-bit.
+ */
+@@ -254,8 +315,8 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
+ err |= restore_iwmmxt_context(&aux->iwmmxt);
+ #endif
+ #ifdef CONFIG_VFP
+-// if (err == 0)
+-// err |= vfp_restore_state(&sf->aux.vfp);
++ if (err == 0)
++ err |= restore_vfp_context(&aux->vfp);
+ #endif
+
+ return err;
+@@ -369,8 +430,8 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set)
+ err |= preserve_iwmmxt_context(&aux->iwmmxt);
+ #endif
+ #ifdef CONFIG_VFP
+-// if (err == 0)
+-// err |= vfp_save_state(&sf->aux.vfp);
++ if (err == 0)
++ err |= preserve_vfp_context(&aux->vfp);
+ #endif
+ __put_user_error(0, &aux->end_magic, err);
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch b/recipes/linux/linux-kexecboot-2.6.32/0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch
new file mode 100644
index 0000000000..3254fe4562
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch
@@ -0,0 +1,110 @@
+From 190c75031e65008425dbdd74c3e3237beed18460 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <sakoman@gmail.com>
+Date: Tue, 15 Dec 2009 14:59:42 -0800
+Subject: [PATCH 01/16] ARM: OMAP: Overo: Add support for second ethernet port
+
+Signed-off-by: Steve Sakoman <sakoman@gmail.com>
+---
+ arch/arm/mach-omap2/board-overo.c | 56 +++++++++++++++++++++++++++++++++++--
+ 1 files changed, 53 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
+index 52dfd51..1b94f2c 100644
+--- a/arch/arm/mach-omap2/board-overo.c
++++ b/arch/arm/mach-omap2/board-overo.c
+@@ -63,6 +63,8 @@
+
+ #define OVERO_SMSC911X_CS 5
+ #define OVERO_SMSC911X_GPIO 176
++#define OVERO_SMSC911X2_CS 4
++#define OVERO_SMSC911X2_GPIO 65
+
+ #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+@@ -137,6 +139,16 @@ static struct resource overo_smsc911x_resources[] = {
+ },
+ };
+
++static struct resource overo_smsc911x2_resources[] = {
++ {
++ .name = "smsc911x2-memory",
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
++ },
++};
++
+ static struct smsc911x_platform_config overo_smsc911x_config = {
+ .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+ .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+@@ -146,7 +158,7 @@ static struct smsc911x_platform_config overo_smsc911x_config = {
+
+ static struct platform_device overo_smsc911x_device = {
+ .name = "smsc911x",
+- .id = -1,
++ .id = 0,
+ .num_resources = ARRAY_SIZE(overo_smsc911x_resources),
+ .resource = overo_smsc911x_resources,
+ .dev = {
+@@ -154,9 +166,26 @@ static struct platform_device overo_smsc911x_device = {
+ },
+ };
+
++static struct platform_device overo_smsc911x2_device = {
++ .name = "smsc911x",
++ .id = 1,
++ .num_resources = ARRAY_SIZE(overo_smsc911x2_resources),
++ .resource = overo_smsc911x2_resources,
++ .dev = {
++ .platform_data = &overo_smsc911x_config,
++ },
++};
++
++static struct platform_device *smsc911x_devices[] = {
++ &overo_smsc911x_device,
++ &overo_smsc911x2_device,
++};
++
+ static inline void __init overo_init_smsc911x(void)
+ {
+- unsigned long cs_mem_base;
++ unsigned long cs_mem_base, cs_mem_base2;
++
++ /* set up first smsc911x chip */
+
+ if (gpmc_cs_request(OVERO_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) {
+ printk(KERN_ERR "Failed request for GPMC mem for smsc911x\n");
+@@ -177,7 +206,28 @@ static inline void __init overo_init_smsc911x(void)
+ overo_smsc911x_resources[1].start = OMAP_GPIO_IRQ(OVERO_SMSC911X_GPIO);
+ overo_smsc911x_resources[1].end = 0;
+
+- platform_device_register(&overo_smsc911x_device);
++ /* set up second smsc911x chip */
++
++ if (gpmc_cs_request(OVERO_SMSC911X2_CS, SZ_16M, &cs_mem_base2) < 0) {
++ printk(KERN_ERR "Failed request for GPMC mem for smsc911x2\n");
++ return;
++ }
++
++ overo_smsc911x2_resources[0].start = cs_mem_base2 + 0x0;
++ overo_smsc911x2_resources[0].end = cs_mem_base2 + 0xff;
++
++ if ((gpio_request(OVERO_SMSC911X2_GPIO, "SMSC911X2 IRQ") == 0) &&
++ (gpio_direction_input(OVERO_SMSC911X2_GPIO) == 0)) {
++ gpio_export(OVERO_SMSC911X2_GPIO, 0);
++ } else {
++ printk(KERN_ERR "could not obtain gpio for SMSC911X2 IRQ\n");
++ return;
++ }
++
++ overo_smsc911x2_resources[1].start = OMAP_GPIO_IRQ(OVERO_SMSC911X2_GPIO);
++ overo_smsc911x2_resources[1].end = 0;
++
++ platform_add_devices(smsc911x_devices, ARRAY_SIZE(smsc911x_devices));
+ }
+
+ #else
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch b/recipes/linux/linux-kexecboot-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch
new file mode 100644
index 0000000000..7add534bc7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch
@@ -0,0 +1,25 @@
+From 06e97c7ea488e350b7aae5f3864a1bbe0666db87 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Tue, 15 Dec 2009 15:12:54 -0800
+Subject: [PATCH 02/16] ARM: OMAP: ehci-omap: use new location for usb.h include
+
+---
+ drivers/usb/host/ehci-omap.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
+index 7ba8df3..5cfed78 100644
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -37,7 +37,7 @@
+ #include <linux/platform_device.h>
+ #include <linux/clk.h>
+ #include <linux/gpio.h>
+-#include <mach/usb.h>
++#include <plat/usb.h>
+
+ /*
+ * OMAP USBHOST Register addresses: VIRTUAL ADDRESSES
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch b/recipes/linux/linux-kexecboot-2.6.32/0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch
new file mode 100644
index 0000000000..c15cf3a396
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch
@@ -0,0 +1,29 @@
+From 196c189ca20294fdcef264995f68cca74b1e16ea Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <sakoman@gmail.com>
+Date: Tue, 15 Dec 2009 15:17:44 -0800
+Subject: [PATCH 03/16] drivers: net: smsc911x: return ENODEV if device is not found
+
+Signed-off-by: Steve Sakoman <sakoman@gmail.com>
+---
+ drivers/net/smsc911x.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
+index f9cdcbc..9ca18b5 100644
+--- a/drivers/net/smsc911x.c
++++ b/drivers/net/smsc911x.c
+@@ -2021,8 +2021,10 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
+ }
+
+ retval = smsc911x_init(dev);
+- if (retval < 0)
++ if (retval < 0) {
++ retval = -ENODEV;
+ goto out_unmap_io_3;
++ }
+
+ /* configure irq polarity and type before connecting isr */
+ if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch b/recipes/linux/linux-kexecboot-2.6.32/0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch
new file mode 100644
index 0000000000..345213cb59
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch
@@ -0,0 +1,53 @@
+From deb568b94c448aa7ffcc9e6788bcf9069fd3b864 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <sakoman@gmail.com>
+Date: Tue, 15 Dec 2009 15:24:10 -0800
+Subject: [PATCH 04/16] drivers: input: touchscreen: ads7846: return ENODEV if device is not found
+
+Signed-off-by: Steve Sakoman <sakoman@gmail.com>
+---
+ drivers/input/touchscreen/ads7846.c | 13 ++++++++++---
+ 1 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
+index 09c8109..7cc9973 100644
+--- a/drivers/input/touchscreen/ads7846.c
++++ b/drivers/input/touchscreen/ads7846.c
+@@ -1170,9 +1170,16 @@ static int __devinit ads7846_probe(struct spi_device *spi)
+ /* take a first sample, leaving nPENIRQ active and vREF off; avoid
+ * the touchscreen, in case it's not connected.
+ */
+- (void) ads7846_read12_ser(&spi->dev,
++ err = ads7846_read12_ser(&spi->dev,
+ READ_12BIT_SER(vaux) | ADS_PD10_ALL_ON);
+
++ /* if sample is all 0's or all 1's then there is no device on spi */
++ if ( (err == 0x000) || (err == 0xfff)) {
++ dev_info(&spi->dev, "no device detected, test read result was 0x%08X\n", err);
++ err = -ENODEV;
++ goto err_free_irq;
++ }
++
+ err = sysfs_create_group(&spi->dev.kobj, &ads784x_attr_group);
+ if (err)
+ goto err_remove_hwmon;
+@@ -1190,7 +1197,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
+ err_free_irq:
+ free_irq(spi->irq, ts);
+ err_free_gpio:
+- if (ts->gpio_pendown != -1)
++ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
+ gpio_free(ts->gpio_pendown);
+ err_cleanup_filter:
+ if (ts->filter_cleanup)
+@@ -1217,7 +1224,7 @@ static int __devexit ads7846_remove(struct spi_device *spi)
+ /* suspend left the IRQ disabled */
+ enable_irq(ts->spi->irq);
+
+- if (ts->gpio_pendown != -1)
++ if (!ts->get_pendown_state && ts->gpio_pendown != -1)
+ gpio_free(ts->gpio_pendown);
+
+ if (ts->filter_cleanup)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch b/recipes/linux/linux-kexecboot-2.6.32/0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch
new file mode 100644
index 0000000000..1c51552792
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch
@@ -0,0 +1,135 @@
+From 334eef94045c93957cad3477522086492dd19b06 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <sakoman@gmail.com>
+Date: Tue, 15 Dec 2009 15:34:29 -0800
+Subject: [PATCH 05/16] ARM: OMAP: add support for TCT Zippy to Beagle board file
+
+Signed-off-by: Steve Sakoman <sakoman@gmail.com>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 74 +++++++++++++++++++++++++++++-
+ 1 files changed, 71 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index 41480bd..f3df638 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -21,6 +21,7 @@
+ #include <linux/io.h>
+ #include <linux/leds.h>
+ #include <linux/gpio.h>
++#include <linux/irq.h>
+ #include <linux/input.h>
+ #include <linux/gpio_keys.h>
+
+@@ -52,6 +53,49 @@
+
+ #define NAND_BLOCK_SIZE SZ_128K
+
++#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
++
++#include <plat/mcspi.h>
++#include <linux/spi/spi.h>
++
++#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157
++
++static struct omap2_mcspi_device_config enc28j60_spi_chip_info = {
++ .turbo_mode = 0,
++ .single_channel = 1, /* 0: slave, 1: master */
++};
++
++static struct spi_board_info omap3beagle_spi_board_info[] __initdata = {
++ {
++ .modalias = "enc28j60",
++ .bus_num = 4,
++ .chip_select = 0,
++ .max_speed_hz = 20000000,
++ .controller_data = &enc28j60_spi_chip_info,
++ },
++};
++
++static void __init omap3beagle_enc28j60_init(void)
++{
++ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) &&
++ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) {
++ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0);
++ omap3beagle_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
++ set_irq_type(omap3beagle_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
++ } else {
++ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n");
++ return;
++ }
++
++ spi_register_board_info(omap3beagle_spi_board_info,
++ ARRAY_SIZE(omap3beagle_spi_board_info));
++}
++
++#else
++static inline void __init omap3beagle_enc28j60_init(void) { return; }
++#endif
++
++
+ static struct mtd_partition omap3beagle_nand_partitions[] = {
+ /* All the partition sizes are listed in terms of NAND block size */
+ {
+@@ -114,6 +158,14 @@ static struct twl4030_hsmmc_info mmc[] = {
+ .wires = 8,
+ .gpio_wp = 29,
+ },
++ {
++ .mmc = 2,
++ .wires = 4,
++ .gpio_wp = 141,
++ .gpio_cd = 162,
++ .transceiver = true,
++ .ocr_mask = 0x00100000, /* 3.3V */
++ },
+ {} /* Terminator */
+ };
+
+@@ -277,7 +329,7 @@ static struct twl4030_platform_data beagle_twldata = {
+ .vpll2 = &beagle_vpll2,
+ };
+
+-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
++static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
+ {
+ I2C_BOARD_INFO("twl4030", 0x48),
+ .flags = I2C_CLIENT_WAKE,
+@@ -286,10 +338,24 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
+ },
+ };
+
++#if defined(CONFIG_RTC_DRV_DS1307) || \
++ defined(CONFIG_RTC_DRV_DS1307_MODULE)
++
++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
++ {
++ I2C_BOARD_INFO("ds1307", 0x68),
++ },
++};
++#else
++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {};
++#endif
++
+ static int __init omap3_beagle_i2c_init(void)
+ {
+- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
+- ARRAY_SIZE(beagle_i2c_boardinfo));
++ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo,
++ ARRAY_SIZE(beagle_i2c1_boardinfo));
++ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo,
++ ARRAY_SIZE(beagle_i2c2_boardinfo));
+ /* Bus 3 is attached to the DVI port where devices like the pico DLP
+ * projector don't work reliably with 400kHz */
+ omap_register_i2c_bus(3, 100, NULL, 0);
+@@ -434,6 +500,8 @@ static void __init omap3_beagle_init(void)
+ /* REVISIT leave DVI powered down until it's needed ... */
+ gpio_direction_output(170, true);
+
++ omap3beagle_enc28j60_init();
++
+ usb_musb_init();
+ usb_ehci_init(&ehci_pdata);
+ omap3beagle_flash_init();
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch b/recipes/linux/linux-kexecboot-2.6.32/0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch
new file mode 100644
index 0000000000..3ad1853e3f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch
@@ -0,0 +1,24 @@
+From 2607d201fb202499533aa4a7fc788b4fa5fd1fcf Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 12:40:24 -0800
+Subject: [PATCH 06/16] ARM: OMAP: Make beagle u-boot partition writable
+
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index f3df638..d00b089 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -108,7 +108,6 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
+ .name = "U-Boot",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
+ .size = 15 * NAND_BLOCK_SIZE,
+- .mask_flags = MTD_WRITEABLE, /* force read-only */
+ },
+ {
+ .name = "U-Boot Env",
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch b/recipes/linux/linux-kexecboot-2.6.32/0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch
new file mode 100644
index 0000000000..6ad4366f02
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch
@@ -0,0 +1,27 @@
+From a0cf94cd5d99280fccc29e6b7777c448f15d1c65 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 12:45:20 -0800
+Subject: [PATCH 07/16] ASoC: enable audio capture by default for twl4030
+
+---
+ sound/soc/codecs/twl4030.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
+index 4df7c6c..e85db73 100644
+--- a/sound/soc/codecs/twl4030.c
++++ b/sound/soc/codecs/twl4030.c
+@@ -46,8 +46,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) */
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch b/recipes/linux/linux-kexecboot-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch
new file mode 100644
index 0000000000..9b5ccaac69
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch
@@ -0,0 +1,25 @@
+From ce9fc5ab828b050605eb7d916f64ace7b227eea6 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 12:51:53 -0800
+Subject: [PATCH 08/16] scripts/Makefile.fwinst: fix typo (missing space in setting mode)
+
+---
+ scripts/Makefile.fwinst | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+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)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch b/recipes/linux/linux-kexecboot-2.6.32/0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch
new file mode 100644
index 0000000000..6e7f706c51
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch
@@ -0,0 +1,35 @@
+From 64e4fc11b960da97728e0d87dcf4c1e98f808501 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 31 Dec 2009 07:05:02 -0800
+Subject: [PATCH] MTD: NAND: omap2: proper fix for subpage read ECC errors
+
+---
+ drivers/mtd/nand/omap2.c | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
+index 1bb799f..75004fe 100644
+--- a/drivers/mtd/nand/omap2.c
++++ b/drivers/mtd/nand/omap2.c
+@@ -295,11 +295,14 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
+ u32 *p = (u32 *)buf;
+
+ /* take care of subpage reads */
+- for (; len % 4 != 0; ) {
+- *buf++ = __raw_readb(info->nand.IO_ADDR_R);
+- len--;
++ if (len % 4) {
++ if (info->nand.options & NAND_BUSWIDTH_16)
++ omap_read_buf16(mtd, buf, len % 4);
++ else
++ omap_read_buf8(mtd, buf, len % 4);
++ p = (u32 *) (buf + len % 4);
++ len -= len % 4;
+ }
+- p = (u32 *) buf;
+
+ /* configure and start prefetch transfer */
+ ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
+--
+1.6.5
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/ARM-Add-support-for-LZMA-compressed-kernel-images.patch b/recipes/linux/linux-kexecboot-2.6.32/ARM-Add-support-for-LZMA-compressed-kernel-images.patch
new file mode 100644
index 0000000000..3344ea6439
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/ARM-Add-support-for-LZMA-compressed-kernel-images.patch
@@ -0,0 +1,51 @@
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 350921d..34163da 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -20,6 +20,7 @@ config ARM
+ select HAVE_GENERIC_DMA_COHERENT
+ select HAVE_KERNEL_GZIP
+ select HAVE_KERNEL_LZO
++ select HAVE_KERNEL_LZMA
+ help
+ The ARM series is a line of low-power-consumption RISC chip designs
+ licensed by ARM Ltd and targeted at embedded applications and
+diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
+index 2d4d88b..3906432 100644
+--- a/arch/arm/boot/compressed/Makefile
++++ b/arch/arm/boot/compressed/Makefile
+@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
+
+ suffix_$(CONFIG_KERNEL_GZIP) = gzip
+ suffix_$(CONFIG_KERNEL_LZO) = lzo
++suffix_$(CONFIG_KERNEL_LZMA) = lzma
+
+ targets := vmlinux vmlinux.lds \
+ piggy.$(suffix_y) piggy.$(suffix_y).o \
+diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
+index 7e0fe4d..4e35a10 100644
+--- a/arch/arm/boot/compressed/misc.c
++++ b/arch/arm/boot/compressed/misc.c
+@@ -237,6 +237,10 @@ static unsigned long free_mem_end_ptr;
+ #include "../../../../lib/decompress_inflate.c"
+ #endif
+
++#ifdef CONFIG_KERNEL_LZMA
++#include "../../../../lib/decompress_unlzma.c"
++#endif
++
+ #ifdef CONFIG_KERNEL_LZO
+ #include "../../../../lib/decompress_unlzo.c"
+ #endif
+diff --git a/arch/arm/boot/compressed/piggy.lzma.S b/arch/arm/boot/compressed/piggy.lzma.S
+new file mode 100644
+index 0000000..d7e69cf
+--- /dev/null
++++ b/arch/arm/boot/compressed/piggy.lzma.S
+@@ -0,0 +1,6 @@
++ .section .piggydata,#alloc
++ .globl input_data
++input_data:
++ .incbin "arch/arm/boot/compressed/piggy.lzma"
++ .globl input_data_end
++input_data_end:
diff --git a/recipes/linux/linux-kexecboot-2.6.32/akita/defconfig b/recipes/linux/linux-kexecboot-2.6.32/akita/defconfig
new file mode 100644
index 0000000000..c6c4a0b835
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/akita/defconfig
@@ -0,0 +1,1250 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32
+# Tue Dec 29 08:55:28 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=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_CPUFREQ=y
+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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# 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="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_SLUB_DEBUG is not set
+# 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_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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 is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK 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_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM 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_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_BCMRING is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_AKITA is not set
+CONFIG_MACH_SPITZ=y
+# CONFIG_MACH_BORZOI is not set
+# CONFIG_MACH_TOSA is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_XCEP is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_DEVTMPFS is not set
+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_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
+# 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=y
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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=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 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK 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 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_IDE_GD is not set
+CONFIG_BLK_DEV_IDECS=y
+# 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 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_PHONE 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 is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+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_MOUSE_SYNAPTICS_I2C 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_UINPUT is not set
+# CONFIG_INPUT_GPIO_ROTARY_ENCODER 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 is not set
+# 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_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_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=y
+# CONFIG_HW_RANDOM_TIMERIOMEM 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_COMPAT=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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE 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
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 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 is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=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
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_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=y
+# 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
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_THERMAL 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_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=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=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_CORGI=y
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+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 is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT 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 is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# 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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+CONFIG_FSNOTIFY=y
+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_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 is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_XATTR is not set
+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_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
+
+#
+# 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
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS 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_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# 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_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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.32/beagleboard/defconfig b/recipes/linux/linux-kexecboot-2.6.32/beagleboard/defconfig
new file mode 100644
index 0000000000..29082720f6
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/beagleboard/defconfig
@@ -0,0 +1,2922 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32
+# Thu Dec 10 10:50:29 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=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_CPUFREQ=y
+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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 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_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_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_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 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
+
+#
+# Kernel Performance Events And Counters
+#
+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_OPROFILE=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
+CONFIG_SLOW_WORK=y
+# CONFIG_SLOW_WORK_DEBUG 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=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBDAF=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_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+# CONFIG_INLINE_SPIN_UNLOCK is not set
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+# CONFIG_INLINE_READ_UNLOCK is not set
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+# CONFIG_INLINE_WRITE_UNLOCK is not set
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM 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_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_BCMRING is not set
+# CONFIG_ARCH_U8500 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
+# CONFIG_ARCH_OMAP4 is not set
+
+#
+# OMAP Feature Selections
+#
+# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
+CONFIG_OMAP_RESET_CLOCKS=y
+# CONFIG_OMAP_MUX is not set
+CONFIG_OMAP_MCBSP=y
+CONFIG_OMAP_MBOX_FWK=m
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_DM_TIMER=y
+# CONFIG_OMAP_LL_DEBUG_UART1 is not set
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_NONE is not set
+# CONFIG_OMAP_PM_NONE is not set
+CONFIG_OMAP_PM_NOOP=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+CONFIG_OMAP_PACKAGE_CBB=y
+
+#
+# OMAP Board Type
+#
+CONFIG_MACH_OMAP3_BEAGLE=y
+CONFIG_MACH_OMAP_LDP=y
+CONFIG_MACH_OVERO=y
+CONFIG_MACH_OMAP3EVM=y
+# CONFIG_MACH_OMAP3517EVM is not set
+CONFIG_MACH_OMAP3_PANDORA=y
+# CONFIG_MACH_OMAP3_TOUCHBOOK is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
+CONFIG_MACH_OMAP_ZOOM2=y
+# CONFIG_MACH_OMAP_ZOOM3 is not set
+# CONFIG_MACH_CM_T35 is not set
+CONFIG_MACH_IGEP0020=y
+# CONFIG_MACH_OMAP_3630SDP is not set
+# CONFIG_OMAP3_EMU 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_V7=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_ARM_L1_CACHE_SHIFT=6
+# CONFIG_ARM_ERRATA_430973 is not set
+# CONFIG_ARM_ERRATA_458693 is not set
+# CONFIG_ARM_ERRATA_460075 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_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+CONFIG_HZ=128
+# CONFIG_THUMB2_KERNEL is not set
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_LEDS=y
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# 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=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 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=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_PM_RUNTIME=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 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=y
+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_SIT_6RD is not set
+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_HL=m
+# CONFIG_NETFILTER_XT_TARGET_LED 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_CLUSTER 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_HL=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_NETFILTER_XT_MATCH_OSF 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
+#
+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_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_HL=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_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_RDS is not set
+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_PHONET is not set
+# CONFIG_IEEE802154 is not set
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_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_NET_DROP_MONITOR 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_DEV is not set
+# 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_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_HCIVHCI is not set
+# CONFIG_BT_MRVL is not set
+CONFIG_AF_RXRPC=m
+# CONFIG_AF_RXRPC_DEBUG is not set
+# CONFIG_RXKAD is not set
+CONFIG_FIB_RULES=y
+CONFIG_WIRELESS=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WEXT_CORE=y
+CONFIG_WEXT_PROC=y
+CONFIG_WEXT_SPY=y
+CONFIG_WEXT_PRIV=y
+CONFIG_CFG80211=y
+# CONFIG_NL80211_TESTMODE is not set
+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
+# CONFIG_CFG80211_REG_DEBUG is not set
+CONFIG_CFG80211_DEFAULT_PS=y
+# CONFIG_CFG80211_DEBUGFS is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_CFG80211_WEXT=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
+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_DEVTMPFS is not set
+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_TESTS 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 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_SST25L 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_OMAP_PREFETCH=y
+# CONFIG_MTD_NAND_OMAP_PREFETCH_DMA 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=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_MG_DISK is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_DS1682 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_MAX6875 is not set
+CONFIG_EEPROM_93CX6=y
+# CONFIG_IWMC3200TOP 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=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SCH=m
+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_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=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_RAID6_PQ=m
+# CONFIG_ASYNC_RAID6_TEST is not set
+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_LOG_USERSPACE is not set
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+# CONFIG_DM_MULTIPATH_QL is not set
+# CONFIG_DM_MULTIPATH_ST is not set
+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_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_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+CONFIG_ENC28J60=y
+# CONFIG_ENC28J60_WRITEVERIFY is not set
+# CONFIG_ETHOC is not set
+CONFIG_SMC911X=y
+CONFIG_SMSC911X=y
+# 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_KS8842 is not set
+# CONFIG_KS8851 is not set
+# CONFIG_KS8851_MLL is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+CONFIG_WLAN=y
+# CONFIG_LIBERTAS_THINFIRM is not set
+# CONFIG_AT76C50X_USB is not set
+CONFIG_USB_ZD1201=y
+CONFIG_USB_NET_RNDIS_WLAN=y
+CONFIG_RTL8187=y
+CONFIG_RTL8187_LEDS=y
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_ATH_COMMON is not set
+CONFIG_B43=y
+# CONFIG_B43_SDIO is not set
+CONFIG_B43_PHY_LP=y
+CONFIG_B43_LEDS=y
+CONFIG_B43_HWRNG=y
+# CONFIG_B43_DEBUG is not set
+# CONFIG_B43LEGACY is not set
+CONFIG_HOSTAP=y
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+# CONFIG_IWM is not set
+CONFIG_LIBERTAS=y
+CONFIG_LIBERTAS_USB=y
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_SPI is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_P54_COMMON=y
+CONFIG_P54_USB=y
+# CONFIG_P54_SPI is not set
+CONFIG_P54_LEDS=y
+CONFIG_RT2X00=y
+CONFIG_RT2500USB=y
+CONFIG_RT73USB=y
+# CONFIG_RT2800USB is not set
+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
+# CONFIG_WL12XX is not set
+CONFIG_ZD1211RW=y
+# CONFIG_ZD1211RW_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_CDC_EEM is not set
+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_USB_NET_INT51X1 is not set
+# 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
+# CONFIG_PHONE 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=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_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_TWL4030 is not set
+# CONFIG_KEYBOARD_XTKBD 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_SENTELIC 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_MOUSE_SYNAPTICS_I2C 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
+# CONFIG_INPUT_GPIO_ROTARY_ENCODER 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_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 is not set
+# CONFIG_IPMI_HANDLER is not set
+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_COMPAT=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_DESIGNWARE is not set
+# 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_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_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS 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_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# 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_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_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_SHT15 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_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI 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
+# CONFIG_TWL4030_WATCHDOG is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB=y
+CONFIG_SSB_SDIOHOST_POSSIBLE=y
+# CONFIG_SSB_SDIOHOST is not set
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_CORE=y
+# 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=y
+CONFIG_TWL4030_CODEC=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_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP 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_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+CONFIG_REGULATOR_TWL4030=y
+# CONFIG_REGULATOR_LP3971 is not set
+# CONFIG_REGULATOR_TPS65023 is not set
+# CONFIG_REGULATOR_TPS6507X is not set
+CONFIG_MEDIA_SUPPORT=y
+
+#
+# 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_CUSTOMISE 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_MEDIA_TUNER_MXL5007T=m
+CONFIG_MEDIA_TUNER_MC44S803=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_MT9V011=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_GL860 is not set
+CONFIG_USB_GSPCA_CONEX=m
+CONFIG_USB_GSPCA_ETOMS=m
+CONFIG_USB_GSPCA_FINEPIX=m
+# CONFIG_USB_GSPCA_JEILINJ is not set
+CONFIG_USB_GSPCA_MARS=m
+# CONFIG_USB_GSPCA_MR97310A is not set
+CONFIG_USB_GSPCA_OV519=m
+CONFIG_USB_GSPCA_OV534=m
+CONFIG_USB_GSPCA_PAC207=m
+CONFIG_USB_GSPCA_PAC7311=m
+# CONFIG_USB_GSPCA_SN9C20X is not set
+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 is not set
+# CONFIG_USB_GSPCA_SQ905C is not set
+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_HDPVR=m
+CONFIG_VIDEO_EM28XX=m
+CONFIG_VIDEO_EM28XX_ALSA=m
+CONFIG_VIDEO_EM28XX_DVB=m
+CONFIG_VIDEO_CX231XX=m
+# CONFIG_VIDEO_CX231XX_ALSA is not set
+CONFIG_VIDEO_CX231XX_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_PWC_INPUT_EVDEV=y
+CONFIG_USB_ZR364XX=m
+CONFIG_USB_STKWEBCAM=m
+CONFIG_USB_S2255=m
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_I2C_SI4713 is not set
+# CONFIG_RADIO_SI4713 is not set
+# CONFIG_USB_DSBR is not set
+# CONFIG_RADIO_SI470X is not set
+# CONFIG_USB_MR800 is not set
+# CONFIG_RADIO_TEA5764 is not set
+CONFIG_DVB_MAX_ADAPTERS=8
+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_USB_CE6230 is not set
+# CONFIG_DVB_USB_FRIIO is not set
+# CONFIG_SMS_SIANO_MDTV is not set
+
+#
+# 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
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_ZL10039=m
+CONFIG_DVB_S5H1420=m
+CONFIG_DVB_STV0288=m
+CONFIG_DVB_STB6000=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_TDA10086=m
+CONFIG_DVB_TUNER_ITD1000=m
+CONFIG_DVB_TUNER_CX24113=m
+CONFIG_DVB_TDA826X=m
+CONFIG_DVB_CX24116=m
+CONFIG_DVB_SI21XX=m
+CONFIG_DVB_CX22702=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
+CONFIG_DVB_AF9013=m
+CONFIG_DVB_TDA10021=m
+CONFIG_DVB_TDA10023=m
+CONFIG_DVB_STV0297=m
+CONFIG_DVB_NXT200X=m
+CONFIG_DVB_BCM3510=m
+CONFIG_DVB_LGDT330X=m
+CONFIG_DVB_LGDT3305=m
+CONFIG_DVB_S5H1409=m
+CONFIG_DVB_S5H1411=m
+CONFIG_DVB_DIB8000=m
+CONFIG_DVB_PLL=m
+CONFIG_DVB_TUNER_DIB0070=m
+CONFIG_DVB_LNBP21=m
+CONFIG_DVB_ISL6421=m
+CONFIG_DVB_LGS8GL5=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=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_TMIO 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_FB_OMAP_LCD_VGA is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_OMAP2_VRAM=y
+CONFIG_OMAP2_VRFB=y
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_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
+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
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_GENERIC=y
+CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C=y
+CONFIG_PANEL_SHARP_LS037V7DW01=y
+# CONFIG_PANEL_TAAL is not set
+# CONFIG_PANEL_TOPPOLY_TDO35S is not set
+# 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_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=y
+CONFIG_SND_RAWMIDI=y
+CONFIG_SND_JACK=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_RAWMIDI_SEQ=m
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+# CONFIG_SND_SBAWE_SEQ is not set
+# CONFIG_SND_EMU10K1_SEQ 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_OVERO is not set
+# CONFIG_SND_OMAP_SOC_OMAP3EVM is not set
+# CONFIG_SND_OMAP_SOC_OMAP3_PANDORA is not set
+CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y
+# CONFIG_SND_OMAP_SOC_ZOOM2 is not set
+# CONFIG_SND_OMAP_SOC_IGEP0020 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
+# 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_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+# CONFIG_HID_DRAGONRISE is not set
+CONFIG_HID_EZKEY=y
+# CONFIG_HID_KYE is not set
+CONFIG_HID_GYRATION=y
+# CONFIG_HID_TWINHAN is not set
+# CONFIG_HID_KENSINGTON is not set
+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_HID_GREENASIA is not set
+# CONFIG_HID_SMARTJOYPLUS is not set
+CONFIG_HID_TOPSEED=y
+# CONFIG_HID_THRUSTMASTER is not set
+# CONFIG_HID_WACOM is not set
+# CONFIG_HID_ZEROPLUS 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=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=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_USB_EHCI_ROOT_HUB_TT is not set
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+# CONFIG_USB_ISP1362_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 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=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_CP210X is not set
+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_QUALCOMM is not set
+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_SYMBOL is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_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_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_R8A66597 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C_HSOTG is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LANGWELL 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_AUDIO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_ETH_EEM 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
+#
+CONFIG_USB_OTG_UTILS=y
+CONFIG_USB_GPIO_VBUS=y
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+CONFIG_NOP_USB_XCEIV=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 is not set
+CONFIG_MMC_OMAP_HS=y
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_SPI=m
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 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_GPIO is not set
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
+# CONFIG_ACCESSIBILITY 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_DS1307=m
+# 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=m
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+# CONFIG_RTC_DRV_RX8025 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
+# CONFIG_RTC_DRV_PCF2123 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_MSM6242 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_RP5C01 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY 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
+
+#
+# TI VLYNQ
+#
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+# CONFIG_USB_IP_COMMON is not set
+CONFIG_W35UND=m
+# CONFIG_PRISM2_USB is not set
+CONFIG_ECHO=m
+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
+#
+
+#
+# Qualcomm MSM Camera And Video
+#
+
+#
+# Camera Sensor Selection
+#
+# CONFIG_INPUT_GPIO is not set
+# CONFIG_DST is not set
+# CONFIG_POHMELFS is not set
+# CONFIG_PLAN9AUTH is not set
+# CONFIG_LINE6_USB is not set
+# CONFIG_USB_SERIAL_QUATECH2 is not set
+# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
+# CONFIG_VT6656 is not set
+# CONFIG_FB_UDL is not set
+
+#
+# RAR Register Driver
+#
+# CONFIG_RAR_REGISTER is not set
+# CONFIG_IIO is not set
+# CONFIG_STRIP 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4_FS_XATTR=y
+# CONFIG_EXT4_FS_POSIX_ACL is not set
+# CONFIG_EXT4_FS_SECURITY is not set
+# CONFIG_EXT4_DEBUG 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_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 is not set
+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_NILFS2_FS is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
+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
+# CONFIG_CUSE is not set
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=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_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=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_NFS_V4_1 is not set
+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_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_DFS_UPCALL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
+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=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=y
+CONFIG_DLM=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_STRIP_ASM_SYMS 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=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_KMEMLEAK 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 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_DEBUG_CREDENTIALS 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_DEBUG_FORCE_WEAK_PER_CPU 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_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_RING_BUFFER=y
+CONFIG_EVENT_TRACING=y
+CONFIG_CONTEXT_SWITCH_TRACER=y
+CONFIG_RING_BUFFER_ALLOW_SWAP=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
+CONFIG_FTRACE=y
+# 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_ENABLE_DEFAULT_TRACERS is not set
+# CONFIG_BOOT_TRACER is not set
+CONFIG_BRANCH_PROFILE_NONE=y
+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
+# CONFIG_PROFILE_ALL_BRANCHES 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_RING_BUFFER_BENCHMARK 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 is not set
+# CONFIG_OC_ETM 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_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_ASYNC_PQ=m
+CONFIG_ASYNC_RAID6_RECOV=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_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=m
+CONFIG_CRYPTO_XCBC=m
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_GHASH=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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+CONFIG_BINARY_PRINTF=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_DECOMPRESS_GZIP=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/recipes/linux/linux-kexecboot-2.6.32/c7x0/defconfig b/recipes/linux/linux-kexecboot-2.6.32/c7x0/defconfig
new file mode 100644
index 0000000000..d8804340df
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/c7x0/defconfig
@@ -0,0 +1,1248 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32
+# Thu Jan 7 19:13:21 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=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_CPUFREQ=y
+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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# 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="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_SLUB_DEBUG is not set
+# 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_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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 is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK 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_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM 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_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_BCMRING is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+# CONFIG_MACH_POODLE is not set
+CONFIG_MACH_CORGI=y
+CONFIG_MACH_SHEPHERD=y
+CONFIG_MACH_HUSKY=y
+# CONFIG_MACH_AKITA is not set
+# CONFIG_MACH_SPITZ is not set
+# CONFIG_MACH_BORZOI is not set
+# CONFIG_MACH_TOSA is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_XCEP is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SHARP_C7xx=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 loglevel=3 "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_DEVTMPFS is not set
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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=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 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK 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 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_UINPUT is not set
+# CONFIG_INPUT_GPIO_ROTARY_ENCODER 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_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
+
+#
+# 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_COMPAT=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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE 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
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 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 is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS 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_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_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=y
+# 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
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_THERMAL 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_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=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=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_CORGI=y
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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 is not set
+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 is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_XATTR is not set
+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_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
+
+#
+# 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
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS 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_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# 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_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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.32/c7x0/fix-corgi-card-detection.patch b/recipes/linux/linux-kexecboot-2.6.32/c7x0/fix-corgi-card-detection.patch
new file mode 100644
index 0000000000..7ef01de119
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/c7x0/fix-corgi-card-detection.patch
@@ -0,0 +1,17 @@
+[PATCH] [ARM] pxa/corgi: fix MMC/SD card detection failure
+
+Reported-by: Andrea Adami <andrea.adami@gmail.com>
+Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
+---
+--- a/arch/arm/mach-pxa/corgi.c
++++ b/arch/arm/mach-pxa/corgi.c
+@@ -438,7 +438,7 @@
+ */
+ static struct pxamci_platform_data corgi_mci_platform_data = {
+ .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
+- .gpio_card_detect = -1,
++ .gpio_card_detect = CORGI_GPIO_nSD_DETECT,
+ .gpio_card_ro = CORGI_GPIO_nSD_WP,
+ .gpio_power = CORGI_GPIO_SD_PWR,
+ };
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-OMAP-DSS2-add-Toppoly-TDO35S-panel.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-OMAP-DSS2-add-Toppoly-TDO35S-panel.patch
new file mode 100644
index 0000000000..423b29f841
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-OMAP-DSS2-add-Toppoly-TDO35S-panel.patch
@@ -0,0 +1,159 @@
+From 971595be3dc245cfa095747263b94535d27a3f1c Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Tue, 1 Dec 2009 12:14:10 +0200
+Subject: [PATCH 1/6] OMAP: DSS2: add Toppoly TDO35S panel
+
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+---
+ drivers/video/omap2/displays/Kconfig | 6 +
+ drivers/video/omap2/displays/Makefile | 1 +
+ .../video/omap2/displays/panel-toppoly-tdo35s.c | 112 ++++++++++++++++++++
+ 3 files changed, 119 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/omap2/displays/panel-toppoly-tdo35s.c
+
+diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
+index 79d2861..0d0d4f3 100644
+--- a/drivers/video/omap2/displays/Kconfig
++++ b/drivers/video/omap2/displays/Kconfig
+@@ -25,4 +25,10 @@ config PANEL_TAAL
+ help
+ Taal DSI command mode panel from TPO.
+
++config PANEL_TOPPOLY_TDO35S
++ tristate "Toppoly TDO35S LCD Panel support"
++ depends on OMAP2_DSS
++ help
++ LCD Panel used in CM-T35
++
+ endmenu
+diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
+index d44e765..e299454 100644
+--- a/drivers/video/omap2/displays/Makefile
++++ b/drivers/video/omap2/displays/Makefile
+@@ -3,3 +3,4 @@ obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
+ obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
+
+ obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
++obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o
+\ No newline at end of file
+diff --git a/drivers/video/omap2/displays/panel-toppoly-tdo35s.c b/drivers/video/omap2/displays/panel-toppoly-tdo35s.c
+new file mode 100644
+index 0000000..e744b8c
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-toppoly-tdo35s.c
+@@ -0,0 +1,112 @@
++/*
++ * LCD panel driver for Toppoly TDO35S
++ *
++ * Copyright (C) 2009 CompuLab, Ltd.
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * Based on 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 <plat/display.h>
++
++static struct omap_video_timings toppoly_tdo_panel_timings = {
++ /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
++ .x_res = 480,
++ .y_res = 640,
++
++ .pixel_clock = 26000,
++
++ .hfp = 104,
++ .hsw = 8,
++ .hbp = 8,
++
++ .vfp = 4,
++ .vsw = 2,
++ .vbp = 2,
++};
++
++static int toppoly_tdo_panel_probe(struct omap_dss_device *dssdev)
++{
++ dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
++ OMAP_DSS_LCD_IHS;
++ dssdev->panel.timings = toppoly_tdo_panel_timings;
++
++ return 0;
++}
++
++static void toppoly_tdo_panel_remove(struct omap_dss_device *dssdev)
++{
++}
++
++static int toppoly_tdo_panel_enable(struct omap_dss_device *dssdev)
++{
++ int r = 0;
++
++ if (dssdev->platform_enable)
++ r = dssdev->platform_enable(dssdev);
++
++ return r;
++}
++
++static void toppoly_tdo_panel_disable(struct omap_dss_device *dssdev)
++{
++ if (dssdev->platform_disable)
++ dssdev->platform_disable(dssdev);
++}
++
++static int toppoly_tdo_panel_suspend(struct omap_dss_device *dssdev)
++{
++ toppoly_tdo_panel_disable(dssdev);
++ return 0;
++}
++
++static int toppoly_tdo_panel_resume(struct omap_dss_device *dssdev)
++{
++ return toppoly_tdo_panel_enable(dssdev);
++}
++
++static struct omap_dss_driver generic_driver = {
++ .probe = toppoly_tdo_panel_probe,
++ .remove = toppoly_tdo_panel_remove,
++
++ .enable = toppoly_tdo_panel_enable,
++ .disable = toppoly_tdo_panel_disable,
++ .suspend = toppoly_tdo_panel_suspend,
++ .resume = toppoly_tdo_panel_resume,
++
++ .driver = {
++ .name = "toppoly_tdo35s_panel",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init toppoly_tdo_panel_drv_init(void)
++{
++ return omap_dss_register_driver(&generic_driver);
++}
++
++static void __exit toppoly_tdo_panel_drv_exit(void)
++{
++ omap_dss_unregister_driver(&generic_driver);
++}
++
++module_init(toppoly_tdo_panel_drv_init);
++module_exit(toppoly_tdo_panel_drv_exit);
++MODULE_LICENSE("GPL");
+--
+1.6.4.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-backlight-tdo24m-ensure-chip-select-changes-between-.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-backlight-tdo24m-ensure-chip-select-changes-between-.patch
new file mode 100644
index 0000000000..b540987af0
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-backlight-tdo24m-ensure-chip-select-changes-between-.patch
@@ -0,0 +1,30 @@
+From 8a2cbbaa60ea06370d2a6d9303b1aab54cdb8a69 Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Tue, 24 Nov 2009 10:09:35 +0200
+Subject: [PATCH] backlight: tdo24m: ensure chip select changes between transfers
+
+Some SPI host drivers do not change chip select betwen transfers unless
+.cs_chnage field is explicitly set. The LCD spec requires chip select
+change between consecuitive transfers, so ensure it at the SPI driver
+level.
+
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+---
+ drivers/video/backlight/tdo24m.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c
+index bbfb502..4a3d46e 100644
+--- a/drivers/video/backlight/tdo24m.c
++++ b/drivers/video/backlight/tdo24m.c
+@@ -367,6 +367,7 @@ static int __devinit tdo24m_probe(struct spi_device *spi)
+
+ spi_message_init(m);
+
++ x->cs_change = 1;
+ x->tx_buf = &lcd->buf[0];
+ spi_message_add_tail(x, m);
+
+--
+1.6.4.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-omap3-cm-t35-add-mux-initialization.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-omap3-cm-t35-add-mux-initialization.patch
new file mode 100644
index 0000000000..07f901c9a6
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0001-omap3-cm-t35-add-mux-initialization.patch
@@ -0,0 +1,153 @@
+Date: Wed, 09 Dec 2009 15:22:20 +0200
+From: Mike Rapoport <mike@compulab.co.il>
+To: Koen Kooi <koen@dominion.thruhere.net>
+Subject: Re: linux-omap 2.6.32 updates
+
+
+Mike Rapoport wrote:
+>> The tdo24m patch is indeed in the linux-omap tree and the mux patch should be
+>> different for the updated linux-omap (at least with
+>> SRCREV = "6833f1a8cdcb65a370f898bde6b6af63f81962df").
+>>
+>> Attached the actual patch needed to initialize cm-t35 mux and updated recipe
+>> diff that uses this patch.
+>>
+>> I don't know yet if Tony is going to merge my latest patches before the merge
+>> window closes. If you're going to bump SRCREV once again in the next few days,
+>> it's possible that cm-t35 patches won't be needed at all.
+
+--
+Sincerely yours,
+Mike.
+
+
+diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
+index 16c0c13..66de47b 100644
+--- a/arch/arm/mach-omap2/Kconfig
++++ b/arch/arm/mach-omap2/Kconfig
+@@ -136,6 +136,7 @@ config MACH_CM_T35
+ bool "CompuLab CM-T35 module"
+ depends on ARCH_OMAP3 && ARCH_OMAP34XX
+ select OMAP_PACKAGE_CUS
++ select OMAP_MUX
+
+ config MACH_IGEP0020
+ bool "IGEP0020"
+diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
+index 507c922..1591aae 100644
+--- a/arch/arm/mach-omap2/board-cm-t35.c
++++ b/arch/arm/mach-omap2/board-cm-t35.c
+@@ -482,13 +482,98 @@ static void __init cm_t35_map_io(void)
+ omap2_map_common_io();
+ }
+
+-#ifdef CONFIG_OMAP_MUX
+ static struct omap_board_mux board_mux[] __initdata = {
++ /* nCS and IRQ for CM-T35 ethernet */
++ OMAP3_MUX(GPMC_NCS5, OMAP_MUX_MODE0),
++ OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
++
++ /* nCS and IRQ for SB-T35 ethernet */
++ OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE0),
++ OMAP3_MUX(GPMC_WAIT3, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
++
++ /* PENDOWN GPIO */
++ OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
++
++ /* mUSB */
++ OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++
++ /* MMC 2 */
++ OMAP3_MUX(SDMMC2_DAT4, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(SDMMC2_DAT5, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(SDMMC2_DAT6, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(SDMMC2_DAT7, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
++
++ /* McSPI 1 */
++ OMAP3_MUX(MCSPI1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCSPI1_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCSPI1_CS0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
++
++ /* McSPI 4 */
++ OMAP3_MUX(MCBSP1_CLKR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCBSP1_DX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCBSP1_DR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCBSP1_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP),
++
++ /* McBSP 2 */
++ OMAP3_MUX(MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++ OMAP3_MUX(MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++
++ /* serial ports */
++ OMAP3_MUX(MCBSP3_CLKX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(MCBSP3_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
++ OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
++
++ /* DSS */
++ OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++ OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
++
++ /* TPS IRQ */
++ OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_WAKEUP_EN | \
++ OMAP_PIN_INPUT_PULLUP),
++
+ { .reg_offset = OMAP_MUX_TERMINATOR },
+ };
+-#else
+-#define board_mux NULL
+-#endif
+
+ static void __init cm_t35_init(void)
+ {
+@@ -501,9 +586,6 @@ static void __init cm_t35_init(void)
+ cm_t35_init_led();
+
+ usb_musb_init();
+-
+- omap_mux_init_signal("sys_nirq",
+- OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
+ }
+
+ MACHINE_START(CM_T35, "Compulab CM-T35")
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0002-omap3-cm-t35-add-DSS2-display-support.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0002-omap3-cm-t35-add-DSS2-display-support.patch
new file mode 100644
index 0000000000..199e89bc93
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0002-omap3-cm-t35-add-DSS2-display-support.patch
@@ -0,0 +1,307 @@
+From 7d601fa33c5475bcd3035df797a3cbe40cc542d4 Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Tue, 1 Dec 2009 13:09:28 +0200
+Subject: [PATCH 2/6] omap3: cm-t35: add DSS2 display support
+
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+---
+ arch/arm/mach-omap2/board-cm-t35.c | 234 +++++++++++++++++++++++++++++++++++-
+ 1 files changed, 233 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
+index 22c4529..2d7a819 100644
+--- a/arch/arm/mach-omap2/board-cm-t35.c
++++ b/arch/arm/mach-omap2/board-cm-t35.c
+@@ -32,6 +32,9 @@
+ #include <linux/i2c/twl4030.h>
+ #include <linux/regulator/machine.h>
+
++#include <linux/spi/spi.h>
++#include <linux/spi/tdo24m.h>
++
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+@@ -42,6 +45,7 @@
+ #include <plat/nand.h>
+ #include <plat/gpmc.h>
+ #include <plat/usb.h>
++#include <plat/display.h>
+
+ #include <mach/hardware.h>
+
+@@ -248,7 +252,6 @@ static inline void cm_t35_init_nand(void) {}
+
+ #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+-#include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+
+ #include <plat/mcspi.h>
+@@ -304,6 +307,193 @@ static void __init cm_t35_init_ads7846(void)
+ static inline void cm_t35_init_ads7846(void) {}
+ #endif
+
++#define CM_T35_LCD_EN_GPIO 157
++#define CM_T35_LCD_BL_GPIO 58
++#define CM_T35_DVI_EN_GPIO 54
++
++static int lcd_bl_gpio;
++static int lcd_en_gpio;
++static int dvi_en_gpio;
++
++static int lcd_enabled;
++static int dvi_enabled;
++
++static int cm_t35_panel_enable_lcd(struct omap_dss_device *dssdev)
++{
++ if (dvi_enabled) {
++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
++ return -EINVAL;
++ }
++
++ gpio_set_value(lcd_en_gpio, 1);
++ gpio_set_value(lcd_bl_gpio, 1);
++
++ lcd_enabled = 1;
++
++ return 0;
++}
++
++static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev)
++{
++ lcd_enabled = 0;
++
++ gpio_set_value(lcd_bl_gpio, 0);
++ gpio_set_value(lcd_en_gpio, 0);
++}
++
++static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev)
++{
++ if (lcd_enabled) {
++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
++ return -EINVAL;
++ }
++
++ gpio_set_value(dvi_en_gpio, 0);
++ dvi_enabled = 1;
++
++ return 0;
++}
++
++static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev)
++{
++ gpio_set_value(dvi_en_gpio, 1);
++ dvi_enabled = 0;
++}
++
++static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
++{
++ return 0;
++}
++
++static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev)
++{
++}
++
++static struct omap_dss_device cm_t35_lcd_device = {
++ .name = "lcd",
++ .driver_name = "toppoly_tdo35s_panel",
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .phy.dpi.data_lines = 18,
++ .platform_enable = cm_t35_panel_enable_lcd,
++ .platform_disable = cm_t35_panel_disable_lcd,
++};
++
++static struct omap_dss_device cm_t35_dvi_device = {
++ .name = "dvi",
++ .driver_name = "generic_panel",
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .phy.dpi.data_lines = 24,
++ .platform_enable = cm_t35_panel_enable_dvi,
++ .platform_disable = cm_t35_panel_disable_dvi,
++};
++
++static struct omap_dss_device cm_t35_tv_device = {
++ .name = "tv",
++ .driver_name = "venc",
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .platform_enable = cm_t35_panel_enable_tv,
++ .platform_disable = cm_t35_panel_disable_tv,
++};
++
++static struct omap_dss_device *cm_t35_dss_devices[] = {
++ &cm_t35_lcd_device,
++ &cm_t35_dvi_device,
++ &cm_t35_tv_device,
++};
++
++static struct omap_dss_board_info cm_t35_dss_data = {
++ .num_devices = ARRAY_SIZE(cm_t35_dss_devices),
++ .devices = cm_t35_dss_devices,
++ .default_device = &cm_t35_dvi_device,
++};
++
++static struct platform_device cm_t35_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &cm_t35_dss_data,
++ },
++};
++
++static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
++ .turbo_mode = 0,
++ .single_channel = 1, /* 0: slave, 1: master */
++};
++
++static struct tdo24m_platform_data tdo24m_config = {
++ .model = TDO35S,
++};
++
++static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = {
++ {
++ .modalias = "tdo24m",
++ .bus_num = 4,
++ .chip_select = 0,
++ .max_speed_hz = 1000000,
++ .controller_data = &tdo24m_mcspi_config,
++ .platform_data = &tdo24m_config,
++ },
++};
++
++static void __init cm_t35_display_init(void)
++{
++ int err;
++
++ lcd_en_gpio = CM_T35_LCD_EN_GPIO;
++ lcd_bl_gpio = CM_T35_LCD_BL_GPIO;
++ dvi_en_gpio = CM_T35_DVI_EN_GPIO;
++
++ spi_register_board_info(cm_t35_lcd_spi_board_info,
++ ARRAY_SIZE(cm_t35_lcd_spi_board_info));
++
++ err = gpio_request(lcd_en_gpio, "LCD RST");
++ if (err) {
++ pr_err("CM-T35: failed to get LCD reset GPIO\n");
++ goto out;
++ }
++
++ err = gpio_request(lcd_bl_gpio, "LCD BL");
++ if (err) {
++ pr_err("CM-T35: failed to get LCD backlight control GPIO\n");
++ goto err_lcd_bl;
++ }
++
++ err = gpio_request(dvi_en_gpio, "DVI EN");
++ if (err) {
++ pr_err("CM-T35: failed to get DVI reset GPIO\n");
++ goto err_dvi_en;
++ }
++
++ gpio_export(lcd_en_gpio, 0);
++ gpio_export(lcd_bl_gpio, 0);
++ gpio_export(dvi_en_gpio, 0);
++ gpio_direction_output(lcd_en_gpio, 0);
++ gpio_direction_output(lcd_bl_gpio, 0);
++ gpio_direction_output(dvi_en_gpio, 1);
++
++ msleep(50);
++ gpio_set_value(lcd_en_gpio, 1);
++
++ err = platform_device_register(&cm_t35_dss_device);
++ if (err) {
++ pr_err("CM-T35: failed to register DSS device\n");
++ goto err_dev_reg;
++ }
++
++ return;
++
++err_dev_reg:
++ gpio_free(dvi_en_gpio);
++err_dvi_en:
++ gpio_free(lcd_bl_gpio);
++err_lcd_bl:
++ gpio_free(lcd_en_gpio);
++out:
++
++ return;
++}
++
+ static struct regulator_consumer_supply cm_t35_vmmc1_supply = {
+ .supply = "vmmc",
+ };
+@@ -312,6 +502,16 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = {
+ .supply = "vmmc_aux",
+ };
+
++static struct regulator_consumer_supply cm_t35_vdac_supply = {
++ .supply = "vdda_dac",
++ .dev = &cm_t35_dss_device.dev,
++};
++
++static struct regulator_consumer_supply cm_t35_vdvi_supply = {
++ .supply = "vdvi",
++ .dev = &cm_t35_dss_device.dev,
++};
++
+ /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+ static struct regulator_init_data cm_t35_vmmc1 = {
+ .constraints = {
+@@ -342,6 +542,35 @@ static struct regulator_init_data cm_t35_vsim = {
+ .consumer_supplies = &cm_t35_vsim_supply,
+ };
+
++/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
++static struct regulator_init_data cm_t35_vdac = {
++ .constraints = {
++ .min_uV = 1800000,
++ .max_uV = 1800000,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &cm_t35_vdac_supply,
++};
++
++/* VPLL2 for digital video outputs */
++static struct regulator_init_data cm_t35_vpll2 = {
++ .constraints = {
++ .name = "VDVI",
++ .min_uV = 1800000,
++ .max_uV = 1800000,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &cm_t35_vdvi_supply,
++};
++
+ static struct twl4030_usb_data cm_t35_usb_data = {
+ .usb_mode = T2_USB_MODE_ULPI,
+ };
+@@ -445,6 +674,8 @@ static struct twl4030_platform_data cm_t35_twldata = {
+ .gpio = &cm_t35_gpio_data,
+ .vmmc1 = &cm_t35_vmmc1,
+ .vsim = &cm_t35_vsim,
++ .vdac = &cm_t35_vdac,
++ .vpll2 = &cm_t35_vpll2,
+ };
+
+ static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = {
+@@ -490,6 +721,7 @@ static void __init cm_t35_init(void)
+ cm_t35_init_ads7846();
+ cm_t35_init_ethernet();
+ cm_t35_init_led();
++ cm_t35_display_init();
+
+ usb_musb_init();
+
+--
+1.6.4.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0003-omap3-cm-t35-update-defconfig-for-DSS2.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0003-omap3-cm-t35-update-defconfig-for-DSS2.patch
new file mode 100644
index 0000000000..dc1e5270c9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0003-omap3-cm-t35-update-defconfig-for-DSS2.patch
@@ -0,0 +1,145 @@
+From 10cd78db62cbda2f9db1c53d459ee03a35b84662 Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Tue, 1 Dec 2009 13:16:02 +0200
+Subject: [PATCH 3/6] omap3: cm-t35: update defconfig for DSS2
+
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+---
+ arch/arm/configs/cm_t35_defconfig | 82 +++++++++++++++++++++++++++++++++++--
+ 1 files changed, 78 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/configs/cm_t35_defconfig b/arch/arm/configs/cm_t35_defconfig
+index e42c5c8..bd6f882 100644
+--- a/arch/arm/configs/cm_t35_defconfig
++++ b/arch/arm/configs/cm_t35_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.32-rc4
+-# Tue Oct 13 17:10:40 2009
++# Linux kernel version: 2.6.32-rc8
++# Tue Dec 1 12:08:44 2009
+ #
+ CONFIG_ARM=y
+ CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+@@ -215,6 +215,7 @@ 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_LL_DEBUG_NONE is not set
+ # CONFIG_OMAP_PM_NONE is not set
+ CONFIG_OMAP_PM_NOOP=y
+ CONFIG_ARCH_OMAP34XX=y
+@@ -227,11 +228,15 @@ CONFIG_ARCH_OMAP3430=y
+ # CONFIG_MACH_OMAP_LDP is not set
+ # CONFIG_MACH_OVERO is not set
+ # CONFIG_MACH_OMAP3EVM is not set
++# CONFIG_MACH_OMAP3517EVM is not set
+ # CONFIG_MACH_OMAP3_PANDORA is not set
+ # CONFIG_MACH_OMAP_3430SDP is not set
+ # CONFIG_MACH_NOKIA_RX51 is not set
+ # CONFIG_MACH_OMAP_ZOOM2 is not set
++# CONFIG_MACH_OMAP_ZOOM3 is not set
+ CONFIG_MACH_CM_T35=y
++# CONFIG_MACH_IGEP0020 is not set
++# CONFIG_MACH_OMAP_3630SDP is not set
+
+ #
+ # Processor Type
+@@ -963,6 +968,7 @@ CONFIG_SSB_POSSIBLE=y
+ # CONFIG_TPS65010 is not set
+ CONFIG_TWL4030_CORE=y
+ # CONFIG_TWL4030_POWER is not set
++# CONFIG_TWL4030_CODEC is not set
+ # CONFIG_MFD_TMIO is not set
+ # CONFIG_MFD_T7L66XB is not set
+ # CONFIG_MFD_TC6387XB is not set
+@@ -993,8 +999,66 @@ CONFIG_REGULATOR_TWL4030=y
+ #
+ # CONFIG_VGASTATE is not set
+ # CONFIG_VIDEO_OUTPUT_CONTROL is not set
+-# CONFIG_FB is not set
+-# CONFIG_BACKLIGHT_LCD_SUPPORT 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_BROADSHEET is not set
++# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
++CONFIG_OMAP2_VRAM=y
++CONFIG_OMAP2_VRFB=y
++CONFIG_OMAP2_DSS=y
++CONFIG_OMAP2_VRAM_SIZE=4
++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
++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
++
++#
++# OMAP2/3 Display Device Drivers
++#
++CONFIG_PANEL_GENERIC=y
++# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set
++# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
++CONFIG_PANEL_TOPPOLY_TDO35S=y
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++CONFIG_LCD_CLASS_DEVICE=y
++# CONFIG_LCD_LMS283GF05 is not set
++# CONFIG_LCD_LTV350QV is not set
++# CONFIG_LCD_ILI9320 is not set
++CONFIG_LCD_TDO24M=y
++# CONFIG_LCD_VGG2432A4 is not set
++# CONFIG_LCD_PLATFORM is not set
++# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
+
+ #
+ # Display device support
+@@ -1006,6 +1070,16 @@ CONFIG_REGULATOR_TWL4030=y
+ #
+ # CONFIG_VGA_CONSOLE is not set
+ CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++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=y
+--
+1.6.4.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0004-omap3-cm-t35-add-cm-t35-mux-configs.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0004-omap3-cm-t35-add-cm-t35-mux-configs.patch
new file mode 100644
index 0000000000..ff8b50b1c9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0004-omap3-cm-t35-add-cm-t35-mux-configs.patch
@@ -0,0 +1,427 @@
+From a1a572a6b020996155fa3fd7e70a96299b37cf30 Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Mon, 7 Dec 2009 10:27:48 +0200
+Subject: [PATCH 4/6] omap3: cm-t35: add cm-t35 mux configs
+
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+---
+ arch/arm/mach-omap2/board-cm-t35.c | 94 +++++++++++++++++++
+ arch/arm/mach-omap2/mux.c | 158 ++++++++++++++++++++++++++++++++-
+ arch/arm/plat-omap/include/plat/mux.h | 86 ++++++++++++++++++
+ 3 files changed, 337 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
+index 2d7a819..3e54499 100644
+--- a/arch/arm/mach-omap2/board-cm-t35.c
++++ b/arch/arm/mach-omap2/board-cm-t35.c
+@@ -693,6 +693,99 @@ static void __init cm_t35_init_i2c(void)
+ ARRAY_SIZE(cm_t35_i2c_boardinfo));
+ }
+
++static void __init cm_t35_init_mux(void)
++{
++ /* nCS and IRQ mux for CM-T35 ethernet */
++ omap_cfg_reg(G5_34XX_GPMC_NCS5);
++ omap_cfg_reg(A23_34XX_GPIO163_UP);
++
++ /* nCS, IRQ and reset mux for SB-T35 ethernet */
++ omap_cfg_reg(F4_34XX_GPMC_NCS4);
++ omap_cfg_reg(N21_34XX_GPIO127_UP);
++ omap_cfg_reg(B23_34XX_GPIO164_OUT);
++
++ /* PENDOWN GPIO */
++ omap_cfg_reg(F3_34XX_GPIO57_UP);
++
++ /* mUSB */
++ omap_cfg_reg(R21_3430_USB0HS_PHY_CLK);
++ omap_cfg_reg(R23_3430_USB0HS_PHY_STP);
++ omap_cfg_reg(P23_3430_USB0HS_PHY_DIR);
++ omap_cfg_reg(R22_3430_USB0HS_PHY_NXT);
++ omap_cfg_reg(T24_3430_USB0HS_PHY_DATA0);
++ omap_cfg_reg(T23_3430_USB0HS_PHY_DATA1);
++ omap_cfg_reg(U24_3430_USB0HS_PHY_DATA2);
++ omap_cfg_reg(U23_3430_USB0HS_PHY_DATA3);
++ omap_cfg_reg(W24_3430_USB0HS_PHY_DATA4);
++ omap_cfg_reg(V23_3430_USB0HS_PHY_DATA5);
++ omap_cfg_reg(W23_3430_USB0HS_PHY_DATA6);
++ omap_cfg_reg(T22_3430_USB0HS_PHY_DATA7);
++
++ /* MMC 2 */
++ omap_cfg_reg(AB2_3430_MMC2_DIR_DAT0);
++ omap_cfg_reg(AA2_3430_MMC2_DIR_DAT1);
++ omap_cfg_reg(Y2_3430_MMC2_DIR_CMD);
++ omap_cfg_reg(AA1_3420_MMC2_CLKIN);
++
++ /* McSPI 1 */
++ omap_cfg_reg(T5_34XX_MCSPI1_CLK);
++ omap_cfg_reg(R4_34XX_MCSPI1_SIMO);
++ omap_cfg_reg(T4_34XX_MCSPI1_SOMI);
++ omap_cfg_reg(T6_34XX_MCSPI1_CS0);
++
++ /* McBSP 2 */
++ omap_cfg_reg(V20_34XX_MCBSP2_FSX);
++ omap_cfg_reg(T21_34XX_MCBSP2_CLKX);
++ omap_cfg_reg(V19_34XX_MCBSP2_DR);
++ omap_cfg_reg(R20_34XX_MCBSP2_DX);
++
++ omap_cfg_reg(F21_34XX_GPIO109_OUT);
++
++ /* serial ports */
++ omap_cfg_reg(W4_34XX_UART2_TX);
++ omap_cfg_reg(V4_34XX_UART2_RX);
++ omap_cfg_reg(W7_34XX_UART1_TX);
++ omap_cfg_reg(V7_34XX_UART1_RX);
++
++ /* display controls */
++ omap_cfg_reg(U8_34XX_GPIO54_OUT);
++ omap_cfg_reg(G4_34XX_GPIO58_OUT);
++/* omap_cfg_reg(??_34XX_GPIO129_OUT); */
++
++ /* DSS */
++ omap_cfg_reg(G22_34XX_DSS_PCLK);
++ omap_cfg_reg(E22_34XX_DSS_HSYNC);
++ omap_cfg_reg(F22_34XX_DSS_VSYNC);
++ omap_cfg_reg(J21_34XX_DSS_ACBIAS);
++ omap_cfg_reg(AC19_34XX_DSS_DATA0);
++ omap_cfg_reg(AB19_34XX_DSS_DATA1);
++ omap_cfg_reg(AD20_34XX_DSS_DATA2);
++ omap_cfg_reg(AC20_34XX_DSS_DATA3);
++ omap_cfg_reg(AD21_34XX_DSS_DATA4);
++ omap_cfg_reg(AC21_34XX_DSS_DATA5);
++ omap_cfg_reg(D24_34XX_DSS_DATA6);
++ omap_cfg_reg(E23_34XX_DSS_DATA7);
++ omap_cfg_reg(E24_34XX_DSS_DATA8);
++ omap_cfg_reg(F23_34XX_DSS_DATA9);
++ omap_cfg_reg(AC22_34XX_DSS_DATA10);
++ omap_cfg_reg(AC23_34XX_DSS_DATA11);
++ omap_cfg_reg(AB22_34XX_DSS_DATA12);
++ omap_cfg_reg(Y22_34XX_DSS_DATA13);
++ omap_cfg_reg(W22_34XX_DSS_DATA14);
++ omap_cfg_reg(V22_34XX_DSS_DATA15);
++ omap_cfg_reg(J22_34XX_DSS_DATA16);
++ omap_cfg_reg(G23_34XX_DSS_DATA17);
++ omap_cfg_reg(G24_34XX_DSS_DATA18);
++ omap_cfg_reg(H23_34XX_DSS_DATA19);
++ omap_cfg_reg(D23_34XX_DSS_DATA20);
++ omap_cfg_reg(K22_34XX_DSS_DATA21);
++ omap_cfg_reg(V21_34XX_DSS_DATA22);
++ omap_cfg_reg(W21_34XX_DSS_DATA23);
++
++ /* TPS IRQ */
++ omap_cfg_reg(AF26_34XX_SYS_NIRQ);
++}
++
+ static struct omap_board_config_kernel cm_t35_config[] __initdata = {
+ };
+
+@@ -716,6 +809,7 @@ static void __init cm_t35_map_io(void)
+ static void __init cm_t35_init(void)
+ {
+ omap_serial_init();
++ cm_t35_init_mux();
+ cm_t35_init_i2c();
+ cm_t35_init_nand();
+ cm_t35_init_ads7846();
+diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
+index c18a94e..23eb011 100644
+--- a/arch/arm/mach-omap2/mux.c
++++ b/arch/arm/mach-omap2/mux.c
+@@ -279,6 +279,33 @@ MUX_CFG_34XX("AD26_34XX_I2C4_SCL", 0xa00,
+ MUX_CFG_34XX("AE26_34XX_I2C4_SDA", 0xa02,
+ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+
++/* HSUSB Port 0 */
++MUX_CFG_34XX("R21_3430_USB0HS_PHY_CLK", 0x1a2,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("R23_3430_USB0HS_PHY_STP", 0x1a4,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT | \
++ OMAP2_PULL_ENA | OMAP2_PULL_UP)
++MUX_CFG_34XX("P23_3430_USB0HS_PHY_DIR", 0x1a6,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("R22_3430_USB0HS_PHY_NXT", 0x1a8,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("T24_3430_USB0HS_PHY_DATA0", 0x1aa,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("T23_3430_USB0HS_PHY_DATA1", 0x1ac,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("U24_3430_USB0HS_PHY_DATA2", 0x1ae,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("U23_3430_USB0HS_PHY_DATA3", 0x1b0,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("W24_3430_USB0HS_PHY_DATA4", 0x1b2,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("V23_3430_USB0HS_PHY_DATA5", 0x1b4,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("W23_3430_USB0HS_PHY_DATA6", 0x1b6,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("T22_3430_USB0HS_PHY_DATA7", 0x1b8,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++
+ /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/
+ MUX_CFG_34XX("Y8_3430_USB1HS_PHY_CLK", 0x5da,
+ OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT)
+@@ -541,6 +568,15 @@ MUX_CFG_34XX("AF3_3430_MMC2_DAT6", 0x168,
+ MUX_CFG_34XX("AE3_3430_MMC2_DAT7", 0x16A,
+ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+
++MUX_CFG_34XX("AB2_3430_MMC2_DIR_DAT0", 0x164,
++ OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AA2_3430_MMC2_DIR_DAT1", 0x166,
++ OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("Y2_3430_MMC2_DIR_CMD", 0x168,
++ OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AA1_3420_MMC2_CLKIN", 0x16a,
++ OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT)
++
+ /* MMC3 */
+ MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
+ OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
+@@ -559,13 +595,133 @@ MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
+ MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
+ OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
+ OMAP34XX_MUX_MODE0)
+-/* EHCI GPIO's on OMAP3EVM (Rev >= E) */
++
+ MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea,
+ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
+ MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec,
+ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
+ MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8,
+ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
++
++MUX_CFG_34XX("AG4_34XX_GPIO134", 0x160,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("U8_34XX_GPIO54", 0x0b4,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AE4_34XX_GPIO136", 0x164,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("F3_34XX_GPIO57_UP", 0x0ba,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
++MUX_CFG_34XX("G4_34XX_GPIO58_OUT", 0x0bc,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("W2_34XX_GPIO59", 0x0be,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("L1_34XX_GPIO61_OUT", 0x0c8,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("C2_34XX_GPIO65", 0x0d2,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("N21_34XX_GPIO127_UP", 0x152,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
++MUX_CFG_34XX("A23_34XX_GPIO163_UP", 0x19a,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
++MUX_CFG_34XX("B23_34XX_GPIO164_OUT", 0x19c,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AA6_34XX_GPIO164_OUT", 0x1e2,
++ OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
++
++/* GPMC */
++MUX_CFG_34XX("F4_34XX_GPMC_NCS4", 0x0b6, OMAP34XX_MUX_MODE0)
++MUX_CFG_34XX("G5_34XX_GPMC_NCS5", 0x0b8, OMAP34XX_MUX_MODE0)
++
++/* McSPI 1 */
++MUX_CFG_34XX("T5_34XX_MCSPI1_CLK", 0x1c8,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("R4_34XX_MCSPI1_SIMO", 0x1ca,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("T4_34XX_MCSPI1_SOMI", 0x1cc,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("T6_34XX_MCSPI1_CS0", 0x1ce,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLDOWN)
++
++/* McBSP 2 */
++MUX_CFG_34XX("V20_34XX_MCBSP2_FSX", 0x13c,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("T21_34XX_MCBSP2_CLKX", 0x13e,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("V19_34XX_MCBSP2_DR", 0x140,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("R20_34XX_MCBSP2_DX", 0x142,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++
++MUX_CFG_34XX("F21_34XX_GPIO109_OUT", 0x12a,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++
++/* Serial ports */
++MUX_CFG_34XX("W4_34XX_UART2_TX", 0x170,
++ OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("V4_34XX_UART2_RX", 0x172,
++ OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT)
++MUX_CFG_34XX("W7_34XX_UART1_TX", 0x17c,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("V7_34XX_UART1_RX", 0x182,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT)
++
++/* DSS */
++MUX_CFG_34XX("G22_34XX_DSS_PCLK", 0x0d4,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("E22_34XX_DSS_HSYNC", 0x0d6,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("F22_34XX_DSS_VSYNC", 0x0d8,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("J21_34XX_DSS_ACBIAS", 0x0da,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AC19_34XX_DSS_DATA0", 0x0dc,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AB19_34XX_DSS_DATA1", 0x0de,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AD20_34XX_DSS_DATA2", 0x0e0,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AC20_34XX_DSS_DATA3", 0x0e2,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AD21_34XX_DSS_DATA4", 0x0e4,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AC21_34XX_DSS_DATA5", 0x0e6,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("D24_34XX_DSS_DATA6", 0x0e8,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("E23_34XX_DSS_DATA7", 0x0ea,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("E24_34XX_DSS_DATA8", 0x0ec,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("F23_34XX_DSS_DATA9", 0x0ee,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AC22_34XX_DSS_DATA10", 0x0f0,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AC23_34XX_DSS_DATA11", 0x0f2,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("AB22_34XX_DSS_DATA12", 0x0f4,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("Y22_34XX_DSS_DATA13", 0x0f6,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("W22_34XX_DSS_DATA14", 0x0f8,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("V22_34XX_DSS_DATA15", 0x0fa,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("J22_34XX_DSS_DATA16", 0x0fc,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("G23_34XX_DSS_DATA17", 0x0fe,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("G24_34XX_DSS_DATA18", 0x100,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("H23_34XX_DSS_DATA19", 0x102,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("D23_34XX_DSS_DATA20", 0x104,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("K22_34XX_DSS_DATA21", 0x106,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("V21_34XX_DSS_DATA22", 0x108,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
++MUX_CFG_34XX("W21_34XX_DSS_DATA23", 0x10a,
++ OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
+ };
+
+ #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)
+diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h
+index ba77de6..119379c 100644
+--- a/arch/arm/plat-omap/include/plat/mux.h
++++ b/arch/arm/plat-omap/include/plat/mux.h
+@@ -692,6 +692,20 @@ enum omap34xx_index {
+ AD26_34XX_I2C4_SCL,
+ AE26_34XX_I2C4_SDA,
+
++ /* HSUSB Port 0 */
++ R21_3430_USB0HS_PHY_CLK,
++ R23_3430_USB0HS_PHY_STP,
++ P23_3430_USB0HS_PHY_DIR,
++ R22_3430_USB0HS_PHY_NXT,
++ T24_3430_USB0HS_PHY_DATA0,
++ T23_3430_USB0HS_PHY_DATA1,
++ U24_3430_USB0HS_PHY_DATA2,
++ U23_3430_USB0HS_PHY_DATA3,
++ W24_3430_USB0HS_PHY_DATA4,
++ V23_3430_USB0HS_PHY_DATA5,
++ W23_3430_USB0HS_PHY_DATA6,
++ T22_3430_USB0HS_PHY_DATA7,
++
+ /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/
+ Y8_3430_USB1HS_PHY_CLK,
+ Y9_3430_USB1HS_PHY_STP,
+@@ -839,6 +853,11 @@ enum omap34xx_index {
+ AF3_3430_MMC2_DAT6,
+ AE3_3430_MMC2_DAT7,
+
++ AB2_3430_MMC2_DIR_DAT0,
++ AA2_3430_MMC2_DIR_DAT1,
++ Y2_3430_MMC2_DIR_CMD,
++ AA1_3420_MMC2_CLKIN,
++
+ /* MMC3 */
+ AF10_3430_MMC3_CLK,
+ AC3_3430_MMC3_CMD,
+@@ -854,6 +873,73 @@ enum omap34xx_index {
+ AH14_34XX_GPIO21,
+ AF9_34XX_GPIO22,
+ U3_34XX_GPIO61,
++
++ AG4_34XX_GPIO134,
++ U8_34XX_GPIO54,
++ AE4_34XX_GPIO136,
++ F3_34XX_GPIO57_UP,
++ G4_34XX_GPIO58_OUT,
++ W2_34XX_GPIO59,
++ L1_34XX_GPIO61_OUT,
++ C2_34XX_GPIO65,
++ N21_34XX_GPIO127_UP,
++ A23_34XX_GPIO163_UP,
++ B23_34XX_GPIO164_OUT,
++ AA6_34XX_GPIO186_OUT,
++
++ /* gpmc */
++ F4_34XX_GPMC_NCS4,
++ G5_34XX_GPMC_NCS5,
++
++ /* McSPI 1 */
++ T5_34XX_MCSPI1_CLK,
++ R4_34XX_MCSPI1_SIMO,
++ T4_34XX_MCSPI1_SOMI,
++ T6_34XX_MCSPI1_CS0,
++
++ /* McBSP 2 */
++ V20_34XX_MCBSP2_FSX,
++ T21_34XX_MCBSP2_CLKX,
++ V19_34XX_MCBSP2_DR,
++ R20_34XX_MCBSP2_DX,
++
++ F21_34XX_GPIO109_OUT,
++
++ /* serial ports */
++ W4_34XX_UART2_TX,
++ V4_34XX_UART2_RX,
++ W7_34XX_UART1_TX,
++ V7_34XX_UART1_RX,
++
++ /* DSS */
++ G22_34XX_DSS_PCLK,
++ E22_34XX_DSS_HSYNC,
++ F22_34XX_DSS_VSYNC,
++ J21_34XX_DSS_ACBIAS,
++ AC19_34XX_DSS_DATA0,
++ AB19_34XX_DSS_DATA1,
++ AD20_34XX_DSS_DATA2,
++ AC20_34XX_DSS_DATA3,
++ AD21_34XX_DSS_DATA4,
++ AC21_34XX_DSS_DATA5,
++ D24_34XX_DSS_DATA6,
++ E23_34XX_DSS_DATA7,
++ E24_34XX_DSS_DATA8,
++ F23_34XX_DSS_DATA9,
++ AC22_34XX_DSS_DATA10,
++ AC23_34XX_DSS_DATA11,
++ AB22_34XX_DSS_DATA12,
++ Y22_34XX_DSS_DATA13,
++ W22_34XX_DSS_DATA14,
++ V22_34XX_DSS_DATA15,
++ J22_34XX_DSS_DATA16,
++ G23_34XX_DSS_DATA17,
++ G24_34XX_DSS_DATA18,
++ H23_34XX_DSS_DATA19,
++ D23_34XX_DSS_DATA20,
++ K22_34XX_DSS_DATA21,
++ V21_34XX_DSS_DATA22,
++ W21_34XX_DSS_DATA23,
+ };
+
+ struct omap_mux_cfg {
+--
+1.6.4.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0006-omap3-cm-t35-update-defconfig.patch b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0006-omap3-cm-t35-update-defconfig.patch
new file mode 100644
index 0000000000..a9034f08a7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/0006-omap3-cm-t35-update-defconfig.patch
@@ -0,0 +1,87 @@
+From 88f7dc4c115c57b12de7ab4170bdaaeba145283b Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Mon, 7 Dec 2009 11:07:55 +0200
+Subject: [PATCH 6/6] omap3: cm-t35: update defconfig
+
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+---
+ arch/arm/configs/cm_t35_defconfig | 28 ++++++++++++++++++++++------
+ 1 files changed, 22 insertions(+), 6 deletions(-)
+
+diff --git a/arch/arm/configs/cm_t35_defconfig b/arch/arm/configs/cm_t35_defconfig
+index bd6f882..78eeb66 100644
+--- a/arch/arm/configs/cm_t35_defconfig
++++ b/arch/arm/configs/cm_t35_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.32-rc8
+-# Tue Dec 1 12:08:44 2009
++# Linux kernel version: 2.6.32
++# Mon Dec 7 10:43:46 2009
+ #
+ CONFIG_ARM=y
+ CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+@@ -572,7 +572,15 @@ CONFIG_MTD_NAND_IDS=y
+ #
+ # UBI - Unsorted block images
+ #
+-# CONFIG_MTD_UBI is not set
++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
+@@ -1506,6 +1514,12 @@ CONFIG_JFFS2_RTIME=y
+ 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
+@@ -1775,9 +1789,9 @@ CONFIG_CRYPTO_DES=y
+ #
+ # Compression
+ #
+-# CONFIG_CRYPTO_DEFLATE is not set
++CONFIG_CRYPTO_DEFLATE=y
+ # CONFIG_CRYPTO_ZLIB is not set
+-# CONFIG_CRYPTO_LZO is not set
++CONFIG_CRYPTO_LZO=y
+
+ #
+ # Random Number Generation
+@@ -1792,7 +1806,7 @@ CONFIG_CRYPTO_HW=y
+ CONFIG_BITREVERSE=y
+ CONFIG_GENERIC_FIND_LAST_BIT=y
+ CONFIG_CRC_CCITT=y
+-# CONFIG_CRC16 is not set
++CONFIG_CRC16=y
+ # CONFIG_CRC_T10DIF is not set
+ # CONFIG_CRC_ITU_T is not set
+ CONFIG_CRC32=y
+@@ -1800,6 +1814,8 @@ CONFIG_CRC32=y
+ CONFIG_LIBCRC32C=y
+ CONFIG_ZLIB_INFLATE=y
+ CONFIG_ZLIB_DEFLATE=y
++CONFIG_LZO_COMPRESS=y
++CONFIG_LZO_DECOMPRESS=y
+ CONFIG_DECOMPRESS_GZIP=y
+ CONFIG_HAS_IOMEM=y
+ CONFIG_HAS_IOPORT=y
+--
+1.6.4.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/cm-t35/defconfig b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/defconfig
new file mode 100644
index 0000000000..78eeb66d59
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/cm-t35/defconfig
@@ -0,0 +1,1823 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32
+# Mon Dec 7 10:43:46 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=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_CPUFREQ=y
+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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_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=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_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 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
+
+#
+# Kernel Performance Events And Counters
+#
+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
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
+# 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 is not set
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBDAF=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_MMU=y
+# 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_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK 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_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM 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_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_BCMRING 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
+# CONFIG_ARCH_OMAP4 is not set
+
+#
+# OMAP Feature Selections
+#
+# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
+CONFIG_OMAP_RESET_CLOCKS=y
+CONFIG_OMAP_MUX=y
+# CONFIG_OMAP_MUX_DEBUG is not set
+CONFIG_OMAP_MUX_WARNINGS=y
+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_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_LL_DEBUG_NONE is not set
+# CONFIG_OMAP_PM_NONE is not set
+CONFIG_OMAP_PM_NOOP=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OVERO is not set
+# CONFIG_MACH_OMAP3EVM is not set
+# CONFIG_MACH_OMAP3517EVM is not set
+# CONFIG_MACH_OMAP3_PANDORA is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
+# CONFIG_MACH_OMAP_ZOOM2 is not set
+# CONFIG_MACH_OMAP_ZOOM3 is not set
+CONFIG_MACH_CM_T35=y
+# CONFIG_MACH_IGEP0020 is not set
+# CONFIG_MACH_OMAP_3630SDP 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_V7=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_ARM_L1_CACHE_SHIFT=6
+# CONFIG_ARM_ERRATA_430973 is not set
+# CONFIG_ARM_ERRATA_458693 is not set
+# CONFIG_ARM_ERRATA_460075 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=128
+# CONFIG_THUMB2_KERNEL is not set
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=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=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# 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_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=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=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_PM_RUNTIME 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_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_RDS 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_IEEE802154 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_CFG80211_DEFAULT_PS_VALUE=0
+# CONFIG_WIRELESS_OLD_REGULATORY is not set
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
+# CONFIG_LIB80211_DEBUG is not set
+
+#
+# CFG80211 needs to be enabled for MAC80211
+#
+# 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_DEVTMPFS is not set
+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 is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_TESTS is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_OMAP_NOR 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_SST25L 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_OMAP_PREFETCH=y
+# CONFIG_MTD_NAND_OMAP_PREFETCH_DMA 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_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 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_MG_DISK 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 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 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
+# 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_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_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 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_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMC911X is not set
+CONFIG_SMSC911X=y
+# 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_KS8842 is not set
+# CONFIG_KS8851 is not set
+# CONFIG_KS8851_MLL is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+CONFIG_WLAN=y
+# 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_USB_ZD1201 is not set
+# CONFIG_HOSTAP 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
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=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_ADP5588 is not set
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+CONFIG_KEYBOARD_TWL4030=m
+# CONFIG_KEYBOARD_XTKBD 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=m
+# 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_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 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 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_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 is not set
+# CONFIG_IPMI_HANDLER is not set
+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_COMPAT=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_DESIGNWARE is not set
+# 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_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_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS 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_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+# CONFIG_TWL4030_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_TPS65010 is not set
+CONFIG_TWL4030_CORE=y
+# CONFIG_TWL4030_POWER is not set
+# CONFIG_TWL4030_CODEC 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_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP 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_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+CONFIG_REGULATOR_TWL4030=y
+# CONFIG_REGULATOR_LP3971 is not set
+# CONFIG_REGULATOR_TPS65023 is not set
+# CONFIG_REGULATOR_TPS6507X is not set
+# CONFIG_MEDIA_SUPPORT 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_BROADSHEET is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_OMAP2_VRAM=y
+CONFIG_OMAP2_VRFB=y
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_VRAM_SIZE=4
+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
+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
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_GENERIC=y
+# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
+CONFIG_PANEL_TOPPOLY_TDO35S=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LMS283GF05 is not set
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_ILI9320 is not set
+CONFIG_LCD_TDO24M=y
+# CONFIG_LCD_VGG2432A4 is not set
+# CONFIG_LCD_PLATFORM is not set
+# CONFIG_BACKLIGHT_CLASS_DEVICE 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 is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=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_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_DRAGONRISE is not set
+# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_KYE is not set
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_TWINHAN 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
+# 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_HID_GREENASIA is not set
+# CONFIG_HID_SMARTJOYPLUS is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_HID_THRUSTMASTER is not set
+# CONFIG_HID_ZEROPLUS 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=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=y
+# 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_ISP1760_HCD is not set
+# CONFIG_USB_ISP1362_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 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=y
+# 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_R8A66597 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C_HSOTG is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LANGWELL is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+# CONFIG_USB_ZERO is not set
+# CONFIG_USB_AUDIO is not set
+CONFIG_USB_ETH=y
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_ETH_EEM 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_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 is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# 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_ACCESSIBILITY 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
+# CONFIG_RTC_DRV_RX8025 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
+# CONFIG_RTC_DRV_PCF2123 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_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# 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_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
+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
+
+#
+# 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 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 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_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_NFS_V4_1 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_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="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_STRIP_ASM_SYMS 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_DEBUG_SLAB is not set
+# CONFIG_DEBUG_KMEMLEAK is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_DEBUG_CREDENTIALS 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_DEBUG_FORCE_WEAK_PER_CPU is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_PAGE_POISONING is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+CONFIG_FTRACE=y
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
+# CONFIG_BOOT_TRACER is not set
+CONFIG_BRANCH_PROFILE_NONE=y
+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
+# CONFIG_PROFILE_ALL_BRANCHES 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
+
+#
+# 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_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=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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# 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=y
+CONFIG_CRC16=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=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-kexecboot-2.6.32/dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch b/recipes/linux/linux-kexecboot-2.6.32/dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch
new file mode 100644
index 0000000000..a22f3e712f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch
@@ -0,0 +1,254 @@
+From e09abf20005e9abf41e44e712bc600d2cb346cb5 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 15:05:30 -0800
+Subject: [PATCH 12/16] OMAP: DSS2: Add support for LG Philips LB035Q02 panel
+
+---
+ drivers/video/omap2/displays/Kconfig | 6 +
+ drivers/video/omap2/displays/Makefile | 1 +
+ .../omap2/displays/panel-lgphilips-lb035q02.c | 206 ++++++++++++++++++++
+ 3 files changed, 213 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
+
+diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
+index 79d2861..050f29c 100644
+--- a/drivers/video/omap2/displays/Kconfig
++++ b/drivers/video/omap2/displays/Kconfig
+@@ -7,6 +7,12 @@ config PANEL_GENERIC
+ Generic panel driver.
+ Used for DVI output for Beagle and OMAP3 SDP.
+
++config PANEL_LGPHILIPS_LB035Q02
++ tristate "LG.Philips LB035Q02 LCD Panel"
++ depends on OMAP2_DSS
++ help
++ LCD Panel used on Overo Palo35
++
+ config PANEL_SAMSUNG_LTE430WQ_F0C
+ tristate "Samsung LTE430WQ-F0C LCD Panel"
+ depends on OMAP2_DSS
+diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
+index d44e765..28f6f9b 100644
+--- a/drivers/video/omap2/displays/Makefile
++++ b/drivers/video/omap2/displays/Makefile
+@@ -1,4 +1,5 @@
+ obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
++obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.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-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
+new file mode 100644
+index 0000000..22dc865
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
+@@ -0,0 +1,206 @@
++/*
++ * LCD panel driver for LG.Philips LB035Q02
++ *
++ * 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 <linux/spi/spi.h>
++
++#include <plat/display.h>
++
++static struct spi_device *spidev;
++
++static struct omap_video_timings lb035q02_timings = {
++ .x_res = 320,
++ .y_res = 240,
++
++ .pixel_clock = 6500,
++
++ .hsw = 2,
++ .hfp = 20,
++ .hbp = 68,
++
++ .vsw = 2,
++ .vfp = 4,
++ .vbp = 18,
++};
++
++static int lb035q02_panel_probe(struct omap_dss_device *dssdev)
++{
++ dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
++ OMAP_DSS_LCD_IHS;
++ dssdev->panel.timings = lb035q02_timings;
++
++ return 0;
++}
++
++static void lb035q02_panel_remove(struct omap_dss_device *dssdev)
++{
++}
++
++static int lb035q02_write_reg(u8 reg, u16 val)
++{
++ struct spi_message msg;
++ struct spi_transfer index_xfer = {
++ .len = 3,
++ .cs_change = 1,
++ };
++ struct spi_transfer value_xfer = {
++ .len = 3,
++ };
++ u8 buffer[16];
++
++ spi_message_init(&msg);
++
++ /* register index */
++ buffer[0] = 0x70;
++ buffer[1] = 0x00;
++ buffer[2] = reg & 0x7f;
++ index_xfer.tx_buf = buffer;
++ spi_message_add_tail(&index_xfer, &msg);
++
++ /* register value */
++ buffer[4] = 0x72;
++ buffer[5] = val >> 8;
++ buffer[6] = val;
++ value_xfer.tx_buf = buffer + 4;
++ spi_message_add_tail(&value_xfer, &msg);
++
++ return spi_sync(spidev, &msg);
++}
++
++static int lb035q02_panel_enable(struct omap_dss_device *dssdev)
++{
++ int r = 0;
++
++ pr_info("lgphilips_lb035q02: panel_enable: 0x%08x\n", spidev);
++ /* wait couple of vsyncs until enabling the LCD */
++ msleep(50);
++
++ if (dssdev->platform_enable)
++ r = dssdev->platform_enable(dssdev);
++
++ /* Panel init sequence from page 28 of the spec */
++ lb035q02_write_reg(0x01, 0x6300);
++ lb035q02_write_reg(0x02, 0x0200);
++ lb035q02_write_reg(0x03, 0x0177);
++ lb035q02_write_reg(0x04, 0x04c7);
++ lb035q02_write_reg(0x05, 0xffc0);
++ lb035q02_write_reg(0x06, 0xe806);
++ lb035q02_write_reg(0x0a, 0x4008);
++ lb035q02_write_reg(0x0b, 0x0000);
++ lb035q02_write_reg(0x0d, 0x0030);
++ lb035q02_write_reg(0x0e, 0x2800);
++ lb035q02_write_reg(0x0f, 0x0000);
++ lb035q02_write_reg(0x16, 0x9f80);
++ lb035q02_write_reg(0x17, 0x0a0f);
++ lb035q02_write_reg(0x1e, 0x00c1);
++ lb035q02_write_reg(0x30, 0x0300);
++ lb035q02_write_reg(0x31, 0x0007);
++ lb035q02_write_reg(0x32, 0x0000);
++ lb035q02_write_reg(0x33, 0x0000);
++ lb035q02_write_reg(0x34, 0x0707);
++ lb035q02_write_reg(0x35, 0x0004);
++ lb035q02_write_reg(0x36, 0x0302);
++ lb035q02_write_reg(0x37, 0x0202);
++ lb035q02_write_reg(0x3a, 0x0a0d);
++ lb035q02_write_reg(0x3b, 0x0806);
++
++ return r;
++}
++
++static void lb035q02_panel_disable(struct omap_dss_device *dssdev)
++{
++ if (dssdev->platform_disable)
++ dssdev->platform_disable(dssdev);
++
++ /* wait at least 5 vsyncs after disabling the LCD */
++
++ msleep(100);
++}
++
++static int lb035q02_panel_suspend(struct omap_dss_device *dssdev)
++{
++ pr_info("lgphilips_lb035q02: panel_suspend\n");
++ lb035q02_panel_disable(dssdev);
++ return 0;
++}
++
++static int lb035q02_panel_resume(struct omap_dss_device *dssdev)
++{
++ pr_info("lgphilips_lb035q02: panel_resume\n");
++ return lb035q02_panel_enable(dssdev);
++}
++
++static struct omap_dss_driver lb035q02_driver = {
++ .probe = lb035q02_panel_probe,
++ .remove = lb035q02_panel_remove,
++
++ .enable = lb035q02_panel_enable,
++ .disable = lb035q02_panel_disable,
++ .suspend = lb035q02_panel_suspend,
++ .resume = lb035q02_panel_resume,
++
++ .driver = {
++ .name = "lgphilips_lb035q02_panel",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __devinit lb035q02_panel_spi_probe(struct spi_device *spi)
++{
++ spidev = spi;
++ return 0;
++}
++
++static int __devexit lb035q02_panel_spi_remove(struct spi_device *spi)
++{
++ return 0;
++}
++
++static struct spi_driver lb035q02_spi_driver = {
++ .driver = {
++ .name = "lgphilips_lb035q02_panel-spi",
++ .owner = THIS_MODULE,
++ },
++ .probe = lb035q02_panel_spi_probe,
++ .remove = __devexit_p (lb035q02_panel_spi_remove),
++};
++
++static int __init lb035q02_panel_drv_init(void)
++{
++ int ret;
++ ret = spi_register_driver(&lb035q02_spi_driver);
++ if (ret != 0)
++ pr_err("lgphilips_lb035q02: Unable to register SPI driver: %d\n", ret);
++
++ ret = omap_dss_register_driver(&lb035q02_driver);
++ if (ret != 0)
++ pr_err("lgphilips_lb035q02: Unable to register panel driver: %d\n", ret);
++
++ return ret;
++}
++
++static void __exit lb035q02_panel_drv_exit(void)
++{
++ spi_unregister_driver(&lb035q02_spi_driver);
++ omap_dss_unregister_driver(&lb035q02_driver);
++}
++
++module_init(lb035q02_panel_drv_init);
++module_exit(lb035q02_panel_drv_exit);
++MODULE_LICENSE("GPL");
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch b/recipes/linux/linux-kexecboot-2.6.32/dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch
new file mode 100644
index 0000000000..c673a09a76
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch
@@ -0,0 +1,343 @@
+From 6b135653505a2a5da42c92cfa31c3ab22e2b130f Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Fri, 18 Dec 2009 06:39:24 -0800
+Subject: [PATCH 14/16] OMAP: DSS: Add DSS2 support for Overo
+
+---
+ arch/arm/mach-omap2/board-overo.c | 233 +++++++++++++++++++++++++++++++-----
+ 1 files changed, 200 insertions(+), 33 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
+index d0394d9..b90b140 100644
+--- a/arch/arm/mach-omap2/board-overo.c
++++ b/arch/arm/mach-omap2/board-overo.c
+@@ -28,6 +28,7 @@
+ #include <linux/platform_device.h>
+ #include <linux/i2c/twl4030.h>
+ #include <linux/regulator/machine.h>
++#include <linux/spi/spi.h>
+
+ #include <linux/mtd/mtd.h>
+ #include <linux/mtd/nand.h>
+@@ -40,10 +41,12 @@
+
+ #include <plat/board.h>
+ #include <plat/common.h>
++#include <plat/display.h>
+ #include <mach/gpio.h>
+ #include <plat/gpmc.h>
+ #include <mach/hardware.h>
+ #include <plat/nand.h>
++#include <plat/mcspi.h>
+ #include <plat/mux.h>
+ #include <plat/usb.h>
+
+@@ -69,8 +72,6 @@
+ #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+
+-#include <plat/mcspi.h>
+-#include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+
+ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
+@@ -95,18 +96,6 @@ static struct ads7846_platform_data ads7846_config = {
+ .keep_vref_on = 1,
+ };
+
+-static struct spi_board_info overo_spi_board_info[] __initdata = {
+- {
+- .modalias = "ads7846",
+- .bus_num = 1,
+- .chip_select = 0,
+- .max_speed_hz = 1500000,
+- .controller_data = &ads7846_mcspi_config,
+- .irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN),
+- .platform_data = &ads7846_config,
+- }
+-};
+-
+ static void __init overo_ads7846_init(void)
+ {
+ if ((gpio_request(OVERO_GPIO_PENDOWN, "ADS7846_PENDOWN") == 0) &&
+@@ -116,9 +105,6 @@ static void __init overo_ads7846_init(void)
+ printk(KERN_ERR "could not obtain gpio for ADS7846_PENDOWN\n");
+ return;
+ }
+-
+- spi_register_board_info(overo_spi_board_info,
+- ARRAY_SIZE(overo_spi_board_info));
+ }
+
+ #else
+@@ -234,6 +220,137 @@ static inline void __init overo_init_smsc911x(void)
+ static inline void __init overo_init_smsc911x(void) { return; }
+ #endif
+
++/* DSS */
++static int lcd_enabled;
++static int dvi_enabled;
++
++#define OVERO_GPIO_LCD_EN 144
++#define OVERO_GPIO_LCD_BL 145
++
++static void __init overo_display_init(void)
++{
++ if ((gpio_request(OVERO_GPIO_LCD_EN, "OVERO_GPIO_LCD_EN") == 0) &&
++ (gpio_direction_output(OVERO_GPIO_LCD_EN, 1) == 0))
++ gpio_export(OVERO_GPIO_LCD_EN, 0);
++ else
++ printk(KERN_ERR "could not obtain gpio for "
++ "OVERO_GPIO_LCD_EN\n");
++
++ if ((gpio_request(OVERO_GPIO_LCD_BL, "OVERO_GPIO_LCD_BL") == 0) &&
++ (gpio_direction_output(OVERO_GPIO_LCD_BL, 1) == 0))
++ gpio_export(OVERO_GPIO_LCD_BL, 0);
++ else
++ printk(KERN_ERR "could not obtain gpio for "
++ "OVERO_GPIO_LCD_BL\n");
++}
++
++static int overo_panel_enable_dvi(struct omap_dss_device *dssdev)
++{
++ if (lcd_enabled) {
++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
++ return -EINVAL;
++ }
++ dvi_enabled = 1;
++
++ return 0;
++}
++
++static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
++{
++ dvi_enabled = 0;
++}
++
++static struct omap_dss_device overo_dvi_device = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .driver_name = "generic_panel",
++ .phy.dpi.data_lines = 24,
++ .platform_enable = overo_panel_enable_dvi,
++ .platform_disable = overo_panel_disable_dvi,
++};
++
++static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
++{
++ if (dvi_enabled) {
++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
++ return -EINVAL;
++ }
++
++ gpio_set_value(OVERO_GPIO_LCD_EN, 1);
++ gpio_set_value(OVERO_GPIO_LCD_BL, 1);
++ lcd_enabled = 1;
++ return 0;
++}
++
++static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
++{
++ gpio_set_value(OVERO_GPIO_LCD_EN, 0);
++ gpio_set_value(OVERO_GPIO_LCD_BL, 0);
++ lcd_enabled = 0;
++}
++
++#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
++ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
++static struct omap_dss_device overo_lcd35_device = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "lcd35",
++ .driver_name = "lgphilips_lb035q02_panel",
++ .phy.dpi.data_lines = 24,
++ .panel.recommended_bpp = 16,
++ .platform_enable = overo_panel_enable_lcd,
++ .platform_disable = overo_panel_disable_lcd,
++};
++#endif
++
++#if defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) || \
++ defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C_MODULE)
++static struct omap_dss_device overo_lcd43_device = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "lcd43",
++ .driver_name = "samsung_lte_panel",
++ .phy.dpi.data_lines = 24,
++ .panel.recommended_bpp = 16,
++ .platform_enable = overo_panel_enable_lcd,
++ .platform_disable = overo_panel_disable_lcd,
++};
++#endif
++
++static struct omap_dss_device *overo_dss_devices[] = {
++ &overo_dvi_device,
++#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
++ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
++ &overo_lcd35_device,
++#endif
++#if defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) || \
++ defined(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C_MODULE)
++ &overo_lcd43_device,
++#endif
++};
++
++static struct omap_dss_board_info overo_dss_data = {
++ .num_devices = ARRAY_SIZE(overo_dss_devices),
++ .devices = overo_dss_devices,
++ .default_device = &overo_dvi_device,
++};
++
++static struct platform_device overo_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &overo_dss_data,
++ },
++};
++
++static struct regulator_consumer_supply overo_vdda_dac_supply = {
++ .supply = "vdda_dac",
++ .dev = &overo_dss_device.dev,
++};
++
++static struct regulator_consumer_supply overo_vdds_dsi_supply = {
++ .supply = "vdds_dsi",
++ .dev = &overo_dss_device.dev,
++};
++
+ static struct mtd_partition overo_nand_partitions[] = {
+ {
+ .name = "xloader",
+@@ -379,6 +496,37 @@ static struct regulator_init_data overo_vmmc1 = {
+ .consumer_supplies = &overo_vmmc1_supply,
+ };
+
++/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
++static struct regulator_init_data overo_vdac = {
++ .constraints = {
++ .min_uV = 1800000,
++ .max_uV = 1800000,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &overo_vdda_dac_supply,
++};
++
++/* VPLL2 for digital video outputs */
++static struct regulator_init_data overo_vpll2 = {
++ .constraints = {
++ .name = "VDVI",
++ .min_uV = 1800000,
++ .max_uV = 1800000,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &overo_vdds_dsi_supply,
++};
++
++/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
++
+ static struct twl4030_codec_audio_data overo_audio_data = {
+ .audio_mclk = 26000000,
+ };
+@@ -388,8 +536,6 @@ static struct twl4030_codec_data overo_codec_data = {
+ .audio = &overo_audio_data,
+ };
+
+-/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
+-
+ static struct twl4030_madc_platform_data overo_madc_data = {
+ .irq_line = 1,
+ };
+@@ -402,6 +548,8 @@ static struct twl4030_platform_data overo_twldata = {
+ .usb = &overo_usb_data,
+ .codec = &overo_codec_data,
+ .vmmc1 = &overo_vmmc1,
++ .vdac = &overo_vdac,
++ .vpll2 = &overo_vpll2,
+ };
+
+ static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
+@@ -422,23 +570,41 @@ static int __init overo_i2c_init(void)
+ return 0;
+ }
+
+-static struct platform_device overo_lcd_device = {
+- .name = "overo_lcd",
+- .id = -1,
+-};
+-
+-static struct omap_lcd_config overo_lcd_config __initdata = {
+- .ctrl_name = "internal",
++static struct spi_board_info overo_spi_board_info[] __initdata = {
++#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
++ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
++ {
++ .modalias = "ads7846",
++ .bus_num = 1,
++ .chip_select = 0,
++ .max_speed_hz = 1500000,
++ .controller_data = &ads7846_mcspi_config,
++ .irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN),
++ .platform_data = &ads7846_config,
++ },
++#endif
++#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
++ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
++ {
++ .modalias = "lgphilips_lb035q02_panel-spi",
++ .bus_num = 1,
++ .chip_select = 1,
++ .max_speed_hz = 500000,
++ .mode = SPI_MODE_3,
++ },
++#endif
+ };
+
+-static struct omap_board_config_kernel overo_config[] __initdata = {
+- { OMAP_TAG_LCD, &overo_lcd_config },
+-};
++static int __init overo_spi_init(void)
++{
++ overo_ads7846_init();
++ spi_register_board_info(overo_spi_board_info,
++ ARRAY_SIZE(overo_spi_board_info));
++ return 0;
++}
+
+ static void __init overo_init_irq(void)
+ {
+- omap_board_config = overo_config;
+- omap_board_config_size = ARRAY_SIZE(overo_config);
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
+ mt46h32m32lf6_sdrc_params);
+ omap_init_irq();
+@@ -446,7 +612,7 @@ static void __init overo_init_irq(void)
+ }
+
+ static struct platform_device *overo_devices[] __initdata = {
+- &overo_lcd_device,
++ &overo_dss_device,
+ };
+
+ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+@@ -469,8 +635,9 @@ static void __init overo_init(void)
+ overo_flash_init();
+ usb_musb_init();
+ usb_ehci_init(&ehci_pdata);
+- overo_ads7846_init();
++ overo_spi_init();
+ overo_init_smsc911x();
++ overo_display_init();
+
+ /* Ensure SDRC pins are mux'd for self-refresh */
+ omap_cfg_reg(H16_34XX_SDRC_CKE0);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch b/recipes/linux/linux-kexecboot-2.6.32/dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch
new file mode 100644
index 0000000000..656ba85318
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch
@@ -0,0 +1,186 @@
+--- /tmp/board-omap3beagle.c 2009-12-22 10:47:35.000000000 +0100
++++ git/arch/arm/mach-omap2/board-omap3beagle.c 2009-12-22 10:59:53.000000000 +0100
+@@ -40,6 +40,7 @@
+
+ #include <plat/board.h>
+ #include <plat/common.h>
++#include <plat/display.h>
+ #include <plat/gpmc.h>
+ #include <plat/nand.h>
+ #include <plat/usb.h>
+@@ -149,6 +150,105 @@
+ .resource = &omap3beagle_nand_resource,
+ };
+
++/* DSS */
++
++static int beagle_enable_dvi(struct omap_dss_device *dssdev)
++{
++ if (dssdev->reset_gpio != -1)
++ gpio_set_value(dssdev->reset_gpio, 1);
++
++ return 0;
++}
++
++static void beagle_disable_dvi(struct omap_dss_device *dssdev)
++{
++ if (dssdev->reset_gpio != -1)
++ gpio_set_value(dssdev->reset_gpio, 0);
++}
++
++static struct omap_dss_device beagle_dvi_device = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .driver_name = "generic_panel",
++ .phy.dpi.data_lines = 24,
++ .reset_gpio = 170,
++ .platform_enable = beagle_enable_dvi,
++ .platform_disable = beagle_disable_dvi,
++};
++
++static int beagle_panel_enable_tv(struct omap_dss_device *dssdev)
++{
++#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_dss_device *dssdev)
++{
++ 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_device beagle_tv_device = {
++ .name = "tv",
++ .driver_name = "venc",
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .platform_enable = beagle_panel_enable_tv,
++ .platform_disable = beagle_panel_disable_tv,
++};
++
++static struct omap_dss_device *beagle_dss_devices[] = {
++ &beagle_dvi_device,
++ &beagle_tv_device,
++};
++
++static struct omap_dss_board_info beagle_dss_data = {
++ .num_devices = ARRAY_SIZE(beagle_dss_devices),
++ .devices = beagle_dss_devices,
++ .default_device = &beagle_dvi_device,
++};
++
++static struct platform_device beagle_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &beagle_dss_data,
++ },
++};
++
++static struct regulator_consumer_supply beagle_vdac_supply = {
++ .supply = "vdda_dac",
++ .dev = &beagle_dss_device.dev,
++};
++
++static struct regulator_consumer_supply beagle_vdvi_supply = {
++ .supply = "vdds_dsi",
++ .dev = &beagle_dss_device.dev,
++};
++
++static void __init beagle_display_init(void)
++{
++ int r;
++
++ r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
++ if (r < 0) {
++ printk(KERN_ERR "Unable to get DVI reset GPIO\n");
++ return;
++ }
++
++ gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
++}
++
+ #include "sdram-micron-mt46h32m32lf-6.h"
+
+ static struct twl4030_hsmmc_info mmc[] = {
+@@ -168,15 +268,6 @@
+ {} /* Terminator */
+ };
+
+-static struct platform_device omap3_beagle_lcd_device = {
+- .name = "omap3beagle_lcd",
+- .id = -1,
+-};
+-
+-static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
+- .ctrl_name = "internal",
+-};
+-
+ static struct regulator_consumer_supply beagle_vmmc1_supply = {
+ .supply = "vmmc",
+ };
+@@ -232,16 +323,6 @@
+ .setup = beagle_twl_gpio_setup,
+ };
+
+-static struct regulator_consumer_supply beagle_vdac_supply = {
+- .supply = "vdac",
+- .dev = &omap3_beagle_lcd_device.dev,
+-};
+-
+-static struct regulator_consumer_supply beagle_vdvi_supply = {
+- .supply = "vdvi",
+- .dev = &omap3_beagle_lcd_device.dev,
+-};
+-
+ /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+ static struct regulator_init_data beagle_vmmc1 = {
+ .constraints = {
+@@ -419,14 +500,8 @@
+ },
+ };
+
+-static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
+- { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
+-};
+-
+ static void __init omap3_beagle_init_irq(void)
+ {
+- omap_board_config = omap3_beagle_config;
+- omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
+ mt46h32m32lf6_sdrc_params);
+ omap_init_irq();
+@@ -437,9 +512,9 @@
+ }
+
+ static struct platform_device *omap3_beagle_devices[] __initdata = {
+- &omap3_beagle_lcd_device,
+ &leds_gpio,
+ &keys_gpio,
++ &beagle_dss_device,
+ };
+
+ static void __init omap3beagle_flash_init(void)
+@@ -522,8 +597,9 @@
+ /* Ensure SDRC pins are mux'd for self-refresh */
+ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
+ omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
+-}
+
++ beagle_display_init();
++}
+ static void __init omap3_beagle_map_io(void)
+ {
+ omap2_set_globals_343x();
diff --git a/recipes/linux/linux-kexecboot-2.6.32/dss2/0016-video-add-timings-for-hd720.patch b/recipes/linux/linux-kexecboot-2.6.32/dss2/0016-video-add-timings-for-hd720.patch
new file mode 100644
index 0000000000..e5f7a4e072
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/dss2/0016-video-add-timings-for-hd720.patch
@@ -0,0 +1,27 @@
+From 77c7ed5e802e9bb244cd00fa60c95de1e28c29be Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Sat, 19 Dec 2009 06:52:43 -0800
+Subject: [PATCH 16/16] video: add timings for hd720
+
+---
+ drivers/video/modedb.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
+index 34e4e79..9d9114d 100644
+--- a/drivers/video/modedb.c
++++ b/drivers/video/modedb.c
+@@ -100,6 +100,10 @@ static const struct fb_videomode modedb[] = {
+ NULL, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6,
+ 0, FB_VMODE_NONINTERLACED
+ }, {
++ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */
++ "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5,
++ 0, FB_VMODE_NONINTERLACED
++ }, {
+ /* 1280x1024 @ 87 Hz interlaced, 51 kHz hsync */
+ NULL, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12,
+ 0, FB_VMODE_INTERLACED
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/dss2/beagle-dss2-support.diff b/recipes/linux/linux-kexecboot-2.6.32/dss2/beagle-dss2-support.diff
new file mode 100755
index 0000000000..15d7971fa8
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/dss2/beagle-dss2-support.diff
@@ -0,0 +1,308 @@
+--- 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>
+@@ -44,6 +45,7 @@
+ #include <plat/mux.h>
+ #include <plat/usb.h>
+ #include <plat/timer-gp.h>
++#include <plat/display.h>
+
+ #include "mmc-twl4030.h"
+
+@@ -115,15 +117,6 @@
+ .gpio_wp = 29,
+ },
+ {} /* Terminator */
+-};
+-
+-static struct platform_device omap3_beagle_lcd_device = {
+- .name = "omap3beagle_lcd",
+- .id = -1,
+-};
+-
+-static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
+- .ctrl_name = "internal",
+ };
+
+ static struct regulator_consumer_supply beagle_vmmc1_supply = {
+@@ -179,16 +172,6 @@
+ .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
+ | BIT(15) | BIT(16) | BIT(17),
+ .setup = beagle_twl_gpio_setup,
+-};
+-
+-static struct regulator_consumer_supply beagle_vdac_supply = {
+- .supply = "vdac",
+- .dev = &omap3_beagle_lcd_device.dev,
+-};
+-
+-static struct regulator_consumer_supply beagle_vdvi_supply = {
+- .supply = "vdvi",
+- .dev = &omap3_beagle_lcd_device.dev,
+ };
+
+ /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+@@ -221,35 +204,6 @@
+ .consumer_supplies = &beagle_vsim_supply,
+ };
+
+-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
+-static struct regulator_init_data beagle_vdac = {
+- .constraints = {
+- .min_uV = 1800000,
+- .max_uV = 1800000,
+- .valid_modes_mask = REGULATOR_MODE_NORMAL
+- | REGULATOR_MODE_STANDBY,
+- .valid_ops_mask = REGULATOR_CHANGE_MODE
+- | REGULATOR_CHANGE_STATUS,
+- },
+- .num_consumer_supplies = 1,
+- .consumer_supplies = &beagle_vdac_supply,
+-};
+-
+-/* VPLL2 for digital video outputs */
+-static struct regulator_init_data beagle_vpll2 = {
+- .constraints = {
+- .name = "VDVI",
+- .min_uV = 1800000,
+- .max_uV = 1800000,
+- .valid_modes_mask = REGULATOR_MODE_NORMAL
+- | REGULATOR_MODE_STANDBY,
+- .valid_ops_mask = REGULATOR_CHANGE_MODE
+- | REGULATOR_CHANGE_STATUS,
+- },
+- .num_consumer_supplies = 1,
+- .consumer_supplies = &beagle_vdvi_supply,
+-};
+-
+ static struct twl4030_usb_data beagle_usb_data = {
+ .usb_mode = T2_USB_MODE_ULPI,
+ };
+@@ -262,39 +216,6 @@
+ .audio_mclk = 26000000,
+ .audio = &beagle_audio_data,
+ };
+-
+-static struct twl4030_platform_data beagle_twldata = {
+- .irq_base = TWL4030_IRQ_BASE,
+- .irq_end = TWL4030_IRQ_END,
+-
+- /* platform_data for children goes here */
+- .usb = &beagle_usb_data,
+- .gpio = &beagle_gpio_data,
+- .codec = &beagle_codec_data,
+- .vmmc1 = &beagle_vmmc1,
+- .vsim = &beagle_vsim,
+- .vdac = &beagle_vdac,
+- .vpll2 = &beagle_vpll2,
+-};
+-
+-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
+- {
+- I2C_BOARD_INFO("twl4030", 0x48),
+- .flags = I2C_CLIENT_WAKE,
+- .irq = INT_34XX_SYS_NIRQ,
+- .platform_data = &beagle_twldata,
+- },
+-};
+-
+-static int __init omap3_beagle_i2c_init(void)
+-{
+- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
+- ARRAY_SIZE(beagle_i2c_boardinfo));
+- /* Bus 3 is attached to the DVI port where devices like the pico DLP
+- * projector don't work reliably with 400kHz */
+- omap_register_i2c_bus(3, 100, NULL, 0);
+- return 0;
+-}
+
+ static struct gpio_led gpio_leds[] = {
+ {
+@@ -349,14 +270,156 @@
+ },
+ };
+
+-static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
+- { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
+-};
++/* DSS */
++
++static int beagle_enable_dvi(struct omap_dss_device *dssdev)
++{
++ if (dssdev->reset_gpio != -1)
++ gpio_set_value(dssdev->reset_gpio, 1);
++
++ return 0;
++}
++
++static void beagle_disable_dvi(struct omap_dss_device *dssdev)
++{
++ if (dssdev->reset_gpio != -1)
++ gpio_set_value(dssdev->reset_gpio, 0);
++}
++
++static struct omap_dss_device beagle_dvi_device = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .driver_name = "generic_panel",
++ .phy.dpi.data_lines = 24,
++ .reset_gpio = 170,
++ .platform_enable = beagle_enable_dvi,
++ .platform_disable = beagle_disable_dvi,
++};
++
++static int beagle_panel_enable_tv(struct omap_dss_device *dssdev)
++{
++ return 0;
++}
++
++static void beagle_panel_disable_tv(struct omap_dss_device *dssdev)
++{
++}
++
++static struct omap_dss_device beagle_tv_device = {
++ .name = "tv",
++ .driver_name = "venc",
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .platform_enable = beagle_panel_enable_tv,
++ .platform_disable = beagle_panel_disable_tv,
++};
++
++static struct omap_dss_device *beagle_dss_devices[] = {
++ &beagle_dvi_device,
++ &beagle_tv_device,
++};
++
++static struct omap_dss_board_info beagle_dss_data = {
++ .num_devices = ARRAY_SIZE(beagle_dss_devices),
++ .devices = beagle_dss_devices,
++ .default_device = &beagle_dvi_device,
++};
++
++static struct platform_device beagle_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &beagle_dss_data,
++ },
++};
++
++static struct regulator_consumer_supply beagle_vdda_dac_supply = {
++ .supply = "vdda_dac",
++ .dev = &beagle_dss_device.dev,
++};
++
++static struct regulator_consumer_supply beagle_vdds_dsi_supply = {
++ .supply = "vdds_dsi",
++ .dev = &beagle_dss_device.dev,
++};
++
++static void __init beagle_display_init(void)
++{
++ int r;
++
++ r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
++ if (r < 0) {
++ printk(KERN_ERR "Unable to get DVI reset GPIO\n");
++ return;
++ }
++
++ gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
++}
++
++/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
++static struct regulator_init_data beagle_vdac = {
++ .constraints = {
++ .min_uV = 1800000,
++ .max_uV = 1800000,
++ .apply_uV = true,
++ .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &beagle_vdda_dac_supply,
++};
++
++/* VPLL2 for digital video outputs */
++static struct regulator_init_data beagle_vpll2 = {
++ .constraints = {
++ .name = "VDVI",
++ .min_uV = 1800000,
++ .max_uV = 1800000, .valid_modes_mask = REGULATOR_MODE_NORMAL
++ | REGULATOR_MODE_STANDBY,
++ .valid_ops_mask = REGULATOR_CHANGE_MODE
++ | REGULATOR_CHANGE_STATUS,
++ },
++ .num_consumer_supplies = 1,
++ .consumer_supplies = &beagle_vdds_dsi_supply,
++};
++
++static struct twl4030_platform_data beagle_twldata = {
++ .irq_base = TWL4030_IRQ_BASE,
++ .irq_end = TWL4030_IRQ_END,
++
++ /* platform_data for children goes here */
++ .usb = &beagle_usb_data,
++ .gpio = &beagle_gpio_data,
++ .vmmc1 = &beagle_vmmc1,
++ .vsim = &beagle_vsim,
++ .vdac = &beagle_vdac,
++ .vpll2 = &beagle_vpll2,
++};
++
++static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = {
++ {
++ I2C_BOARD_INFO("twl4030", 0x48),
++ .flags = I2C_CLIENT_WAKE,
++ .irq = INT_34XX_SYS_NIRQ,
++ .platform_data = &beagle_twldata,
++ },
++};
++
++static int __init omap3_beagle_i2c_init(void)
++{
++ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo,
++ ARRAY_SIZE(beagle_i2c1_boardinfo));
++ /* Bus 3 is attached to the DVI port where devices like the pico DLP
++ * projector don't work reliably with 400kHz */
++ omap_register_i2c_bus(3, 100, NULL, 0);
++ return 0;
++}
++
+
+ static void __init omap3_beagle_init_irq(void)
+ {
+- omap_board_config = omap3_beagle_config;
+- omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
+ mt46h32m32lf6_sdrc_params);
+ omap_init_irq();
+@@ -367,7 +430,7 @@
+ }
+
+ static struct platform_device *omap3_beagle_devices[] __initdata = {
+- &omap3_beagle_lcd_device,
++ &beagle_dss_device,
+ &leds_gpio,
+ &keys_gpio,
+ };
+@@ -437,6 +500,8 @@
+ usb_musb_init();
+ usb_ehci_init(&ehci_pdata);
+ omap3beagle_flash_init();
++
++ beagle_display_init();
+
+ /* Ensure SDRC pins are mux'd for self-refresh */
+ omap_cfg_reg(H16_34XX_SDRC_CKE0);
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/madc/0009-drivers-mfd-add-twl4030-madc-driver.patch b/recipes/linux/linux-kexecboot-2.6.32/madc/0009-drivers-mfd-add-twl4030-madc-driver.patch
new file mode 100644
index 0000000000..00d7b9b72d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/madc/0009-drivers-mfd-add-twl4030-madc-driver.patch
@@ -0,0 +1,601 @@
+From acfc350552bbe07f5dd8bf2e4f1db67af64975a8 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 14:19:34 -0800
+Subject: [PATCH 09/16] drivers: mfd: add twl4030 madc driver
+
+---
+ drivers/mfd/Kconfig | 21 ++
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/twl4030-madc.c | 536 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 558 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/twl4030-madc.c
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 08f2d07..008ced0 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -127,6 +127,27 @@ config TWL4030_CODEC
+ select MFD_CORE
+ default n
+
++config TWL4030_MADC
++ tristate "TWL4030 MADC Driver"
++ depends on TWL4030_CORE
++ help
++ The TWL4030 Monitoring ADC driver enables the host
++ processor to monitor analog signals using analog-to-digital
++ conversions on the input source. TWL4030 MADC provides the
++ following features:
++ - Single 10-bit ADC with successive approximation register (SAR) conversion;
++ - Analog multiplexer for 16 inputs;
++ - Seven (of the 16) inputs are freely available;
++ - Battery voltage monitoring;
++ - Concurrent conversion request management;
++ - Interrupt signal to Primary Interrupt Handler;
++ - Averaging feature;
++ - Selective enable/disable of the averaging feature.
++
++ Say 'y' here to statically link this module into the kernel or 'm'
++ to build it as a dinamically loadable module. The module will be
++ called twl4030-madc.ko
++
+ config MFD_TMIO
+ bool
+ default n
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index af0fc90..3992aee 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -27,6 +27,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o
+ obj-$(CONFIG_TWL4030_CORE) += twl4030-core.o twl4030-irq.o
+ obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o
+ obj-$(CONFIG_TWL4030_CODEC) += twl4030-codec.o
++obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o
+
+ obj-$(CONFIG_MFD_MC13783) += mc13783-core.o
+
+diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c
+new file mode 100644
+index 0000000..7d83ab8
+--- /dev/null
++++ b/drivers/mfd/twl4030-madc.c
+@@ -0,0 +1,536 @@
++/*
++ * TWL4030 MADC module driver
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Mikko Ylinen <mikko.k.ylinen@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, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/kernel.h>
++#include <linux/types.h>
++#include <linux/module.h>
++#include <linux/delay.h>
++#include <linux/fs.h>
++#include <linux/platform_device.h>
++#include <linux/miscdevice.h>
++#include <linux/i2c/twl4030.h>
++#include <linux/i2c/twl4030-madc.h>
++
++#include <asm/uaccess.h>
++
++#define TWL4030_MADC_PFX "twl4030-madc: "
++
++struct twl4030_madc_data {
++ struct device *dev;
++ struct mutex lock;
++ struct work_struct ws;
++ struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS];
++ int imr;
++ int isr;
++};
++
++static struct twl4030_madc_data *the_madc;
++
++static
++const struct twl4030_madc_conversion_method twl4030_conversion_methods[] = {
++ [TWL4030_MADC_RT] = {
++ .sel = TWL4030_MADC_RTSELECT_LSB,
++ .avg = TWL4030_MADC_RTAVERAGE_LSB,
++ .rbase = TWL4030_MADC_RTCH0_LSB,
++ },
++ [TWL4030_MADC_SW1] = {
++ .sel = TWL4030_MADC_SW1SELECT_LSB,
++ .avg = TWL4030_MADC_SW1AVERAGE_LSB,
++ .rbase = TWL4030_MADC_GPCH0_LSB,
++ .ctrl = TWL4030_MADC_CTRL_SW1,
++ },
++ [TWL4030_MADC_SW2] = {
++ .sel = TWL4030_MADC_SW2SELECT_LSB,
++ .avg = TWL4030_MADC_SW2AVERAGE_LSB,
++ .rbase = TWL4030_MADC_GPCH0_LSB,
++ .ctrl = TWL4030_MADC_CTRL_SW2,
++ },
++};
++
++static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg)
++{
++ int ret;
++ u8 val;
++
++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg);
++ if (ret) {
++ dev_dbg(madc->dev, "unable to read register 0x%X\n", reg);
++ return ret;
++ }
++
++ return val;
++}
++
++static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val)
++{
++ int ret;
++
++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MADC, val, reg);
++ if (ret)
++ dev_err(madc->dev, "unable to write register 0x%X\n", reg);
++}
++
++static int twl4030_madc_channel_raw_read(struct twl4030_madc_data *madc, u8 reg)
++{
++ u8 msb, lsb;
++
++ /* For each ADC channel, we have MSB and LSB register pair. MSB address
++ * is always LSB address+1. reg parameter is the addr of LSB register */
++ msb = twl4030_madc_read(madc, reg + 1);
++ lsb = twl4030_madc_read(madc, reg);
++
++ return (int)(((msb << 8) | lsb) >> 6);
++}
++
++static int twl4030_madc_read_channels(struct twl4030_madc_data *madc,
++ u8 reg_base, u16 channels, int *buf)
++{
++ int count = 0;
++ u8 reg, i;
++
++ if (unlikely(!buf))
++ return 0;
++
++ for (i = 0; i < TWL4030_MADC_MAX_CHANNELS; i++) {
++ if (channels & (1<<i)) {
++ reg = reg_base + 2*i;
++ buf[i] = twl4030_madc_channel_raw_read(madc, reg);
++ count++;
++ }
++ }
++ return count;
++}
++
++static void twl4030_madc_enable_irq(struct twl4030_madc_data *madc, int id)
++{
++ u8 val;
++
++ val = twl4030_madc_read(madc, madc->imr);
++ val &= ~(1 << id);
++ twl4030_madc_write(madc, madc->imr, val);
++}
++
++static void twl4030_madc_disable_irq(struct twl4030_madc_data *madc, int id)
++{
++ u8 val;
++
++ val = twl4030_madc_read(madc, madc->imr);
++ val |= (1 << id);
++ twl4030_madc_write(madc, madc->imr, val);
++}
++
++static irqreturn_t twl4030_madc_irq_handler(int irq, void *_madc)
++{
++ struct twl4030_madc_data *madc = _madc;
++ u8 isr_val, imr_val;
++ int i;
++
++#ifdef CONFIG_LOCKDEP
++ /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
++ * we don't want and can't tolerate. Although it might be
++ * friendlier not to borrow this thread context...
++ */
++ local_irq_enable();
++#endif
++
++ /* Use COR to ack interrupts since we have no shared IRQs in ISRx */
++ isr_val = twl4030_madc_read(madc, madc->isr);
++ imr_val = twl4030_madc_read(madc, madc->imr);
++
++ isr_val &= ~imr_val;
++
++ for (i = 0; i < TWL4030_MADC_NUM_METHODS; i++) {
++
++ if (!(isr_val & (1<<i)))
++ continue;
++
++ twl4030_madc_disable_irq(madc, i);
++ madc->requests[i].result_pending = 1;
++ }
++
++ schedule_work(&madc->ws);
++
++ return IRQ_HANDLED;
++}
++
++static void twl4030_madc_work(struct work_struct *ws)
++{
++ const struct twl4030_madc_conversion_method *method;
++ struct twl4030_madc_data *madc;
++ struct twl4030_madc_request *r;
++ int len, i;
++
++ madc = container_of(ws, struct twl4030_madc_data, ws);
++ mutex_lock(&madc->lock);
++
++ for (i = 0; i < TWL4030_MADC_NUM_METHODS; i++) {
++
++ r = &madc->requests[i];
++
++ /* No pending results for this method, move to next one */
++ if (!r->result_pending)
++ continue;
++
++ method = &twl4030_conversion_methods[r->method];
++
++ /* Read results */
++ len = twl4030_madc_read_channels(madc, method->rbase,
++ r->channels, r->rbuf);
++
++ /* Return results to caller */
++ if (r->func_cb != NULL) {
++ r->func_cb(len, r->channels, r->rbuf);
++ r->func_cb = NULL;
++ }
++
++ /* Free request */
++ r->result_pending = 0;
++ r->active = 0;
++ }
++
++ mutex_unlock(&madc->lock);
++}
++
++static int twl4030_madc_set_irq(struct twl4030_madc_data *madc,
++ struct twl4030_madc_request *req)
++{
++ struct twl4030_madc_request *p;
++
++ p = &madc->requests[req->method];
++
++ memcpy(p, req, sizeof *req);
++
++ twl4030_madc_enable_irq(madc, req->method);
++
++ return 0;
++}
++
++static inline void twl4030_madc_start_conversion(struct twl4030_madc_data *madc,
++ int conv_method)
++{
++ const struct twl4030_madc_conversion_method *method;
++
++ method = &twl4030_conversion_methods[conv_method];
++
++ switch (conv_method) {
++ case TWL4030_MADC_SW1:
++ case TWL4030_MADC_SW2:
++ twl4030_madc_write(madc, method->ctrl, TWL4030_MADC_SW_START);
++ break;
++ case TWL4030_MADC_RT:
++ default:
++ break;
++ }
++}
++
++static int twl4030_madc_wait_conversion_ready(
++ struct twl4030_madc_data *madc,
++ unsigned int timeout_ms, u8 status_reg)
++{
++ unsigned long timeout;
++
++ timeout = jiffies + msecs_to_jiffies(timeout_ms);
++ do {
++ u8 reg;
++
++ reg = twl4030_madc_read(madc, status_reg);
++ if (!(reg & TWL4030_MADC_BUSY) && (reg & TWL4030_MADC_EOC_SW))
++ return 0;
++ } while (!time_after(jiffies, timeout));
++
++ return -EAGAIN;
++}
++
++int twl4030_madc_conversion(struct twl4030_madc_request *req)
++{
++ const struct twl4030_madc_conversion_method *method;
++ u8 ch_msb, ch_lsb;
++ int ret;
++
++ if (unlikely(!req))
++ return -EINVAL;
++
++ mutex_lock(&the_madc->lock);
++
++ /* Do we have a conversion request ongoing */
++ if (the_madc->requests[req->method].active) {
++ ret = -EBUSY;
++ goto out;
++ }
++
++ ch_msb = (req->channels >> 8) & 0xff;
++ ch_lsb = req->channels & 0xff;
++
++ method = &twl4030_conversion_methods[req->method];
++
++ /* Select channels to be converted */
++ twl4030_madc_write(the_madc, method->sel + 1, ch_msb);
++ twl4030_madc_write(the_madc, method->sel, ch_lsb);
++
++ /* Select averaging for all channels if do_avg is set */
++ if (req->do_avg) {
++ twl4030_madc_write(the_madc, method->avg + 1, ch_msb);
++ twl4030_madc_write(the_madc, method->avg, ch_lsb);
++ }
++
++ if ((req->type == TWL4030_MADC_IRQ_ONESHOT) && (req->func_cb != NULL)) {
++ twl4030_madc_set_irq(the_madc, req);
++ twl4030_madc_start_conversion(the_madc, req->method);
++ the_madc->requests[req->method].active = 1;
++ ret = 0;
++ goto out;
++ }
++
++ /* With RT method we should not be here anymore */
++ if (req->method == TWL4030_MADC_RT) {
++ ret = -EINVAL;
++ goto out;
++ }
++
++ twl4030_madc_start_conversion(the_madc, req->method);
++ the_madc->requests[req->method].active = 1;
++
++ /* Wait until conversion is ready (ctrl register returns EOC) */
++ ret = twl4030_madc_wait_conversion_ready(the_madc, 5, method->ctrl);
++ if (ret) {
++ dev_dbg(the_madc->dev, "conversion timeout!\n");
++ the_madc->requests[req->method].active = 0;
++ goto out;
++ }
++
++ ret = twl4030_madc_read_channels(the_madc, method->rbase, req->channels,
++ req->rbuf);
++
++ the_madc->requests[req->method].active = 0;
++
++out:
++ mutex_unlock(&the_madc->lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(twl4030_madc_conversion);
++
++static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc,
++ int chan, int on)
++{
++ int ret;
++ u8 regval;
++
++ /* Current generator is only available for ADCIN0 and ADCIN1. NB:
++ * ADCIN1 current generator only works when AC or VBUS is present */
++ if (chan > 1)
++ return EINVAL;
++
++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
++ &regval, TWL4030_BCI_BCICTL1);
++ if (on)
++ regval |= (chan) ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN;
++ else
++ regval &= (chan) ? ~TWL4030_BCI_ITHEN : ~TWL4030_BCI_TYPEN;
++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
++ regval, TWL4030_BCI_BCICTL1);
++
++ return ret;
++}
++
++static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on)
++{
++ u8 regval;
++
++ regval = twl4030_madc_read(madc, TWL4030_MADC_CTRL1);
++ if (on)
++ regval |= TWL4030_MADC_MADCON;
++ else
++ regval &= ~TWL4030_MADC_MADCON;
++ twl4030_madc_write(madc, TWL4030_MADC_CTRL1, regval);
++
++ return 0;
++}
++
++static long twl4030_madc_ioctl(struct file *filp, unsigned int cmd,
++ unsigned long arg)
++{
++ struct twl4030_madc_user_parms par;
++ int val, ret;
++
++ ret = copy_from_user(&par, (void __user *) arg, sizeof(par));
++ if (ret) {
++ dev_dbg(the_madc->dev, "copy_from_user: %d\n", ret);
++ return -EACCES;
++ }
++
++ switch (cmd) {
++ case TWL4030_MADC_IOCX_ADC_RAW_READ: {
++ struct twl4030_madc_request req;
++ if (par.channel >= TWL4030_MADC_MAX_CHANNELS)
++ return -EINVAL;
++
++ req.channels = (1 << par.channel);
++ req.do_avg = par.average;
++ req.method = TWL4030_MADC_SW1;
++ req.func_cb = NULL;
++
++ val = twl4030_madc_conversion(&req);
++ if (val <= 0) {
++ par.status = -1;
++ } else {
++ par.status = 0;
++ par.result = (u16)req.rbuf[par.channel];
++ }
++ break;
++ }
++ default:
++ return -EINVAL;
++ }
++
++ ret = copy_to_user((void __user *) arg, &par, sizeof(par));
++ if (ret) {
++ dev_dbg(the_madc->dev, "copy_to_user: %d\n", ret);
++ return -EACCES;
++ }
++
++ return 0;
++}
++
++static struct file_operations twl4030_madc_fileops = {
++ .owner = THIS_MODULE,
++ .unlocked_ioctl = twl4030_madc_ioctl
++};
++
++static struct miscdevice twl4030_madc_device = {
++ .minor = MISC_DYNAMIC_MINOR,
++ .name = "twl4030-madc",
++ .fops = &twl4030_madc_fileops
++};
++
++static int __init twl4030_madc_probe(struct platform_device *pdev)
++{
++ struct twl4030_madc_data *madc;
++ struct twl4030_madc_platform_data *pdata = pdev->dev.platform_data;
++ int ret;
++ u8 regval;
++
++ madc = kzalloc(sizeof *madc, GFP_KERNEL);
++ if (!madc)
++ return -ENOMEM;
++
++ if (!pdata) {
++ dev_dbg(&pdev->dev, "platform_data not available\n");
++ ret = -EINVAL;
++ goto err_pdata;
++ }
++
++ madc->imr = (pdata->irq_line == 1) ? TWL4030_MADC_IMR1 : TWL4030_MADC_IMR2;
++ madc->isr = (pdata->irq_line == 1) ? TWL4030_MADC_ISR1 : TWL4030_MADC_ISR2;
++
++ ret = misc_register(&twl4030_madc_device);
++ if (ret) {
++ dev_dbg(&pdev->dev, "could not register misc_device\n");
++ goto err_misc;
++ }
++ twl4030_madc_set_power(madc, 1);
++ twl4030_madc_set_current_generator(madc, 0, 1);
++
++ /* Enable ADCIN3 through 6 */
++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_USB,
++ &regval, TWL4030_USB_CARKIT_ANA_CTRL);
++
++ regval |= TWL4030_USB_SEL_MADC_MCPC;
++
++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_USB,
++ regval, TWL4030_USB_CARKIT_ANA_CTRL);
++
++
++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE,
++ &regval, TWL4030_BCI_BCICTL1);
++
++ regval |= TWL4030_BCI_MESBAT;
++
++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE,
++ regval, TWL4030_BCI_BCICTL1);
++
++ ret = request_irq(platform_get_irq(pdev, 0), twl4030_madc_irq_handler,
++ 0, "twl4030_madc", madc);
++ if (ret) {
++ dev_dbg(&pdev->dev, "could not request irq\n");
++ goto err_irq;
++ }
++
++ platform_set_drvdata(pdev, madc);
++ mutex_init(&madc->lock);
++ INIT_WORK(&madc->ws, twl4030_madc_work);
++
++ the_madc = madc;
++
++ return 0;
++
++err_irq:
++ misc_deregister(&twl4030_madc_device);
++
++err_misc:
++err_pdata:
++ kfree(madc);
++
++ return ret;
++}
++
++static int __exit twl4030_madc_remove(struct platform_device *pdev)
++{
++ struct twl4030_madc_data *madc = platform_get_drvdata(pdev);
++
++ twl4030_madc_set_power(madc, 0);
++ twl4030_madc_set_current_generator(madc, 0, 0);
++ free_irq(platform_get_irq(pdev, 0), madc);
++ cancel_work_sync(&madc->ws);
++ misc_deregister(&twl4030_madc_device);
++
++ return 0;
++}
++
++static struct platform_driver twl4030_madc_driver = {
++ .probe = twl4030_madc_probe,
++ .remove = __exit_p(twl4030_madc_remove),
++ .driver = {
++ .name = "twl4030_madc",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init twl4030_madc_init(void)
++{
++ return platform_driver_register(&twl4030_madc_driver);
++}
++module_init(twl4030_madc_init);
++
++static void __exit twl4030_madc_exit(void)
++{
++ platform_driver_unregister(&twl4030_madc_driver);
++}
++module_exit(twl4030_madc_exit);
++
++MODULE_ALIAS("platform:twl4030-madc");
++MODULE_AUTHOR("Nokia Corporation");
++MODULE_DESCRIPTION("twl4030 ADC driver");
++MODULE_LICENSE("GPL");
++
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch b/recipes/linux/linux-kexecboot-2.6.32/madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch
new file mode 100644
index 0000000000..3b5164c8e7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch
@@ -0,0 +1,32 @@
+From a7e4d5c1b598e866c98be33768d14c9cd80d864d Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 14:27:15 -0800
+Subject: [PATCH 10/16] ARM: OMAP: Add twl4030 madc support to Overo
+
+---
+ arch/arm/mach-omap2/board-overo.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
+index 1b94f2c..d0394d9 100644
+--- a/arch/arm/mach-omap2/board-overo.c
++++ b/arch/arm/mach-omap2/board-overo.c
+@@ -390,10 +390,15 @@ static struct twl4030_codec_data overo_codec_data = {
+
+ /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
+
++static struct twl4030_madc_platform_data overo_madc_data = {
++ .irq_line = 1,
++};
++
+ static struct twl4030_platform_data overo_twldata = {
+ .irq_base = TWL4030_IRQ_BASE,
+ .irq_end = TWL4030_IRQ_END,
+ .gpio = &overo_gpio_data,
++ .madc = &overo_madc_data,
+ .usb = &overo_usb_data,
+ .codec = &overo_codec_data,
+ .vmmc1 = &overo_vmmc1,
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch b/recipes/linux/linux-kexecboot-2.6.32/madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch
new file mode 100644
index 0000000000..cba908fb3c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch
@@ -0,0 +1,35 @@
+From 1a123bfff816abb027985923799c3e448e5cb7b7 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 14:32:36 -0800
+Subject: [PATCH 11/16] ARM: OMAP: Add twl4030 madc support to Beagle
+
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index d00b089..955da5b 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -314,6 +314,10 @@ static struct twl4030_codec_data beagle_codec_data = {
+ .audio = &beagle_audio_data,
+ };
+
++static struct twl4030_madc_platform_data beagle_madc_data = {
++ .irq_line = 1,
++};
++
+ static struct twl4030_platform_data beagle_twldata = {
+ .irq_base = TWL4030_IRQ_BASE,
+ .irq_end = TWL4030_IRQ_END,
+@@ -322,6 +326,7 @@ static struct twl4030_platform_data beagle_twldata = {
+ .usb = &beagle_usb_data,
+ .gpio = &beagle_gpio_data,
+ .codec = &beagle_codec_data,
++ .madc = &beagle_madc_data,
+ .vmmc1 = &beagle_vmmc1,
+ .vsim = &beagle_vsim,
+ .vdac = &beagle_vdac,
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/madc/0013-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch b/recipes/linux/linux-kexecboot-2.6.32/madc/0013-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch
new file mode 100644
index 0000000000..b021871993
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/madc/0013-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch
@@ -0,0 +1,149 @@
+From c7412fa6dec1460ac0d1895f16421732e5174406 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 17 Dec 2009 15:54:58 -0800
+Subject: [PATCH 13/16] ARM: OMAP: Add missing twl4030 madc header file
+
+---
+ include/linux/i2c/twl4030-madc.h | 130 ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 130 insertions(+), 0 deletions(-)
+ create mode 100644 include/linux/i2c/twl4030-madc.h
+
+diff --git a/include/linux/i2c/twl4030-madc.h b/include/linux/i2c/twl4030-madc.h
+new file mode 100644
+index 0000000..341a665
+--- /dev/null
++++ b/include/linux/i2c/twl4030-madc.h
+@@ -0,0 +1,130 @@
++/*
++ * include/linux/i2c/twl4030-madc.h
++ *
++ * TWL4030 MADC module driver header
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Mikko Ylinen <mikko.k.ylinen@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, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#ifndef _TWL4030_MADC_H
++#define _TWL4030_MADC_H
++
++struct twl4030_madc_conversion_method {
++ u8 sel;
++ u8 avg;
++ u8 rbase;
++ u8 ctrl;
++};
++
++#define TWL4030_MADC_MAX_CHANNELS 16
++
++struct twl4030_madc_request {
++ u16 channels;
++ u16 do_avg;
++ u16 method;
++ u16 type;
++ int active;
++ int result_pending;
++ int rbuf[TWL4030_MADC_MAX_CHANNELS];
++ void (*func_cb)(int len, int channels, int *buf);
++};
++
++enum conversion_methods {
++ TWL4030_MADC_RT,
++ TWL4030_MADC_SW1,
++ TWL4030_MADC_SW2,
++ TWL4030_MADC_NUM_METHODS
++};
++
++enum sample_type {
++ TWL4030_MADC_WAIT,
++ TWL4030_MADC_IRQ_ONESHOT,
++ TWL4030_MADC_IRQ_REARM
++};
++
++#define TWL4030_MADC_CTRL1 0x00
++#define TWL4030_MADC_CTRL2 0x01
++
++#define TWL4030_MADC_RTSELECT_LSB 0x02
++#define TWL4030_MADC_SW1SELECT_LSB 0x06
++#define TWL4030_MADC_SW2SELECT_LSB 0x0A
++
++#define TWL4030_MADC_RTAVERAGE_LSB 0x04
++#define TWL4030_MADC_SW1AVERAGE_LSB 0x08
++#define TWL4030_MADC_SW2AVERAGE_LSB 0x0C
++
++#define TWL4030_MADC_CTRL_SW1 0x12
++#define TWL4030_MADC_CTRL_SW2 0x13
++
++#define TWL4030_MADC_RTCH0_LSB 0x17
++#define TWL4030_MADC_GPCH0_LSB 0x37
++
++#define TWL4030_MADC_MADCON (1<<0) /* MADC power on */
++#define TWL4030_MADC_BUSY (1<<0) /* MADC busy */
++#define TWL4030_MADC_EOC_SW (1<<1) /* MADC conversion completion */
++#define TWL4030_MADC_SW_START (1<<5) /* MADC SWx start conversion */
++
++#define TWL4030_MADC_ADCIN0 (1<<0)
++#define TWL4030_MADC_ADCIN1 (1<<1)
++#define TWL4030_MADC_ADCIN2 (1<<2)
++#define TWL4030_MADC_ADCIN3 (1<<3)
++#define TWL4030_MADC_ADCIN4 (1<<4)
++#define TWL4030_MADC_ADCIN5 (1<<5)
++#define TWL4030_MADC_ADCIN6 (1<<6)
++#define TWL4030_MADC_ADCIN7 (1<<7)
++#define TWL4030_MADC_ADCIN8 (1<<8)
++#define TWL4030_MADC_ADCIN9 (1<<9)
++#define TWL4030_MADC_ADCIN10 (1<<10)
++#define TWL4030_MADC_ADCIN11 (1<<11)
++#define TWL4030_MADC_ADCIN12 (1<<12)
++#define TWL4030_MADC_ADCIN13 (1<<13)
++#define TWL4030_MADC_ADCIN14 (1<<14)
++#define TWL4030_MADC_ADCIN15 (1<<15)
++
++/* Fixed channels */
++#define TWL4030_MADC_BTEMP TWL4030_MADC_ADCIN1
++#define TWL4030_MADC_VBUS TWL4030_MADC_ADCIN8
++#define TWL4030_MADC_VBKB TWL4030_MADC_ADCIN9
++#define TWL4030_MADC_ICHG TWL4030_MADC_ADCIN10
++#define TWL4030_MADC_VCHG TWL4030_MADC_ADCIN11
++#define TWL4030_MADC_VBAT TWL4030_MADC_ADCIN12
++
++/* BCI related - XXX To be moved elsewhere */
++#define TWL4030_BCI_BCICTL1 0x23
++#define TWL4030_BCI_MESBAT (1<<1)
++#define TWL4030_BCI_TYPEN (1<<4)
++#define TWL4030_BCI_ITHEN (1<<3)
++
++/* USB related - XXX To be moved elsewhere */
++#define TWL4030_USB_CARKIT_ANA_CTRL 0xBB
++#define TWL4030_USB_SEL_MADC_MCPC (1<<3)
++
++#define TWL4030_MADC_IOC_MAGIC '`'
++#define TWL4030_MADC_IOCX_ADC_RAW_READ _IO(TWL4030_MADC_IOC_MAGIC, 0)
++
++struct twl4030_madc_user_parms {
++ int channel;
++ int average;
++ int status;
++ u16 result;
++};
++
++int twl4030_madc_conversion(struct twl4030_madc_request *conv);
++
++#endif
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/sctp-fix.patch b/recipes/linux/linux-kexecboot-2.6.32/sctp-fix.patch
new file mode 100644
index 0000000000..fad8e1b67b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/sctp-fix.patch
@@ -0,0 +1,47 @@
+From patchwork Tue Dec 8 19:52:09 2009
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: net/sctp/sysctl.c: Remove dead strategy handler
+Date: Tue, 08 Dec 2009 19:52:09 -0000
+From: Ingo Molnar <mingo@elte.hu>
+X-Patchwork-Id: 65744
+
+* Ingo Molnar <mingo@elte.hu> wrote:
+
+> hi Dave,
+>
+> i just switched to today's -git tree and there's this new build failure
+> on x86:
+>
+> net/sctp/sysctl.c:251: error: unknown field 'strategy' specified in initializer
+> net/sctp/sysctl.c:251: error: 'sysctl_intvec' undeclared here (not in a function)
+>
+> havent looked into it yet - config attached.
+
+That's interaction with the strategy handler removal from Eric. I think
+the patch below will do the trick - the callsites have been updated
+already to use proc_handler, so ->handler was a dead field.
+
+ Ingo
+
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+
+---
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at http://www.tux.org/lkml/
+
+diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
+index 419e1e9..832590b 100644
+--- a/net/sctp/sysctl.c
++++ b/net/sctp/sysctl.c
+@@ -248,7 +248,6 @@ static ctl_table sctp_table[] = {
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+- .strategy = &sysctl_intvec,
+ .extra1 = &one,
+ .extra2 = &rwnd_scale_max,
+ },
diff --git a/recipes/linux/linux-kexecboot-2.6.32/spitz/defconfig b/recipes/linux/linux-kexecboot-2.6.32/spitz/defconfig
new file mode 100644
index 0000000000..c6c4a0b835
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/spitz/defconfig
@@ -0,0 +1,1250 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32
+# Tue Dec 29 08:55:28 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=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_CPUFREQ=y
+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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# 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="initramfs.cpio.gz"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_SLUB_DEBUG is not set
+# 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_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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 is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK 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_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM 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_S5PC1XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_BCMRING is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_AKITA is not set
+CONFIG_MACH_SPITZ=y
+# CONFIG_MACH_BORZOI is not set
+# CONFIG_MACH_TOSA is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_XCEP is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_DEVTMPFS is not set
+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_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
+# 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=y
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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=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 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK 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 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_IDE_GD is not set
+CONFIG_BLK_DEV_IDECS=y
+# 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 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_PHONE 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 is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+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_MOUSE_SYNAPTICS_I2C 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_UINPUT is not set
+# CONFIG_INPUT_GPIO_ROTARY_ENCODER 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 is not set
+# 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_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_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=y
+# CONFIG_HW_RANDOM_TIMERIOMEM 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_COMPAT=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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE 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
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 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 is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=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
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_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=y
+# 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
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_THERMAL 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_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=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=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_CORGI=y
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+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 is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT 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 is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_ATMELMCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# 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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+CONFIG_FSNOTIFY=y
+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_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 is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_XATTR is not set
+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_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
+
+#
+# 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
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS 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_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# 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_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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-kexecboot-2.6.32/usb/ehci-omap.c-mach-to-plat.diff b/recipes/linux/linux-kexecboot-2.6.32/usb/ehci-omap.c-mach-to-plat.diff
new file mode 100644
index 0000000000..faa1ae025c
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/usb/ehci-omap.c-mach-to-plat.diff
@@ -0,0 +1,12 @@
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -37,7 +37,7 @@
+ #include <linux/platform_device.h>
+ #include <linux/clk.h>
+ #include <linux/gpio.h>
+-#include <mach/usb.h>
++#include <plat/usb.h>
+
+ /*
+ * OMAP USBHOST Register addresses: VIRTUAL ADDRESSES
+
diff --git a/recipes/linux/linux-kexecboot-2.6.32/usb/ehci.patch b/recipes/linux/linux-kexecboot-2.6.32/usb/ehci.patch
new file mode 100644
index 0000000000..569561185a
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/usb/ehci.patch
@@ -0,0 +1,46 @@
+From patchwork Wed Nov 25 08:56:48 2009
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [2/2] usb: ehci: Allow EHCI to be built on OMAP3
+Date: Wed, 25 Nov 2009 08:56:48 -0000
+From: Olof Johansson <olof@lixom.net>
+X-Patchwork-Id: 62727
+
+OMAP34XX has EHCI, so select USB_ARCH_HAS_EHCI.
+
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Acked-by: Anand Gadiyar <gadiyar@ti.com>
+
+---
+On Sat, Nov 07, 2009 at 01:16:32AM +0530, Anand Gadiyar wrote:
+> usb: ehci: Allow EHCI to be built on OMAP3
+>
+> OMAP3 chips have a built-in EHCI controller.
+> The recently introduced omap ehci-hcd driver missed
+> out on selecting USB_ARCH_HAS_EHCI in Kconfig.
+>
+> Without this, the driver cannot be built.
+
+This is a losing battle. It scales much better to select the option
+from OMAP34XX, instead of starting to enumerate the various platforms
+in drivers/usb.
+
+
+--
+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/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
+index 034d990..a913b05 100644
+--- a/arch/arm/mach-omap2/Kconfig
++++ b/arch/arm/mach-omap2/Kconfig
+@@ -18,6 +18,7 @@ config ARCH_OMAP2430
+ config ARCH_OMAP34XX
+ bool "OMAP34xx Based System"
+ depends on ARCH_OMAP3
++ select USB_ARCH_HAS_EHCI
+
+ config ARCH_OMAP3430
+ bool "OMAP3430 support"
diff --git a/recipes/linux/linux-kexecboot-2.6.32/v3-1-4-Add-support-for-LZO-compressed-kernels.patch b/recipes/linux/linux-kexecboot-2.6.32/v3-1-4-Add-support-for-LZO-compressed-kernels.patch
new file mode 100644
index 0000000000..fad1b87466
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/v3-1-4-Add-support-for-LZO-compressed-kernels.patch
@@ -0,0 +1,321 @@
+diff --git a/include/linux/decompress/unlzo.h b/include/linux/decompress/unlzo.h
+new file mode 100644
+index 0000000..9872297
+--- /dev/null
++++ b/include/linux/decompress/unlzo.h
+@@ -0,0 +1,10 @@
++#ifndef DECOMPRESS_UNLZO_H
++#define DECOMPRESS_UNLZO_H
++
++int unlzo(unsigned char *inbuf, int len,
++ int(*fill)(void*, unsigned int),
++ int(*flush)(void*, unsigned int),
++ unsigned char *output,
++ int *pos,
++ void(*error)(char *x));
++#endif
+diff --git a/init/Kconfig b/init/Kconfig
+index f515864..eb65318 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -115,10 +115,13 @@ config HAVE_KERNEL_BZIP2
+ config HAVE_KERNEL_LZMA
+ bool
+
++config HAVE_KERNEL_LZO
++ bool
++
+ choice
+ prompt "Kernel compression mode"
+ default KERNEL_GZIP
+- depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA
++ depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_LZO
+ help
+ The linux kernel is a kind of self-extracting executable.
+ Several compression algorithms are available, which differ
+@@ -141,9 +144,8 @@ config KERNEL_GZIP
+ bool "Gzip"
+ depends on HAVE_KERNEL_GZIP
+ help
+- The old and tried gzip compression. Its compression ratio is
+- the poorest among the 3 choices; however its speed (both
+- compression and decompression) is the fastest.
++ The old and tried gzip compression. It provides a good balance
++ between compression ratio and decompression speed.
+
+ config KERNEL_BZIP2
+ bool "Bzip2"
+@@ -164,6 +166,14 @@ config KERNEL_LZMA
+ two. Compression is slowest. The kernel size is about 33%
+ smaller with LZMA in comparison to gzip.
+
++config KERNEL_LZO
++ bool "LZO"
++ depends on HAVE_KERNEL_LZO
++ help
++ Its compression ratio is the poorest among the 4. The kernel
++ size is about about 10% bigger than gzip; however its speed
++ (both compression and decompression) is the fastest.
++
+ endchoice
+
+ config SWAP
+diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
+new file mode 100644
+index 0000000..2bb736f
+--- /dev/null
++++ b/lib/decompress_unlzo.c
+@@ -0,0 +1,208 @@
++/*
++ * LZO decompressor for the Linux kernel. Code borrowed from the lzo
++ * implementation by Markus Franz Xaver Johannes Oberhumer.
++ *
++ * Linux kernel adaptation:
++ * Copyright (C) 2009
++ * Albin Tonnerre, Free Electrons <albin.tonnerre@free-electrons.com>
++ *
++ * Original code:
++ * Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
++ * All Rights Reserved.
++ *
++ * lzop and the LZO library are free software; you can redistribute them
++ * and/or modify them 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; see the file COPYING.
++ * If not, write to the Free Software Foundation, Inc.,
++ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * Markus F.X.J. Oberhumer
++ * <markus@oberhumer.com>
++ * http://www.oberhumer.com/opensource/lzop/
++ */
++
++#ifdef STATIC
++#include "lzo/lzo1x_decompress.c"
++#else
++#include <linux/slab.h>
++#include <linux/decompress/unlzo.h>
++#endif
++
++#include <linux/types.h>
++#include <linux/lzo.h>
++#include <linux/decompress/mm.h>
++
++#include <linux/compiler.h>
++#include <asm/unaligned.h>
++
++static const unsigned char lzop_magic[] =
++ { 0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a };
++
++#define LZO_BLOCK_SIZE (256*1024l)
++#define HEADER_HAS_FILTER 0x00000800L
++
++STATIC inline int INIT parse_header(u8 *input, u8 *skip)
++{
++ int l;
++ u8 *parse = input;
++ u8 level = 0;
++ u16 version;
++
++ /* read magic: 9 first bits */
++ for (l = 0; l < 9; l++) {
++ if (*parse++ != lzop_magic[l])
++ return 0;
++ }
++ /* get version (2bytes), skip library version (2),
++ * 'need to be extracted' version (2) and
++ * method (1) */
++ version = get_unaligned_be16(parse);
++ parse += 7;
++ if (version >= 0x0940)
++ level = *parse++;
++ if (get_unaligned_be32(parse) & HEADER_HAS_FILTER)
++ parse += 8; /* flags + filter info */
++ else
++ parse += 4; /* flags */
++
++ /* skip mode and mtime_low */
++ parse += 8;
++ if (version >= 0x0940)
++ parse += 4; /* skip mtime_high */
++
++ l = *parse++;
++ /* don't care about the file name, and skip checksum */
++ parse += l + 4;
++
++ *skip = parse - input;
++ return 1;
++}
++
++STATIC inline int INIT unlzo(u8 *input, int in_len,
++ int (*fill) (void *, unsigned int),
++ int (*flush) (void *, unsigned int),
++ u8 *output, int *posp,
++ void (*error_fn) (char *x))
++{
++ u8 skip = 0, r = 0;
++ u32 src_len, dst_len;
++ size_t tmp;
++ u8 *in_buf, *in_buf_save, *out_buf;
++ int obytes_processed = 0;
++
++ set_error_fn(error_fn);
++
++ if (output)
++ out_buf = output;
++ else if (!flush) {
++ error("NULL output pointer and no flush function provided");
++ goto exit;
++ } else {
++ out_buf = malloc(LZO_BLOCK_SIZE);
++ if (!out_buf) {
++ error("Could not allocate output buffer");
++ goto exit;
++ }
++ }
++
++ if (input && fill) {
++ error("Both input pointer and fill function provided, don't know what to do");
++ goto exit_1;
++ } else if (input)
++ in_buf = input;
++ else if (!fill || !posp) {
++ error("NULL input pointer and missing position pointer or fill function");
++ goto exit_1;
++ } else {
++ in_buf = malloc(lzo1x_worst_compress(LZO_BLOCK_SIZE));
++ if (!in_buf) {
++ error("Could not allocate input buffer");
++ goto exit_1;
++ }
++ }
++ in_buf_save = in_buf;
++
++ if (posp)
++ *posp = 0;
++
++ if (fill)
++ fill(in_buf, lzo1x_worst_compress(LZO_BLOCK_SIZE));
++
++ if (!parse_header(input, &skip)) {
++ error("invalid header");
++ goto exit_2;
++ }
++ in_buf += skip;
++
++ if (posp)
++ *posp = skip;
++
++ for (;;) {
++ /* read uncompressed block size */
++ dst_len = get_unaligned_be32(in_buf);
++ in_buf += 4;
++
++ /* exit if last block */
++ if (dst_len == 0) {
++ if (posp)
++ *posp += 4;
++ break;
++ }
++
++ if (dst_len > LZO_BLOCK_SIZE) {
++ error("dest len longer than block size");
++ goto exit_2;
++ }
++
++ /* read compressed block size, and skip block checksum info */
++ src_len = get_unaligned_be32(in_buf);
++ in_buf += 8;
++
++ if (src_len <= 0 || src_len > dst_len) {
++ error("file corrupted");
++ goto exit_2;
++ }
++
++ /* decompress */
++ tmp = dst_len;
++ r = lzo1x_decompress_safe((u8 *) in_buf, src_len, out_buf, &tmp);
++
++ if (r != LZO_E_OK || dst_len != tmp) {
++ error("Compressed data violation");
++ goto exit_2;
++ }
++
++ obytes_processed += dst_len;
++ if (flush)
++ flush(out_buf, dst_len);
++ if (output)
++ out_buf += dst_len;
++ if (posp)
++ *posp += src_len + 12;
++ if (fill) {
++ in_buf = in_buf_save;
++ fill(in_buf, lzo1x_worst_compress(LZO_BLOCK_SIZE));
++ } else
++ in_buf += src_len;
++ }
++
++exit_2:
++ if (!input)
++ free(in_buf);
++exit_1:
++ if (!output)
++ free(out_buf);
++exit:
++ return obytes_processed;
++}
++
++#define decompress unlzo
+diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c
+index 5dc6b29..f2fd098 100644
+--- a/lib/lzo/lzo1x_decompress.c
++++ b/lib/lzo/lzo1x_decompress.c
+@@ -11,11 +11,13 @@
+ * Richard Purdie <rpurdie@openedhand.com>
+ */
+
++#ifndef STATIC
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+-#include <linux/lzo.h>
+-#include <asm/byteorder.h>
++#endif
++
+ #include <asm/unaligned.h>
++#include <linux/lzo.h>
+ #include "lzodefs.h"
+
+ #define HAVE_IP(x, ip_end, ip) ((size_t)(ip_end - ip) < (x))
+@@ -244,9 +246,10 @@ lookbehind_overrun:
+ *out_len = op - out;
+ return LZO_E_LOOKBEHIND_OVERRUN;
+ }
+-
++#ifndef STATIC
+ EXPORT_SYMBOL_GPL(lzo1x_decompress_safe);
+
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("LZO1X Decompressor");
+
++#endif
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index ffdafb2..39c3483 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -230,3 +230,8 @@ quiet_cmd_lzma = LZMA $@
+ cmd_lzma = (cat $(filter-out FORCE,$^) | \
+ lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
+ (rm -f $@ ; false)
++
++quiet_cmd_lzo = LZO $@
++cmd_lzo = (cat $(filter-out FORCE,$^) | \
++ lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
++ (rm -f $@ ; false)
diff --git a/recipes/linux/linux-kexecboot-2.6.32/v3-2-4-Add-support-for-LZO-compressed-kernels-for-ARM.patch b/recipes/linux/linux-kexecboot-2.6.32/v3-2-4-Add-support-for-LZO-compressed-kernels-for-ARM.patch
new file mode 100644
index 0000000000..f155c0a1b5
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/v3-2-4-Add-support-for-LZO-compressed-kernels-for-ARM.patch
@@ -0,0 +1,298 @@
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 1c4119c..350921d 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -18,6 +18,8 @@ config ARM
+ select HAVE_KRETPROBES if (HAVE_KPROBES)
+ select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
+ select HAVE_GENERIC_DMA_COHERENT
++ select HAVE_KERNEL_GZIP
++ select HAVE_KERNEL_LZO
+ help
+ The ARM series is a line of low-power-consumption RISC chip designs
+ licensed by ARM Ltd and targeted at embedded applications and
+diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
+index ce39dc5..5b4629b 100644
+--- a/arch/arm/boot/compressed/Makefile
++++ b/arch/arm/boot/compressed/Makefile
+@@ -63,8 +63,12 @@ endif
+
+ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
+
+-targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \
+- head.o misc.o $(OBJS)
++suffix_$(CONFIG_KERNEL_GZIP) = gzip
++suffix_$(CONFIG_KERNEL_LZO) = lzo
++
++targets := vmlinux vmlinux.lds \
++ piggy.$(suffix_y) piggy.$(suffix_y).o \
++ font.o font.c head.o misc.o $(OBJS)
+
+ ifeq ($(CONFIG_FUNCTION_TRACER),y)
+ ORIG_CFLAGS := $(KBUILD_CFLAGS)
+@@ -87,22 +91,31 @@ endif
+ ifneq ($(PARAMS_PHYS),)
+ LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
+ endif
+-LDFLAGS_vmlinux += -p --no-undefined -X \
+- $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name) -T
++# ?
++LDFLAGS_vmlinux += -p
++# Report unresolved symbol references
++LDFLAGS_vmlinux += --no-undefined
++# Delete all temporary local symbols
++LDFLAGS_vmlinux += -X
++# Next argument is a linker script
++LDFLAGS_vmlinux += -T
++
++# For __aeabi_uidivmod
++lib1funcs = $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.o
+
+ # Don't allow any static data in misc.o, which
+ # would otherwise mess up our GOT table
+ CFLAGS_misc.o := -Dstatic=
+
+-$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
+- $(addprefix $(obj)/, $(OBJS)) FORCE
++$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
++ $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE
+ $(call if_changed,ld)
+ @:
+
+-$(obj)/piggy.gz: $(obj)/../Image FORCE
+- $(call if_changed,gzip)
++$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
++ $(call if_changed,$(suffix_y))
+
+-$(obj)/piggy.o: $(obj)/piggy.gz FORCE
++$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE
+
+ CFLAGS_font.o := -Dstatic=
+
+diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
+index 17153b5..7e0fe4d 100644
+--- a/arch/arm/boot/compressed/misc.c
++++ b/arch/arm/boot/compressed/misc.c
+@@ -18,10 +18,15 @@
+
+ unsigned int __machine_arch_type;
+
++#define _LINUX_STRING_H_
++
+ #include <linux/compiler.h> /* for inline */
+ #include <linux/types.h> /* for size_t */
+ #include <linux/stddef.h> /* for NULL */
+ #include <asm/string.h>
++#include <linux/linkage.h>
++
++#include <asm/unaligned.h>
+
+ #ifdef STANDALONE_DEBUG
+ #define putstr printf
+@@ -188,34 +193,8 @@ static inline __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src,
+ /*
+ * gzip delarations
+ */
+-#define OF(args) args
+ #define STATIC static
+
+-typedef unsigned char uch;
+-typedef unsigned short ush;
+-typedef unsigned long ulg;
+-
+-#define WSIZE 0x8000 /* Window size must be at least 32k, */
+- /* and a power of two */
+-
+-static uch *inbuf; /* input buffer */
+-static uch window[WSIZE]; /* Sliding window buffer */
+-
+-static unsigned insize; /* valid bytes in inbuf */
+-static unsigned inptr; /* index of next byte to be processed in inbuf */
+-static unsigned outcnt; /* bytes in output buffer */
+-
+-/* gzip flag byte */
+-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
+-#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
+-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
+-#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
+-#define COMMENT 0x10 /* bit 4 set: file comment present */
+-#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
+-#define RESERVED 0xC0 /* bit 6,7: reserved */
+-
+-#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
+-
+ /* Diagnostic functions */
+ #ifdef DEBUG
+ # define Assert(cond,msg) {if(!(cond)) error(msg);}
+@@ -233,24 +212,20 @@ static unsigned outcnt; /* bytes in output buffer */
+ # define Tracecv(c,x)
+ #endif
+
+-static int fill_inbuf(void);
+-static void flush_window(void);
+ static void error(char *m);
+
+ extern char input_data[];
+ extern char input_data_end[];
+
+-static uch *output_data;
+-static ulg output_ptr;
+-static ulg bytes_out;
++static unsigned char *output_data;
++static unsigned long output_ptr;
+
+ static void error(char *m);
+
+ static void putstr(const char *);
+
+-extern int end;
+-static ulg free_mem_ptr;
+-static ulg free_mem_end_ptr;
++static unsigned long free_mem_ptr;
++static unsigned long free_mem_end_ptr;
+
+ #ifdef STANDALONE_DEBUG
+ #define NO_INFLATE_MALLOC
+@@ -258,46 +233,13 @@ static ulg free_mem_end_ptr;
+
+ #define ARCH_HAS_DECOMP_WDOG
+
+-#include "../../../../lib/inflate.c"
+-
+-/* ===========================================================================
+- * Fill the input buffer. This is called only when the buffer is empty
+- * and at least one byte is really needed.
+- */
+-int fill_inbuf(void)
+-{
+- if (insize != 0)
+- error("ran out of input data");
+-
+- inbuf = input_data;
+- insize = &input_data_end[0] - &input_data[0];
+-
+- inptr = 1;
+- return inbuf[0];
+-}
++#ifdef CONFIG_KERNEL_GZIP
++#include "../../../../lib/decompress_inflate.c"
++#endif
+
+-/* ===========================================================================
+- * Write the output window window[0..outcnt-1] and update crc and bytes_out.
+- * (Used for the decompressed data only.)
+- */
+-void flush_window(void)
+-{
+- ulg c = crc;
+- unsigned n;
+- uch *in, *out, ch;
+-
+- in = window;
+- out = &output_data[output_ptr];
+- for (n = 0; n < outcnt; n++) {
+- ch = *out++ = *in++;
+- c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
+- }
+- crc = c;
+- bytes_out += (ulg)outcnt;
+- output_ptr += (ulg)outcnt;
+- outcnt = 0;
+- putstr(".");
+-}
++#ifdef CONFIG_KERNEL_LZO
++#include "../../../../lib/decompress_unlzo.c"
++#endif
+
+ #ifndef arch_error
+ #define arch_error(x)
+@@ -314,22 +256,33 @@ static void error(char *x)
+ while(1); /* Halt */
+ }
+
++asmlinkage void __div0(void)
++{
++ error("Attempting division by 0!");
++}
++
+ #ifndef STANDALONE_DEBUG
+
+-ulg
+-decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p,
+- int arch_id)
++unsigned long
++decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
++ unsigned long free_mem_ptr_end_p,
++ int arch_id)
+ {
+- output_data = (uch *)output_start; /* Points to kernel start */
++ unsigned char *tmp;
++
++ output_data = (unsigned char *)output_start;
+ free_mem_ptr = free_mem_ptr_p;
+ free_mem_end_ptr = free_mem_ptr_end_p;
+ __machine_arch_type = arch_id;
+
+ arch_decomp_setup();
+
+- makecrc();
++ tmp = (unsigned char *) (((unsigned long)input_data_end) - 4);
++ output_ptr = get_unaligned_le32(tmp);
++
+ putstr("Uncompressing Linux...");
+- gunzip();
++ decompress(input_data, input_data_end - input_data,
++ NULL, NULL, output_data, NULL, error);
+ putstr(" done, booting the kernel.\n");
+ return output_ptr;
+ }
+@@ -341,11 +294,10 @@ int main()
+ {
+ output_data = output_buffer;
+
+- makecrc();
+ putstr("Uncompressing Linux...");
+- gunzip();
++ decompress(input_data, input_data_end - input_data,
++ NULL, NULL, output_data, NULL, error);
+ putstr("done.\n");
+ return 0;
+ }
+ #endif
+-
+diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S
+deleted file mode 100644
+index 54c9518..0000000
+--- a/arch/arm/boot/compressed/piggy.S
++++ /dev/null
+@@ -1,6 +0,0 @@
+- .section .piggydata,#alloc
+- .globl input_data
+-input_data:
+- .incbin "arch/arm/boot/compressed/piggy.gz"
+- .globl input_data_end
+-input_data_end:
+diff --git a/arch/arm/boot/compressed/piggy.gzip.S b/arch/arm/boot/compressed/piggy.gzip.S
+new file mode 100644
+index 0000000..a68adf9
+--- /dev/null
++++ b/arch/arm/boot/compressed/piggy.gzip.S
+@@ -0,0 +1,6 @@
++ .section .piggydata,#alloc
++ .globl input_data
++input_data:
++ .incbin "arch/arm/boot/compressed/piggy.gzip"
++ .globl input_data_end
++input_data_end:
+diff --git a/arch/arm/boot/compressed/piggy.lzo.S b/arch/arm/boot/compressed/piggy.lzo.S
+new file mode 100644
+index 0000000..a425ad9
+--- /dev/null
++++ b/arch/arm/boot/compressed/piggy.lzo.S
+@@ -0,0 +1,6 @@
++ .section .piggydata,#alloc
++ .globl input_data
++input_data:
++ .incbin "arch/arm/boot/compressed/piggy.lzo"
++ .globl input_data_end
++input_data_end:
diff --git a/recipes/linux/linux-kexecboot-2.6.32/v3-3-4-Add-support-for-LZO-compressed-kernels-on-x86.patch b/recipes/linux/linux-kexecboot-2.6.32/v3-3-4-Add-support-for-LZO-compressed-kernels-on-x86.patch
new file mode 100644
index 0000000000..bfefe8bfde
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/v3-3-4-Add-support-for-LZO-compressed-kernels-on-x86.patch
@@ -0,0 +1,54 @@
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 72ace95..89f7771 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -49,6 +49,7 @@ config X86
+ select HAVE_KERNEL_GZIP
+ select HAVE_KERNEL_BZIP2
+ select HAVE_KERNEL_LZMA
++ select HAVE_KERNEL_LZO
+ select HAVE_ARCH_KMEMCHECK
+
+ config OUTPUT_FORMAT
+diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
+index f8ed065..0e835d0 100644
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
+@@ -4,7 +4,7 @@
+ # create a compressed vmlinux image from the original vmlinux
+ #
+
+-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
++targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo head_$(BITS).o misc.o piggy.o
+
+ KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
+ KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
+@@ -48,10 +48,13 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
+ $(call if_changed,bzip2)
+ $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
+ $(call if_changed,lzma)
++$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
++ $(call if_changed,lzo)
+
+ suffix-$(CONFIG_KERNEL_GZIP) := gz
+ suffix-$(CONFIG_KERNEL_BZIP2) := bz2
+ suffix-$(CONFIG_KERNEL_LZMA) := lzma
++suffix-$(CONFIG_KERNEL_LZO) := lzo
+
+ quiet_cmd_mkpiggy = MKPIGGY $@
+ cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false )
+diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
+index 842b2a3..3b22fe8 100644
+--- a/arch/x86/boot/compressed/misc.c
++++ b/arch/x86/boot/compressed/misc.c
+@@ -162,6 +162,10 @@ static int lines, cols;
+ #include "../../../../lib/decompress_unlzma.c"
+ #endif
+
++#ifdef CONFIG_KERNEL_LZO
++#include "../../../../lib/decompress_unlzo.c"
++#endif
++
+ static void scroll(void)
+ {
+ int i;
diff --git a/recipes/linux/linux-kexecboot-2.6.32/v3-4-4-Add-LZO-compression-support-for-initramfs-and-old-style-initrd.patch b/recipes/linux/linux-kexecboot-2.6.32/v3-4-4-Add-LZO-compression-support-for-initramfs-and-old-style-initrd.patch
new file mode 100644
index 0000000000..f0d8ff39f9
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.32/v3-4-4-Add-LZO-compression-support-for-initramfs-and-old-style-initrd.patch
@@ -0,0 +1,114 @@
+diff --git a/lib/Kconfig b/lib/Kconfig
+index bb1326d..8639349 100644
+--- a/lib/Kconfig
++++ b/lib/Kconfig
+@@ -117,6 +117,10 @@ config DECOMPRESS_BZIP2
+ config DECOMPRESS_LZMA
+ tristate
+
++config DECOMPRESS_LZO
++ select LZO_DECOMPRESS
++ tristate
++
+ #
+ # Generic allocator support is selected if needed
+ #
+diff --git a/lib/Makefile b/lib/Makefile
+index 2e78277..cfa4041 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -69,6 +69,7 @@ obj-$(CONFIG_LZO_DECOMPRESS) += lzo/
+ lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
+ lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
+ lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
++lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o
+
+ obj-$(CONFIG_TEXTSEARCH) += textsearch.o
+ obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
+diff --git a/lib/decompress.c b/lib/decompress.c
+index d2842f5..a760681 100644
+--- a/lib/decompress.c
++++ b/lib/decompress.c
+@@ -9,6 +9,7 @@
+ #include <linux/decompress/bunzip2.h>
+ #include <linux/decompress/unlzma.h>
+ #include <linux/decompress/inflate.h>
++#include <linux/decompress/unlzo.h>
+
+ #include <linux/types.h>
+ #include <linux/string.h>
+@@ -22,6 +23,9 @@
+ #ifndef CONFIG_DECOMPRESS_LZMA
+ # define unlzma NULL
+ #endif
++#ifndef CONFIG_DECOMPRESS_LZO
++# define unlzo NULL
++#endif
+
+ static const struct compress_format {
+ unsigned char magic[2];
+@@ -32,6 +36,7 @@ static const struct compress_format {
+ { {037, 0236}, "gzip", gunzip },
+ { {0x42, 0x5a}, "bzip2", bunzip2 },
+ { {0x5d, 0x00}, "lzma", unlzma },
++ { {0x89, 0x4c}, "lzo", unlzo },
+ { {0, 0}, NULL, NULL }
+ };
+
+diff --git a/usr/Kconfig b/usr/Kconfig
+index 1c3039f..e2721f5 100644
+--- a/usr/Kconfig
++++ b/usr/Kconfig
+@@ -72,6 +72,15 @@ config RD_LZMA
+ Support loading of a LZMA encoded initial ramdisk or cpio buffer
+ If unsure, say N.
+
++config RD_LZO
++ bool "Support initial ramdisks compressed using LZO" if EMBEDDED
++ default !EMBEDDED
++ depends on BLK_DEV_INITRD
++ select DECOMPRESS_LZO
++ help
++ Support loading of a LZO encoded initial ramdisk or cpio buffer
++ If unsure, say N.
++
+ choice
+ prompt "Built-in initramfs compression mode" if INITRAMFS_SOURCE!=""
+ help
+@@ -108,16 +117,15 @@ config INITRAMFS_COMPRESSION_GZIP
+ bool "Gzip"
+ depends on RD_GZIP
+ help
+- The old and tried gzip compression. Its compression ratio is
+- the poorest among the 3 choices; however its speed (both
+- compression and decompression) is the fastest.
++ The old and tried gzip compression. It provides a good balance
++ between compression ratio and decompression speed.
+
+ config INITRAMFS_COMPRESSION_BZIP2
+ bool "Bzip2"
+ depends on RD_BZIP2
+ help
+ Its compression ratio and speed is intermediate.
+- Decompression speed is slowest among the three. The initramfs
++ Decompression speed is slowest among the four. The initramfs
+ size is about 10% smaller with bzip2, in comparison to gzip.
+ Bzip2 uses a large amount of memory. For modern kernels you
+ will need at least 8MB RAM or more for booting.
+@@ -128,7 +136,15 @@ config INITRAMFS_COMPRESSION_LZMA
+ help
+ The most recent compression algorithm.
+ Its ratio is best, decompression speed is between the other
+- two. Compression is slowest. The initramfs size is about 33%
++ three. Compression is slowest. The initramfs size is about 33%
+ smaller with LZMA in comparison to gzip.
+
++config INITRAMFS_COMPRESSION_LZO
++ bool "LZO"
++ depends on RD_LZO
++ help
++ Its compression ratio is the poorest among the four. The kernel
++ size is about about 10% bigger than gzip; however its speed
++ (both compression and decompression) is the fastest.
++
+ endchoice
diff --git a/recipes/linux/linux-kexecboot-2.6.34/ARM-Add-support-for-LZMA-compressed-kernel-images.patch b/recipes/linux/linux-kexecboot-2.6.34/ARM-Add-support-for-LZMA-compressed-kernel-images.patch
new file mode 100644
index 0000000000..2142cc8c07
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/ARM-Add-support-for-LZMA-compressed-kernel-images.patch
@@ -0,0 +1,51 @@
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 350921d..34163da 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -21,6 +21,7 @@
+ select HAVE_GENERIC_DMA_COHERENT
+ select HAVE_KERNEL_GZIP
+ select HAVE_KERNEL_LZO
++ select HAVE_KERNEL_LZMA
+ select HAVE_PERF_EVENTS
+ select PERF_USE_VMALLOC
+ help
+diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
+index 2d4d88b..3906432 100644
+--- a/arch/arm/boot/compressed/Makefile
++++ b/arch/arm/boot/compressed/Makefile
+@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
+
+ suffix_$(CONFIG_KERNEL_GZIP) = gzip
+ suffix_$(CONFIG_KERNEL_LZO) = lzo
++suffix_$(CONFIG_KERNEL_LZMA) = lzma
+
+ targets := vmlinux vmlinux.lds \
+ piggy.$(suffix_y) piggy.$(suffix_y).o \
+diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
+index 7e0fe4d..4e35a10 100644
+--- a/arch/arm/boot/compressed/decompress.c
++++ b/arch/arm/boot/compressed/decompress.c
+@@ -40,6 +40,10 @@
+ #include "../../../../lib/decompress_unlzo.c"
+ #endif
+
++#ifdef CONFIG_KERNEL_LZMA
++#include "../../../../lib/decompress_unlzma.c"
++#endif
++
+ void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
+ {
+ decompress(input, len, NULL, NULL, output, NULL, error);
+diff --git a/arch/arm/boot/compressed/piggy.lzma.S b/arch/arm/boot/compressed/piggy.lzma.S
+new file mode 100644
+index 0000000..d7e69cf
+--- /dev/null
++++ b/arch/arm/boot/compressed/piggy.lzma.S
+@@ -0,0 +1,6 @@
++ .section .piggydata,#alloc
++ .globl input_data
++input_data:
++ .incbin "arch/arm/boot/compressed/piggy.lzma"
++ .globl input_data_end
++input_data_end:
diff --git a/recipes/linux/linux-kexecboot-2.6.34/akita/defconfig b/recipes/linux/linux-kexecboot-2.6.34/akita/defconfig
new file mode 100644
index 0000000000..8b5a2fd8c7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/akita/defconfig
@@ -0,0 +1,1354 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.34
+# Tue Jun 29 00:51:08 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+# CONFIG_PRINTK is not set
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_FUTEX is not set
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARPSL_PM_MAX1111=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+# CONFIG_MACH_TOSA is not set
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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=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 is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+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
+
+#
+# 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_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_ADT7411 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ASC7621 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_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_LM73 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=y
+# 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
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_AMC6821 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_SENSORS_LIS3_I2C is not set
+# CONFIG_THERMAL 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_88PM860X 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_HTC_I2CPLD 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB4500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_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_CORGI=y
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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_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 is not set
+# CONFIG_SYSFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE 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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot-2.6.34/c7x0/defconfig b/recipes/linux/linux-kexecboot-2.6.34/c7x0/defconfig
new file mode 100644
index 0000000000..d30526666d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/c7x0/defconfig
@@ -0,0 +1,1350 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.34
+# Tue Jun 29 00:49:01 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+# CONFIG_PRINTK is not set
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_FUTEX is not set
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARPSL_PM_MAX1111=y
+# CONFIG_MACH_POODLE is not set
+CONFIG_MACH_CORGI=y
+CONFIG_MACH_SHEPHERD=y
+CONFIG_MACH_HUSKY=y
+# CONFIG_MACH_AKITA is not set
+# CONFIG_MACH_SPITZ is not set
+# CONFIG_MACH_BORZOI is not set
+# CONFIG_MACH_TOSA is not set
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SHARP_C7xx=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 loglevel=3"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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=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 is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+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
+
+#
+# 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_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_ADT7411 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ASC7621 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_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_LM73 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=y
+# 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
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_AMC6821 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_SENSORS_LIS3_I2C is not set
+# CONFIG_THERMAL 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_88PM860X 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_HTC_I2CPLD 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB4500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_W100=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=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_CORGI=y
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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_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 is not set
+# CONFIG_SYSFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE 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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot-2.6.34/c7x0/fix-corgi-card-detection.patch b/recipes/linux/linux-kexecboot-2.6.34/c7x0/fix-corgi-card-detection.patch
new file mode 100644
index 0000000000..7ef01de119
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/c7x0/fix-corgi-card-detection.patch
@@ -0,0 +1,17 @@
+[PATCH] [ARM] pxa/corgi: fix MMC/SD card detection failure
+
+Reported-by: Andrea Adami <andrea.adami@gmail.com>
+Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
+---
+--- a/arch/arm/mach-pxa/corgi.c
++++ b/arch/arm/mach-pxa/corgi.c
+@@ -438,7 +438,7 @@
+ */
+ static struct pxamci_platform_data corgi_mci_platform_data = {
+ .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
+- .gpio_card_detect = -1,
++ .gpio_card_detect = CORGI_GPIO_nSD_DETECT,
+ .gpio_card_ro = CORGI_GPIO_nSD_WP,
+ .gpio_power = CORGI_GPIO_SD_PWR,
+ };
+
diff --git a/recipes/linux/linux-kexecboot-2.6.34/collie/defconfig b/recipes/linux/linux-kexecboot-2.6.34/collie/defconfig
new file mode 100644
index 0000000000..c9216dc548
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/collie/defconfig
@@ -0,0 +1,1248 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.34
+# Tue Jun 29 00:59:16 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+# CONFIG_PRINTK is not set
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_FUTEX is not set
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+CONFIG_SA1100_COLLIE=y
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_SA1100=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_HAVE_MEMORY_PRESENT=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPLIT_PTLOCK_CPUS=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M loglevel=3"
+# 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 is not set
+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 is not set
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_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_DEBUG is not set
+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_PARPORT is not set
+# CONFIG_PNP is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_LOCOMO=y
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_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_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_HTCPEN is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_TOUCHSCREEN_W90X900 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+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_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_ELEKTOR is not set
+# CONFIG_I2C_PCA_ISA is not set
+# CONFIG_I2C_PCA_PLATFORM 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_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+CONFIG_BATTERY_COLLIE=y
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL 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_88PM860X 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_HTC_I2CPLD 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB4500_CORE is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_MCP=y
+CONFIG_MCP_SA11X0=y
+CONFIG_MCP_UCB1200=y
+CONFIG_MCP_UCB1200_TS=y
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_SA1100=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_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_SPI=y
+# CONFIG_MEMSTICK is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_LOCOMO=y
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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_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 is not set
+# CONFIG_SYSFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE 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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot-2.6.34/poodle/defconfig b/recipes/linux/linux-kexecboot-2.6.34/poodle/defconfig
new file mode 100644
index 0000000000..22b78679cd
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/poodle/defconfig
@@ -0,0 +1,1282 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.34
+# Tue Jun 29 00:55:12 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+# CONFIG_PRINTK is not set
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_FUTEX is not set
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_MACH_POODLE=y
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_AKITA is not set
+# CONFIG_MACH_SPITZ is not set
+# CONFIG_MACH_BORZOI is not set
+# CONFIG_MACH_TOSA is not set
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+CONFIG_PXA_HAVE_BOARD_IRQS=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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_DEBUG is not set
+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_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
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_LOCOMO=y
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+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
+
+#
+# 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_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL 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_88PM860X 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_HTC_I2CPLD 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB4500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_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_CORGI is not set
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_LOCOMO=y
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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_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 is not set
+# CONFIG_SYSFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE 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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot-2.6.34/spitz/defconfig b/recipes/linux/linux-kexecboot-2.6.34/spitz/defconfig
new file mode 100644
index 0000000000..8b5a2fd8c7
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/spitz/defconfig
@@ -0,0 +1,1354 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.34
+# Tue Jun 29 00:51:08 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+# CONFIG_PRINTK is not set
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_FUTEX is not set
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARPSL_PM_MAX1111=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+# CONFIG_MACH_TOSA is not set
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# 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=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 is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+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
+
+#
+# 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_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_ADT7411 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ASC7621 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_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_LM73 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=y
+# 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
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_AMC6821 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_SENSORS_LIS3_I2C is not set
+# CONFIG_THERMAL 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_88PM860X 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_HTC_I2CPLD 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB4500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_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_CORGI=y
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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_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 is not set
+# CONFIG_SYSFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE 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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot-2.6.34/tosa/defconfig b/recipes/linux/linux-kexecboot-2.6.34/tosa/defconfig
new file mode 100644
index 0000000000..4cd636b45f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/tosa/defconfig
@@ -0,0 +1,1334 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.34
+# Tue Jun 29 00:57:22 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# 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_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+# CONFIG_PRINTK is not set
+# CONFIG_BUG is not set
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+# CONFIG_FUTEX is not set
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF 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_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+# CONFIG_MACH_AKITA is not set
+# CONFIG_MACH_SPITZ is not set
+# CONFIG_MACH_BORZOI is not set
+CONFIG_MACH_TOSA=y
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+# CONFIG_TOSA_BT is not set
+CONFIG_PXA_HAVE_BOARD_IRQS=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 loglevel=3"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+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_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
+# 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=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_H1900 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_SHARPSL=y
+# CONFIG_MTD_NAND_TMIO 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_DEBUG is not set
+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_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
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_QT2160 is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_TOSA is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_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_CORGI is not set
+# CONFIG_TOUCHSCREEN_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_WM97XX=y
+# CONFIG_TOUCHSCREEN_WM9705 is not set
+CONFIG_TOUCHSCREEN_WM9712=y
+# CONFIG_TOUCHSCREEN_WM9713 is not set
+# CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_TOUCHSCREEN_W90X900 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+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
+
+#
+# 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_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_TOSA is not set
+# CONFIG_BATTERY_WM97XX is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL 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=y
+# CONFIG_MFD_88PM860X 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_HTC_I2CPLD is not set
+# CONFIG_UCB1400_CORE is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+CONFIG_MFD_TMIO=y
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+CONFIG_MFD_TC6393XB=y
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_AB3100_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB4500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+CONFIG_FB_TMIO=y
+CONFIG_FB_TMIO_ACCELL=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=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_CORGI is not set
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# 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 is not set
+CONFIG_LCD_TOSA=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_TOSA=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_SOUND=y
+# CONFIG_SOUND_OSS_CORE is not set
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_JACK=y
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PROCFS is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_VMASTER=y
+# CONFIG_SND_RAWMIDI_SEQ is not set
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+# CONFIG_SND_SBAWE_SEQ is not set
+# CONFIG_SND_EMU10K1_SEQ is not set
+CONFIG_SND_AC97_CODEC=y
+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_AC97_POWER_SAVE is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_PXA2XX_LIB=y
+CONFIG_SND_PXA2XX_LIB_AC97=y
+# CONFIG_SND_PXA2XX_AC97 is not set
+# CONFIG_SND_SPI is not set
+# CONFIG_SND_PCMCIA is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_PXA2XX_SOC=y
+CONFIG_SND_PXA2XX_SOC_AC97=y
+CONFIG_SND_PXA2XX_SOC_TOSA=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_WM9712=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MMC_TMIO is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
+# 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_DEFAULTS_TO_ORDERED is not set
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=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_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+# CONFIG_FSNOTIFY is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+# 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_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 is not set
+# CONFIG_SYSFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE 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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot-2.6.34/use-noclone-attribute-for-naked.patch b/recipes/linux/linux-kexecboot-2.6.34/use-noclone-attribute-for-naked.patch
new file mode 100644
index 0000000000..cf09e244b4
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.34/use-noclone-attribute-for-naked.patch
@@ -0,0 +1,139 @@
+This patch add noinline and noclone attributes to naked functions.
+GCC 4.5 has new optimization -fipa-ira which is enabled at -Os and -O2
+this option will clone the functions and that can change the standard
+calling convention but the naked functions expect that and use
+arguments as in standard calling convention. Therefore the naked
+functions should not be marked non inline and noclone.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: linux-2.6.34/include/linux/compiler-gcc4.h
+===================================================================
+--- linux-2.6.34.orig/include/linux/compiler-gcc4.h 2010-05-29 17:18:55.338127623 -0700
++++ linux-2.6.34/include/linux/compiler-gcc4.h 2010-05-29 17:32:33.910657021 -0700
+@@ -48,6 +48,10 @@
+ * unreleased. Really, we need to have autoconf for the kernel.
+ */
+ #define unreachable() __builtin_unreachable()
++
++/* Mark a function definition as prohibited from being cloned. */
++#define __noclone __attribute__((__noclone__))
++
+ #endif
+
+ #endif
+Index: linux-2.6.34/include/linux/compiler-gcc.h
+===================================================================
+--- linux-2.6.34.orig/include/linux/compiler-gcc.h 2010-05-29 17:28:28.238113095 -0700
++++ linux-2.6.34/include/linux/compiler-gcc.h 2010-05-29 17:31:58.938153321 -0700
+@@ -58,8 +58,12 @@
+ * naked functions because then mcount is called without stack and frame pointer
+ * being set up and there is no chance to restore the lr register to the value
+ * before mcount was called.
++ *
++ * The asm() bodies of naked functions often depend on standard calling conventions,
++ * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce
++ * this, so we must do so ourselves. See GCC PR44290.
+ */
+-#define __naked __attribute__((naked)) notrace
++#define __naked __attribute__((naked)) noinline __noclone notrace
+
+ #define __noreturn __attribute__((noreturn))
+
+@@ -85,3 +89,8 @@
+ #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
+ #define gcc_header(x) _gcc_header(x)
+ #include gcc_header(__GNUC__)
++
++#if !defined(__noclone)
++#define __noclone /* not needed */
++#endif
++
+Index: linux-2.6.34/arch/arm/mm/copypage-v4wb.c
+===================================================================
+--- linux-2.6.34.orig/arch/arm/mm/copypage-v4wb.c 2010-05-29 23:01:46.580600195 -0700
++++ linux-2.6.34/arch/arm/mm/copypage-v4wb.c 2010-05-29 23:46:10.610629920 -0700
+@@ -27,7 +27,7 @@ v4wb_copy_user_page(void *kto, const voi
+ {
+ asm("\
+ stmfd sp!, {r4, lr} @ 2\n\
+- mov r2, %0 @ 1\n\
++ mov r2, %2 @ 1\n\
+ ldmia r1!, {r3, r4, ip, lr} @ 4\n\
+ 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\
+ stmia r0!, {r3, r4, ip, lr} @ 4\n\
+@@ -44,7 +44,7 @@ v4wb_copy_user_page(void *kto, const voi
+ mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\
+ ldmfd sp!, {r4, pc} @ 3"
+ :
+- : "I" (PAGE_SIZE / 64));
++ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
+ }
+
+ void v4wb_copy_user_highpage(struct page *to, struct page *from,
+Index: linux-2.6.34/arch/arm/mm/copypage-v4wt.c
+===================================================================
+--- linux-2.6.34.orig/arch/arm/mm/copypage-v4wt.c 2010-05-29 23:48:51.908131421 -0700
++++ linux-2.6.34/arch/arm/mm/copypage-v4wt.c 2010-05-29 23:53:15.410657789 -0700
+@@ -25,7 +25,7 @@ v4wt_copy_user_page(void *kto, const voi
+ {
+ asm("\
+ stmfd sp!, {r4, lr} @ 2\n\
+- mov r2, %0 @ 1\n\
++ mov r2, %2 @ 1\n\
+ ldmia r1!, {r3, r4, ip, lr} @ 4\n\
+ 1: stmia r0!, {r3, r4, ip, lr} @ 4\n\
+ ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\
+@@ -40,7 +40,7 @@ v4wt_copy_user_page(void *kto, const voi
+ mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\
+ ldmfd sp!, {r4, pc} @ 3"
+ :
+- : "I" (PAGE_SIZE / 64));
++ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
+ }
+
+ void v4wt_copy_user_highpage(struct page *to, struct page *from,
+Index: linux-2.6.34/arch/arm/mm/copypage-feroceon.c
+===================================================================
+--- linux-2.6.34.orig/arch/arm/mm/copypage-feroceon.c 2010-05-29 23:50:26.518121374 -0700
++++ linux-2.6.34/arch/arm/mm/copypage-feroceon.c 2010-05-29 23:50:53.238196555 -0700
+@@ -18,7 +18,7 @@ feroceon_copy_user_page(void *kto, const
+ {
+ asm("\
+ stmfd sp!, {r4-r9, lr} \n\
+- mov ip, %0 \n\
++ mov ip, %2 \n\
+ 1: mov lr, r1 \n\
+ ldmia r1!, {r2 - r9} \n\
+ pld [lr, #32] \n\
+@@ -64,7 +64,7 @@ feroceon_copy_user_page(void *kto, const
+ mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\
+ ldmfd sp!, {r4-r9, pc}"
+ :
+- : "I" (PAGE_SIZE));
++ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE));
+ }
+
+ void feroceon_copy_user_highpage(struct page *to, struct page *from,
+Index: linux-2.6.34/arch/arm/mm/copypage-xsc3.c
+===================================================================
+--- linux-2.6.34.orig/arch/arm/mm/copypage-xsc3.c 2010-05-29 23:52:00.010626567 -0700
++++ linux-2.6.34/arch/arm/mm/copypage-xsc3.c 2010-05-29 23:52:30.048147465 -0700
+@@ -34,7 +34,7 @@ xsc3_mc_copy_user_page(void *kto, const
+ {
+ asm("\
+ stmfd sp!, {r4, r5, lr} \n\
+- mov lr, %0 \n\
++ mov lr, %2 \n\
+ \n\
+ pld [r1, #0] \n\
+ pld [r1, #32] \n\
+@@ -67,7 +67,7 @@ xsc3_mc_copy_user_page(void *kto, const
+ \n\
+ ldmfd sp!, {r4, r5, pc}"
+ :
+- : "I" (PAGE_SIZE / 64 - 1));
++ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1));
+ }
+
+ void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,
diff --git a/recipes/linux/linux-kexecboot-2.6.35/fix.module.loading.16310.patch b/recipes/linux/linux-kexecboot-2.6.35/fix.module.loading.16310.patch
new file mode 100644
index 0000000000..cd2fa6ca2d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.35/fix.module.loading.16310.patch
@@ -0,0 +1,28 @@
+From 1cb348e903f81bb34abe00c9a06b42009ddca819 Mon Sep 17 00:00:00 2001
+From: Michal Marek <mmarek@suse.cz>
+Date: Fri, 2 Jul 2010 13:17:37 +0200
+Subject: [PATCH] arm: Build with -fno-dwarf2-cfi-asm
+
+Commit d0679c7 restricted this workaround to powerpc only, but it turns
+out that ARM needs it as well. Fixes
+https://bugzilla.kernel.org/show_bug.cgi?id=16310 .
+
+Reported-by: Robert Nelson <robertcnelson@gmail.com>
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index 64ba313..862d4ba 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -21,6 +21,11 @@ GZFLAGS :=-9
+ # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
+ KBUILD_CFLAGS +=$(call cc-option,-marm,)
+
++# FIXME: the module load should be taught about the additional relocs
++# generated by this.
++# revert to pre-gcc-4.4 behaviour of .eh_frame
++KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
++
+ # Do not use arch/arm/defconfig - it's always outdated.
+ # Select a platform tht is kept up-to-date
+ KBUILD_DEFCONFIG := versatile_defconfig
diff --git a/recipes/linux/linux-kexecboot-2.6.35/spitz/defconfig b/recipes/linux/linux-kexecboot-2.6.35/spitz/defconfig
new file mode 100644
index 0000000000..57097d8086
--- /dev/null
+++ b/recipes/linux/linux-kexecboot-2.6.35/spitz/defconfig
@@ -0,0 +1,1426 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.35.1
+# Sun Sep 26 17:04:13 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_CROSS_COMPILE=""
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# 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="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF is not set
+CONFIG_BLK_DEV_BSG=y
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_VEXPRESS is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CNS3XXX is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC100 is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_PLAT_SPEAR is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+# CONFIG_MACH_VPAC270 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARPSL_PM_MAX1111=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+# CONFIG_MACH_TOSA is not set
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_ZIPIT2 is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+# CONFIG_CMDLINE_FORCE is not set
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_NVS=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+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_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
+# 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_SM_FTL is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_PCMCIA is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_ECC=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_SM_COMMON is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR=0xFF108018
+# CONFIG_MTD_NAND_H1900 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_SHARPSL=y
+# 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=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 is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA 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_ATA_VERBOSE_ERROR=y
+CONFIG_SATA_PMP=y
+
+#
+# Controllers with non-SFF native interface
+#
+# CONFIG_SATA_AHCI_PLATFORM is not set
+CONFIG_ATA_SFF=y
+
+#
+# SFF controllers with custom DMA interface
+#
+CONFIG_ATA_BMDMA=y
+
+#
+# SATA SFF controllers with BMDMA
+#
+# CONFIG_SATA_MV is not set
+
+#
+# PATA SFF controllers with BMDMA
+#
+
+#
+# PIO-only SFF controllers
+#
+CONFIG_PATA_PCMCIA=y
+CONFIG_PATA_PLATFORM=y
+
+#
+# Generic fallback / legacy drivers
+#
+# CONFIG_MD 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
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_TCA6416 is not set
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 is not set
+# CONFIG_TOUCHSCREEN_TPS6507X 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
+# CONFIG_SERIAL_ALTERA_UART is not set
+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
+
+#
+# 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_RAMOOPS is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+
+#
+# MODULbus GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_TEST_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_ADT7411 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ASC7621 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_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_LM73 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=y
+# 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_EMC1403 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_ADS7871 is not set
+# CONFIG_SENSORS_AMC6821 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP102 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_SENSORS_LIS3_I2C is not set
+# CONFIG_THERMAL is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+CONFIG_MFD_SUPPORT=y
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_88PM860X 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_HTC_I2CPLD is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TPS6507X is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TC35892 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_ABX500_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB8500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_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_CORGI=y
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_TDO24M is not set
+# CONFIG_LCD_VGG2432A4 is not set
+# CONFIG_LCD_PLATFORM is not set
+# CONFIG_LCD_S6E63M0 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+# CONFIG_BACKLIGHT_ADP8860 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=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS 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=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 is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+CONFIG_FSNOTIFY=y
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+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
+
+#
+# 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 is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+# CONFIG_PROC_PAGE_MONITOR is not set
+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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS 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=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_ATOMIC64_SELFTEST is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot.inc b/recipes/linux/linux-kexecboot.inc
new file mode 100644
index 0000000000..6356aeaaa2
--- /dev/null
+++ b/recipes/linux/linux-kexecboot.inc
@@ -0,0 +1,94 @@
+# We set INC_PR here, since a change in the kexecboot recipe will need to get picked up by *all* the kernels:
+INC_PR = "r20"
+
+LOGO_SIZE = '${@base_conditional("GUI_MACHINE_CLASS", "bigscreen", "vga", "qvga", d)}'
+SRC_URI = "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2"
+
+require linux.inc
+
+INITRAMFS_IMAGE = "initramfs-kexecboot-image"
+
+# here we set master console on serial
+CMDLINE = "console=tty1 console=ttyS0,115200n8"
+CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M"
+CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_hx4700 = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+
+PACKAGES = ""
+PROVIDES = ""
+
+DOSRC = "http://www.do13.de/openzaurus/patches"
+JLSRC = "http://www.cs.wisc.edu/~lenz/zaurus/files"
+BASRC = "http://www.orca.cx/zaurus/patches"
+CHSRC = "http://oz.drigon.com/patches"
+TKSRC = "http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches"
+
+# Zaurus machines need kernel size-check
+KERNEL_IMAGE_MAXSIZE_akita = "1294336"
+KERNEL_IMAGE_MAXSIZE_c7x0 = "1294336"
+KERNEL_IMAGE_MAXSIZE_collie = "1048576"
+KERNEL_IMAGE_MAXSIZE_poodle = "1294336"
+KERNEL_IMAGE_MAXSIZE_tosa = "1294336"
+KERNEL_IMAGE_MAXSIZE_spitz = "1294336"
+
+KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${PV}-${PR}-${MACHINE}"
+KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}"
+
+# use custom function until base_version_less_or_equal is fixed
+#
+def kernel_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
+ from bb import utils
+ result = bb.utils.vercmp_part(bb.data.getVar(variable,d,True), checkvalue)
+ if result <= 0:
+ return truevalue
+ else:
+ return falsevalue
+
+# force lzma compression for kernel (linux-kexecboot >= 2.6.32)
+# force lzma compression for initramfs (linux-kexecboot >= 2.6.30)
+
+KERNEL_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.31", "", "CONFIG_KERNEL_LZMA=y", d)}'
+
+INITRAMFS_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.29", "", "CONFIG_INITRAMFS_COMPRESSION_LZMA=y", d)}'
+INITRAMFS_COMPRESSION_SUFFIX = '${@kernel_version_less_or_equal("PV", "2.6.29", "gz", "lzma", d)}'
+RD_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.29", "", "CONFIG_RD_LZMA=y", d)}'
+
+do_configure_append() {
+sed -i -e /CONFIG_BLK_DEV_INITRD/d \
+ -e /CONFIG_KEXEC/d \
+ -e /CONFIG_KERNEL/d \
+ -e /CONFIG_INITRAMFS_SOURCE/d \
+ -e /CONFIG_INITRAMFS_COMPRESSION/d \
+ -e /CONFIG_RD/d \
+ -e /=m/d \
+ -e /CONFIG_MODULES/d \
+ -e /CONFIG_DEBUG_ERRORS/d \
+ -e /CONFIG_DEBUG_BUGVERBOSE/d \
+ -e /CONFIG_DEBUG_KERNEL/d \
+ ${S}/.config
+
+# Remove last tag appended by linux.inc (output messes screen)
+sed -i -e /CONFIG_CMDLINE/s/quiet/loglevel=3/1 ${S}/.config
+sed -i -e /CONFIG_CMDLINE/s/debug/loglevel=3/1 ${S}/.config
+
+echo 'CONFIG_BLK_DEV_INITRD=y
+CONFIG_KEXEC=y
+${KERNEL_COMPRESSION}
+${INITRAMFS_COMPRESSION}
+CONFIG_INITRAMFS_SOURCE="initramfs.cpio.${INITRAMFS_COMPRESSION_SUFFIX}"
+${RD_COMPRESSION}
+CONFIG_MODULES=n' >> ${S}/.config
+
+ yes '' | oe_runmake oldconfig
+}
+
+do_populate_sysroot() {
+}
+
+do_install() {
+}
+
+python do_package() {
+}
diff --git a/recipes/linux/linux-kexecboot/angstrom/qvga/logo_linux_clut224.ppm.bz2 b/recipes/linux/linux-kexecboot/angstrom/qvga/logo_linux_clut224.ppm.bz2
new file mode 100644
index 0000000000..08ae02aae3
--- /dev/null
+++ b/recipes/linux/linux-kexecboot/angstrom/qvga/logo_linux_clut224.ppm.bz2
Binary files differ
diff --git a/recipes/linux/linux-kexecboot/angstrom/vga/logo_linux_clut224.ppm.bz2 b/recipes/linux/linux-kexecboot/angstrom/vga/logo_linux_clut224.ppm.bz2
new file mode 100644
index 0000000000..3b409b0ce1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot/angstrom/vga/logo_linux_clut224.ppm.bz2
Binary files differ
diff --git a/recipes/linux/linux-kexecboot/fix.module.loading.16310.patch b/recipes/linux/linux-kexecboot/fix.module.loading.16310.patch
new file mode 100644
index 0000000000..cd2fa6ca2d
--- /dev/null
+++ b/recipes/linux/linux-kexecboot/fix.module.loading.16310.patch
@@ -0,0 +1,28 @@
+From 1cb348e903f81bb34abe00c9a06b42009ddca819 Mon Sep 17 00:00:00 2001
+From: Michal Marek <mmarek@suse.cz>
+Date: Fri, 2 Jul 2010 13:17:37 +0200
+Subject: [PATCH] arm: Build with -fno-dwarf2-cfi-asm
+
+Commit d0679c7 restricted this workaround to powerpc only, but it turns
+out that ARM needs it as well. Fixes
+https://bugzilla.kernel.org/show_bug.cgi?id=16310 .
+
+Reported-by: Robert Nelson <robertcnelson@gmail.com>
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index 64ba313..862d4ba 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -21,6 +21,11 @@ GZFLAGS :=-9
+ # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
+ KBUILD_CFLAGS +=$(call cc-option,-marm,)
+
++# FIXME: the module load should be taught about the additional relocs
++# generated by this.
++# revert to pre-gcc-4.4 behaviour of .eh_frame
++KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
++
+ # Do not use arch/arm/defconfig - it's always outdated.
+ # Select a platform tht is kept up-to-date
+ KBUILD_DEFCONFIG := versatile_defconfig
diff --git a/recipes/linux/linux-kexecboot/qvga/logo_linux_clut224.ppm.bz2 b/recipes/linux/linux-kexecboot/qvga/logo_linux_clut224.ppm.bz2
new file mode 100644
index 0000000000..ddc39a3c64
--- /dev/null
+++ b/recipes/linux/linux-kexecboot/qvga/logo_linux_clut224.ppm.bz2
Binary files differ
diff --git a/recipes/linux/linux-kexecboot/spitz/defconfig b/recipes/linux/linux-kexecboot/spitz/defconfig
new file mode 100644
index 0000000000..d1f12aec71
--- /dev/null
+++ b/recipes/linux/linux-kexecboot/spitz/defconfig
@@ -0,0 +1,1429 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.35
+# Thu Jul 22 23:42:39 2010
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_HAVE_PROC_CPU=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_CPUFREQ=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_NEED_DMA_MAP_STATE=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"
+CONFIG_CONSTRUCTORS=y
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_CROSS_COMPILE=""
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+# CONFIG_KERNEL_GZIP is not set
+# CONFIG_KERNEL_BZIP2 is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_KERNEL_LZO is not set
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+# CONFIG_TREE_PREEMPT_RCU is not set
+# CONFIG_TINY_RCU is not set
+# CONFIG_RCU_TRACE is not set
+CONFIG_RCU_FANOUT=32
+# CONFIG_RCU_FANOUT_EXACT is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# 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="initramfs.cpio.lzma"
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+CONFIG_RD_LZMA=y
+# CONFIG_RD_LZO is not set
+# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
+# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
+# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
+CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+# CONFIG_UID16 is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+
+#
+# Kernel Performance Events And Counters
+#
+# CONFIG_PERF_EVENTS is not set
+# CONFIG_PERF_COUNTERS is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+# CONFIG_SLUB is not set
+CONFIG_SLOB=y
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=1
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBDAF is not set
+CONFIG_BLK_DEV_BSG=y
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+# CONFIG_INLINE_SPIN_TRYLOCK is not set
+# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK is not set
+# CONFIG_INLINE_SPIN_LOCK_BH is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
+# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
+# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
+# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_READ_TRYLOCK is not set
+# CONFIG_INLINE_READ_LOCK is not set
+# CONFIG_INLINE_READ_LOCK_BH is not set
+# CONFIG_INLINE_READ_LOCK_IRQ is not set
+# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
+CONFIG_INLINE_READ_UNLOCK=y
+# CONFIG_INLINE_READ_UNLOCK_BH is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
+# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
+# CONFIG_INLINE_WRITE_TRYLOCK is not set
+# CONFIG_INLINE_WRITE_LOCK is not set
+# CONFIG_INLINE_WRITE_LOCK_BH is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
+# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
+# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
+# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
+# CONFIG_MUTEX_SPIN_ON_OWNER is not set
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# 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_VEXPRESS is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_BCMRING is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CNS3XXX is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX 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_DOVE is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_NUC93X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_SHMOBILE 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_S5P6440 is not set
+# CONFIG_ARCH_S5P6442 is not set
+# CONFIG_ARCH_S5PC100 is not set
+# CONFIG_ARCH_S5PV210 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
+# CONFIG_ARCH_U8500 is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_PLAT_SPEAR is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Intel/Marvell Dev Platforms (sorted by hardware release time)
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ZYLONITE300 is not set
+# CONFIG_MACH_ZYLONITE320 is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+
+#
+# Third Party Dev Platforms (sorted by vendor name)
+#
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_ARCH_VIPER is not set
+# CONFIG_MACH_ARCOM_ZEUS is not set
+# CONFIG_MACH_BALLOON3 is not set
+# CONFIG_MACH_CSB726 is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_EXEDA is not set
+# CONFIG_MACH_CM_X300 is not set
+# CONFIG_MACH_CAPC7117 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_MACH_INTELMOTE2 is not set
+# CONFIG_MACH_STARGATE2 is not set
+# CONFIG_MACH_XCEP is not set
+# CONFIG_TRIZEPS_PXA is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_COLIBRI300 is not set
+# CONFIG_MACH_COLIBRI320 is not set
+# CONFIG_MACH_VPAC270 is not set
+
+#
+# End-user Products (sorted by vendor name)
+#
+# CONFIG_MACH_H4700 is not set
+# CONFIG_MACH_H5000 is not set
+# CONFIG_MACH_HIMALAYA is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
+# CONFIG_PXA_EZX is not set
+# CONFIG_MACH_MP900C is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_MACH_RAUMFELD_RC is not set
+# CONFIG_MACH_RAUMFELD_CONNECTOR is not set
+# CONFIG_MACH_RAUMFELD_SPEAKER is not set
+CONFIG_PXA_SHARPSL=y
+CONFIG_SHARPSL_PM=y
+CONFIG_SHARPSL_PM_MAX1111=y
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+CONFIG_MACH_AKITA=y
+CONFIG_MACH_SPITZ=y
+CONFIG_MACH_BORZOI=y
+# CONFIG_MACH_TOSA is not set
+# CONFIG_MACH_ICONTROL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_ZIPIT2 is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SHARP_Cxx00=y
+CONFIG_PXA_SSP=y
+CONFIG_PLAT_PXA=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_CPU_HAS_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+CONFIG_PCMCIA=y
+# CONFIG_PCMCIA_LOAD_CIS is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_SOC_COMMON=y
+CONFIG_PCMCIA_PXA2XX=y
+# CONFIG_PCMCIA_DEBUG 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_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT 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=999999
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_KSM is not set
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+# CONFIG_CMDLINE_FORCE is not set
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# 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 is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_NVS=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+# CONFIG_PM_RUNTIME is not set
+CONFIG_PM_OPS=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH=""
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+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_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
+# 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_SM_FTL is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# CONFIG_MTD_PCMCIA is not set
+# CONFIG_MTD_GPIO_ADDR 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_SST25L 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_ECC=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_SM_COMMON is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR=0xFF108018
+# CONFIG_MTD_NAND_H1900 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_SHARPSL=y
+# 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=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 is not set
+
+#
+# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
+#
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI_MOD=y
+# 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 is not set
+# 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
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA 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_ATA_VERBOSE_ERROR=y
+CONFIG_SATA_PMP=y
+
+#
+# Controllers with non-SFF native interface
+#
+# CONFIG_SATA_AHCI_PLATFORM is not set
+CONFIG_ATA_SFF=y
+
+#
+# SFF controllers with custom DMA interface
+#
+CONFIG_ATA_BMDMA=y
+
+#
+# SATA SFF controllers with BMDMA
+#
+# CONFIG_SATA_MV is not set
+
+#
+# PATA SFF controllers with BMDMA
+#
+
+#
+# PIO-only SFF controllers
+#
+CONFIG_PATA_PCMCIA=y
+CONFIG_PATA_PLATFORM=y
+
+#
+# Generic fallback / legacy drivers
+#
+# CONFIG_MD 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
+# CONFIG_INPUT_SPARSEKMAP is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_TCA6416 is not set
+CONFIG_KEYBOARD_MATRIX=y
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD 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_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_DYNAPRO is not set
+# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
+# CONFIG_TOUCHSCREEN_EETI 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_MCS5000 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_TOUCHSCREEN_W90X900 is not set
+# CONFIG_TOUCHSCREEN_TPS6507X 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 is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_TIMBERDALE is not set
+# CONFIG_SERIAL_ALTERA_JTAGUART is not set
+# CONFIG_SERIAL_ALTERA_UART is not set
+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
+
+#
+# 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_RAMOOPS is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_COMPAT is not set
+# 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_DESIGNWARE is not set
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_XILINX 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_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_PXA2XX=y
+# CONFIG_SPI_XILINX is not set
+# CONFIG_SPI_DESIGNWARE is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+# CONFIG_GPIO_IT8761E is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX7300 is not set
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_ADP5588 is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_GPIO_MC33880 is not set
+
+#
+# AC97 GPIO expanders:
+#
+
+#
+# MODULbus GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_TEST_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+# CONFIG_BATTERY_MAX17040 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Native drivers
+#
+# 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_ADT7411 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7475 is not set
+# CONFIG_SENSORS_ASC7621 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_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_LM73 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=y
+# 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_EMC1403 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_ADS7871 is not set
+# CONFIG_SENSORS_AMC6821 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP102 is not set
+# CONFIG_SENSORS_TMP401 is not set
+# CONFIG_SENSORS_TMP421 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_LIS3_SPI is not set
+# CONFIG_SENSORS_LIS3_I2C is not set
+# CONFIG_THERMAL is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+CONFIG_MFD_SUPPORT=y
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_88PM860X 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_HTC_I2CPLD is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TPS6507X is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TC35892 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_PMIC_ADP5520 is not set
+# CONFIG_MFD_MAX8925 is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_WM8994 is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_MFD_MC13783 is not set
+# CONFIG_ABX500_CORE is not set
+# CONFIG_EZX_PCAP is not set
+# CONFIG_AB8500_CORE is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_MEDIA_SUPPORT 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_PXA=y
+# CONFIG_FB_PXA_OVERLAY is not set
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_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_CORGI=y
+# CONFIG_LCD_L4F00242T03 is not set
+# CONFIG_LCD_LMS283GF05 is not set
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_TDO24M is not set
+# CONFIG_LCD_VGG2432A4 is not set
+# CONFIG_LCD_PLATFORM is not set
+# CONFIG_LCD_S6E63M0 is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+# CONFIG_BACKLIGHT_ADP8860 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=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT 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_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK 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_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+CONFIG_LEDS_TRIGGERS=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGER_TIMER=y
+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_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS 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=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 is not set
+CONFIG_EXT4_FS=y
+# CONFIG_EXT4_FS_XATTR is not set
+# CONFIG_EXT4_DEBUG is not set
+CONFIG_JBD=y
+CONFIG_JBD2=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+# CONFIG_FILE_LOCKING is not set
+CONFIG_FSNOTIFY=y
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+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
+
+#
+# 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 is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+# CONFIG_PROC_PAGE_MONITOR is not set
+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=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=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_LOGFS 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
+
+#
+# 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 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_STRIP_ASM_SYMS 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=y
+# 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 is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+# CONFIG_FTRACE is not set
+# CONFIG_ATOMIC64_SELFTEST is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_ARM_UNWIND is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_OC_ETM is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_SMACK is not set
+# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
+CONFIG_DEFAULT_SECURITY_DAC=y
+CONFIG_DEFAULT_SECURITY=""
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+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
+
+#
+# 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
+# CONFIG_CRYPTO_VMAC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_GHASH 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=y
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW 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=y
+# 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_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
diff --git a/recipes/linux/linux-kexecboot/vga/logo_linux_clut224.ppm.bz2 b/recipes/linux/linux-kexecboot/vga/logo_linux_clut224.ppm.bz2
new file mode 100644
index 0000000000..c3aeaac183
--- /dev/null
+++ b/recipes/linux/linux-kexecboot/vga/logo_linux_clut224.ppm.bz2
Binary files differ
diff --git a/recipes/linux/linux-kexecboot_2.6.21-hh20.bb b/recipes/linux/linux-kexecboot_2.6.21-hh20.bb
new file mode 100644
index 0000000000..83a9fd1856
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.21-hh20.bb
@@ -0,0 +1,27 @@
+require linux-kexecboot.inc
+
+PR = "${INC_PR}.0"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_hx4700 = "1"
+DEFAULT_PREFERENCE_h2200 = "1"
+
+SRC_URI += "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \
+ file://linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch \
+ http://www.rpsys.net/openzaurus/patches/archive/export_atags-r0a.patch;name=rppatch35 \
+ file://gcc4x-limits.patch \
+ file://defconfig"
+
+S = "${WORKDIR}/kernel26"
+
+
+do_configure_append() {
+ gzip -d ${S}/initramfs.cpio.gz || true
+ sed -i -e s:\.gz::g .config
+}
+
+
+
+# ${RPSRC}/export_atags-r0a.patch;status=pending;name=rppatch35 \
+SRC_URI[rppatch35.md5sum] = "8ab51e8ff728f4155db64b9bb6ea6d71"
+SRC_URI[rppatch35.sha256sum] = "75d4c6ddbfc5e4fff7690a3308e2574f89a0e2709fb91caccb29067a9dad251a"
diff --git a/recipes/linux/linux-kexecboot_2.6.24.bb b/recipes/linux/linux-kexecboot_2.6.24.bb
new file mode 100644
index 0000000000..731796ac30
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.24.bb
@@ -0,0 +1,198 @@
+require linux-kexecboot.inc
+require ../linux/linux-rp.checksums.inc
+
+PR = "${INC_PR}.0"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_collie = "-1"
+DEFAULT_PREFERENCE_poodle = "1"
+DEFAULT_PREFERENCE_qemux86 = "-1"
+DEFAULT_PREFERENCE_tosa = "1"
+DEFAULT_PREFERENCE_c7x0 = "1"
+DEFAULT_PREFERENCE_akita = "1"
+DEFAULT_PREFERENCE_spitz = "1"
+
+# Handy URLs
+# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/linux-2.6.20-rc4.tar.bz2
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/patch-2.6.18-rc6.bz2;apply=yes
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/snapshots/patch-2.6.18-rc2-git1.bz2;apply=yes
+# ${KERNELORG_MIRROR}/pub/linux/kernel/people/alan/linux-2.6/2.6.10/patch-2.6.10-ac8.gz;apply=yes
+# ${KERNELORG_MIRROR}/pub/linux/kernel/people/akpm/patches/2.6/2.6.14-rc2/2.6.14-rc2-mm1/2.6.14-rc2-mm1.bz2;apply=yes
+
+# 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;name=kernel \
+ file://0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch \
+ ${RPSRC}/export_atags-r2.patch;status=pending;name=rppatch54 \
+ ${RPSRC}/lzo_crypto-r2.patch;status=pending;name=rppatch36 \
+ ${RPSRC}/corgi_rearrange_lcd-r0.patch;status=pending;name=rppatch55 \
+ file://hrw-hostapcard.patch;status=pending \
+ ${RPSRC}/allow_disable_deferrred-r0.patch;name=rppatch56 \
+ ${RPSRC}/lzo_jffs2_sysfs-r1.patch;name=rppatch1 \
+ ${RPSRC}/hx2750_base-r33.patch;name=rppatch57 \
+ ${RPSRC}/hx2750_bl-r9.patch;name=rppatch3 \
+ ${RPSRC}/hx2750_pcmcia-r3.patch;name=rppatch4 \
+ ${RPSRC}/pxa_keys-r8.patch;name=rppatch58 \
+ ${RPSRC}/tsc2101-r18.patch;name=rppatch59 \
+ ${RPSRC}/hx2750_test1-r8.patch;name=rppatch7 \
+ ${RPSRC}/input_power-r10.patch;name=rppatch60 \
+ ${RPSRC}/pxa25x_cpufreq-r2.patch;name=rppatch44 \
+ ${RPSRC}/sharpsl_pm_fixes1-r0.patch;name=rppatch8 \
+ ${RPSRC}/pm_changes-r1.patch;name=rppatch9 \
+ ${RPSRC}/usb_add_epalloc-r4.patch;name=rppatch61 \
+ ${RPSRC}/usb_pxa27x_udc-r8.patch;name=rppatch62 \
+ ${RPSRC}/locomo_kbd_tweak-r1a.patch;name=rppatch63 \
+ ${RPSRC}/pxa27x_overlay-r8.patch;name=rppatch11 \
+ ${RPSRC}/w100_extaccel-r2.patch;name=rppatch12 \
+ ${RPSRC}/w100_extmem-r1.patch;name=rppatch13 \
+ ${RPSRC}/poodle_pm-r5.patch;name=rppatch64 \
+ ${RPSRC}/poodle_lcd_hack-r0.patch;name=rppatch15 \
+ ${RPSRC}/poodle_asoc_fix-r1.patch;name=rppatch16 \
+ file://pxa27x-resume.patch;status=external \
+ file://mtd-module.patch;status=external \
+ file://wm8750-treble.patch;status=external \
+ file://spitz_h_rewrite.patch;status=external \
+ file://pxa2xx_udc-clock.patch \
+ file://sharpsl-rc-r1.patch \
+ file://sharpsl-rc-r2.patch \
+ file://squashfs3.3.patch;status=external \
+# ${RPSRC}/logo_oh-r1.patch.bz2;status=unmergable;name=rppatch17 \
+ ${RPSRC}/pxa-linking-bug.patch;status=unmergable;name=rppatch18 \
+ file://hostap-monitor-mode.patch;status=unmergable \
+ file://serial-add-support-for-non-standard-xtals-to-16c950-driver.patch;status=unmergable \
+ ${RPSRC}/mmcsd_large_cards-r1.patch;status=hack;name=rppatch19 \
+ ${RPSRC}/mmcsd_no_scr_check-r2.patch;status=hack;name=rppatch20 \
+ ${RPSRC}/integrator_rgb-r1.patch;status=hack;name=rppatch21 \
+ ${RPSRC}/pxa_cf_initorder_hack-r1.patch;status=hack;name=rppatch22 \
+ file://pxa-serial-hack.patch;status=hack \
+ file://connectplus-remove-ide-HACK.patch;status=hack \
+ file://connectplus-prevent-oops-HACK.patch;status=hack \
+ file://binutils-buildid-arm.patch \
+ file://versatile-armv6.patch \
+ file://htcuni.patch \
+ file://defconfig"
+
+# FIXMEs before made default
+# ${RPSRC}/mmcsd_no_scr_check-r1.patch;status=hack;name=rppatch50
+
+
+# Add this to enable pm debug code (useful with a serial lead)
+# ${RPSRC}/sharpsl_pm_debug-r0.patch;name=rppatch51
+
+# Disabled until I find the reason this gives issues with cdc_subset
+# ${RPSRC}/usb_rndis_tweaks-r0.patch;name=rppatch52 \
+
+
+SRC_URI_append_collie = "\
+ ${TKSRC}/mtd-sharp-flash-hack-r4.patch;name=tkpatch1 \
+ ${TKSRC}/mcp-sa11x0-r0.patch;name=tkpatch2 \
+ ${TKSRC}/locomo-r1.patch;name=tkpatch3 \
+ ${TKSRC}/collie-kexec-r1.patch;name=tkpatch4 \
+ ${TKSRC}/sharpsl_pm-4.patch;name=tkpatch5 \
+ ${TKSRC}/collie_pm-3.patch;name=tkpatch6 \
+ ${TKSRC}/ucb1x00_suspend.patch;name=tkpatch7 \
+ ${TKSRC}/collie-ts.patch;name=tkpatch8 \
+ ${TKSRC}/pcmcia_suspend.patch;name=tkpatch9 \
+ ${TKSRC}/locomo_spi-6.patch;name=tkpatch10 \
+ ${TKSRC}/config.patch;name=tkpatch11 \
+ ${TKSRC}/mmc-spi.patch;name=tkpatch12 \
+ ${TKSRC}/linux-2.6.24-SIMpad-rtc-sa1100.patch;name=tkpatch13 \
+ ${TKSRC}/sa1100_spinlock.patch;name=tkpatch14 \
+ ${TKSRC}/sa1100-dma.patch;name=tkpatch15 \
+"
+
+SRC_URI_append_poodle = "\
+ ${RPSRC}/poodle_serial_vcc-r0.patch;name=rppatch53 \
+ file://poodle_ts.patch \
+ file://pxafb.patch \
+"
+
+SRC_URI_append_tosa = "\
+ file://tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch \
+ file://tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch \
+ file://tosa/0003-Core-MFD-support.patch \
+ file://tosa/0004-Add-support-for-tc6393xb-MFD-core.patch \
+ file://tosa/0005-Add-support-for-tc6387xb-MFD-core.patch \
+ file://tosa/0006-Add-support-for-t7l66xb-MFD-core.patch \
+ file://tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch \
+ file://tosa/0008-Nand-driver-for-TMIO-devices.patch \
+ file://tosa/0009-FB-driver-for-TMIO-devices.patch \
+ file://tosa/0010-OHCI-driver-for-TMIO-devices.patch \
+ file://tosa/0011-MMC-driver-for-TMIO-devices.patch \
+ file://tosa/0012-Tosa-keyboard-support.patch \
+ file://tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch \
+ file://tosa/0014-tosa_udc_use_gpio_vbus.patch.patch \
+ file://tosa/0015-sharpsl-export-params.patch \
+ file://tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch \
+ file://tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch \
+ file://tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch \
+ file://tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch \
+ file://tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch \
+ file://tosa/0030-Core-driver-for-WM97xx-touchscreens.patch \
+ file://tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch \
+ file://tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch \
+ file://tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch \
+ file://tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch \
+ file://tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch \
+ file://tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch \
+ file://tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch \
+ file://tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch \
+ file://tosa/0044-fix-tmio_mmc-debug-compilation.patch \
+ file://tosa/0045-Update-tmio_ohci.patch \
+ file://tosa/0046-patch-tc6393xb-cleanup.patch \
+ file://tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch \
+ file://tosa/0048-tc6393xb-GPIO-support.patch \
+ file://tosa/0049-platform-support-for-TMIO-on-tosa.patch \
+ file://tosa/0050-tosa-update-for-tc6393xb-gpio.patch \
+ file://tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch \
+ file://tosa/0052-tosa-platform-backlight-support.patch \
+ file://tosa/0053-sound-soc-codecs-wm9712.c-28.patch \
+ file://tosa/0054-sound-soc-codecs-wm9712.c-2.patch \
+ file://tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch \
+ file://tosa/0058-Fix-tosakbd-suspend.patch \
+ file://tosa/0059-patch-tosa-wakeup-test.patch \
+ file://tosa/0060-Add-support-for-power_supply-on-tosa.patch \
+ file://tosa/0061-tosa-bat-unify.patch \
+ file://tosa/0062-tosa-bat-fix-charging.patch \
+ file://tosa/0063-patch-tosa-bat-jacket-detect.patch \
+ file://tosa/0064-Export-modes-via-sysfs.patch \
+ file://tosa/0065-wm97xx-core-fixes.patch \
+ file://tosa/0066-tmiofb_probe-should-be-__devinit.patch \
+ file://tosa/0067-modeswitching.patch \
+ file://tosa/0068-Preliminary-tosa-denoiser.patch \
+ file://tosa/0019-pxa-remove-periodic-mode-emulation-support.patch \
+ file://tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch \
+ file://tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch \
+ file://tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch \
+ file://tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch \
+ file://tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch \
+ file://tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch \
+ file://tosa/0039-Add-generic-framework-for-managing-clocks.patch \
+ file://tosa/0040-Clocklib-debugfs-support.patch \
+ file://tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch \
+ file://tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch \
+ file://tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch \
+ file://tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch \
+ file://tosa/0057-Clean-up-tosa-resetting.patch \
+ file://tosa/0001-pxa2xx-ac97-switch-AC-unit-to-correct-state-before.patch \
+ file://tosa/tosa-bl-fixup.diff \
+ file://tosa/tmiofb-fix-unaccel.patch \
+ "
+# file://tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch \
+# file://tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch \
+
+SRC_URI_append_htcuniversal ="\
+ file://htcuni-acx.patch;status=external \
+ "
+
+SRC_URI_append_zylonite ="\
+ file://pxa_fb_overlay.patch \
+ file://zylonite-boot.patch \
+ "
+
+S = "${WORKDIR}/linux-2.6.24"
+
+SRC_URI[kernel.md5sum] = "3f23ad4b69d0a552042d1ed0f4399857"
+SRC_URI[kernel.sha256sum] = "413c64fbbcf81244cb5571be4963644a1e81166a2b0f008a016528363b65c5d3"
diff --git a/recipes/linux/linux-kexecboot_2.6.26.bb b/recipes/linux/linux-kexecboot_2.6.26.bb
new file mode 100644
index 0000000000..de08362481
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.26.bb
@@ -0,0 +1,100 @@
+require linux-kexecboot.inc
+require ../linux/linux-rp.checksums.inc
+
+PR = "${INC_PR}.0"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_qemuarm = "-1"
+DEFAULT_PREFERENCE_qemux86 = "-1"
+DEFAULT_PREFERENCE_spitz = "1"
+DEFAULT_PREFERENCE_collie = "1"
+DEFAULT_PREFERENCE_c7x0 = "1"
+DEFAULT_PREFERENCE_akita = "1"
+DEFAULT_PREFERENCE_poodle = "-1"
+
+
+# Handy URLs
+# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/linux-2.6.20-rc4.tar.bz2
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/patch-2.6.18-rc6.bz2;apply=yes
+# ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/snapshots/patch-2.6.18-rc2-git1.bz2;apply=yes
+# ${KERNELORG_MIRROR}/pub/linux/kernel/people/alan/linux-2.6/2.6.10/patch-2.6.10-ac8.gz;apply=yes
+# ${KERNELORG_MIRROR}/pub/linux/kernel/people/akpm/patches/2.6/2.6.14-rc2/2.6.14-rc2-mm1/2.6.14-rc2-mm1.bz2;apply=yes
+
+# 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.26.tar.bz2;name=kernel \
+ ${RPSRC}/lzo_jffs2_sysfs-r1.patch;name=rppatch1 \
+ ${RPSRC}/hx2750_base-r34.patch;name=rppatch2 \
+ ${RPSRC}/hx2750_bl-r9.patch;name=rppatch3 \
+ ${RPSRC}/hx2750_pcmcia-r3.patch;name=rppatch4 \
+ ${RPSRC}/pxa_keys-r9.patch;name=rppatch5 \
+ ${RPSRC}/tsc2101-r19.patch;name=rppatch6 \
+ ${RPSRC}/hx2750_test1-r8.patch;name=rppatch7 \
+ ${RPSRC}/sharpsl_pm_fixes1-r0.patch;name=rppatch8 \
+ ${RPSRC}/pm_changes-r1.patch;name=rppatch9 \
+ ${RPSRC}/locomo_kbd_tweak-r2.patch;name=rppatch10 \
+# ${RPSRC}/pxa27x_overlay-r8.patch;name=rppatch11 \
+ ${RPSRC}/w100_extaccel-r2.patch;name=rppatch12 \
+ ${RPSRC}/w100_extmem-r1.patch;name=rppatch13 \
+# ${RPSRC}/poodle_pm-r6.patch;name=rppatch14 \
+ file://poodle_pm-r7.patch;name=rppatch14 \
+ ${RPSRC}/poodle_lcd_hack-r0.patch;name=rppatch15 \
+ ${RPSRC}/poodle_asoc_fix-r1.patch;name=rppatch16 \
+ file://zaurus-i2c-init.patch;status=upstream \
+# ${RPSRC}/logo_oh-r1.patch.bz2;status=unmergable;name=rppatch17 \
+ ${RPSRC}/pxa-linking-bug.patch;status=unmergable;name=rppatch18 \
+ file://hostap-monitor-mode.patch;status=unmergable \
+ file://serial-add-support-for-non-standard-xtals-to-16c950-driver.patch;status=unmergable \
+ ${RPSRC}/mmcsd_large_cards-r1.patch;status=hack;name=rppatch19 \
+ ${RPSRC}/mmcsd_no_scr_check-r2.patch;status=hack;name=rppatch20 \
+ ${RPSRC}/integrator_rgb-r1.patch;status=hack;name=rppatch21 \
+ ${RPSRC}/pxa_cf_initorder_hack-r1.patch;status=hack;name=rppatch22 \
+ file://sharpsl-rc-r1.patch \
+ file://spitz_h_rewrite.patch \
+ file://pxa-serial-hack.patch;status=hack \
+ file://connectplus-remove-ide-HACK.patch;status=hack \
+ file://connectplus-prevent-oops-HACK.patch;status=hack \
+ file://htcuni.patch \
+ file://versatile-armv6.patch \
+ file://defconfig"
+
+# FIXMEs before made default
+# ${RPSRC}/mmcsd_no_scr_check-r1.patch;status=hack;name=rppatch50
+
+
+# Add this to enable pm debug code (useful with a serial lead)
+# ${RPSRC}/sharpsl_pm_debug-r0.patch;name=rppatch51
+
+# Disabled until I find the reason this gives issues with cdc_subset
+# ${RPSRC}/usb_rndis_tweaks-r0.patch;name=rppatch52 \
+
+
+SRC_URI_append_collie = "\
+ file://collie.patch \
+ file://collie_keymap.patch \
+"
+
+SRC_URI_append_poodle = "\
+ file://poodle_serial_vcc-r1.patch \
+# file://poodle_ts.patch \
+# file://pxafb.patch \
+"
+
+SRC_URI_append_htcuniversal ="\
+ file://htcuni-acx.patch;status=external \
+ "
+
+SRC_URI_append_zylonite ="\
+ file://pxa_fb_overlay.patch \
+ file://zylonite-boot.patch \
+ file://zylonite_mtd-r0.patch \
+ file://zylonite_touch-r0.patch \
+ file://zylonite_keypad-r0.patch \
+ "
+
+S = "${WORKDIR}/linux-2.6.26"
+
+SRC_URI[kernel.md5sum] = "5169d01c405bc3f866c59338e217968c"
+SRC_URI[kernel.sha256sum] = "666488e2511393fdb901eaf1e67275bcc38ab37c930e8a9adb290a95c1721a2a"
diff --git a/recipes/linux/linux-kexecboot_2.6.29.bb b/recipes/linux/linux-kexecboot_2.6.29.bb
new file mode 100644
index 0000000000..6624317ddb
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.29.bb
@@ -0,0 +1,173 @@
+require linux-kexecboot.inc
+
+PR = "${INC_PR}.0"
+
+COMPATIBLE_MACHINE = "omap5912osk|omap1710h3|omap2430sdp|omap2420h4|beagleboard|omap3evm|omap3-pandora|overo|omapzoom"
+
+SRCREV = "58cf2f1425abfd3a449f9fe985e48be2d2555022"
+
+# The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc
+PR_append = "+gitr${SRCREV}"
+
+SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \
+ file://defconfig"
+
+SRC_URI_append = " \
+ file://no-empty-flash-warnings.patch \
+ file://no-cortex-deadlock.patch \
+ file://read_die_ids.patch \
+ file://fix-install.patch \
+ file://dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch \
+ file://dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch \
+ file://dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch \
+ file://dss2/0004-DSS2-OMAP-framebuffer-driver.patch \
+ file://dss2/0005-DSS2-Add-panel-drivers.patch \
+ file://dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch \
+ file://dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch \
+ file://dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch \
+ file://dss2/0009-DSS2-Add-acx565akm-panel.patch \
+ file://dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch \
+ file://dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch \
+ file://dss2/0012-DSS2-Fix-DMA-rotation.patch \
+ file://dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch \
+ file://dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch \
+ file://dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch \
+ file://dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch \
+ file://dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch \
+ file://dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch \
+ file://dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch \
+ file://dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch \
+ file://dss2/0021-DSS2-Add-venc-register-dump.patch \
+ file://dss2/0022-DSS2-FB-remove-unused-var-warning.patch \
+ file://dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch \
+ file://dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch \
+ file://dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch \
+ file://dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch \
+ file://dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch \
+ file://dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch \
+ file://dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch \
+ file://dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch \
+ file://dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch \
+ file://dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch \
+ file://dss2/0033-DSS2-Prefer-3-tap-filter.patch \
+ file://dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch \
+ file://dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch \
+ file://dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch \
+ file://dss2/0037-DSS2-Added-support-for-querying-color-keying.patch \
+ file://dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch \
+ file://dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch \
+ file://dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch \
+ file://dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch \
+ file://dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch \
+ file://dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch \
+ file://dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch \
+ file://dss2/0045-DSS2-Fixed-line-endings-from-to.patch \
+ file://dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch \
+ file://dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch \
+ file://dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch \
+ file://dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch \
+ file://dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch \
+ file://dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch \
+ file://dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch \
+ file://dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch \
+ file://dss2/0054-DSS2-DSI-more-error-handling.patch \
+ file://dss2/0055-DSS2-Added-global-alpha-support.patch \
+ file://dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch \
+ file://dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch \
+ file://dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch \
+ file://dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch \
+ file://dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch \
+ file://dss2/0061-DSS2-VRFB-save-restore-context.patch \
+ file://dss2/0062-DSS2-VRAM-Fix-indentation.patch \
+ file://dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch \
+ file://dss2/0064-VRFB-fix-debug-messages.patch \
+ file://dss2/0065-VRFB-add-suspend-resume-functionality.patch \
+ file://dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch \
+ file://dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch \
+ file://dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch \
+ file://dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch \
+ file://dss2/0070-DSS2-fix-irq1.diff \
+ file://dss2/0071-DSS2-fix-irq2.diff \
+ file://0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch \
+ file://fix-unaligned-access.diff \
+ file://make-alignment-visible.diff \
+ file://mmctiming.patch \
+ file://ehci.patch \
+ file://fix-audio-capture.patch \
+ file://ads7846-detection.patch \
+ file://musb/0001-USB-musb-only-turn-off-vbus-in-OTG-hosts.patch \
+ file://musb/0002-USB-composite-avoid-inconsistent-lock-state.patch \
+ file://musb/0003-USB-musb-NAK-timeout-scheme-on-bulk-RX-endpoint.patch \
+ file://musb/0004-USB-musb-rewrite-host-periodic-endpoint-allocation.patch \
+ file://musb/0005-USB-TWL-disable-VUSB-regulators-when-cable-unplugg.patch \
+ file://musb/0006-USB-gadget-composite-device-level-suspend-resume-h.patch \
+ file://musb/0007-usb-gadget-fix-ethernet-link-reports-to-ethtool.patch \
+ file://musb/0008-usb-musb_host-minor-enqueue-locking-fix-v2.patch \
+ file://musb/0009-usb-musb_host-fix-ep0-fifo-flushing.patch \
+ file://musb/0010-musb-sanitize-clearing-TXCSR-DMA-bits-take-2.patch \
+ file://musb/0011-musb-fix-isochronous-TXDMA-take-2.patch \
+ file://musb/0012-musb-fix-possible-panic-while-resuming.patch \
+ file://musb/0013-musb_host-refactor-musb_save_toggle-take-2.patch \
+ file://musb/0014-musb_gadget-suppress-parasitic-TX-interrupts-with.patch \
+ file://musb/0015-musb_gadget-fix-unhandled-endpoint-0-IRQs.patch \
+ file://musb/0016-musb_host-factor-out-musb_ep_-get-set-_qh.patch \
+ file://musb/0017-musb_host-refactor-URB-giveback.patch \
+ file://musb/0018-musb-split-out-CPPI-interrupt-handler.patch \
+ file://musb/0019-musb_host-simplify-check-for-active-URB.patch \
+ file://musb/0020-musb_host-streamline-musb_cleanup_urb-calls.patch \
+ file://musb/0021-twl4030-usb-fix-minor-reporting-goofage.patch \
+ file://musb/0022-musb-use-dma-mode-1-for-TX-if-transfer-size-equals.patch \
+ file://musb/0023-musb-add-high-bandwidth-ISO-support.patch \
+ file://musb/0024-USB-otg-adding-nop-usb-transceiver.patch \
+ file://musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch \
+ file://musb/0026-musb-proper-hookup-to-transceiver-drivers.patch \
+ file://musb/0027-musb-otg-timer-cleanup.patch \
+ file://musb/0028-musb-make-initial-HNP-roleswitch-work-v2.patch \
+ file://musb/0029-musb-support-disconnect-after-HNP-roleswitch.patch \
+ file://isp/v4l/0001-V4L2-Add-COLORFX-user-control.patch \
+ file://isp/v4l/0002-V4L-Int-if-v4l2_int_device_try_attach_all-requires.patch \
+ file://isp/v4l/0003-V4L-Int-if-Dummy-slave.patch \
+ file://isp/v4l/0004-V4L-int-device-add-support-for-VIDIOC_QUERYMENU.patch \
+ file://isp/v4l/0005-V4L-Int-if-Add-vidioc_int_querycap.patch \
+ file://isp/iommu/0001-omap-iommu-tlb-and-pagetable-primitives.patch \
+ file://isp/iommu/0002-omap-iommu-omap2-architecture-specific-functions.patch \
+ file://isp/iommu/0003-omap-iommu-omap3-iommu-device-registration.patch \
+ file://isp/iommu/0004-omap-iommu-simple-virtual-address-space-management.patch \
+ file://isp/iommu/0005-omap-iommu-entries-for-Kconfig-and-Makefile.patch \
+ file://isp/iommu/0006-omap-iommu-Don-t-try-BUG_ON-in_interrupt.patch \
+ file://isp/iommu/0007-omap-iommu-We-support-chained-scatterlists-probabl.patch \
+ file://isp/iommu/0008-omap2-iommu-entries-for-Kconfig-and-Makefile.patch \
+ file://isp/omap3camera/0001-omap3isp-Add-ISP-main-driver-and-register-definitio.patch \
+ file://isp/omap3camera/0002-omap3isp-Add-ISP-MMU-wrapper.patch \
+ file://isp/omap3camera/0003-omap3isp-Add-userspace-header.patch \
+ file://isp/omap3camera/0004-omap3isp-Add-ISP-frontend-CCDC.patch \
+ file://isp/omap3camera/0005-omap3isp-Add-ISP-backend-PRV-and-RSZ.patch \
+ file://isp/omap3camera/0006-omap3isp-Add-statistics-collection-modules-H3A-and.patch \
+ file://isp/omap3camera/0007-omap3isp-Add-CSI2-interface-support.patch \
+ file://isp/omap3camera/0008-omap3isp-Add-ISP-tables.patch \
+ file://isp/omap3camera/0009-omap34xxcam-Add-camera-driver.patch \
+ file://isp/resizer/0023-OMAP-Resizer-Basic-Resizer-refreshed-with-latest-gi.patch \
+ file://isp/resizer/0024-OMAP3-Resizer-V4L2-buf-layer-issues-fixed.patch \
+ file://isp/resizer/0025-OMAP3-Resizer-Build-issues-fixed.patch \
+ file://0124-leds-gpio-broken-with-current-git.patch \
+ file://modedb-hd720.patch \
+ file://0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch \
+ file://vfp/02-vfp-ptrace.patch \
+ file://vfp/03-vfp-corruption.patch \
+ file://vfp/04-vfp-threads.patch \
+ file://vfp/05-vfp-signal-handlers.patch \
+"
+
+
+SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \
+ file://beagle-asoc.patch \
+ file://tincantools-puppy.diff \
+"
+
+SRC_URI_append_omap3evm = " \
+ file://evm-mcspi-ts.diff \
+"
+
+S = "${WORKDIR}/git"
+
+
diff --git a/recipes/linux/linux-kexecboot_2.6.32.bb b/recipes/linux/linux-kexecboot_2.6.32.bb
new file mode 100644
index 0000000000..8556b0a5c1
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.32.bb
@@ -0,0 +1,56 @@
+require linux-kexecboot.inc
+
+PR = "${INC_PR}.0"
+
+S = "${WORKDIR}/linux-${PV}"
+S_omap3 = "${WORKDIR}/git"
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_akita = "-1"
+DEFAULT_PREFERENCE_c7x0 = "-1"
+DEFAULT_PREFERENCE_collie = "-1"
+DEFAULT_PREFERENCE_poodle = "-1"
+DEFAULT_PREFERENCE_spitz = "-1"
+DEFAULT_PREFERENCE_tosa = "-1"
+
+DEFAULT_PREFERENCE_omap3 = "1"
+
+
+SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \
+ file://v3-1-4-Add-support-for-LZO-compressed-kernels.patch;status=pending \
+ file://v3-2-4-Add-support-for-LZO-compressed-kernels-for-ARM.patch;status=pending \
+ file://v3-3-4-Add-support-for-LZO-compressed-kernels-on-x86.patch;status=pending \
+ file://v3-4-4-Add-LZO-compression-support-for-initramfs-and-old-style-initrd.patch;status=pending \
+ file://ARM-Add-support-for-LZMA-compressed-kernel-images.patch;status=pending \
+ file://defconfig"
+
+SRC_URI[kernel.md5sum] = "260551284ac224c3a43c4adac7df4879"
+SRC_URI[kernel.sha256sum] = "5099786d80b8407d98a619df00209c2353517f22d804fdd9533b362adcb4504e"
+
+SRC_URI_append_c7x0 = " file://fix-corgi-card-detection.patch;status=pending "
+
+SRC_URI_append_omap3 = " git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git;rev=6833f1a8cdcb65a370f898bde6b6af63f81962df \
+file://defconfig \
+file://sctp-fix.patch \
+file://cm-t35/0001-omap3-cm-t35-add-mux-initialization.patch \
+file://cm-t35/0001-OMAP-DSS2-add-Toppoly-TDO35S-panel.patch \
+file://cm-t35/0002-omap3-cm-t35-add-DSS2-display-support.patch \
+file://cm-t35/0003-omap3-cm-t35-update-defconfig-for-DSS2.patch \
+file://cm-t35/0006-omap3-cm-t35-update-defconfig.patch \
+file://0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch \
+file://0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch \
+file://0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch \
+file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch \
+file://0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch \
+file://0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch \
+file://0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch \
+file://madc/0009-drivers-mfd-add-twl4030-madc-driver.patch \
+file://madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch \
+file://madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch \
+file://madc/0013-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch \
+file://dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch \
+#file://dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch \
+file://dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch \
+file://dss2/0016-video-add-timings-for-hd720.patch \
+"
diff --git a/recipes/linux/linux-kexecboot_2.6.34.bb b/recipes/linux/linux-kexecboot_2.6.34.bb
new file mode 100644
index 0000000000..58c66bc07b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.34.bb
@@ -0,0 +1,18 @@
+require linux-kexecboot.inc
+
+PR = "${INC_PR}.1"
+
+S = "${WORKDIR}/linux-${PV}"
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \
+ file://ARM-Add-support-for-LZMA-compressed-kernel-images.patch;status=pending \
+ file://use-noclone-attribute-for-naked.patch;status=pending \
+ file://defconfig"
+
+SRC_URI[kernel.md5sum] = "10eebcb0178fb4540e2165bfd7efc7ad"
+SRC_URI[kernel.sha256sum] = "fa395fec7de633df1cb85b6248b8f35af98380ed128a8bc465fb48bc4d252633"
+
+SRC_URI_append_c7x0 = " file://fix-corgi-card-detection.patch;status=pending "
diff --git a/recipes/linux/linux-kexecboot_2.6.35.bb b/recipes/linux/linux-kexecboot_2.6.35.bb
new file mode 100644
index 0000000000..3b36cf817b
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_2.6.35.bb
@@ -0,0 +1,18 @@
+require linux-kexecboot.inc
+
+PR = "${INC_PR}.1"
+
+S = "${WORKDIR}/linux-${PV}"
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.1.bz2;apply=yes;name=stablepatch \
+ file://fix.module.loading.16310.patch \
+ file://defconfig"
+
+SRC_URI[kernel.md5sum] = "091abeb4684ce03d1d936851618687b6"
+SRC_URI[kernel.sha256sum] = "18b2e2c336032e366c942622b77302cb05fc034fb19018f086a4ebc9ed41bfcf"
+SRC_URI[stablepatch.md5sum] = "3b9d79bebb2e022c0906ca1cd54bd970"
+SRC_URI[stablepatch.sha256sum] = "921ddd008bfa81830e54c9a6d142848b91dbfff9b98ad5ce78282f78b76c9671"
diff --git a/recipes/linux/linux-kexecboot_git.bb b/recipes/linux/linux-kexecboot_git.bb
new file mode 100644
index 0000000000..14bfd3e36f
--- /dev/null
+++ b/recipes/linux/linux-kexecboot_git.bb
@@ -0,0 +1,14 @@
+require linux-kexecboot.inc
+
+KERNEL_RELEASE = "2.6.35"
+SRCREV = "9fe6206f400646a2322096b56c59891d530e8d51"
+PV = "${KERNEL_RELEASE}+gitr${SRCPV}"
+
+SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;branch=master \
+ file://fix.module.loading.16310.patch \
+ file://defconfig"
+
+S = "${WORKDIR}/git"
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-2"