diff options
author | Khem Raj <raj.khem@gmail.com> | 2009-02-10 22:27:28 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2009-02-10 22:27:28 -0800 |
commit | 991ddc0f537b9d87fa7a184c60a21d42ce3e4fc2 (patch) | |
tree | 2d2d79cb18a421db5afdf564671f94785af81baf | |
parent | 2c61ea05466e6f7cf4b07352e5224128c2f5929a (diff) | |
parent | d420f4df43fbc113158931f447562142dcf89e1f (diff) |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
135 files changed, 13661 insertions, 919 deletions
diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass index c98baceeab..185803ebba 100644 --- a/classes/module-base.bbclass +++ b/classes/module-base.bbclass @@ -7,7 +7,7 @@ export CROSS_COMPILE = "${TARGET_PREFIX}" export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}" -KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') > "2.6.0"]}" +KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') < "2.6.0"]}" KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}" KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}" KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}" diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass index 63e6569799..3316e20c80 100644 --- a/classes/module_strip.bbclass +++ b/classes/module_strip.bbclass @@ -3,7 +3,11 @@ do_strip_modules () { for p in ${PACKAGES}; do if test -e ${WORKDIR}/install/$p/lib/modules; then - modules="`find ${WORKDIR}/install/$p/lib/modules -name \*${KERNEL_OBJECT_SUFFIX}`" + if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then + modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.ko`" + else + modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.o`" + fi if [ -n "$modules" ]; then for module in $modules ; do if ! [ -d "$module" ] ; then diff --git a/conf/bitbake.conf b/conf/bitbake.conf index 81d4c93dc0..61e894882e 100644 --- a/conf/bitbake.conf +++ b/conf/bitbake.conf @@ -329,7 +329,8 @@ IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_ IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}" IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}" -IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img" +IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=rootfs >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg" +IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}" EXTRA_IMAGECMD = "" EXTRA_IMAGECMD_jffs2 = "" @@ -338,6 +339,7 @@ EXTRA_IMAGECMD_squashfs = "" EXTRA_IMAGECMD_squashfs-lzma = "" EXTRA_IMAGECMD_cpio = "" EXTRA_IMAGECMD_cpio.gz = "" +EXTRA_IMAGECMD_ubi = "" EXTRA_IMAGECMD_ubifs = "" IMAGE_DEPENDS = "" @@ -350,6 +352,7 @@ IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" +IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" EXTRA_IMAGEDEPENDS = "" diff --git a/conf/checksums.ini b/conf/checksums.ini index bb29499183..4ff2f9a0d2 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -150,10 +150,22 @@ sha256=dde5d254cd00e4182680b1241e9a5feebbc9b4887f5d0bac2ba2935f213c97e7 md5=dac0f6c217437819f620da18a97d505f sha256=ec9ba2f4ac57fea244639d3ddcdcb0307a4130b250a2b7f3b3ef416aaa5cdb53 +[http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.010.tar.gz] +md5=a63c9f73afef70b6c80d899424b003e9 +sha256=7068295a5e35ed7dcf20446bee6d80a8de8ba7af5eb5fa35c0b60135c3445c2f + +[http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.607.tar.gz] +md5=bd5785b39675213948a61dea1b400012 +sha256=7090a1e6a0d13be2f7e27a724351c61e44ffa5d165a7720bfe505aa2c4d47e14 + [http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-0.101.tar.gz] md5=6e9bb994a8716112a78c1306261f4164 sha256=a96fb122261fb5f069341d7e69dcf07a2988da7cfd8df65d50843b8b102fb55c +[http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/Date-Manip-5.54.tar.gz] +md5=16c343329bad644b17f4f8ec5fb243cf +sha256=b61f4f0e3e580723ca7f5c0e1952922c101875535bff04afd772fbd3f193e22a + [http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Devel-StackTrace-1.13.tar.gz] md5=35d85c3f2c91c1de389b13436659551a sha256=fe044ec9817a31f2b76f701b2cfd980809676943a901ba3d49200162807fa1f9 @@ -214,6 +226,10 @@ sha256=4c780b9e2906944ce02a9325b15f480d2bd4c0b12137f752aa4800c0f8563acf md5=3bf4d8d285591a5b7f31170f9b87aba0 sha256=c196988f55fc6633d9f9f6d9ddc2ae9b4dfa1f300edf4cbbad865c06a8656df7 +[http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Email-Date-Format-1.002.tar.gz] +md5=7ae25275da6ab272aa8b40141eac9f82 +sha256=0c7f3636dffa5ff151f6906baa17582c2efeb29109750f40f820fe5d2dc38e84 + [http://divmod.org/trac/attachment/wiki/SoftwareReleases/Epsilon-0.5.11.tar.gz?format=raw] md5=39710dfdeb42e51c953b17b6cded163e sha256=a5907a3b7584d63be30b3f79b0422b2b0778e73c053be9ac5a11004f1c9097dc @@ -294,6 +310,14 @@ sha256=5673927f18790511f2a01004a51110e167f7950e7accf9e1bc6832a4bfed4feb md5=c09f77e2af500b51d22e0238c0534994 sha256=01c75ebc523b77b88d5754fa93a283eeff77bcf799536db8697b61daf42f36bd +[http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTML-Parser-3.60.tar.gz] +md5=fb97ea7e5bd832b079d8660732f9d8d9 +sha256=0f1365a546e8c54faf5e17c5d011d0b9db8784568fb6b03522ab558ad39d9a63 + +[http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz] +md5=d2bfa18fe1904df7f683e96611e87437 +sha256=adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2 + [http://gallium.prg.dtu.dk/HVSC/random/HVSC_45-all-of-them.rar] md5=5394dac412dbe34d2dfe63cb91bdce8d sha256=6068499eeb3aad19d2f860390c65496cf38c5f5e5b54422db6ec2f67abbb8d10 @@ -406,6 +430,10 @@ sha256=ab8fdcfdbb6c74ecef4cfaf9e83f955aa422e43f8cd8683c1f2648c70070b88c md5=a7bda690ec0ad0bed457fa525e28034a sha256=ffac9cd4a6fbc59618bf4e79c389a927491a81b448528278e010a190e2483544 +[http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/MIME-Lite-3.024.tar.gz] +md5=ca71d1d844f5c4f693e5079a2b4fa9a5 +sha256=886b57c7d8d9903b54dad07b68f58e398745d6d92522e89e2ce714472c09f903 + [http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2] md5=18c05d88e22c3b815a43ca8d7152ccdc sha256=8dd9dd61a0fe56904f5b76ddedb99bd359abaaf486e0b83b45e3357fecc81063 @@ -498,6 +526,10 @@ sha256=a9cc62ab760afeebcb1319a193508734a2d470cab8effab2776a2d3c65bd9cd2 md5=598bb59b86c2c4842eeffb03392fab5b sha256=8fd609d1e6b460b5c95ad5612cb823aa863d51360ed55caea987909a9bab50f5 +[http://search.cpan.org/CPAN/authors/id/K/KA/KANE/Module-Load-0.16.tar.gz] +md5=851a225e31621a66621f28a25ec53d9a +sha256=f05c3300c988dc5f5f02d55f8ee241c05fbf4565c512f804f47c6e72e5f69e33 + [http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.1_p2.tar.gz] md5=e6b9ea21fd91cb4a5663304da727bb70 sha256=59f44cd53cfa1189dcaa5bf2c48662d5765f347b03827feb807f4cd0ef18943e @@ -570,6 +602,10 @@ sha256=987eeb9460185950e066e5db3b5fa531e53e213742b545288405552a5a7bb704 md5=87f56e79ae0c20397f4207d61d154303 sha256=987eeb9460185950e066e5db3b5fa531e53e213742b545288405552a5a7bb704 +[http://search.cpan.org/CPAN/authors/id/B/BO/BOBTFISH/PHP-Serialization-0.30.tar.gz] +md5=210b764fca7c791f4387717185f589b5 +sha256=09917ebe3b088649f0767723a7e25ae08fb8db921a85183e2e8c3d2e79ae6d10 + [http://www.packagekit.org/releases/PackageKit-0.2.4.tar.gz] md5=87bf41fd021077c93549d47de6d5fe07 sha256=3b1a6f451928ca7e36d25e6e5a2e3dec2adae11c20770406f8bdc484f38b1600 @@ -978,6 +1014,10 @@ sha256=3d92318dadef22b1d1b062925ef66bac2ad48a0fd4fc83b88dcabba38c182b7b md5=61eed8ed819688663e399b5e79ed006f sha256=6a19418a074a7dec6fd67f00df74f3335e85eb38d2d2a17bd0e91cf8010537e3 +[http://search.cpan.org/CPAN/authors/id/R/RO/ROBF/X10-0.03.tar.gz] +md5=056b3d98fab545865148b948de6784c7 +sha256=2b34d7c2112e8b79856c63f43403bff1a7ed5005d9b98db5f94c6f4cc7ba5623 + [ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/X430src-1.tgz] md5=4f241a4f867363f40efa2b00dca292af sha256=5276b045e154948fce7abba7d686406c65862d90b43b50f2546b33e38378f0d7 @@ -1042,6 +1082,10 @@ sha256=f274a4bc969ae192994a856b7f786c6fce96bae77f96c1c2b71dd97599e06e43 md5=4be042a043ec520074b0ab6f7ca0bded sha256=fa668e8f01fe43fdddb33f0c5e294698818f37519000b9f782f504ece071c740 +[http://www2.zoneminder.com/downloads/ZoneMinder-1.23.3.tar.gz] +md5=ee803f0f71d6e67adf602c3557fb6bc9 +sha256=76cba999bf602b1d561921cfcbbf7a9eab64370f349a0b389efff75f4b0c3af2 + [http://zope.org/Products/Zope/2.7.1/Zope-2.7.1.tgz] md5=ae9d4bb3f7220dfffb6e91b42503b16c sha256=341f56aa4ece9001a118be8ff9675bfad6410dc1df86dd86aeb726adc732341b @@ -2406,6 +2450,10 @@ sha256=ad1cbca751301b5b8c735509b905bf7642de6110ec3dda939153cbb9df6db8cb md5=4f0bd19dd04a32eba6149b82b26c3f30 sha256=9e042fcf2d29a58bd60fe3743130095992c62da4c865d01e6fea2d8d6d20583a +[http://www.kernel.org/pub/linux/bluetooth/bluez-4.29.tar.gz] +md5=9198f428277693c16c212910996075b4 +sha256=4fe29e8b7c28e6802853867531307704a78f69f37a09d7565268141a2a462644 + [http://www.kernel.org/pub/linux/bluetooth/bluez-4.7.tar.gz] md5=2aa806940d2c841e57a9b2ab7302b750 sha256=ed384dea4f5f21157758fcd7db64db19ce0b410509c26630706e4a3c779287a0 @@ -2766,6 +2814,22 @@ sha256=f2b433270f22aad86f61cef61d95338aaa63dbe2f9468b9ed5defd1c01c9645f md5=7c9dfb5dcd66a1d6e837e72ad0cb05d4 sha256=35e3854599a074ce1b47872ab1b97a625ed7d1ab3345b918f7f60524f5e390c5 +[http://busybox.net/downloads/fixes-1.13.2/busybox-1.13.2-init.patch] +md5=7afb3a1b474742bc198b3c8450ab9a7e +sha256=39a8efb5a50c56feb733e519365b4e188c25c0e925a1a63cc1ace9735a80100f + +[http://busybox.net/downloads/fixes-1.13.2/busybox-1.13.2-mdev.patch] +md5=a72d169e9545e26257032e0e367feb95 +sha256=fd4a64c6a83e07586de0360258162c5bf431f164b3980301185743e4029940df + +[http://busybox.net/downloads/fixes-1.13.2/busybox-1.13.2-modprobe.patch] +md5=6eeb6efcd71e57082d6654a9a6a368eb +sha256=a02007661cf2f318a66468456f8fc8ae1177e12c3c66c59ff2de4d98863a388e + +[http://busybox.net/downloads/fixes-1.13.2/busybox-1.13.2-tar.patch] +md5=90d093817855bc63ad16fbb8524f80df +sha256=9427fa9b45f3c322bf4fe2463c99c972e6ae03df630899b38be4f29133708a0e + [http://www.busybox.net/downloads/busybox-1.13.2.tar.gz] md5=aeb526108f13b91c02b115c8d86f9659 sha256=03fc9dbdc6f44afd2da55c0ab36646d2d063708cc35f3f4569b913b064f11d83 @@ -4954,13 +5018,9 @@ sha256=2b6b0d1af5b8af63eb5edf7052fdc9f46c55b6f7b607c8772b18927cb481ecf9 md5=28fb15cd024162c55249888fe1b97820 sha256=c74239052d62565c13a82f9bbf217a4fdcce4b34949e361b53bb3f28e3168543 -[http://projects.gstaedtner.net/euphony/euphony-0.1.1.tar.gz] -md5=0263344899dfcda7d26183f63d716b00 -sha256=34a398c1c27b22652ceacf29b1b3f33feff33f612802ed0c9b57afc1dce9b27e - -[http://projects.gstaedtner.net/euphony/euphony-0.1.2.tar.gz] -md5=f939fb9a2c7aab5877f7e420827af027 -sha256=fedcf1b669873de67d69d3e81ad88a47414ccfede4a6a73ffa15ab82b1378460 +[http://projects.gstaedtner.net/euphony/euphony-0.1.3.tar.gz] +md5=47d5663f0c66177e3529b9062f9b071f +sha256=30f035bc39967f72f3ac8740d78f4d5e611577ea2b90f47f4cd72d6729fd4ce5 [http://enlightenment.freedesktop.org/files/evas-0.9.9.037.tar.gz] md5=21cb713b01be39992a7c48d0ea23429b @@ -13922,6 +13982,10 @@ sha256=5a729a49ce591a58d241ac39979cb496ab30687556633782557196d2b262921e md5=eddf56af6f248812e3016a9e34b42bbd sha256=5a729a49ce591a58d241ac39979cb496ab30687556633782557196d2b262921e +[http://downloads.sourceforge.net/lmbench/lmbench-2.5.tgz] +md5=d5b05498af26d5c09b372caab82a0337 +sha256=e7431530a4cf4c44b5068e23454f95765dc0b51e7d98bc2bd70451b17d505bd9 + [http://heanet.dl.sourceforge.net/lmbench/lmbench-2.5.tgz] md5=d5b05498af26d5c09b372caab82a0337 sha256=e7431530a4cf4c44b5068e23454f95765dc0b51e7d98bc2bd70451b17d505bd9 @@ -14058,6 +14122,10 @@ sha256=bfc8cf4258574b48d33e9d622627db496e6533a469a6a87fd7ed76098dabb8a6 md5=afd35e0770f28121a9f8d6093d20a62b sha256=bfc8cf4258574b48d33e9d622627db496e6533a469a6a87fd7ed76098dabb8a6 +[http://downloads.sourceforge.net/ltp/ltp-full-20080229.tgz] +md5=5860835de7e8d6f76a856243fd5f299e +sha256=e4c56dbbbf2d1a4d641624234b561e9402c00e47b5b253ae126aa444182310a4 + [http://heanet.dl.sourceforge.net/ltp/ltp-full-20080229.tgz] md5=5860835de7e8d6f76a856243fd5f299e sha256=e4c56dbbbf2d1a4d641624234b561e9402c00e47b5b253ae126aa444182310a4 @@ -14838,10 +14906,18 @@ sha256=4f65183200955540c097b82bfb18f5d21b636ca79f47cd018a4ea8b89cd2998c md5=7d049a8331efcfe34600c0cda6934ac6 sha256=a145a90d0824c65cfc11c3fc843ba484585983e1e8ee14b79f4d09cf1d38b98b +[http://downloads.sourceforge.net/mingw/mingw32-make-3.81-20080326-src.tar.gz] +md5=7c21ed475aa72a0fd3115dcc12eaeaa2 +sha256=f05c64eaa334cf6a59aacdfff3213fc53d0b670e79662fb25f029bfb78148bac + [http://downloads.sourceforge.net/mingw/mingwrt-3.15.1-mingw32-src.tar.gz] md5=0411b98fd5eeac0706e2abb7122526bb sha256=4f4d19f3e15fdf00957932211be609b6bf4e689ad5938ce7bff666a638bde0e7 +[http://downloads.sourceforge.net/mingw/mingwrt-3.15.2-mingw32-src.tar.gz] +md5=7bf0525f158213f3ac990ea68a5ec34d +sha256=64d7c31354d318ec2085e39e724287c78742a66302fd0b27dab7a3f705d5c54d + [http://www.denx.de/twiki/pub/Know/MiniFOHome/mini_fo-0-6-1-pre1.tar.bz2] md5=7e192e01b08023c7f3e63bf1c796bc14 sha256=68c64a38f0b29347f86871248f0399e7e1b12645dc6263af7b2e4940f1392eaa @@ -14962,6 +15038,10 @@ sha256=f79dff54153dc3beb9eb3f2e4776dbc55ed2a4d3d0adbf9c8a2d9eb230ed3850 md5=75bbd1dc425849e415a60afd9e74d2ff sha256=e83b80b4ccd7863223fac4a2d54974a64a79c635d6bdda0c6e7039f966eae9e2 +[ftp://ftp.mktemp.org/pub/mktemp/mktemp-1.6.tar.gz] +md5=3e66f91f8a39c7dc0a67b158aeb9c2ac +sha256=a1275889c7bb6b3c353d5b9ebb983064e8ef1d29ef8688bd132cec065642d2d9 + [http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches/mmc-spi.patch] md5=329fd64f8ccdb2731c54f6a1b8c6de14 sha256=27934de6da3f5ac94ed60ba4bfdd3acc2d93b01a2f932b576f87fb4508dcde6e @@ -16766,6 +16846,10 @@ sha256=31c35db09289c6e0436a258745d7180e0cd8f567949f27b3dab5a57a3664ed2f md5=4550a418f0480b39e839735a7e0e8d82 sha256=fbb5ee21210a4e4e1fe25941c6e16ec0fe8634817e6c96145128f376ba0c640b +[http://kernel.org/pub/linux/kernel/v2.6/patch-2.6.28.4.gz] +md5=464f663266e2c18371e213adab3c0077 +sha256=4862e7bf53553f645d9d730d3657bbec79f7c03482a984259b38e10e25b54382 + [http://www.muru.com/linux/omap/patches/patch-2.6.9-omap1.bz2] md5=d6249654087f0bcafaa860ac573316a4 sha256=91806347cb386002a8bfd20ee66e536e4a7dfb01f207dd751341f2971090d9ac @@ -17894,6 +17978,10 @@ sha256=1fe008b728923f25d3c8ebd7f28cc538aa0814f3b090df817e25c266fcaecf6a md5=e65d9245d706350b3db811280d897f30 sha256=3eecd66deecc2de5c31bb91a4b4479232087e80da94e3086e2a686879374cde9 +[http://pypi.python.org/packages/source/p/pyflakes/pyflakes-0.3.0.tar.gz] +md5=ec7eee3444214bda18e57b82175e1da7 +sha256=019b6d4b549306d013974678872aaf2453af3f02760175504dbe8a9f89db0a2c + [http://pyftpdlib.googlecode.com/files/pyftpdlib-0.5.1.tar.gz] md5=f64ac67ebec1d8ab47c0766082617384 sha256=6daed9475412eaab232e021ed76568c6520dacd75c58da406454139bef95c393 @@ -19050,6 +19138,10 @@ sha256=22647c6bdd0f1b311bd0e3a893fb184f07d0f5e1c4b3bccd20a024fe18fd7567 md5=528677f261f3ed4a58f9483ca25ba6b2 sha256=4f2bb8c5785c50ad05d3adc0027c0881211b8a5c51e840651b53b7e455c004a3 +[http://samba.org/samba/ftp/stable/samba-3.2.8.tar.gz] +md5=06efd6e6cc4aac628a1a0b082e4be0f2 +sha256=7e7fb53d6ff05993dcb8b871e3c3016bd4d161d72ded8f8760a4439e9d76aa3b + [http://samba.org/samba/ftp/stable/samba-3.3.0.tar.gz] md5=adb048dc3988055533e1ea5d91d81f99 sha256=b00ca360e9b414744eff33ca4567f3eb1a28d32914e20f00b6672fbc141c9beb @@ -23058,6 +23150,10 @@ sha256=c6032ec1753a0f5975b5a7488ca3ca0d46f84bc5dd8fcb42eebd807c7faec765 md5=c209e54fa8dcd3cd3342e84d261b02db sha256=d03eb7e5b47e2f1e1a665700f4e22d15651dc949196b0ec880f0d63cafb6814c +[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-geode-2.11.0.tar.bz2] +md5=1dbede8f6393edfe6c1ecab2f754b3b2 +sha256=d70c198cde981c3a53b1c41b717dea4bbf1d397d82957f584c641bb5fd02c82d + [http://xorg.freedesktop.org/releases/individual/driver/xf86-video-geode-2.8.0.tar.bz2] md5=a2b9c70a32b0a6436d837d67fa7aae18 sha256=f0b68171dd4256c927fbee91ecf84fa28c409b5b6b39cbf47eaa48fd73db305f diff --git a/conf/distro/include/fso-autorev.inc b/conf/distro/include/fso-autorev.inc index a84faf1234..109fabe3b8 100644 --- a/conf/distro/include/fso-autorev.inc +++ b/conf/distro/include/fso-autorev.inc @@ -3,6 +3,7 @@ SRCREV_pn-dbus-hlid = "${AUTOREV}" SRCREV_pn-frameworkd = "${AUTOREV}" SRCREV_pn-frameworkd-devel = "${AUTOREV}" SRCREV_pn-fsod = "${AUTOREV}" +SRCREV-pn-fso-abyss = "${AUTOREV}" SRCREV_pn-fso-apm = "${AUTOREV}" SRCREV_pn-fso-gsm0710muxd = "${AUTOREV}" SRCREV_pn-fso-gpsd = "${AUTOREV}" @@ -11,7 +12,9 @@ SRCREV_pn-fso-sounds = "${AUTOREV}" SRCREV_pn-gsmd2 = "${AUTOREV}" SRCREV_pn-illume-theme-freesmartphone = "${AUTOREV}" SRCREV_pn-libframeworkd-glib = "${AUTOREV}" +SRCREV_pn-libgsm0710 = "${AUTOREV}" SRCREV_pn-mickeydbus = "${AUTOREV}" SRCREV_pn-mickeyterm = "${AUTOREV}" SRCREV_pn-python-pytrc = "${AUTOREV}" +SRCREV_pn-qtopia0710muxd = "${AUTOREV}" SRCREV_pn-zhone = "${AUTOREV}" diff --git a/conf/distro/include/preferred-om-2008-versions.inc b/conf/distro/include/preferred-om-2008-versions.inc index 433dc0d6e5..3b3669c953 100644 --- a/conf/distro/include/preferred-om-2008-versions.inc +++ b/conf/distro/include/preferred-om-2008-versions.inc @@ -56,8 +56,8 @@ PREFERRED_VERSION_aumix ?= "2.8" PREFERRED_VERSION_autoconf ?= "2.61" PREFERRED_VERSION_autoconf-native ?= "2.61" PREFERRED_VERSION_autofs ?= "4.1.4" -PREFERRED_VERSION_automake ?= "1.9.6" -PREFERRED_VERSION_automake-native ?= "1.9.6" +PREFERRED_VERSION_automake ?= "1.10" +PREFERRED_VERSION_automake-native ?= "1.10" PREFERRED_VERSION_avahi ?= "0.6.22" PREFERRED_VERSION_avahi-python ?= "0.6.21" PREFERRED_VERSION_avahi-ui ?= "0.6.21" @@ -1042,10 +1042,10 @@ PREFERRED_VERSION_libtinymail ?= "0.0.3" PREFERRED_VERSION_libtododb ?= "0.11" PREFERRED_VERSION_libtomcrypt ?= "0.97b" PREFERRED_VERSION_libtomoe-gtk ?= "0.1.0" -PREFERRED_VERSION_libtool ?= "1.5.24" -PREFERRED_VERSION_libtool-cross ?= "1.5.10" -PREFERRED_VERSION_libtool-native ?= "1.5.10" -PREFERRED_VERSION_libtool-sdk ?= "1.5.10" +PREFERRED_VERSION_libtool ?= "2.2.4" +PREFERRED_VERSION_libtool-cross ?= "2.2.4" +PREFERRED_VERSION_libtool-native ?= "2.2.4" +PREFERRED_VERSION_libtool-sdk ?= "2.2.4" PREFERRED_VERSION_libungif ?= "4.1.3" PREFERRED_VERSION_libupnp ?= "1.3.1" PREFERRED_VERSION_liburiparser ?= "0.5.1" @@ -1539,8 +1539,8 @@ PREFERRED_VERSION_python-pyfits ?= "1.1" PREFERRED_VERSION_python-pyflakes ?= "0.2.1" PREFERRED_VERSION_python-pygame ?= "1.8.1" PREFERRED_VERSION_python-pygnome ?= "2.16.2" -PREFERRED_VERSION_python-pygobject ?= "2.14.2" -PREFERRED_VERSION_python-pygobject-native ?= "2.14.2" +PREFERRED_VERSION_python-pygobject ?= "2.16.0" +PREFERRED_VERSION_python-pygobject-native ?= "2.16.0" PREFERRED_VERSION_python-pygoogle ?= "0.6" PREFERRED_VERSION_python-pygtk-1.2 ?= "0.6.12" PREFERRED_VERSION_python-pygtk ?= "2.10.4" diff --git a/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc b/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc index a81d5eca71..1f6076525f 100644 --- a/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc +++ b/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc @@ -2,6 +2,6 @@ PREFERRED_VERSION_xserver-xorg ?= "1.5.3" PREFERRED_VERSION_xf86-input-evdev ?= "2.1.0" +PREFERRED_VERSION_xf86-video-geode ?= "2.11.0" PREFERRED_VERSION_libxi ?= "1.2.0" PREFERRED_VERSION_inputproto ?= "1.5.0" - diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc index c51684d0e6..cf879526c7 100644 --- a/conf/distro/include/sane-srcrevs.inc +++ b/conf/distro/include/sane-srcrevs.inc @@ -57,7 +57,7 @@ SRCREV_pn-flashrom ?= "3682" SRCREV_pn-frameworkd ?= "700ab8250582767628165b7cf6f671ef756ba56d" SRCREV_pn-frameworkd-devel ?= "${SRCREV_pn-frameworkd}" SRCREV_pn-fsod ?= "3fa5eb6f2edcf7c9f0fc2027fda47b91d9f0f136" -SRCREV_pn-fso-abyss ?= "4afeacb21c3d4193289e2b7db549a91751d75195" +SRCREV_pn-fso-abyss ?= "30817edd8767bb9405f56cad72b3420670975128" SRCREV_pn-fso-apm ?= "eb39ce7fb81bfa64e1a9eb5f142ca3d1065be3fa" SRCREV_pn-fso-gpsd ?= "78fe48dffb923175bde9f0aabc3500a9264a57e0" SRCREV_pn-fso-gsm0710muxd ?= "abcbcd7cc532a8834906de3fc24c8f8fe7643cd4" @@ -84,6 +84,7 @@ SRCREV_pn-libexalt-dbus ?= "76" SRCREV_pn-libfakekey ?= "1455" SRCREV_pn-libframeworkd-glib ?= "703017c8f874a325d917931378071c614597110e" SRCREV_pn-libgdbus ?= "aeab6e3c0185b271ca343b439470491b99cc587f" +SRCREV_pn-libgsm0710 ?= "a05704a56003dc02dca784cef4176e97eaf9f688" SRCREV_pn-libgsmd ?= "4505" SRCREV_pn-libiac ?= "1590" SRCREV_pn-libjana ?= "713" @@ -101,7 +102,7 @@ SRCREV_pn-linux-hackndev-2.6 ?= "1308" SRCREV_pn-linux-ixp4xx ?= "1085" SRCREV_pn-linux-openmoko-2.6.24 ?= "fb42ce6724576fc173faf8abfb04aa2c36d213b7" SRCREV_pn-linux-openmoko-2.6.28 ?= "34240a1c06ae36180dee695aa25bbae869b2aa26" -SRCREV_pn-linux-openmoko-devel ?= "34240a1c06ae36180dee695aa25bbae869b2aa26" +SRCREV_pn-linux-openmoko-devel ?= "498d0953423a504cd24d11a0307e0ec01b81b68d" SRCREV_pn-linux-eten ?= "ab2d414f4f13816af0ec0401b608133ca946624a" SRCREV_pn-llvm-gcc4 ?= "374" SRCREV_pn-llvm-gcc4-cross ?= "374" @@ -207,7 +208,7 @@ SRCREV_pn-tslib ?= "53" SRCREV_pn-qemu-native ?= "${QEMUSRCREV}" SRCREV_pn-qemu-sdk ?= "${QEMUSRCREV}" SRCREV_pn-qemu ?= "${QEMUSRCREV}" -SRCREV_pn-qi ?= "ed52486b43dca91891305b9e832c8366a2742798" +SRCREV_pn-qi ?= "1fc83905fe99da92ff18e6ba671ee339477b1b9e" SRCREV_pn-remoko ?= "121" SRCREV_pn-remoko-server ?= "121" SRCREV_pn-s3c24xx-gpio ?= "4130" @@ -229,7 +230,7 @@ SRCREV_pn-uclibc-initial ?= "24279" SRCREV_pn-usbpath ?= "3172" SRCREV_pn-usbpath-native ?= "3172" SRCREV_pn-vala-terminal ?= "94117f453ce884e9c30b611fae6fc19f85f98f2b" -SRCREV_pn-webkit-gtk ?= "39964" +SRCREV_pn-webkit-gtk ?= "40814" SRCREV_pn-webkit-qt ?= "28656" SRCREV_pn-webkit-qtopia ?= "28656" SRCREV_pn-wlan-ng-modules ?= "1859" diff --git a/conf/machine/collie.conf b/conf/machine/collie.conf index b26df9dfea..6d09406375 100644 --- a/conf/machine/collie.conf +++ b/conf/machine/collie.conf @@ -13,7 +13,7 @@ SERIAL_CONSOLE = "115200 ttySA0" ROOT_FLASH_SIZE = "14" # actually 14680064, see EXTRA_IMAGECMD -PREFERRED_PROVIDER_virtual/kernel = "linux-rp" +PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive" XSERVER ?= "xserver-kdrive-fbdev" diff --git a/conf/machine/include/kexecboot.inc b/conf/machine/include/kexecboot.inc index c8656bb117..1835af4727 100644 --- a/conf/machine/include/kexecboot.inc +++ b/conf/machine/include/kexecboot.inc @@ -13,4 +13,4 @@ RDEPENDS_kernel-base = "kernel-image" # we store kernel images in rootfs and only a minimal initramfs kernel in mtd1 for booting other kernels DONT_CHECK_KERNELSIZE ?= "1" -MACHINE_EXTRA_RRECOMMENDS_append = " kexecboot-cfg" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS_append = " kexecboot-cfg" diff --git a/conf/machine/include/orion.inc b/conf/machine/include/orion.inc index c6fe6e3678..9e16805bd2 100644 --- a/conf/machine/include/orion.inc +++ b/conf/machine/include/orion.inc @@ -10,7 +10,7 @@ USE_DEVFS = "0" PREFERRED_PROVIDER_virtual/bootloader = "" PREFERRED_PROVIDER_virtual/kernel = "linux-orion" -PREFERRED_VERSION_linux-orion = "2.6.27.10" +PREFERRED_VERSION_linux-orion = "2.6.28.4" IMAGE_DEVICE_TABLES = "files/device_table-slugos.txt" IMAGE_FSTYPES = "tar.gz" diff --git a/conf/machine/oxe810.conf b/conf/machine/oxnas.conf index 08213297c8..08213297c8 100644 --- a/conf/machine/oxe810.conf +++ b/conf/machine/oxnas.conf diff --git a/contrib/angstrom/build-feeds.sh b/contrib/angstrom/build-feeds.sh index 5414aa9796..14a185d715 100755 --- a/contrib/angstrom/build-feeds.sh +++ b/contrib/angstrom/build-feeds.sh @@ -298,6 +298,7 @@ do wifi-radar \ win4 \ wpa-gui \ + wt \ x11vnc \ xf86-input-evdev \ xf86-input-keyboard \ diff --git a/contrib/angstrom/build-release.sh b/contrib/angstrom/build-release.sh index d8144f80e4..0353309bd3 100755 --- a/contrib/angstrom/build-release.sh +++ b/contrib/angstrom/build-release.sh @@ -76,15 +76,6 @@ do do_build done -# build altboot images for zaurus -for machine in c7x0 poodle tosa akita spitz collie -do - BUILD_CLEAN="base-files" - BUILD_MACHINE=$machine - BUILD_TARGETS="altboot-console-image" - do_build -done - # build kexecboot kernels for supported machines for machine in h2200 hx4700 c7x0 akita spitz poodle collie do diff --git a/contrib/angstrom/sort.sh b/contrib/angstrom/sort.sh index d624000d17..21731668ac 100755 --- a/contrib/angstrom/sort.sh +++ b/contrib/angstrom/sort.sh @@ -144,11 +144,6 @@ for i in ../* ; do echo " DONE" cd ${BPWD} -( cd ~/website/repo-updater ; php update.php ; rm ../repo/feeds.db* ; cp feeds.db* ../repo ) - -echo -n "Stripping source lines from Package files" -for i in `find . -name Packages` ; do grep -v ^Source: $i|gzip -c9>$i.gz ;gunzip -c $i.gz>$i ; touch $i.sig ; done -echo " DONE" } echo "Processing 'all' feed" @@ -164,3 +159,10 @@ if [ "$1" != "--skip-sorted-list" ]; then for i in $(find ../ -name "*.ipk"| grep -v unsorted) ; do basename $i ; done > files-sorted fi +( cd ~/website/repo-updater ; php update.php ; rm ../repo/feeds.db* ; cp feeds.db* ../repo ) + +echo -n "Stripping source lines from Package files" +for i in `find .. -name Packages` ; do grep -v ^Source: $i|gzip -c9>$i.gz ;gunzip -c $i.gz>$i ; touch $i.sig ; done +echo " DONE" + + diff --git a/packages/alsa/alsa-state.bb b/packages/alsa/alsa-state.bb index a6c613403c..3ebc0d5476 100644 --- a/packages/alsa/alsa-state.bb +++ b/packages/alsa/alsa-state.bb @@ -7,7 +7,7 @@ DESCRIPTION = "Alsa Scenario Files" LICENSE = "MIT" PV = "0.2.0" -PR = "r2" +PR = "r3" SRC_URI = "\ file://asound.conf \ diff --git a/packages/alsa/alsa-state/at91sam9263ek/asound.conf b/packages/alsa/alsa-state/at91sam9263ek/asound.conf new file mode 100644 index 0000000000..87bb5ec050 --- /dev/null +++ b/packages/alsa/alsa-state/at91sam9263ek/asound.conf @@ -0,0 +1,2 @@ +pcm.!default { type hw card 0 } +ctl.!default { type hw card 0 } diff --git a/packages/blackbox/blackbox_0.70.1.bb b/packages/blackbox/blackbox_0.70.1.bb index 50dc5a69c6..05010f97bb 100644 --- a/packages/blackbox/blackbox_0.70.1.bb +++ b/packages/blackbox/blackbox_0.70.1.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Blackbox Window Manager" SECTION = "x11/wm" LICENSE = "GPL" DEPENDS = "libx11 libxext libxcomposite libxfixes libxdamage libxrender libxinerama libxpm xrandr xft" -PR = "r0" +PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/blackboxwm/blackbox-0.70.1.tar.gz \ file://remove-host-includes.patch;patch=1" @@ -12,3 +12,10 @@ inherit autotools pkgconfig EXTRA_OECONF = "--disable-i18n --without-imlib --with-xpm --with-gnome-menus" +#fix path of pc file +do_install_append() { + sed -i s#${STAGING_LIBDIR}#${libdir}#g ${D}/${libdir}/pkgconfig/libbt.pc +} +do_stage_append () { + sed -i s#${STAGING_LIBDIR}#${libdir}#g ${STAGING_LIBDIR}/pkgconfig/libbt.pc +} diff --git a/packages/bluez/bluez4_4.27.bb b/packages/bluez/bluez4_4.29.bb index c9aa79e8ed..c9aa79e8ed 100644 --- a/packages/bluez/bluez4_4.27.bb +++ b/packages/bluez/bluez4_4.29.bb diff --git a/packages/dhcp/dhcp_3.0.2.bb b/packages/dhcp/dhcp_3.0.2.bb index f8d85089fe..faf22b29cf 100644 --- a/packages/dhcp/dhcp_3.0.2.bb +++ b/packages/dhcp/dhcp_3.0.2.bb @@ -2,7 +2,7 @@ SECTION = "console/network" DESCRIPTION = "Internet Software Consortium DHCP package" HOMEPAGE = "http://www.isc.org/" LICENSE = "BSD" -PR = "r7" +PR = "r8" SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history/dhcp-${PV}.tar.gz \ file://noattrmode.patch;patch=1 \ file://fixincludes.patch;patch=1 \ @@ -12,6 +12,13 @@ SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history/dhcp-${PV}.tar.gz \ file://init-server file://default-server \ file://dhclient.conf file://dhcpd.conf" + +inherit update-rc.d + +INITSCRIPT_PACKAGES = "dhcp-server" +INITSCRIPT_NAME_dhcp-server = dhcp-server +INITSCRIPT_PARAMS_dhcp-server = "start 30 2 3 4 5 . stop 30 0 1 6 ." + do_configure() { ./configure } diff --git a/packages/euphony/euphony_0.1.2.bb b/packages/euphony/euphony_0.1.3.bb index 134a39dc5e..134a39dc5e 100644 --- a/packages/euphony/euphony_0.1.2.bb +++ b/packages/euphony/euphony_0.1.3.bb diff --git a/packages/ezx/ezx-gen-blob_svn.bb b/packages/ezx/ezx-gen-blob_svn.bb new file mode 100644 index 0000000000..fb0def2c20 --- /dev/null +++ b/packages/ezx/ezx-gen-blob_svn.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Generic Blob [Bootloader] for the Motorola EZX platform" +SECTION = "bootloaders" +AUTHOR = "Daniel Riberio" +HOMEPAGE = "http://people.openezx.org/wyrm/gen-blob" +PRIORITY = "optional" +LICENSE = "GPL" +PROVIDES = "virtual/bootloader" +PV = "0.1.0+${SRCREV}" +PR = "r0" + +DEFAULT_PREFERENCE = "-1" + +inherit autotools + +SRC_URI = "svn://svn.openezx.org/trunk/src/blob/;module=gen-blob;proto=http" +S = "${WORKDIR}/gen-blob" + +do_deploy() { + dd if=${WORKDIR}/gen-blob bs=1k seek=2 conv=sync of=${WORKDIR}/gen-blob-a1200 + + install -d ${DEPLOY_DIR_IMAGE} + install -m 0644 gen-blob ${DEPLOY_DIR_IMAGE}/gen-blob-for-1stgen.${SRCDATE} + install -m 0644 gen-blob-a1200 ${DEPLOY_DIR_IMAGE}/gen-blob-for-2ndgen.${SRCDATE} +} + +do_install() { + dd if=${WORKDIR}/gen-blob bs=1k seek=2 conv=sync of=${WORKDIR}/gen-blob-a1200 + + install -d ${D}/${datadir}/openezx + install -m 0644 gen-blob ${D}${datadir}/openezx/gen-blob-for-1stgen.${SRCDATE} + install -m 0644 gen-blob-a1200 ${D}${datadir}/openezx/gen-blob-for-2ndgen.${SRCDATE} +} + +addtask deploy before do_build after do_compile + +PACKAGE_ARCH = "${MACHINE_ARCH}" +FILES_${PN} = "${datadir}" diff --git a/packages/freesmartphone/fso-abyss_git.bb b/packages/freesmartphone/fso-abyss_git.bb index 471f404fc1..45d2257c72 100644 --- a/packages/freesmartphone/fso-abyss_git.bb +++ b/packages/freesmartphone/fso-abyss_git.bb @@ -2,9 +2,9 @@ DESCRIPTION = "Abyss is a GSM 07.10 muxer userspace daemon" HOMEPAGE = "http://www.freesmartphone.org/mediawiki/index.php/Implementations/Abyss" AUTHOR = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>" SECTION = "console/network" -DEPENDS = "vala-native dbus dbus-glib libgee" +DEPENDS = "vala-native dbus dbus-glib libgsm0710" LICENSE = "GPL" -PV = "0.2.0+gitr${SRCREV}" +PV = "0.2.1+gitr${SRCREV}" PR = "r0" SRC_URI = "${FREESMARTPHONE_GIT}/fso-abyss.git;protocol=git;branch=master" @@ -12,7 +12,6 @@ S = "${WORKDIR}/git" inherit autotools -RDEPENDS = "dbus dbus-glib" -RCONFLICTS = "gsm0710muxd fso-gsm0710muxd" +#RCONFLICTS = "gsm0710muxd fso-gsm0710muxd" FILES_${PN} += "${datadir} ${sysconfdir}" diff --git a/packages/freesmartphone/libgsm0710_git.bb b/packages/freesmartphone/libgsm0710_git.bb new file mode 100644 index 0000000000..bc4e59ea34 --- /dev/null +++ b/packages/freesmartphone/libgsm0710_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "A GSM 07.10 Protocol Engine" +LICENSE = "GPL" +SECTION = "devel" +PV = "1.0.0+gitr${SRCREV}" +PR = "r0" + +SRC_URI = "${FREESMARTPHONE_GIT}/libgsm0710.git;protocol=git;branch=master" +S = "${WORKDIR}/git" + +inherit autotools autotools_stage pkgconfig + +# ship vapi file +FILES_${PN}-dev += "${datadir}/vala" + diff --git a/packages/images/x11-gpe-image.bb b/packages/images/x11-gpe-image.bb index 86f4cd838c..7b272f60a1 100644 --- a/packages/images/x11-gpe-image.bb +++ b/packages/images/x11-gpe-image.bb @@ -1,7 +1,6 @@ #Angstrom X11 image, with apps and kernel modules included ANGSTROM_EXTRA_INSTALL += " \ - ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " XSERVER ?= "xserver-kdrive-fbdev" diff --git a/packages/images/x11-gpe-java-image.bb b/packages/images/x11-gpe-java-image.bb index 72b04ec2bc..fcc022c7a0 100644 --- a/packages/images/x11-gpe-java-image.bb +++ b/packages/images/x11-gpe-java-image.bb @@ -1,7 +1,6 @@ #Angstrom X11 image, with apps and kernel modules included ANGSTROM_EXTRA_INSTALL += " \ - ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " XSERVER ?= "xserver-kdrive-fbdev" diff --git a/packages/images/x11-office-image.bb b/packages/images/x11-office-image.bb index 47a8fae71f..48799d8998 100644 --- a/packages/images/x11-office-image.bb +++ b/packages/images/x11-office-image.bb @@ -1,7 +1,6 @@ #Angstrom X11 image, with apps and kernel modules included ANGSTROM_EXTRA_INSTALL += " \ - ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " XSERVER ?= "xserver-kdrive-fbdev" diff --git a/packages/images/x11-pimlico-image.bb b/packages/images/x11-pimlico-image.bb index 3c93bfbd1b..79dcacce6e 100644 --- a/packages/images/x11-pimlico-image.bb +++ b/packages/images/x11-pimlico-image.bb @@ -1,7 +1,6 @@ #Angstrom X11 image, with apps and kernel modules included ANGSTROM_EXTRA_INSTALL += " \ - ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " XSERVER ?= "xserver-kdrive-fbdev" diff --git a/packages/linux/linux-2.6.24/oxe810/defconfig b/packages/linux/linux-2.6.24/oxnas/defconfig index 5382e30f85..5382e30f85 100644 --- a/packages/linux/linux-2.6.24/oxe810/defconfig +++ b/packages/linux/linux-2.6.24/oxnas/defconfig diff --git a/packages/linux/linux-2.6.24/oxnas/oxnas-uart.patch b/packages/linux/linux-2.6.24/oxnas/oxnas-uart.patch new file mode 100644 index 0000000000..e72b0db898 --- /dev/null +++ b/packages/linux/linux-2.6.24/oxnas/oxnas-uart.patch @@ -0,0 +1,176 @@ +diff -Nurd linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_dse_defconfig linux-2.6.24/arch/arm/configs/oxnas_810_eabi_dse_defconfig +--- linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_dse_defconfig 2009-02-05 12:06:15.000000000 +0100 ++++ linux-2.6.24/arch/arm/configs/oxnas_810_eabi_dse_defconfig 2009-02-05 12:08:36.000000000 +0100 +@@ -160,6 +160,8 @@ + # CONFIG_OXNAS_VERSION_0X850 is not set + # CONFIG_ARCH_OXNAS_UART1 is not set + CONFIG_ARCH_OXNAS_UART2=y ++CONFIG_ARCH_OXNAS_UART2_DEBUG=y ++CONFIG_ARCH_OXNAS_UART2_BOOTPROGRESS=y + # CONFIG_ARCH_OXNAS_UART2_MODEM is not set + # CONFIG_ARCH_OXNAS_UART3 is not set + # CONFIG_ARCH_OXNAS_PCI_REQGNT_0 is not set +diff -Nurd linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_upgrade_defconfig linux-2.6.24/arch/arm/configs/oxnas_810_eabi_upgrade_defconfig +--- linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_upgrade_defconfig 2009-02-05 12:06:15.000000000 +0100 ++++ linux-2.6.24/arch/arm/configs/oxnas_810_eabi_upgrade_defconfig 2009-02-05 12:08:36.000000000 +0100 +@@ -152,6 +152,8 @@ + # CONFIG_OXNAS_VERSION_0X850 is not set + # CONFIG_ARCH_OXNAS_UART1 is not set + CONFIG_ARCH_OXNAS_UART2=y ++CONFIG_ARCH_OXNAS_UART2_DEBUG=y ++CONFIG_ARCH_OXNAS_UART2_BOOTPROGRESS=y + # CONFIG_ARCH_OXNAS_UART2_MODEM is not set + # CONFIG_ARCH_OXNAS_UART3 is not set + # CONFIG_ARCH_OXNAS_PCI_REQGNT_0 is not set +diff -Nurd linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_wd_eval_defconfig linux-2.6.24/arch/arm/configs/oxnas_810_eabi_wd_eval_defconfig +--- linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_wd_eval_defconfig 2009-02-05 12:06:15.000000000 +0100 ++++ linux-2.6.24/arch/arm/configs/oxnas_810_eabi_wd_eval_defconfig 2009-02-05 12:08:36.000000000 +0100 +@@ -160,6 +160,8 @@ + # CONFIG_OXNAS_VERSION_0X850 is not set + # CONFIG_ARCH_OXNAS_UART1 is not set + CONFIG_ARCH_OXNAS_UART2=y ++CONFIG_ARCH_OXNAS_UART2_DEBUG=y ++CONFIG_ARCH_OXNAS_UART2_BOOTPROGRESS=y + # CONFIG_ARCH_OXNAS_UART2_MODEM is not set + # CONFIG_ARCH_OXNAS_UART3 is not set + # CONFIG_ARCH_OXNAS_UART4 is not set +diff -Nurd linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_wd_prod_defconfig linux-2.6.24/arch/arm/configs/oxnas_810_eabi_wd_prod_defconfig +--- linux-2.6.24.org/arch/arm/configs/oxnas_810_eabi_wd_prod_defconfig 2009-02-05 12:06:15.000000000 +0100 ++++ linux-2.6.24/arch/arm/configs/oxnas_810_eabi_wd_prod_defconfig 2009-02-05 12:08:36.000000000 +0100 +@@ -158,6 +158,8 @@ + # CONFIG_OXNAS_VERSION_0X850 is not set + # CONFIG_ARCH_OXNAS_UART1 is not set + CONFIG_ARCH_OXNAS_UART2=y ++CONFIG_ARCH_OXNAS_UART2_DEBUG=y ++CONFIG_ARCH_OXNAS_UART2_BOOTPROGRESS=y + # CONFIG_ARCH_OXNAS_UART2_MODEM is not set + # CONFIG_ARCH_OXNAS_UART3 is not set + # CONFIG_ARCH_OXNAS_UART4 is not set +diff -Nurd linux-2.6.24.org/arch/arm/mach-oxnas/Kconfig linux-2.6.24/arch/arm/mach-oxnas/Kconfig +--- linux-2.6.24.org/arch/arm/mach-oxnas/Kconfig 2009-02-05 12:06:15.000000000 +0100 ++++ linux-2.6.24/arch/arm/mach-oxnas/Kconfig 2009-02-05 12:08:34.000000000 +0100 +@@ -66,6 +66,20 @@ + UARTs will be mapped to ttySn numbers from UART1 to UART4, only + including those UARTs selected to be present + ++config ARCH_OXNAS_UART1_DEBUG ++ bool "Use UART1 as debug channel" ++ depends on ARCH_OXNAS_UART1 ++ default n ++ help ++ This enables UART1 to be usable as debug channel. ++ ++config ARCH_OXNAS_UART1_BOOTPROGRESS ++ bool "Display boot progress over UART1" ++ depends on ARCH_OXNAS_UART1 ++ default n ++ help ++ This enables displaying boot progress over UART1. ++ + config ARCH_OXNAS_UART1_MODEM + bool "Support UART1 modem control lines" + depends on ARCH_OXNAS_UART1 +@@ -81,6 +95,20 @@ + UARTs will be mapped to ttySn numbers from UART1 to UART4, only + including those UARTs selected to be present + ++config ARCH_OXNAS_UART2_DEBUG ++ bool "Use UART2 as debug channel" ++ depends on ARCH_OXNAS_UART2 ++ default n ++ help ++ This enables UART2 to be usable as debug channel. ++ ++config ARCH_OXNAS_UART2_BOOTPROGRESS ++ bool "Display boot progress over UART2" ++ depends on ARCH_OXNAS_UART2 ++ default n ++ help ++ This enables displaying boot progress over UART2. ++ + config ARCH_OXNAS_UART2_MODEM + bool "Support UART2 modem control lines" + depends on ARCH_OXNAS_UART2 +@@ -96,6 +124,20 @@ + UARTs will be mapped to ttySn numbers from UART1 to UART4, only + including those UARTs selected to be present + ++config ARCH_OXNAS_UART3_DEBUG ++ bool "Use UART3 as debug channel" ++ depends on ARCH_OXNAS_UART3 ++ default n ++ help ++ This enables UART3 to be usable as debug channel. ++ ++config ARCH_OXNAS_UART3_BOOTPROGRESS ++ bool "Display boot progress over UART3" ++ depends on ARCH_OXNAS_UART3 ++ default n ++ help ++ This enables displaying boot progress over UART3. ++ + config ARCH_OXNAS_UART3_MODEM + bool "Support UART3 modem control lines" + depends on ARCH_OXNAS_UART3 +@@ -114,6 +156,20 @@ + UART4 always has its modem control lines available on external pins + when selected (overlaying PCI functions) + ++config ARCH_OXNAS_UART4_DEBUG ++ bool "Use UART4 as debug channel" ++ depends on ARCH_OXNAS_UART4 ++ default n ++ help ++ This enables UART4 to be usable as debug channel. ++ ++config ARCH_OXNAS_UART4_BOOTPROGRESS ++ bool "Display boot progress over UART4" ++ depends on ARCH_OXNAS_UART4 ++ default n ++ help ++ This enables displaying boot progress over UART4. ++ + config ARCH_OXNAS_PCI_REQGNT_0 + bool "Enable req/gnt for PCI device 0" + depends on PCI +diff -Nurd linux-2.6.24.org/include/asm-arm/arch-oxnas/debug-macro.S linux-2.6.24/include/asm-arm/arch-oxnas/debug-macro.S +--- linux-2.6.24.org/include/asm-arm/arch-oxnas/debug-macro.S 2009-02-05 12:06:19.000000000 +0100 ++++ linux-2.6.24/include/asm-arm/arch-oxnas/debug-macro.S 2009-02-05 12:08:34.000000000 +0100 +@@ -14,13 +14,13 @@ + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? +-#ifdef CONFIG_ARCH_OXNAS_UART1 ++#ifdef CONFIG_ARCH_OXNAS_UART1_DEBUG + ldreq \rx, =UART_1_BASE_PA @ physical base address + ldrne \rx, =UART_1_BASE @ virtual address +-#elif CONFIG_ARCH_OXNAS_UART2 ++#elif CONFIG_ARCH_OXNAS_UART2_DEBUG + ldreq \rx, =UART_2_BASE_PA @ physical base address + ldrne \rx, =UART_2_BASE @ virtual address +-#elif CONFIG_ARCH_OXNAS_UART3 ++#elif CONFIG_ARCH_OXNAS_UART3_DEBUG + ldreq \rx, =UART_3_BASE_PA @ physical base address + ldrne \rx, =UART_3_BASE @ virtual address + #else +diff -Nurd linux-2.6.24.org/include/asm-arm/arch-oxnas/uncompress.h linux-2.6.24/include/asm-arm/arch-oxnas/uncompress.h +--- linux-2.6.24.org/include/asm-arm/arch-oxnas/uncompress.h 2009-02-05 12:06:19.000000000 +0100 ++++ linux-2.6.24/include/asm-arm/arch-oxnas/uncompress.h 2009-02-05 12:08:34.000000000 +0100 +@@ -12,13 +12,13 @@ + + static inline void putc(int c) + { +-#ifdef CONFIG_ARCH_OXNAS_UART1 ++#ifdef CONFIG_ARCH_OXNAS_UART1_BOOTPROGRESS + static volatile unsigned char* uart = (volatile unsigned char*)UART_1_BASE_PA; +-#elif defined(CONFIG_ARCH_OXNAS_UART2) ++#elif defined(CONFIG_ARCH_OXNAS_UART2_BOOTPROGRESS) + static volatile unsigned char* uart = (volatile unsigned char*)UART_2_BASE_PA; +-#elif defined(CONFIG_ARCH_OXNAS_UART3) ++#elif defined(CONFIG_ARCH_OXNAS_UART3_BOOTPROGRESS) + static volatile unsigned char* uart = (volatile unsigned char*)UART_3_BASE_PA; +-#elif defined(CONFIG_ARCH_OXNAS_UART4) ++#elif defined(CONFIG_ARCH_OXNAS_UART4_BOOTPROGRESS) + static volatile unsigned char* uart = (volatile unsigned char*)UART_4_BASE_PA; + #else + #define NO_UART diff --git a/packages/linux/linux-2.6.24/oxe810/oxe810.diff b/packages/linux/linux-2.6.24/oxnas/oxnas.diff index 04ff1a670b..04ff1a670b 100644 --- a/packages/linux/linux-2.6.24/oxe810/oxe810.diff +++ b/packages/linux/linux-2.6.24/oxnas/oxnas.diff diff --git a/packages/linux/linux-2.6.27/boc01/013-090116-lcd.patch b/packages/linux/linux-2.6.27/boc01/013-090209-lcd.patch index 46a7534d2f..c867e2cf3a 100644 --- a/packages/linux/linux-2.6.27/boc01/013-090116-lcd.patch +++ b/packages/linux/linux-2.6.27/boc01/013-090209-lcd.patch @@ -160,7 +160,7 @@ Index: linux-2.6.27/drivers/video/nt7506fb.c +#define LCD_NPAGES (LCD_HEIGHT/8) /* LCD pages of 8 vertical pixels */ + +#define DEFAULT_CONTRAST 20 -+#define DEFAULT_FPS 5 ++#define DEFAULT_FPS 10 + +static struct resource *lcd_mem = NULL; +static void * _lcd_io = NULL; diff --git a/packages/linux/linux-2.6.27/boc01/014-090115-pm-wakeup.patch b/packages/linux/linux-2.6.27/boc01/014-090209-pm-wakeup.patch index 536a788ffc..3acbf40c32 100644 --- a/packages/linux/linux-2.6.27/boc01/014-090115-pm-wakeup.patch +++ b/packages/linux/linux-2.6.27/boc01/014-090209-pm-wakeup.patch @@ -1,8 +1,8 @@ Index: linux-2.6.27/arch/powerpc/platforms/83xx/Kconfig =================================================================== ---- linux-2.6.27.orig/arch/powerpc/platforms/83xx/Kconfig -+++ linux-2.6.27/arch/powerpc/platforms/83xx/Kconfig -@@ -104,6 +104,13 @@ config ASP834x +--- linux-2.6.27.orig/arch/powerpc/platforms/83xx/Kconfig 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27/arch/powerpc/platforms/83xx/Kconfig 2009-01-23 10:54:03.000000000 +0100 +@@ -104,6 +104,13 @@ endif @@ -18,17 +18,17 @@ Index: linux-2.6.27/arch/powerpc/platforms/83xx/Kconfig bool Index: linux-2.6.27/arch/powerpc/platforms/83xx/Makefile =================================================================== ---- linux-2.6.27.orig/arch/powerpc/platforms/83xx/Makefile -+++ linux-2.6.27/arch/powerpc/platforms/83xx/Makefile -@@ -14,3 +14,4 @@ obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds +--- linux-2.6.27.orig/arch/powerpc/platforms/83xx/Makefile 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27/arch/powerpc/platforms/83xx/Makefile 2009-01-23 10:54:03.000000000 +0100 +@@ -14,3 +14,4 @@ obj-$(CONFIG_SBC834x) += sbc834x.o obj-$(CONFIG_MPC837x_RDB) += mpc837x_rdb.o obj-$(CONFIG_ASP834x) += asp834x.o +obj-$(CONFIG_WAKEUP_IT) += wakeup-it.o Index: linux-2.6.27/arch/powerpc/platforms/83xx/wakeup-it.c =================================================================== ---- /dev/null -+++ linux-2.6.27/arch/powerpc/platforms/83xx/wakeup-it.c +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.27/arch/powerpc/platforms/83xx/wakeup-it.c 2009-01-23 10:49:09.000000000 +0100 @@ -0,0 +1,163 @@ +/* + * This support a driver to be used as a wakeup source on the MPC8313. @@ -77,8 +77,8 @@ Index: linux-2.6.27/arch/powerpc/platforms/83xx/wakeup-it.c +{ + //printk(KERN_INFO "===== WAKEUP INTERRUPT %d !!\n", irq); + -+ if ( suspend ) -+ kernel_restart(NULL); ++// if ( suspend ) ++// kernel_restart(NULL); + return IRQ_HANDLED ; +} + diff --git a/packages/linux/linux-2.6.28/collie/0001-collie-start-scoop-converton-to-new-api.patch b/packages/linux/linux-2.6.28/collie/0001-collie-start-scoop-converton-to-new-api.patch new file mode 100644 index 0000000000..51c161f99d --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0001-collie-start-scoop-converton-to-new-api.patch @@ -0,0 +1,106 @@ +From 4765c85914d55590c6d17b6cf9e6f7964d1af108 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <dbaryshkov@gmail.com> +Date: Tue, 28 Oct 2008 21:41:39 +0300 +Subject: [PATCH 01/23] collie: start scoop converton to new api + +Start converting scoop gpio access to new API instead of old +deprecated one. + +Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> +--- + arch/arm/mach-sa1100/collie.c | 28 +++++++++++++++++++++++----- + arch/arm/mach-sa1100/include/mach/collie.h | 7 ++++--- + 2 files changed, 27 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index fe28999..8cf267f 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -25,6 +25,7 @@ + #include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> + #include <linux/timer.h> ++#include <linux/gpio.h> + + #include <mach/hardware.h> + #include <asm/mach-types.h> +@@ -55,6 +56,7 @@ static struct resource collie_scoop_resources[] = { + static struct scoop_config collie_scoop_setup = { + .io_dir = COLLIE_SCOOP_IO_DIR, + .io_out = COLLIE_SCOOP_IO_OUT, ++ .gpio_base = COLLIE_SCOOP_GPIO_BASE, + }; + + struct platform_device colliescoop_device = { +@@ -196,18 +198,34 @@ static struct mtd_partition collie_partitions[] = { + } + }; + ++static int collie_flash_init(void) ++{ ++ int rc; ++ rc = gpio_request(COLLIE_GPIO_VPEN, "flash Vpp enable"); ++ if (rc) ++ return rc; ++ ++ rc = gpio_direction_output(COLLIE_GPIO_VPEN, 1); ++ if (rc) ++ gpio_free(COLLIE_GPIO_VPEN); ++ ++ return rc; ++} ++ + static void collie_set_vpp(int vpp) + { +- write_scoop_reg(&colliescoop_device.dev, SCOOP_GPCR, read_scoop_reg(&colliescoop_device.dev, SCOOP_GPCR) | COLLIE_SCP_VPEN); +- if (vpp) +- write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR) | COLLIE_SCP_VPEN); +- else +- write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR) & ~COLLIE_SCP_VPEN); ++ gpio_set_value(COLLIE_GPIO_VPEN, vpp); + } + ++static void collie_flash_exit(void) ++{ ++ gpio_free(COLLIE_GPIO_VPEN); ++} + static struct flash_platform_data collie_flash_data = { + .map_name = "cfi_probe", ++ .init = collie_flash_init, + .set_vpp = collie_set_vpp, ++ .exit = collie_flash_exit, + .parts = collie_partitions, + .nr_parts = ARRAY_SIZE(collie_partitions), + }; +diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h +index 69e9624..9bc5349 100644 +--- a/arch/arm/mach-sa1100/include/mach/collie.h ++++ b/arch/arm/mach-sa1100/include/mach/collie.h +@@ -14,6 +14,7 @@ + #define __ASM_ARCH_COLLIE_H + + ++#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1) + #define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11 + #define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12 + #define COLLIE_SCP_DIAG_BOOT2 SCOOP_GPCR_PA13 +@@ -21,13 +22,13 @@ + #define COLLIE_SCP_MUTE_R SCOOP_GPCR_PA15 + #define COLLIE_SCP_5VON SCOOP_GPCR_PA16 + #define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17 +-#define COLLIE_SCP_VPEN SCOOP_GPCR_PA18 ++#define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7) + #define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19 + + #define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_CHARGE_ON | COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ +- COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | COLLIE_SCP_VPEN | \ ++ COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \ + COLLIE_SCP_LB_VOL_CHG ) +-#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | COLLIE_SCP_VPEN | \ ++#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ + COLLIE_SCP_CHARGE_ON ) + + /* GPIOs for which the generic definition doesn't say much */ +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0002-add-locomo_spi-driver.patch b/packages/linux/linux-2.6.28/collie/0002-add-locomo_spi-driver.patch new file mode 100644 index 0000000000..7530beee2c --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0002-add-locomo_spi-driver.patch @@ -0,0 +1,1228 @@ +From dae5d7c71ba47bdd0603d5cc3e8a3dfe28d209a0 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:30:32 +0200 +Subject: [PATCH 02/23] add locomo_spi driver + +--- + drivers/spi/Kconfig | 4 + + drivers/spi/Makefile | 1 + + drivers/spi/locomo_spi.c | 1097 ++++++++++++++++++++++++++++++++++++++++++++++ + drivers/spi/locomo_spi.h | 75 ++++ + 4 files changed, 1177 insertions(+), 0 deletions(-) + create mode 100644 drivers/spi/locomo_spi.c + create mode 100644 drivers/spi/locomo_spi.h + +diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig +index b9d0efb..aa3c60a 100644 +--- a/drivers/spi/Kconfig ++++ b/drivers/spi/Kconfig +@@ -123,6 +123,10 @@ config SPI_MPC52xx_PSC + 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 (PPC_83xx || QUICC_ENGINE) && EXPERIMENTAL +diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile +index ccf18de..794dd45 100644 +--- a/drivers/spi/Makefile ++++ b/drivers/spi/Makefile +@@ -29,6 +29,7 @@ obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o + 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) +diff --git a/drivers/spi/locomo_spi.c b/drivers/spi/locomo_spi.c +new file mode 100644 +index 0000000..d3a4bd9 +--- /dev/null ++++ b/drivers/spi/locomo_spi.c +@@ -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"); +diff --git a/drivers/spi/locomo_spi.h b/drivers/spi/locomo_spi.h +new file mode 100644 +index 0000000..7e1c0ce +--- /dev/null ++++ b/drivers/spi/locomo_spi.h +@@ -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 +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0003-enable-cpufreq-for-collie.patch b/packages/linux/linux-2.6.28/collie/0003-enable-cpufreq-for-collie.patch new file mode 100644 index 0000000000..4ce284d52c --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0003-enable-cpufreq-for-collie.patch @@ -0,0 +1,25 @@ +From 41eabd493ccc241ccd52b77c576211759976972d Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:33:29 +0200 +Subject: [PATCH 03/23] enable cpufreq for collie + +--- + arch/arm/Kconfig | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 9722f8b..609f0fb 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1048,7 +1048,7 @@ config CPU_FREQ_SA1100 + + 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 +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0004-fix-dma-for-SA1100.patch b/packages/linux/linux-2.6.28/collie/0004-fix-dma-for-SA1100.patch new file mode 100644 index 0000000000..6dbb856189 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0004-fix-dma-for-SA1100.patch @@ -0,0 +1,25 @@ +From 4f4df9e1c0c82cfd9133f52089025a8ff363977c Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:39:02 +0200 +Subject: [PATCH 04/23] fix dma for SA1100 + +--- + arch/arm/mach-sa1100/dma.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c +index f990a3e..1489d64 100644 +--- a/arch/arm/mach-sa1100/dma.c ++++ b/arch/arm/mach-sa1100/dma.c +@@ -39,7 +39,7 @@ typedef struct { + + 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) +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0005-fix-collie-keyboard-bug.patch b/packages/linux/linux-2.6.28/collie/0005-fix-collie-keyboard-bug.patch new file mode 100644 index 0000000000..1200038de4 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0005-fix-collie-keyboard-bug.patch @@ -0,0 +1,24 @@ +From 71f6a1b91e92c89f3fcf0330c55ad41fd3315c33 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:40:32 +0200 +Subject: [PATCH 05/23] fix collie keyboard bug + +--- + drivers/input/keyboard/locomokbd.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c +index 9caed30..79e19bf 100644 +--- a/drivers/input/keyboard/locomokbd.c ++++ b/drivers/input/keyboard/locomokbd.c +@@ -265,6 +265,7 @@ static int __devinit locomokbd_probe(struct locomo_dev *dev) + 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); +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0006-add-collie-flash-hack.patch b/packages/linux/linux-2.6.28/collie/0006-add-collie-flash-hack.patch new file mode 100644 index 0000000000..0b987b6851 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0006-add-collie-flash-hack.patch @@ -0,0 +1,722 @@ +From 6b663bce31fb1e1a78dbca22190e98251628fd4f Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:48:10 +0200 +Subject: [PATCH 06/23] add collie flash hack + +--- + arch/arm/mach-sa1100/collie.c | 2 +- + drivers/mtd/chips/Kconfig | 8 + + drivers/mtd/chips/Makefile | 1 + + drivers/mtd/chips/sharp.c | 645 +++++++++++++++++++++++++++++++++++++++++ + drivers/mtd/maps/Kconfig | 2 +- + 5 files changed, 656 insertions(+), 2 deletions(-) + create mode 100644 drivers/mtd/chips/sharp.c + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index 8cf267f..ec673b8 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -222,7 +222,7 @@ static void collie_flash_exit(void) + gpio_free(COLLIE_GPIO_VPEN); + } + static struct flash_platform_data collie_flash_data = { +- .map_name = "cfi_probe", ++ .map_name = "sharp", + .init = collie_flash_init, + .set_vpp = collie_set_vpp, + .exit = collie_flash_exit, +diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig +index 9408099..2dcbd03 100644 +--- a/drivers/mtd/chips/Kconfig ++++ b/drivers/mtd/chips/Kconfig +@@ -241,5 +241,13 @@ config MTD_XIP + 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 + +diff --git a/drivers/mtd/chips/Makefile b/drivers/mtd/chips/Makefile +index 3658241..7283c57 100644 +--- a/drivers/mtd/chips/Makefile ++++ b/drivers/mtd/chips/Makefile +@@ -12,4 +12,5 @@ obj-$(CONFIG_MTD_GEN_PROBE) += gen_probe.o + 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 +diff --git a/drivers/mtd/chips/sharp.c b/drivers/mtd/chips/sharp.c +new file mode 100644 +index 0000000..046b964 +--- /dev/null ++++ b/drivers/mtd/chips/sharp.c +@@ -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"); +diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig +index 5ea1693..d523464 100644 +--- a/drivers/mtd/maps/Kconfig ++++ b/drivers/mtd/maps/Kconfig +@@ -360,7 +360,7 @@ config MTD_CDB89712 + + 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. +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0007-hostap-workaround-for-buggy-sa1100-pcmcia-driver.patch b/packages/linux/linux-2.6.28/collie/0007-hostap-workaround-for-buggy-sa1100-pcmcia-driver.patch new file mode 100644 index 0000000000..230bd93476 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0007-hostap-workaround-for-buggy-sa1100-pcmcia-driver.patch @@ -0,0 +1,107 @@ +From 8200a4430e1515bf4523e3651fa7c29fdebbb0fb Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:50:06 +0200 +Subject: [PATCH 07/23] hostap workaround for buggy sa1100 pcmcia driver + +--- + drivers/net/wireless/hostap/hostap_cs.c | 6 ++++-- + drivers/net/wireless/hostap/hostap_hw.c | 14 ++++++++++++-- + drivers/net/wireless/hostap/hostap_pci.c | 1 + + drivers/net/wireless/hostap/hostap_plx.c | 2 +- + 4 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c +index 6337402..928cdf0 100644 +--- a/drivers/net/wireless/hostap/hostap_cs.c ++++ b/drivers/net/wireless/hostap/hostap_cs.c +@@ -35,7 +35,7 @@ static int ignore_cis_vcc; + 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 @@ static int hostap_cs_probe(struct pcmcia_device *p_dev) + + 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; + } +diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c +index 3153fe9..188eaee 100644 +--- a/drivers/net/wireless/hostap/hostap_hw.c ++++ b/drivers/net/wireless/hostap/hostap_hw.c +@@ -54,6 +54,7 @@ + #include "hostap.h" + #include "hostap_ap.h" + ++extern int activar; + + /* #define final_version */ + +@@ -1497,6 +1498,8 @@ static int prism2_hw_config(struct net_device *dev, int initial) + if (local->hw_downloading) + return 1; + ++ activar=1; ++ + if (prism2_hw_init(dev, initial)) { + return local->no_pri ? 0 : 1; + } +@@ -2628,8 +2631,15 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id) + 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; + + prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0); + +diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c +index 3a874fc..df58aa3 100644 +--- a/drivers/net/wireless/hostap/hostap_pci.c ++++ b/drivers/net/wireless/hostap/hostap_pci.c +@@ -19,6 +19,7 @@ + + #include "hostap_wlan.h" + ++int activar=1; + + static char *dev_info = "hostap_pci"; + +diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c +index cbf15d7..4475174 100644 +--- a/drivers/net/wireless/hostap/hostap_plx.c ++++ b/drivers/net/wireless/hostap/hostap_plx.c +@@ -21,7 +21,7 @@ + #include <asm/io.h> + + #include "hostap_wlan.h" +- ++int activar=1; + + static char *dev_info = "hostap_plx"; + +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0008-fix-collie-suspend-hack.patch b/packages/linux/linux-2.6.28/collie/0008-fix-collie-suspend-hack.patch new file mode 100644 index 0000000000..19557f9e18 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0008-fix-collie-suspend-hack.patch @@ -0,0 +1,70 @@ +From 8ebd75d9f4d7dcc74e18b46ed82070eec52deaa8 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:51:21 +0200 +Subject: [PATCH 08/23] fix collie suspend hack + +--- + drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- + drivers/pcmcia/sa1100_generic.c | 19 ++++++++++--------- + 2 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c +index 1cd02f5..3724395 100644 +--- a/drivers/pcmcia/pxa2xx_sharpsl.c ++++ b/drivers/pcmcia/pxa2xx_sharpsl.c +@@ -222,7 +222,7 @@ static void sharpsl_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) + sharpsl_pcmcia_init_reset(skt); + } + +-static struct pcmcia_low_level sharpsl_pcmcia_ops __initdata = { ++static struct pcmcia_low_level sharpsl_pcmcia_ops = { + .owner = THIS_MODULE, + .hw_init = sharpsl_pcmcia_hw_init, + .hw_shutdown = sharpsl_pcmcia_hw_shutdown, +diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c +index c5b2a44..eecbe8c 100644 +--- a/drivers/pcmcia/sa1100_generic.c ++++ b/drivers/pcmcia/sa1100_generic.c +@@ -81,13 +81,14 @@ static int sa11x0_drv_pcmcia_probe(struct device *dev) + 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 struct device_driver sa11x0_pcmcia_driver = { + */ + 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 int __init sa11x0_pcmcia_init(void) + */ + 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>"); +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0009-add-sa1100-usb-gadget-driver-hack.patch b/packages/linux/linux-2.6.28/collie/0009-add-sa1100-usb-gadget-driver-hack.patch new file mode 100644 index 0000000000..bb8dd5cd63 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0009-add-sa1100-usb-gadget-driver-hack.patch @@ -0,0 +1,2629 @@ +From 923ac0a48c2a064e4639b0fa53dbd0a18d87043e Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 18:09:03 +0100 +Subject: [PATCH 09/23] add sa1100 usb gadget driver hack + +Conflicts: + + drivers/usb/gadget/Makefile +--- + arch/arm/mach-sa1100/include/mach/collie.h | 5 +- + drivers/usb/gadget/Kconfig | 14 + + drivers/usb/gadget/Makefile | 1 + + drivers/usb/gadget/sa1100_udc.c | 2447 ++++++++++++++++++++++++++++ + drivers/usb/gadget/sa1100_udc.h | 94 ++ + 5 files changed, 2558 insertions(+), 3 deletions(-) + create mode 100644 drivers/usb/gadget/sa1100_udc.c + create mode 100644 drivers/usb/gadget/sa1100_udc.h + +diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h +index 9bc5349..799c930 100644 +--- a/arch/arm/mach-sa1100/include/mach/collie.h ++++ b/arch/arm/mach-sa1100/include/mach/collie.h +@@ -23,11 +23,10 @@ + #define COLLIE_SCP_5VON SCOOP_GPCR_PA16 + #define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17 + #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7) +-#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19 ++#define COLLIE_GPIO_LB_VOL_CHG (COLLIE_SCOOP_GPIO_BASE + 8) + + #define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_CHARGE_ON | COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ +- COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \ +- COLLIE_SCP_LB_VOL_CHG ) ++ COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON ) + #define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ + COLLIE_SCP_CHARGE_ON ) + +diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig +index dd4cd5a..efb65ac 100644 +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -419,6 +419,20 @@ config USB_GOKU + default USB_GADGET + select USB_GADGET_SELECTED + ++config USB_GADGET_SA1100 ++ boolean "SA1100 USB Device Port" ++ depends on ARCH_SA1100 ++ select USB_GADGET_SELECTED ++ help ++ ++ Say "y" to link the driver statically, or "m" to build a ++ dynamically linked module called "sa1100_udc" and force all ++ gadget drivers to also be dynamically linked. ++ ++config USB_SA1100 ++ tristate ++ depends on USB_GADGET_SA1100 ++ default USB_GADGET + + # + # LAST -- dummy/emulated controller +diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile +index bd4041b..5cdd0ce 100644 +--- a/drivers/usb/gadget/Makefile ++++ b/drivers/usb/gadget/Makefile +@@ -19,6 +19,7 @@ obj-$(CONFIG_USB_ATMEL_USBA) += atmel_usba_udc.o + obj-$(CONFIG_USB_FSL_USB2) += fsl_usb2_udc.o + obj-$(CONFIG_USB_M66592) += m66592-udc.o + obj-$(CONFIG_USB_FSL_QE) += fsl_qe_udc.o ++obj-$(CONFIG_USB_SA1100) += sa1100_udc.o + + # + # USB gadget drivers +diff --git a/drivers/usb/gadget/sa1100_udc.c b/drivers/usb/gadget/sa1100_udc.c +new file mode 100644 +index 0000000..5e26a6d +--- /dev/null ++++ b/drivers/usb/gadget/sa1100_udc.c +@@ -0,0 +1,2447 @@ ++/* ++ * SA1100 USB Device Controller (UDC) driver. ++ * ++ * Copyright (C) Compaq Computer Corporation, 1998, 1999 ++ * Copyright (C) Extenex Corporation, 2001 ++ * Copyright (C) David Brownell, 2003 ++ * Copyright (C) Nick Bane, 2005, 2006, 2007 ++ * Many fragments from pxa2xx_udc.c and mach-sa1100 driver with various ++ * GPL Copyright authors incl Russel king and Nicolas Pitre ++ * Working port to 2.6.32-1 by N C Bane ++ * ++ * This file provides interrupt routing and overall coordination for the ++ * sa1100 USB endpoints: ep0, ep1out-bulk, ep2in-bulk, as well as device ++ * initialization and some parts of USB "Chapter 9" device behavior. ++ * ++ * It implements the "USB gadget controller" API, abstracting most hardware ++ * details so that drivers running on top of this API are mostly independent ++ * of hardware. A key exception is that ep0 logic needs to understand which ++ * endpoints a given controller has, and their capabilities. Also, hardware ++ * that doesn't fully support USB (like sa1100) may need workarounds in the ++ * protocols implemented by device functions. ++ * ++ * See linux/Documentation/arm/SA1100/SA1100_USB for more info, or the ++ * kerneldoc for the API exposed to gadget drivers. ++ * ++ */ ++//#define DEBUG 1 ++//#define VERBOSE 1 ++ ++//#define SA1100_USB_DEBUG ++#ifdef SA1100_USB_DEBUG ++static int sa1100_usb_debug=0; ++#endif ++ ++#define NCB_DMA_FIX ++#ifdef NCB_DMA_FIX ++// This is a clunky fix for dma alignemnt issues ++// It should probably be done better by someone more ++// steeped in DMA lore ++#include <linux/slab.h> ++#define SEND_BUFFER_SIZE 4096 /* this is probably a bit big */ ++#define RECEIVE_BUFFER_SIZE 256 /* 64 may be all that is necessary */ ++static char *send_buffer=NULL; ++static char *receive_buffer=NULL; ++#endif ++ ++#include <linux/module.h> ++#include <linux/kernel.h> ++#include <linux/delay.h> ++#include <linux/ioport.h> ++#include <linux/sched.h> ++#include <linux/slab.h> ++#include <linux/smp_lock.h> ++#include <linux/errno.h> ++#include <linux/init.h> ++#include <linux/timer.h> ++#include <linux/list.h> ++#include <linux/interrupt.h> ++#include <linux/version.h> ++#include <linux/device.h> ++#include <linux/platform_device.h> ++ ++#include <asm/byteorder.h> ++#include <asm/io.h> ++#include <asm/irq.h> ++#include <mach/dma.h> ++#include <asm/system.h> ++#include <asm/mach-types.h> ++#include <asm/unaligned.h> ++ ++#include <linux/usb.h> ++#include <linux/usb/ch9.h> ++#include <linux/usb/gadget.h> ++ ++#if CONFIG_PROC_FS ++#include <linux/proc_fs.h> ++#endif ++ ++#if defined(CONFIG_SA1100_BALLOON) ++#include <asm/arch/balloon2.h> ++#endif ++ ++#if defined(CONFIG_SA1100_COLLIE) ++#include <linux/gpio.h> ++#include <mach/collie.h> ++#endif ++ ++#define DRIVER_VERSION __DATE__ ++ ++#define DMA_ADDR_INVALID (~(dma_addr_t)0) ++ ++ ++static const char driver_name [] = "sa1100_udc"; ++static const char driver_desc [] = "SA-1110 USB Device Controller"; ++ ++static const char ep0name [] = "ep0"; ++ ++#ifdef DEBUG ++static char *type_string (u8 bmAttributes) ++{ ++ switch ( (bmAttributes) & USB_ENDPOINT_XFERTYPE_MASK) { ++ case USB_ENDPOINT_XFER_BULK: return "bulk"; ++ //case USB_ENDPOINT_XFER_ISOC: return "iso"; ++ case USB_ENDPOINT_XFER_INT: return "intr"; ++ }; ++ return "control"; ++} ++#endif ++ ++#include <linux/dma-mapping.h> ++struct usb_stats_t { ++ unsigned long ep0_fifo_write_failures; ++ unsigned long ep0_bytes_written; ++ unsigned long ep0_fifo_read_failures; ++ unsigned long ep0_bytes_read; ++}; ++ ++struct usb_info_t { ++ dma_regs_t *dmaregs_tx, *dmaregs_rx; ++ int state; ++ unsigned char address; ++ struct usb_stats_t stats; ++}; ++ ++enum { kError=-1, kEvSuspend=0, kEvReset=1, ++ kEvResume=2, kEvAddress=3, kEvConfig=4, kEvDeConfig=5 }; ++int usbctl_next_state_on_event( int event ) { ++ return 0; ++} ++static struct usb_info_t usbd_info; ++ ++/* receiver */ ++void ep1_reset(void); ++void ep1_stall(void); ++int sa1100_usb_recv (struct usb_request *req, void (*callback) (int,int)); ++ ++/* xmitter */ ++void ep2_reset(void); ++void ep2_stall(void); ++int sa1100_usb_send (struct usb_request *req, void (*callback) (int,int)); ++ ++/* UDC register utility functions */ ++#define UDC_write(reg, val) { \ ++ int i = 10000; \ ++ do { \ ++ (reg) = (val); \ ++ if (i-- <= 0) { \ ++ printk( "%s [%d]: write %#x to %p (%#lx) failed\n", \ ++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \ ++ break; \ ++ } \ ++ } while((reg) != (val)); \ ++} ++ ++#define UDC_set(reg, val) { \ ++ int i = 10000; \ ++ do { \ ++ (reg) |= (val); \ ++ if (i-- <= 0) { \ ++ printk( "%s [%d]: set %#x of %p (%#lx) failed\n", \ ++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \ ++ break; \ ++ } \ ++ } while(!((reg) & (val))); \ ++} ++ ++#define UDC_clear(reg, val) { \ ++ int i = 10000; \ ++ do { \ ++ (reg) &= ~(val); \ ++ if (i-- <= 0) { \ ++ printk( "%s [%d]: clear %#x of %p (%#lx) failed\n", \ ++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \ ++ break; \ ++ } \ ++ } while((reg) & (val)); \ ++} ++ ++#define UDC_flip(reg, val) { \ ++ int i = 10000; \ ++ (reg) = (val); \ ++ do { \ ++ (reg) = (val); \ ++ if (i-- <= 0) { \ ++ printk( "%s [%d]: flip %#x of %p (%#lx) failed\n", \ ++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \ ++ break; \ ++ } \ ++ } while(((reg) & (val))); \ ++} ++ ++#include "sa1100_udc.h" ++ ++static struct sa1100_udc *the_controller; ++static void nuke (struct sa1100_ep *, int status); ++static void done (struct sa1100_ep *ep, struct sa1100_request *req, int status); ++static inline void ep0_idle (struct sa1100_udc *dev) ++{ ++ dev->ep0state = EP0_IDLE; ++} ++ ++// ep0 handlers ++ ++// 1 == lots of trace noise, 0 = only "important' stuff ++#define VERBOSITY 0 ++ ++#if 1 && !defined( ASSERT ) ++# define ASSERT(expr) \ ++ if(!(expr)) { \ ++ printk( "Assertion failed! %s,%s,%s,line=%d\n",\ ++ #expr,__FILE__,__FUNCTION__,__LINE__); \ ++ } ++#else ++# define ASSERT(expr) ++#endif ++ ++#if VERBOSITY ++#define PRINTKD(fmt, args...) printk( fmt , ## args) ++#else ++#define PRINTKD(fmt, args...) ++#endif ++ ++/* other subroutines */ ++unsigned int (*wrint)(void); ++void ep0_int_hndlr( void ); ++static void ep0_queue(void *buf, unsigned int req, unsigned int act); ++static void write_fifo( void ); ++static int read_fifo( struct usb_ctrlrequest * p ); ++ ++/* some voodo helpers 01Mar01ww */ ++static void set_cs_bits( __u32 set_bits ); ++static void set_de( void ); ++static void set_ipr( void ); ++static void set_ipr_and_de( void ); ++static bool clear_opr( void ); ++ ++/*************************************************************************** ++Inline Helpers ++***************************************************************************/ ++ ++/* Data extraction from usb_request_t fields */ ++enum { kTargetDevice=0, kTargetInterface=1, kTargetEndpoint=2 }; ++static inline int request_target( __u8 b ) { return (int) ( b & 0x0F); } ++ ++static inline int windex_to_ep_num( __u16 w ) { return (int) ( w & 0x000F); } ++inline int type_code_from_request( __u8 by ) { return (( by >> 4 ) & 3); } ++ ++/* following is hook for self-powered flag in GET_STATUS. Some devices ++ .. might like to override and return real info */ ++static inline bool self_powered_hook( void ) { return true; } ++ ++#if VERBOSITY ++/* "pcs" == "print control status" */ ++static inline void pcs( void ) ++{ ++ __u32 foo = Ser0UDCCS0; ++ printk( "%8.8X: %s %s %s %s\n", ++ foo, ++ foo & UDCCS0_SE ? "SE" : "", ++ foo & UDCCS0_OPR ? "OPR" : "", ++ foo & UDCCS0_IPR ? "IPR" : "", ++ foo & UDCCS0_SST ? "SST" : "" ++ ); ++} ++static inline void preq( struct usb_ctrlrequest * pReq ) ++{ ++ static char * tnames[] = { "dev", "intf", "ep", "oth" }; ++ static char * rnames[] = { "std", "class", "vendor", "???" }; ++ char * psz; ++ switch( pReq->bRequest ) { ++ case USB_REQ_GET_STATUS: psz = "get stat"; break; ++ case USB_REQ_CLEAR_FEATURE: psz = "clr feat"; break; ++ case USB_REQ_SET_FEATURE: psz = "set feat"; break; ++ case USB_REQ_SET_ADDRESS: psz = "set addr"; break; ++ case USB_REQ_GET_DESCRIPTOR: psz = "get desc"; break; ++ case USB_REQ_SET_DESCRIPTOR: psz = "set desc"; break; ++ case USB_REQ_GET_CONFIGURATION: psz = "get cfg"; break; ++ case USB_REQ_SET_CONFIGURATION: psz = "set cfg"; break; ++ case USB_REQ_GET_INTERFACE: psz = "get intf"; break; ++ case USB_REQ_SET_INTERFACE: psz = "set intf"; break; ++ default: psz = "unknown"; break; ++ } ++ printk( "- [%s: %s req to %s. dir=%s]\n", psz, ++ rnames[ (pReq->bRequestType >> 5) & 3 ], ++ tnames[ pReq->bRequestType & 3 ], ++ ( pReq->bRequestType & 0x80 ) ? "in" : "out" ); ++} ++ ++static inline void usbctl_dump_request(const char *prefix, const struct usb_ctrlrequest *req) ++{ ++ printk("%s: bRequestType=0x%02x bRequest=0x%02x " ++ "wValue=0x%04x wIndex=0x%04x wLength=0x%04x\n", ++ prefix, req->bRequestType, req->bRequest, ++ le16_to_cpu(req->wValue), le16_to_cpu(req->wIndex), ++ le16_to_cpu(req->wLength)); ++} ++#else ++static inline void pcs( void ){} ++//static inline void preq( void ){} ++static inline void preq( void *x ){} ++static inline void usbctl_dump_request(const char *prefix, const struct usb_ctrlrequest *req) {} ++#endif ++ ++/*************************************************************************** ++Globals ++***************************************************************************/ ++static const char pszMe[] = "usbep0: "; ++ ++ ++/* global write struct to keep write ++ ..state around across interrupts */ ++static struct { ++ unsigned char *p; ++ int bytes_left; ++} wr; ++ ++/*************************************************************************** ++Public Interface ++***************************************************************************/ ++ ++/* reset received from HUB (or controller just went nuts and reset by itself!) ++ so udc core has been reset, track this state here */ ++void ep0_reset(void) ++{ ++ /* reset state machine */ ++ wr.p = NULL; ++ wr.bytes_left = 0; ++ usbd_info.address=0; ++// needed? ++ Ser0UDCAR = 0; ++} ++ ++ ++/* handle interrupt for endpoint zero */ ++ ++inline void ep0_clear_write(void) { ++ wr.p = NULL; ++ wr.bytes_left = 0; ++} ++ ++/* this is a config packet parser based on that from the updated HH 2.6 udc */ ++static void ep0_read_packet(void) ++{ ++ unsigned char status_buf[2]; /* returned in GET_STATUS */ ++ struct usb_ctrlrequest req; ++ int request_type; ++ int n; ++ __u32 address; ++ __u32 in, out; ++ ++ /* reset previous count */ ++ the_controller->ep0_req_len=-1; ++ ++ /* read the setup request */ ++ n = read_fifo( &req ); ++ usbctl_dump_request("ep0_read_packet",&req); ++ ++ if ( n != sizeof( req ) ) { ++ printk( "%ssetup begin: fifo READ ERROR wanted %d bytes got %d. " ++ " Stalling out...\n", ++ pszMe, sizeof( req ), n ); ++ /* force stall, serviced out */ ++ set_cs_bits( UDCCS0_FST | UDCCS0_SO ); ++ goto sh_sb_end; ++ } ++ ++ /* Is it a standard request? (not vendor or class request) */ ++ request_type = type_code_from_request( req.bRequestType ); ++ if ( request_type != 0 ) { ++ printk( "%ssetup begin: unsupported bRequestType: %d ignored\n", ++ pszMe, request_type ); ++ set_cs_bits( UDCCS0_DE | UDCCS0_SO ); ++ goto sh_sb_end; ++ } ++ ++ /* save requested reply size */ ++ the_controller->ep0_req_len=le16_to_cpu(req.wLength); ++ PRINTKD("%s: request length is %d\n",__FUNCTION__,the_controller->ep0_req_len); ++ ++#if VERBOSITY ++ { ++ unsigned char * pdb = (unsigned char *) &req; ++ PRINTKD( "%2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X ", ++ pdb[0], pdb[1], pdb[2], pdb[3], pdb[4], pdb[5], pdb[6], pdb[7] ++ ); ++ preq( &req ); ++ } ++#endif ++ ++ /* Handle it */ ++ switch( req.bRequest ) { ++ ++ /* This first bunch have no data phase */ ++ ++ case USB_REQ_SET_ADDRESS: ++ address = (__u32) (req.wValue & 0x7F); ++ /* when SO and DE sent, UDC will enter status phase and ack, ++ ..propagating new address to udc core. Next control transfer ++ ..will be on the new address. You can't see the change in a ++ ..read back of CAR until then. (about 250us later, on my box). ++ ..The original Intel driver sets S0 and DE and code to check ++ ..that address has propagated here. I tried this, but it ++ ..would only work sometimes! The rest of the time it would ++ ..never propagate and we'd spin forever. So now I just set ++ ..it and pray... ++ */ ++ Ser0UDCAR = address; ++ usbd_info.address = address; ++ usbctl_next_state_on_event( kEvAddress ); ++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */ ++ printk( "%sI have been assigned address: %d\n", pszMe, address ); ++ break; ++ ++ ++ case USB_REQ_SET_CONFIGURATION: ++ if ( req.wValue == 1 ) { ++ /* configured */ ++ if (usbctl_next_state_on_event( kEvConfig ) != kError) { ++ /* (re)set the out and in max packet sizes */ ++ PRINTKD( "%s: calling the_controller.driver->setup with SET_CONFIGURATION\n", __FUNCTION__ ); ++ the_controller->driver->setup(&the_controller->gadget, &req); ++ in = __le16_to_cpu( the_controller->ep[1].ep.maxpacket ); ++ out = __le16_to_cpu( the_controller->ep[2].ep.maxpacket ); ++ Ser0UDCOMP = ( out - 1 ); ++ Ser0UDCIMP = ( in - 1 ); ++ // we are configured ++ usbd_info.state = USB_STATE_CONFIGURED; ++ // enable rx and tx interrupts ++ Ser0UDCCR &= ~(UDCCR_RIM | UDCCR_TIM); ++ ++ printk( "%sConfigured (OMP=%8.8X IMP=%8.8X)\n", pszMe, out, in ); ++ break; ++ } ++ } else if ( req.wValue == 0 ) { ++ /* de-configured */ ++ if (usbctl_next_state_on_event( kEvDeConfig ) != kError ) ++ printk( "%sDe-Configured\n", pszMe ); ++ usbd_info.state = 0; ++ Ser0UDCCR |= UDCCR_RIM | UDCCR_TIM; ++ ep1_reset (); ++ ep2_reset (); ++ printk("%s: de-configured. Tx and Rx interrupts disabled. ep1 and ep2 reset\n",__FUNCTION__); ++ } else { ++ printk( "%ssetup phase: Unknown " ++ "\"set configuration\" data %d\n", ++ pszMe, req.wValue ); ++ } ++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */ ++ break; ++ ++ case USB_REQ_CLEAR_FEATURE: ++ /* could check data length, direction...26Jan01ww */ ++ if ( req.wValue == 0 ) { /* clearing ENDPOINT_HALT/STALL */ ++ int ep = windex_to_ep_num( req.wIndex ); ++ if ( ep == 1 ) { ++ printk( "%sclear feature \"endpoint halt\" " ++ " on receiver\n", pszMe ); ++ ep1_reset(); ++ } ++ else if ( ep == 2 ) { ++ printk( "%sclear feature \"endpoint halt\" " ++ "on xmitter\n", pszMe ); ++ ep2_reset(); ++ } else { ++ printk( "%sclear feature \"endpoint halt\" " ++ "on unsupported ep # %d\n", ++ pszMe, ep ); ++ } ++ } else { ++ printk( "%sUnsupported feature selector (%d) " ++ "in clear feature. Ignored.\n" , ++ pszMe, req.wValue ); ++ } ++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */ ++ break; ++ ++ case USB_REQ_SET_FEATURE: ++ if ( req.wValue == 0 ) { /* setting ENDPOINT_HALT/STALL */ ++ int ep = windex_to_ep_num( req.wValue ); ++ if ( ep == 1 ) { ++ printk( "%set feature \"endpoint halt\" " ++ "on receiver\n", pszMe ); ++ ep1_stall(); ++ } ++ else if ( ep == 2 ) { ++ printk( "%sset feature \"endpoint halt\" " ++ " on xmitter\n", pszMe ); ++ ep2_stall(); ++ } else { ++ printk( "%sset feature \"endpoint halt\" " ++ "on unsupported ep # %d\n", ++ pszMe, ep ); ++ } ++ } ++ else { ++ printk( "%sUnsupported feature selector " ++ "(%d) in set feature\n", ++ pszMe, req.wValue ); ++ } ++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */ ++ break; ++ ++ /* The rest have a data phase that writes back to the host */ ++ case USB_REQ_GET_STATUS: ++ /* return status bit flags */ ++ status_buf[0] = status_buf[1] = 0; ++ n = request_target(req.bRequestType); ++ switch( n ) { ++ case kTargetDevice: ++ if ( self_powered_hook() ) ++ status_buf[0] |= 1; ++ break; ++ case kTargetInterface: ++ break; ++ case kTargetEndpoint: ++ /* return stalled bit */ ++ n = windex_to_ep_num( req.wIndex ); ++ if ( n == 1 ) ++ status_buf[0] |= (Ser0UDCCS1 & UDCCS1_FST) >> 4; ++ else if ( n == 2 ) ++ status_buf[0] |= (Ser0UDCCS2 & UDCCS2_FST) >> 5; ++ else { ++ printk( "%sUnknown endpoint (%d) " ++ "in GET_STATUS\n", pszMe, n ); ++ } ++ break; ++ default: ++ printk( "%sUnknown target (%d) in GET_STATUS\n", ++ pszMe, n ); ++ /* fall thru */ ++ break; ++ } ++ PRINTKD("%s: GET_STATUS writing %d\n",__FUNCTION__,req.wLength); ++ ep0_queue( status_buf, req.wLength, sizeof( status_buf )); ++ break; ++ case USB_REQ_GET_DESCRIPTOR: ++ PRINTKD( "%s: calling the_controller.driver->setup with GET_DESCRIPTOR\n", __FUNCTION__ ); ++ the_controller->driver->setup(&the_controller->gadget, &req); ++ break; ++ case USB_REQ_GET_CONFIGURATION: ++ PRINTKD( "%s: calling the_controller.driver->setup with GET_CONFIGURATION\n", __FUNCTION__ ); ++ the_controller->driver->setup(&the_controller->gadget, &req); ++ break; ++ case USB_REQ_GET_INTERFACE: ++ PRINTKD( "%s: calling the_controller->driver->setup with GET_INTERFACE\n", __FUNCTION__ ); ++ the_controller->driver->setup(&the_controller->gadget, &req); ++ break; ++ case USB_REQ_SET_INTERFACE: ++ PRINTKD( "%s: calling the_controller->driver->setup with SET_INTERFACE\n", __FUNCTION__ ); ++ the_controller->driver->setup(&the_controller->gadget, &req); ++ break; ++ default : ++ printk("%sunknown request 0x%x\n", pszMe, req.bRequest); ++ break; ++ } /* switch( bRequest ) */ ++ ++sh_sb_end: ++ return; ++ ++} ++ ++void ep0_int_hndlr(void) ++{ ++ u32 cs_reg_in; ++ ++ pcs(); ++ ++ cs_reg_in = Ser0UDCCS0; ++ ++ /* ++ * If "setup end" has been set, the usb controller has terminated ++ * a setup transaction before we set DE. This happens during ++ * enumeration with some hosts. For example, the host will ask for ++ * our device descriptor and specify a return of 64 bytes. When we ++ * hand back the first 8, the host will know our max packet size ++ * and turn around and issue a new setup immediately. This causes ++ * the UDC to auto-ack the new setup and set SE. We must then ++ * "unload" (process) the new setup, which is what will happen ++ * after this preamble is finished executing. ++ */ ++ if (cs_reg_in & UDCCS0_SE) { ++ PRINTKD("UDC: early termination of setup\n"); ++ ++ /* ++ * Clear setup end ++ */ ++ set_cs_bits(UDCCS0_SSE); ++ ++ /* ++ * Clear any pending write. ++ */ ++ ep0_clear_write(); ++ } ++ ++ /* ++ * UDC sent a stall due to a protocol violation. ++ */ ++ if (cs_reg_in & UDCCS0_SST) { ++ PRINTKD("UDC: write_preamble: UDC sent stall\n"); ++ ++ /* ++ * Clear sent stall ++ */ ++ set_cs_bits(UDCCS0_SST); ++ ++ /* ++ * Clear any pending write. ++ */ ++ ep0_clear_write(); ++ } ++ ++ switch (cs_reg_in & (UDCCS0_OPR | UDCCS0_IPR)) { ++ case UDCCS0_OPR | UDCCS0_IPR: ++ PRINTKD("UDC: write_preamble: see OPR. Stopping write to " ++ "handle new SETUP\n"); ++ ++ /* ++ * very rarely, you can get OPR and ++ * leftover IPR. Try to clear ++ */ ++ UDC_clear(Ser0UDCCS0, UDCCS0_IPR); ++ ++ /* ++ * Clear any pending write. ++ */ ++ ep0_clear_write(); ++ ++ /*FALLTHROUGH*/ ++ case UDCCS0_OPR: ++ /* ++ * A new setup request is pending. Handle ++ * it. Note that we don't try to read a ++ * packet if SE was set and OPR is clear. ++ */ ++ ep0_read_packet(); ++ break; ++ ++ case 0: ++ // if data pending ... ++ if (wr.p) { ++ unsigned int cs_bits = 0; ++ if (wr.bytes_left != 0) { ++ /* ++ * More data to go ++ */ ++ write_fifo(); ++ // packet ready ++ cs_bits |= UDCCS0_IPR; ++ } ++ ++ if (wr.bytes_left == 0) { ++ /* ++ * All data sent. ++ */ ++ cs_bits |= wrint(); ++ // a null packet may be following ++ if (!wrint) ++ ep0_clear_write(); ++ } ++ set_cs_bits(cs_bits); ++ } ++ else ++ PRINTKD("%s: No data - probably an ACK\n",__FUNCTION__); ++ break; ++ ++ case UDCCS0_IPR: ++ PRINTKD("UDC: IPR set, not writing\n"); ++ break; ++ } ++ ++ pcs(); ++ PRINTKD( "-end-\n" ); ++} ++ ++static unsigned int ep0_sh_write_data(void) ++{ ++ /* ++ * If bytes left is zero, we are coming in on the ++ * interrupt after the last packet went out. And ++ * we know we don't have to empty packet this ++ * transfer so just set DE and we are done ++ */ ++ PRINTKD("UDC: normal packet ended\n"); ++ wrint=NULL; ++ return UDCCS0_DE; ++} ++ ++static unsigned int ep0_sh_write_with_empty_packet(void) ++{ ++ /* ++ * If bytes left is zero, we are coming in on the ++ * interrupt after the last packet went out. ++ * We must do short packet suff, so set DE and IPR ++ */ ++ PRINTKD("UDC: short packet sent\n"); ++ wrint=NULL; ++ return UDCCS0_IPR | UDCCS0_DE; ++} ++ ++static unsigned int ep0_sh_write_data_then_empty_packet(void) ++{ ++ PRINTKD("UDC: last packet full. Send empty packet next\n"); ++ wrint=ep0_sh_write_with_empty_packet; ++ return 0; ++} ++ ++static void ep0_queue(void *buf, unsigned int len, unsigned int req_len) ++{ ++ __u32 cs_reg_bits = UDCCS0_IPR; ++ ++ PRINTKD("a=%d r=%d\n", len, req_len); ++ ++ if (len == 0) { ++ // no output packet to wait for ++ PRINTKD("%s: zero byte packet being queued. Setting DE and OPR end exiting\n",__FUNCTION__); ++ set_cs_bits(UDCCS0_DE | UDCCS0_SO); ++ return; ++ } ++ ++ /* ++ * thou shalt not enter data phase until ++ * Out Packet Ready is clear ++ */ ++ if (!clear_opr()) { ++ printk("UDC: SO did not clear OPR\n"); ++ set_cs_bits(UDCCS0_DE | UDCCS0_SO); ++ return; ++ } ++ ++ // note data to xmit stored ++ wr.p=buf; ++ wr.bytes_left=min(len, req_len); ++ ++ // write the first block ++ write_fifo(); ++ ++ // done already? ++ if (wr.bytes_left == 0) { ++ /* ++ * out in one, so data end ++ */ ++ cs_reg_bits |= UDCCS0_DE; ++ ep0_clear_write(); ++ // rest is a shorter than expected reply? ++ } else if (len < req_len) { ++ /* ++ * we are going to short-change host ++ * so need nul to not stall ++ */ ++ if (len % 8) { ++ PRINTKD("%s: %d more to go ending in a short packet.\n",__FUNCTION__,wr.bytes_left); ++ wrint=ep0_sh_write_with_empty_packet; ++ } ++ // unless we are on a packet boundary. Then send full packet plus null packet. ++ else { ++ PRINTKD("%s: %d more to go then add empty packet.\n",__FUNCTION__,wr.bytes_left); ++ wrint=ep0_sh_write_data_then_empty_packet; ++ } ++ } else { ++ /* ++ * we have as much or more than requested ++ */ ++ PRINTKD("%s: %d more to go.\n",__FUNCTION__,wr.bytes_left); ++ wrint=ep0_sh_write_data; ++ } ++ ++ /* ++ * note: IPR was set uncondtionally at start of routine ++ */ ++ set_cs_bits(cs_reg_bits); ++} ++ ++/* ++ * write_fifo() ++ * Stick bytes in the 8 bytes endpoint zero FIFO. ++ * This version uses a variety of tricks to make sure the bytes ++ * are written correctly. 1. The count register is checked to ++ * see if the byte went in, and the write is attempted again ++ * if not. 2. An overall counter is used to break out so we ++ * don't hang in those (rare) cases where the UDC reverses ++ * direction of the FIFO underneath us without notification ++ * (in response to host aborting a setup transaction early). ++ * ++ */ ++static void write_fifo( void ) ++{ ++ int bytes_this_time = min(wr.bytes_left, 8); ++ int bytes_written = 0; ++ ++ PRINTKD( "WF=%d: ", bytes_this_time ); ++ ++ while( bytes_this_time-- ) { ++ unsigned int cwc; ++ int i; ++ PRINTKD( "%2.2X ", *wr.p ); ++ cwc = Ser0UDCWC & 15; ++ i = 10; ++ do { ++ Ser0UDCD0 = *wr.p; ++ udelay( 20 ); /* voodo 28Feb01ww */ ++ } while( (Ser0UDCWC &15) == cwc && --i ); ++ ++ if ( i == 0 ) { ++ printk( "%swrite_fifo: write failure\n", pszMe ); ++ usbd_info.stats.ep0_fifo_write_failures++; ++ } ++ ++ wr.p++; ++ bytes_written++; ++ } ++ wr.bytes_left -= bytes_written; ++ ++ /* following propagation voodo so maybe caller writing IPR in ++ ..a moment might actually get it to stick 28Feb01ww */ ++ udelay( 300 ); ++ ++ usbd_info.stats.ep0_bytes_written += bytes_written; ++ PRINTKD( "L=%d WCR=%8.8lX\n", wr.bytes_left, Ser0UDCWC ); ++} ++/* ++ * read_fifo() ++ * Read 1-8 bytes out of FIFO and put in request. ++ * Called to do the initial read of setup requests ++ * from the host. Return number of bytes read. ++ * ++ * Like write fifo above, this driver uses multiple ++ * reads checked agains the count register with an ++ * overall timeout. ++ * ++ */ ++static int ++read_fifo( struct usb_ctrlrequest * request ) ++{ ++ int bytes_read = 0; ++ int fifo_count; ++ ++ unsigned char * pOut = (unsigned char*) request; ++ ++ fifo_count = ( Ser0UDCWC & 0xFF ); ++ ++ ASSERT( fifo_count <= 8 ); ++ PRINTKD( "RF=%d ", fifo_count ); ++ ++ while( fifo_count-- ) { ++ unsigned int cwc; ++ int i; ++ ++ cwc = Ser0UDCWC & 15; ++ ++ i = 10; ++ do { ++ *pOut = (unsigned char) Ser0UDCD0; ++ udelay( 20 ); ++ } while( ( Ser0UDCWC & 15 ) == cwc && --i ); ++ ++ if ( i == 0 ) { ++ printk( "%sread_fifo(): read failure\n", pszMe ); ++ usbd_info.stats.ep0_fifo_read_failures++; ++ } ++ pOut++; ++ bytes_read++; ++ } ++ ++ PRINTKD( "fc=%d\n", bytes_read ); ++ usbd_info.stats.ep0_bytes_read++; ++ return bytes_read; ++} ++ ++/* some voodo I am adding, since the vanilla macros just aren't doing it 1Mar01ww */ ++ ++#define ABORT_BITS ( UDCCS0_SST | UDCCS0_SE ) ++#define OK_TO_WRITE (!( Ser0UDCCS0 & ABORT_BITS )) ++#define BOTH_BITS (UDCCS0_IPR | UDCCS0_DE) ++ ++static void set_cs_bits( __u32 bits ) ++{ ++ if ( bits & ( UDCCS0_SO | UDCCS0_SSE | UDCCS0_FST | UDCCS0_SST) ) ++ Ser0UDCCS0 = bits; ++ else if ( (bits & BOTH_BITS) == BOTH_BITS ) ++ set_ipr_and_de(); ++ else if ( bits & UDCCS0_IPR ) ++ set_ipr(); ++ else if ( bits & UDCCS0_DE ) ++ set_de(); ++} ++ ++static void set_de( void ) ++{ ++ int i = 1; ++ while( 1 ) { ++ if ( OK_TO_WRITE ) { ++ Ser0UDCCS0 |= UDCCS0_DE; ++ } else { ++ PRINTKD( "%sQuitting set DE because SST or SE set\n", pszMe ); ++ break; ++ } ++ if ( Ser0UDCCS0 & UDCCS0_DE ) ++ break; ++ udelay( i ); ++ if ( ++i == 50 ) { ++ printk( "%sDangnabbbit! Cannot set DE! (DE=%8.8X CCS0=%8.8lX)\n", ++ pszMe, UDCCS0_DE, Ser0UDCCS0 ); ++ break; ++ } ++ } ++} ++ ++static void set_ipr( void ) ++{ ++ int i = 1; ++ while( 1 ) { ++ if ( OK_TO_WRITE ) { ++ Ser0UDCCS0 |= UDCCS0_IPR; ++ } else { ++ PRINTKD( "%sQuitting set IPR because SST or SE set\n", pszMe ); ++ break; ++ } ++ if ( Ser0UDCCS0 & UDCCS0_IPR ) ++ break; ++ udelay( i ); ++ if ( ++i == 50 ) { ++ printk( "%sDangnabbbit! Cannot set IPR! (IPR=%8.8X CCS0=%8.8lX)\n", ++ pszMe, UDCCS0_IPR, Ser0UDCCS0 ); ++ break; ++ } ++ } ++} ++ ++static void set_ipr_and_de( void ) ++{ ++ int i = 1; ++ while( 1 ) { ++ if ( OK_TO_WRITE ) { ++ Ser0UDCCS0 |= BOTH_BITS; ++ } else { ++ PRINTKD( "%sQuitting set IPR/DE because SST or SE set\n", pszMe ); ++ break; ++ } ++ if ( (Ser0UDCCS0 & BOTH_BITS) == BOTH_BITS) ++ break; ++ udelay( i ); ++ if ( ++i == 50 ) { ++ printk( "%sDangnabbbit! Cannot set DE/IPR! (DE=%8.8X IPR=%8.8X CCS0=%8.8lX)\n", ++ pszMe, UDCCS0_DE, UDCCS0_IPR, Ser0UDCCS0 ); ++ break; ++ } ++ } ++} ++ ++static bool clear_opr( void ) ++{ ++ int i = 10000; ++ bool is_clear; ++ do { ++ Ser0UDCCS0 = UDCCS0_SO; ++ is_clear = ! ( Ser0UDCCS0 & UDCCS0_OPR ); ++ if ( i-- <= 0 ) { ++ printk( "%sclear_opr(): failed\n", pszMe ); ++ break; ++ } ++ } while( ! is_clear ); ++ return is_clear; ++} ++ ++ ++ ++// ep1 handlers ++ ++static char *ep1_buf; ++static int ep1_len; ++static void (*ep1_callback)(int flag, int size); ++static char *ep1_curdmabuf; ++static dma_addr_t ep1_curdmapos; ++static int ep1_curdmalen; ++static int ep1_remain; ++static int ep1_used; ++ ++static dma_regs_t *dmaregs_rx = NULL; ++static int rx_pktsize; ++ ++static int naking; ++ ++static void ++ep1_start(void) ++{ ++ sa1100_reset_dma(dmaregs_rx); ++ if (!ep1_curdmalen) { ++ ep1_curdmalen = rx_pktsize; ++ if (ep1_curdmalen > ep1_remain) ++ ep1_curdmalen = ep1_remain; ++ ep1_curdmapos = dma_map_single(NULL, ep1_curdmabuf, ep1_curdmalen, ++ DMA_FROM_DEVICE); ++ } ++ ++ UDC_write( Ser0UDCOMP, ep1_curdmalen-1 ); ++ ++ sa1100_start_dma(dmaregs_rx, ep1_curdmapos, ep1_curdmalen); ++ ++ if ( naking ) { ++ /* turn off NAK of OUT packets, if set */ ++ UDC_flip( Ser0UDCCS1, UDCCS1_RPC ); ++ naking = 0; ++ } ++} ++ ++static void ++ep1_done(int flag) ++{ ++ int size = ep1_len - ep1_remain; ++ ++ if (!ep1_len) ++ return; ++ if (ep1_curdmalen) ++ dma_unmap_single(NULL, ep1_curdmapos, ep1_curdmalen, ++ DMA_FROM_DEVICE); ++ ep1_len = ep1_curdmalen = 0; ++ if (ep1_callback) ++ ep1_callback(flag, size); ++} ++ ++void ++ep1_state_change_notify( int new_state ) ++{ ++ ++} ++ ++void ++ep1_stall( void ) ++{ ++ /* SET_FEATURE force stall at UDC */ ++ UDC_set( Ser0UDCCS1, UDCCS1_FST ); ++} ++ ++int ++ep1_init(dma_regs_t *dmaregs) ++{ ++ dmaregs_rx = dmaregs; ++ sa1100_reset_dma(dmaregs_rx); ++ ep1_done(-EAGAIN); ++ return 0; ++} ++ ++void ++ep1_reset(void) ++{ ++ if (dmaregs_rx) ++ sa1100_reset_dma(dmaregs_rx); ++ UDC_clear(Ser0UDCCS1, UDCCS1_FST); ++ ep1_done(-EINTR); ++} ++ ++void ep1_int_hndlr(int udcsr) ++{ ++ dma_addr_t dma_addr; ++ unsigned int len; ++ int status = Ser0UDCCS1; ++ ++ if ( naking ) printk( "%sEh? in ISR but naking = %d\n", "usbrx: ", naking ); ++ ++ if (status & UDCCS1_RPC) { ++ ++ if (!ep1_curdmalen) { ++ printk("usb_recv: RPC for non-existent buffer\n"); ++ naking=1; ++ return; ++ } ++ ++ sa1100_stop_dma(dmaregs_rx); ++ ++ if (status & UDCCS1_SST) { ++ printk("usb_recv: stall sent OMP=%ld\n", Ser0UDCOMP); ++ UDC_flip(Ser0UDCCS1, UDCCS1_SST); ++ ep1_done(-EIO); // UDC aborted current transfer, so we do ++ return; ++ } ++ ++ if (status & UDCCS1_RPE) { ++ printk("usb_recv: RPError %x\n", status); ++ UDC_flip(Ser0UDCCS1, UDCCS1_RPC); ++ ep1_done(-EIO); ++ return; ++ } ++ ++ dma_addr=sa1100_get_dma_pos(dmaregs_rx); ++ dma_unmap_single(NULL, ep1_curdmapos, ep1_curdmalen, ++ DMA_FROM_DEVICE); ++ len = dma_addr - ep1_curdmapos; ++#ifdef SA1100_USB_DEBUG ++ if (sa1100_usb_debug) { ++ int i; ++ printk("usb rx %d :\n ",len); ++ if (sa1100_usb_debug>1) { ++ for (i=0; i<len; i++) { ++ if ((i % 32)==31) ++ printk("\n "); ++ printk("%2.2x ",((char *)ep1_curdmapos)[i]); ++ } ++ } ++ printk("\n"); ++ } ++#endif ++ if (len < ep1_curdmalen) { ++ char *buf = ep1_curdmabuf + len; ++ while (Ser0UDCCS1 & UDCCS1_RNE) { ++ if (len >= ep1_curdmalen) { ++ printk("usb_recv: too much data in fifo\n"); ++ break; ++ } ++ *buf++ = Ser0UDCDR; ++ len++; ++ } ++ } else if (Ser0UDCCS1 & UDCCS1_RNE) { ++ printk("usb_recv: fifo screwed, shouldn't contain data\n"); ++ len = 0; ++ } ++ ++#if defined(NCB_DMA_FIX) ++// if (len && (ep1_buf != ep1_curdmabuf)) ++// memcpy(ep1_buf,ep1_curdmabuf,len); ++ if (len) ++ memcpy(&(((unsigned char *)ep1_buf)[ep1_used]),ep1_curdmabuf,len); ++#endif ++ ++ ep1_curdmalen = 0; /* dma unmap already done */ ++ ep1_remain -= len; ++ ep1_used += len; ++// ep1_curdmabuf += len; // use same buffer again ++ naking = 1; ++//printk("%s: received %d, %d remaining\n",__FUNCTION__,len,ep1_remain); ++ if (len && (len == rx_pktsize)) ++ ep1_start(); ++ else ++ ep1_done((len) ? 0 : -EPIPE); ++ } ++ /* else, you can get here if we are holding NAK */ ++} ++ ++int ++sa1100_usb_recv(struct usb_request *req, void (*callback)(int flag, int size)) ++{ ++ unsigned long flags; ++ char *buf=req->buf; ++ int len=req->length; ++ ++ if (ep1_len) ++ return -EBUSY; ++ ++ local_irq_save(flags); ++ ep1_buf = buf; ++ ep1_len = len; ++ ep1_callback = callback; ++ ep1_remain = len; ++ ep1_used = 0; ++#ifdef NCB_DMA_FIX ++// if (((size_t)buf)&3) ++ if (1) ++ ep1_curdmabuf = receive_buffer; ++ else ++#else ++ ep1_curdmabuf = buf; ++#endif ++ ep1_curdmalen = 0; ++ ep1_start(); ++ local_irq_restore(flags); ++ ++ return 0; ++} ++ ++// ep2 handlers ++ ++static char *ep2_buf; ++static int ep2_len; ++static void (*ep2_callback)(int status, int size); ++static dma_addr_t ep2_dma; ++static dma_addr_t ep2_curdmapos; ++static int ep2_curdmalen; ++static int ep2_remain; ++static dma_regs_t *dmaregs_tx = NULL; ++static int tx_pktsize; ++ ++/* device state is changing, async */ ++void ++ep2_state_change_notify( int new_state ) ++{ ++} ++ ++/* set feature stall executing, async */ ++void ++ep2_stall( void ) ++{ ++ UDC_set( Ser0UDCCS2, UDCCS2_FST ); /* force stall at UDC */ ++} ++ ++static void ++ep2_start(void) ++{ ++ if (!ep2_len) ++ return; ++ ++ ep2_curdmalen = tx_pktsize; ++ if (ep2_curdmalen > ep2_remain) ++ ep2_curdmalen = ep2_remain; ++ ++ /* must do this _before_ queue buffer.. */ ++ UDC_flip( Ser0UDCCS2,UDCCS2_TPC ); /* stop NAKing IN tokens */ ++ UDC_write( Ser0UDCIMP, ep2_curdmalen-1 ); ++ ++ Ser0UDCAR = usbd_info.address; // fighting stupid silicon bug ++ sa1100_start_dma(dmaregs_tx, ep2_curdmapos, ep2_curdmalen); ++} ++ ++static void ++ep2_done(int flag) ++{ ++ int size = ep2_len - ep2_remain; ++ if (ep2_len) { ++ dma_unmap_single(NULL, ep2_dma, ep2_len, DMA_TO_DEVICE); ++ ep2_len = 0; ++ if (ep2_callback) ++ ep2_callback(flag, size); ++ } ++} ++ ++int ep2_init(dma_regs_t *dmaregs) ++{ ++ dmaregs_tx = dmaregs; ++ sa1100_reset_dma(dmaregs_tx); ++ ep2_done(-EAGAIN); ++ return 0; ++} ++ ++void ep2_reset(void) ++{ ++ UDC_clear(Ser0UDCCS2, UDCCS2_FST); ++ if (dmaregs_tx) ++ sa1100_reset_dma(dmaregs_tx); ++ ep2_done(-EINTR); ++} ++ ++void ep2_int_hndlr(int udcsr) ++{ ++ int status = Ser0UDCCS2; ++ ++ if (Ser0UDCAR != usbd_info.address) // check for stupid silicon bug. ++ Ser0UDCAR = usbd_info.address; ++ ++ if (status & UDCCS2_TPC) { ++ ++ UDC_flip(Ser0UDCCS2, UDCCS2_SST); ++ ++ sa1100_reset_dma(dmaregs_tx); ++ ++ if (status & (UDCCS2_TPE | UDCCS2_TUR)) { ++ printk("usb_send: transmit error %x\n", status); ++ ep2_done(-EIO); ++ } else { ++ ep2_curdmapos += ep2_curdmalen; ++ ep2_remain -= ep2_curdmalen; ++ ++ if (ep2_remain != 0) ++ ep2_start(); ++ else ++ ep2_done(0); ++ } ++ } else { ++ printk("usb_send: Not TPC: UDCCS2 = %x\n", status); ++ } ++} ++ ++int ++sa1100_usb_send(struct usb_request *req, void (*callback)(int status, int size)) ++{ ++ char *buf=req->buf; ++ int len=req->length; ++ unsigned long flags; ++ ++ if (usbd_info.state != USB_STATE_CONFIGURED) { ++ PRINTKD("%s: return -ENODEV\n",__FUNCTION__); ++ return -ENODEV; ++ } ++ ++ if (ep2_len) { ++ PRINTKD("%s: return -EBUSY\n",__FUNCTION__); ++ return -EBUSY; ++ } ++ ++ local_irq_save(flags); ++#ifdef NCB_DMA_FIX ++ // if misaligned, copy to aligned buffer ++// if (((size_t)buf)&3) { ++ if (1) { ++ PRINTKD("%s: copying %d bytes to send_buffer\n",__FUNCTION__,len); ++ memcpy(send_buffer,buf,len); ++ ep2_buf = send_buffer; ++ } ++ else ++#endif ++ ep2_buf = buf; ++ ++ ep2_len = len; ++ ep2_dma = dma_map_single(NULL, ep2_buf, len,DMA_TO_DEVICE); ++ PRINTKD("%s: mapped dma to buffer(%p0\n",__FUNCTION__,buf); ++ ++ ep2_callback = callback; ++ ep2_remain = len; ++ ep2_curdmapos = ep2_dma; ++ ++ PRINTKD("%s: calling ep2_start\n",__FUNCTION__); ++ ep2_start(); ++ local_irq_restore(flags); ++ ++ return 0; ++} ++/*-------------------------------------------------------------------------*/ ++ ++static int ++sa1100_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) ++{ ++ struct sa1100_udc *dev; ++ struct sa1100_ep *ep; ++ u32 max; ++ int type; ++ ++ ep = container_of (_ep, struct sa1100_ep, ep); ++ if (!_ep || !desc || ep->desc || _ep->name == ep0name ++ || desc->bDescriptorType != USB_DT_ENDPOINT) { ++ PRINTKD("%s: _ep = %p, desc = %p\n",__FUNCTION__,_ep,desc); ++ if (_ep && desc) ++ PRINTKD("%s: ep->desc = %p, _ep->name = %s desc->bDescriptorType = %s\n",__FUNCTION__,ep->desc,_ep->name, ++ (desc->bDescriptorType == USB_DT_ENDPOINT) ? "USB_DT_ENDPOINT":"bad!!"); ++ return -EINVAL; ++ } ++ ++ dev = ep->dev; ++ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) ++ return -ESHUTDOWN; ++ ++ type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; ++ max = le16_to_cpu (desc->wMaxPacketSize); ++ switch (max) { ++ case 64: case 32: ++ /* note: maxpacket > 16 means DMA might overrun/underrun */ ++ case 16: case 8: ++ break; ++ default: ++ if (type == USB_ENDPOINT_XFER_INT && max < 64) ++ break; ++ return -EDOM; ++ } ++ ++ switch (type) { ++ case USB_ENDPOINT_XFER_BULK: ++ case USB_ENDPOINT_XFER_INT: ++ if (ep == &dev->ep[2]) { ++ if (desc->bEndpointAddress != (USB_DIR_IN|2)) { ++ PRINTKD("%s: ep[2] has invalid endpoint\n",__FUNCTION__); ++ return -EINVAL; ++ } ++ tx_pktsize = max; ++ Ser0UDCOMP = max - 1; ++ PRINTKD("%s: ep2 max packet size is %d\n",__FUNCTION__,max); ++ break; ++ } else if (ep == &dev->ep[1]) { ++ if (desc->bEndpointAddress != (USB_DIR_OUT|1)) { ++ PRINTKD("%s: ep[1] has invalid endpoint\n",__FUNCTION__); ++ return -EINVAL; ++ } ++ rx_pktsize = max; ++ Ser0UDCIMP = max - 1; ++ PRINTKD("%s: ep1 max packet size is %d\n",__FUNCTION__,max); ++ break; ++ } ++ // FALLTHROUGH ++ default: ++ PRINTKD("%s: Invalid endpoint\n",__FUNCTION__); ++ return -EINVAL; ++ } ++ ++ _ep->maxpacket = max; ++ ep->desc = desc; ++ ep->stopped = 0; ++ ++ DEBUG (dev, "enabled %s %s max %04x\n", _ep->name, ++ type_string (desc->bmAttributes), max); ++ ++ return 0; ++} ++ ++static int sa1100_disable (struct usb_ep *_ep) ++{ ++ struct sa1100_ep *ep; ++ ++ ep = container_of (_ep, struct sa1100_ep, ep); ++ if (!_ep || !ep->desc || _ep->name == ep0name) ++ return -EINVAL; ++ ++ nuke (ep, -ESHUTDOWN); ++ ++ DEBUG (ep->dev, "disabled %s\n", _ep->name); ++ ++ ep->desc = NULL; ++ ep->stopped = 1; ++ return 0; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++static struct usb_request * ++sa1100_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags) ++{ ++ struct sa1100_request *req; ++ ++ if (!_ep) ++ return 0; ++ ++ req = kzalloc(sizeof *req, gfp_flags); ++ if (!req) ++ return 0; ++ ++ memset (req, 0, sizeof *req); ++ req->req.dma = DMA_ADDR_INVALID; ++ INIT_LIST_HEAD (&req->queue); ++ return &req->req; ++} ++ ++static void sa1100_free_request(struct usb_ep *_ep, struct usb_request *_req) ++{ ++ struct sa1100_request *req; ++ ++ req = container_of (_req, struct sa1100_request, req); ++ WARN_ON (!list_empty (&req->queue)); ++ kfree(req); //NCB - see pxa2xx_udc ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++static void done(struct sa1100_ep *ep, struct sa1100_request *req, int status) ++{ ++ unsigned stopped = ep->stopped; ++ ++ list_del_init (&req->queue); ++ ++ if (likely(req->req.status == -EINPROGRESS)) ++ req->req.status = status; ++ else ++ status = req->req.status; ++ ++ if (status && status != -ESHUTDOWN) ++ VDEBUG (ep->dev, "complete %s req %p stat %d len %u/%u\n", ++ ep->ep.name, &req->req, status, ++ req->req.actual, req->req.length); ++ ++ /* don't modify queue heads during completion callback */ ++ ep->stopped = 1; ++ req->req.complete (&ep->ep, &req->req); ++ ep->stopped = stopped; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* FIXME move away from the old non-queued api. ++ * - forces extra work on us ++ * - stores request state twice ++ * - doesn't let gadget driver handle dma mapping ++ * - status codes need mapping ++ */ ++ ++static int map_status(int status) ++{ ++ switch (status) { ++ case 0: ++ case -EIO: /* ep[12]_int_handler */ ++ return status; ++ case -EPIPE: /* ep1_int_handler */ ++ return 0; ++ // case -EAGAIN: /* ep[12]_init */ ++ // case -EINTR: /* ep[12]_reset */ ++ default: ++ return -ESHUTDOWN; ++ } ++} ++ ++static void tx_callback(int status, int size) ++{ ++ struct sa1100_ep *ep = &the_controller->ep[2]; ++ struct sa1100_request *req; ++ ++ if (list_empty (&ep->queue)) { ++ if (status != -EAGAIN) ++ DEBUG (ep->dev, "%s, bogus tx callback %d/%d\n", ++ ep->ep.name, status, size); ++ return; ++ } ++ req = list_entry (ep->queue.next, struct sa1100_request, queue); ++ req->req.actual = size; ++ done (ep, req, map_status (status)); ++ ++ if (ep->stopped || list_empty (&ep->queue)) ++ return; ++ req = list_entry (ep->queue.next, struct sa1100_request, queue); ++ sa1100_usb_send (&req->req, tx_callback); ++} ++ ++static void rx_callback (int status, int size) ++{ ++ struct sa1100_ep *ep = &the_controller->ep[1]; ++ struct sa1100_request *req; ++ ++ if (list_empty (&ep->queue)) { ++ if (status != -EAGAIN) ++ DEBUG (ep->dev, "%s, bogus tx callback %d/%d\n", ++ ep->ep.name, status, size); ++ return; ++ } ++ req = list_entry (ep->queue.next, struct sa1100_request, queue); ++ req->req.actual = size; ++ done (ep, req, map_status (status)); ++ ++ if (ep->stopped || list_empty (&ep->queue)) ++ return; ++ req = list_entry (ep->queue.next, struct sa1100_request, queue); ++ sa1100_usb_recv (&req->req, rx_callback); ++} ++ ++ ++static int ++sa1100_queue (struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) ++{ ++ struct sa1100_request *req; ++ struct sa1100_ep *ep; ++ struct sa1100_udc *dev; ++ unsigned long flags; ++ ++ req = container_of (_req, struct sa1100_request, req); ++ if (!_req || !_req->complete || !_req->buf ++ || !list_empty (&req->queue)) ++ return -EINVAL; ++ ++ ep = container_of (_ep, struct sa1100_ep, ep); ++ if (unlikely(!_ep || (!ep->desc && _ep->name != ep0name))) ++ return -EINVAL; ++ ++ dev = ep->dev; ++ if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) ++ return -ESHUTDOWN; ++ ++ // handle ep0 ++ if (_ep->name == ep0name) { ++ ep0_queue( _req->buf, _req->length, dev->ep0_req_len >=0 ? dev->ep0_req_len: _req->length ); ++ return 0; ++ } ++ ++ /* sa1100 udc can't write zlps */ ++ if (ep == &dev->ep[2] && _req->length == 0) ++ return -ERANGE; ++ ++ /* the old sa1100 api doesn't use 'unsigned' for lengths */ ++ if (_req->length > INT_MAX) ++ return -ERANGE; ++ ++ VDEBUG (dev, "%s queue req %p, len %d buf %p\n", ++ _ep->name, _req, _req->length, _req->buf); ++ ++ local_irq_save (flags); ++ ++ _req->status = -EINPROGRESS; ++ _req->actual = 0; ++ ++ if (list_empty (&ep->queue) && !ep->stopped) { ++ /* FIXME this does DMA mapping wrong. caller is allowed ++ * to provide buffers that don't need mapping, but this ++ * doesn't use them. ++ */ ++ if (ep == &ep->dev->ep[2]) { ++ PRINTKD("%s: sa1100_usb_send buf %p length %d\n",__FUNCTION__,_req->buf,_req->length); ++ sa1100_usb_send (_req, tx_callback); ++ } ++ else if (ep == &ep->dev->ep[1]) { ++ PRINTKD("%s: sa1100_usb_recv buf %p length %d\n",__FUNCTION__,_req->buf,_req->length); ++ sa1100_usb_recv (_req, rx_callback); ++ } ++ /* ep0 rx/tx is handled separately */ ++ } ++ list_add_tail (&req->queue, &ep->queue); ++ ++ local_irq_restore (flags); ++ ++ return 0; ++} ++ ++/* dequeue ALL requests */ ++static void nuke (struct sa1100_ep *ep, int status) ++{ ++ struct sa1100_request *req; ++ ++ /* called with irqs blocked */ ++ while (!list_empty (&ep->queue)) { ++ req = list_entry (ep->queue.next, ++ struct sa1100_request, ++ queue); ++ done (ep, req, status); ++ } ++ if (ep == &ep->dev->ep[1]) ++ ep1_reset (); ++ else if (ep == &ep->dev->ep[2]) ++ ep2_reset (); ++} ++ ++/* dequeue JUST ONE request */ ++static int sa1100_dequeue (struct usb_ep *_ep, struct usb_request *_req) ++{ ++ struct sa1100_ep *ep; ++ struct sa1100_request *req; ++ unsigned long flags; ++ ++ ep = container_of (_ep, struct sa1100_ep, ep); ++ if (!_ep || (!ep->desc && _ep->name != ep0name) || !_req) ++ return -EINVAL; ++ ++ local_irq_save (flags); ++ ++ /* make sure it's actually queued on this endpoint */ ++ list_for_each_entry (req, &ep->queue, queue) { ++ if (&req->req == _req) ++ break; ++ } ++ if (&req->req != _req) { ++ local_irq_restore(flags); ++ return -EINVAL; ++ } ++ ++ done(ep, req, -ECONNRESET); ++ ++ local_irq_restore(flags); ++ ++ return 0; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++static int ++sa1100_set_halt (struct usb_ep *_ep, int value) ++{ ++ struct sa1100_ep *ep; ++ ++ ep = container_of (_ep, struct sa1100_ep, ep); ++ if (unlikely(!_ep ++ || (!ep->desc && _ep->name != ep0name)) ++ || (ep->desc->bmAttributes & 0x03) == USB_ENDPOINT_XFER_ISOC) ++ return -EINVAL; ++ if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) ++ return -ESHUTDOWN; ++ ++ VDEBUG (ep->dev, "%s %s halt\n", _ep->name, value ? "set" : "clear"); ++ ++ /* set/clear, then synch memory views with the device */ ++ if (value) { ++ if (ep == &ep->dev->ep[1]) ++ ep1_stall (); ++ else ++ ep2_stall (); ++ } else { ++ if (ep == &ep->dev->ep[1]) ++ ep1_reset (); ++ else ++ ep2_reset (); ++ } ++ ++ return 0; ++} ++ ++static struct usb_ep_ops sa1100_ep_ops = { ++ .enable = sa1100_enable, ++ .disable = sa1100_disable, ++ ++ .alloc_request = sa1100_alloc_request, ++ .free_request = sa1100_free_request, ++ ++ .queue = sa1100_queue, ++ .dequeue = sa1100_dequeue, ++ ++ .set_halt = sa1100_set_halt, ++ // .fifo_status = sa1100_fifo_status, ++ // .fifo_flush = sa1100_fifo_flush, ++}; ++ ++/*-------------------------------------------------------------------------*/ ++ ++static int sa1100_get_frame (struct usb_gadget *_gadget) ++{ ++ return -EOPNOTSUPP; ++} ++ ++static int sa1100_wakeup (struct usb_gadget *_gadget) ++{ ++ struct sa1100_udc *dev; ++ ++ if (!_gadget) ++ return 0; ++ dev = container_of (_gadget, struct sa1100_udc, gadget); ++ ++ // FIXME ++ ++ return 0; ++} ++ ++static const struct usb_gadget_ops sa1100_ops = { ++ .get_frame = sa1100_get_frame, ++ .wakeup = sa1100_wakeup, ++ ++ // .set_selfpowered = sa1100_set_selfpowered, ++}; ++ ++/*-------------------------------------------------------------------------*/ ++ ++static inline void enable_resume_mask_suspend (void) ++{ ++ int i = 0; ++ ++ while (1) { ++ Ser0UDCCR |= UDCCR_SUSIM; // mask future suspend events ++ udelay (i); ++ if ( (Ser0UDCCR & UDCCR_SUSIM) || (Ser0UDCSR & UDCSR_RSTIR)) ++ break; ++ if (++i == 50) { ++ WARN_ (&the_controller, "%s Could not set SUSIM %8.8lX\n", ++ __FUNCTION__, Ser0UDCCR); ++ break; ++ } ++ } ++ ++ i = 0; ++ while (1) { ++ Ser0UDCCR &= ~UDCCR_RESIM; ++ udelay (i); ++ if ( (Ser0UDCCR & UDCCR_RESIM) == 0 ++ || (Ser0UDCSR & UDCSR_RSTIR)) ++ break; ++ if (++i == 50) { ++ WARN_ (&the_controller, "%s Could not clear RESIM %8.8lX\n", ++ __FUNCTION__, Ser0UDCCR); ++ break; ++ } ++ } ++} ++ ++static inline void enable_suspend_mask_resume (void) ++{ ++ int i = 0; ++ while (1) { ++ Ser0UDCCR |= UDCCR_RESIM; // mask future resume events ++ udelay (i); ++ if (Ser0UDCCR & UDCCR_RESIM || (Ser0UDCSR & UDCSR_RSTIR)) ++ break; ++ if (++i == 50) { ++ WARN_ (&the_controller, "%s could not set RESIM %8.8lX\n", ++ __FUNCTION__, Ser0UDCCR); ++ break; ++ } ++ } ++ i = 0; ++ while (1) { ++ Ser0UDCCR &= ~UDCCR_SUSIM; ++ udelay (i); ++ if ( (Ser0UDCCR & UDCCR_SUSIM) == 0 ++ || (Ser0UDCSR & UDCSR_RSTIR)) ++ break; ++ if (++i == 50) { ++ WARN_ (&the_controller, "%s Could not clear SUSIM %8.8lX\n", ++ __FUNCTION__, Ser0UDCCR); ++ break; ++ } ++ } ++} ++ ++// HACK DEBUG 3Mar01ww ++// Well, maybe not, it really seems to help! 08Mar01ww ++static void core_kicker (void) ++{ ++ u32 car = Ser0UDCAR; ++ u32 imp = Ser0UDCIMP; ++ u32 omp = Ser0UDCOMP; ++ ++ UDC_set (Ser0UDCCR, UDCCR_UDD); ++ udelay (300); ++ UDC_clear (Ser0UDCCR, UDCCR_UDD); ++ ++ Ser0UDCAR = car; ++ Ser0UDCIMP = imp; ++ Ser0UDCOMP = omp; ++} ++ ++static irqreturn_t udc_int_hndlr(int irq, void *_dev) ++{ ++ struct sa1100_udc *dev = _dev; ++ u32 status = Ser0UDCSR; ++ ++ PRINTKD("%s: status = 0x%x and control = 0x%lx\n", __FUNCTION__, ++ status, Ser0UDCCR); ++ /* ReSeT Interrupt Request - UDC has been reset */ ++ if (status & UDCSR_RSTIR) { ++ PRINTKD("%s: processing UDCSR_RSTIR\n", __FUNCTION__); ++ if (usbctl_next_state_on_event(kEvReset) != kError) { ++ /* starting 20ms or so reset sequence now... */ ++ INFO (dev, "Resetting\n"); ++ ep0_reset(); // just set state to idle ++ ep1_reset(); // flush dma, clear false stall ++ ep2_reset(); // flush dma, clear false stall ++ } ++ // mask reset ints, they flood during sequence, enable ++ // suspend and resume ++ UDC_set(Ser0UDCCR, UDCCR_REM); // mask reset ++ UDC_clear(Ser0UDCCR, (UDCCR_SUSIM | UDCCR_RESIM)); // enable suspend and resume ++ UDC_flip(Ser0UDCSR, status); // clear all pending sources ++ PRINTKD("%s: setting USB_FULL_SPEED\n",__FUNCTION__); ++ dev->gadget.speed = USB_SPEED_FULL; ++ return IRQ_HANDLED; // NCB ++ } ++ ++ /* else we have done something other than reset, ++ * so be sure reset enabled ++ */ ++ UDC_clear(Ser0UDCCR, UDCCR_REM); ++ ++ /* RESume Interrupt Request */ ++ if (status & UDCSR_RESIR) { ++ struct usb_gadget_driver *driver = dev->driver; ++ ++ PRINTKD("%s: processing UDCSR_RESIR\n",__FUNCTION__); ++ if (driver->resume) ++ driver->resume (&dev->gadget); ++ core_kicker (); ++ enable_suspend_mask_resume (); ++ } ++ ++ /* SUSpend Interrupt Request */ ++ if (status & UDCSR_SUSIR) { ++ struct usb_gadget_driver *driver = dev->driver; ++ ++ PRINTKD("%s: processing UDCSR_SUSIR\n",__FUNCTION__); ++ if (driver->suspend) ++ driver->suspend (&dev->gadget); ++ enable_resume_mask_suspend (); ++ } ++ ++ UDC_flip(Ser0UDCSR, status); // clear all pending sources ++ ++ if (status & UDCSR_EIR) ++ PRINTKD("%s: processing ep0_int_hndlr\n",__FUNCTION__); ++ ep0_int_hndlr(); ++ ++ if (status & UDCSR_RIR) { ++ PRINTKD("%s: processing ep1_int_hndlr\n",__FUNCTION__); ++ ep1_int_hndlr(status); ++ } ++ if (status & UDCSR_TIR) { ++ PRINTKD("%s: processing ep2_int_hndlr\n",__FUNCTION__); ++ ep2_int_hndlr(status); ++ } ++ ++ return IRQ_HANDLED; // NCB ++} ++ ++/* soft_connect_hook () ++ * Some devices have platform-specific circuitry to make USB ++ * not seem to be plugged in, even when it is. This allows ++ * software to control when a device 'appears' on the USB bus ++ * (after Linux has booted and this driver has loaded, for ++ * example). If you have such a circuit, control it here. ++ */ ++#ifdef CONFIG_SA1100_EXTENEX1 ++static void soft_connect_hook(int enable) ++{ ++ if (machine_is_extenex1 ()) { ++ if (enable) { ++ PPDR |= PPC_USB_SOFT_CON; ++ PPSR |= PPC_USB_SOFT_CON; ++ } else { ++ PPSR &= ~PPC_USB_SOFT_CON; ++ PPDR &= ~PPC_USB_SOFT_CON; ++ } ++ } ++} ++#elif defined(CONFIG_SA1100_BALLOON) ++static void soft_connect_hook(int enable) ++{ ++ if (machine_is_balloon()) { ++ if (enable) ++ balloon_cpld_control(BALLOON_UDC_DISCONNECT, 0); ++ else ++ balloon_cpld_control(BALLOON_UDC_DISCONNECT, 1); ++ } ++} ++#elif defined(CONFIG_SA1100_COLLIE) ++static int collie_usb_init(void) ++{ ++ int rc; ++ rc = gpio_request(COLLIE_GPIO_LB_VOL_CHG, "usb enable"); ++ if (rc) ++ return rc; ++ ++ rc = gpio_direction_output(COLLIE_GPIO_LB_VOL_CHG, 1); ++ if (rc) ++ gpio_free(COLLIE_GPIO_LB_VOL_CHG); ++ ++ return rc; ++} ++ ++static void collie_set_usb(int enable) ++{ ++ gpio_set_value(COLLIE_GPIO_LB_VOL_CHG, enable); ++} ++ ++static void collie_usb_exit(void) ++{ ++ gpio_free(COLLIE_GPIO_LB_VOL_CHG); ++} ++ ++static void soft_connect_hook(int enable) ++{ ++ collie_set_usb(enable); ++} ++#else ++#define soft_connect_hook(x) do { } while (0); ++#endif ++ ++/* "function" sysfs attribute */ ++static ssize_t ++show_function(struct device *_dev, struct device_attribute *attr, char *buf) ++{ ++ struct sa1100_udc *dev = dev_get_drvdata (_dev); ++ ++ if (!dev->driver ++ || !dev->driver->function ++ || strlen(dev->driver->function) > PAGE_SIZE) ++ return 0; ++ return scnprintf (buf, PAGE_SIZE, "%s\n", dev->driver->function); ++} ++static DEVICE_ATTR(function, S_IRUGO, show_function, NULL); ++ ++/* disable the UDC at the source */ ++static void udc_disable(struct sa1100_udc *dev) ++{ ++ soft_connect_hook(0); ++ UDC_set(Ser0UDCCR, UDCCR_UDD); ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ep0_idle(dev); ++} ++ ++static void udc_reinit(struct sa1100_udc *dev) ++{ ++ u32 i; ++ ++ /* Initialize the gadget controller data structure */ ++ INIT_LIST_HEAD(&dev->gadget.ep_list); ++ INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); ++ ep0_idle(dev); ++ for ( i = 0 ; i < 3 ; i++) { ++ struct sa1100_ep *ep = &dev->ep[i]; ++ if (i != 0) ++ list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); ++ ep->desc = NULL; ++ ep->stopped = 0; ++ INIT_LIST_HEAD(&ep->queue); ++ } ++} ++ ++/* enable the udc at the source */ ++static void udc_enable(struct sa1100_udc *dev) ++{ ++ UDC_clear (Ser0UDCCR, UDCCR_UDD); ++ ep0_idle(dev); ++} ++ ++static void ep0_start(struct sa1100_udc *dev) ++{ ++ udc_enable(dev); ++ udelay(100); ++ ++ /* clear stall - receiver seems to start stalled? 19Jan01ww */ ++ /* also clear other stuff just to be thurough 22Feb01ww */ ++ UDC_clear(Ser0UDCCS1, UDCCS1_FST | UDCCS1_RPE | UDCCS1_RPC ); ++ UDC_clear(Ser0UDCCS2, UDCCS2_FST | UDCCS2_TPE | UDCCS2_TPC ); ++ ++ /* mask everything */ ++ Ser0UDCCR = 0xFC; ++ ++ /* flush DMA and fire through some -EAGAINs */ ++ ep1_init(dev->ep[1].dmaregs); ++ ep2_init(dev->ep[2].dmaregs); ++ ++ /* enable any platform specific hardware */ ++ soft_connect_hook(1); ++ ++ /* clear all top-level sources */ ++ Ser0UDCSR = UDCSR_RSTIR | UDCSR_RESIR | UDCSR_EIR | ++ UDCSR_RIR | UDCSR_TIR | UDCSR_SUSIR ; ++ ++ /* EXERIMENT - a short line in the spec says toggling this ++ * bit diddles the internal state machine in the udc to ++ * expect a suspend ++ */ ++ Ser0UDCCR |= UDCCR_RESIM; ++ /* END EXPERIMENT 10Feb01ww */ ++ ++ /* enable any platform specific hardware */ ++ soft_connect_hook(1); ++ ++ /* Enable interrupts. If you are unplugged you will immediately ++ * get a suspend interrupt. If you are plugged and have a soft ++ * connect-circuit, you will get a reset. If you are plugged ++ * without a soft-connect, I think you also get suspend. In short, ++ * start with suspend masked and everything else enabled ++ */ ++ UDC_write(Ser0UDCCR, UDCCR_SUSIM); ++} ++ ++ ++/* when a driver is successfully registered, it will receive ++ * control requests including set_configuration(), which enables ++ * non-control requests. then usb traffic follows until a ++ * disconnect is reported. then a host may connect again, or ++ * the driver might get unbound. ++ */ ++int usb_gadget_register_driver(struct usb_gadget_driver *driver) ++{ ++ struct sa1100_udc *dev = the_controller; ++ int retval; ++ ++ if (!driver || !driver->bind || !driver->setup) ++ return -EINVAL; ++ if (!dev) ++ return -ENODEV; ++ if (dev->driver) ++ return -EBUSY; ++ ++ /* hook up the driver ... */ ++ dev->driver = driver; ++ dev->gadget.dev.driver = &driver->driver; ++ ++ retval = device_add(&dev->gadget.dev); ++ if (retval != 0) { ++ printk(KERN_ERR "Error in device_add() : %d\n",retval); ++ goto register_error; ++ } ++ ++ retval = driver->bind (&dev->gadget); ++ if (retval != 0) { ++ DEBUG(dev, "bind to driver %s --> %d\n", ++ driver->driver.name, retval); ++ device_del(&dev->gadget.dev); ++ goto register_error; ++ } ++ ++ retval = device_create_file(dev->dev, &dev_attr_function); ++ ++ /* ... then enable host detection and ep0; and we're ready ++ * for set_configuration as well as eventual disconnect. ++ */ ++ ep0_start(dev); ++ ++ DEBUG(dev, "%s ready\n", driver->driver.name); ++ ++ return 0; ++ ++register_error: ++ dev->driver = NULL; ++ dev->gadget.dev.driver = NULL; ++ return retval; ++} ++EXPORT_SYMBOL (usb_gadget_register_driver); ++ ++static void ++stop_activity(struct sa1100_udc *dev, struct usb_gadget_driver *driver) ++{ ++ int i; ++ ++ /* don't disconnect if it's not connected */ ++ if (dev->gadget.speed == USB_SPEED_UNKNOWN) ++ driver = NULL; ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ++ /* mask everything */ ++ Ser0UDCCR = 0xFC; ++ ++ /* stop hardware; prevent new request submissions; ++ * and kill any outstanding requests. ++ */ ++ for (i = 0; i < 3; i++) { ++ struct sa1100_ep *ep = &dev->ep[i]; ++ ep->stopped = 1; ++ nuke(ep, -ESHUTDOWN); ++ } ++ udc_disable (dev); ++ ++ /* report disconnect; the driver is already quiesced */ ++ if (driver) ++ driver->disconnect(&dev->gadget); ++ ++ /* re-init driver-visible data structures */ ++ udc_reinit(dev); ++} ++ ++int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) ++{ ++ struct sa1100_udc *dev = the_controller; ++ ++ if (!dev) ++ return -ENODEV; ++ if (!driver || driver != dev->driver) ++ return -EINVAL; ++ ++ local_irq_disable(); ++ stop_activity (dev, driver); ++ local_irq_enable(); ++ if (driver->unbind) ++ driver->unbind(&dev->gadget); ++ dev->driver = 0; ++ ++ device_del(&dev->gadget.dev); ++ device_remove_file(dev->dev, &dev_attr_function); ++ ++ DEBUG (dev, "unregistered driver '%s'\n", driver->driver.name); ++ return 0; ++} ++EXPORT_SYMBOL (usb_gadget_unregister_driver); ++ ++ ++/*-------------------------------------------------------------------------*/ ++ ++/*-------------------------------------------------------------------------*/ ++ ++////////////////////////////////////////////////////////////////////////////// ++// Proc Filesystem Support ++////////////////////////////////////////////////////////////////////////////// ++ ++#if CONFIG_PROC_FS ++ ++#define SAY(fmt,args...) p += sprintf (p, fmt, ## args) ++#define SAYV(num) p += sprintf (p, num_fmt, "Value", num) ++#define SAYC(label,yn) p += sprintf (p, yn_fmt, label, yn) ++#define SAYS(label,v) p += sprintf (p, cnt_fmt, label, v) ++ ++static int usbctl_read_proc (char *page, char **start, off_t off, ++ int count, int *eof, void *data) ++{ ++ const char * num_fmt = "%25.25s: %8.8lX\n"; ++ const char * cnt_fmt = "%25.25s: %lu\n"; ++ const char * yn_fmt = "%25.25s: %s\n"; ++ const char * yes = "YES"; ++ const char * no = "NO"; ++ unsigned long v; ++ char * p = page; ++ int len; ++ ++ SAY ("SA1100 USB Controller Core\n"); ++ ++ SAYS ("ep0 bytes read", usbd_info.stats.ep0_bytes_read); ++ SAYS ("ep0 bytes written", usbd_info.stats.ep0_bytes_written); ++ SAYS ("ep0 FIFO read failures", usbd_info.stats.ep0_fifo_read_failures); ++ SAYS ("ep0 FIFO write failures", usbd_info.stats.ep0_fifo_write_failures); ++ ++ SAY ("\n"); ++ ++ v = Ser0UDCAR; ++ SAY ("%25.25s: 0x%8.8lX - %ld\n", "Address Register", v, v); ++ v = Ser0UDCIMP; ++ SAY ("%25.25s: %ld (%8.8lX)\n", "IN max packet size", v+1, v); ++ v = Ser0UDCOMP; ++ SAY ("%25.25s: %ld (%8.8lX)\n", "OUT max packet size", v+1, v); ++ ++ v = Ser0UDCCR; ++ SAY ("\nUDC Mask Register\n"); ++ SAYV (v); ++ SAYC ("UDC Active", (v & UDCCR_UDA) ? yes : no); ++ SAYC ("Suspend interrupts masked", (v & UDCCR_SUSIM) ? yes : no); ++ SAYC ("Resume interrupts masked", (v & UDCCR_RESIM) ? yes : no); ++ SAYC ("Reset interrupts masked", (v & UDCCR_REM) ? yes : no); ++ ++ v = Ser0UDCSR; ++ SAY ("\nUDC Interrupt Request Register\n"); ++ SAYV (v); ++ SAYC ("Reset pending", (v & UDCSR_RSTIR) ? yes : no); ++ SAYC ("Suspend pending", (v & UDCSR_SUSIR) ? yes : no); ++ SAYC ("Resume pending", (v & UDCSR_RESIR) ? yes : no); ++ SAYC ("ep0 pending", (v & UDCSR_EIR) ? yes : no); ++ SAYC ("receiver pending", (v & UDCSR_RIR) ? yes : no); ++ SAYC ("tramsitter pending", (v & UDCSR_TIR) ? yes : no); ++ ++#ifdef CONFIG_SA1100_EXTENEX1 ++ SAYC ("\nSoft connect", (PPSR & PPC_USB_SOFT_CON) ? "Visible" : "Hidden"); ++#endif ++ ++#if 1 ++ SAY ("\nDMA Tx registers\n"); ++ { ++ dma_regs_t *r=the_controller->ep[2].dmaregs; ++ SAY (" DDAR"); ++ SAYV(r->DDAR); ++ SAY (" DCSR"); ++ SAYV(r->RdDCSR); ++ SAY (" DBSA (address buf A) "); ++ SAYV(r->DBSA); ++ SAY (" DBTA (transfer count A) "); ++ SAYV(r->DBTA); ++ SAY (" DBSB (address buf B) "); ++ SAYV(r->DBSB); ++ SAY (" DBTB (transfer count B) "); ++ SAYV(r->DBTB); ++ ++ } ++ SAY ("\nDMA Rx registers\n"); ++ { ++ dma_regs_t *r=the_controller->ep[1].dmaregs; ++ SAY (" DDAR"); ++ SAYV(r->DDAR); ++ SAY (" DCSR"); ++ SAYV(r->RdDCSR); ++ SAY (" DBSA (address buf A) "); ++ SAYV(r->DBSA); ++ SAY (" DBTA (transfer count A) "); ++ SAYV(r->DBTA); ++ SAY (" DBSB (address buf B) "); ++ SAYV(r->DBSB); ++ SAY (" DBTB (transfer count B) "); ++ SAYV(r->DBTB); ++ ++ } ++#endif ++#if 1 ++ v = Ser0UDCCS0; ++ SAY ("\nUDC Endpoint Zero Status Register\n"); ++ SAYV (v); ++ SAYC ("Out Packet Ready", (v & UDCCS0_OPR) ? yes : no); ++ SAYC ("In Packet Ready", (v & UDCCS0_IPR) ? yes : no); ++ SAYC ("Sent Stall", (v & UDCCS0_SST) ? yes : no); ++ SAYC ("Force Stall", (v & UDCCS0_FST) ? yes : no); ++ SAYC ("Data End", (v & UDCCS0_DE) ? yes : no); ++ SAYC ("Data Setup End", (v & UDCCS0_SE) ? yes : no); ++ SAYC ("Serviced (SO)", (v & UDCCS0_SO) ? yes : no); ++ ++ v = Ser0UDCCS1; ++ SAY ("\nUDC Receiver Status Register\n"); ++ SAYV (v); ++ SAYC ("Receive Packet Complete", (v & UDCCS1_RPC) ? yes : no); ++ SAYC ("Sent Stall", (v & UDCCS1_SST) ? yes : no); ++ SAYC ("Force Stall", (v & UDCCS1_FST) ? yes : no); ++ SAYC ("Receive Packet Error", (v & UDCCS1_RPE) ? yes : no); ++ SAYC ("Receive FIFO not empty", (v & UDCCS1_RNE) ? yes : no); ++ ++ v = Ser0UDCCS2; ++ SAY ("\nUDC Transmitter Status Register\n"); ++ SAYV (v); ++ SAYC ("FIFO has < 8 of 16 chars", (v & UDCCS2_TFS) ? yes : no); ++ SAYC ("Transmit Packet Complete", (v & UDCCS2_TPC) ? yes : no); ++ SAYC ("Transmit FIFO underrun", (v & UDCCS2_TUR) ? yes : no); ++ SAYC ("Transmit Packet Error", (v & UDCCS2_TPE) ? yes : no); ++ SAYC ("Sent Stall", (v & UDCCS2_SST) ? yes : no); ++ SAYC ("Force Stall", (v & UDCCS2_FST) ? yes : no); ++#endif ++ ++ len = (p - page) - off; ++ if (len < 0) ++ len = 0; ++ *eof = (len <=count) ? 1 : 0; ++ *start = page + off; ++ return len; ++} ++ ++static inline void register_proc_entry (void) ++{ ++ create_proc_read_entry (driver_name, 0, NULL, ++ usbctl_read_proc, NULL); ++} ++ ++static inline void unregister_proc_entry (void) ++{ ++ remove_proc_entry (driver_name, NULL); ++} ++ ++#else ++ ++#define register_proc_entry() do {} while (0) ++#define unregister_proc_entry() do {} while (0) ++ ++#endif /* CONFIG_PROC_FS */ ++ ++/*-------------------------------------------------------------------------*/ ++ ++MODULE_DESCRIPTION ("sa1100_udc"); ++MODULE_AUTHOR ("Various"); ++MODULE_LICENSE ("GPL"); ++ ++static struct sa1100_udc memory = { ++ .gadget = { ++ .ops = &sa1100_ops, ++ .ep0 = &memory.ep[0].ep, ++ .name = driver_name, ++ .dev = { ++ .bus_id = "gadget", ++ }, ++ }, ++ ++ /* control endpoint */ ++ .ep[0] = { ++ .ep = { ++ .name = ep0name, ++ .ops = &sa1100_ep_ops, ++ .maxpacket = EP0_FIFO_SIZE, ++ }, ++ .dev = &memory, ++ }, ++ ++ /* first group of endpoints */ ++ .ep[1] = { ++ .ep = { ++ .name = "ep1out-bulk", ++ .ops = &sa1100_ep_ops, ++ .maxpacket = BULK_FIFO_SIZE, ++ }, ++ .dev = &memory, ++ }, ++ .ep[2] = { ++ .ep = { ++ .name = "ep2in-bulk", ++ .ops = &sa1100_ep_ops, ++ .maxpacket = BULK_FIFO_SIZE, ++ }, ++ .dev = &memory, ++ } ++}; ++ ++static int __init sa1100_udc_probe(struct device *_dev) ++{ ++ struct sa1100_udc *dev = &memory; ++ int retval = 0; ++ ++ /* setup dev */ ++ dev->dev = _dev; ++// dev->mach = _dev->platform_data; ++ ++ device_initialize(&dev->gadget.dev); ++ dev->gadget.dev.parent = _dev; ++ dev->gadget.dev.dma_mask = _dev->dma_mask; ++ ++ the_controller = dev; ++ dev_set_drvdata(_dev, dev); ++ ++ /* controller stays disabled until gadget driver is bound */ ++ udc_disable(dev); ++ udc_reinit(dev); ++ ++// spin_lock_init(&the_udc.lock); ++ register_proc_entry(); ++ ++#if defined(CONFIG_SA1100_COLLIE) ++ collie_usb_init(); ++#endif ++ ++ /* setup dma channels and IRQ */ ++ retval = sa1100_request_dma(DMA_Ser0UDCRd, "USB receive", ++ NULL, NULL, &dev->ep[1].dmaregs); ++ if (retval) { ++ ERROR(dev, "couldn't get rx dma, err %d\n", retval); ++ goto err_rx_dma; ++ } ++ retval = sa1100_request_dma(DMA_Ser0UDCWr, "USB transmit", ++ NULL, NULL, &dev->ep[2].dmaregs); ++ if (retval) { ++ ERROR(dev, "couldn't get tx dma, err %d\n", retval); ++ goto err_tx_dma; ++ } ++ retval = request_irq(IRQ_Ser0UDC, udc_int_hndlr, IRQF_DISABLED, ++ driver_name, dev); ++ if (retval) { ++ ERROR(dev, "couldn't get irq, err %d\n", retval); ++ goto err_irq; ++ } ++ ++ INFO(dev, "initialized, rx %p tx %p irq %d\n", ++ dev->ep[1].dmaregs, dev->ep[2].dmaregs, IRQ_Ser0UDC); ++ return 0; ++ ++err_irq: ++ sa1100_free_dma(dev->ep[2].dmaregs); ++ usbd_info.dmaregs_rx = 0; ++err_tx_dma: ++ sa1100_free_dma(dev->ep[1].dmaregs); ++ usbd_info.dmaregs_tx = 0; ++err_rx_dma: ++ return retval; ++} ++ ++static int __exit sa1100_udc_remove(struct device *_dev) ++{ ++ struct sa1100_udc *dev = dev_get_drvdata(_dev); ++ ++ udc_disable(dev); ++ unregister_proc_entry(); ++ usb_gadget_unregister_driver(dev->driver); ++ sa1100_free_dma(dev->ep[1].dmaregs); ++ sa1100_free_dma(dev->ep[2].dmaregs); ++ free_irq(IRQ_Ser0UDC, dev); ++ dev_set_drvdata(_dev,NULL); ++ the_controller = NULL; ++#if defined(CONFIG_SA1100_COLLIE) ++ collie_usb_exit(); ++#endif ++ return 0; ++} ++ ++static struct device_driver udc_driver = { ++ .name = "sa11x0-udc", ++ .bus = &platform_bus_type, ++ .probe = sa1100_udc_probe, ++ .remove = __exit_p(sa1100_udc_remove), ++// .suspend = sa1100_udc_suspend, ++// .resume = sa1100_udc_resume, ++ .owner = THIS_MODULE, ++}; ++ ++static int __init udc_init(void) ++{ ++ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION); ++#ifdef NCB_DMA_FIX ++ send_buffer = (char*) kzalloc(SEND_BUFFER_SIZE, GFP_KERNEL | GFP_DMA ); ++ receive_buffer = (char*) kzalloc(RECEIVE_BUFFER_SIZE, GFP_KERNEL | GFP_DMA ); ++#endif ++ return driver_register(&udc_driver); ++} ++module_init(udc_init); ++ ++static void __exit udc_exit(void) ++{ ++#ifdef NCB_DMA_FIX ++ if (send_buffer) { ++ kfree(send_buffer); ++ send_buffer = NULL; ++ } ++ if (receive_buffer) { ++ kfree(receive_buffer); ++ receive_buffer = NULL; ++ } ++#endif ++ driver_unregister(&udc_driver); ++} ++module_exit(udc_exit); +diff --git a/drivers/usb/gadget/sa1100_udc.h b/drivers/usb/gadget/sa1100_udc.h +new file mode 100644 +index 0000000..86fa28d +--- /dev/null ++++ b/drivers/usb/gadget/sa1100_udc.h +@@ -0,0 +1,94 @@ ++/* ++ * internals of "new style" UDC controller ++ * <linux/usb_gadget.h> replaces ARM-specific "sa1100_usb.h". ++ */ ++ ++struct sa1100_ep { ++ struct usb_ep ep; ++ struct sa1100_udc *dev; ++ //unsigned long irqs; ++ ++ const struct usb_endpoint_descriptor *desc; ++ struct list_head queue; ++ dma_regs_t *dmaregs; ++ unsigned stopped : 1; ++}; ++ ++struct sa1100_request { ++ struct usb_request req; ++ struct list_head queue; ++// NCB unsigned mapped : 1; ++}; ++ ++enum ep0_state { ++ EP0_IDLE, ++ EP0_IN_DATA_PHASE, ++ EP0_OUT_DATA_PHASE, ++ EP0_END_XFER, ++ EP0_STALL, ++}; ++ ++#define EP0_FIFO_SIZE ((unsigned)8) ++#define BULK_FIFO_SIZE ((unsigned)64) ++//#define ISO_FIFO_SIZE ((unsigned)256) ++//#define INT_FIFO_SIZE ((unsigned)8) ++ ++struct udc_stats { ++ struct ep0stats { ++ unsigned long ops; ++ unsigned long bytes; ++ } read, write; ++ unsigned long irqs; ++}; ++ ++struct sa1100_udc { ++ struct usb_gadget gadget; ++ struct usb_gadget_driver *driver; ++ struct device *dev; ++ enum ep0_state ep0state; ++ struct udc_stats stats; ++// NCB spinlock_t lock; ++// NCB dma_regs_t *dmaregs_tx, *dmaregs_rx; ++ unsigned got_irq : 1, ++ vbus : 1, ++ pullup : 1, ++ has_cfr : 1, ++ req_pending : 1, ++ req_std : 1, ++ req_config : 1; ++ struct timer_list timer; ++ u64 dma_mask; ++ unsigned char address; ++ struct sa1100_ep ep[3]; ++ int ep0_req_len; ++}; ++ ++/*-------------------------------------------------------------------------*/ ++ ++#define xprintk(dev,level,fmt,args...) \ ++ printk(level "%s: " fmt , driver_name , ## args) ++ ++#ifdef DEBUG ++#undef DEBUG ++#define DEBUG(dev,fmt,args...) \ ++ xprintk(dev , KERN_DEBUG , fmt , ## args) ++#else ++#define DEBUG(dev,fmt,args...) \ ++ do { } while (0) ++#endif /* DEBUG */ ++ ++#ifdef VERBOSE ++#define VDEBUG DEBUG ++#else ++#define VDEBUG(dev,fmt,args...) \ ++ do { } while (0) ++#endif /* VERBOSE */ ++ ++#define ERROR(dev,fmt,args...) \ ++ xprintk(dev , KERN_ERR , fmt , ## args) ++#define WARN_(dev,fmt,args...) \ ++ xprintk(dev , KERN_WARNING , fmt , ## args) ++#define INFO(dev,fmt,args...) \ ++ xprintk(dev , KERN_INFO , fmt , ## args)
++ ++/*-------------------------------------------------------------------------*/ +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0010-mmc_spi-add-suspend-and-resume-callbacks.patch b/packages/linux/linux-2.6.28/collie/0010-mmc_spi-add-suspend-and-resume-callbacks.patch new file mode 100644 index 0000000000..fbf1b4573b --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0010-mmc_spi-add-suspend-and-resume-callbacks.patch @@ -0,0 +1,59 @@ +From 53fc40876ed9b753f935361fb1027718a184c41e Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Thu, 5 Feb 2009 00:49:03 +0100 +Subject: [PATCH 10/23] mmc_spi: add suspend and resume callbacks + +--- + drivers/mmc/host/mmc_spi.c | 29 +++++++++++++++++++++++++++++ + 1 files changed, 29 insertions(+), 0 deletions(-) + +diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c +index ad00e16..ac6719b 100644 +--- a/drivers/mmc/host/mmc_spi.c ++++ b/drivers/mmc/host/mmc_spi.c +@@ -1407,6 +1407,33 @@ static int __devexit mmc_spi_remove(struct spi_device *spi) + return 0; + } + ++#ifdef CONFIG_PM ++static int mmc_spi_suspend(struct spi_device *spi, pm_message_t state) ++{ ++ struct mmc_host *mmc = dev_get_drvdata(&spi->dev); ++ struct mmc_spi_host *host = mmc_priv(mmc); ++ int ret = 0; ++ ++ if (mmc) ++ ret = mmc_suspend_host(mmc, state); ++ return ret; ++} ++ ++static int mmc_spi_resume(struct spi_device *spi) ++{ ++ struct mmc_host *mmc = dev_get_drvdata(&spi->dev); ++ int ret = 0; ++ ++ if (mmc) ++ ret = mmc_resume_host(mmc); ++ ++ return ret; ++} ++#else ++#define mmc_spi_suspend NULL ++#define mmc_spi_resume NULL ++#endif ++ + + static struct spi_driver mmc_spi_driver = { + .driver = { +@@ -1416,6 +1443,8 @@ static struct spi_driver mmc_spi_driver = { + }, + .probe = mmc_spi_probe, + .remove = __devexit_p(mmc_spi_remove), ++ .suspend = mmc_spi_suspend, ++ .resume = mmc_spi_resume, + }; + + +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0011-move-drivers-mfd-.h-to-include-linux-mfd.patch b/packages/linux/linux-2.6.28/collie/0011-move-drivers-mfd-.h-to-include-linux-mfd.patch new file mode 100644 index 0000000000..0bc3dbb713 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0011-move-drivers-mfd-.h-to-include-linux-mfd.patch @@ -0,0 +1,803 @@ +From c69779dac8693a3b057b3708d19f7013c6973bf2 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 14:54:57 +0100 +Subject: [PATCH 11/23] move drivers/mfd/*.h to include/linux/mfd + +So drivers like collie_battery driver can use +those files easier. +--- + arch/arm/mach-sa1100/collie_pm.c | 2 +- + drivers/mfd/mcp-core.c | 2 +- + drivers/mfd/mcp-sa11x0.c | 2 +- + drivers/mfd/mcp.h | 66 ---------- + drivers/mfd/ucb1x00-assabet.c | 2 +- + drivers/mfd/ucb1x00-core.c | 2 +- + drivers/mfd/ucb1x00-ts.c | 2 +- + drivers/mfd/ucb1x00.h | 255 -------------------------------------- + include/linux/mfd/mcp.h | 68 ++++++++++ + include/linux/mfd/ucb1x00.h | 255 ++++++++++++++++++++++++++++++++++++++ + 10 files changed, 329 insertions(+), 327 deletions(-) + delete mode 100644 drivers/mfd/mcp.h + delete mode 100644 drivers/mfd/ucb1x00.h + create mode 100644 include/linux/mfd/mcp.h + create mode 100644 include/linux/mfd/ucb1x00.h + +diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c +index b1161fc..65b8b31 100644 +--- a/arch/arm/mach-sa1100/collie_pm.c ++++ b/arch/arm/mach-sa1100/collie_pm.c +@@ -22,6 +22,7 @@ + #include <linux/interrupt.h> + #include <linux/device.h> + #include <linux/platform_device.h> ++#include <linux/mfd/ucb1x00.h> + + #include <asm/irq.h> + #include <mach/hardware.h> +@@ -31,7 +32,6 @@ + #include <asm/mach/sharpsl_param.h> + #include <asm/hardware/sharpsl_pm.h> + +-#include "../drivers/mfd/ucb1x00.h" + + static struct ucb1x00 *ucb; + static int ad_revise; +diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c +index b4ed57e..64c806a 100644 +--- a/drivers/mfd/mcp-core.c ++++ b/drivers/mfd/mcp-core.c +@@ -17,11 +17,11 @@ + #include <linux/device.h> + #include <linux/slab.h> + #include <linux/string.h> ++#include <linux/mfd/mcp.h> + + #include <asm/dma.h> + #include <asm/system.h> + +-#include "mcp.h" + + #define to_mcp(d) container_of(d, struct mcp, attached_device) + #define to_mcp_driver(d) container_of(d, struct mcp_driver, drv) +diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c +index 28380b2..88c81cf 100644 +--- a/drivers/mfd/mcp-sa11x0.c ++++ b/drivers/mfd/mcp-sa11x0.c +@@ -19,6 +19,7 @@ + #include <linux/spinlock.h> + #include <linux/slab.h> + #include <linux/platform_device.h> ++#include <linux/mfd/mcp.h> + + #include <asm/dma.h> + #include <mach/hardware.h> +@@ -28,7 +29,6 @@ + + #include <mach/assabet.h> + +-#include "mcp.h" + + struct mcp_sa11x0 { + u32 mccr0; +diff --git a/drivers/mfd/mcp.h b/drivers/mfd/mcp.h +deleted file mode 100644 +index c093a93..0000000 +--- a/drivers/mfd/mcp.h ++++ /dev/null +@@ -1,66 +0,0 @@ +-/* +- * linux/drivers/mfd/mcp.h +- * +- * Copyright (C) 2001 Russell King, All Rights Reserved. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License. +- */ +-#ifndef MCP_H +-#define MCP_H +- +-struct mcp_ops; +- +-struct mcp { +- struct module *owner; +- struct mcp_ops *ops; +- spinlock_t lock; +- int use_count; +- unsigned int sclk_rate; +- unsigned int rw_timeout; +- dma_device_t dma_audio_rd; +- dma_device_t dma_audio_wr; +- dma_device_t dma_telco_rd; +- dma_device_t dma_telco_wr; +- struct device attached_device; +-}; +- +-struct mcp_ops { +- void (*set_telecom_divisor)(struct mcp *, unsigned int); +- void (*set_audio_divisor)(struct mcp *, unsigned int); +- void (*reg_write)(struct mcp *, unsigned int, unsigned int); +- unsigned int (*reg_read)(struct mcp *, unsigned int); +- void (*enable)(struct mcp *); +- void (*disable)(struct mcp *); +-}; +- +-void mcp_set_telecom_divisor(struct mcp *, unsigned int); +-void mcp_set_audio_divisor(struct mcp *, unsigned int); +-void mcp_reg_write(struct mcp *, unsigned int, unsigned int); +-unsigned int mcp_reg_read(struct mcp *, unsigned int); +-void mcp_enable(struct mcp *); +-void mcp_disable(struct mcp *); +-#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) +- +-struct mcp *mcp_host_alloc(struct device *, size_t); +-int mcp_host_register(struct mcp *); +-void mcp_host_unregister(struct mcp *); +- +-struct mcp_driver { +- struct device_driver drv; +- int (*probe)(struct mcp *); +- void (*remove)(struct mcp *); +- int (*suspend)(struct mcp *, pm_message_t); +- int (*resume)(struct mcp *); +-}; +- +-int mcp_driver_register(struct mcp_driver *); +-void mcp_driver_unregister(struct mcp_driver *); +- +-#define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device) +-#define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d) +- +-#define mcp_priv(mcp) ((void *)((mcp)+1)) +- +-#endif +diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c +index 61aeaf7..0f6f46d 100644 +--- a/drivers/mfd/ucb1x00-assabet.c ++++ b/drivers/mfd/ucb1x00-assabet.c +@@ -14,10 +14,10 @@ + #include <linux/fs.h> + #include <linux/proc_fs.h> + #include <linux/device.h> ++#include <linux/mfd/ucb1x00.h> + + #include <asm/dma.h> + +-#include "ucb1x00.h" + + #define UCB1X00_ATTR(name,input)\ + static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \ +diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c +index a316f1b..bc2c1ba 100644 +--- a/drivers/mfd/ucb1x00-core.c ++++ b/drivers/mfd/ucb1x00-core.c +@@ -24,11 +24,11 @@ + #include <linux/interrupt.h> + #include <linux/device.h> + #include <linux/mutex.h> ++#include <linux/mfd/ucb1x00.h> + + #include <asm/dma.h> + #include <mach/hardware.h> + +-#include "ucb1x00.h" + + static DEFINE_MUTEX(ucb1x00_mutex); + static LIST_HEAD(ucb1x00_drivers); +diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c +index 44762ca..b5feae9 100644 +--- a/drivers/mfd/ucb1x00-ts.c ++++ b/drivers/mfd/ucb1x00-ts.c +@@ -30,12 +30,12 @@ + #include <linux/freezer.h> + #include <linux/slab.h> + #include <linux/kthread.h> ++#include <linux/mfd/ucb1x00.h> + + #include <asm/dma.h> + #include <mach/collie.h> + #include <asm/mach-types.h> + +-#include "ucb1x00.h" + + + struct ucb1x00_ts { +diff --git a/drivers/mfd/ucb1x00.h b/drivers/mfd/ucb1x00.h +deleted file mode 100644 +index a8ad8a0..0000000 +--- a/drivers/mfd/ucb1x00.h ++++ /dev/null +@@ -1,255 +0,0 @@ +-/* +- * linux/drivers/mfd/ucb1x00.h +- * +- * Copyright (C) 2001 Russell King, All Rights Reserved. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License. +- */ +-#ifndef UCB1200_H +-#define UCB1200_H +- +-#define UCB_IO_DATA 0x00 +-#define UCB_IO_DIR 0x01 +- +-#define UCB_IO_0 (1 << 0) +-#define UCB_IO_1 (1 << 1) +-#define UCB_IO_2 (1 << 2) +-#define UCB_IO_3 (1 << 3) +-#define UCB_IO_4 (1 << 4) +-#define UCB_IO_5 (1 << 5) +-#define UCB_IO_6 (1 << 6) +-#define UCB_IO_7 (1 << 7) +-#define UCB_IO_8 (1 << 8) +-#define UCB_IO_9 (1 << 9) +- +-#define UCB_IE_RIS 0x02 +-#define UCB_IE_FAL 0x03 +-#define UCB_IE_STATUS 0x04 +-#define UCB_IE_CLEAR 0x04 +-#define UCB_IE_ADC (1 << 11) +-#define UCB_IE_TSPX (1 << 12) +-#define UCB_IE_TSMX (1 << 13) +-#define UCB_IE_TCLIP (1 << 14) +-#define UCB_IE_ACLIP (1 << 15) +- +-#define UCB_IRQ_TSPX 12 +- +-#define UCB_TC_A 0x05 +-#define UCB_TC_A_LOOP (1 << 7) /* UCB1200 */ +-#define UCB_TC_A_AMPL (1 << 7) /* UCB1300 */ +- +-#define UCB_TC_B 0x06 +-#define UCB_TC_B_VOICE_ENA (1 << 3) +-#define UCB_TC_B_CLIP (1 << 4) +-#define UCB_TC_B_ATT (1 << 6) +-#define UCB_TC_B_SIDE_ENA (1 << 11) +-#define UCB_TC_B_MUTE (1 << 13) +-#define UCB_TC_B_IN_ENA (1 << 14) +-#define UCB_TC_B_OUT_ENA (1 << 15) +- +-#define UCB_AC_A 0x07 +-#define UCB_AC_B 0x08 +-#define UCB_AC_B_LOOP (1 << 8) +-#define UCB_AC_B_MUTE (1 << 13) +-#define UCB_AC_B_IN_ENA (1 << 14) +-#define UCB_AC_B_OUT_ENA (1 << 15) +- +-#define UCB_TS_CR 0x09 +-#define UCB_TS_CR_TSMX_POW (1 << 0) +-#define UCB_TS_CR_TSPX_POW (1 << 1) +-#define UCB_TS_CR_TSMY_POW (1 << 2) +-#define UCB_TS_CR_TSPY_POW (1 << 3) +-#define UCB_TS_CR_TSMX_GND (1 << 4) +-#define UCB_TS_CR_TSPX_GND (1 << 5) +-#define UCB_TS_CR_TSMY_GND (1 << 6) +-#define UCB_TS_CR_TSPY_GND (1 << 7) +-#define UCB_TS_CR_MODE_INT (0 << 8) +-#define UCB_TS_CR_MODE_PRES (1 << 8) +-#define UCB_TS_CR_MODE_POS (2 << 8) +-#define UCB_TS_CR_BIAS_ENA (1 << 11) +-#define UCB_TS_CR_TSPX_LOW (1 << 12) +-#define UCB_TS_CR_TSMX_LOW (1 << 13) +- +-#define UCB_ADC_CR 0x0a +-#define UCB_ADC_SYNC_ENA (1 << 0) +-#define UCB_ADC_VREFBYP_CON (1 << 1) +-#define UCB_ADC_INP_TSPX (0 << 2) +-#define UCB_ADC_INP_TSMX (1 << 2) +-#define UCB_ADC_INP_TSPY (2 << 2) +-#define UCB_ADC_INP_TSMY (3 << 2) +-#define UCB_ADC_INP_AD0 (4 << 2) +-#define UCB_ADC_INP_AD1 (5 << 2) +-#define UCB_ADC_INP_AD2 (6 << 2) +-#define UCB_ADC_INP_AD3 (7 << 2) +-#define UCB_ADC_EXT_REF (1 << 5) +-#define UCB_ADC_START (1 << 7) +-#define UCB_ADC_ENA (1 << 15) +- +-#define UCB_ADC_DATA 0x0b +-#define UCB_ADC_DAT_VAL (1 << 15) +-#define UCB_ADC_DAT(x) (((x) & 0x7fe0) >> 5) +- +-#define UCB_ID 0x0c +-#define UCB_ID_1200 0x1004 +-#define UCB_ID_1300 0x1005 +-#define UCB_ID_TC35143 0x9712 +- +-#define UCB_MODE 0x0d +-#define UCB_MODE_DYN_VFLAG_ENA (1 << 12) +-#define UCB_MODE_AUD_OFF_CAN (1 << 13) +- +-#include "mcp.h" +- +-struct ucb1x00_irq { +- void *devid; +- void (*fn)(int, void *); +-}; +- +-struct ucb1x00 { +- spinlock_t lock; +- struct mcp *mcp; +- unsigned int irq; +- struct semaphore adc_sem; +- spinlock_t io_lock; +- u16 id; +- u16 io_dir; +- u16 io_out; +- u16 adc_cr; +- u16 irq_fal_enbl; +- u16 irq_ris_enbl; +- struct ucb1x00_irq irq_handler[16]; +- struct device dev; +- struct list_head node; +- struct list_head devs; +-}; +- +-struct ucb1x00_driver; +- +-struct ucb1x00_dev { +- struct list_head dev_node; +- struct list_head drv_node; +- struct ucb1x00 *ucb; +- struct ucb1x00_driver *drv; +- void *priv; +-}; +- +-struct ucb1x00_driver { +- struct list_head node; +- struct list_head devs; +- int (*add)(struct ucb1x00_dev *dev); +- void (*remove)(struct ucb1x00_dev *dev); +- int (*suspend)(struct ucb1x00_dev *dev, pm_message_t state); +- int (*resume)(struct ucb1x00_dev *dev); +-}; +- +-#define classdev_to_ucb1x00(cd) container_of(cd, struct ucb1x00, dev) +- +-int ucb1x00_register_driver(struct ucb1x00_driver *); +-void ucb1x00_unregister_driver(struct ucb1x00_driver *); +- +-/** +- * ucb1x00_clkrate - return the UCB1x00 SIB clock rate +- * @ucb: UCB1x00 structure describing chip +- * +- * Return the SIB clock rate in Hz. +- */ +-static inline unsigned int ucb1x00_clkrate(struct ucb1x00 *ucb) +-{ +- return mcp_get_sclk_rate(ucb->mcp); +-} +- +-/** +- * ucb1x00_enable - enable the UCB1x00 SIB clock +- * @ucb: UCB1x00 structure describing chip +- * +- * Enable the SIB clock. This can be called multiple times. +- */ +-static inline void ucb1x00_enable(struct ucb1x00 *ucb) +-{ +- mcp_enable(ucb->mcp); +-} +- +-/** +- * ucb1x00_disable - disable the UCB1x00 SIB clock +- * @ucb: UCB1x00 structure describing chip +- * +- * Disable the SIB clock. The SIB clock will only be disabled +- * when the number of ucb1x00_enable calls match the number of +- * ucb1x00_disable calls. +- */ +-static inline void ucb1x00_disable(struct ucb1x00 *ucb) +-{ +- mcp_disable(ucb->mcp); +-} +- +-/** +- * ucb1x00_reg_write - write a UCB1x00 register +- * @ucb: UCB1x00 structure describing chip +- * @reg: UCB1x00 4-bit register index to write +- * @val: UCB1x00 16-bit value to write +- * +- * Write the UCB1x00 register @reg with value @val. The SIB +- * clock must be running for this function to return. +- */ +-static inline void ucb1x00_reg_write(struct ucb1x00 *ucb, unsigned int reg, unsigned int val) +-{ +- mcp_reg_write(ucb->mcp, reg, val); +-} +- +-/** +- * ucb1x00_reg_read - read a UCB1x00 register +- * @ucb: UCB1x00 structure describing chip +- * @reg: UCB1x00 4-bit register index to write +- * +- * Read the UCB1x00 register @reg and return its value. The SIB +- * clock must be running for this function to return. +- */ +-static inline unsigned int ucb1x00_reg_read(struct ucb1x00 *ucb, unsigned int reg) +-{ +- return mcp_reg_read(ucb->mcp, reg); +-} +-/** +- * ucb1x00_set_audio_divisor - +- * @ucb: UCB1x00 structure describing chip +- * @div: SIB clock divisor +- */ +-static inline void ucb1x00_set_audio_divisor(struct ucb1x00 *ucb, unsigned int div) +-{ +- mcp_set_audio_divisor(ucb->mcp, div); +-} +- +-/** +- * ucb1x00_set_telecom_divisor - +- * @ucb: UCB1x00 structure describing chip +- * @div: SIB clock divisor +- */ +-static inline void ucb1x00_set_telecom_divisor(struct ucb1x00 *ucb, unsigned int div) +-{ +- mcp_set_telecom_divisor(ucb->mcp, div); +-} +- +-void ucb1x00_io_set_dir(struct ucb1x00 *ucb, unsigned int, unsigned int); +-void ucb1x00_io_write(struct ucb1x00 *ucb, unsigned int, unsigned int); +-unsigned int ucb1x00_io_read(struct ucb1x00 *ucb); +- +-#define UCB_NOSYNC (0) +-#define UCB_SYNC (1) +- +-unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync); +-void ucb1x00_adc_enable(struct ucb1x00 *ucb); +-void ucb1x00_adc_disable(struct ucb1x00 *ucb); +- +-/* +- * Which edges of the IRQ do you want to control today? +- */ +-#define UCB_RISING (1 << 0) +-#define UCB_FALLING (1 << 1) +- +-int ucb1x00_hook_irq(struct ucb1x00 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid); +-void ucb1x00_enable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges); +-void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges); +-int ucb1x00_free_irq(struct ucb1x00 *ucb, unsigned int idx, void *devid); +- +-#endif +diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h +new file mode 100644 +index 0000000..be95e09 +--- /dev/null ++++ b/include/linux/mfd/mcp.h +@@ -0,0 +1,68 @@ ++/* ++ * linux/drivers/mfd/mcp.h ++ * ++ * Copyright (C) 2001 Russell King, All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License. ++ */ ++#ifndef MCP_H ++#define MCP_H ++ ++#include <mach/dma.h> ++ ++struct mcp_ops; ++ ++struct mcp { ++ struct module *owner; ++ struct mcp_ops *ops; ++ spinlock_t lock; ++ int use_count; ++ unsigned int sclk_rate; ++ unsigned int rw_timeout; ++ dma_device_t dma_audio_rd; ++ dma_device_t dma_audio_wr; ++ dma_device_t dma_telco_rd; ++ dma_device_t dma_telco_wr; ++ struct device attached_device; ++}; ++ ++struct mcp_ops { ++ void (*set_telecom_divisor)(struct mcp *, unsigned int); ++ void (*set_audio_divisor)(struct mcp *, unsigned int); ++ void (*reg_write)(struct mcp *, unsigned int, unsigned int); ++ unsigned int (*reg_read)(struct mcp *, unsigned int); ++ void (*enable)(struct mcp *); ++ void (*disable)(struct mcp *); ++}; ++ ++void mcp_set_telecom_divisor(struct mcp *, unsigned int); ++void mcp_set_audio_divisor(struct mcp *, unsigned int); ++void mcp_reg_write(struct mcp *, unsigned int, unsigned int); ++unsigned int mcp_reg_read(struct mcp *, unsigned int); ++void mcp_enable(struct mcp *); ++void mcp_disable(struct mcp *); ++#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) ++ ++struct mcp *mcp_host_alloc(struct device *, size_t); ++int mcp_host_register(struct mcp *); ++void mcp_host_unregister(struct mcp *); ++ ++struct mcp_driver { ++ struct device_driver drv; ++ int (*probe)(struct mcp *); ++ void (*remove)(struct mcp *); ++ int (*suspend)(struct mcp *, pm_message_t); ++ int (*resume)(struct mcp *); ++}; ++ ++int mcp_driver_register(struct mcp_driver *); ++void mcp_driver_unregister(struct mcp_driver *); ++ ++#define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device) ++#define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d) ++ ++#define mcp_priv(mcp) ((void *)((mcp)+1)) ++ ++#endif +diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h +new file mode 100644 +index 0000000..eac3463 +--- /dev/null ++++ b/include/linux/mfd/ucb1x00.h +@@ -0,0 +1,255 @@ ++/* ++ * linux/include/mfd/ucb1x00.h ++ * ++ * Copyright (C) 2001 Russell King, All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License. ++ */ ++#ifndef UCB1200_H ++#define UCB1200_H ++ ++#include <linux/mfd/mcp.h> ++#define UCB_IO_DATA 0x00 ++#define UCB_IO_DIR 0x01 ++ ++#define UCB_IO_0 (1 << 0) ++#define UCB_IO_1 (1 << 1) ++#define UCB_IO_2 (1 << 2) ++#define UCB_IO_3 (1 << 3) ++#define UCB_IO_4 (1 << 4) ++#define UCB_IO_5 (1 << 5) ++#define UCB_IO_6 (1 << 6) ++#define UCB_IO_7 (1 << 7) ++#define UCB_IO_8 (1 << 8) ++#define UCB_IO_9 (1 << 9) ++ ++#define UCB_IE_RIS 0x02 ++#define UCB_IE_FAL 0x03 ++#define UCB_IE_STATUS 0x04 ++#define UCB_IE_CLEAR 0x04 ++#define UCB_IE_ADC (1 << 11) ++#define UCB_IE_TSPX (1 << 12) ++#define UCB_IE_TSMX (1 << 13) ++#define UCB_IE_TCLIP (1 << 14) ++#define UCB_IE_ACLIP (1 << 15) ++ ++#define UCB_IRQ_TSPX 12 ++ ++#define UCB_TC_A 0x05 ++#define UCB_TC_A_LOOP (1 << 7) /* UCB1200 */ ++#define UCB_TC_A_AMPL (1 << 7) /* UCB1300 */ ++ ++#define UCB_TC_B 0x06 ++#define UCB_TC_B_VOICE_ENA (1 << 3) ++#define UCB_TC_B_CLIP (1 << 4) ++#define UCB_TC_B_ATT (1 << 6) ++#define UCB_TC_B_SIDE_ENA (1 << 11) ++#define UCB_TC_B_MUTE (1 << 13) ++#define UCB_TC_B_IN_ENA (1 << 14) ++#define UCB_TC_B_OUT_ENA (1 << 15) ++ ++#define UCB_AC_A 0x07 ++#define UCB_AC_B 0x08 ++#define UCB_AC_B_LOOP (1 << 8) ++#define UCB_AC_B_MUTE (1 << 13) ++#define UCB_AC_B_IN_ENA (1 << 14) ++#define UCB_AC_B_OUT_ENA (1 << 15) ++ ++#define UCB_TS_CR 0x09 ++#define UCB_TS_CR_TSMX_POW (1 << 0) ++#define UCB_TS_CR_TSPX_POW (1 << 1) ++#define UCB_TS_CR_TSMY_POW (1 << 2) ++#define UCB_TS_CR_TSPY_POW (1 << 3) ++#define UCB_TS_CR_TSMX_GND (1 << 4) ++#define UCB_TS_CR_TSPX_GND (1 << 5) ++#define UCB_TS_CR_TSMY_GND (1 << 6) ++#define UCB_TS_CR_TSPY_GND (1 << 7) ++#define UCB_TS_CR_MODE_INT (0 << 8) ++#define UCB_TS_CR_MODE_PRES (1 << 8) ++#define UCB_TS_CR_MODE_POS (2 << 8) ++#define UCB_TS_CR_BIAS_ENA (1 << 11) ++#define UCB_TS_CR_TSPX_LOW (1 << 12) ++#define UCB_TS_CR_TSMX_LOW (1 << 13) ++ ++#define UCB_ADC_CR 0x0a ++#define UCB_ADC_SYNC_ENA (1 << 0) ++#define UCB_ADC_VREFBYP_CON (1 << 1) ++#define UCB_ADC_INP_TSPX (0 << 2) ++#define UCB_ADC_INP_TSMX (1 << 2) ++#define UCB_ADC_INP_TSPY (2 << 2) ++#define UCB_ADC_INP_TSMY (3 << 2) ++#define UCB_ADC_INP_AD0 (4 << 2) ++#define UCB_ADC_INP_AD1 (5 << 2) ++#define UCB_ADC_INP_AD2 (6 << 2) ++#define UCB_ADC_INP_AD3 (7 << 2) ++#define UCB_ADC_EXT_REF (1 << 5) ++#define UCB_ADC_START (1 << 7) ++#define UCB_ADC_ENA (1 << 15) ++ ++#define UCB_ADC_DATA 0x0b ++#define UCB_ADC_DAT_VAL (1 << 15) ++#define UCB_ADC_DAT(x) (((x) & 0x7fe0) >> 5) ++ ++#define UCB_ID 0x0c ++#define UCB_ID_1200 0x1004 ++#define UCB_ID_1300 0x1005 ++#define UCB_ID_TC35143 0x9712 ++ ++#define UCB_MODE 0x0d ++#define UCB_MODE_DYN_VFLAG_ENA (1 << 12) ++#define UCB_MODE_AUD_OFF_CAN (1 << 13) ++ ++ ++struct ucb1x00_irq { ++ void *devid; ++ void (*fn)(int, void *); ++}; ++ ++struct ucb1x00 { ++ spinlock_t lock; ++ struct mcp *mcp; ++ unsigned int irq; ++ struct semaphore adc_sem; ++ spinlock_t io_lock; ++ u16 id; ++ u16 io_dir; ++ u16 io_out; ++ u16 adc_cr; ++ u16 irq_fal_enbl; ++ u16 irq_ris_enbl; ++ struct ucb1x00_irq irq_handler[16]; ++ struct device dev; ++ struct list_head node; ++ struct list_head devs; ++}; ++ ++struct ucb1x00_driver; ++ ++struct ucb1x00_dev { ++ struct list_head dev_node; ++ struct list_head drv_node; ++ struct ucb1x00 *ucb; ++ struct ucb1x00_driver *drv; ++ void *priv; ++}; ++ ++struct ucb1x00_driver { ++ struct list_head node; ++ struct list_head devs; ++ int (*add)(struct ucb1x00_dev *dev); ++ void (*remove)(struct ucb1x00_dev *dev); ++ int (*suspend)(struct ucb1x00_dev *dev, pm_message_t state); ++ int (*resume)(struct ucb1x00_dev *dev); ++}; ++ ++#define classdev_to_ucb1x00(cd) container_of(cd, struct ucb1x00, dev) ++ ++int ucb1x00_register_driver(struct ucb1x00_driver *); ++void ucb1x00_unregister_driver(struct ucb1x00_driver *); ++ ++/** ++ * ucb1x00_clkrate - return the UCB1x00 SIB clock rate ++ * @ucb: UCB1x00 structure describing chip ++ * ++ * Return the SIB clock rate in Hz. ++ */ ++static inline unsigned int ucb1x00_clkrate(struct ucb1x00 *ucb) ++{ ++ return mcp_get_sclk_rate(ucb->mcp); ++} ++ ++/** ++ * ucb1x00_enable - enable the UCB1x00 SIB clock ++ * @ucb: UCB1x00 structure describing chip ++ * ++ * Enable the SIB clock. This can be called multiple times. ++ */ ++static inline void ucb1x00_enable(struct ucb1x00 *ucb) ++{ ++ mcp_enable(ucb->mcp); ++} ++ ++/** ++ * ucb1x00_disable - disable the UCB1x00 SIB clock ++ * @ucb: UCB1x00 structure describing chip ++ * ++ * Disable the SIB clock. The SIB clock will only be disabled ++ * when the number of ucb1x00_enable calls match the number of ++ * ucb1x00_disable calls. ++ */ ++static inline void ucb1x00_disable(struct ucb1x00 *ucb) ++{ ++ mcp_disable(ucb->mcp); ++} ++ ++/** ++ * ucb1x00_reg_write - write a UCB1x00 register ++ * @ucb: UCB1x00 structure describing chip ++ * @reg: UCB1x00 4-bit register index to write ++ * @val: UCB1x00 16-bit value to write ++ * ++ * Write the UCB1x00 register @reg with value @val. The SIB ++ * clock must be running for this function to return. ++ */ ++static inline void ucb1x00_reg_write(struct ucb1x00 *ucb, unsigned int reg, unsigned int val) ++{ ++ mcp_reg_write(ucb->mcp, reg, val); ++} ++ ++/** ++ * ucb1x00_reg_read - read a UCB1x00 register ++ * @ucb: UCB1x00 structure describing chip ++ * @reg: UCB1x00 4-bit register index to write ++ * ++ * Read the UCB1x00 register @reg and return its value. The SIB ++ * clock must be running for this function to return. ++ */ ++static inline unsigned int ucb1x00_reg_read(struct ucb1x00 *ucb, unsigned int reg) ++{ ++ return mcp_reg_read(ucb->mcp, reg); ++} ++/** ++ * ucb1x00_set_audio_divisor - ++ * @ucb: UCB1x00 structure describing chip ++ * @div: SIB clock divisor ++ */ ++static inline void ucb1x00_set_audio_divisor(struct ucb1x00 *ucb, unsigned int div) ++{ ++ mcp_set_audio_divisor(ucb->mcp, div); ++} ++ ++/** ++ * ucb1x00_set_telecom_divisor - ++ * @ucb: UCB1x00 structure describing chip ++ * @div: SIB clock divisor ++ */ ++static inline void ucb1x00_set_telecom_divisor(struct ucb1x00 *ucb, unsigned int div) ++{ ++ mcp_set_telecom_divisor(ucb->mcp, div); ++} ++ ++void ucb1x00_io_set_dir(struct ucb1x00 *ucb, unsigned int, unsigned int); ++void ucb1x00_io_write(struct ucb1x00 *ucb, unsigned int, unsigned int); ++unsigned int ucb1x00_io_read(struct ucb1x00 *ucb); ++ ++#define UCB_NOSYNC (0) ++#define UCB_SYNC (1) ++ ++unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync); ++void ucb1x00_adc_enable(struct ucb1x00 *ucb); ++void ucb1x00_adc_disable(struct ucb1x00 *ucb); ++ ++/* ++ * Which edges of the IRQ do you want to control today? ++ */ ++#define UCB_RISING (1 << 0) ++#define UCB_FALLING (1 << 1) ++ ++int ucb1x00_hook_irq(struct ucb1x00 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid); ++void ucb1x00_enable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges); ++void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges); ++int ucb1x00_free_irq(struct ucb1x00 *ucb, unsigned int idx, void *devid); ++ ++#endif +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0012-move-ucb1200-ts-driver.patch b/packages/linux/linux-2.6.28/collie/0012-move-ucb1200-ts-driver.patch new file mode 100644 index 0000000000..c1aafef5e2 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0012-move-ucb1200-ts-driver.patch @@ -0,0 +1,981 @@ +From 9e0d71c4a6247d88d3b772f6b05bcaa39711a937 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 19:31:25 +0100 +Subject: [PATCH 12/23] move ucb1200-ts driver + +Move the touchscreen driver to drivers/input/touchscreen +where touchscreen drivers belong. + +Conflicts: + + drivers/input/touchscreen/Makefile + drivers/mfd/Kconfig + drivers/mfd/Makefile + +Conflicts: + + drivers/mfd/Kconfig + drivers/mfd/Makefile +--- + drivers/input/touchscreen/Kconfig | 7 + + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/ucb1x00-ts.c | 438 ++++++++++++++++++++++++++++++++ + drivers/mfd/Kconfig | 3 - + drivers/mfd/Makefile | 3 +- + drivers/mfd/ucb1x00-ts.c | 438 -------------------------------- + 6 files changed, 447 insertions(+), 443 deletions(-) + create mode 100644 drivers/input/touchscreen/ucb1x00-ts.c + delete mode 100644 drivers/mfd/ucb1x00-ts.c + +diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig +index 3d1ab8f..3ac8cd6 100644 +--- a/drivers/input/touchscreen/Kconfig ++++ b/drivers/input/touchscreen/Kconfig +@@ -221,6 +221,13 @@ config TOUCHSCREEN_ATMEL_TSADCC + To compile this driver as a module, choose M here: the + module will be called atmel_tsadcc. + ++config TOUCHSCREEN_UCB1200_TS ++ tristate "Philips UCB1200 touchscreen" ++ depends on MCP_UCB1200 ++ help ++ This enabled support for the Pilips UCB1200 touchscreen interface ++ and compatible. ++ + config TOUCHSCREEN_UCB1400 + tristate "Philips UCB1400 touchscreen" + depends on AC97_BUS +diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile +index 15cf290..77ba930 100644 +--- a/drivers/input/touchscreen/Makefile ++++ b/drivers/input/touchscreen/Makefile +@@ -25,6 +25,7 @@ obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += penmount.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o ++obj-$(CONFIG_TOUCHSCREEN_UCB1200_TS) += ucb1x00-ts.o + obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o + obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o + wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o +diff --git a/drivers/input/touchscreen/ucb1x00-ts.c b/drivers/input/touchscreen/ucb1x00-ts.c +new file mode 100644 +index 0000000..b5feae9 +--- /dev/null ++++ b/drivers/input/touchscreen/ucb1x00-ts.c +@@ -0,0 +1,438 @@ ++/* ++ * 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/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/mfd/ucb1x00.h> ++ ++#include <asm/dma.h> ++#include <mach/collie.h> ++#include <asm/mach-types.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 restart:1; ++ unsigned int adcsync:1; ++}; ++ ++static int adcsync; ++ ++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_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_sync(idev); ++} ++ ++/* ++ * Switch to interrupt mode. ++ */ ++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. ++ */ ++static inline unsigned int ucb1x00_ts_read_pressure(struct ucb1x00_ts *ts) ++{ ++ if (machine_is_collie()) { ++ 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); ++ ++ udelay(55); ++ ++ return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_AD2, ts->adcsync); ++ } else { ++ 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_PRES | UCB_TS_CR_BIAS_ENA); ++ ++ return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync); ++ } ++} ++ ++/* ++ * 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 unsigned int ucb1x00_ts_read_xpos(struct ucb1x00_ts *ts) ++{ ++ if (machine_is_collie()) ++ ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK); ++ else { ++ 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); ++ 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); ++ } ++ 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); ++ ++ udelay(55); ++ ++ return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync); ++} ++ ++/* ++ * 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 unsigned int ucb1x00_ts_read_ypos(struct ucb1x00_ts *ts) ++{ ++ if (machine_is_collie()) ++ ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK); ++ else { ++ 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); ++ 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); ++ } ++ ++ 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); ++ ++ udelay(55); ++ ++ return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPX, ts->adcsync); ++} ++ ++/* ++ * 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); ++} ++ ++static inline int ucb1x00_ts_pen_down(struct ucb1x00_ts *ts) ++{ ++ unsigned int val = ucb1x00_reg_read(ts->ucb, UCB_TS_CR); ++ ++ if (machine_is_collie()) ++ return (!(val & (UCB_TS_CR_TSPX_LOW))); ++ else ++ return (val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW)); ++} ++ ++/* ++ * 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; ++ DECLARE_WAITQUEUE(wait, current); ++ int valid = 0; ++ ++ set_freezable(); ++ add_wait_queue(&ts->irq_wait, &wait); ++ while (!kthread_should_stop()) { ++ unsigned int x, y, p; ++ signed long timeout; ++ ++ ts->restart = 0; ++ ++ ucb1x00_adc_enable(ts->ucb); ++ ++ x = ucb1x00_ts_read_xpos(ts); ++ y = ucb1x00_ts_read_ypos(ts); ++ p = ucb1x00_ts_read_pressure(ts); ++ ++ /* ++ * Switch back to interrupt mode. ++ */ ++ ucb1x00_ts_mode_int(ts); ++ ucb1x00_adc_disable(ts->ucb); ++ ++ msleep(10); ++ ++ ucb1x00_enable(ts->ucb); ++ ++ ++ if (ucb1x00_ts_pen_down(ts)) { ++ set_current_state(TASK_INTERRUPTIBLE); ++ ++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, machine_is_collie() ? UCB_RISING : UCB_FALLING); ++ ucb1x00_disable(ts->ucb); ++ ++ /* ++ * If we spat out a valid sample set last time, ++ * spit out a "pen off" sample here. ++ */ ++ if (valid) { ++ ucb1x00_ts_event_release(ts); ++ valid = 0; ++ } ++ ++ timeout = MAX_SCHEDULE_TIMEOUT; ++ } else { ++ ucb1x00_disable(ts->ucb); ++ ++ /* ++ * Filtering is policy. Policy belongs in user ++ * space. We therefore leave it to user space ++ * to do any filtering they please. ++ */ ++ if (!ts->restart) { ++ ucb1x00_ts_evt_add(ts, p, x, y); ++ valid = 1; ++ } ++ ++ set_current_state(TASK_INTERRUPTIBLE); ++ timeout = HZ / 100; ++ } ++ ++ try_to_freeze(); ++ ++ schedule_timeout(timeout); ++ } ++ ++ 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; ++ ++ ucb1x00_disable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_FALLING); ++ 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) ++ goto out; ++ ++ /* ++ * 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); ++ ++ 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; ++ } ++ ++ out: ++ 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_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. ++ */ ++ ts->restart = 1; ++ 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; ++ ++ 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_drvdata(idev, ts); ++ ++ 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"); +diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig +index 2572773..bbc137d 100644 +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -172,8 +172,5 @@ config MCP_UCB1200 + tristate "Support for UCB1200 / UCB1300" + depends on MCP + +-config MCP_UCB1200_TS +- tristate "Touchscreen interface support" +- depends on MCP_UCB1200 && INPUT + + endmenu +diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile +index 9a5ad8a..4981aff 100644 +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -24,11 +24,10 @@ 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 +-obj-$(CONFIG_MCP_UCB1200_TS) += ucb1x00-ts.o + + ifeq ($(CONFIG_SA1100_ASSABET),y) + obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o + endif + obj-$(CONFIG_UCB1400_CORE) += ucb1400_core.o + +-obj-$(CONFIG_PMIC_DA903X) += da903x.o +\ No newline at end of file ++obj-$(CONFIG_PMIC_DA903X) += da903x.o +diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c +deleted file mode 100644 +index b5feae9..0000000 +--- a/drivers/mfd/ucb1x00-ts.c ++++ /dev/null +@@ -1,438 +0,0 @@ +-/* +- * 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/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/mfd/ucb1x00.h> +- +-#include <asm/dma.h> +-#include <mach/collie.h> +-#include <asm/mach-types.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 restart:1; +- unsigned int adcsync:1; +-}; +- +-static int adcsync; +- +-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_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_sync(idev); +-} +- +-/* +- * Switch to interrupt mode. +- */ +-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. +- */ +-static inline unsigned int ucb1x00_ts_read_pressure(struct ucb1x00_ts *ts) +-{ +- if (machine_is_collie()) { +- 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); +- +- udelay(55); +- +- return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_AD2, ts->adcsync); +- } else { +- 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_PRES | UCB_TS_CR_BIAS_ENA); +- +- return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync); +- } +-} +- +-/* +- * 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 unsigned int ucb1x00_ts_read_xpos(struct ucb1x00_ts *ts) +-{ +- if (machine_is_collie()) +- ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK); +- else { +- 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); +- 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); +- } +- 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); +- +- udelay(55); +- +- return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync); +-} +- +-/* +- * 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 unsigned int ucb1x00_ts_read_ypos(struct ucb1x00_ts *ts) +-{ +- if (machine_is_collie()) +- ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK); +- else { +- 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); +- 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); +- } +- +- 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); +- +- udelay(55); +- +- return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPX, ts->adcsync); +-} +- +-/* +- * 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); +-} +- +-static inline int ucb1x00_ts_pen_down(struct ucb1x00_ts *ts) +-{ +- unsigned int val = ucb1x00_reg_read(ts->ucb, UCB_TS_CR); +- +- if (machine_is_collie()) +- return (!(val & (UCB_TS_CR_TSPX_LOW))); +- else +- return (val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW)); +-} +- +-/* +- * 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; +- DECLARE_WAITQUEUE(wait, current); +- int valid = 0; +- +- set_freezable(); +- add_wait_queue(&ts->irq_wait, &wait); +- while (!kthread_should_stop()) { +- unsigned int x, y, p; +- signed long timeout; +- +- ts->restart = 0; +- +- ucb1x00_adc_enable(ts->ucb); +- +- x = ucb1x00_ts_read_xpos(ts); +- y = ucb1x00_ts_read_ypos(ts); +- p = ucb1x00_ts_read_pressure(ts); +- +- /* +- * Switch back to interrupt mode. +- */ +- ucb1x00_ts_mode_int(ts); +- ucb1x00_adc_disable(ts->ucb); +- +- msleep(10); +- +- ucb1x00_enable(ts->ucb); +- +- +- if (ucb1x00_ts_pen_down(ts)) { +- set_current_state(TASK_INTERRUPTIBLE); +- +- ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, machine_is_collie() ? UCB_RISING : UCB_FALLING); +- ucb1x00_disable(ts->ucb); +- +- /* +- * If we spat out a valid sample set last time, +- * spit out a "pen off" sample here. +- */ +- if (valid) { +- ucb1x00_ts_event_release(ts); +- valid = 0; +- } +- +- timeout = MAX_SCHEDULE_TIMEOUT; +- } else { +- ucb1x00_disable(ts->ucb); +- +- /* +- * Filtering is policy. Policy belongs in user +- * space. We therefore leave it to user space +- * to do any filtering they please. +- */ +- if (!ts->restart) { +- ucb1x00_ts_evt_add(ts, p, x, y); +- valid = 1; +- } +- +- set_current_state(TASK_INTERRUPTIBLE); +- timeout = HZ / 100; +- } +- +- try_to_freeze(); +- +- schedule_timeout(timeout); +- } +- +- 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; +- +- ucb1x00_disable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_FALLING); +- 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) +- goto out; +- +- /* +- * 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); +- +- 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; +- } +- +- out: +- 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_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. +- */ +- ts->restart = 1; +- 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; +- +- 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_drvdata(idev, ts); +- +- 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"); +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0013-add-collie-touchscreen-driver.patch b/packages/linux/linux-2.6.28/collie/0013-add-collie-touchscreen-driver.patch new file mode 100644 index 0000000000..92159d5649 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0013-add-collie-touchscreen-driver.patch @@ -0,0 +1,528 @@ +From 40787f3e48d1cc1e63dc5dd6aeda720f688fc05e Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 20 Oct 2008 17:44:23 +0200 +Subject: [PATCH 13/23] add collie touchscreen driver + +--- + drivers/input/touchscreen/Kconfig | 6 + + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/collie-ts.c | 449 +++++++++++++++++++++++++++++++++ + drivers/mfd/Makefile | 1 - + include/linux/mfd/ucb1x00.h | 3 + + 5 files changed, 459 insertions(+), 1 deletions(-) + create mode 100644 drivers/input/touchscreen/collie-ts.c + +diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig +index 3ac8cd6..a9f89ed 100644 +--- a/drivers/input/touchscreen/Kconfig ++++ b/drivers/input/touchscreen/Kconfig +@@ -228,6 +228,12 @@ config TOUCHSCREEN_UCB1200_TS + This enabled support for the Pilips UCB1200 touchscreen interface + and compatible. + ++config TOUCHSCREEN_COLLIE_TS ++ tristate "Touchscreen collie support" ++ depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS ++ help ++ Driver for touchscreen on collie - sharp sl-5500. ++ + config TOUCHSCREEN_UCB1400 + tristate "Philips UCB1400 touchscreen" + depends on AC97_BUS +diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile +index 77ba930..77715cd 100644 +--- a/drivers/input/touchscreen/Makefile ++++ b/drivers/input/touchscreen/Makefile +@@ -26,6 +26,7 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o + obj-$(CONFIG_TOUCHSCREEN_UCB1200_TS) += ucb1x00-ts.o ++obj-$(CONFIG_TOUCHSCREEN_COLLIE_TS) += collie-ts.o + obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o + obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o + wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o +diff --git a/drivers/input/touchscreen/collie-ts.c b/drivers/input/touchscreen/collie-ts.c +new file mode 100644 +index 0000000..c7c0272 +--- /dev/null ++++ b/drivers/input/touchscreen/collie-ts.c +@@ -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 <mach/dma.h> ++#include <mach/collie.h> ++#include <asm/mach-types.h> ++ ++#include <linux/mfd/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"); +diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile +index 4981aff..7bbba6e 100644 +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -24,7 +24,6 @@ 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 +- + ifeq ($(CONFIG_SA1100_ASSABET),y) + obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o + endif +diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h +index eac3463..70eb763 100644 +--- a/include/linux/mfd/ucb1x00.h ++++ b/include/linux/mfd/ucb1x00.h +@@ -35,7 +35,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 */ +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0014-collie-locomo-led-change-default-trigger.patch b/packages/linux/linux-2.6.28/collie/0014-collie-locomo-led-change-default-trigger.patch new file mode 100644 index 0000000000..4d2828e53a --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0014-collie-locomo-led-change-default-trigger.patch @@ -0,0 +1,27 @@ +From 047e4432e024fbec1e308e3c496822f52ce63ecb Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 13:21:42 +0100 +Subject: [PATCH 14/23] collie: locomo-led change default trigger + +Collie uses now the powersupply framework. Change the +default led-trigger of locomo-led to reflect that. +--- + drivers/leds/leds-locomo.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c +index 5d91362..1f7c10f 100644 +--- a/drivers/leds/leds-locomo.c ++++ b/drivers/leds/leds-locomo.c +@@ -44,7 +44,7 @@ static void locomoled_brightness_set1(struct led_classdev *led_cdev, + + static struct led_classdev locomo_led0 = { + .name = "locomo:amber:charge", +- .default_trigger = "sharpsl-charge", ++ .default_trigger = "main-battery-charging", + .brightness_set = locomoled_brightness_set0, + }; + +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch b/packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch new file mode 100644 index 0000000000..99d0314a46 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch @@ -0,0 +1,43 @@ +From 87e4ecb2702d0d1a800da0ba81cd867b0f150410 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 9 Feb 2009 23:14:44 +0100 +Subject: [PATCH 15/23] SA1100: make gpio_to_irq and reverse a macro + +The function can't be used for static initialisations so +convert them to macros. +--- + arch/arm/mach-sa1100/include/mach/gpio.h | 19 ++++--------------- + 1 files changed, 4 insertions(+), 15 deletions(-) + +diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h +index 582a0c9..7befc10 100644 +--- a/arch/arm/mach-sa1100/include/mach/gpio.h ++++ b/arch/arm/mach-sa1100/include/mach/gpio.h +@@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value) + + #define gpio_cansleep __gpio_cansleep + +-static inline unsigned gpio_to_irq(unsigned gpio) +-{ +- if (gpio < 11) +- return IRQ_GPIO0 + gpio; +- else +- return IRQ_GPIO11 - 11 + gpio; +-} +- +-static inline unsigned irq_to_gpio(unsigned irq) +-{ +- if (irq < IRQ_GPIO11_27) +- return irq - IRQ_GPIO0; +- else +- return irq - IRQ_GPIO11 + 11; +-} ++#define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ ++ (IRQ_GPIO11 - 11 + gpio)) ++#define irq_to_gpio(irq) ((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \ ++ (irq - IRQ_GPIO11 + 11)) + + #endif +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0016-add-gpiolib-support-to-ucb1x00.patch b/packages/linux/linux-2.6.28/collie/0016-add-gpiolib-support-to-ucb1x00.patch new file mode 100644 index 0000000000..aab08a66c9 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0016-add-gpiolib-support-to-ucb1x00.patch @@ -0,0 +1,242 @@ +From 1de1b5c2860d889a9422f187ad90d8e38b2431fd Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 14:50:56 +0100 +Subject: [PATCH 16/23] add gpiolib support to ucb1x00 + +The old access methods to the gpios will be removed when +all users has been converted. (mainly ucb1x00-ts) +--- + arch/arm/mach-sa1100/include/mach/mcp.h | 1 + + drivers/mfd/mcp-sa11x0.c | 1 + + drivers/mfd/ucb1x00-core.c | 87 ++++++++++++++++++++++++++++++- + include/linux/mfd/mcp.h | 1 + + include/linux/mfd/ucb1x00.h | 3 + + 5 files changed, 91 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h +index fb8b09a..ed1a331 100644 +--- a/arch/arm/mach-sa1100/include/mach/mcp.h ++++ b/arch/arm/mach-sa1100/include/mach/mcp.h +@@ -16,6 +16,7 @@ struct mcp_plat_data { + u32 mccr0; + u32 mccr1; + unsigned int sclk_rate; ++ int gpio_base; + }; + + #endif +diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c +index 88c81cf..dfa59eb 100644 +--- a/drivers/mfd/mcp-sa11x0.c ++++ b/drivers/mfd/mcp-sa11x0.c +@@ -163,6 +163,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev) + mcp->dma_audio_wr = DMA_Ser4MCP0Wr; + mcp->dma_telco_rd = DMA_Ser4MCP1Rd; + mcp->dma_telco_wr = DMA_Ser4MCP1Wr; ++ mcp->gpio_base = data->gpio_base; + + platform_set_drvdata(pdev, mcp); + +diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c +index bc2c1ba..b9c3f3d 100644 +--- a/drivers/mfd/ucb1x00-core.c ++++ b/drivers/mfd/ucb1x00-core.c +@@ -25,11 +25,11 @@ + #include <linux/device.h> + #include <linux/mutex.h> + #include <linux/mfd/ucb1x00.h> ++#include <linux/gpio.h> + + #include <asm/dma.h> + #include <mach/hardware.h> + +- + static DEFINE_MUTEX(ucb1x00_mutex); + static LIST_HEAD(ucb1x00_drivers); + static LIST_HEAD(ucb1x00_devices); +@@ -107,6 +107,60 @@ unsigned int ucb1x00_io_read(struct ucb1x00 *ucb) + return ucb1x00_reg_read(ucb, UCB_IO_DATA); + } + ++static void ucb1x00_gpio_set(struct gpio_chip *chip, unsigned offset, int value) ++{ ++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&ucb->io_lock, flags); ++ if (value) ++ ucb->io_out |= 1 << offset; ++ else ++ ucb->io_out &= ~(1 << offset); ++ ++ ucb1x00_reg_write(ucb, UCB_IO_DATA, ucb->io_out); ++ spin_unlock_irqrestore(&ucb->io_lock, flags); ++} ++ ++static int ucb1x00_gpio_get(struct gpio_chip *chip, unsigned offset) ++{ ++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio); ++ return ucb1x00_reg_read(ucb, UCB_IO_DATA) & (1 << offset); ++} ++ ++static int ucb1x00_gpio_direction_input(struct gpio_chip *chip, unsigned offset) ++{ ++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&ucb->io_lock, flags); ++ ucb->io_dir &= ~(1 << offset); ++ ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir); ++ spin_unlock_irqrestore(&ucb->io_lock, flags); ++ ++ return 0; ++} ++ ++static int ucb1x00_gpio_direction_output(struct gpio_chip *chip, unsigned offset ++ , int value) ++{ ++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&ucb->io_lock, flags); ++ ucb->io_dir |= (1 << offset); ++ ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir); ++ ++ if (value) ++ ucb->io_out |= 1 << offset; ++ else ++ ucb->io_out &= ~(1 << offset); ++ ucb1x00_reg_write(ucb, UCB_IO_DATA, ucb->io_out); ++ spin_unlock_irqrestore(&ucb->io_lock, flags); ++ ++ return 0; ++} ++ + /* + * UCB1300 data sheet says we must: + * 1. enable ADC => 5us (including reference startup time) +@@ -475,6 +529,7 @@ static int ucb1x00_probe(struct mcp *mcp) + struct ucb1x00_driver *drv; + unsigned int id; + int ret = -ENODEV; ++ int temp; + + mcp_enable(mcp); + id = mcp_reg_read(mcp, UCB_ID); +@@ -507,12 +562,27 @@ static int ucb1x00_probe(struct mcp *mcp) + goto err_free; + } + ++ ucb->gpio.base = -1; ++ if (mcp->gpio_base != 0) { ++ ucb->gpio.label = dev_name(&ucb->dev); ++ ucb->gpio.base = mcp->gpio_base; ++ ucb->gpio.ngpio = 10; ++ ucb->gpio.set = ucb1x00_gpio_set; ++ ucb->gpio.get = ucb1x00_gpio_get; ++ ucb->gpio.direction_input = ucb1x00_gpio_direction_input; ++ ucb->gpio.direction_output = ucb1x00_gpio_direction_output; ++ ret = gpiochip_add(&ucb->gpio); ++ if (ret) ++ goto err_free; ++ } else ++ dev_info(&ucb->dev, "gpio_base not set so no gpiolib support"); ++ + ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING, + "UCB1x00", ucb); + if (ret) { + printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n", + ucb->irq, ret); +- goto err_free; ++ goto err_gpio; + } + + mcp_set_drvdata(mcp, ucb); +@@ -521,6 +591,7 @@ static int ucb1x00_probe(struct mcp *mcp) + if (ret) + goto err_irq; + ++ + INIT_LIST_HEAD(&ucb->devs); + mutex_lock(&ucb1x00_mutex); + list_add(&ucb->node, &ucb1x00_devices); +@@ -528,10 +599,14 @@ static int ucb1x00_probe(struct mcp *mcp) + ucb1x00_add_dev(ucb, drv); + } + mutex_unlock(&ucb1x00_mutex); ++ + goto out; + + err_irq: + free_irq(ucb->irq, ucb); ++ err_gpio: ++ if (ucb->gpio.base != -1) ++ temp = gpiochip_remove(&ucb->gpio); + err_free: + kfree(ucb); + err_disable: +@@ -544,6 +619,7 @@ static void ucb1x00_remove(struct mcp *mcp) + { + struct ucb1x00 *ucb = mcp_get_drvdata(mcp); + struct list_head *l, *n; ++ int ret; + + mutex_lock(&ucb1x00_mutex); + list_del(&ucb->node); +@@ -553,6 +629,12 @@ static void ucb1x00_remove(struct mcp *mcp) + } + mutex_unlock(&ucb1x00_mutex); + ++ if (ucb->gpio.base != -1) { ++ ret = gpiochip_remove(&ucb->gpio); ++ if (ret) ++ dev_err(&ucb->dev, "Can't remove gpio chip: %d\n", ret); ++ } ++ + free_irq(ucb->irq, ucb); + device_unregister(&ucb->dev); + } +@@ -603,6 +685,7 @@ static int ucb1x00_resume(struct mcp *mcp) + struct ucb1x00 *ucb = mcp_get_drvdata(mcp); + struct ucb1x00_dev *dev; + ++ ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir); + mutex_lock(&ucb1x00_mutex); + list_for_each_entry(dev, &ucb->devs, dev_node) { + if (dev->drv->resume) +diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h +index be95e09..ee49670 100644 +--- a/include/linux/mfd/mcp.h ++++ b/include/linux/mfd/mcp.h +@@ -26,6 +26,7 @@ struct mcp { + dma_device_t dma_telco_rd; + dma_device_t dma_telco_wr; + struct device attached_device; ++ int gpio_base; + }; + + struct mcp_ops { +diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h +index 70eb763..b13171e 100644 +--- a/include/linux/mfd/ucb1x00.h ++++ b/include/linux/mfd/ucb1x00.h +@@ -11,6 +11,8 @@ + #define UCB1200_H + + #include <linux/mfd/mcp.h> ++#include <linux/gpio.h> ++ + #define UCB_IO_DATA 0x00 + #define UCB_IO_DIR 0x01 + +@@ -126,6 +128,7 @@ struct ucb1x00 { + struct device dev; + struct list_head node; + struct list_head devs; ++ struct gpio_chip gpio; + }; + + struct ucb1x00_driver; +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0017-collie-convert-to-gpiolib-for-ucb1x00.patch b/packages/linux/linux-2.6.28/collie/0017-collie-convert-to-gpiolib-for-ucb1x00.patch new file mode 100644 index 0000000000..c08c21a977 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0017-collie-convert-to-gpiolib-for-ucb1x00.patch @@ -0,0 +1,137 @@ +From c1bf0dcce68a5e01213e18c9ca1fd49efad4ddff Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 18:15:34 +0100 +Subject: [PATCH 17/23] collie: convert to gpiolib for ucb1x00 + +Only the parts used for collie_battery are converted. +The rest will be cleaned up later. + +Conflicts: + + arch/arm/mach-sa1100/collie.c + arch/arm/mach-sa1100/include/mach/collie.h +--- + arch/arm/mach-sa1100/collie.c | 3 +- + arch/arm/mach-sa1100/include/mach/collie.h | 68 ++++++++++++++------------- + 2 files changed, 37 insertions(+), 34 deletions(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index ec673b8..4b52f30 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -87,6 +87,7 @@ static struct scoop_pcmcia_config collie_pcmcia_config = { + static struct mcp_plat_data collie_mcp_data = { + .mccr0 = MCCR0_ADM | MCCR0_ExtClk, + .sclk_rate = 9216000, ++ .gpio_base = COLLIE_TC35143_GPIO_BASE, + }; + + #ifdef CONFIG_SHARP_LOCOMO +@@ -256,7 +257,7 @@ static void __init collie_init(void) + PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | + PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM; + +- PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY | ++ PWER = COLLIE_GPIO_AC_IN_ | COLLIE_GPIO_CO_ | COLLIE_GPIO_ON_KEY | + COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC; + + PGSR = COLLIE_GPIO_nREMOCON_ON; +diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h +index 799c930..bba8978 100644 +--- a/arch/arm/mach-sa1100/include/mach/collie.h ++++ b/arch/arm/mach-sa1100/include/mach/collie.h +@@ -15,7 +15,7 @@ + + + #define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1) +-#define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11 ++#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE) + #define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12 + #define COLLIE_SCP_DIAG_BOOT2 SCOOP_GPCR_PA13 + #define COLLIE_SCP_MUTE_L SCOOP_GPCR_PA14 +@@ -25,28 +25,29 @@ + #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7) + #define COLLIE_GPIO_LB_VOL_CHG (COLLIE_SCOOP_GPIO_BASE + 8) + +-#define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_CHARGE_ON | COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ ++#define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ + COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON ) +-#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ +- COLLIE_SCP_CHARGE_ON ) ++#define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R) + + /* GPIOs for which the generic definition doesn't say much */ + +-#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) +-#define COLLIE_GPIO_AC_IN GPIO_GPIO (1) +-#define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11) +-#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) +-#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) +-#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) +-#define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17) +-#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18) +-#define COLLIE_GPIO_CO GPIO_GPIO (20) +-#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) +-#define COLLIE_GPIO_CF_CD GPIO_GPIO (22) +-#define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO (23) +-#define COLLIE_GPIO_WAKEUP GPIO_GPIO (24) +-#define COLLIE_GPIO_GA_INT GPIO_GPIO (25) +-#define COLLIE_GPIO_MAIN_BAT_LOW GPIO_GPIO (26) ++#define COLLIE_GPIO_ON_KEY GPIO_GPIO(0) ++#define COLLIE_GPIO_AC_IN (1) ++#define COLLIE_GPIO_AC_IN_ GPIO_GPIO(1) ++#define COLLIE_GPIO_SDIO_INT GPIO_GPIO(11) ++#define COLLIE_GPIO_CF_IRQ GPIO_GPIO(14) ++#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO(15) ++#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO(16) ++#define COLLIE_GPIO_nMIC_ON GPIO_GPIO(17) ++#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO(18) ++#define COLLIE_GPIO_CO (20) ++#define COLLIE_GPIO_CO_ GPIO_GPIO(20) ++#define COLLIE_GPIO_MCP_CLK GPIO_GPIO(21) ++#define COLLIE_GPIO_CF_CD GPIO_GPIO(22) ++#define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO(23) ++#define COLLIE_GPIO_WAKEUP GPIO_GPIO(24) ++#define COLLIE_GPIO_GA_INT GPIO_GPIO(25) ++#define COLLIE_GPIO_MAIN_BAT_LOW (26) + + /* Interrupts */ + +@@ -70,19 +71,20 @@ + #define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14 + + /* GPIO's on the TC35143AF (Toshiba Analog Frontend) */ +-#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 /* GPIO0=Version */ +-#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 /* GPIO1=TBL_CHK */ +-#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 /* GPIO2=VPNE_ON */ +-#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 /* GPIO3=IR_ON */ +-#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 /* GPIO4=AMP_ON */ +-#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 /* GPIO5=Version */ +-#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 /* GPIO5=fs 8k LPF */ +-#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 /* GPIO6=BUZZER BIAS */ +-#define COLLIE_TC35143_GPIO_MBAT_ON UCB_IO_7 /* GPIO7=MBAT_ON */ +-#define COLLIE_TC35143_GPIO_BBAT_ON UCB_IO_8 /* GPIO8=BBAT_ON */ +-#define COLLIE_TC35143_GPIO_TMP_ON UCB_IO_9 /* GPIO9=TMP_ON */ +-#define COLLIE_TC35143_GPIO_IN ( UCB_IO_0 | UCB_IO_2 | UCB_IO_5 ) +-#define COLLIE_TC35143_GPIO_OUT ( UCB_IO_1 | UCB_IO_3 | UCB_IO_4 | UCB_IO_6 | \ +- UCB_IO_7 | UCB_IO_8 | UCB_IO_9 ) ++#define COLLIE_TC35143_GPIO_BASE (GPIO_MAX + 13) ++#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 ++#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 ++#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 ++#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 ++#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 ++#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 ++#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 ++#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 ++#define COLLIE_GPIO_MBAT_ON (COLLIE_TC35143_GPIO_BASE + 7) ++#define COLLIE_GPIO_BBAT_ON (COLLIE_TC35143_GPIO_BASE + 8) ++#define COLLIE_GPIO_TMP_ON (COLLIE_TC35143_GPIO_BASE + 9) ++#define COLLIE_TC35143_GPIO_IN (UCB_IO_0 | UCB_IO_2 | UCB_IO_5) ++#define COLLIE_TC35143_GPIO_OUT (UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \ ++ | UCB_IO_6) + + #endif +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0018-collie-add-battery-driver.patch b/packages/linux/linux-2.6.28/collie/0018-collie-add-battery-driver.patch new file mode 100644 index 0000000000..b28db63d87 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0018-collie-add-battery-driver.patch @@ -0,0 +1,473 @@ +From a2cf77eaf64b201a00b9682c25596ef0bcda8dc4 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 18:16:03 +0100 +Subject: [PATCH 18/23] collie: add battery driver + +This driver is based on tosa_battery.c. + +Conflicts: + + drivers/power/Makefile +--- + drivers/power/Kconfig | 7 + + drivers/power/Makefile | 1 + + drivers/power/collie_battery.c | 418 ++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 426 insertions(+), 0 deletions(-) + create mode 100644 drivers/power/collie_battery.c + +diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig +index 8e0c2b4..a945046 100644 +--- a/drivers/power/Kconfig ++++ b/drivers/power/Kconfig +@@ -56,6 +56,13 @@ config BATTERY_TOSA + Say Y to enable support for the battery on the Sharp Zaurus + SL-6000 (tosa) models. + ++config BATTERY_COLLIE ++ tristate "Sharp SL-5500 (collie) battery" ++ depends on SA1100_COLLIE && MCP_UCB1200 ++ help ++ Say Y to enable support for the battery on the Sharp Zaurus ++ SL-5500 (collie) models. ++ + config BATTERY_WM97XX + bool "WM97xx generic battery driver" + depends on TOUCHSCREEN_WM97XX=y +diff --git a/drivers/power/Makefile b/drivers/power/Makefile +index e8f1ece..51a7263 100644 +--- a/drivers/power/Makefile ++++ b/drivers/power/Makefile +@@ -21,5 +21,6 @@ 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 ++obj-$(CONFIG_BATTERY_COLLIE) += collie_battery.o + obj-$(CONFIG_BATTERY_WM97XX) += wm97xx_battery.o + obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o +diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c +new file mode 100644 +index 0000000..039f41a +--- /dev/null ++++ b/drivers/power/collie_battery.c +@@ -0,0 +1,418 @@ ++/* ++ * Battery and Power Management code for the Sharp SL-5x00 ++ * ++ * Copyright (C) 2009 Thomas Kunze ++ * ++ * based on tosa_battery.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/power_supply.h> ++#include <linux/delay.h> ++#include <linux/spinlock.h> ++#include <linux/interrupt.h> ++#include <linux/gpio.h> ++#include <linux/mfd/ucb1x00.h> ++ ++#include <asm/mach/sharpsl_param.h> ++#include <asm/mach-types.h> ++#include <mach/collie.h> ++ ++static DEFINE_MUTEX(bat_lock); /* protects gpio pins */ ++static struct work_struct bat_work; ++static struct ucb1x00 *ucb; ++ ++struct collie_bat { ++ int status; ++ struct power_supply psy; ++ int full_chrg; ++ ++ struct mutex work_lock; /* protects data */ ++ ++ bool (*is_present)(struct collie_bat *bat); ++ int gpio_full; ++ int gpio_charge_on; ++ ++ 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 collie_bat collie_bat_main; ++ ++static unsigned long collie_read_bat(struct collie_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); ++ msleep(5); ++ ucb1x00_adc_enable(ucb); ++ value = ucb1x00_adc_read(ucb, bat->adc_bat, UCB_SYNC); ++ ucb1x00_adc_disable(ucb); ++ gpio_set_value(bat->gpio_bat, 0); ++ mutex_unlock(&bat_lock); ++ value = value * 1000000 / bat->adc_bat_divider; ++ ++ return value; ++} ++ ++static unsigned long collie_read_temp(struct collie_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); ++ msleep(5); ++ ucb1x00_adc_enable(ucb); ++ value = ucb1x00_adc_read(ucb, bat->adc_temp, UCB_SYNC); ++ ucb1x00_adc_disable(ucb); ++ gpio_set_value(bat->gpio_temp, 0); ++ mutex_unlock(&bat_lock); ++ ++ value = value * 10000 / bat->adc_temp_divider; ++ ++ return value; ++} ++ ++static int collie_bat_get_property(struct power_supply *psy, ++ enum power_supply_property psp, ++ union power_supply_propval *val) ++{ ++ int ret = 0; ++ struct collie_bat *bat = container_of(psy, struct collie_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 = bat->technology; ++ break; ++ case POWER_SUPPLY_PROP_VOLTAGE_NOW: ++ val->intval = collie_read_bat(bat); ++ break; ++ case POWER_SUPPLY_PROP_VOLTAGE_MAX: ++ if (bat->full_chrg == -1) ++ val->intval = bat->bat_max; ++ else ++ 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->bat_min; ++ break; ++ case POWER_SUPPLY_PROP_TEMP: ++ val->intval = collie_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 void collie_bat_external_power_changed(struct power_supply *psy) ++{ ++ schedule_work(&bat_work); ++} ++ ++static irqreturn_t collie_bat_gpio_isr(int irq, void *data) ++{ ++ pr_info("collie_bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq))); ++ schedule_work(&bat_work); ++ return IRQ_HANDLED; ++} ++ ++static void collie_bat_update(struct collie_bat *bat) ++{ ++ 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_NOTICE "%s not present\n", psy->name); ++ bat->status = POWER_SUPPLY_STATUS_UNKNOWN; ++ 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_on, 1); ++ mdelay(15); ++ } ++ ++ if (gpio_get_value(bat->gpio_full)) { ++ if (old == POWER_SUPPLY_STATUS_CHARGING || ++ bat->full_chrg == -1) ++ bat->full_chrg = collie_read_bat(bat); ++ ++ gpio_set_value(bat->gpio_charge_on, 0); ++ bat->status = POWER_SUPPLY_STATUS_FULL; ++ } else { ++ gpio_set_value(bat->gpio_charge_on, 1); ++ bat->status = POWER_SUPPLY_STATUS_CHARGING; ++ } ++ } else { ++ gpio_set_value(bat->gpio_charge_on, 0); ++ bat->status = POWER_SUPPLY_STATUS_DISCHARGING; ++ } ++ ++ if (old != bat->status) ++ power_supply_changed(psy); ++ ++ mutex_unlock(&bat->work_lock); ++} ++ ++static void collie_bat_work(struct work_struct *work) ++{ ++ collie_bat_update(&collie_bat_main); ++} ++ ++ ++static enum power_supply_property collie_bat_main_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_VOLTAGE_MAX, ++ POWER_SUPPLY_PROP_PRESENT, ++ POWER_SUPPLY_PROP_TEMP, ++}; ++ ++static enum power_supply_property collie_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_VOLTAGE_MAX, ++ POWER_SUPPLY_PROP_PRESENT, ++}; ++ ++static struct collie_bat collie_bat_main = { ++ .status = POWER_SUPPLY_STATUS_DISCHARGING, ++ .full_chrg = -1, ++ .psy = { ++ .name = "main-battery", ++ .type = POWER_SUPPLY_TYPE_BATTERY, ++ .properties = collie_bat_main_props, ++ .num_properties = ARRAY_SIZE(collie_bat_main_props), ++ .get_property = collie_bat_get_property, ++ .external_power_changed = collie_bat_external_power_changed, ++ .use_for_apm = 1, ++ }, ++ ++ .gpio_full = COLLIE_GPIO_CO, ++ .gpio_charge_on = COLLIE_GPIO_CHARGE_ON, ++ ++ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO, ++ ++ .gpio_bat = COLLIE_GPIO_MBAT_ON, ++ .adc_bat = UCB_ADC_INP_AD1, ++ .adc_bat_divider = 155, ++ .bat_max = 4310000, ++ .bat_min = 1551 * 1000000 / 414, ++ ++ .gpio_temp = COLLIE_GPIO_TMP_ON, ++ .adc_temp = UCB_ADC_INP_AD0, ++ .adc_temp_divider = 10000, ++}; ++ ++static struct collie_bat collie_bat_bu = { ++ .status = POWER_SUPPLY_STATUS_UNKNOWN, ++ .full_chrg = -1, ++ ++ .psy = { ++ .name = "backup-battery", ++ .type = POWER_SUPPLY_TYPE_BATTERY, ++ .properties = collie_bat_bu_props, ++ .num_properties = ARRAY_SIZE(collie_bat_bu_props), ++ .get_property = collie_bat_get_property, ++ .external_power_changed = collie_bat_external_power_changed, ++ }, ++ ++ .gpio_full = -1, ++ .gpio_charge_on = -1, ++ ++ .technology = POWER_SUPPLY_TECHNOLOGY_LiMn, ++ ++ .gpio_bat = COLLIE_GPIO_BBAT_ON, ++ .adc_bat = UCB_ADC_INP_AD1, ++ .adc_bat_divider = 155, ++ .bat_max = 3000000, ++ .bat_min = 1900000, ++ ++ .gpio_temp = -1, ++ .adc_temp = -1, ++ .adc_temp_divider = -1, ++}; ++ ++static struct { ++ int gpio; ++ char *name; ++ bool output; ++ int value; ++} gpios[] = { ++ { COLLIE_GPIO_CO, "main battery full", 0, 0 }, ++ { COLLIE_GPIO_MAIN_BAT_LOW, "main battery low", 0, 0 }, ++ { COLLIE_GPIO_CHARGE_ON, "main charge on", 1, 0 }, ++ { COLLIE_GPIO_MBAT_ON, "main battery", 1, 0 }, ++ { COLLIE_GPIO_TMP_ON, "main battery temp", 1, 0 }, ++ { COLLIE_GPIO_BBAT_ON, "backup battery", 1, 0 }, ++}; ++ ++#ifdef CONFIG_PM ++static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state) ++{ ++ /* flush all pending status updates */ ++ flush_scheduled_work(); ++ return 0; ++} ++ ++static int collie_bat_resume(struct ucb1x00_dev *dev) ++{ ++ /* things may have changed while we were away */ ++ schedule_work(&bat_work); ++ return 0; ++} ++#else ++#define collie_bat_suspend NULL ++#define collie_bat_resume NULL ++#endif ++ ++static int __devinit collie_bat_probe(struct ucb1x00_dev *dev) ++{ ++ int ret; ++ int i; ++ ++ if (!machine_is_collie()) ++ return -ENODEV; ++ ++ ucb = dev->ucb; ++ ++ 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(&collie_bat_main.work_lock); ++ ++ INIT_WORK(&bat_work, collie_bat_work); ++ ++ ret = power_supply_register(&dev->ucb->dev, &collie_bat_main.psy); ++ if (ret) ++ goto err_psy_reg_main; ++ ret = power_supply_register(&dev->ucb->dev, &collie_bat_bu.psy); ++ if (ret) ++ goto err_psy_reg_bu; ++ ++ ret = request_irq(gpio_to_irq(COLLIE_GPIO_CO), ++ collie_bat_gpio_isr, ++ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, ++ "main full", &collie_bat_main); ++ if (!ret) { ++ schedule_work(&bat_work); ++ return 0; ++ } ++ power_supply_unregister(&collie_bat_bu.psy); ++err_psy_reg_bu: ++ power_supply_unregister(&collie_bat_main.psy); ++err_psy_reg_main: ++ ++ /* see comment in collie_bat_remove */ ++ flush_scheduled_work(); ++ ++ i--; ++err_gpio: ++ for (; i >= 0; i--) ++ gpio_free(gpios[i].gpio); ++ ++ return ret; ++} ++ ++static void __devexit collie_bat_remove(struct ucb1x00_dev *dev) ++{ ++ int i; ++ ++ free_irq(gpio_to_irq(COLLIE_GPIO_CO), &collie_bat_main); ++ ++ power_supply_unregister(&collie_bat_bu.psy); ++ power_supply_unregister(&collie_bat_main.psy); ++ ++ /* ++ * now flush all pending work. ++ * we won't get any more schedules, since all ++ * sources (isr and external_power_changed) ++ * are unregistered now. ++ */ ++ flush_scheduled_work(); ++ ++ for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i--) ++ gpio_free(gpios[i].gpio); ++} ++ ++static struct ucb1x00_driver collie_bat_driver = { ++ .add = collie_bat_probe, ++ .remove = __devexit_p(collie_bat_remove), ++ .suspend = collie_bat_suspend, ++ .resume = collie_bat_resume, ++}; ++ ++static int __init collie_bat_init(void) ++{ ++ return ucb1x00_register_driver(&collie_bat_driver); ++} ++ ++static void __exit collie_bat_exit(void) ++{ ++ ucb1x00_unregister_driver(&collie_bat_driver); ++} ++ ++module_init(collie_bat_init); ++module_exit(collie_bat_exit); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Thomas Kunze"); ++MODULE_DESCRIPTION("Collie battery driver"); +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0019-collie-support-pda_power-driver.patch b/packages/linux/linux-2.6.28/collie/0019-collie-support-pda_power-driver.patch new file mode 100644 index 0000000000..7d74cb72af --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0019-collie-support-pda_power-driver.patch @@ -0,0 +1,103 @@ +From c1a769bcd789ef7284ee4ece4324274278ee6401 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 13:48:32 +0100 +Subject: [PATCH 19/23] collie: support pda_power driver + +This add the pda-power platform device to collie. +--- + arch/arm/mach-sa1100/collie.c | 65 +++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 65 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index 4b52f30..7da2f28 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -26,6 +26,7 @@ + #include <linux/mtd/partitions.h> + #include <linux/timer.h> + #include <linux/gpio.h> ++#include <linux/pda_power.h> + + #include <mach/hardware.h> + #include <asm/mach-types.h> +@@ -90,6 +91,69 @@ static struct mcp_plat_data collie_mcp_data = { + .gpio_base = COLLIE_TC35143_GPIO_BASE, + }; + ++/* ++ * Collie AC IN ++ */ ++static int collie_power_init(struct device *dev) ++{ ++ int ret = gpio_request(COLLIE_GPIO_AC_IN, "ac in"); ++ if (ret) ++ goto err_gpio_req; ++ ++ ret = gpio_direction_input(COLLIE_GPIO_AC_IN); ++ if (ret) ++ goto err_gpio_in; ++ ++ return 0; ++ ++err_gpio_in: ++ gpio_free(COLLIE_GPIO_AC_IN); ++err_gpio_req: ++ return ret; ++} ++ ++static void collie_power_exit(struct device *dev) ++{ ++ gpio_free(COLLIE_GPIO_AC_IN); ++} ++ ++static int collie_power_ac_online(void) ++{ ++ return gpio_get_value(COLLIE_GPIO_AC_IN) == 2; ++} ++ ++static char *collie_ac_supplied_to[] = { ++ "main-battery", ++ "backup-battery", ++}; ++ ++static struct pda_power_pdata collie_power_data = { ++ .init = collie_power_init, ++ .is_ac_online = collie_power_ac_online, ++ .exit = collie_power_exit, ++ .supplied_to = collie_ac_supplied_to, ++ .num_supplicants = ARRAY_SIZE(collie_ac_supplied_to), ++}; ++ ++static struct resource collie_power_resource[] = { ++ { ++ .name = "ac", ++ .start = gpio_to_irq(COLLIE_GPIO_AC_IN), ++ .end = gpio_to_irq(COLLIE_GPIO_AC_IN), ++ .flags = IORESOURCE_IRQ | ++ IORESOURCE_IRQ_HIGHEDGE | ++ IORESOURCE_IRQ_LOWEDGE, ++ }, ++}; ++ ++static struct platform_device collie_power_device = { ++ .name = "pda-power", ++ .id = -1, ++ .dev.platform_data = &collie_power_data, ++ .resource = collie_power_resource, ++ .num_resources = ARRAY_SIZE(collie_power_resource), ++}; ++ + #ifdef CONFIG_SHARP_LOCOMO + /* + * low-level UART features. +@@ -180,6 +244,7 @@ struct platform_device collie_locomo_device = { + static struct platform_device *devices[] __initdata = { + &collie_locomo_device, + &colliescoop_device, ++ &collie_power_device, + }; + + static struct mtd_partition collie_partitions[] = { +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0020-remove-collie_pm.c.patch b/packages/linux/linux-2.6.28/collie/0020-remove-collie_pm.c.patch new file mode 100644 index 0000000000..490e333976 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0020-remove-collie_pm.c.patch @@ -0,0 +1,323 @@ +From 702663223fdc1e3f73e9adbcb1415713b2c92652 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Tue, 10 Feb 2009 18:16:57 +0100 +Subject: [PATCH 20/23] remove collie_pm.c + +This file was unused. The new battery driver makes it +obsolete. So remove it + +Conflicts: + + arch/arm/mach-sa1100/collie_pm.c +--- + arch/arm/mach-sa1100/collie_pm.c | 298 -------------------------------------- + 1 files changed, 0 insertions(+), 298 deletions(-) + delete mode 100644 arch/arm/mach-sa1100/collie_pm.c + +diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c +deleted file mode 100644 +index 65b8b31..0000000 +--- a/arch/arm/mach-sa1100/collie_pm.c ++++ /dev/null +@@ -1,298 +0,0 @@ +-/* +- * Based on spitz_pm.c and sharp code. +- * +- * Copyright (C) 2001 SHARP +- * Copyright 2005 Pavel Machek <pavel@suse.cz> +- * +- * Distribute under GPLv2. +- * +- * Li-ion batteries are angry beasts, and they like to explode. This driver is not finished, +- * and sometimes charges them when it should not. If it makes angry lithium to come your way... +- * ...well, you have been warned. +- * +- * Actually, this should be quite safe, it seems sharp leaves charger enabled by default, +- * and my collie did not explode (yet). +- */ +- +-#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/device.h> +-#include <linux/platform_device.h> +-#include <linux/mfd/ucb1x00.h> +- +-#include <asm/irq.h> +-#include <mach/hardware.h> +-#include <asm/hardware/scoop.h> +-#include <asm/dma.h> +-#include <mach/collie.h> +-#include <asm/mach/sharpsl_param.h> +-#include <asm/hardware/sharpsl_pm.h> +- +- +-static struct ucb1x00 *ucb; +-static int ad_revise; +- +-#define ADCtoPower(x) ((330 * x * 2) / 1024) +- +-static void collie_charger_init(void) +-{ +- int err; +- +- if (sharpsl_param.adadj != -1) +- ad_revise = sharpsl_param.adadj; +- +- /* Register interrupt handler. */ +- if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, IRQF_DISABLED, +- "ACIN", sharpsl_ac_isr))) { +- printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_AC_IN); +- return; +- } +- if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, IRQF_DISABLED, +- "CO", sharpsl_chrg_full_isr))) { +- free_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr); +- printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_CO); +- return; +- } +- +- ucb1x00_io_set_dir(ucb, 0, COLLIE_TC35143_GPIO_MBAT_ON | COLLIE_TC35143_GPIO_TMP_ON | +- COLLIE_TC35143_GPIO_BBAT_ON); +- return; +-} +- +-static void collie_measure_temp(int on) +-{ +- if (on) +- ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_TMP_ON, 0); +- else +- ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_TMP_ON); +-} +- +-static void collie_charge(int on) +-{ +- extern struct platform_device colliescoop_device; +- +- /* Zaurus seems to contain LTC1731; it should know when to +- * stop charging itself, so setting charge on should be +- * relatively harmless (as long as it is not done too often). +- */ +- if (on) { +- set_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON); +- } else { +- reset_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON); +- } +-} +- +-static void collie_discharge(int on) +-{ +-} +- +-static void collie_discharge1(int on) +-{ +-} +- +-static void collie_presuspend(void) +-{ +-} +- +-static void collie_postsuspend(void) +-{ +-} +- +-static int collie_should_wakeup(unsigned int resume_on_alarm) +-{ +- return 0; +-} +- +-static unsigned long collie_charger_wakeup(void) +-{ +- return 0; +-} +- +-int collie_read_backup_battery(void) +-{ +- int voltage; +- +- ucb1x00_adc_enable(ucb); +- +- ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_BBAT_ON, 0); +- voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC); +- +- ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_BBAT_ON); +- ucb1x00_adc_disable(ucb); +- +- printk("Backup battery = %d(%d)\n", ADCtoPower(voltage), voltage); +- +- return ADCtoPower(voltage); +-} +- +-int collie_read_main_battery(void) +-{ +- int voltage, voltage_rev, voltage_volts; +- +- ucb1x00_adc_enable(ucb); +- ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_BBAT_ON); +- ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_MBAT_ON, 0); +- +- mdelay(1); +- voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC); +- +- ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_MBAT_ON); +- ucb1x00_adc_disable(ucb); +- +- voltage_rev = voltage + ((ad_revise * voltage) / 652); +- voltage_volts = ADCtoPower(voltage_rev); +- +- printk("Main battery = %d(%d)\n", voltage_volts, voltage); +- +- if (voltage != -1) +- return voltage_volts; +- else +- return voltage; +-} +- +-int collie_read_temp(void) +-{ +- int voltage; +- +- /* According to Sharp, temp must be > 973, main battery must be < 465, +- FIXME: sharpsl_pm.c has both conditions negated? FIXME: values +- are way out of range? */ +- +- ucb1x00_adc_enable(ucb); +- ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_TMP_ON, 0); +- /* >1010 = battery removed, 460 = 22C ?, higher = lower temp ? */ +- voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD0, UCB_SYNC); +- ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_TMP_ON); +- ucb1x00_adc_disable(ucb); +- +- printk("Battery temp = %d\n", voltage); +- return voltage; +-} +- +-static unsigned long read_devdata(int which) +-{ +- switch (which) { +- case SHARPSL_BATT_VOLT: +- return collie_read_main_battery(); +- case SHARPSL_BATT_TEMP: +- return collie_read_temp(); +- case SHARPSL_ACIN_VOLT: +- return 500; +- case SHARPSL_STATUS_ACIN: { +- int ret = GPLR & COLLIE_GPIO_AC_IN; +- printk("AC status = %d\n", ret); +- return ret; +- } +- case SHARPSL_STATUS_FATAL: { +- int ret = GPLR & COLLIE_GPIO_MAIN_BAT_LOW; +- printk("Fatal bat = %d\n", ret); +- return ret; +- } +- default: +- return ~0; +- } +-} +- +-struct battery_thresh collie_battery_levels_acin[] = { +- { 420, 100}, +- { 417, 95}, +- { 415, 90}, +- { 413, 80}, +- { 411, 75}, +- { 408, 70}, +- { 406, 60}, +- { 403, 50}, +- { 398, 40}, +- { 391, 25}, +- { 10, 5}, +- { 0, 0}, +-}; +- +-struct battery_thresh collie_battery_levels[] = { +- { 394, 100}, +- { 390, 95}, +- { 380, 90}, +- { 370, 80}, +- { 368, 75}, /* From sharp code: battery high with frontlight */ +- { 366, 70}, /* 60..90 -- fake values invented by me for testing */ +- { 364, 60}, +- { 362, 50}, +- { 360, 40}, +- { 358, 25}, /* From sharp code: battery low with frontlight */ +- { 356, 5}, /* From sharp code: battery verylow with frontlight */ +- { 0, 0}, +-}; +- +-struct sharpsl_charger_machinfo collie_pm_machinfo = { +- .init = collie_charger_init, +- .read_devdata = read_devdata, +- .discharge = collie_discharge, +- .discharge1 = collie_discharge1, +- .charge = collie_charge, +- .measure_temp = collie_measure_temp, +- .presuspend = collie_presuspend, +- .postsuspend = collie_postsuspend, +- .charger_wakeup = collie_charger_wakeup, +- .should_wakeup = collie_should_wakeup, +- .bat_levels = 12, +- .bat_levels_noac = collie_battery_levels, +- .bat_levels_acin = collie_battery_levels_acin, +- .status_high_acin = 368, +- .status_low_acin = 358, +- .status_high_noac = 368, +- .status_low_noac = 358, +- .charge_on_volt = 350, /* spitz uses 2.90V, but lets play it safe. */ +- .charge_on_temp = 550, +- .charge_acin_high = 550, /* collie does not seem to have sensor for this, anyway */ +- .charge_acin_low = 450, /* ignored, too */ +- .fatal_acin_volt = 356, +- .fatal_noacin_volt = 356, +- +- .batfull_irq = 1, /* We do not want periodical charge restarts */ +-}; +- +-static int __init collie_pm_ucb_add(struct ucb1x00_dev *pdev) +-{ +- sharpsl_pm.machinfo = &collie_pm_machinfo; +- ucb = pdev->ucb; +- return 0; +-} +- +-static struct ucb1x00_driver collie_pm_ucb_driver = { +- .add = collie_pm_ucb_add, +-}; +- +-static struct platform_device *collie_pm_device; +- +-static int __init collie_pm_init(void) +-{ +- int ret; +- +- collie_pm_device = platform_device_alloc("sharpsl-pm", -1); +- if (!collie_pm_device) +- return -ENOMEM; +- +- collie_pm_device->dev.platform_data = &collie_pm_machinfo; +- ret = platform_device_add(collie_pm_device); +- +- if (ret) +- platform_device_put(collie_pm_device); +- +- if (!ret) +- ret = ucb1x00_register_driver(&collie_pm_ucb_driver); +- +- return ret; +-} +- +-static void __exit collie_pm_exit(void) +-{ +- ucb1x00_unregister_driver(&collie_pm_ucb_driver); +- platform_device_unregister(collie_pm_device); +-} +- +-module_init(collie_pm_init); +-module_exit(collie_pm_exit); +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0021-mmc-trivial-annotation-of-blocks.patch b/packages/linux/linux-2.6.28/collie/0021-mmc-trivial-annotation-of-blocks.patch new file mode 100644 index 0000000000..c40be53d9b --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0021-mmc-trivial-annotation-of-blocks.patch @@ -0,0 +1,40 @@ +From 0057c3469772d6cddcaa486abe46a2957bc62a2c Mon Sep 17 00:00:00 2001 +From: Harvey Harrison <harvey.harrison@gmail.com> +Date: Wed, 22 Oct 2008 17:09:00 -0700 +Subject: [PATCH 21/23] mmc: trivial annotation of 'blocks' + +sg_init_one is reading a be32, annotate as such. + +Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> +Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> +--- + drivers/mmc/card/block.c | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index 3d067c3..903c8aa 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -145,7 +145,7 @@ struct mmc_blk_request { + static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) + { + int err; +- u32 blocks; ++ __be32 blocks; + + struct mmc_request mrq; + struct mmc_command cmd; +@@ -204,9 +204,7 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) + if (cmd.error || data.error) + return (u32)-1; + +- blocks = ntohl(blocks); +- +- return blocks; ++ return ntohl(blocks); + } + + static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0022-mmc_block-print-better-error-messages.patch b/packages/linux/linux-2.6.28/collie/0022-mmc_block-print-better-error-messages.patch new file mode 100644 index 0000000000..b6cef07c19 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0022-mmc_block-print-better-error-messages.patch @@ -0,0 +1,93 @@ +From d71af40a7a15a2ee7040fa0d5c8ac1bc19873c7d Mon Sep 17 00:00:00 2001 +From: Adrian Hunter <ext-adrian.hunter@nokia.com> +Date: Thu, 16 Oct 2008 12:55:25 +0300 +Subject: [PATCH 22/23] mmc_block: print better error messages + +Add command response and card status to error +messages. + +Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> +Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> +--- + drivers/mmc/card/block.c | 44 +++++++++++++++++++++++++++++++++++++------- + 1 files changed, 37 insertions(+), 7 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index 903c8aa..cc9b3ab 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -207,6 +207,23 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) + return ntohl(blocks); + } + ++static u32 get_card_status(struct mmc_card *card, struct request *req) ++{ ++ struct mmc_command cmd; ++ int err; ++ ++ memset(&cmd, 0, sizeof(struct mmc_command)); ++ cmd.opcode = MMC_SEND_STATUS; ++ if (!mmc_host_is_spi(card->host)) ++ cmd.arg = card->rca << 16; ++ cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC; ++ err = mmc_wait_for_cmd(card->host, &cmd, 0); ++ if (err) ++ printk(KERN_ERR "%s: error %d sending status comand", ++ req->rq_disk->disk_name, err); ++ return cmd.resp[0]; ++} ++ + static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + { + struct mmc_blk_data *md = mq->data; +@@ -218,7 +235,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + + do { + struct mmc_command cmd; +- u32 readcmd, writecmd; ++ u32 readcmd, writecmd, status = 0; + + memset(&brq, 0, sizeof(struct mmc_blk_request)); + brq.mrq.cmd = &brq.cmd; +@@ -273,19 +290,32 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + * until later as we need to wait for the card to leave + * programming mode even when things go wrong. + */ ++ if (brq.cmd.error || brq.data.error || brq.stop.error) ++ status = get_card_status(card, req); ++ + if (brq.cmd.error) { +- printk(KERN_ERR "%s: error %d sending read/write command\n", +- req->rq_disk->disk_name, brq.cmd.error); ++ printk(KERN_ERR "%s: error %d sending read/write " ++ "command, response %#x, card status %#x\n", ++ req->rq_disk->disk_name, brq.cmd.error, ++ brq.cmd.resp[0], status); + } + + if (brq.data.error) { +- printk(KERN_ERR "%s: error %d transferring data\n", +- req->rq_disk->disk_name, brq.data.error); ++ if (brq.data.error == -ETIMEDOUT && brq.mrq.stop) ++ /* 'Stop' response contains card status */ ++ status = brq.mrq.stop->resp[0]; ++ printk(KERN_ERR "%s: error %d transferring data," ++ " sector %u, nr %u, card status %#x\n", ++ req->rq_disk->disk_name, brq.data.error, ++ (unsigned)req->sector, ++ (unsigned)req->nr_sectors, status); + } + + if (brq.stop.error) { +- printk(KERN_ERR "%s: error %d sending stop command\n", +- req->rq_disk->disk_name, brq.stop.error); ++ printk(KERN_ERR "%s: error %d sending stop command, " ++ "response %#x, card status %#x\n", ++ req->rq_disk->disk_name, brq.stop.error, ++ brq.stop.resp[0], status); + } + + if (!mmc_host_is_spi(card->host) && rq_data_dir(req) != READ) { +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/0023-mmc_block-ensure-all-sectors-that-do-not-have-error.patch b/packages/linux/linux-2.6.28/collie/0023-mmc_block-ensure-all-sectors-that-do-not-have-error.patch new file mode 100644 index 0000000000..3ff32b0a94 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0023-mmc_block-ensure-all-sectors-that-do-not-have-error.patch @@ -0,0 +1,148 @@ +From fba35a4bb8f9cabcd374e19a2a34ee5496d971d2 Mon Sep 17 00:00:00 2001 +From: Adrian Hunter <ext-adrian.hunter@nokia.com> +Date: Wed, 31 Dec 2008 18:21:17 +0100 +Subject: [PATCH 23/23] mmc_block: ensure all sectors that do not have errors are read + +If a card encounters an ECC error while reading a sector it will +timeout. Instead of reporting the entire I/O request as having +an error, redo the I/O one sector at a time so that all readable +sectors are provided to the upper layers. + +Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> +Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> +--- + drivers/mmc/card/block.c | 76 +++++++++++++++++++++++++++++++++++---------- + 1 files changed, 59 insertions(+), 17 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index cc9b3ab..45b1f43 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -229,7 +229,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + struct mmc_blk_data *md = mq->data; + struct mmc_card *card = md->queue.card; + struct mmc_blk_request brq; +- int ret = 1; ++ int ret = 1, disable_multi = 0; + + mmc_claim_host(card->host); + +@@ -251,6 +251,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + brq.stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; + brq.data.blocks = req->nr_sectors; + ++ /* ++ * After a read error, we redo the request one sector at a time ++ * in order to accurately determine which sectors can be read ++ * successfully. ++ */ ++ if (disable_multi && brq.data.blocks > 1) ++ brq.data.blocks = 1; ++ + if (brq.data.blocks > 1) { + /* SPI multiblock writes terminate using a special + * token, not a STOP_TRANSMISSION request. +@@ -279,6 +287,25 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + brq.data.sg = mq->sg; + brq.data.sg_len = mmc_queue_map_sg(mq); + ++ /* ++ * Adjust the sg list so it is the same size as the ++ * request. ++ */ ++ if (brq.data.blocks != req->nr_sectors) { ++ int i, data_size = brq.data.blocks << 9; ++ struct scatterlist *sg; ++ ++ for_each_sg(brq.data.sg, sg, brq.data.sg_len, i) { ++ data_size -= sg->length; ++ if (data_size <= 0) { ++ sg->length += data_size; ++ i++; ++ break; ++ } ++ } ++ brq.data.sg_len = i; ++ } ++ + mmc_queue_bounce_pre(mq); + + mmc_wait_for_req(card->host, &brq.mrq); +@@ -290,8 +317,16 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + * until later as we need to wait for the card to leave + * programming mode even when things go wrong. + */ +- if (brq.cmd.error || brq.data.error || brq.stop.error) ++ if (brq.cmd.error || brq.data.error || brq.stop.error) { ++ if (brq.data.blocks > 1 && rq_data_dir(req) == READ) { ++ /* Redo read one sector at a time */ ++ printk(KERN_WARNING "%s: retrying using single " ++ "block read\n", req->rq_disk->disk_name); ++ disable_multi = 1; ++ continue; ++ } + status = get_card_status(card, req); ++ } + + if (brq.cmd.error) { + printk(KERN_ERR "%s: error %d sending read/write " +@@ -348,8 +383,20 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + #endif + } + +- if (brq.cmd.error || brq.data.error || brq.stop.error) ++ if (brq.cmd.error || brq.stop.error || brq.data.error) { ++ if (rq_data_dir(req) == READ) { ++ /* ++ * After an error, we redo I/O one sector at a ++ * time, so we only reach here after trying to ++ * read a single sector. ++ */ ++ spin_lock_irq(&md->lock); ++ ret = __blk_end_request(req, -EIO, brq.data.blksz); ++ spin_unlock_irq(&md->lock); ++ continue; ++ } + goto cmd_err; ++ } + + /* + * A block was successfully transferred. +@@ -371,25 +418,20 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) + * If the card is not SD, we can still ok written sectors + * as reported by the controller (which might be less than + * the real number of written sectors, but never more). +- * +- * For reads we just fail the entire chunk as that should +- * be safe in all cases. + */ +- if (rq_data_dir(req) != READ) { +- if (mmc_card_sd(card)) { +- u32 blocks; ++ if (mmc_card_sd(card)) { ++ u32 blocks; + +- blocks = mmc_sd_num_wr_blocks(card); +- if (blocks != (u32)-1) { +- spin_lock_irq(&md->lock); +- ret = __blk_end_request(req, 0, blocks << 9); +- spin_unlock_irq(&md->lock); +- } +- } else { ++ blocks = mmc_sd_num_wr_blocks(card); ++ if (blocks != (u32)-1) { + spin_lock_irq(&md->lock); +- ret = __blk_end_request(req, 0, brq.data.bytes_xfered); ++ ret = __blk_end_request(req, 0, blocks << 9); + spin_unlock_irq(&md->lock); + } ++ } else { ++ spin_lock_irq(&md->lock); ++ ret = __blk_end_request(req, 0, brq.data.bytes_xfered); ++ spin_unlock_irq(&md->lock); + } + + mmc_release_host(card->host); +-- +1.5.6.5 + diff --git a/packages/linux/linux-2.6.28/collie/defconfig b/packages/linux/linux-2.6.28/collie/defconfig new file mode 100644 index 0000000000..3baea8435b --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/defconfig @@ -0,0 +1,1677 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.28 +# Tue Feb 10 20:46:22 2009 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +# CONFIG_GROUP_SCHED is not set +# CONFIG_USER_SCHED is not set +# 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 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_COMPAT_BRK=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +# CONFIG_MARKERS is not set +CONFIG_OPROFILE=m +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_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 is not set +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_IOSCHED_CFQ=m +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_CLASSIC_RCU=y +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=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_MSM 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=y +CONFIG_PCMCIA_IOCTL=y + +# +# 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=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PREEMPT=y +CONFIG_HZ=100 +# CONFIG_AEABI is not set +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +# CONFIG_ARCH_SELECT_MEMORY_MODEL 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_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +CONFIG_UNEVICTABLE_LRU=y +# CONFIG_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 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=3 mem=64M fbcon=rotate:1 debug" +# 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 +# +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_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m +# CONFIG_ARTHUR is not set + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_APM_EMULATION=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +CONFIG_XFRM_USER=m +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_ASK_IP_FIB_HASH is not set +# CONFIG_IP_FIB_TRIE 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_BIC is not set +# CONFIG_DEFAULT_CUBIC is not set +# 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 is not set +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set +# CONFIG_NF_CONNTRACK is not set +CONFIG_NETFILTER_XTABLES=m +# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +# CONFIG_NETFILTER_XT_TARGET_MARK is not set +# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set +# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set +# CONFIG_NETFILTER_XT_TARGET_TRACE is not set +# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +# CONFIG_NETFILTER_XT_MATCH_DSCP is not set +# CONFIG_NETFILTER_XT_MATCH_ESP is not set +# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set +# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set +# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set +# CONFIG_NETFILTER_XT_MATCH_MAC is not set +# CONFIG_NETFILTER_XT_MATCH_MARK is not set +# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set +# CONFIG_NETFILTER_XT_MATCH_OWNER is not set +# CONFIG_NETFILTER_XT_MATCH_POLICY is not set +# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_RECENT 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_IP_VS is not set + +# +# IP: Netfilter Configuration +# +# CONFIG_NF_DEFRAG_IPV4 is not set +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_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +# CONFIG_IP6_NF_QUEUE is not set +# CONFIG_IP6_NF_IPTABLES is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +# CONFIG_SCTP_HMAC_MD5 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=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 +# + +# +# FIR device drivers +# +# CONFIG_SA1100_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_HCIBTSDIO is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +# CONFIG_BT_HCIUART_LL is not set +# CONFIG_BT_HCIDTL1 is not set +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBLUECARD is not set +# CONFIG_BT_HCIBTUART is not set +CONFIG_BT_HCIVHCI=m +# 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 is not set +CONFIG_MAC80211_RC_MINSTREL=y +# CONFIG_MAC80211_RC_DEFAULT_PID is not set +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel" +# CONFIG_MAC80211_MESH is not set +# CONFIG_MAC80211_LEDS is not set +# 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=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 +# 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 +CONFIG_MTD_SHARP=y + +# +# Mapping drivers for chip access +# +CONFIG_MTD_COMPLEX_MAPPINGS=y +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=m +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_RESERVE=1 +# CONFIG_MTD_UBI_GLUEBI is not set + +# +# UBI debugging options +# +# CONFIG_MTD_UBI_DEBUG is not set +# CONFIG_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=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# 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=m +# 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 is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +CONFIG_IDE_PROC_FS=y + +# +# IDE chipset support/bugfixes +# +# CONFIG_BLK_DEV_PLATFORM is not set +# CONFIG_BLK_DEV_IDEDMA is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set +# CONFIG_SCSI_DH 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_DELAY is not set +# CONFIG_DM_UEVENT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m +# CONFIG_VETH is not set +# CONFIG_ARCNET is not set +# CONFIG_NET_ETHERNET is not set +CONFIG_MII=m +# 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_PCMCIA_RAYCS=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_CS=m +CONFIG_LIBERTAS_SDIO=m +# CONFIG_LIBERTAS_DEBUG is not set +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_HERMES=m +CONFIG_PCMCIA_HERMES=m +CONFIG_PCMCIA_SPECTRUM=m +CONFIG_ATMEL=m +CONFIG_PCMCIA_ATMEL=m +CONFIG_AIRO_CS=m +CONFIG_PCMCIA_WL3501=m +CONFIG_MAC80211_HWSIM=m +CONFIG_P54_COMMON=m +# CONFIG_IWLWIFI_LEDS is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set +CONFIG_HOSTAP_CS=m +CONFIG_B43=m +# CONFIG_B43_PCMCIA is not set +# CONFIG_B43_DEBUG is not set +CONFIG_B43LEGACY=m +# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DMA=y +CONFIG_B43LEGACY_PIO=y +CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y +# CONFIG_B43LEGACY_DMA_MODE is not set +# CONFIG_B43LEGACY_PIO_MODE is not set +CONFIG_RT2X00=m +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 +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_PPPOL2TP is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=m +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_APMPOWER=y + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_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=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_HTCPEN is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1200_TS is not set +CONFIG_TOUCHSCREEN_COLLIE_TS=y +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 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_UINPUT=m + +# +# 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=m +# 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_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=m +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_IPWIRELESS 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_DEBUG is not set +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_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: +# + +# +# 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=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_PDA_POWER=y +CONFIG_APM_POWER=y +# CONFIG_BATTERY_DS2760 is not set +CONFIG_BATTERY_COLLIE=y +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +# CONFIG_THERMAL_HWMON is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SA1100_WATCHDOG=m + +# +# ISA-based Watchdog Cards +# +# CONFIG_PCWATCHDOG is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_WDT is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_PCMCIAHOST_POSSIBLE=y +# CONFIG_SSB_PCMCIAHOST is not set +# 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_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set + +# +# Multimedia Capabilities Port drivers +# +CONFIG_MCP=y +CONFIG_MCP_SA11X0=y +CONFIG_MCP_UCB1200=y + +# +# Multimedia devices +# + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS 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_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 +# CONFIG_SOUND is not set +# CONFIG_HID_SUPPORT is not set +CONFIG_HID=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 is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_GADGET_MUSB_HDRC 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=500 +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 is not set +# 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_SA1100=y +CONFIG_USB_SA1100=y +# 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 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_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +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 is not set +CONFIG_SDIO_UART=m +CONFIG_MMC_TEST=m + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=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_LOCOMO=y +# CONFIG_LEDS_GPIO is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_IDE_DISK=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=m +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 + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +CONFIG_RTC_DRV_SA1100=y +# CONFIG_DMADEVICES is not set +# CONFIG_REGULATOR is not set +CONFIG_UIO=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_UIO_SMX=m +CONFIG_UIO_SERCOS3=m + +# +# 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 is not set +# CONFIG_REISERFS_FS_XATTR 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_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +# CONFIG_OCFS2_COMPAT_JBD 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=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=m +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=m + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# 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 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_NFSD=m +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +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=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp437" +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_DETECT_SOFTLOCKUP is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_HAVE_FUNCTION_TRACER=y + +# +# Tracers +# +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_CONTEXT_SWITCH_TRACER is not set +# CONFIG_BOOT_TRACER is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_DYNAMIC_PRINTK_DEBUG is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_DEBUG_USER is not set +CONFIG_DEBUG_ERRORS=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_FIPS is not set +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_NULL=m +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_TEST=m + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=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=m +# CONFIG_CRYPTO_XCBC is not set + +# +# 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 is not set +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 is not set +CONFIG_CRYPTO_KHAZAD=m +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_LZO=m + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=m +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +CONFIG_CRC7=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff --git a/packages/linux/linux-linkstationppc/defconfig b/packages/linux/linux-linkstationppc/defconfig index 5f0dd18e8d..4d700a2882 100644 --- a/packages/linux/linux-linkstationppc/defconfig +++ b/packages/linux/linux-linkstationppc/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.27.9 -# Sun Dec 14 21:26:49 2008 +# Linux kernel version: 2.6.27.10 +# Wed Feb 11 00:10:13 2009 # # CONFIG_PPC64 is not set @@ -1158,14 +1158,99 @@ CONFIG_SSB_POSSIBLE=y # # Multimedia core support # -# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L2_COMMON=m +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y # CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers # -# CONFIG_DAB is not set +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_VIDEO_V4L2=m +CONFIG_VIDEO_V4L1=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=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_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=m +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_CX25840=m +CONFIG_VIDEO_CX2341X=m +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_SAA5246A is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_SAA7134 is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_DPC is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_CX88 is not set +# CONFIG_VIDEO_IVTV is not set +# CONFIG_VIDEO_CAFE_CCIC 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_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_QUICKCAM_MESSENGER=m +CONFIG_USB_ET61X251=m +CONFIG_VIDEO_OVCAMCHIP=m +CONFIG_USB_W9968CF=m +CONFIG_USB_OV511=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_STV680=m +CONFIG_USB_ZC0301=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +# CONFIG_SOC_CAMERA is not set +# CONFIG_VIDEO_SH_MOBILE_CEU 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_USB_SI470X is not set +CONFIG_DAB=y +CONFIG_USB_DABUSB=m # # Graphics support diff --git a/packages/linux/linux-linkstationppc/fw-and-powerpc-install.patch b/packages/linux/linux-linkstationppc/fw-and-powerpc-install.patch new file mode 100644 index 0000000000..9f1eda7ef5 --- /dev/null +++ b/packages/linux/linux-linkstationppc/fw-and-powerpc-install.patch @@ -0,0 +1,36 @@ +diff -urN linux-2.6.27.7.old//arch/powerpc/boot/Makefile linux-2.6.27.7//arch/powerpc/boot/Makefile +--- linux-2.6.27.7.old//arch/powerpc/boot/Makefile 2008-11-20 23:02:37.000000000 +0000 ++++ linux-2.6.27.7//arch/powerpc/boot/Makefile 2008-11-22 21:02:13.456791583 +0000 +@@ -376,16 +376,16 @@ + cmd_mkdir = mkdir -p $@ + + quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@) +- cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@ ++ cmd_install = $(INSTALL) -m 0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@ + + quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@) +- cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@ ++ cmd_install_dts = $(INSTALL) -m 0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@ + + quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@) +- cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@ ++ cmd_install_exe = $(INSTALL) -m 0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@ + + quiet_cmd_install_wrapper = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@) +- cmd_install_wrapper = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(srctree)/$(obj)/%,$@) $@ ;\ ++ cmd_install_wrapper = $(INSTALL) -m 0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(srctree)/$(obj)/%,$@) $@ ;\ + sed -i $@ -e 's%^object=.*%object=$(WRAPPER_OBJDIR)%' \ + -e 's%^objbin=.*%objbin=$(WRAPPER_BINDIR)%' \ + +diff -urN linux-2.6.27.7.old//scripts/Makefile.fwinst linux-2.6.27.7//scripts/Makefile.fwinst +--- linux-2.6.27.7.old//scripts/Makefile.fwinst 2008-11-20 23:02:37.000000000 +0000 ++++ linux-2.6.27.7//scripts/Makefile.fwinst 2008-11-22 21:01:50.870504646 +0000 +@@ -37,7 +37,7 @@ + @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/packages/linux/linux-linkstationppc_2.6.27.10.bb b/packages/linux/linux-linkstationppc_2.6.28.4.bb index 2f6308cd27..3c15d78e42 100644 --- a/packages/linux/linux-linkstationppc_2.6.27.10.bb +++ b/packages/linux/linux-linkstationppc_2.6.28.4.bb @@ -1,16 +1,17 @@ DESCRIPTION = "Linux Kernel for the Buffalo Linkstation HD/HG" SECTION = "kernel" LICENSE = "GPL" -PR = "r3" +PR = "r0" DEPENDS = "dtc-native u-boot-mkimage-native" COMPATIBLE_MACHINE = "(lsppchd|lsppchg)" -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2 \ +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2 \ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.gz;patch=1 \ + file://fw-and-powerpc-install.patch;patch=1 \ file://defconfig \ " -S = "${WORKDIR}/linux-2.6.27" +S = "${WORKDIR}/linux-2.6.28" require linux.inc diff --git a/packages/linux/linux-n1200/defconfig b/packages/linux/linux-n1200/defconfig index f37ff8b640..6b5d5b5dfd 100644 --- a/packages/linux/linux-n1200/defconfig +++ b/packages/linux/linux-n1200/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.27-rc9 -# Sun Jan 11 02:29:21 2009 +# Tue Feb 10 21:33:38 2009 # # CONFIG_PPC64 is not set @@ -1214,13 +1214,97 @@ CONFIG_SSB_POSSIBLE=y # # Multimedia core support # -# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L2_COMMON=m +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y # CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers # +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_VIDEO_V4L2=m +CONFIG_VIDEO_V4L1=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=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_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=m +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_CX25840=m +CONFIG_VIDEO_CX2341X=m +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_SAA5246A is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_SAA7134 is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_DPC is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_CX88 is not set +# CONFIG_VIDEO_IVTV is not set +# CONFIG_VIDEO_CAFE_CCIC 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_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_QUICKCAM_MESSENGER=m +CONFIG_USB_ET61X251=m +CONFIG_VIDEO_OVCAMCHIP=m +CONFIG_USB_W9968CF=m +CONFIG_USB_OV511=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_STV680=m +CONFIG_USB_ZC0301=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +# CONFIG_SOC_CAMERA is not set +# CONFIG_VIDEO_SH_MOBILE_CEU 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_USB_SI470X is not set CONFIG_DAB=y CONFIG_USB_DABUSB=m diff --git a/packages/linux/linux-n1200_2.6.27-rc9+git.bb b/packages/linux/linux-n1200_2.6.27-rc9+git.bb index 04062679ca..7674379a6b 100644 --- a/packages/linux/linux-n1200_2.6.27-rc9+git.bb +++ b/packages/linux/linux-n1200_2.6.27-rc9+git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Linux Kernel for the Thecus n1200" SECTION = "kernel" LICENSE = "GPL" -PR = "r2" +PR = "r3" DEPENDS = "u-boot-mkimage-native" COMPATIBLE_MACHINE = "n1200" diff --git a/packages/linux/linux-openmoko-devel_git.bb b/packages/linux/linux-openmoko-devel_git.bb index 4860cca2b6..56c57b395a 100644 --- a/packages/linux/linux-openmoko-devel_git.bb +++ b/packages/linux/linux-openmoko-devel_git.bb @@ -10,7 +10,7 @@ KERNEL_VERSION = "${KERNEL_RELEASE}" OEV = "oe1" PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCREV}" -PR = "r2" +PR = "r3" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ @@ -20,7 +20,7 @@ SRC_URI = "\ S = "${WORKDIR}/git" do_configure_prepend() { - install -m 644 ./arch/arm/configs/gta02-packaging-defconfig ${WORKDIR}/defconfig-oe + install -m 644 ./arch/arm/configs/gta02_packaging_defconfig ${WORKDIR}/defconfig-oe cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} } diff --git a/packages/linux/linux-orion/defconfig b/packages/linux/linux-orion/defconfig index e2ce06256e..84ddcf0e7e 100644 --- a/packages/linux/linux-orion/defconfig +++ b/packages/linux/linux-orion/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.27.10 -# Fri Jan 23 22:58:28 2009 +# Linux kernel version: 2.6.28.4 +# Tue Feb 10 18:45:26 2009 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -22,8 +22,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # 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_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_VECTORS_BASE=0xffff0000 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -78,7 +76,9 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y +CONFIG_AIO=y CONFIG_VM_EVENT_COUNTERS=y +CONFIG_PCI_QUIRKS=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set @@ -86,15 +86,8 @@ CONFIG_SLAB=y # CONFIG_MARKERS is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set -# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set -# CONFIG_HAVE_IOREMAP_PROT is not set CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y -# CONFIG_HAVE_ARCH_TRACEHOOK is not set -# CONFIG_HAVE_DMA_ATTRS is not set -# CONFIG_USE_GENERIC_SMP_HELPERS is not set -# CONFIG_HAVE_CLK is not set -CONFIG_PROC_PAGE_MONITOR=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -127,6 +120,7 @@ CONFIG_DEFAULT_CFQ=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="cfq" CONFIG_CLASSIC_RCU=y +# CONFIG_FREEZER is not set # # System Type @@ -167,7 +161,7 @@ CONFIG_ARCH_ORION5X=y # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_MSM7X00A is not set +# CONFIG_ARCH_MSM is not set # # Orion Implementations @@ -177,15 +171,19 @@ CONFIG_ARCH_ORION5X=y CONFIG_MACH_KUROBOX_PRO=y CONFIG_MACH_DNS323=y CONFIG_MACH_TS209=y +# CONFIG_MACH_TERASTATION_PRO2 is not set CONFIG_MACH_LINKSTATION_PRO=y +# CONFIG_MACH_LINKSTATION_MINI is not set CONFIG_MACH_TS409=y # CONFIG_MACH_WRT350N_V2 is not set # CONFIG_MACH_TS78XX is not set CONFIG_MACH_MV2120=y +# CONFIG_MACH_EDMINI_V2 is not set # CONFIG_MACH_MSS2 is not set # CONFIG_MACH_WNR854T is not set # CONFIG_MACH_RD88F5181L_GE is not set # CONFIG_MACH_RD88F5181L_FXO is not set +# CONFIG_MACH_RD88F6183AP_GE is not set # # Boot options @@ -235,26 +233,30 @@ CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_PREEMPT=y CONFIG_HZ=100 CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set CONFIG_ARCH_FLATMEM_HAS_HOLES=y -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +# 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_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_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 CONFIG_VIRT_TO_BUS=y +CONFIG_UNEVICTABLE_LRU=y CONFIG_ALIGNMENT_TRAP=y # @@ -262,11 +264,16 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="" +CONFIG_CMDLINE=" debug " # CONFIG_XIP_KERNEL is not set # CONFIG_KEXEC is not set # +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set + +# # Floating point emulation # @@ -279,6 +286,8 @@ CONFIG_VFP=y # Userspace binary formats # CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set @@ -357,6 +366,7 @@ CONFIG_IPV6_TUNNEL=m # 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_LLC=m @@ -443,12 +453,11 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m CONFIG_BT_HCIVHCI=m # CONFIG_AF_RXRPC is not set - -# -# Wireless -# +# CONFIG_PHONET is not set +CONFIG_WIRELESS=y CONFIG_CFG80211=m CONFIG_NL80211=y +CONFIG_WIRELESS_OLD_REGULATORY=y CONFIG_WIRELESS_EXT=y CONFIG_WIRELESS_EXT_SYSFS=y CONFIG_MAC80211=m @@ -457,7 +466,9 @@ CONFIG_MAC80211=m # Rate control algorithm selection # CONFIG_MAC80211_RC_PID=y +# CONFIG_MAC80211_RC_MINSTREL is not set CONFIG_MAC80211_RC_DEFAULT_PID=y +# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set CONFIG_MAC80211_RC_DEFAULT="pid" # CONFIG_MAC80211_MESH is not set # CONFIG_MAC80211_LEDS is not set @@ -566,6 +577,7 @@ 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_CAFE is not set @@ -738,6 +750,7 @@ CONFIG_SATA_MV=y # CONFIG_PATA_SCH is not set CONFIG_MD=y CONFIG_BLK_DEV_MD=y +CONFIG_MD_AUTODETECT=y # CONFIG_MD_LINEAR is not set CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m @@ -775,8 +788,25 @@ CONFIG_NETDEVICES=y # CONFIG_TUN is not set # CONFIG_VETH is not set # CONFIG_ARCNET is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set # CONFIG_NET_ETHERNET is not set -CONFIG_MII=y +CONFIG_MII=m CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set @@ -798,6 +828,7 @@ CONFIG_MV643XX_ETH=y # CONFIG_QLA3XXX is not set # CONFIG_ATL1 is not set # CONFIG_ATL1E is not set +# CONFIG_JME is not set # CONFIG_NETDEV_10000 is not set # CONFIG_TR is not set @@ -809,6 +840,7 @@ CONFIG_WLAN_80211=y # CONFIG_IPW2100 is not set # CONFIG_IPW2200 is not set # CONFIG_LIBERTAS is not set +# CONFIG_LIBERTAS_THINFIRM is not set # CONFIG_HERMES is not set # CONFIG_ATMEL is not set # CONFIG_PRISM54 is not set @@ -833,14 +865,15 @@ CONFIG_P54_USB=m CONFIG_ZD1211RW=m CONFIG_ZD1211RW_DEBUG=y CONFIG_RT2X00=m -CONFIG_RT2X00_LIB=m -CONFIG_RT2X00_LIB_USB=m -CONFIG_RT2X00_LIB_FIRMWARE=y # CONFIG_RT2400PCI is not set # CONFIG_RT2500PCI is not set # CONFIG_RT61PCI is not set 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_DEBUG is not set # @@ -854,6 +887,7 @@ CONFIG_USB_USBNET=m CONFIG_USB_NET_AX8817X=m CONFIG_USB_NET_CDCETHER=m 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 @@ -922,7 +956,6 @@ CONFIG_INPUT_TOUCHSCREEN=y # 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=m CONFIG_TOUCHSCREEN_USB_EGALAX=y CONFIG_TOUCHSCREEN_USB_PANJIT=y @@ -1060,12 +1093,14 @@ CONFIG_I2C_DEBUG_ALGO=y # 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_POSSIBLE=y # CONFIG_SSB is not set # @@ -1075,8 +1110,9 @@ CONFIG_SSB_POSSIBLE=y # CONFIG_MFD_SM501 is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_MFD_TMIO is not set -# CONFIG_MFD_T7L66XB is not set -# CONFIG_MFD_TC6387XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM8350_I2C is not set # # Multimedia devices @@ -1085,15 +1121,120 @@ CONFIG_SSB_POSSIBLE=y # # Multimedia core support # -# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L2_COMMON=m +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y # CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers # +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_VIDEO_V4L2=m +CONFIG_VIDEO_V4L1=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEO_IR=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=m +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_CX25840=m +CONFIG_VIDEO_CX2341X=m +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_BT848 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_STRADIS is not set +# CONFIG_VIDEO_SAA7134 is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_CX88 is not set +# CONFIG_VIDEO_IVTV is not set +# CONFIG_VIDEO_CAFE_CCIC 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_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_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_DEBUGIFC is not set +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_QUICKCAM_MESSENGER=m +CONFIG_USB_ET61X251=m +CONFIG_VIDEO_OVCAMCHIP=m +CONFIG_USB_W9968CF=m +CONFIG_USB_OV511=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_STV680=m +CONFIG_USB_ZC0301=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +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_USB_SI470X is not set +# CONFIG_USB_MR800 is not set CONFIG_DAB=y -# CONFIG_USB_DABUSB is not set +CONFIG_USB_DABUSB=m # # Graphics support @@ -1116,6 +1257,7 @@ CONFIG_DAB=y CONFIG_DUMMY_CONSOLE=y CONFIG_FONT_8x16=y CONFIG_SOUND=m +CONFIG_SOUND_OSS_CORE=y CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m @@ -1162,6 +1304,8 @@ CONFIG_USB_DEVICE_CLASS=y # CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set # CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set # # USB Host Controller Drivers @@ -1179,6 +1323,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_UHCI_HCD=y CONFIG_USB_SL811_HCD=y # CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_WHCI_HCD is not set +# CONFIG_USB_HWA_HCD is not set # # USB Device Class drivers @@ -1186,13 +1332,14 @@ CONFIG_USB_SL811_HCD=y CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m CONFIG_USB_WDM=m +# CONFIG_USB_TMC is not set # -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; # # -# may also be needed; see USB_STORAGE Help for more information +# see USB_STORAGE Help for more information # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set @@ -1282,6 +1429,7 @@ CONFIG_USB_SERIAL_OMNINET=m CONFIG_USB_EMI62=m CONFIG_USB_EMI26=m # CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m @@ -1300,13 +1448,15 @@ CONFIG_USB_SISUSBVGA_CON=y # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set CONFIG_USB_ISIGHTFW=m +# CONFIG_USB_VST is not set # CONFIG_USB_GADGET is not set +# CONFIG_UWB is not set CONFIG_MMC=m # CONFIG_MMC_DEBUG is not set # CONFIG_MMC_UNSAFE_RESUME is not set # -# MMC/SD Card Drivers +# MMC/SD/SDIO Card Drivers # CONFIG_MMC_BLOCK=m CONFIG_MMC_BLOCK_BOUNCE=y @@ -1314,10 +1464,12 @@ CONFIG_MMC_BLOCK_BOUNCE=y # CONFIG_MMC_TEST is not set # -# MMC/SD Host Controller Drivers +# MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_SDHCI is not set # CONFIG_MMC_TIFM_SD 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 @@ -1350,6 +1502,7 @@ CONFIG_RTC_DRV_M41T80=y # CONFIG_RTC_DRV_M41T80_WDT is not set CONFIG_RTC_DRV_S35390A=y # CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set # # SPI RTC drivers @@ -1359,12 +1512,15 @@ CONFIG_RTC_DRV_S35390A=y # 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 # @@ -1383,14 +1539,7 @@ CONFIG_DMA_ENGINE=y # # CONFIG_NET_DMA is not set # CONFIG_DMATEST is not set - -# -# Voltage and Current regulators -# # CONFIG_REGULATOR is not set -# CONFIG_REGULATOR_FIXED_VOLTAGE is not set -# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set -# CONFIG_REGULATOR_BQ24022 is not set # CONFIG_UIO is not set # @@ -1405,7 +1554,7 @@ CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_SECURITY=y -# CONFIG_EXT4DEV_FS is not set +# CONFIG_EXT4_FS is not set CONFIG_JBD=y CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=y @@ -1420,6 +1569,7 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set CONFIG_JFS_STATISTICS=y CONFIG_FS_POSIX_ACL=y +CONFIG_FILE_LOCKING=y CONFIG_XFS_FS=y CONFIG_XFS_QUOTA=y CONFIG_XFS_POSIX_ACL=y @@ -1464,6 +1614,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # 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 @@ -1517,6 +1668,7 @@ CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y +# CONFIG_SUNRPC_REGISTER_V4 is not set CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set @@ -1604,15 +1756,15 @@ CONFIG_FRAME_WARN=1024 # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_MEMORY_INIT is not set CONFIG_FRAME_POINTER=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_LATENCYTOP is not set CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_HAVE_FTRACE=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -# CONFIG_FTRACE 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_HAVE_FUNCTION_TRACER=y + +# +# Tracers +# +# CONFIG_DYNAMIC_PRINTK_DEBUG is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_DEBUG_USER is not set @@ -1622,6 +1774,7 @@ CONFIG_HAVE_ARCH_KGDB=y # # 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=y @@ -1632,11 +1785,18 @@ CONFIG_CRYPTO=y # # Crypto core or helper # +# CONFIG_CRYPTO_FIPS is not set CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_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 @@ -1708,6 +1868,11 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_DEFLATE=m # CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_HIFN_795X is not set @@ -1715,8 +1880,6 @@ CONFIG_CRYPTO_HW=y # Library routines # CONFIG_BITREVERSE=y -# CONFIG_GENERIC_FIND_FIRST_BIT is not set -# CONFIG_GENERIC_FIND_NEXT_BIT is not set CONFIG_CRC_CCITT=y CONFIG_CRC16=y CONFIG_CRC_T10DIF=y diff --git a/packages/linux/linux-orion_2.6.27.10.bb b/packages/linux/linux-orion_2.6.28.4.bb index 500d959a9a..c0a7d3c9af 100644 --- a/packages/linux/linux-orion_2.6.27.10.bb +++ b/packages/linux/linux-orion_2.6.28.4.bb @@ -1,19 +1,19 @@ DESCRIPTION = "Linux Kernel for Marvell Orion based devices" SECTION = "kernel" LICENSE = "GPL" -PR = "r6" +PR = "r0" COMPATIBLE_MACHINE = "(dns323|mv2120|kuropro|lspro|tsx09|ts409)" require linux.inc -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2 \ +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2 \ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.gz;patch=1 \ file://kuropro-foonas-mtd.patch;patch=1 \ file://fw-and-powerpc-install.patch;patch=1 \ file://defconfig \ " -S = "${WORKDIR}/linux-2.6.27" +S = "${WORKDIR}/linux-2.6.28" # Fix the mach-type of orion devices - always passed 526 SRC_URI_append_dns323 += "file://dns323.patch;patch=1" diff --git a/packages/linux/linux_2.6.24.bb b/packages/linux/linux_2.6.24.bb index d7b9abf506..7c4ee55173 100644 --- a/packages/linux/linux_2.6.24.bb +++ b/packages/linux/linux_2.6.24.bb @@ -8,10 +8,10 @@ DEFAULT_PREFERENCE_simpad = "1" DEFAULT_PREFERENCE_atngw100 = "1" DEFAULT_PREFERENCE_at32stk1000 = "1" DEFAULT_PREFERENCE_ts72xx = "1" -DEFAULT_PREFERENCE_oxe810 = "1" +DEFAULT_PREFERENCE_oxnas = "1" DEFAULT_PREFERENCE_cs-e9302 = "1" -PR = "r18" +PR = "r20" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \ http://kamikaze.waninkoko.info/patches/2.6.24/kamikaze1/broken-out/squashfs-lzma-2.6.24.patch;patch=1 \ @@ -84,8 +84,9 @@ SRC_URI_append_ts72xx = "\ file://ts72xx-use-cpld-reset.patch;patch=1 \ file://ts72xx-rs485.patch;patch=1" -SRC_URI_append_oxe810 = " \ - file://oxe810.diff;patch=1 \ +SRC_URI_append_oxnas = " \ + file://oxnas.diff;patch=1 \ + file://oxnas-uart.patch;patch=1 \ " CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=1 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2" diff --git a/packages/linux/linux_2.6.27.bb b/packages/linux/linux_2.6.27.bb index 7da406a0d3..4b094bf48c 100644 --- a/packages/linux/linux_2.6.27.bb +++ b/packages/linux/linux_2.6.27.bb @@ -1,6 +1,6 @@ require linux.inc -PR = "r3" +PR = "r4" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" @@ -21,8 +21,8 @@ SRC_URI_append_boc01 = "\ file://010-090112-mii.patch;patch=1 \ file://011-090115-gpio.patch;patch=1 \ file://012-090115-cy3218-btns.patch;patch=1 \ - file://013-090116-lcd.patch;patch=1 \ - file://014-090115-pm-wakeup.patch;patch=1 \ + file://013-090209-lcd.patch;patch=1 \ + file://014-090209-pm-wakeup.patch;patch=1 \ " SRC_URI_append_progear = "file://progear-bl.patch;patch=1\ diff --git a/packages/linux/linux_2.6.28.bb b/packages/linux/linux_2.6.28.bb index 393209c3be..331f6bb6d4 100644 --- a/packages/linux/linux_2.6.28.bb +++ b/packages/linux/linux_2.6.28.bb @@ -1,12 +1,13 @@ require linux.inc -PR = "r2" +PR = "r3" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_at91sam9263ek = "28" DEFAULT_PREFERENCE_stb225 = "28" +DEFAULT_PREFERENCE_collie = "1" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2 \ file://defconfig" @@ -20,3 +21,29 @@ SRC_URI_append_stb225 = " \ file://ebase-fix.patch;patch=1 \ file://enable-uart.patch;patch=1 \ file://ip3902.patch;patch=1" + +SRC_URI_append_collie = " \ + file://0001-collie-start-scoop-converton-to-new-api.patch;patch=1 \ + file://0002-add-locomo_spi-driver.patch;patch=1 \ + file://0003-enable-cpufreq-for-collie.patch;patch=1 \ + file://0004-fix-dma-for-SA1100.patch;patch=1 \ + file://0005-fix-collie-keyboard-bug.patch;patch=1 \ + file://0006-add-collie-flash-hack.patch;patch=1 \ + file://0007-hostap-workaround-for-buggy-sa1100-pcmcia-driver.patch;patch=1 \ + file://0008-fix-collie-suspend-hack.patch;patch=1 \ + file://0009-add-sa1100-usb-gadget-driver-hack.patch;patch=1 \ + file://0010-mmc_spi-add-suspend-and-resume-callbacks.patch;patch=1 \ + file://0011-move-drivers-mfd-.h-to-include-linux-mfd.patch;patch=1 \ + file://0012-move-ucb1200-ts-driver.patch;patch=1 \ + file://0013-add-collie-touchscreen-driver.patch;patch=1 \ + file://0014-collie-locomo-led-change-default-trigger.patch;patch=1 \ + file://0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch;patch=1 \ + file://0016-add-gpiolib-support-to-ucb1x00.patch;patch=1 \ + file://0017-collie-convert-to-gpiolib-for-ucb1x00.patch;patch=1 \ + file://0018-collie-add-battery-driver.patch;patch=1 \ + file://0019-collie-support-pda_power-driver.patch;patch=1 \ + file://0020-remove-collie_pm.c.patch;patch=1 \ + file://0021-mmc-trivial-annotation-of-blocks.patch;patch=1 \ + file://0022-mmc_block-print-better-error-messages.patch;patch=1 \ + file://0023-mmc_block-ensure-all-sectors-that-do-not-have-error.patch;patch=1 " + diff --git a/packages/make/mingw-make-canadian-sdk_3.81.bb b/packages/make/mingw-make-canadian-sdk_3.81.bb new file mode 100644 index 0000000000..3479dad249 --- /dev/null +++ b/packages/make/mingw-make-canadian-sdk_3.81.bb @@ -0,0 +1,16 @@ +PR = "r0" + +require make.inc + +inherit canadian-sdk + +DESCRIPTION = "GNU Make examines the timestamps on a set of \ +interdependent files, and, if necessary, issues commands \ +to bring them up-to-date - MinGW port." +HOMEPAGE = "http://www.mingw.org/" + +DEPENDS = "virtual/${HOST_PREFIX}binutils virtual/${HOST_PREFIX}gcc" + +SRC_URI = "${SOURCEFORGE_MIRROR}/mingw/mingw32-make-3.81-20080326-src.tar.gz" + +S = "${WORKDIR}/make-${PV}-patched" diff --git a/packages/mingw/mingw-runtime-headers_3.15.2.bb b/packages/mingw/mingw-runtime-headers_3.15.2.bb new file mode 100644 index 0000000000..8c77b6a594 --- /dev/null +++ b/packages/mingw/mingw-runtime-headers_3.15.2.bb @@ -0,0 +1,3 @@ +require mingw-runtime_${PV}.bb + +require mingw-runtime-headers.inc diff --git a/packages/mingw/mingw-runtime_3.15.2.bb b/packages/mingw/mingw-runtime_3.15.2.bb new file mode 100644 index 0000000000..c691d0749d --- /dev/null +++ b/packages/mingw/mingw-runtime_3.15.2.bb @@ -0,0 +1,7 @@ +require mingw-runtime.inc + +PR = "r1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/mingw/mingwrt-${PV}-mingw32-src.tar.gz" + +S = "${WORKDIR}/mingwrt-${PV}-mingw32" diff --git a/packages/mktemp/files/add_destdir.patch b/packages/mktemp/files/add_destdir.patch new file mode 100644 index 0000000000..5eede383b3 --- /dev/null +++ b/packages/mktemp/files/add_destdir.patch @@ -0,0 +1,20 @@ +diff -NurpP --minimal mktemp-1.6/Makefile.in mktemp-1.6-addDESTDIR/Makefile.in +--- mktemp-1.6/Makefile.in 2008-08-17 23:38:34.000000000 +0800 ++++ mktemp-1.6-addDESTDIR/Makefile.in 2008-10-20 14:28:42.000000000 +0800 +@@ -106,13 +106,13 @@ $(OBJS): config.h + install: install-dirs install-binaries install-man + + install-dirs: +- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(mandir)/man1 ++ $(SHELL) $(srcdir)/mkinstalldirs ${DESTDIR}/$(bindir) ${DESTDIR}/$(mandir)/man1 + + install-binaries: $(PROG) +- $(INSTALL) -m 0555 -s $(PROG) $(bindir)/$(PROG) ++ $(INSTALL) -m 0555 -s $(PROG) ${DESTDIR}/$(bindir)/$(PROG) + + install-man: +- $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) $(mandir)/man1/mktemp.1 ++ $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) ${DESTDIR}/$(mandir)/man1/mktemp.1 + + check: + @echo nothing to check diff --git a/packages/mktemp/files/disable-strip.patch b/packages/mktemp/files/disable-strip.patch new file mode 100644 index 0000000000..96269863a4 --- /dev/null +++ b/packages/mktemp/files/disable-strip.patch @@ -0,0 +1,12 @@ +diff -NurpP --minimal mktemp-1.6/Makefile.in mktemp-1.6-disable-strip/Makefile.in +--- mktemp-1.6/Makefile.in 2009-01-22 15:11:33.000000000 +0800 ++++ mktemp-1.6-disable-strip/Makefile.in 2009-01-22 15:13:52.000000000 +0800 +@@ -109,7 +109,7 @@ install-dirs: + $(SHELL) $(srcdir)/mkinstalldirs ${DESTDIR}/$(bindir) ${DESTDIR}/$(mandir)/man1 + + install-binaries: $(PROG) +- $(INSTALL) -m 0555 -s $(PROG) ${DESTDIR}/$(bindir)/$(PROG) ++ $(INSTALL) -m 0555 $(PROG) ${DESTDIR}/$(bindir)/$(PROG) + + install-man: + $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) ${DESTDIR}/$(mandir)/man1/mktemp.1 diff --git a/packages/mktemp/mktemp_1.6.bb b/packages/mktemp/mktemp_1.6.bb new file mode 100644 index 0000000000..bd9c4caa7d --- /dev/null +++ b/packages/mktemp/mktemp_1.6.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Allow safe temporary file creation from shell scripts." +HOMEPAGE = "http://www.mktemp.org/" +SECTION = "console/utils" +LICENSE = "GPLv2 BSD" + +inherit autotools + +EXTRA_OECONF = "--with-libc" + +SRC_URI = "\ + ftp://ftp.mktemp.org/pub/mktemp/${P}.tar.gz \ + file://add_destdir.patch;patch=1 \ + file://disable-strip.patch;patch=1 \ +" + +# FIXME should rather use update-alternatives +RCONFLICTS_${PN} = "coreutils" diff --git a/packages/nonworking/e2fsprogs/e2fsprogs_1.41.2.bb b/packages/nonworking/e2fsprogs/e2fsprogs_1.41.2.bb new file mode 100644 index 0000000000..1b139d2a9c --- /dev/null +++ b/packages/nonworking/e2fsprogs/e2fsprogs_1.41.2.bb @@ -0,0 +1,87 @@ +require e2fsprogs.inc + +PR = "r0" +DEFAULT_PREFERENCE = "-1" + +SRC_URI += "file://no-hardlinks.patch;patch=1" + +do_compile_prepend () { + find ./ -print|xargs chmod u=rwX + ( cd util; ${BUILD_CC} subst.c -o subst ) +} + +ext2fsheaders = "ext2_ext_attr.h bitops.h ext2_err.h \ + ext2_types.h ext2_fs.h ext2_io.h \ + ext2fs.h" +e2pheaders = "e2p.h" + +do_stage () { + oe_libinstall -a -C lib libe2p ${STAGING_LIBDIR}/ + oe_libinstall -a -C lib libext2fs ${STAGING_LIBDIR}/ + install -d ${STAGING_INCDIR}/e2p + for h in ${e2pheaders}; do + install -m 0644 lib/e2p/$h ${STAGING_INCDIR}/e2p/ || die "failed to install $h" + done + install -d ${STAGING_INCDIR}/ext2fs + for h in ${ext2fsheaders}; do + install -m 0644 lib/ext2fs/$h ${STAGING_INCDIR}/ext2fs/ || die "failed to install $h" + done + autotools_stage_all +} + +# blkid used to be part of e2fsprogs but is useful outside, add it +# as an RDEPENDS so that anything relying on it being in e2fsprogs +# still works +RDEPENDS_e2fsprogs = "e2fsprogs-blkid e2fsprogs-uuidgen e2fsprogs-badblocks" + +PACKAGES =+ "e2fsprogs-blkid e2fsprogs-uuidgen e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-fsck e2fsprogs-tune2fs e2fsprogs-badblocks" +FILES_e2fsprogs-blkid = "${base_sbindir}/blkid" +FILES_e2fsprogs-uuidgen = "${bindir}/uuidgen" +FILES_e2fsprogs-fsck = "${base_sbindir}/fsck.${PN}" +FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck.${PN} ${base_sbindir}/fsck.ext*.${PN}" +FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.${PN} ${base_sbindir}/mkfs.ext*.${PN}" +FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label ${base_sbindir}/findfs" +FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks" + +do_install_append () { + mv ${D}${base_sbindir}/fsck ${D}${base_sbindir}/fsck.${PN} + mv ${D}${base_sbindir}/e2fsck ${D}${base_sbindir}/e2fsck.${PN} + mv ${D}${base_sbindir}/fsck.ext2 ${D}${base_sbindir}/fsck.ext2.${PN} + mv ${D}${base_sbindir}/fsck.ext3 ${D}${base_sbindir}/fsck.ext3.${PN} + mv ${D}${base_sbindir}/mke2fs ${D}${base_sbindir}/mke2fs.${PN} + mv ${D}${base_sbindir}/mkfs.ext2 ${D}${base_sbindir}/mkfs.ext2.${PN} + mv ${D}${base_sbindir}/mkfs.ext3 ${D}${base_sbindir}/mkfs.ext3.${PN} +} + +pkg_postinst_e2fsprogs-fsck () { + update-alternatives --install ${base_sbindir}/fsck fsck fsck.${PN} 100 +} + +pkg_prerm_e2fsprogs-fsck () { + update-alternatives --remove fsck fsck.${PN} +} + +pkg_postinst_e2fsprogs-e2fsck () { + update-alternatives --install ${base_sbindir}/e2fsck e2fsck e2fsck.${PN} 100 + update-alternatives --install ${base_sbindir}/fsck.ext2 fsck.ext2 fsck.ext2.${PN} 100 + update-alternatives --install ${base_sbindir}/fsck.ext3 fsck.ext3 fsck.ext3.${PN} 100 +} + +pkg_prerm_e2fsprogs-e2fsck () { + update-alternatives --remove e2fsck e2fsck.${PN} + update-alternatives --remove fsck.ext2 fsck.ext2.${PN} + update-alternatives --remove fsck.ext3 fsck.ext3.${PN} +} + +pkg_postinst_e2fsprogs-mke2fs () { + update-alternatives --install ${base_sbindir}/mke2fs mke2fs mke2fs.${PN} 100 + update-alternatives --install ${base_sbindir}/mkfs.ext2 mkfs.ext2 mkfs.ext2.${PN} 100 + update-alternatives --install ${base_sbindir}/mkfs.ext3 mkfs.ext3 mkfs.ext3.${PN} 100 +} + +pkg_prerm_e2fsprogs-mke2fs () { + update-alternatives --remove mke2fs mke2fs.${PN} + update-alternatives --remove mkfs.ext2 mkfs.ext2.${PN} + update-alternatives --remove mkfs.ext3 mkfs.ext3.${PN} +} + diff --git a/packages/ogre/ogre-egl_svn.bb b/packages/ogre/ogre-egl_svn.bb index 8cecf56a7d..61d2429945 100644 --- a/packages/ogre/ogre-egl_svn.bb +++ b/packages/ogre/ogre-egl_svn.bb @@ -2,6 +2,8 @@ DESCRIPTION = "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-orien LICENSE = "LGPL" DEPENDS = "zziplib boost freeimage freetype virtual/libx11 virtual/egl" +PR = "r1" + SRCREV = "8310" PV = "1.6.1+svnr${SRCREV}" @@ -25,5 +27,5 @@ do_configure_prepend() { FILES_${PN}-dbg += "${libdir}/OGRE/.debug" FILES_${PN}-dev += "${libdir}/OGRE/*.la" -FILES_${PN} += "${libdir}/OGRE/*.so" +FILES_${PN} += "${libdir}/libOgreMain-*.so ${libdir}/OGRE/*.so" diff --git a/packages/parted/files/parted-1.8.x.patch b/packages/parted/files/parted-1.8.x.patch new file mode 100644 index 0000000000..167a0fbeff --- /dev/null +++ b/packages/parted/files/parted-1.8.x.patch @@ -0,0 +1,1492 @@ +diff --git a/configure.ac b/configure.ac +index f1284a0..9f0971b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5,7 +5,7 @@ dnl + dnl This file may be modified and/or distributed without restriction. + + AC_PREREQ(2.61) +-AC_INIT([GNU parted],[1.8.8],[bug-parted@gnu.org]) ++AC_INIT([GNU parted],[1.8.9],[bug-parted@gnu.org]) + + AC_CONFIG_SRCDIR(include/parted/parted.h) + +@@ -24,7 +24,7 @@ dnl function signatures changed), + dnl set PED_BINARY_AGE _and_ PED_INTERFACE_AGE to 0. + PED_MAJOR_VERSION=1 + PED_MINOR_VERSION=8 +-PED_MICRO_VERSION=8 ++PED_MICRO_VERSION=9 + PED_INTERFACE_AGE=0 + PED_BINARY_AGE=0 + PED_VERSION_SUFFIX= +@@ -471,14 +471,7 @@ AC_CHECK_HEADER([execinfo.h], [ + ]) + ]) + +-dnl Checks for #defines. +-AC_COMPILE_IFELSE([ +- AC_LANG_PROGRAM([[ +- #if defined __s390__ || defined __s390x__ +- # message s390 defined +- #endif +- ]])], [compile_for_s390="no"], [compile_for_s390="yes"]) +-AM_CONDITIONAL([COMPILE_FOR_S390], [test "$compile_for_s390" = "yes"]) ++AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x]) + + dnl check for "check", unit testing library/header + PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) +diff --git a/doc/C/parted.8 b/doc/C/parted.8 +index 7040402..fdf3d04 100644 +--- a/doc/C/parted.8 ++++ b/doc/C/parted.8 +@@ -124,6 +124,18 @@ and a human-friendly form for output). + .B version + Display version information and a copyright message. + .RE ++.SH KNOWN ISSUES ++ext3 filesystem resizing does not currently work, please use ++.BR resize2fs (8) ++instead. ++ ++Resizing partitions with an ext3 filesystem will not generally work because ++of the above issue. Use ++.BR resize2fs (8) ++to resize the filesystem and resize the partition manually using ++.BR fdisk (8) ++or a similar tool. For LVM situations, you will need to use the LVM commands ++to resize the LVM elements. + .SH REPORTING BUGS + Report bugs to <bug-parted@gnu.org> + .SH SEE ALSO +diff --git a/doc/parted.texi b/doc/parted.texi +index 139ea77..86ec076 100644 +--- a/doc/parted.texi ++++ b/doc/parted.texi +@@ -14,7 +14,7 @@ resizing, checking and copy partitions and file systems on them. + @ifnottex @c texi2pdf don't understand copying and insertcopying ??? + @c modifications must also be done in the titlepage + @copying +-Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 ++Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this document +@@ -63,7 +63,7 @@ Free Documentation License''. + + @c WTF doesn't texi2html include the titlepage? + @ifhtml +-@insertcopying ++@insertcopying + @end ifhtml + + This document describes the use of GNU Parted, a program for creating, +@@ -257,7 +257,7 @@ $ @kbd{make} + However, there are a few options for @command{configure}: + + @table @code +-@item --without-readline ++@item --without-readline + turns off use of readline. This is useful for making rescue disks, + etc., where few libraries are available. + +@@ -275,12 +275,12 @@ you don't need the flexibility. + @item --disable-fs + disable all file system support + +-@item --disable-nls ++@item --disable-nls + turns off native language support. This is useful for use with old + versions of glibc, or a trimmed down version of glibc suitable for + rescue disks. + +-@item --disable-shared ++@item --disable-shared + turns off shared libraries. This may be necessary for use with old + versions of GNU libc, if you get a compile error about a ``spilled + register''. Also useful for boot/rescue disks. +@@ -301,7 +301,7 @@ disable writing (for debugging) + + @node Static binaries + @section Using static binaries of GNU Parted +-@cindex static binary ++@cindex static binary + @cindex unsupported platforms + @cindex resizing root device + +@@ -320,7 +320,7 @@ of the latest GNU Parted version is available, which you can use thus: + + @subsection Creating the Parted disk + @enumerate +-@item Boot your system ++@item Boot your system + + @item Download @file{parted-static-VERSION.tgz} from @uref{ftp://ftp.gnu.org/gnu/parted/static} + @item Unpack the tarball, resulting in a file called ``parted.static". +@@ -329,7 +329,7 @@ of the latest GNU Parted version is available, which you can use thus: + + @item Do a low-level format on it (on GNU/Linux this can be achieved with + the tool ``fdformat" from the ``util-linux" package. +- This is basically a sanity check because floppy disks often ++ This is basically a sanity check because floppy disks often + contain bad blocks. + + @item Create a file system. Example: +@@ -359,7 +359,7 @@ $ @kbd{umount /mnt/floppy} + + @subsection Using the Parted disk + @enumerate +-@item Choose a rescue disk that suits you. ++@item Choose a rescue disk that suits you. + + @item Boot off your rescue disk. Mount the disk you copied Parted onto. + +@@ -383,7 +383,7 @@ $ @kbd{umount /mnt/floppy} + @end menu + + @node Partitioning +-@section Introduction to Partitioning ++@section Introduction to Partitioning + @cindex partitioning overview + + Unfortunately, partitioning your disk is rather complicated. This is +@@ -566,7 +566,7 @@ Supported file systems: + (provided the destination partition is larger than the source partition) + + @item fat16, fat32 +-@item linux-swap ++@item linux-swap + (equivalent to mkswap on destination partition) + @item reiserfs (if libreiserfs is installed) + +@@ -918,7 +918,7 @@ partitions can be resized only so long as the new extended partition + completely contains all logical partitions. + + Note that Parted can manipulate partitions whether or not they have been +-defragmented, so you do not need to defragmenting the disk before ++defragmented, so you do not need to defragment the disk before + using Parted. + + Supported file systems: +@@ -1031,7 +1031,7 @@ Microsoft operating systems. + + @item raid + (MS-DOS) - this flag can be enabled to tell linux the partition is a +-software RAID partition. ++software RAID partition. + + @item LVM + (MS-DOS) - this flag can be enabled to tell linux the partition is a +@@ -1109,59 +1109,59 @@ specified after an input number. Input numbers can be followed by + an unit (without any space or other character between them), in + which case this unit apply instead of the default unit for this + particular number, but CHS and cylinder units are not supported as +-a suffix. If no suffix is given, then the default unit is assumed. ++a suffix. If no suffix is given, then the default unit is assumed. + Parted will compute sensible ranges for the locations you specify + (e.g. a range of +/- 500 MB when you specify the location in ``G'') + and will select the nearest location in this range from the one you + wrote that satisfies constraints from both the operation, the + filesystem being worked on, the disk label, other partitions and so + on. Use the sector unit ``s'' to specify exact locations (if they +-do not satisfy all onstraints, Parted will ask you for the nearest ++do not satisfy all onstraints, Parted will ask you for the nearest + solution). Note that negative numbers count back from the end of +-the disk, with ``-1s'' pointing to the end of the disk. ++the disk, with ``-1s'' pointing to the end of the disk. + + Example: + + @example + @group +-(parted) unit compact +-(parted) print ++(parted) unit compact ++(parted) print + Disk geometry for /dev/hda: 0kB - 123GB + Disk label type: msdos + Number Start End Size Type File system Flags + 1 32kB 1078MB 1077MB primary reiserfs boot +-2 1078MB 2155MB 1078MB primary linux-swap +-3 2155MB 123GB 121GB extended +-5 2155MB 7452MB 5297MB logical reiserfs ++2 1078MB 2155MB 1078MB primary linux-swap ++3 2155MB 123GB 121GB extended ++5 2155MB 7452MB 5297MB logical reiserfs + @end group + @group +-(parted) unit chs print ++(parted) unit chs print + Disk geometry for /dev/hda: 0,0,0 - 14946,225,62 + BIOS cylinder,head,sector geometry: 14946,255,63. Each cylinder + is 8225kB. + Disk label type: msdos + Number Start End Type File system Flags + 1 0,1,0 130,254,62 primary reiserfs boot +-2 131,0,0 261,254,62 primary linux-swap +-3 262,0,0 14945,254,62 extended +-5 262,2,0 905,254,62 logical reiserfs ++2 131,0,0 261,254,62 primary linux-swap ++3 262,0,0 14945,254,62 extended ++5 262,2,0 905,254,62 logical reiserfs + @end group + @group +-(parted) unit mb print ++(parted) unit mb print + Disk geometry for /dev/hda: 0MB - 122942MB + Disk label type: msdos + Number Start End Size Type File system Flags + 1 0MB 1078MB 1077MB primary reiserfs boot +-2 1078MB 2155MB 1078MB primary linux-swap +-3 2155MB 122935MB 120780MB extended +-5 2155MB 7452MB 5297MB logical reiserfs ++2 1078MB 2155MB 1078MB primary linux-swap ++3 2155MB 122935MB 120780MB extended ++5 2155MB 7452MB 5297MB logical reiserfs + @end group + @end example + + @end deffn + + @node Related information +-@chapter Related information ++@chapter Related information + @cindex further reading + @cindex related documentation + +diff --git a/include/parted/constraint.h b/include/parted/constraint.h +index 7a39602..6496926 100644 +--- a/include/parted/constraint.h ++++ b/include/parted/constraint.h +@@ -22,6 +22,7 @@ + typedef struct _PedConstraint PedConstraint; + + #include <parted/device.h> ++#include <parted/geom.h> + #include <parted/natmath.h> + + struct _PedConstraint { +diff --git a/include/parted/device.h b/include/parted/device.h +index cf32dba..e669688 100644 +--- a/include/parted/device.h ++++ b/include/parted/device.h +@@ -26,6 +26,7 @@ + #ifndef PED_DEVICE_H_INCLUDED + #define PED_DEVICE_H_INCLUDED + ++#include <parted/constraint.h> + #include <parted/timer.h> + + /** We can address 2^63 sectors */ +@@ -45,9 +46,7 @@ typedef enum { + PED_DEVICE_DASD = 9, + PED_DEVICE_VIODASD = 10, + PED_DEVICE_SX8 = 11, +-#ifdef ENABLE_DEVICE_MAPPER + PED_DEVICE_DM = 12, +-#endif + PED_DEVICE_XVD = 13 + } PedDeviceType; + +diff --git a/include/parted/disk.h b/include/parted/disk.h +index b82ea0f..1b0133d 100644 +--- a/include/parted/disk.h ++++ b/include/parted/disk.h +@@ -1,6 +1,6 @@ + /* + libparted - a library for manipulating disk partitions +- Copyright (C) 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. ++ Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + 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 +@@ -52,10 +52,11 @@ enum _PedPartitionFlag { + PED_PARTITION_HPSERVICE=8, + PED_PARTITION_PALO=9, + PED_PARTITION_PREP=10, +- PED_PARTITION_MSFT_RESERVED=11 ++ PED_PARTITION_MSFT_RESERVED=11, ++ PED_PARTITION_BIOS_GRUB=12 + }; + #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT +-#define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_RESERVED ++#define PED_PARTITION_LAST_FLAG PED_PARTITION_BIOS_GRUB + + enum _PedDiskTypeFeature { + PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ +diff --git a/include/parted/linux.h b/include/parted/linux.h +index 52d28be..05a2f0e 100644 +--- a/include/parted/linux.h ++++ b/include/parted/linux.h +@@ -22,7 +22,7 @@ + #include <parted/parted.h> + #include <parted/device.h> + +-#if defined __s390__ || defined __s390x__ ++#if defined(__s390__) || defined(__s390x__) + # include <parted/fdasd.h> + #endif + +diff --git a/include/parted/natmath.h b/include/parted/natmath.h +index 32a6e28..e387833 100644 +--- a/include/parted/natmath.h ++++ b/include/parted/natmath.h +@@ -30,6 +30,7 @@ + typedef struct _PedAlignment PedAlignment; + + #include <parted/disk.h> ++#include <parted/device.h> + + #define PED_MIN(a, b) ( ((a)<(b)) ? (a) : (b) ) + #define PED_MAX(a, b) ( ((a)>(b)) ? (a) : (b) ) +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 462ab92..9876956 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -64,7 +64,7 @@ + #define HDIO_GETGEO 0x0301 /* get device geometry */ + #define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ + +-#if defined(O_DIRECT) && (!defined(__s390__) || !defined(__s390x__)) ++#if defined(O_DIRECT) && !(defined(__s390__) || defined(__s390x__)) + #define RD_MODE (O_RDONLY | O_DIRECT) + #define WR_MODE (O_WRONLY | O_DIRECT) + #define RW_MODE (O_RDWR | O_DIRECT) +@@ -986,7 +986,7 @@ error: + } + + static int +-init_dasd (PedDevice* dev, char* model_name) ++init_dasd (PedDevice* dev, const char* model_name) + { + struct stat dev_stat; + struct hd_geometry geo; +@@ -1042,7 +1042,7 @@ error: + } + + static int +-init_generic (PedDevice* dev, char* model_name) ++init_generic (PedDevice* dev, const char* model_name) + { + struct stat dev_stat; + PedExceptionOption ex_status; +diff --git a/libparted/cs/natmath.c b/libparted/cs/natmath.c +index b8b4a95..fd376cd 100644 +--- a/libparted/cs/natmath.c ++++ b/libparted/cs/natmath.c +@@ -74,16 +74,16 @@ ped_round_down_to (PedSector sector, PedSector grain_size) + return sector - abs_mod (sector, grain_size); + } + +-inline PedSector ++PedSector + ped_div_round_up (PedSector numerator, PedSector divisor) + { +- return (numerator + divisor - 1) / divisor; ++ return (numerator + divisor - 1) / divisor; + } + +-inline PedSector ++PedSector + ped_div_round_to_nearest (PedSector numerator, PedSector divisor) + { +- return (numerator + divisor/2) / divisor; ++ return (numerator + divisor/2) / divisor; + } + + /* Rounds a number up to the closest number that is a multiple of +diff --git a/libparted/disk.c b/libparted/disk.c +index 1582f26..c465d40 100644 +--- a/libparted/disk.c ++++ b/libparted/disk.c +@@ -224,23 +224,24 @@ static int + _add_duplicate_part (PedDisk* disk, PedPartition* old_part) + { + PedPartition* new_part; +- PedConstraint* constraint_exact; ++ int ret; + + new_part = disk->type->ops->partition_duplicate (old_part); + if (!new_part) + goto error; + new_part->disk = disk; + +- constraint_exact = ped_constraint_exact (&new_part->geom); +- if (!constraint_exact) ++ _disk_push_update_mode (disk); ++ ret = _disk_raw_add (disk, new_part); ++ _disk_pop_update_mode (disk); ++ if (!ret) + goto error_destroy_new_part; +- if (!ped_disk_add_partition (disk, new_part, constraint_exact)) +- goto error_destroy_constraint_exact; +- ped_constraint_destroy (constraint_exact); ++#ifdef DEBUG ++ if (!_disk_check_sanity (disk)) ++ goto error_destroy_new_part; ++#endif + return 1; + +-error_destroy_constraint_exact: +- ped_constraint_destroy (constraint_exact); + error_destroy_new_part: + ped_partition_destroy (new_part); + error: +@@ -2161,6 +2162,8 @@ ped_partition_flag_get_name (PedPartitionFlag flag) + switch (flag) { + case PED_PARTITION_BOOT: + return N_("boot"); ++ case PED_PARTITION_BIOS_GRUB: ++ return N_("bios_grub"); + case PED_PARTITION_ROOT: + return N_("root"); + case PED_PARTITION_SWAP: +diff --git a/libparted/exception.c b/libparted/exception.c +index 0940d65..230a9b7 100644 +--- a/libparted/exception.c ++++ b/libparted/exception.c +@@ -1,6 +1,6 @@ + /* + libparted - a library for manipulating disk partitions +- Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc. ++ Copyright (C) 1999, 2000, 2007-2008 Free Software Foundation, Inc. + + 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 +@@ -73,7 +73,7 @@ static PedExceptionHandler* ex_handler = default_handler; + static PedException* ex = NULL; + static int ex_fetch_count = 0; + +-static char* type_strings [] = { ++static const char *const type_strings [] = { + N_("Information"), + N_("Warning"), + N_("Error"), +@@ -82,7 +82,7 @@ static char* type_strings [] = { + N_("No Implementation") + }; + +-static char* option_strings [] = { ++static const char *const option_strings [] = { + N_("Fix"), + N_("Yes"), + N_("No"), +@@ -98,7 +98,7 @@ static char* option_strings [] = { + char* + ped_exception_get_type_string (PedExceptionType ex_type) + { +- return type_strings [ex_type - 1]; ++ return (char *) type_strings [ex_type - 1]; + } + + /* FIXME: move this out to the prospective math.c */ +@@ -121,7 +121,7 @@ ped_log2 (int n) + char* + ped_exception_get_option_string (PedExceptionOption ex_opt) + { +- return option_strings [ped_log2 (ex_opt)]; ++ return (char *) option_strings [ped_log2 (ex_opt)]; + } + + static PedExceptionOption +@@ -243,8 +243,8 @@ ped_exception_throw (PedExceptionType ex_type, + ex->type = ex_type; + ex->options = ex_opts; + +- while (1) { +- ex->message = (char*) malloc (size); ++ while (message) { ++ ex->message = (char*) malloc (size * sizeof (char)); + if (!ex->message) + goto no_memory; + +@@ -256,6 +256,7 @@ ped_exception_throw (PedExceptionType ex_type, + break; + + size += 10; ++ ped_free (ex->message); + } + + return do_throw (); +diff --git a/libparted/fs/ext2/ext2.c b/libparted/fs/ext2/ext2.c +index 618fca9..79fc6f6 100644 +--- a/libparted/fs/ext2/ext2.c ++++ b/libparted/fs/ext2/ext2.c +@@ -727,7 +727,10 @@ struct ext2_fs *ext2_open(struct ext2_dev_handle *handle, int state) + EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) + { + ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL, +- _("File system has an incompatible feature enabled.")); ++ _("File system has an incompatible feature enabled. " ++ "Compatible features are has_journal, dir_index, " ++ "filetype, sparse_super and large_file. " ++ "Use tune2fs or debugfs to remove features.")); + goto error_free_fs; + } + +diff --git a/libparted/fs/ext2/ext2_block_relocator.c b/libparted/fs/ext2/ext2_block_relocator.c +index b75a4c5..60f3d50 100644 +--- a/libparted/fs/ext2/ext2_block_relocator.c ++++ b/libparted/fs/ext2/ext2_block_relocator.c +@@ -691,10 +691,11 @@ static int ext2_block_relocator_flush(struct ext2_fs *fs, struct ext2_block_relo + { + /* FIXXXME gross hack */ + fprintf(stderr, "relocating %s blocks", +- ((char *[4]){"direct", +- "singly indirect", +- "doubly indirect", +- "triply indirect"})[i]); ++ ((const char *const [4]) ++ {"direct", ++ "singly indirect", ++ "doubly indirect", ++ "triply indirect"})[i]); + fflush(stderr); + } + +diff --git a/libparted/fs/ext2/ext2_mkfs.c b/libparted/fs/ext2/ext2_mkfs.c +index 19931dd..b1a8ce3 100644 +--- a/libparted/fs/ext2/ext2_mkfs.c ++++ b/libparted/fs/ext2/ext2_mkfs.c +@@ -1,6 +1,6 @@ + /* + ext2_mkfs.c -- ext2 fs creator +- Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc. ++ Copyright (C) 1999, 2000, 2001, 2007-2008 Free Software Foundation, Inc. + + 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 +@@ -263,7 +263,7 @@ error: + + /* returns the offset into the buffer of the start of the next dir entry */ + static int _set_dirent(void* buf, int offset, int block_size, int is_last, +- uint32_t inode, char* name, int file_type) ++ uint32_t inode, const char* name, int file_type) + { + struct ext2_dir_entry_2 *dirent = (void*) (((char*)buf) + offset); + int name_len = strlen(name); +diff --git a/libparted/fs/fat/resize.c b/libparted/fs/fat/resize.c +index 7386948..5f24ec2 100644 +--- a/libparted/fs/fat/resize.c ++++ b/libparted/fs/fat/resize.c +@@ -1,6 +1,6 @@ + /* + libparted +- Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc. ++ Copyright (C) 1998, 1999, 2000, 2007-2008 Free Software Foundation, Inc. + + 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 +@@ -481,8 +481,8 @@ ask_type (PedFileSystem* fs, int fat16_ok, int fat32_ok, FatType* out_fat_type) + { + FatSpecific* fs_info = FAT_SPECIFIC (fs); + PedExceptionOption status; +- char* fat16_msg; +- char* fat32_msg; ++ const char* fat16_msg; ++ const char* fat32_msg; + + if (fs_info->fat_type == FAT_TYPE_FAT16) + fat16_msg = _("If you leave your file system as FAT16, " +diff --git a/libparted/fs/fat/traverse.c b/libparted/fs/fat/traverse.c +index 3d2e2b5..4ef2044 100644 +--- a/libparted/fs/fat/traverse.c ++++ b/libparted/fs/fat/traverse.c +@@ -120,7 +120,7 @@ fat_traverse_mark_dirty (FatTraverseInfo* trav_info) + + FatTraverseInfo* + fat_traverse_begin (PedFileSystem* fs, FatCluster start_cluster, +- char* dir_name) ++ const char* dir_name) + { + FatSpecific* fs_info = FAT_SPECIFIC (fs); + FatTraverseInfo* trav_info; +diff --git a/libparted/fs/fat/traverse.h b/libparted/fs/fat/traverse.h +index 21e4c27..afb24a5 100644 +--- a/libparted/fs/fat/traverse.h ++++ b/libparted/fs/fat/traverse.h +@@ -42,7 +42,8 @@ extern int fat_traverse_entries_per_buffer (FatTraverseInfo* trav_info); + /* starts traversal at an arbitary cluster. if start_cluster==0, then uses + root directory */ + extern FatTraverseInfo* fat_traverse_begin (PedFileSystem* fs, +- FatCluster start_cluster, char* dir_name); ++ FatCluster start_cluster, ++ const char* dir_name); + + extern int fat_traverse_complete (FatTraverseInfo* trav_info); + +diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c +index f25353b..ee9aba0 100644 +--- a/libparted/labels/bsd.c ++++ b/libparted/labels/bsd.c +@@ -108,6 +108,9 @@ typedef struct { + + typedef struct { + uint8_t type; ++ int boot; ++ int raid; ++ int lvm; + } BSDPartitionData; + + static PedDiskType bsd_disk_type; +@@ -394,6 +397,9 @@ bsd_partition_new (const PedDisk* disk, PedPartitionType part_type, + if (!bsd_data) + goto error_free_part; + bsd_data->type = 0; ++ bsd_data->boot = 0; ++ bsd_data->raid = 0; ++ bsd_data->lvm = 0; + } else { + part->disk_specific = NULL; + } +@@ -423,6 +429,9 @@ bsd_partition_duplicate (const PedPartition* part) + old_bsd_data = (BSDPartitionData*) part->disk_specific; + new_bsd_data = (BSDPartitionData*) new_part->disk_specific; + new_bsd_data->type = old_bsd_data->type; ++ new_bsd_data->boot = old_bsd_data->boot; ++ new_bsd_data->raid = old_bsd_data->raid; ++ new_bsd_data->lvm = old_bsd_data->lvm; + return new_part; + } + +@@ -456,14 +465,60 @@ bsd_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type) + static int + bsd_partition_set_flag (PedPartition* part, PedPartitionFlag flag, int state) + { +- /* no flags for bsd */ ++ PedDisk* disk; ++// PedPartition* walk; // since -Werror, this unused variable would break build ++ BSDPartitionData* bsd_data; ++ ++ PED_ASSERT (part != NULL, return 0); ++ PED_ASSERT (part->disk_specific != NULL, return 0); ++ PED_ASSERT (part->disk != NULL, return 0); ++ ++ bsd_data = part->disk_specific; ++ disk = part->disk; ++ ++ switch (flag) { ++ case PED_PARTITION_BOOT: ++ bsd_data->boot = state; ++ return 1; ++ case PED_PARTITION_RAID: ++ if (state) { ++ bsd_data->lvm = 0; ++ } ++ bsd_data->raid = state; ++ return 1; ++ case PED_PARTITION_LVM: ++ if (state) { ++ bsd_data->raid = 0; ++ } ++ bsd_data->lvm = state; ++ default: ++ ; ++ } + return 0; + } + + static int + bsd_partition_get_flag (const PedPartition* part, PedPartitionFlag flag) + { +- /* no flags for bsd */ ++ BSDPartitionData* bsd_data; ++ ++ PED_ASSERT (part != NULL, return 0); ++ PED_ASSERT (part->disk_specific != NULL, return 0); ++ ++ bsd_data = part->disk_specific; ++ switch (flag) { ++ case PED_PARTITION_BOOT: ++ return bsd_data->boot; ++ ++ case PED_PARTITION_RAID: ++ return bsd_data->raid; ++ ++ case PED_PARTITION_LVM: ++ return bsd_data->lvm; ++ ++ default: ++ ; ++ } + return 0; + } + +@@ -471,7 +526,14 @@ static int + bsd_partition_is_flag_available (const PedPartition* part, + PedPartitionFlag flag) + { +- /* no flags for bsd */ ++ switch (flag) { ++ case PED_PARTITION_BOOT: ++ case PED_PARTITION_RAID: ++ case PED_PARTITION_LVM: ++ return 1; ++ default: ++ ; ++ } + return 0; + } + +diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c +index c686658..641257c 100644 +--- a/libparted/labels/dos.c ++++ b/libparted/labels/dos.c +@@ -190,14 +190,16 @@ msdos_probe (const PedDevice *dev) + if (PED_LE16_TO_CPU (part_table->magic) != MSDOS_MAGIC) + goto probe_fail; + +- /* if this is a FAT fs, fail here. Note that the Smart Boot Manager +- * Loader (SBML) signature indicates a partition table, not a file +- * system. ++ /* If this is a FAT fs, fail here. Checking for the FAT signature ++ * has some false positives; instead, do what the Linux kernel does ++ * and ensure that each partition has a boot indicator that is ++ * either 0 or 0x80. + */ +- if ((!strncmp (part_table->boot_code + 0x36, "FAT", 3) +- && strncmp (part_table->boot_code + 0x40, "SBML", 4) != 0) +- || !strncmp (part_table->boot_code + 0x52, "FAT", 3)) +- goto probe_fail; ++ for (i = 0; i < 4; i++) { ++ if (part_table->partitions[i].boot_ind != 0 ++ && part_table->partitions[i].boot_ind != 0x80) ++ goto probe_fail; ++ } + + /* If this is a GPT disk, fail here */ + for (i = 0; i < 4; i++) { +diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c +index e4ecf52..7adf12f 100644 +--- a/libparted/labels/fdasd.c ++++ b/libparted/labels/fdasd.c +@@ -149,7 +149,7 @@ fdasd_error (fdasd_anchor_t *anc, enum fdasd_failure why, char * str) + case device_verification_failed: + sprintf(error, "fdasd: %s -- %s\n", + _("Device verification failed"), +- _("The specified device is not a valid DASD device"));, ++ _("The specified device is not a valid DASD device")); + break; + default: + sprintf(error, "fdasd: %s: %s\n", _("Fatal error"), str); +diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c +index 4dc4f10..cb90d11 100644 +--- a/libparted/labels/gpt.c ++++ b/libparted/labels/gpt.c +@@ -4,7 +4,7 @@ + original version by Matt Domsch <Matt_Domsch@dell.com> + Disclaimed into the Public Domain + +- Portions Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 ++ Portions Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 + Free Software Foundation, Inc. + + EFI GUID Partition Table handling +@@ -86,6 +86,10 @@ typedef struct { + ((efi_guid_t) { PED_CPU_TO_LE32 (0xC12A7328), PED_CPU_TO_LE16 (0xF81F), \ + PED_CPU_TO_LE16 (0x11d2), 0xBA, 0x4B, \ + { 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B }}) ++#define PARTITION_BIOS_GRUB_GUID \ ++ ((efi_guid_t) { PED_CPU_TO_LE32 (0x21686148), PED_CPU_TO_LE16 (0x6449), \ ++ PED_CPU_TO_LE16 (0x6E6f), 0x74, 0x4E, \ ++ { 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 }}) + #define LEGACY_MBR_PARTITION_GUID \ + ((efi_guid_t) { PED_CPU_TO_LE32 (0x024DEE41), PED_CPU_TO_LE16 (0x33E7), \ + PED_CPU_TO_LE16 (0x11d3, 0x9D, 0x69, \ +@@ -245,6 +249,7 @@ typedef struct _GPTPartitionData { + int lvm; + int raid; + int boot; ++ int bios_grub; + int hp_service; + int hidden; + int msftres; +@@ -753,13 +758,16 @@ _parse_part_entry (PedDisk* disk, GuidPartitionEntry_t* pte) + + gpt_part_data->lvm = gpt_part_data->raid + = gpt_part_data->boot = gpt_part_data->hp_service +- = gpt_part_data->hidden = gpt_part_data->msftres = 0; ++ = gpt_part_data->hidden = gpt_part_data->msftres ++ = gpt_part_data->bios_grub = 0; + + if (pte->Attributes.RequiredToFunction & 0x1) + gpt_part_data->hidden = 1; + + if (!guid_cmp (gpt_part_data->type, PARTITION_SYSTEM_GUID)) + gpt_part_data->boot = 1; ++ else if (!guid_cmp (gpt_part_data->type, PARTITION_BIOS_GRUB_GUID)) ++ gpt_part_data->bios_grub = 1; + else if (!guid_cmp (gpt_part_data->type, PARTITION_RAID_GUID)) + gpt_part_data->raid = 1; + else if (!guid_cmp (gpt_part_data->type, PARTITION_LVM_GUID)) +@@ -1130,6 +1138,7 @@ gpt_partition_new (const PedDisk* disk, + gpt_part_data->lvm = 0; + gpt_part_data->raid = 0; + gpt_part_data->boot = 0; ++ gpt_part_data->bios_grub = 0; + gpt_part_data->hp_service = 0; + gpt_part_data->hidden = 0; + gpt_part_data->msftres = 0; +@@ -1208,6 +1217,10 @@ gpt_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type) + gpt_part_data->type = PARTITION_SYSTEM_GUID; + return 1; + } ++ if (gpt_part_data->bios_grub) { ++ gpt_part_data->type = PARTITION_BIOS_GRUB_GUID; ++ return 1; ++ } + if (gpt_part_data->hp_service) { + gpt_part_data->type = PARTITION_HPSERVICE_GUID; + return 1; +@@ -1306,6 +1319,16 @@ gpt_partition_set_flag(PedPartition *part, + if (state) + gpt_part_data->raid + = gpt_part_data->lvm ++ = gpt_part_data->bios_grub ++ = gpt_part_data->hp_service ++ = gpt_part_data->msftres = 0; ++ return gpt_partition_set_system (part, part->fs_type); ++ case PED_PARTITION_BIOS_GRUB: ++ gpt_part_data->bios_grub = state; ++ if (state) ++ gpt_part_data->raid ++ = gpt_part_data->lvm ++ = gpt_part_data->boot + = gpt_part_data->hp_service + = gpt_part_data->msftres = 0; + return gpt_partition_set_system (part, part->fs_type); +@@ -1314,6 +1337,7 @@ gpt_partition_set_flag(PedPartition *part, + if (state) + gpt_part_data->boot + = gpt_part_data->lvm ++ = gpt_part_data->bios_grub + = gpt_part_data->hp_service + = gpt_part_data->msftres = 0; + return gpt_partition_set_system (part, part->fs_type); +@@ -1322,6 +1346,7 @@ gpt_partition_set_flag(PedPartition *part, + if (state) + gpt_part_data->boot + = gpt_part_data->raid ++ = gpt_part_data->bios_grub + = gpt_part_data->hp_service + = gpt_part_data->msftres = 0; + return gpt_partition_set_system (part, part->fs_type); +@@ -1331,6 +1356,7 @@ gpt_partition_set_flag(PedPartition *part, + gpt_part_data->boot + = gpt_part_data->raid + = gpt_part_data->lvm ++ = gpt_part_data->bios_grub + = gpt_part_data->msftres = 0; + return gpt_partition_set_system (part, part->fs_type); + case PED_PARTITION_MSFT_RESERVED: +@@ -1339,6 +1365,7 @@ gpt_partition_set_flag(PedPartition *part, + gpt_part_data->boot + = gpt_part_data->raid + = gpt_part_data->lvm ++ = gpt_part_data->bios_grub + = gpt_part_data->hp_service = 0; + return gpt_partition_set_system (part, part->fs_type); + case PED_PARTITION_HIDDEN: +@@ -1367,6 +1394,8 @@ gpt_partition_get_flag(const PedPartition *part, PedPartitionFlag flag) + return gpt_part_data->lvm; + case PED_PARTITION_BOOT: + return gpt_part_data->boot; ++ case PED_PARTITION_BIOS_GRUB: ++ return gpt_part_data->bios_grub; + case PED_PARTITION_HPSERVICE: + return gpt_part_data->hp_service; + case PED_PARTITION_MSFT_RESERVED: +@@ -1390,6 +1419,7 @@ gpt_partition_is_flag_available(const PedPartition * part, + case PED_PARTITION_RAID: + case PED_PARTITION_LVM: + case PED_PARTITION_BOOT: ++ case PED_PARTITION_BIOS_GRUB: + case PED_PARTITION_HPSERVICE: + case PED_PARTITION_MSFT_RESERVED: + case PED_PARTITION_HIDDEN: +diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c +index f014194..538e0c0 100644 +--- a/libparted/labels/mac.c ++++ b/libparted/labels/mac.c +@@ -1,6 +1,6 @@ + /* + libparted - a library for manipulating disk partitions +- Copyright (C) 2000, 2002, 2004, 2007 Free Software Foundation, Inc. ++ Copyright (C) 2000, 2002, 2004, 2007-2008 Free Software Foundation, Inc. + + 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 +@@ -376,19 +376,19 @@ mac_clobber (PedDevice* dev) + #endif /* !DISCOVER_ONLY */ + + static int +-_rawpart_cmp_type (MacRawPartition* raw_part, char* type) ++_rawpart_cmp_type (const MacRawPartition* raw_part, const char* type) + { + return strncasecmp (raw_part->type, type, 32) == 0; + } + + static int +-_rawpart_cmp_name (MacRawPartition* raw_part, char* name) ++_rawpart_cmp_name (const MacRawPartition* raw_part, const char* name) + { + return strncasecmp (raw_part->name, name, 32) == 0; + } + + static int +-_rawpart_is_partition_map (MacRawPartition* raw_part) ++_rawpart_is_partition_map (const MacRawPartition* raw_part) + { + return _rawpart_cmp_type (raw_part, "Apple_partition_map"); + } +@@ -408,7 +408,7 @@ strncasestr (const char* haystack, const char* needle, int n) + } + + static int +-_rawpart_is_boot (MacRawPartition* raw_part) ++_rawpart_is_boot (const MacRawPartition* raw_part) + { + if (!strcasecmp(raw_part->type, "Apple_Bootstrap")) + return 1; +@@ -420,7 +420,7 @@ _rawpart_is_boot (MacRawPartition* raw_part) + } + + static int +-_rawpart_is_driver (MacRawPartition* raw_part) ++_rawpart_is_driver (const MacRawPartition* raw_part) + { + if (strncmp (raw_part->type, "Apple_", 6) != 0) + return 0; +@@ -430,7 +430,7 @@ _rawpart_is_driver (MacRawPartition* raw_part) + } + + static int +-_rawpart_has_driver (MacRawPartition* raw_part, MacDiskData* mac_disk_data) ++_rawpart_has_driver (const MacRawPartition* raw_part, MacDiskData* mac_disk_data) + { + MacDeviceDriver *driverlist; + uint16_t i, bsz; +diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am +index 12ad29f..d526207 100644 +--- a/libparted/tests/Makefile.am ++++ b/libparted/tests/Makefile.am +@@ -3,13 +3,17 @@ + # + # This file may be modified and/or distributed without restriction. + +-TESTS = t1000-label.sh ++TESTS = t1000-label.sh t2000-disk.sh + EXTRA_DIST = $(TESTS) +-bin_PROGRAMS = label ++bin_PROGRAMS = label disk + label_CFLAGS = $(CHECK_CFLAGS) -I$(top_srcdir)/include + label_LDADD = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la + label_SOURCES = common.h common.c label.c + ++disk_CFLAGS = $(CHECK_CFLAGS) -I$(top_srcdir)/include ++disk_LDADD = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la ++disk_SOURCES = common.h common.c disk.c ++ + MAINTAINERCLEANFILES = Makefile.in + + CLEANFILES = init.sh +diff --git a/libparted/tests/disk.c b/libparted/tests/disk.c +new file mode 100644 +index 0000000..295ec05 +--- /dev/null ++++ b/libparted/tests/disk.c +@@ -0,0 +1,111 @@ ++#include <config.h> ++#include <unistd.h> ++ ++#include <check.h> ++ ++#include <parted/parted.h> ++ ++#include "common.h" ++ ++static char* temporary_disk; ++ ++static void ++create_disk (void) ++{ ++ temporary_disk = _create_disk (20); ++ fail_if (temporary_disk == NULL, "Failed to create temporary disk"); ++} ++ ++static void ++destroy_disk (void) ++{ ++ unlink (temporary_disk); ++ free (temporary_disk); ++} ++ ++/* TEST: Create a disklabel on a simple disk image */ ++START_TEST (test_duplicate) ++{ ++ PedDevice* dev = ped_device_get (temporary_disk); ++ if (dev == NULL) ++ return; ++ ++ PedDiskType* type; ++ PedDisk* disk; ++ PedDisk* disk_dup; ++ PedPartition *part; ++ PedPartition *part_dup; ++ PedConstraint *constraint; ++ ++ int part_num[] = {1, 5, 6, 0}; ++ ++ disk = _create_disk_label (dev, ped_disk_type_get ("msdos")); ++ ++ constraint = ped_constraint_any (dev); ++ ++ /* Primary partition from 16,4kB to 15MB */ ++ part = ped_partition_new (disk, PED_PARTITION_EXTENDED, ++ NULL, ++ 32, 29311); ++ ped_disk_add_partition (disk, part, constraint); ++ ++ /* Logical partition from 10MB to 15MB */ ++ part = ped_partition_new (disk, PED_PARTITION_LOGICAL, ++ ped_file_system_type_get ("ext2"), ++ 19584, 29311); ++ ped_disk_add_partition (disk, part, constraint); ++ ++ /* Logical partition from 16,4kB to 4981kB */ ++ part = ped_partition_new (disk, PED_PARTITION_LOGICAL, ++ ped_file_system_type_get ("ext2"), ++ 32, 9727); ++ ped_disk_add_partition (disk, part, constraint); ++ ++ ped_disk_commit (disk); ++ ++ ped_constraint_destroy (constraint); ++ ++ disk_dup = ped_disk_duplicate (disk); ++ ++ /* Checks if both partitions match */ ++ for (int *i = part_num; *i != 0; i++) { ++ part = ped_disk_get_partition (disk, *i); ++ part_dup = ped_disk_get_partition (disk_dup, *i); ++ ++ fail_if (part->geom.start != part_dup->geom.start || ++ part->geom.end != part_dup->geom.end, ++ "Duplicated partition %d doesn't match. " ++ "Details are start: %d/%d end: %d/%d\n", ++ *i, part->geom.start, part_dup->geom.start, ++ part->geom.end, part_dup->geom.end); ++ } ++ ++ ped_disk_destroy (disk); ++ ped_device_destroy (dev); ++} ++END_TEST ++ ++int ++main (void) ++{ ++ int number_failed; ++ Suite* suite = suite_create ("Disk"); ++ TCase* tcase_duplicate = tcase_create ("Duplicate"); ++ ++ /* Fail when an exception is raised */ ++ ped_exception_set_handler (_test_exception_handler); ++ ++ tcase_add_checked_fixture (tcase_duplicate, create_disk, destroy_disk); ++ tcase_add_test (tcase_duplicate, test_duplicate); ++ /* Disable timeout for this test */ ++ tcase_set_timeout (tcase_duplicate, 0); ++ suite_add_tcase (suite, tcase_duplicate); ++ ++ SRunner* srunner = srunner_create (suite); ++ srunner_run_all (srunner, CK_VERBOSE); ++ ++ number_failed = srunner_ntests_failed (srunner); ++ srunner_free (srunner); ++ ++ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; ++} +diff --git a/libparted/tests/t2000-disk.sh b/libparted/tests/t2000-disk.sh +new file mode 100755 +index 0000000..7a85b98 +--- /dev/null ++++ b/libparted/tests/t2000-disk.sh +@@ -0,0 +1,27 @@ ++#!/bin/sh ++ ++# Copyright (C) 2007 Free Software Foundation, Inc. ++ ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++ ++test_description='run the disk unit tests in a directory supporting O_DIRECT' ++# This wrapper around the ./label binary is used to find a directory ++# in which one can open a file with the O_DIRECT flag. ++ ++. ./init.sh ++ ++test_expect_success \ ++ 'run the actual tests' 'disk' ++ ++test_done +diff --git a/parted/parted.c b/parted/parted.c +index 6a606ae..2afc2c1 100644 +--- a/parted/parted.c ++++ b/parted/parted.c +@@ -79,7 +79,7 @@ typedef struct { + time_t predicted_time_left; + } TimerContext; + +-static struct option options[] = { ++static const struct option const options[] = { + /* name, has-arg, string-return-val, char-return-val */ + {"help", 0, NULL, 'h'}, + {"list", 0, NULL, 'l'}, +@@ -90,7 +90,7 @@ static struct option options[] = { + {NULL, 0, NULL, 0} + }; + +-static char* options_help [][2] = { ++static const char *const options_help [][2] = { + {"help", N_("displays this help message")}, + {"list", N_("lists partition layout on all block devices")}, + {"machine", N_("displays machine parseable output")}, +@@ -107,26 +107,26 @@ int opt_machine_mode = 0; + int disk_is_modified = 0; + int is_toggle_mode = 0; + +-static char* number_msg = N_( ++static const char* number_msg = N_( + "NUMBER is the partition number used by Linux. On MS-DOS disk labels, the " + "primary partitions number from 1 to 4, logical partitions from 5 onwards.\n"); + +-static char* label_type_msg_start = N_("LABEL-TYPE is one of: "); +-static char* flag_msg_start = N_("FLAG is one of: "); +-static char* unit_msg_start = N_("UNIT is one of: "); +-static char* part_type_msg = N_("PART-TYPE is one of: primary, logical, " ++static const char* label_type_msg_start = N_("LABEL-TYPE is one of: "); ++static const char* flag_msg_start = N_("FLAG is one of: "); ++static const char* unit_msg_start = N_("UNIT is one of: "); ++static const char* part_type_msg = N_("PART-TYPE is one of: primary, logical, " + "extended\n"); +-static char* fs_type_msg_start = N_("FS-TYPE is one of: "); +-static char* start_end_msg = N_("START and END are disk locations, such as " ++static const char* fs_type_msg_start = N_("FS-TYPE is one of: "); ++static const char* start_end_msg = N_("START and END are disk locations, such as " + "4GB or 10%. Negative values count from the end of the disk. " + "For example, -1s specifies exactly the last sector.\n"); +-static char* state_msg = N_("STATE is one of: on, off\n"); +-static char* device_msg = N_("DEVICE is usually /dev/hda or /dev/sda\n"); +-static char* name_msg = N_("NAME is any word you want\n"); +-static char* resize_msg_start = N_("The partition must have one of the " ++static const char* state_msg = N_("STATE is one of: on, off\n"); ++static const char* device_msg = N_("DEVICE is usually /dev/hda or /dev/sda\n"); ++static const char* name_msg = N_("NAME is any word you want\n"); ++static const char* resize_msg_start = N_("The partition must have one of the " + "following FS-TYPEs: "); + +-static char* copyright_msg = N_( ++static const char* copyright_msg = N_( + "Copyright (C) 1998 - 2006 Free Software Foundation, Inc.\n" + "This program is free software, covered by the GNU General Public License.\n" + "\n" +@@ -1226,7 +1226,7 @@ partition_print (PedPartition* part) + putchar ('\n'); + + flags = partition_print_flags (part); +- ++ + printf (_("Minor: %d\n"), part->num); + printf (_("Flags: %s\n"), flags); + printf (_("File System: %s\n"), fs->type->name); +@@ -1264,15 +1264,17 @@ do_print (PedDevice** dev) + int has_free_arg = 0; + int has_list_arg = 0; + int has_num_arg = 0; +- char* transport[13] = {"unknown", "scsi", "ide", "dac960", +- "cpqarray", "file", "ataraid", "i2o", +- "ubd", "dasd", "viodasd", "sx8", "dm"}; ++ const char *const transport[14] = {"unknown", "scsi", "ide", "dac960", ++ "cpqarray", "file", "ataraid", "i2o", ++ "ubd", "dasd", "viodasd", "sx8", "dm", ++ "xvd"}; + char* peek_word; + char* start; + char* end; + char* size; + const char* name; + char* tmp; ++ char* flags; + wchar_t* table_rendered; + + disk = ped_disk_new (*dev); +@@ -1472,7 +1474,9 @@ do_print (PedDevice** dev) + str_list_append (row, name); + } + +- str_list_append (row, partition_print_flags (part)); ++ flags = partition_print_flags (part); ++ str_list_append (row, flags); ++ ped_free (flags); + } else { + if (has_extended) + str_list_append (row, ""); +@@ -1485,6 +1489,10 @@ do_print (PedDevice** dev) + //PED_ASSERT (row.cols == caption.cols) + table_add_row_from_strlist (table, row); + str_list_destroy (row); ++ ped_free (tmp); ++ ped_free (start); ++ ped_free (end); ++ ped_free (size); + } + + table_rendered = table_render (table); +diff --git a/parted/ui.c b/parted/ui.c +index a53643f..f854a54 100644 +--- a/parted/ui.c ++++ b/parted/ui.c +@@ -154,17 +154,17 @@ struct siginfo_t { + # define ILL_BADSTK (INTMAX - 8) + #endif + +-char* prog_name = "GNU Parted " VERSION "\n"; ++const char* prog_name = "GNU Parted " VERSION "\n"; + +-static char* banner_msg = N_( ++static const char* banner_msg = N_( + "Welcome to GNU Parted! Type 'help' to view a list of commands.\n"); + +-static char* usage_msg = N_( ++static const char* usage_msg = N_( + "Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]\n" + "Apply COMMANDs with PARAMETERS to DEVICE. If no COMMAND(s) are given, " + "run in\ninteractive mode.\n"); + +-static char* bug_msg = N_( ++static const char* bug_msg = N_( + "\n\nYou found a bug in GNU Parted! Here's what you have to do:\n\n" + "Don't panic! The bug has most likely not affected any of your data.\n" + "Help us to fix this bug by doing the following:\n\n" +@@ -218,7 +218,7 @@ screen_width () + + /* HACK: don't specify termcap separately - it'll annoy the users. */ + #ifdef HAVE_LIBREADLINE +- width = tgetnum ("co"); ++ width = tgetnum ((char *) "co"); + #endif + + if (width <= 0) +@@ -569,7 +569,9 @@ _readline (const char* prompt, const StrList* possibilities) + fputs (line, stdout); + fflush (stdout); + #endif +- line [strlen (line) - 1] = 0; /* kill trailing CR */ ++ /* kill trailing NL */ ++ if (strlen (line)) ++ line [strlen (line) - 1] = 0; + } else { + free (line); + line = NULL; +diff --git a/parted/ui.h b/parted/ui.h +index f5cf760..77bb194 100644 +--- a/parted/ui.h ++++ b/parted/ui.h +@@ -1,6 +1,6 @@ + /* + parted - a frontend to libparted +- Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc. ++ Copyright (C) 1999, 2000, 2001, 2007-2008 Free Software Foundation, Inc. + + 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 +@@ -21,7 +21,7 @@ + + #include "strlist.h" + +-extern char* prog_name; ++extern const char *prog_name; + + extern int init_ui (); + extern int non_interactive_mode (PedDevice** dev, Command* cmd_list[], +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 0a42a8d..3a694fe 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -5,8 +5,10 @@ TESTS = \ + t1100-busy-label.sh \ + t1500-small-ext2.sh \ + t2000-mkfs.sh \ ++ t2200-dos-label-recog.sh \ + t3000-constraints.sh \ +- t3100-resize-ext2-partion.sh ++ t3100-resize-ext2-partion.sh \ ++ t5000-tags.sh + + EXTRA_DIST = \ + $(TESTS) test-lib.sh mkdtemp +diff --git a/tests/t2200-dos-label-recog.sh b/tests/t2200-dos-label-recog.sh +new file mode 100755 +index 0000000..d5d2670 +--- /dev/null ++++ b/tests/t2200-dos-label-recog.sh +@@ -0,0 +1,61 @@ ++#!/bin/sh ++ ++# Copyright (C) 2008 Free Software Foundation, Inc. ++ ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++ ++test_description='improved MSDOS partition-table recognition' ++ ++. ./init.sh ++ ++###################################################################### ++# With vestiges of a preceding FAT file system boot sector in the MBR, ++# parted 1.8.8.1.29 and earlier would fail to recognize a DOS ++# partition table. ++###################################################################### ++N=100k ++dev=loop-file ++test_expect_success \ ++ 'create a file to simulate the underlying device' \ ++ 'dd if=/dev/null of=$dev bs=1 seek=$N 2> /dev/null' ++ ++test_expect_success \ ++ 'label the test disk' \ ++ 'parted -s $dev mklabel msdos > out 2>&1' ++test_expect_success 'expect no output' '$compare out /dev/null' ++ ++test_expect_success \ ++ 'create two partition' \ ++ ' ++ parted -s $dev mkpart primary 1s 40s > out 2>&1 && ++ parted -s $dev mkpart primary 41s 80s > out 2>&1 ++ ++ ' ++test_expect_success 'expect no output' '$compare out /dev/null' ++ ++test_expect_success \ ++ 'write "FAT" where it would cause trouble' \ ++ 'printf FAT|dd bs=1c seek=82 count=3 of=$dev conv=notrunc' ++ ++test_expect_success \ ++ 'print the partition table' \ ++ ' ++ parted -m -s $dev unit s p > out && ++ tail -2 out > k && mv k out && ++ printf "1:1s:40s:40s:::;\n2:41s:80s:40s:::;\n" > exp ++ ++ ' ++test_expect_success 'expect two partitions' '$compare out exp' ++ ++test_done +diff --git a/tests/t5000-tags.sh b/tests/t5000-tags.sh +new file mode 100755 +index 0000000..dab48ae +--- /dev/null ++++ b/tests/t5000-tags.sh +@@ -0,0 +1,81 @@ ++#!/bin/sh ++ ++# Copyright (C) 2007,2008 Free Software Foundation, Inc. ++ ++# 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 3 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, see <http://www.gnu.org/licenses/>. ++ ++test_description="test bios_grub flag in gpt labels" ++ ++. ./init.sh ++ ++dev=loop-file ++ ++test_expect_success \ ++ "setup: create zeroed device" \ ++ '{ dd if=/dev/zero bs=1024 count=64; } > $dev' ++ ++test_expect_success \ ++ 'create gpt label' \ ++ 'parted -s $dev mklabel gpt >out 2>&1' ++ ++test_expect_success \ ++ 'add a partition' \ ++ 'parted -s $dev mkpart primary 0 1 >>out 2>&1' ++ ++test_expect_success \ ++ 'print the table (before manual modification)' \ ++ 'parted -s $dev print >>out 2>&1' ++ ++# Using bios_boot_magic='\x48\x61' looks nicer, but isn't portable. ++# dash's builtin printf doesn't recognize such \xHH hexadecimal escapes. ++bios_boot_magic='\110\141\150\41\111\144\157\156\164\116\145\145\144\105\106\111' ++ ++printf "$bios_boot_magic" | dd of=$dev bs=1024 seek=1 conv=notrunc ++ ++test_expect_success \ ++ 'print the table (after manual modification)' \ ++ 'parted -s $dev print >>out 2>&1' ++ ++pwd=`pwd` ++ ++fail=0 ++{ ++ cat <<EOF ++Model: (file) ++Disk .../$dev: 65.5kB ++Sector size (logical/physical): 512B/512B ++Partition Table: gpt ++ ++Number Start End Size File system Name Flags ++ 1 17.4kB 48.6kB 31.2kB primary ++ ++Model: (file) ++Disk .../$dev: 65.5kB ++Sector size (logical/physical): 512B/512B ++Partition Table: gpt ++ ++Number Start End Size File system Name Flags ++ 1 17.4kB 48.6kB 31.2kB primary bios_grub ++ ++EOF ++} > exp || fail=1 ++ ++test_expect_success \ ++ 'prepare actual and expected output' \ ++ 'test $fail = 0 && ++ mv out o2 && sed "s,^Disk .*/$dev:,Disk .../$dev:," o2 > out' ++ ++test_expect_success 'check for expected output' '$compare out exp' ++ ++test_done diff --git a/packages/parted/files/syscalls.h b/packages/parted/files/syscalls.h deleted file mode 100644 index 9278704b29..0000000000 --- a/packages/parted/files/syscalls.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * linux/include/asm-arm/unistd.h - * - * Copyright (C) 2001-2005 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, - * no matter what the change is. Thanks! - */ -#ifndef __ASM_ARM_UNISTD_H2 -#define __ASM_ARM_UNISTD_H2 - - -#define __sys2(x) #x -#define __sys1(x) __sys2(x) - -#ifndef __syscall -#if defined(__thumb__) || defined(__ARM_EABI__) -#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; -#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs -#define __syscall(name) "swi\t0" -#else -#define __SYS_REG(name) -#define __SYS_REG_LIST(regs...) regs -#define __syscall(name) "swi\t" __sys1(__NR_##name) "" -#endif -#endif - -#define __syscall_return(type, res) \ -do { \ - if ((unsigned long)(res) >= (unsigned long)(-129)) { \ - errno = -(res); \ - res = -1; \ - } \ - return (type) (res); \ -} while (0) - -#define _syscall0(type,name) \ -type name(void) { \ - __SYS_REG(name) \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST() ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0) ) ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ -type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - - -#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __r4 __asm__("r4") = (long)arg5; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ - "r" (__r3), "r" (__r4) ) ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ -type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __r4 __asm__("r4") = (long)arg5; \ - register long __r5 __asm__("r5") = (long)arg6; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ - "r" (__r3), "r" (__r4), "r" (__r5) ) ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -/* - * "Conditional" syscalls - * - * What we want is __attribute__((weak,alias("sys_ni_syscall"))), - * but it doesn't work on all toolchains, so we just do it by hand - */ -#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") - -#endif /* __ASM_ARM_UNISTD_H2 */ diff --git a/packages/parted/files/syscalls.patch b/packages/parted/files/syscalls.patch deleted file mode 100644 index be9b91cb9c..0000000000 --- a/packages/parted/files/syscalls.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- parted-1.8.7/libparted/arch/linux.c.org 2007-05-09 23:40:13.000000000 +0300 -+++ parted-1.8.7/libparted/arch/linux.c 2007-07-10 18:20:27.000000000 +0300 -@@ -32,6 +32,7 @@ - #include <stdio.h> - #include <syscall.h> - #include <unistd.h> -+#include "syscalls.h" - #include <dirent.h> - #include <sys/ioctl.h> - #include <sys/stat.h> diff --git a/packages/parted/files/use_llseek_syscall.patch b/packages/parted/files/use_llseek_syscall.patch new file mode 100644 index 0000000000..ce305635ca --- /dev/null +++ b/packages/parted/files/use_llseek_syscall.patch @@ -0,0 +1,28 @@ +--- a/libparted/arch/linux.c~ 2009-02-06 17:22:22.000000000 -0200 ++++ a/libparted/arch/linux.c 2009-02-06 17:39:28.000000000 -0200 +@@ -53,6 +53,11 @@ + + #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) + ++#ifndef HAVE_LLSEEK ++#define _llseek(fd, offset_high, offset_low, result, origin) \ ++ syscall(SYS__llseek, fd, offset_high, offset_low, result, origin) ++#endif ++ + #ifndef __NR__llseek + #define __NR__llseek 140 + #endif +@@ -1362,13 +1367,6 @@ + + #if SIZEOF_OFF_T < 8 + +-static _syscall5(int,_llseek, +- unsigned int, fd, +- unsigned long, offset_high, +- unsigned long, offset_low, +- loff_t*, result, +- unsigned int, origin) +- + loff_t + llseek (unsigned int fd, loff_t offset, unsigned int whence) + { diff --git a/packages/parted/parted_1.8.8.bb b/packages/parted/parted_1.8.8.bb index d1b5cbe5b3..4eb8aa5ca2 100644 --- a/packages/parted/parted_1.8.8.bb +++ b/packages/parted/parted_1.8.8.bb @@ -4,11 +4,13 @@ LICENSE = "GPLv3" SECTION = "console/tools" DEPENDS = "readline e2fsprogs-libs" -PR = "r1" +PR = "r2" SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.gz \ file://syscalls.h \ file://syscalls.patch;patch=1 \ + file://use_llseek_syscall.patch;patch=1 \ + file://parted-1.8.x.patch;patch=1 \ " EXTRA_OECONF = "--disable-Werror ac_cv_func_calloc_0_nonnull=yes" diff --git a/packages/perl/libdate-manip-perl-native_5.54.bb b/packages/perl/libdate-manip-perl-native_5.54.bb new file mode 100644 index 0000000000..7199d9f8c5 --- /dev/null +++ b/packages/perl/libdate-manip-perl-native_5.54.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libdate-manip-perl_${PV}.bb diff --git a/packages/perl/libdate-manip-perl_5.54.bb b/packages/perl/libdate-manip-perl_5.54.bb new file mode 100644 index 0000000000..9097ce39c6 --- /dev/null +++ b/packages/perl/libdate-manip-perl_5.54.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Date and time manipulation routines." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +RDEPENDS = "perl-module-test-more \ + perl-module-io-file \ + perl-module-carp" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/Date-Manip-${PV}.tar.gz" + +S = "${WORKDIR}/Date-Manip-${PV}" + +inherit cpan diff --git a/packages/perl/libdbd-mysql-perl-native_4.010.bb b/packages/perl/libdbd-mysql-perl-native_4.010.bb new file mode 100644 index 0000000000..180d1d0b13 --- /dev/null +++ b/packages/perl/libdbd-mysql-perl-native_4.010.bb @@ -0,0 +1,8 @@ +require libdbd-mysql-perl.inc + +DEPENDS = "libdbi-perl-native mysql-native" + +EXTRA_OECONF = " --mysql_config=${STAGING_BINDIR_NATIVE}" + +inherit native + diff --git a/packages/perl/libdbd-mysql-perl.inc b/packages/perl/libdbd-mysql-perl.inc new file mode 100644 index 0000000000..6200c2844a --- /dev/null +++ b/packages/perl/libdbd-mysql-perl.inc @@ -0,0 +1,10 @@ +DESCRIPTION = "The database interface driver for the MySQL database." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-${PV}.tar.gz" + +S = "${WORKDIR}/DBD-mysql-${PV}" + +inherit cpan diff --git a/packages/perl/libdbd-mysql-perl_4.010.bb b/packages/perl/libdbd-mysql-perl_4.010.bb new file mode 100644 index 0000000000..95aa53b14b --- /dev/null +++ b/packages/perl/libdbd-mysql-perl_4.010.bb @@ -0,0 +1,13 @@ +require libdbd-mysql-perl.inc + +DEPENDS = "libdbi-perl mysql" +RDEPENDS = "perl-module-data-dumper \ + libdbi-perl \ + perl-module-scalar-util \ + perl-module-file-spec \ + perl-module-storable \ + perl-module-test-simple" + +EXTRA_OECONF = " --mysql_config=${STAGING_BINDIR_CROSS}/mysql_config" + +CFLAGS_append = " -I${STAGING_INCDIR}/mysql" diff --git a/packages/perl/libdbi-perl-native_1.607.bb b/packages/perl/libdbi-perl-native_1.607.bb new file mode 100644 index 0000000000..c5e3b1dea7 --- /dev/null +++ b/packages/perl/libdbi-perl-native_1.607.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libdbi-perl_${PV}.bb diff --git a/packages/perl/libdbi-perl_1.607.bb b/packages/perl/libdbi-perl_1.607.bb new file mode 100644 index 0000000000..af6853544c --- /dev/null +++ b/packages/perl/libdbi-perl_1.607.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Various MIME modules." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +RDEPENDS = "perl-module-scalar-util \ + perl-module-file-spec \ + perl-module-storable \ + perl-module-test-simple" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.607.tar.gz" + +S = "${WORKDIR}/DBI-${PV}" + +inherit cpan diff --git a/packages/perl/libdevice-serialport-perl-native_1.04.bb b/packages/perl/libdevice-serialport-perl-native_1.04.bb new file mode 100644 index 0000000000..af3b2dfeec --- /dev/null +++ b/packages/perl/libdevice-serialport-perl-native_1.04.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libdevice-serialport-perl_${PV}.bb diff --git a/packages/perl/libemail-date-format-perl-native_1.002.bb b/packages/perl/libemail-date-format-perl-native_1.002.bb new file mode 100644 index 0000000000..ebae345876 --- /dev/null +++ b/packages/perl/libemail-date-format-perl-native_1.002.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libemail-date-format-perl_${PV}.bb diff --git a/packages/perl/libemail-date-format-perl_1.002.bb b/packages/perl/libemail-date-format-perl_1.002.bb new file mode 100644 index 0000000000..d83dac00bd --- /dev/null +++ b/packages/perl/libemail-date-format-perl_1.002.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Various MIME modules." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +RDEPENDS = "perl-module-test-more \ + perl-module-time-local" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Email-Date-Format-${PV}.tar.gz" + +S = "${WORKDIR}/Email-Date-Format-${PV}" + +inherit cpan diff --git a/packages/perl/libhtml-parser-perl_3.60.bb b/packages/perl/libhtml-parser-perl_3.60.bb new file mode 100644 index 0000000000..08525331db --- /dev/null +++ b/packages/perl/libhtml-parser-perl_3.60.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "HTML Parser bits." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +RDEPENDS = "perl-module-test-more \ + perl-module-xsloader \ + perl-module-test-simple \ + libhtml-tagset-perl" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTML-Parser-3.60.tar.gz" + +S = "${WORKDIR}/HTML-Parser-${PV}" + +inherit cpan diff --git a/packages/perl/libhtml-tagset-perl_3.20.bb b/packages/perl/libhtml-tagset-perl_3.20.bb new file mode 100644 index 0000000000..788c37e094 --- /dev/null +++ b/packages/perl/libhtml-tagset-perl_3.20.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "HTML Tagset bits." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz" + +S = "${WORKDIR}/HTML-Tagset-${PV}" + +inherit cpan diff --git a/packages/perl/libmime-lite-perl-native_3.024.bb b/packages/perl/libmime-lite-perl-native_3.024.bb new file mode 100644 index 0000000000..50be9e11ff --- /dev/null +++ b/packages/perl/libmime-lite-perl-native_3.024.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libmime-lite-perl_${PV}.bb diff --git a/packages/perl/libmime-lite-perl_3.024.bb b/packages/perl/libmime-lite-perl_3.024.bb new file mode 100644 index 0000000000..80de33330f --- /dev/null +++ b/packages/perl/libmime-lite-perl_3.024.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Simple standalone module for generating MIME messages." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +RDEPENDS = "perl-module-file-spec \ + libemail-date-format-perl \ + perl-module-test-more \ + perl-module-time-local" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/MIME-Lite-3.024.tar.gz" + +S = "${WORKDIR}/MIME-Lite-${PV}" + +inherit cpan diff --git a/packages/perl/libmodule-load-perl-native_0.16.bb b/packages/perl/libmodule-load-perl-native_0.16.bb new file mode 100644 index 0000000000..f09c3f9741 --- /dev/null +++ b/packages/perl/libmodule-load-perl-native_0.16.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libmodule-load-perl_${PV}.bb diff --git a/packages/perl/libmodule-load-perl_0.16.bb b/packages/perl/libmodule-load-perl_0.16.bb new file mode 100644 index 0000000000..1d5a3ebeab --- /dev/null +++ b/packages/perl/libmodule-load-perl_0.16.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "A module loading thingy for perl." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +RDEPENDS = "perl-module-test-more" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/K/KA/KANE/Module-Load-0.16.tar.gz" + +S = "${WORKDIR}/Module-Load-${PV}" + +inherit cpan diff --git a/packages/perl/libphp-serialization-perl-native_0.30.bb b/packages/perl/libphp-serialization-perl-native_0.30.bb new file mode 100644 index 0000000000..9f83c5cc5a --- /dev/null +++ b/packages/perl/libphp-serialization-perl-native_0.30.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libphp-serialization-perl_${PV}.bb diff --git a/packages/perl/libphp-serialization-perl_0.30.bb b/packages/perl/libphp-serialization-perl_0.30.bb new file mode 100644 index 0000000000..07dd7de7e5 --- /dev/null +++ b/packages/perl/libphp-serialization-perl_0.30.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "The standard database interface module for Perl." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/B/BO/BOBTFISH/PHP-Serialization-0.30.tar.gz" + +S = "${WORKDIR}/PHP-Serialization-${PV}" + +inherit cpan diff --git a/packages/perl/libx10-perl-native_0.03.bb b/packages/perl/libx10-perl-native_0.03.bb new file mode 100644 index 0000000000..bc5702d42f --- /dev/null +++ b/packages/perl/libx10-perl-native_0.03.bb @@ -0,0 +1,5 @@ +SECTION = "libs" + +inherit native + +require libx10-perl_${PV}.bb diff --git a/packages/perl/libx10-perl_0.03.bb b/packages/perl/libx10-perl_0.03.bb new file mode 100644 index 0000000000..bd76e2060d --- /dev/null +++ b/packages/perl/libx10-perl_0.03.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "X10 support for Perl." +SECTION = "libs" +LICENSE = "Artistic|GPL" +PR = "r0" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/R/RO/ROBF/X10-0.03.tar.gz" + +S = "${WORKDIR}/X10-${PV}" + +inherit cpan diff --git a/packages/python/python-coherence_svn.bb b/packages/python/python-coherence_svn.bb index 831e3a5ba6..e6f5fafb53 100644 --- a/packages/python/python-coherence_svn.bb +++ b/packages/python/python-coherence_svn.bb @@ -3,7 +3,7 @@ SECTION = "devel/python" LICENSE = "MIT" HOMEPAGE = "http://coherence.beebits.net/wiki" -PR = "r5" +PR = "r6" PV = "0.6.0+svnr${SRCREV}" inherit setuptools @@ -14,6 +14,6 @@ S = "${WORKDIR}/Coherence" FILES_${PN} += "${datadir}" RDEPENDS_${PN} += "python-twisted-pair python-divmodepsilon python-nevow python-gst python-dbus \ python-configobj python-twisted python-twisted-core python-misc python-zopeinterface \ - zope python-modules python-pygobject python-gdata" + zope python-modules python-pygobject python-gdata python-inotify" diff --git a/packages/python/python-pyflakes_0.2.1.bb b/packages/python/python-pyflakes_0.3.0.bb index 8be6d54478..4a6580ea05 100644 --- a/packages/python/python-pyflakes_0.2.1.bb +++ b/packages/python/python-pyflakes_0.3.0.bb @@ -4,9 +4,9 @@ HOMEPAGE = "http://divmod.org/projects/pyflakes" PRIORITY = "optional" LICENSE = "BSD" SRCNAME = "pyflakes" -PR = "ml1" +PR = "ml0" -SRC_URI = "http://www.divmod.org/static/projects/pyflakes/pyflakes-${PV}.tar.gz" +SRC_URI = "http://pypi.python.org/packages/source/p/pyflakes/${SRCNAME}-${PV}.tar.gz" S = "${WORKDIR}/${SRCNAME}-${PV}" inherit distutils diff --git a/packages/python/python-twisted-native_8.2.0.bb b/packages/python/python-twisted-native_8.2.0.bb index 063f0fdb13..d35b9f2482 100644 --- a/packages/python/python-twisted-native_8.2.0.bb +++ b/packages/python/python-twisted-native_8.2.0.bb @@ -1,5 +1,7 @@ require python-twisted_${PV}.bb +RDEPENDS_${PN} = "" + inherit native do_stage() { diff --git a/packages/python/python_2.6.1.bb b/packages/python/python_2.6.1.bb index 8c3f3544a8..ae9f8ee725 100644 --- a/packages/python/python_2.6.1.bb +++ b/packages/python/python_2.6.1.bb @@ -1,7 +1,7 @@ require python.inc DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl tk zlib" DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" -PR = "ml2" +PR = "ml3" SRC_URI = "\ http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ @@ -27,6 +27,11 @@ S = "${WORKDIR}/Python-${PV}" inherit autotools +# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources +#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :( +TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" +TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" + # # copy config.h and an appropriate Makefile for distutils.sysconfig # which laters uses the information out of these to compile extensions diff --git a/packages/samba/files/configure-3.2.7.patch b/packages/samba/files/configure-3.2.8.patch index 94d684813e..2668b9d632 100644 --- a/packages/samba/files/configure-3.2.7.patch +++ b/packages/samba/files/configure-3.2.8.patch @@ -1,25 +1,31 @@ -diff -urN source.old/configure source/configure ---- source.old/configure 2008-11-20 14:45:08.000000000 +0000 -+++ source/configure 2008-11-30 17:53:02.116791281 +0000 -@@ -40777,11 +40777,10 @@ +diff -urN source.old//configure source//configure +--- source.old//configure 2009-02-03 16:34:41.000000000 +0000 ++++ source//configure 2009-02-06 00:25:49.502205687 +0000 +@@ -43860,13 +43860,14 @@ *linux*) # glibc <= 2.3.2 has a broken getgrouplist if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling +-$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -+# echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} -+# { (exit 1); exit 1; }; } +- { (exit 1); exit 1; }; }; } ++# { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++#{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling ++#See \`config.log' for more details." >&5 ++#$as_echo "$as_me: error: cannot run test program while cross compiling ++#See \`config.log' for more details." >&2;} ++# { (exit 1); exit 1; }; }; } +linux_getgrouplist_ok=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -diff -urN source.old/configure.in source/configure.in ---- source.old/configure.in 2008-11-18 15:17:17.000000000 +0000 -+++ source/configure.in 2008-11-30 17:33:10.960791551 +0000 +diff -urN source.old//configure.in source//configure.in +--- source.old//configure.in 2009-02-03 16:10:07.000000000 +0000 ++++ source//configure.in 2009-02-06 00:23:27.346211236 +0000 @@ -275,6 +275,8 @@ fi AC_SUBST(BROKEN_CC) @@ -58,7 +64,7 @@ diff -urN source.old/configure.in source/configure.in ], samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)]) if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then -@@ -1187,22 +1175,12 @@ +@@ -1204,22 +1192,12 @@ case "$host_os" in *linux*) # glibc <= 2.3.2 has a broken getgrouplist diff --git a/packages/samba/files/smb.conf b/packages/samba/files/smb.conf index 3854621c3e..f07e3e4ec7 100644 --- a/packages/samba/files/smb.conf +++ b/packages/samba/files/smb.conf @@ -160,7 +160,7 @@ #============================ Share Definitions ============================== [homes] comment = Home Directories - browseable = no + browseable = yes writable = yes # Un-comment the following and create the netlogon directory for Domain Logons diff --git a/packages/samba/samba-ads.inc b/packages/samba/samba-ads.inc index 1249528fdb..fee61a7a81 100644 --- a/packages/samba/samba-ads.inc +++ b/packages/samba/samba-ads.inc @@ -1,4 +1,6 @@ -DEPENDS += " openldap krb5" +# openldap and kerberos are for active directory support +# netatalk is needed to support a vfs module +DEPENDS += " openldap krb5 netatalk" EXTRA_OECONF += "\ SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \ @@ -26,12 +28,12 @@ RCONFLICTS_cifs-ads-doc = "cifs-doc" RCONFLICTS_smbfs-ads = "smbfs" RCONFLICTS_swat-ads = "swat" -FILES_cifs-ads= "${base_sbindir}/mount.cifs ${base_sbindir}/umount.cifs" +FILES_cifs-ads = "${base_sbindir}/mount.cifs ${base_sbindir}/umount.cifs" FILES_cifs-ads-doc = "${mandir}/man8/mount.cifs.8 ${mandir}/man8/umount.cifs.8" FILES_libsmbclient-ads = "${libdir}/libsmbclient.so.*" FILES_libsmbclient-ads-dev = "${libdir}/libsmbclient.so ${includedir}" FILES_smbfs-ads = "${bindir}/smbmount ${bindir}/smbumount ${bindir}/smbmnt ${base_sbindir}/mount.smbfs ${base_sbindir}/mount.smb" -FILES_swat-ads = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg" +FILES_swat-ads = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg" do_configure() { oe_runconf diff --git a/packages/samba/samba-ads_3.2.7.bb b/packages/samba/samba-ads_3.2.8.bb index 83b4416625..944fc792e0 100644 --- a/packages/samba/samba-ads_3.2.7.bb +++ b/packages/samba/samba-ads_3.2.8.bb @@ -4,7 +4,7 @@ require samba-ads.inc PR = "r1" SRC_URI += "file://config-lfs.patch;patch=1 \ file://quota.patch;patch=1;pnum=0 \ - file://configure-3.2.7.patch;patch=1 \ + file://configure-3.2.8.patch;patch=1 \ file://config-h.patch;patch=1 \ file://mtab.patch;patch=1 \ " diff --git a/packages/samba/samba-ads_3.3.0.bb b/packages/samba/samba-ads_3.3.0.bb index 7688fd6703..a2f2e2c47a 100644 --- a/packages/samba/samba-ads_3.3.0.bb +++ b/packages/samba/samba-ads_3.3.0.bb @@ -1,7 +1,7 @@ require samba.inc require samba-ads.inc -PR = "r1" +PR = "r2" SRC_URI += "file://config-lfs.patch;patch=1 \ file://quota.patch;patch=1;pnum=0 \ file://configure-3.3.0.patch;patch=1 \ diff --git a/packages/samba/samba_3.2.7.bb b/packages/samba/samba_3.2.8.bb index 49ff24a646..57f5753fce 100644 --- a/packages/samba/samba_3.2.7.bb +++ b/packages/samba/samba_3.2.8.bb @@ -1,12 +1,12 @@ require samba.inc require samba-basic.inc -SRC_URI += "file://configure-3.2.7.patch;patch=1 \ +SRC_URI += "file://configure-3.2.8.patch;patch=1 \ file://config-h.patch;patch=1 \ file://mtab.patch;patch=1 \ " -PR = "r4" +PR = "r0" EXTRA_OECONF += "\ SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \ diff --git a/packages/tasks/task-base.bb b/packages/tasks/task-base.bb index 504332f9a5..c60ae4ff0b 100644 --- a/packages/tasks/task-base.bb +++ b/packages/tasks/task-base.bb @@ -61,6 +61,15 @@ HOTPLUG ?= "${@base_contains("MACHINE_FEATURES", "kernel24", "linux-hotplug","" DISTRO_SSH_DAEMON ?= "dropbear" # +# bluetooth manager +# +DISTRO_BLUETOOTH_MANAGER ?= "\ + blueprobe \ + bluez-utils \ + bluez-utils-compat \ + " + +# # pcmciautils for >= 2.6.13-rc1, pcmcia-cs for others # PCMCIA_MANAGER ?= "${@base_contains('MACHINE_FEATURES', 'kernel26','pcmciautils','pcmcia-cs',d)} " @@ -234,10 +243,8 @@ task-base-pcmcia26 = "\ # Provide bluez-utils-compat utils for the time being, the binaries in that package will vanish soon from upstream releases, so beware! -RDEPENDS_task-base-bluetooth = "\ - blueprobe \ - bluez-utils \ - bluez-utils-compat \ +RDEPENDS_task-base-bluetooth = "\ + ${DISTRO_BLUETOOTH_MANAGER} \ " RRECOMMENDS_task-base-bluetooth = "\ diff --git a/packages/tasks/task-boot.bb b/packages/tasks/task-boot.bb index 3d69256e64..1a74f15ad1 100644 --- a/packages/tasks/task-boot.bb +++ b/packages/tasks/task-boot.bb @@ -1,5 +1,5 @@ DESCRIPTION = "Basic task to get a device booting" -PR = "r47" +PR = "r48" inherit task diff --git a/packages/u-boot/u-boot-1.1.2/oxe810.patch b/packages/u-boot/u-boot-1.1.2/oxnas.patch index f1fff14822..f1fff14822 100644 --- a/packages/u-boot/u-boot-1.1.2/oxe810.patch +++ b/packages/u-boot/u-boot-1.1.2/oxnas.patch diff --git a/packages/u-boot/u-boot-1.3.2/boc01/001-090115-SPI.patch b/packages/u-boot/u-boot-1.3.2/boc01/001-090205-SPI.patch index 96b624b3a1..6c0ed5c36a 100644 --- a/packages/u-boot/u-boot-1.3.2/boc01/001-090115-SPI.patch +++ b/packages/u-boot/u-boot-1.3.2/boc01/001-090205-SPI.patch @@ -1,7 +1,7 @@ Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c =================================================================== ---- u-boot-1.3.2.orig/board/freescale/mpc8313erdb/mpc8313erdb.c 2009-01-15 10:51:45.000000000 +0100 -+++ u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c 2009-01-15 12:18:31.000000000 +0100 +--- u-boot-1.3.2.orig/board/freescale/mpc8313erdb/mpc8313erdb.c ++++ u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -28,6 +28,7 @@ #endif #include <pci.h> @@ -10,7 +10,7 @@ Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c DECLARE_GLOBAL_DATA_PTR; -@@ -107,3 +108,29 @@ +@@ -107,3 +108,33 @@ void ft_board_setup(void *blob, bd_t *bd #endif } #endif @@ -21,12 +21,16 @@ Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c + */ +#ifdef CONFIG_HARD_SPI + -+void spi_rfid_chipsel(int cs) ++#define SPI_CS_MASK 0x80000000 ++ ++void spi_eeprom_chipsel(int cs) +{ -+ if(cs) -+ gpio_clear(14); ++ volatile gpio83xx_t *iopd = &((immap_t *)CFG_IMMR)->gpio[0]; ++ ++ if (cs) ++ iopd->dat &= ~SPI_CS_MASK; + else -+ gpio_set(14); ++ iopd->dat |= SPI_CS_MASK; +} + +/* @@ -34,7 +38,7 @@ Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c + * chip selects. + */ +spi_chipsel_type spi_chipsel[] = { -+ spi_rfid_chipsel, ++ spi_eeprom_chipsel, +}; +int spi_chipsel_cnt = sizeof(spi_chipsel) / sizeof(spi_chipsel[0]); + @@ -42,8 +46,8 @@ Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c + Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h =================================================================== ---- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h 2009-01-15 10:51:51.000000000 +0100 -+++ u-boot-1.3.2/include/configs/MPC8313ERDB.h 2009-01-15 12:16:57.000000000 +0100 +--- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h ++++ u-boot-1.3.2/include/configs/MPC8313ERDB.h @@ -369,6 +369,7 @@ #define CONFIG_CMD_PCI #define CONFIG_CMD_NAND @@ -66,8 +70,8 @@ Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h */ Index: u-boot-1.3.2/drivers/spi/mpc8xxx_spi.c =================================================================== ---- u-boot-1.3.2.orig/drivers/spi/mpc8xxx_spi.c 2009-01-15 10:52:30.000000000 +0100 -+++ u-boot-1.3.2/drivers/spi/mpc8xxx_spi.c 2009-01-15 10:53:23.000000000 +0100 +--- u-boot-1.3.2.orig/drivers/spi/mpc8xxx_spi.c ++++ u-boot-1.3.2/drivers/spi/mpc8xxx_spi.c @@ -34,6 +34,8 @@ #define SPI_MODE_REV (0x80000000 >> 5) /* Reverse mode - MSB first */ #define SPI_MODE_MS (0x80000000 >> 6) /* Always master */ @@ -77,7 +81,7 @@ Index: u-boot-1.3.2/drivers/spi/mpc8xxx_spi.c #define SPI_TIMEOUT 1000 -@@ -45,9 +47,7 @@ +@@ -45,9 +47,7 @@ void spi_init(void) * SPI pins on the MPC83xx are not muxed, so all we do is initialize * some registers */ diff --git a/packages/u-boot/u-boot-1.3.2/boc01/010-081212-LCD.patch b/packages/u-boot/u-boot-1.3.2/boc01/010-081212-LCD.patch index 07c7b3840a..33a0c761f9 100644 --- a/packages/u-boot/u-boot-1.3.2/boc01/010-081212-LCD.patch +++ b/packages/u-boot/u-boot-1.3.2/boc01/010-081212-LCD.patch @@ -181,7 +181,7 @@ Index: u-boot-1.3.2/common/cmd_lcd.c =================================================================== --- /dev/null +++ u-boot-1.3.2/common/cmd_lcd.c -@@ -0,0 +1,243 @@ +@@ -0,0 +1,237 @@ +/* + * (C) Copyright 2008 + * Alexandre Coffignal, CénoSYS, alexandre.coffignal@cenosys.com @@ -216,13 +216,6 @@ Index: u-boot-1.3.2/common/cmd_lcd.c +#define DELAY 1 +#define AEL 0x0F + -+static void NT7506_init_lcd(char ael); -+static void NT7506_print_splash(char * Picture,char width,char height); -+static void NT7506_set_xaddr(unsigned char x); -+static void NT7506_set_yaddr(unsigned char y); -+static void NT7506_writeb_data(unsigned char value); -+static void NT7506_writeb_ctl(unsigned char value); -+static void iowrite16(unsigned short value); + +static void iowrite16(unsigned short value) +{ @@ -269,7 +262,7 @@ Index: u-boot-1.3.2/common/cmd_lcd.c + NT7506_writeb_ctl(NT_COL_LSB | (x & 0x0F) ); //Send low nibble +} + -+static void ImageRota(char * src,char * dest, int w ,int h) ++static void ImageRota(unsigned char *src, unsigned char *dest, int w ,int h) +{ + int i,j,bit,IndexRead; + char mask=0; @@ -290,14 +283,13 @@ Index: u-boot-1.3.2/common/cmd_lcd.c +} + + -+static void NT7506_print_splash(char * picture,char width,char height) ++static void NT7506_print_splash(unsigned char *picture, char width, char height) +{ + int i; -+ char value; -+ char imagerota[2048]; ++ unsigned char imagerota[2048]; + int indeximage=0; + -+ int x,y,xfb,yfb,Index; ++ int x,y,xfb,yfb; + char src[2048]; + if(width>128) + width=128; @@ -379,7 +371,7 @@ Index: u-boot-1.3.2/common/cmd_lcd.c + + +/**************************************************/ -+void do_lcd(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ++int do_lcd(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +{ + char lcd_ael=AEL; + if(argc>1) @@ -390,6 +382,8 @@ Index: u-boot-1.3.2/common/cmd_lcd.c + + NT7506_init_lcd(lcd_ael); + NT7506_print_splash(Bollore_bits,Bollore_width,Bollore_height); ++ ++ return 0; +} + +U_BOOT_CMD( @@ -398,7 +392,7 @@ Index: u-boot-1.3.2/common/cmd_lcd.c + "lcd\n" +); + -+void do_backlight(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ++int do_backlight(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +{ + if (!strncmp(argv[1], "on", 7)) + { diff --git a/packages/u-boot/u-boot-1.3.2/boc01/013-081211-FIX_OOB_8BITS_LARGEPAGE_NAND.patch b/packages/u-boot/u-boot-1.3.2/boc01/013-081211-FIX_OOB_8BITS_LARGEPAGE_NAND.patch deleted file mode 100644 index 911dd2907e..0000000000 --- a/packages/u-boot/u-boot-1.3.2/boc01/013-081211-FIX_OOB_8BITS_LARGEPAGE_NAND.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: u-boot-1.3.2/drivers/mtd/nand/nand_bbt.c -=================================================================== ---- u-boot-1.3.2.orig/drivers/mtd/nand/nand_bbt.c 2008-12-11 10:15:52.000000000 +0100 -+++ u-boot-1.3.2/drivers/mtd/nand/nand_bbt.c 2008-12-11 10:16:39.000000000 +0100 -@@ -914,10 +914,11 @@ - .pattern = scan_ff_pattern - }; - -+//Samsung makes sure that either the 1st or 2nd page of every initial invalid block has non-FFh data at the column address of 2048. - static struct nand_bbt_descr largepage_memorybased = { - .options = 0, - .offs = 0, -- .len = 2, -+ .len = 1, - .pattern = scan_ff_pattern - }; - diff --git a/packages/u-boot/u-boot-1.3.2/boc01/013-090206-FIX_OOB_8BITS_LARGEPAGE_NAND.patch b/packages/u-boot/u-boot-1.3.2/boc01/013-090206-FIX_OOB_8BITS_LARGEPAGE_NAND.patch new file mode 100644 index 0000000000..803b46d8e9 --- /dev/null +++ b/packages/u-boot/u-boot-1.3.2/boc01/013-090206-FIX_OOB_8BITS_LARGEPAGE_NAND.patch @@ -0,0 +1,29 @@ +Index: u-boot-1.3.2/drivers/mtd/nand/nand_bbt.c +=================================================================== +--- u-boot-1.3.2.orig/drivers/mtd/nand/nand_bbt.c 2008-03-09 16:20:02.000000000 +0100 ++++ u-boot-1.3.2/drivers/mtd/nand/nand_bbt.c 2009-02-06 14:50:35.000000000 +0100 +@@ -914,10 +914,11 @@ + .pattern = scan_ff_pattern + }; + ++//Samsung makes sure that either the 1st or 2nd page of every initial invalid block has non-FFh data at the column address of 2048. + static struct nand_bbt_descr largepage_memorybased = { + .options = 0, + .offs = 0, +- .len = 2, ++ .len = 1, + .pattern = scan_ff_pattern + }; + +Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h +=================================================================== +--- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h 2009-02-06 15:42:07.000000000 +0100 ++++ u-boot-1.3.2/include/configs/MPC8313ERDB.h 2009-02-06 15:42:45.000000000 +0100 +@@ -205,6 +205,7 @@ + | BR_MS_FCM /* MSEL = FCM */ \ + | BR_V ) /* valid */ + #define CFG_OR1_PRELIM ( 0xFFFF8000 /* length 32K */ \ ++ | OR_FCM_PGS \ + | OR_FCM_CSCT \ + | OR_FCM_CST \ + | OR_FCM_CHT \ diff --git a/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch b/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch index e18055e64c..d2ebdef772 100644 --- a/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch +++ b/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch @@ -2,7 +2,15 @@ Index: u-boot-1.3.2/common/main.c =================================================================== --- u-boot-1.3.2.orig/common/main.c +++ u-boot-1.3.2/common/main.c -@@ -377,6 +377,15 @@ void main_loop (void) +@@ -39,6 +39,7 @@ + #endif + + #include <post.h> ++#include <gpio.h> + + #ifdef CONFIG_SILENT_CONSOLE + DECLARE_GLOBAL_DATA_PTR; +@@ -377,6 +378,15 @@ void main_loop (void) } else #endif /* CONFIG_BOOTCOUNT_LIMIT */ @@ -22,7 +30,7 @@ Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h =================================================================== --- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h +++ u-boot-1.3.2/include/configs/MPC8313ERDB.h -@@ -405,6 +405,7 @@ +@@ -406,6 +406,7 @@ #define PRE_INIT_GPIO 0x28 #define INIT_GPIO 0x08 #define MAX_GPIO_OUT 7 @@ -30,7 +38,7 @@ Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h /* Digital Thermometer and Thermostat */ #define CONFIG_DTT_LM73 1 -@@ -558,6 +559,7 @@ +@@ -559,6 +560,7 @@ * Environment Configuration */ #define CONFIG_ENV_OVERWRITE diff --git a/packages/u-boot/u-boot-1.3.2/boc01/015-090205-EMC.patch b/packages/u-boot/u-boot-1.3.2/boc01/015-090205-EMC.patch new file mode 100644 index 0000000000..afc43c47ed --- /dev/null +++ b/packages/u-boot/u-boot-1.3.2/boc01/015-090205-EMC.patch @@ -0,0 +1,31 @@ +Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c +=================================================================== +--- u-boot-1.3.2.orig/board/freescale/mpc8313erdb/mpc8313erdb.c ++++ u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c +@@ -135,8 +135,9 @@ void pci_init_board(void) + struct pci_region *reg[] = { pci_regions }; + int warmboot; + +- /* Enable all 3 PCI_CLK_OUTPUTs. */ +- clk->occr |= 0xe0000000; ++ /* Enable PCI_CLK_OUTPUT 1 only. ++ Disable others for better EMC footprint. */ ++ clk->occr = (clk->occr & 0x1fffffff) | OCCR_PCICOE1; + + /* + * Configure PCI Local Access Windows +Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h +=================================================================== +--- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h ++++ u-boot-1.3.2/include/configs/MPC8313ERDB.h +@@ -133,8 +133,8 @@ + #define CFG_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 + /*0x02000000*/ + #define CFG_DDRCDR_VALUE ( DDRCDR_EN \ +- | DDRCDR_PZ_NOMZ \ +- | DDRCDR_NZ_NOMZ \ ++ | DDRCDR_PZ_MAXZ \ ++ | DDRCDR_NZ_MAXZ \ + | DDRCDR_M_ODR ) + + /* diff --git a/packages/u-boot/u-boot-1.3.2/boc01/016-090209-PM.patch b/packages/u-boot/u-boot-1.3.2/boc01/016-090209-PM.patch new file mode 100644 index 0000000000..940e4ae40c --- /dev/null +++ b/packages/u-boot/u-boot-1.3.2/boc01/016-090209-PM.patch @@ -0,0 +1,56 @@ +Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h +=================================================================== +--- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h ++++ u-boot-1.3.2/include/configs/MPC8313ERDB.h +@@ -60,7 +60,7 @@ + * to access the PMC registers, unless a JTAG debugger is + * connected, or some resistor modifications are made. + */ +-#define CFG_8313ERDB_BROKEN_PMC 1 ++#undef CFG_8313ERDB_BROKEN_PMC + + #define CFG_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ + #define CFG_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ +Index: u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c +=================================================================== +--- u-boot-1.3.2.orig/board/freescale/mpc8313erdb/mpc8313erdb.c ++++ u-boot-1.3.2/board/freescale/mpc8313erdb/mpc8313erdb.c +@@ -30,6 +30,7 @@ + #include <mpc83xx.h> + #include <spi.h> + #include <gpio.h> ++#include <asm/processor.h> + + DECLARE_GLOBAL_DATA_PTR; + +@@ -39,7 +40,29 @@ int board_early_init_f(void) + volatile immap_t *im = (immap_t *)CFG_IMMR; + + if (im->pmc.pmccr1 & PMCCR1_POWER_OFF) +- gd->flags |= GD_FLG_SILENT; ++ { ++ volatile immap_t *immap = (immap_t *) CFG_IMMR; ++ ulong msr; ++ /* Interrupts and MMU off */ ++ __asm__ __volatile__ ("mfmsr %0":"=r" (msr):); ++ ++ msr &= ~( MSR_EE | MSR_IR | MSR_DR); ++ __asm__ __volatile__ ("mtmsr %0"::"r" (msr)); ++ ++ /* enable Reset Control Reg */ ++ immap->reset.rpr = 0x52535445; ++ __asm__ __volatile__ ("sync"); ++ __asm__ __volatile__ ("isync"); ++ ++ /* confirm Reset Control Reg is enabled */ ++ while(!((immap->reset.rcer) & RCER_CRE)); ++ ++ udelay(200); ++ ++ /* perform reset, only one bit */ ++ immap->reset.rcr = RCR_SWHR; ++ } ++ + #endif + + return 0; diff --git a/packages/u-boot/u-boot_1.1.2.bb b/packages/u-boot/u-boot_1.1.2.bb index 1afb3eec5a..c83e31f532 100644 --- a/packages/u-boot/u-boot_1.1.2.bb +++ b/packages/u-boot/u-boot_1.1.2.bb @@ -13,7 +13,7 @@ SRC_URI_append_mnci = "file://mnci.patch;patch=1 \ file://command-names.patch;patch=1" SRC_URI_append_magicbox = "file://u-boot-emetec.patch;patch=1 " -SRC_URI_append_oxe810 = "file://oxe810.patch;patch=1 " +SRC_URI_append_oxnas = "file://oxnas.patch;patch=1 " # TODO: SRC_URI_append_rt3000 @@ -23,7 +23,7 @@ TARGET_LDFLAGS = "" UBOOT_MACHINE_mnci = "mnci_config" UBOOT_MACHINE_vibren = "pxa255_idp_config" UBOOT_MACHINE_magicbox = "EMETEC405_config" -UBOOT_MACHINE_oxe810 = "oxnas_config" +UBOOT_MACHINE_oxnas = "oxnas_config" inherit base diff --git a/packages/u-boot/u-boot_1.3.2.bb b/packages/u-boot/u-boot_1.3.2.bb index 003838a670..0ed92c70b8 100644 --- a/packages/u-boot/u-boot_1.3.2.bb +++ b/packages/u-boot/u-boot_1.3.2.bb @@ -2,7 +2,7 @@ require u-boot.inc DEFAULT_PREFERENCE = "-1" -PR = "r9" +PR = "r10" SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2" @@ -22,9 +22,10 @@ SRC_URI_append_boc01 = "\ file://mpc8313e-rdb-nand.patch;patch=1 \ file://mpc8313e-rdb-mtdparts.patch;patch=1 \ file://mpc8313e-rdb-eeprom.patch;patch=1 \ - file://001-090115-SPI.patch;patch=1 \ + file://001-090205-SPI.patch;patch=1 \ file://002-081212-GPIO.patch;patch=1 \ file://003-081205-DTT_LM73.patch;patch=1 \ + file://004-081205-WATCHDOG.patch;patch=1 \ file://006-081211-EEPROM_M24C32.patch;patch=1 \ file://007-090112-CAPSENSE.patch;patch=1 \ file://008-090107-TSEC.patch;patch=1 \ @@ -32,8 +33,10 @@ SRC_URI_append_boc01 = "\ file://010-081212-LCD.patch;patch=1 \ file://011-081211-CMD_TEST.patch;patch=1 \ file://012-081209-BUG_SETENV.patch;patch=1 \ - file://013-081211-FIX_OOB_8BITS_LARGEPAGE_NAND.patch;patch=1 \ + file://013-090206-FIX_OOB_8BITS_LARGEPAGE_NAND.patch;patch=1 \ file://014-081211-BOOT_RESCUE.patch;patch=1 \ + file://015-090205-EMC.patch;patch=1 \ + file://016-090209-PM.patch;patch=1 \ " PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/vala-terminal/vala-terminal_git.bb b/packages/vala-terminal/vala-terminal_git.bb index 00b92de07d..5bc4c79cb2 100644 --- a/packages/vala-terminal/vala-terminal_git.bb +++ b/packages/vala-terminal/vala-terminal_git.bb @@ -1,8 +1,8 @@ DESCRIPTION = "A lightweight Terminal Emulator based on libvte, written in Vala." SECTION = "x11/applications" DEPENDS = "vala-native vte" -PV = "1.0.0.0+gitr${SRCREV}" -PR = "r1" +PV = "1.1.1+gitr${SRCREV}" +PR = "r0" inherit autotools diff --git a/packages/vala/files/expose-bytesarray-struct.patch b/packages/vala/files/expose-bytesarray-struct.patch new file mode 100644 index 0000000000..ea01208967 --- /dev/null +++ b/packages/vala/files/expose-bytesarray-struct.patch @@ -0,0 +1,18 @@ +# +# Necessary to actually use BytesArray. +# Signed-Off: Michael 'Mickey' Lauer <mlauer@vanille-media.de> +# +Index: vala/vapi/glib-2.0.vapi +=================================================================== +--- vala/vapi/glib-2.0.vapi (Revision 2422) ++++ vala/vapi/glib-2.0.vapi (Arbeitskopie) +@@ -3044,6 +3044,9 @@ + public void sort (CompareFunc compare_func); + public void sort_with_data (CompareDataFunc compare_func); + public void set_size (uint length); ++ ++ public uint len; ++ public uint8[] data; + } + + /* N-ary Trees */ diff --git a/packages/vala/vala-native_0.5.6.bb b/packages/vala/vala-native_0.5.6.bb index 8feab501b4..84ed8359c4 100644 --- a/packages/vala/vala-native_0.5.6.bb +++ b/packages/vala/vala-native_0.5.6.bb @@ -1,5 +1,5 @@ require vala_${PV}.bb -PR = "r0" +PR = "r1" inherit native DEPENDS = "glib-2.0-native" diff --git a/packages/vala/vala.inc b/packages/vala/vala.inc index efe2900e28..c6f5aebbef 100644 --- a/packages/vala/vala.inc +++ b/packages/vala/vala.inc @@ -7,15 +7,14 @@ LICENSE = "LGPL" MAJV = "${@bb.data.getVar('PV',d,1)[:3]}" -SRC_URI = "http://download.gnome.org/sources/vala/${MAJV}/vala-${PV}.tar.bz2" +SRC_URI = "\ + http://download.gnome.org/sources/vala/${MAJV}/vala-${PV}.tar.bz2 \ + file://expose-bytesarray-struct.patch;patch=1 \ +" S = "${WORKDIR}/vala-${PV}" -inherit autotools lib_package +inherit autotools autotools_stage lib_package EXTRA_OECONF = "--enable-vapigen" -do_stage() { - autotools_stage_all -} - FILES_${PN}-doc += ${datadir}/devhelp diff --git a/packages/vala/vala_0.5.6.bb b/packages/vala/vala_0.5.6.bb index 8775f1a407..f6ee943617 100644 --- a/packages/vala/vala_0.5.6.bb +++ b/packages/vala/vala_0.5.6.bb @@ -1,2 +1,2 @@ require vala.inc -PR = "r0" +PR = "r1" diff --git a/packages/webkit/webkit-gtk/GNUmakefile.am b/packages/webkit/webkit-gtk/GNUmakefile.am index 7aec061bd2..c74e1fa428 100644 --- a/packages/webkit/webkit-gtk/GNUmakefile.am +++ b/packages/webkit/webkit-gtk/GNUmakefile.am @@ -77,7 +77,7 @@ no_undefined = -no-undefined endif if OS_GNU -version_script = -Wl,--version-script,$(srcdir)/symbols.filter +version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter endif # Shared libraries @@ -121,7 +121,7 @@ libJavaScriptCore_la_SOURCES = \ libJavaScriptCore_la_LIBADD = \ $(UNICODE_LIBS) \ - $(GLOBALDEPS_LIBS) \ + $(GLIB_LIBS) \ -lpthread libJavaScriptCore_la_CXXFLAGS = \ @@ -132,7 +132,7 @@ libJavaScriptCore_la_CFLAGS = \ -fstrict-aliasing \ -O3 \ $(global_cflags) \ - $(GLOBALDEPS_CFLAGS) \ + $(GLIB_CFLAGS) \ $(UNICODE_CFLAGS) libJavaScriptCore_la_CPPFLAGS = \ @@ -167,7 +167,7 @@ libWebCore_la_CXXFLAGS = \ libWebCore_la_CFLAGS = \ -fno-strict-aliasing \ $(global_cflags) \ - $(GLOBALDEPS_CFLAGS) \ + $(GLIB_CFLAGS) \ $(UNICODE_CFLAGS) \ $(LIBXML_CFLAGS) \ $(CAIRO_CFLAGS) \ @@ -181,7 +181,8 @@ libWebCore_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(LIBXSLT_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(HILDON_CFLAGS) + $(HILDON_CFLAGS) \ + $(GEOCLUE_CFLAGS) libWebCore_la_CPPFLAGS = \ $(global_cppflags) \ @@ -194,7 +195,7 @@ libWebCore_la_LIBADD = \ libJavaScriptCore.la \ libWebCoreJS.la \ $(webcore_libadd) \ - $(GLOBALDEPS_LIBS) \ + $(GLIB_LIBS) \ $(LIBXML_LIBS) \ $(CAIRO_LIBS) \ $(PANGO_LIBS) \ @@ -210,6 +211,7 @@ libWebCore_la_LIBADD = \ $(HILDON_LIBS) \ $(JPEG_LIBS) \ $(PNG_LIBS) \ + $(GEOCLUE_LIBS) \ -lpthread # WebKit diff --git a/packages/webkit/webkit-gtk/acinclude.m4 b/packages/webkit/webkit-gtk/acinclude.m4 index 5353429010..e69de29bb2 100644 --- a/packages/webkit/webkit-gtk/acinclude.m4 +++ b/packages/webkit/webkit-gtk/acinclude.m4 @@ -1,359 +0,0 @@ -dnl dolt, a replacement for libtool -dnl Copyright © 2007-2008 Josh Triplett <josh@freedesktop.org> -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright -dnl notice and this notice are preserved. -dnl -dnl To use dolt, invoke the DOLT macro immediately after the libtool macros. -dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it -dnl installed when running autoconf on your project. - -AC_DEFUN([DOLT], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -# dolt, a replacement for libtool -# Josh Triplett <josh@freedesktop.org> -AC_PATH_PROG(DOLT_BASH, bash) -AC_MSG_CHECKING([if dolt supports this host]) -dolt_supported=yes -if test x$DOLT_BASH = x; then - dolt_supported=no -fi -if test x$GCC != xyes; then - dolt_supported=no -fi -case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) - pic_options='-fPIC' - ;; -i?86-apple-darwin*) - pic_options='-fno-common' - ;; -*mingw32*) - pic_options='-DDLL_EXPORT' - ;; -*) - dolt_supported=no - ;; -esac -if test x$dolt_supported = xno ; then - AC_MSG_RESULT([no, falling back to libtool]) - LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' - LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' -else - AC_MSG_RESULT([yes, replacing libtool]) - -dnl Start writing out doltcompile. - cat <<__DOLTCOMPILE__EOF__ >doltcompile -#!$DOLT_BASH -__DOLTCOMPILE__EOF__ - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -args=("$[]@") -for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do - if test x"${args@<:@$arg@:>@}" = x-o ; then - objarg=$((arg+1)) - break - fi -done -if test x$objarg = x ; then - echo 'Error: no -o on compiler command line' 1>&2 - exit 1 -fi -lo="${args@<:@$objarg@:>@}" -obj="${lo%.lo}" -if test x"$lo" = x"$obj" ; then - echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 - exit 1 -fi -objbase="${obj##*/}" -__DOLTCOMPILE__EOF__ - -dnl Write out shared compilation code. - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -libobjdir="${obj%$objbase}.libs" -if test ! -d "$libobjdir" ; then - mkdir_out="$(mkdir "$libobjdir" 2>&1)" - mkdir_ret=$? - if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then - echo "$mkdir_out" 1>&2 - exit $mkdir_ret - fi -fi -pic_object="$libobjdir/$objbase.o" -args@<:@$objarg@:>@="$pic_object" -__DOLTCOMPILE__EOF__ - cat <<__DOLTCOMPILE__EOF__ >>doltcompile -"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$? -__DOLTCOMPILE__EOF__ - fi - -dnl Write out static compilation code. -dnl Avoid duplicate compiler output if also building shared objects. - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -non_pic_object="$obj.o" -args@<:@$objarg@:>@="$non_pic_object" -__DOLTCOMPILE__EOF__ - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $? -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args@<:@@@:>@}" || exit $? -__DOLTCOMPILE__EOF__ - fi - fi - -dnl Write out the code to write the .lo file. -dnl The second line of the .lo file must match "^# Generated by .*libtool" - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -{ -echo "# $lo - a libtool object file" -echo "# Generated by doltcompile, not libtool" -__DOLTCOMPILE__EOF__ - - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "pic_object='.libs/${objbase}.o'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo pic_object=none -__DOLTCOMPILE__EOF__ - fi - - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "non_pic_object='${objbase}.o'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo non_pic_object=none -__DOLTCOMPILE__EOF__ - fi - - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -} > "$lo" -__DOLTCOMPILE__EOF__ - -dnl Done writing out doltcompile; substitute it for libtool compilation. - chmod +x doltcompile - LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' - LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' - -dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for -dnl a target, so write out a libtool wrapper to handle that case. -dnl Note that doltlibtool does not handle inferred tags or option arguments -dnl without '=', because automake does not use them. - cat <<__DOLTLIBTOOL__EOF__ > doltlibtool -#!$DOLT_BASH -__DOLTLIBTOOL__EOF__ - cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool -top_builddir_slash="${0%%doltlibtool}" -: ${top_builddir_slash:=./} -args=() -modeok=false -tagok=false -for arg in "$[]@"; do - case "$arg" in - --mode=compile) modeok=true ;; - --tag=CC|--tag=CXX) tagok=true ;; - *) args@<:@${#args[@]}@:>@="$arg" ;; - esac -done -if $modeok && $tagok ; then - . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}" -else - exec ${top_builddir_slash}libtool "$[]@" -fi -__DOLTLIBTOOL__EOF__ - -dnl Done writing out doltlibtool; substitute it for libtool. - chmod +x doltlibtool - LIBTOOL='$(top_builddir)/doltlibtool' -fi -AC_SUBST(LTCOMPILE) -AC_SUBST(LTCXXCOMPILE) -# end dolt -]) - -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_compare_version.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# -# DESCRIPTION -# -# This macro compares two version strings. Due to the various number of -# minor-version numbers that can exist, and the fact that string -# comparisons are not compatible with numeric comparisons, this is not -# necessarily trivial to do in a autoconf script. This macro makes doing -# these comparisons easy. -# -# The six basic comparisons are available, as well as checking equality -# limited to a certain number of minor-version levels. -# -# The operator OP determines what type of comparison to do, and can be one -# of: -# -# eq - equal (test A == B) -# ne - not equal (test A != B) -# le - less than or equal (test A <= B) -# ge - greater than or equal (test A >= B) -# lt - less than (test A < B) -# gt - greater than (test A > B) -# -# Additionally, the eq and ne operator can have a number after it to limit -# the test to that number of minor versions. -# -# eq0 - equal up to the length of the shorter version -# ne0 - not equal up to the length of the shorter version -# eqN - equal up to N sub-version levels -# neN - not equal up to N sub-version levels -# -# When the condition is true, shell commands ACTION-IF-TRUE are run, -# otherwise shell commands ACTION-IF-FALSE are run. The environment -# variable 'ax_compare_version' is always set to either 'true' or 'false' -# as well. -# -# Examples: -# -# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) -# -# would both be true. -# -# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) -# -# would both be false. -# -# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) -# -# would be true because it is only comparing two minor versions. -# -# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) -# -# would be true because it is only comparing the lesser number of minor -# versions of the two values. -# -# Note: The characters that separate the version numbers do not matter. An -# empty string is the same as version 0. OP is evaluated by autoconf, not -# configure, so must be a string, not a variable. -# -# The author would like to acknowledge Guido Draheim whose advice about -# the m4_case and m4_ifvaln functions make this macro only include the -# portions necessary to perform the specific comparison specified by the -# OP argument in the final configure script. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -dnl ######################################################################### -AC_DEFUN([AX_COMPARE_VERSION], [ - AC_PROG_AWK - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - AS_VAR_PUSHDEF([A],[ax_compare_version_A]) - A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - AS_VAR_PUSHDEF([B],[ax_compare_version_B]) - B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary - dnl # then the first line is used to determine if the condition is true. - dnl # The sed right after the echo is to remove any indented white space. - m4_case(m4_tolower($2), - [lt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [gt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [le],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ], - [ge],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ],[ - dnl Split the operator from the subversion count if present. - m4_bmatch(m4_substr($2,2), - [0],[ - # A count of zero means use the length of the shorter version. - # Determine the number of characters in A and B. - ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` - ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` - - # Set A to no more than B's length and B to no more than A's length. - A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` - B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` - ], - [[0-9]+],[ - # A count greater than zero means use only that many subversions - A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - ], - [.+],[ - AC_WARNING( - [illegal OP numeric parameter: $2]) - ],[]) - - # Pad zeros at end of numbers to make same length. - ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" - B="$B`echo $A | sed 's/./0/g'`" - A="$ax_compare_version_tmp_A" - - # Check for equality or inequality as necessary. - m4_case(m4_tolower(m4_substr($2,0,2)), - [eq],[ - test "x$A" = "x$B" && ax_compare_version=true - ], - [ne],[ - test "x$A" != "x$B" && ax_compare_version=true - ],[ - AC_WARNING([illegal OP parameter: $2]) - ]) - ]) - - AS_VAR_POPDEF([A])dnl - AS_VAR_POPDEF([B])dnl - - dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. - if test "$ax_compare_version" = "true" ; then - m4_ifvaln([$4],[$4],[:])dnl - m4_ifvaln([$5],[else $5])dnl - fi -]) dnl AX_COMPARE_VERSION diff --git a/packages/webkit/webkit-gtk/autogen.sh b/packages/webkit/webkit-gtk/autogen.sh index a929538d20..f87238cf92 100644 --- a/packages/webkit/webkit-gtk/autogen.sh +++ b/packages/webkit/webkit-gtk/autogen.sh @@ -8,6 +8,10 @@ test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir +LIBTOOLIZE_FLAGS="--force --automake" +ACLOCAL_FLAGS="-I autotools" +AUTOMAKE_FLAGS="--foreign --add-missing" + DIE=0 (autoconf --version) < /dev/null > /dev/null 2>&1 || { @@ -46,10 +50,10 @@ rm -rf $top_srcdir/autom4te.cache touch README INSTALL -aclocal || exit $? -$LIBTOOLIZE --force || exit $? +aclocal $ACLOCAL_FLAGS || exit $? +$LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $? autoheader || exit $? -automake --foreign --add-missing || exit $? +automake $AUTOMAKE_FLAGS || exit $? autoconf || exit $? cd $ORIGDIR || exit 1 diff --git a/packages/webkit/webkit-gtk/configure.ac b/packages/webkit/webkit-gtk/configure.ac index 7b451efe96..c7ed988329 100644 --- a/packages/webkit/webkit-gtk/configure.ac +++ b/packages/webkit/webkit-gtk/configure.ac @@ -6,6 +6,10 @@ m4_define([webkit_micro_version], [0]) AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/]) +AC_CONFIG_MACRO_DIR([autotools]) +AC_CONFIG_AUX_DIR([autotools]) +AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools") + AC_CONFIG_HEADERS([autotoolsconfig.h]) AC_CANONICAL_SYSTEM @@ -23,10 +27,13 @@ dnl # see http://www.gnu.org/software/libtool/manual.html#Versioning LIBWEBKITGTK_VERSION=1:0:0 AC_SUBST([LIBWEBKITGTK_VERSION]) +# Recent libtool+automake don't assume you want C++, explicitly enable it +AC_PROG_CXX + AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar]) # host checking - inspired by the GTK+ configure.in -# TODO: os_mac, os_bsd +# TODO: move these to webkit.m4? AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) @@ -59,57 +66,14 @@ case "$host_os" in ;; esac -# If CXXFLAGS and CFLAGS are unset, default to empty. -# This is to tell automake not to include '-g' if CXXFLAGS is not set -# For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler -if test -z "$CXXFLAGS"; then - CXXFLAGS="" -fi -if test -z "$CFLAGS"; then - CFLAGS="" -fi - -AM_PROG_CC_STDC -AM_PROG_CC_C_O -AC_PROG_CXX -AC_PROG_INSTALL +# initialize webkit options +WEBKIT_INIT AC_DISABLE_STATIC AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL -AC_SYS_LARGEFILE +# use dolt to speedup the build DOLT -# check for -fvisibility=hidden compiler support (GCC >= 4) -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" -AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden]) -AC_COMPILE_IFELSE([char foo;], - [ AC_MSG_RESULT([yes]) - SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ], - AC_MSG_RESULT([no])) -CFLAGS="$saved_CFLAGS" -AC_SUBST(SYMBOL_VISIBILITY) -AC_SUBST(SYMBOL_VISIBILITY_INLINES) - -AC_PATH_PROG(PERL, perl) -if test -z "$PERL"; then - AC_MSG_ERROR([You need 'perl' to compile WebKit]) -fi - -AC_PATH_PROG(BISON, bison) -if test -z "$BISON"; then - AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit]) -else - case "$target_cpu" in - arm) - BISON_VERSION=`$BISON --version | head -n1 | sed 's,.*\ \([0-9]*\.[0-9]*\)$,\1,'` - AX_COMPARE_VERSION([2.2],[gt],[$BISON_VERSION], - echo "Autoconf say: I'm broken, ignore me") - ;; - *) ;; - esac -fi - AC_PATH_PROG(FLEX, flex) if test -z "$FLEX"; then AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit]) @@ -124,34 +88,6 @@ if test -z "$GPERF"; then AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit]) fi -AC_PATH_PROG(MV, mv) -if test -z "$MV"; then - AC_MSG_ERROR([You need 'mv' to compile WebKit]) -fi - -# GTK+ port only -# Check for glib-genmarshal and glib-mkenums -AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) -AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums]) -if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then - AC_MSG_ERROR([You need the GLib dev tools in your path]) -fi - -# Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it -# doesn't exist) -AC_LANG_PUSH([C++]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])]) -AC_LANG_POP([C++]) - -# C/C++ Language Features -AC_C_CONST -AC_C_INLINE -AC_C_VOLATILE - -# C/C++ Headers -AC_HEADER_STDC -AC_HEADER_STDBOOL - # pthread (not needed on Windows) if test "$os_win32" = "no"; then AC_CHECK_HEADERS([pthread.h], @@ -183,12 +119,6 @@ if test "$jpeg_ok" = yes; then fi AC_SUBST([JPEG_LIBS]) -# check for pkg-config -AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -if test "$PKG_CONFIG" = "no"; then - AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH]) -fi - # Check for libpng the way Gtk+ does it AC_MSG_CHECKING(for libpng12) if $PKG_CONFIG --exists libpng12 ; then @@ -219,44 +149,6 @@ else fi AC_SUBST([PNG_LIBS]) -# determine the Unicode backend -AC_MSG_CHECKING([the Unicode backend to use]) -AC_ARG_WITH(unicode_backend, - AC_HELP_STRING([--with-unicode-backend=@<:@icu@:>@], - [Select Unicode backend [default=icu]]), - [],[unicode_backend="icu"]) - -case "$unicode_backend" in - icu) ;; - *) AC_MSG_ERROR([Invalid Unicode backend: must be icu.]) ;; -esac - -AC_MSG_RESULT([$unicode_backend]) - -if test "$unicode_backend" = "icu"; then - AC_PATH_PROG(icu_config, icu-config, no) - if test "$icu_config" = "no"; then - if test "$os_darwin" = "yes"; then - UNICODE_CFLAGS="-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu" - UNICODE_LIBS="-licucore" - elif test "$os_win32" = "yes"; then - UNICODE_CFLAGS="" - UNICODE_LIBS="-licuin -licuuc" - else - AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.]) - fi - else - # We don't use --cflags as this gives us a lot of things that we don't - # necessarily want, like debugging and optimization flags - # See man (1) icu-config for more info. - UNICODE_CFLAGS=`$icu_config --cppflags` - UNICODE_LIBS=`$icu_config --ldflags` - fi -fi - -AC_SUBST([UNICODE_CFLAGS]) -AC_SUBST([UNICODE_LIBS]) - # determine the GDK/GTK+ target AC_MSG_CHECKING([the target windowing system]) AC_ARG_WITH(target, @@ -307,9 +199,6 @@ FREETYPE2_REQUIRED_VERSION=9.0 LIBXML_REQUIRED_VERSION=2.6 # minimum GTK+ base dependencies -GLIB_REQUIRED_VERSION=2.0 -GOBJECT_REQUIRED_VERSION=2.0 -GTHREAD_REQUIRED_VERSION=2.0 PANGO_REQUIRED_VERSION=1.0 GTK_REQUIRED_VERSION=2.8 @@ -320,13 +209,14 @@ LIBXSLT_REQUIRED_VERSION=1.1.7 SQLITE_REQUIRED_VERSION=3.0 GSTREAMER_REQUIRED_VERSION=0.10 -PKG_CHECK_MODULES([GLOBALDEPS], - [glib-2.0 >= $GLIB_REQUIRED_VERSION - gobject-2.0 >= $GOBJECT_REQUIRED_VERSION - gthread-2.0 >= $GTHREAD_REQUIRED_VERSION]) -AC_SUBST([GLOBALDEPS_CFLAGS]) -AC_SUBST([GLOBALDEPS_LIBS]) - +# Available modules +# +# glib - glib and includes gthread +# unicode - check and identify which unicode backend to use +# +# todo: webcore gtk +WEBKIT_CHECK_DEPENDENCIES([glib unicode]) + PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) @@ -456,8 +346,8 @@ AC_MSG_RESULT([$enable_xslt]) AC_MSG_CHECKING([whether to enable geolocation support]) AC_ARG_ENABLE(geolocation, AC_HELP_STRING([--enable-geolocation], - [enable support for geolocation [default=yes]]), - [],[enable_geolocation="yes"]) + [enable support for geolocation [default=no]]), + [],[enable_geolocation="no"]) AC_MSG_RESULT([$enable_geolocation]) # check whether to enable SVG support @@ -676,6 +566,14 @@ if test "$enable_xslt" = "yes"; then AC_SUBST([LIBXSLT_LIBS]) fi +# check if geoclue is available +if test "$enable_geolocation" = "yes"; then + PKG_CHECK_MODULES([GEOCLUE], [geoclue]) + AC_SUBST([GEOCLUE_CFLAGS]) + AC_SUBST([GEOCLUE_LIBS]) +fi + + # check if gstreamer is available if test "$enable_video" = "yes"; then PKG_CHECK_MODULES([GSTREAMER], diff --git a/packages/webkit/webkit-gtk_svn.bb b/packages/webkit/webkit-gtk_svn.bb index 96ef562e75..98926727fe 100644 --- a/packages/webkit/webkit-gtk_svn.bb +++ b/packages/webkit/webkit-gtk_svn.bb @@ -1,11 +1,11 @@ DESCRIPTION = "WebKit browser engine, GTK+ edition" -DEPENDS = "curl icu libxml2 cairo libxslt libxt libidn gnutls gtk+ gstreamer gst-plugins-base gnome-vfs bison-native flex-native gperf-native perl-native sqlite3" +DEPENDS = "libsoup-2.4 curl icu libxml2 cairo libxslt libxt libidn gnutls gtk+ gstreamer gst-plugins-base gnome-vfs bison-native flex-native gperf-native perl-native sqlite3" SRCREV_FORMAT = "webcore-rwebkit" # Yes, this is wrong... PV = "0.1+svnr${SRCREV}" -PR = "r7" +PR = "r8" SRC_URI = "\ svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptCore;proto=http \ @@ -14,7 +14,7 @@ SRC_URI = "\ svn://svn.webkit.org/repository/webkit/trunk/;module=WebKit;proto=http;name=webkit \ svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitLibraries;proto=http \ svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitTools;proto=http \ - file://acinclude.m4 \ + svn://svn.webkit.org/repository/webkit/trunk/;module=autotools;proto=http \ file://Makefile \ file://Makefile.shared \ file://autogen.sh \ @@ -29,13 +29,13 @@ inherit autotools pkgconfig lib_package export BISON="${STAGING_BINDIR_NATIVE}/bison" ARM_INSTRUCTION_SET = "arm" -# FIXME: Segfaulting without --with-http-backend=curl EXTRA_OECONF = "\ --enable-debug=no \ --enable-svg \ --enable-icon-database=yes \ - --with-http-backend=curl \ + --with-http-backend=soup \ " +EXTRA_AUTORECONF = " -I autotools " # Dolt gets used on x86 and ppc and hardcodes 'libtool' do_configure_append() { diff --git a/packages/wt/wt_2.2.3.bb b/packages/wt/wt_2.2.3.bb index ec0f3cc302..b9ab7580f8 100644 --- a/packages/wt/wt_2.2.3.bb +++ b/packages/wt/wt_2.2.3.bb @@ -2,8 +2,9 @@ DESCRIPTION = "A C++ Web Toolkit" PRIORITY = "optional" SECTION = "devel" LICENSE = "GPL" +HOMEPAGE = "http://www.webtoolkit.eu/wt" DEPENDS = "boost zlib openssl" -PR = "r0" +PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/witty/wt-${PV}.tar.gz \ file://cmakelist.patch;patch=1" diff --git a/packages/xorg-driver/xf86-video-geode_2.11.0.bb b/packages/xorg-driver/xf86-video-geode_2.11.0.bb new file mode 100644 index 0000000000..380ce2ea0b --- /dev/null +++ b/packages/xorg-driver/xf86-video-geode_2.11.0.bb @@ -0,0 +1,5 @@ +require xorg-driver-video.inc +PE = "1" + +COMPATIBLE_HOST = 'i.86.*-linux' +DESCRIPTION = "X.org server -- Geode GX2/LX display driver" |