v47 by Pali Rohar, move disabled patches
authorThomas Tanner <maemo@tannerlab.com>
Mon, 20 Jun 2011 14:32:51 +0000 (16:32 +0200)
committerThomas Tanner <maemo@tannerlab.com>
Mon, 20 Jun 2011 14:32:51 +0000 (16:32 +0200)
29 files changed:
kernel-power-2.6.28/debian/changelog
kernel-power-2.6.28/debian/control
kernel-power-2.6.28/debian/joikuspot/JoikuSpot_Bouncer.c [deleted file]
kernel-power-2.6.28/debian/joikuspot/Makefile [deleted file]
kernel-power-2.6.28/debian/kernel-power-modules.postinst.in
kernel-power-2.6.28/debian/madde.patch [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/anti-io-stalling.patch [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/arm-proc-v7.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/board-rx51-peripherals.patch [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/bq24150-sniff.diff [deleted file]
kernel-power-2.6.28/debian/patches/bq27x00_battery.patch [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/bq_matan.diff [deleted file]
kernel-power-2.6.28/debian/patches/disabled/bq24150-sniff.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/disabled/bq_matan.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/disabled/kexec.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/disabled/leds-lp5523.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/disabled/minstrel-aziwoqpa.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/disabled/usbwhitelist.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/joikuspot.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/kexec.diff [deleted file]
kernel-power-2.6.28/debian/patches/l2cap_parent.patch [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/leds-lp5523.diff [deleted file]
kernel-power-2.6.28/debian/patches/madde.patch [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/minstrel-aziwoqpa.diff [deleted file]
kernel-power-2.6.28/debian/patches/series
kernel-power-2.6.28/debian/patches/usbwhitelist.diff [deleted file]
kernel-power-2.6.28/debian/patches/wl12xx-rx-fix.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/rules [changed mode: 0644->0755]
kernel-power-2.6.28/debian/rx51power_defconfig

index 6c3ff37..174a4cf 100644 (file)
@@ -1,3 +1,12 @@
+kernel-power (1:2.6.28-10power47) fremantle; urgency=low
+
+  * enabled additional kernel modules (for usb host mode)
+  * backported bq27x00_battery patch
+  * some patches from kernel-power bugtracker
+  * multiboot support in kernel-power-bootimg package
+
+ -- Pali Rohár <pali.rohar@gmail.com>  Sun, 01 May 2011 01:22:09 +0200
+
 kernel-power (2.6.28-maemo46) fremantle; urgency=low
 
   * disable u-boot as causes too much trouble
@@ -498,12 +507,6 @@ kernel (2.6.28-20102101) unstable; urgency=low
   * Fixes: NB#160073 - wl1251_cmd_data_path leaks small buffer on error path
 
  -- Eugene Lyubimkin <ext-lyubimkin.eugene@nokia.com>  Fri, 28 May 2010 10:55:06 +0300
-kernel (2.6.28-20101501+0m5) unstable; urgency=low
-
-  * This entry has been added by BIFH queue processor
-    version has been changed to 2.6.28-20101501+0m5
-
- -- Lyubimkin Eugene <ext-lyubimkin.eugene@nokia.com>  Thu, 15 Apr 2010 09:13:02 +0300
 
 kernel (2.6.28-20101501) unstable; urgency=low
 
@@ -540,13 +543,6 @@ kernel (2.6.28-20100904) unstable; urgency=low
 
  -- Eugene Lyubimkin <ext-lyubimkin.eugene@nokia.com>  Fri, 05 Mar 2010 12:11:31 +0200
 
-kernel (2.6.28-20100903+0m5) unstable; urgency=low
-
-  * This entry has been added by BIFH queue processor
-    version has been changed to 2.6.28-20100903+0m5
-
- -- Lyubimkin Eugene <ext-lyubimkin.eugene@nokia.com>  Wed, 03 Mar 2010 10:11:53 +0200
-
 kernel (2.6.28-20100903) unstable; urgency=low
 
   * Fixes: NB#149006 - PVR: fix kernel crash due to freeing resource still in
@@ -721,37 +717,6 @@ kernel (2.6.28-20095001) intrepid; urgency=low
 
  -- Yauheni Kaliuta <yauheni.kaliuta@nokia.com>  Wed, 09 Dec 2009 09:50:07 +0200
 
-kernel (2.6.28-20094803.3+0m5) intrepid; urgency=low
-
-  * This entry has been added by BIFH queue processor
-    Suffix +0m5 added to package revision
-
- -- mika yrjola <ext-mika.2.yrjola@nokia.com>  Thu, 17 Dec 2009 09:23:47 +0200
-
-kernel (2.6.28-20094803.3) intrepid; urgency=low
-
-  * Fixes: NB#145487 - Some devices are rebooting when the device is idle
-  * No changes in any certification category.
-
- -- Yauheni Kaliuta <yauheni.kaliuta@nokia.com>  Wed, 16 Dec 2009 14:58:39 +0200
-
-kernel (2.6.28-20094803.2) intrepid; urgency=low
-
-  * fs+usb build
-  * fix enumeration problem
-  * Fixes: NB#150109 - Re-enumerate USB after rebooting the PC in
-    ACT_DEAD
-  * Fixes: NB#148525 - Free space disappears after PR1.0.1 to PR1.1 upgrade
-  * No changes in any certification category.
-
- -- Yauheni Kaliuta <yauheni.kaliuta@nokia.com>  Mon, 14 Dec 2009 10:00:53 +0200
-
-kernel (2.6.28-20094803.1) intrepid; urgency=low
-
-  * Fixes: NB#150262 - repeating kernel oopses in ieee80211_beacon_loss
-
- -- Yauheni Kaliuta <yauheni.kaliuta@nokia.com>  Fri, 11 Dec 2009 09:54:31 +0200
-
 kernel (2.6.28-20094803) intrepid; urgency=low
 
   * packaging: clean up kernel package.
index 59460e3..9e62f78 100644 (file)
@@ -1,9 +1,9 @@
 Source: kernel-power
 Section: utils
 Priority: optional
-Maintainer: Thomas Tanner <maemo@tannerlab.com>
+Maintainer: Pali Rohár <pali.rohar@gmail.com>
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=1528
-Build-Depends: debhelper (>= 4.0.0), quilt, sdk-fiasco-gen, libncurses5-dev, sharutils, uboot-mkimage, u-boot-for-power-kernel
+Build-Depends: debhelper (>= 4.0.0), quilt, sdk-fiasco-gen, libncurses5-dev, sharutils
 Standards-Version: 3.8.0
 
 Package: kernel-power-flasher
@@ -18,16 +18,17 @@ Provides: kernel-feature-netfilter, kernel-feature-ipv6, kernel-feature-ext4, ke
   kernel-feature-unionfs, kernel-feature-crypto, kernel-feature-dmloop, kernel-feature-utf8, kernel-feature-mousejoy,
   kernel-feature-usbip, kernel-feature-ppp, kernel-feature-qos, kernel-feature-block2mtd, kernel-feature-kexec,
   kernel-feature-overclock, kernel-feature-joikuspot, kernel-feature-slip, kernel-feature-battery, kernel-feature-pptp,
-  kernel-feature-wlan-monitor, kernel-feature-radiords, kernel-feature-ioacct, kernel-feature-usbhost
-XB-Maemo-Display-Name: Enhanced Linux kernel for power users
-Description: Linux kernel updater for an enhanced Maemo 5 kernel 2.6.28.10
+  kernel-feature-wlan-monitor, kernel-feature-radiords, kernel-feature-ioacct, kernel-feature-usbhost, kernel-feature-framebuffer
+XB-Maemo-Display-Name: Linux kernel for power user
+Description: Linux kernel updater for kernel power 2.6.28.10
  This package will flash the kernel image upon installation.
+ .
  After the installation, you need to unplug the USB cable,
  completely shutdown your device, and boot again to activate the kernel.
  .
  For more details and help please visit http://wiki.maemo.org/Kernel_Power
  .
- If you want to deinstall this kernel to revert to the original Nokia kernel, 
+ If you want to deinstall this kernel to revert to the original Nokia kernel,
  you must run the "Deinstall kernel-power" application. Deinstallation in
  the Application Manager is not possible.
  .
@@ -115,29 +116,107 @@ XB-Maemo-Icon-26:
 Package: kernel-power
 Architecture: armel
 Conflicts: kernel-maemo
-Description: Flashable Linux kernel
+Description: Flashable Linux kernel for kernel power 2.6.28.10
  This package provides a flashable kernel image.
- Use the kernel-flasher-maemo package to automatically flash it.
+ .
+ Install package kernel-power-flasher to automatically flash it.
 
 Package: kernel-power-bootimg
+Section: user/system
 Architecture: armel
-Description: Linux kernel boot image
- This package provides a bootable and flashable kernel image for kexec and
- flashing via USB cable in /boot.
- This package is optional and only useful for multiboot or experts.
+Depends: kernel-power-modules (= ${binary:Version})
+Conflicts: multiboot-kernel-power
+Recommends: multiboot, kernel-power-flasher, kernel-power-settings, usbip, iptables, mtd-utils, kexec-tools
+Provides: kernel-feature-netfilter, kernel-feature-ipv6, kernel-feature-ext4, kernel-feature-xfs, kernel-feature-reiserfs,
+  kernel-feature-ntfs-read, kernel-feature-udf, kernel-feature-cifs, kernel-feature-automounter, kernel-feature-squashfs, 
+  kernel-feature-unionfs, kernel-feature-crypto, kernel-feature-dmloop, kernel-feature-utf8, kernel-feature-mousejoy,
+  kernel-feature-usbip, kernel-feature-ppp, kernel-feature-qos, kernel-feature-block2mtd, kernel-feature-kexec,
+  kernel-feature-overclock, kernel-feature-joikuspot, kernel-feature-slip, kernel-feature-battery, kernel-feature-pptp,
+  kernel-feature-wlan-monitor, kernel-feature-radiords, kernel-feature-ioacct, kernel-feature-usbhost, kernel-feature-framebuffer
+XB-Maemo-Display-Name: Linux kernel for power user (boot image)
+Description: Linux kernel boot image for kernel power 2.6.28.10
+ This package provides a bootable kernel image and config file for multiboot.
+XB-Maemo-Icon-26:
+ iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QAAAAA
+ AAD5Q7t/AAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAwAAAAMADO
+ 7oxXAAAK60lEQVRo3sWZf2yU933HX997nnvuB2efz9g+E2M72IADxqAZI5IU
+ BiWzkrYRdbpNESyNupJGk1aVsZYt2qZJHVsbpZsR2ZooS0q7ZDTZJFdhVgLp
+ pk7NCq6CHZPMccAXjB3bwBkfPp/x/X6ez/7wHTmf7WB7TvlIH92P5/t9f9/v
+ z/fz/fnAZ2ONwA+ATmACsIBxoAP4O2DdZ9Tu/9v8wOuACUi+a5omfr9fdF1P
+ AT8CSu404VxzA91zEc96QUGBPPnkk7J7925xuVwCfAjcdaeJZ+3gp5EHxOPx
+ SE1NjXg8HrHZbNn/2wHtTpMH+OXtBMzjJvDAnSYPEALEZrNJUVGRaJo2i6xS
+ StasWSM+ny//2U+X2qhaJvIakPJ4PGrXrl2YpkkwGOT8+fOICD6fj3379lFV
+ VcXIyAi9vb2cOXOGeDyerT8MrAUSdyT0gA7I008/LZcuXZJQKCSHDx++NfO0
+ t7dLJBKRQCAgkUhEjh8/njsGsmlUfqfIZ818+eWXZf369XLkyBF55513xOv1
+ ypo1a8Q0TXnsscekrq5OWltbxTRNqa2tzRdQtpRGbcso4Obk5CQDAwN0nD2D
+ NvkrWu6P8MWmMaLX3ub999/n4sWLHDt2DMuycLvduXWTGV+0LdcYALh86NCh
+ uwv1Cerdx9m2Ae5eV8BAIE5xaYp3+3RePW3S/JXv0bD9ETZu3IhlWbn164C+
+ ZeSzaOts3mLIYNsKsc4h0olId61Ipy7SaRN5t0Lk3bvEfMcm//1DQwx91nT6
+ taU0umwppGuM/vmjSSqrplAKwA7W6DQ3bQ3YXFwfvUFXl0VDbRKHPl1PqVtJ
+ 8PAdFZA2Gf15l4fAh5BOA6RAJrHEzcjQGB+cv0QqGad+I/yqZz03EwqHw0FL
+ Swt1dXUopb4ArFpsu8u5hH9p1caHG92u9YQHL6HbLSYnIRhM4i1M4HJqBOPN
+ 3Cg4grv2AOfOnWNkZASv10tTUxOXL1+2x+NxC/jPOyHAAbTu2LmzaM8jf8yH
+ Q07S44OQtojHXQyF7ydW/j1qd/wFlWsbqaiooLy8nLa2NoaGhujr62NychJg
+ K3ASGF3GwN7WFNCqaZqcPHlSksmknD17Vl566SV58cUX5Y033pBAICDJZFJy
+ zTRNOXDgwFx7o27A85sU8C3AOnTokFiWJSIisVhMent7pbe3V27cuHHr/3z7
+ 6KOPxOl0ziXiBL+hHeofAKn6+nqZmpqaFWHTNOXTzLIs2bt373y71O9+1uR3
+ AlEye6DFWCqVklgsJvF4XE6fPi1KqbkEpIHHb0dCXyL5EuBfAVdxcTEOh4OB
+ gQGqqqqw2Wwkk0k+/vhjPB4Pfr//1lwfDofp7+9neHiYaDSKpmls376d++67
+ j46ODpRSuauzBjwHfAB0LXf0X8hGraWlRbq7u2VycnJGrs+XPslkUkKhkFy4
+ cEFOnTolr7zyirS1tYlhGFJZWSmrV6/O75Eepo+ry2YbbDZbsry8XIqLi6Wn
+ p2dR6ZNr6XRaAoGAnDp1Svbv3y+AeL1e8Xq9+en0t8sp4J/9fr94PB45duzY
+ ksnn2sTEhHR2dorT6ZSamhopKiqSlStX5gqIAtXLQb7EbrdPVVVVSVNTk8Ri
+ sWURkLWdO3feOo5u2rQp/9Dz3FyEFrsX+qMVK1a4Q6EQBw8exOl0zllIRJYU
+ nd27dxMOhzFNk0gkgsPhyH38Vea4R1qMgDLgYCqVQilFc3PzvAUHBweXJKCx
+ sfHW9/Hx8fzzggfYu1QBCvgHu91eUlFRQWNjI2Vlc58ARYSRkZElCSgqKpqB
+ k0ql8ovsWaqAPcA+TdNwOBxs3rw5dx8/w9Lp9JJTKBezsrJyLpy1SxWwA9AS
+ iQRKKVwu17wFTdOcV9xCTdd1EonEXAJmXbssaCVe6aX7zx6H7fXCCyc/Ihb7
+ 7U8tv9QeuHr1Kn6/n8LCQq5du0Z1dTWGYaBpGhcuXAD4xaJBC1y4/vdH6qy8
+ WyzSfbeY51zyV0+45JlnnpFUKjXn4nT27NlFTZ+p/u9IqmuT9L1eIW6nbda+
+ qK6uTlp2282GWvWFRZF32tGe+xYvSpdX5L3fEnlvq8j5ejHP6XJgr5KHHnpI
+ hoeHZxEaHx9fMHkznZSpjnUi5zdK8E2/qDl2pk/u1UTO18uHP6u4mM9x1hhw
+ O3BuWk1dy73se+GbtP/h76snsPk+Kaqc2PRVHDsMN4ZO09jYSFtb24y0yZ1N
+ bpdql/sDhIKjkO5j7EqQR7aCkUlslwFffwB+cMgB5hDFhTFfPsaM0fZ7n+PR
+ 1u/wbLlflSkFygaa7gatBpSRU9KEdD/9QxGavgrhm4r9+/dz9OhRSktLF9zD
+ 8Xic/3rrDapCj7N5S5SJcbjYAwMfw2QUVpXBtns1Slf5QblJJOOJB75xZceZ
+ 963OOXtg51Yerqxyl9nddeiue9AcG0Bfl0ceQAOtkprVBs8/BQrhxIkT7Nix
+ g3A4vGABuq7jcBhMhMGywOuDzU3Q/CB85XfhgQeh9K4q0FaBzYvD6Xe8fqzm
+ 9J4m/dZ1/AwBoTEGkCRggHKDcjHvyU45Qavk0QdtPPHl6b8CgQCBQGDBAmw2
+ G1dGhohOJkhlLhadbgNfqRNfsYHD5QWbd0adkmLvylPPb3jz6Ld93/cVKt+M
+ abRnkCEREyU3QfkWwKAIpJTWbwdxle5h266v09DQsGABHR0dfP9v/pLnv2Fi
+ WYAqAv1uQIGY0zk8RwANwzD+5PGap760M/jlGT1Q4sOulJ6J/ELDuJIVLjt/
+ /VgPv7Orcd4NXq5Fo1FaW1tpbm7Go8Ks8IBu10AryxC2gbJzu3P9+ER6LNsD
+ CjB2b+fz0z8tpmewhayoGiid4hWj/Pr0wwSb/o2GLVtnrMYiQiQSoauri/b2
+ dk6cOMH169cBWOsHTyFougOwL6A9i2vByes//PfrR599deLZrAADcG1vYBuk
+ IB34ZAwox3S+Y2SikjfzKg1QiECRvZ8//dq9XIrVUl1djdPpJBQKEQwGGR4e
+ JpGY/QKmthwMB5n7VDPvqYCkgTRmOkpfIBL8p9ciz738Vvr4zThjQELPMNIB
+ /XArR57az3fLfOm7dD2C3Yhgd4DDAXbDhm43ULZCUB5QOoiAhEHixKKQjEOl
+ z+TUe3309S3sprzYA8kExKbiuD3BzKDVgCSWOUXsZoz+S4nos69Zx199m59M
+ JRhj+l2CHUjpn0iFn73NW+1n6Kgs5p715TTW+LmndhXrqv1U+UutwuKSuFpZ
+ GsdTOIphKFCCWDB1E64MwbURuBYmBVwErgExpjdgsZzvGlDI9Cul6tAE1eNj
+ GA6nRWHROA5HGEsUNyMWo1fhrTP8+h/f5O+vTnA5gzEjr7M/DMCVcWfOpxNw
+ GhqeskJW11ew5XMb2Na4no2lJTidmbEenYKrI6R++ktee72bk2mLwcxAym9L
+ y8F1AI4da9l58It8s7gEm9MFmgbpFIxdJ/kvv+DH/3GeV02LaE4Q4pnPKJBQ
+ OeD2XNLZBjJuZJ7rgFbgpKBhNQ0Nq9mysoBVsQQTP++h7YMrdGeinABS2Z7N
+ 4NsyOLmYulLYGyvZum0N9xe6KQbMq2EG/6eP0wMhApl0SWSI53oCsPKnGS0D
+ bOQRv0U+QyRbTzKRNpm+SUtniCdz3MrUNXI8H1NlPItn5WDl4mWDk84GZ755
+ MruC6Hlum0NA9i1j1lM5YrJplO2BXOL5AVFz4OUGJYs347Cx0KOTmsOzlm10
+ FvgC8GwLwPtUzP8D2ZiyXz3Y3nwAAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAt
+ MDItMDZUMTk6Mjk6MjMrMDE6MDBL9SgPAAAAJXRFWHRtb2RpZnktZGF0ZQAy
+ MDA5LTA5LTI3VDA5OjM1OjM0KzAyOjAwrPojkwAAAABJRU5ErkJggg==
 
 Package: kernel-power-headers
 Architecture: armel
 Depends: ${shlibs:Depends}
 Conflicts: kernel-headers-maemo
-Description: Linux kernel headers
+Description: Linux kernel headers for kernel power 2.6.28.10
  This package provides kernel headers.
 
 Package: linux-kernel-power-headers
 Architecture: armel
 Depends: ${shlibs:Depends}
-Conflicts: linux-kernel-headers-maemo
-Description: Linux Kernel Headers for development
+Conflicts: linux-kernel-headers-maemo, linux-kernel-headers
+Description: Linux Kernel Headers for development from kernel power 2.6.28.10
  This package provides headers from the Linux kernel. These headers
  are used by the installed headers for GNU glibc and other system libraries.
 
@@ -145,5 +224,5 @@ Package: kernel-power-modules
 Architecture: armel
 Conflicts: kernel-modules-maemo
 Depends: module-init-tools (>= 3.3), kernel-power (= ${binary:Version}) | kernel-power-bootimg (= ${binary:Version})
-Description: Linux kernel modules
- This package provides kernel modules for the enhanced Maemo 5 kernel 2.6.28.10
+Description: Linux kernel modules for kernel power 2.6.28.10
+ This package provides kernel modules.
diff --git a/kernel-power-2.6.28/debian/joikuspot/JoikuSpot_Bouncer.c b/kernel-power-2.6.28/debian/joikuspot/JoikuSpot_Bouncer.c
deleted file mode 100644 (file)
index 8ff74a8..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/* 
- * Implementation of JoikuSpotBouncer module
- * JoikuSpot_Bouncer.c
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the license, or ( at your option ) any later version
- */
-
-#include <linux/module.h>         /* needed by all kernel modules          */
-#include <linux/init.h>           /* needed for custom init/exit functions */
-#include <linux/kernel.h>         /* needed for KERN_ALERT macro           */
-#include <linux/netfilter.h>      /* Hook register/unregister              */
-#include <linux/netfilter_ipv4.h> /* nf_hook_priorities                    */
-#include <linux/ip.h>             /* Ip header                             */
-#include <linux/tcp.h>            /* Tcp Header                            */
-#include <linux/udp.h>            /* Udp Header                            */
-#include <net/inet_hashtables.h>  /* __inet_lookup()                       */
-#include <net/inet_sock.h>        /* struct inet_sock                      */
-
-
-/* Special macro to indicate license (to avoid tainting the kernel) */
-
-MODULE_LICENSE( "Dual MIT/GPL" );
-MODULE_AUTHOR ( "JoikuSoft Oy Ltd <info@joikusoft.com>" );
-
-extern struct inet_hashinfo tcp_hashinfo;
-extern struct proto udp_prot;
-extern struct rwlock_t udp_hash_lock;
-
-static struct sock *__udp4_lib_lookup( struct net *net ,
-    unsigned long int saddr ,
-    unsigned short int sport ,
-    unsigned long int daddr ,
-    unsigned short int dport ,
-    int dif ,
-    struct hlist_head udptable[] )
-    {
-    struct sock *sk , *result = NULL;
-    struct hlist_node *node;
-    unsigned short int hnum = ntohs( dport );
-    int badness = -1;
-
-    read_lock( &udp_hash_lock );
-
-    sk_for_each ( sk , node , &udptable[ udp_hashfn ( net , hnum ) ] )
-        {
-        struct inet_sock *inet = inet_sk( sk );
-
-        if ( net_eq ( sock_net( sk ) , net ) && sk->sk_hash == hnum &&
-            !ipv6_only_sock( sk ) )
-            {
-
-            int score = ( sk->sk_family == PF_INET ? 1 : 0 );
-
-            if ( inet->rcv_saddr )
-                {
-                if ( inet->rcv_saddr != daddr )
-                    {
-                    continue;
-                    }
-                score += 2;
-                }
-            if ( inet->daddr )
-                {
-                if ( inet->daddr != saddr )
-                    {
-                    continue;
-                    }
-                score += 2;
-                }
-            if ( inet->dport )
-                {
-                if ( inet->dport != sport )
-                    {
-                    continue;
-                    }
-                score += 2;
-                }
-            if ( sk->sk_bound_dev_if )
-                {
-                if ( sk->sk_bound_dev_if != dif )
-                    {
-                    continue;
-                    }
-                score += 2;
-                }
-            if ( score == 9 )
-                {
-                result = sk;
-                break;
-                }
-                else if ( score > badness )
-                {
-                result  = sk;
-                badness = score;
-                }
-            }
-        }
-    if ( result )
-        {
-        sock_hold ( result );
-        }
-    read_unlock ( &udp_hash_lock );
-    return result;
-    }
-
-
-static unsigned int joikuspot_nf_hook ( unsigned int hook ,
-    struct sk_buff *pskb ,
-    const struct net_device *in ,
-    const struct net_device *out ,
-    int ( *okfn ) ( struct sk_buff * ) )
-    {
-    struct sock *sk;
-    struct iphdr *iph = ipip_hdr ( pskb );
-
-    if ( iph->protocol == 6 )
-        {
-        struct tcphdr *th, tcph;
-
-        th = skb_header_pointer (
-            pskb , iph->ihl << 2 , sizeof( tcph ) , &tcph );
-
-        sk = __inet_lookup( dev_net ( pskb->dst->dev ) , &tcp_hashinfo , 
-            iph->saddr , th->source , iph->daddr , th->dest , inet_iif ( pskb ) );
-
-        if( !sk )
-            {
-            return NF_DROP;
-            }
-        else
-            {
-            return NF_ACCEPT;
-            }
-        }
-
-    if ( iph->protocol == 17 )
-        {
-        struct udphdr *uh, udph;
-
-        uh = skb_header_pointer (
-            pskb , iph->ihl << 2 , sizeof( udph ) , &udph );
-
-        sk = __udp4_lib_lookup( dev_net ( pskb->dst->dev ) , iph->saddr , uh->source ,
-            iph->daddr , uh->dest , inet_iif ( pskb ) , udp_prot.h.udp_hash );
-
-        if ( sk != NULL )
-            {
-            return NF_ACCEPT;
-            }
-        else
-            {
-            return NF_DROP;
-            }
-        }
-
-    return NF_ACCEPT;
-    }
-
-
-static struct nf_hook_ops joikuspot_ops =
-    {
-    .hook     = joikuspot_nf_hook,
-    .owner    = THIS_MODULE,
-    .pf       = PF_INET,
-    .hooknum  = NF_INET_LOCAL_IN,
-    .priority = NF_IP_PRI_FIRST
-    };
-
-static int joikuspot_init( void )
-    {
-    int retval = 0;
-
-    printk( KERN_DEBUG "JoikuSpot Bouncer Kernel Module init\n" );
-
-    retval = nf_register_hook( &joikuspot_ops );
-
-    if ( retval < 0 )
-        {
-        return retval;
-        }
-
-    return retval;
-    }
-
-static void joikuspot_exit( void ) 
-    {
-    nf_unregister_hook ( &joikuspot_ops );
-    printk( KERN_DEBUG "JoikuSpot Bouncer Kernel Module exit\n" );
-    }
-
-module_init( joikuspot_init ); 
-module_exit( joikuspot_exit );
-
diff --git a/kernel-power-2.6.28/debian/joikuspot/Makefile b/kernel-power-2.6.28/debian/joikuspot/Makefile
deleted file mode 100644 (file)
index 4e53dd3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-obj-m := JoikuSpot_Bouncer.o
index 8264cc2..01ae40d 100644 (file)
@@ -16,5 +16,8 @@ if grep -q "MODULE_PATH=/lib/modules/current" /sbin/preinit; then
     mv /sbin/preinit.tmp /sbin/preinit
 fi
 
+dpkg-divert --local --divert /lib/modules/2.6.28-omap1/JoikuSpot_Bouncer.ko --rename --add /usr/bin/JoikuSpot_Bouncer.ko || :
+ln -sf /lib/modules/current/JoikuSpot_Bouncer.ko /usr/bin/JoikuSpot_Bouncer.ko || :
+
 #DEBHELPER#
 
diff --git a/kernel-power-2.6.28/debian/madde.patch b/kernel-power-2.6.28/debian/madde.patch
new file mode 100644 (file)
index 0000000..e466d8f
--- /dev/null
@@ -0,0 +1,66 @@
+diff --git kernel-power-2.6.28/debian/control kernel-power-2.6.28/debian/control
+index f178559..6ae60c1 100644
+--- kernel-power-2.6.28/debian/control
++++ kernel-power-2.6.28/debian/control
+@@ -3,7 +3,7 @@ Section: utils
+ Priority: optional
+ Maintainer: Pali Rohár <pali.rohar@gmail.com>
+ XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=1528
+-Build-Depends: debhelper (>= 4.0.0), quilt, sdk-fiasco-gen, libncurses5-dev, sharutils
++Build-Depends: debhelper (>= 4.0.0), quilt, libncurses5-dev, sharutils
+ Standards-Version: 3.8.0
+ Package: kernel-power-flasher
+diff --git kernel-power-2.6.28/debian/patches/series kernel-power-2.6.28/debian/patches/series
+index 4ae2339..93a7c2d 100644
+--- kernel-power-2.6.28/debian/patches/series
++++ kernel-power-2.6.28/debian/patches/series
+@@ -35,3 +35,4 @@ l2cap_parent.patch
+ wl12xx-rx-fix.diff
+ vanilla-2.6.28-anti-io-stalling.patch
+ joikuspot.diff
++madde.patch
+diff --git kernel-power-2.6.28/debian/rules kernel-power-2.6.28/debian/rules
+index 3f5cb4e..e0b7a44 100755
+--- kernel-power-2.6.28/debian/rules
++++ kernel-power-2.6.28/debian/rules
+@@ -102,7 +102,10 @@ install-kernel:
+       dh_installdirs
+       install -d -m 755 $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot
+-      fiasco-gen -o $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco -g \
++      test -f sdk-fiasco-gen_2.8.2.0.1+0m5_i386.deb || wget http://repository.maemo.org/pool/fremantle/non-free/s/sdk-fiasco-gen/sdk-fiasco-gen_2.8.2.0.1+0m5_i386.deb
++      ar x sdk-fiasco-gen_2.8.2.0.1+0m5_i386.deb data.tar.gz
++      tar -xf data.tar.gz ./usr/bin/fiasco-gen -O > fiasco-gen; chmod +x fiasco-gen
++      ./fiasco-gen -o $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco -g \
+                       -k $(BUILDTMP)/arch/arm/boot/zImage -v $(RELEASE)
+       chmod 644 $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco
+@@ -136,12 +139,12 @@ install-headers:
+       dh_installdirs
+       install -d -m755 $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
+-      install -p -o root -g root -m 644 $(BUILDTMP)/.config  $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
+-      install -p -o root -g root -m 644 $(KSRC)/Makefile $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
+-      install -p -o root -g root -m 644 $(BUILDTMP)/Module.symvers $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
+-      cd $(BUILDTMP) && install -p -o root -g root -m 644 -D include/config/auto.conf \
++      install -p -m 644 $(BUILDTMP)/.config  $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
++      install -p -m 644 $(KSRC)/Makefile $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
++      install -p -m 644 $(BUILDTMP)/Module.symvers $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
++      cd $(BUILDTMP) && install -p -m 644 -D include/config/auto.conf \
+               $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/include/config/auto.conf
+-      cd $(BUILDTMP) && install -p -o root -g root -m 644 -D include/config/kernel.release \
++      cd $(BUILDTMP) && install -p -m 644 -D include/config/kernel.release \
+               $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/include/config/kernel.release
+       cd $(KSRC) && \
+               find arch/$(ARCH) $(foreach dir,$(INCLUDE_HEADERS),include/$(dir)) -name '*.h' \
+@@ -240,9 +243,6 @@ endif
+       dh_installchangelogs -s
+       dh_installdocs -s
+       dh_install -s
+-ifeq ($(ARCH),arm)
+-      dh_strip -p$(HEADERS_PACKAGE)
+-endif
+       dh_compress -s
+       dh_fixperms -s --exclude /usr/src/kernel-headers
+       dh_installdeb -s
diff --git a/kernel-power-2.6.28/debian/patches/anti-io-stalling.patch b/kernel-power-2.6.28/debian/patches/anti-io-stalling.patch
new file mode 100644 (file)
index 0000000..1eb82e3
--- /dev/null
@@ -0,0 +1,138 @@
+--- kernel-2.6.28/mm/vmscan.c.orig     2009-05-02 14:54:43.000000000 -0400
++++ kernel-2.6.28/mm/vmscan.c  2010-11-11 12:06:49.955635002 -0500
+@@ -72,6 +72,12 @@ struct scan_control {
+       int order;
++      /*
++       * Intend to reclaim enough contenious memory rather than to reclaim
++       * enough amount memory. I.e, it's the mode for high order allocation.
++       */
++      bool lumpy_reclaim_mode;
++
+       /* Which cgroup do we reclaim from */
+       struct mem_cgroup *mem_cgroup;
+@@ -1024,6 +1030,47 @@ int isolate_lru_page(struct page *page)
+ }
+ /*
++ * Returns true if the caller should wait to clean dirty/writeback pages.
++ *
++ * If we are direct reclaiming for contiguous pages and we do not reclaim
++ * everything in the list, try again and wait for writeback IO to complete.
++ * This will stall high-order allocations noticeably. Only do that when really
++ * need to free the pages under high memory pressure.
++ */
++static inline bool should_reclaim_stall(unsigned long nr_taken,
++                                      unsigned long nr_freed,
++                                      int priority,
++                                      struct scan_control *sc)
++{
++      int lumpy_stall_priority;
++
++      /* kswapd should not stall on sync IO */
++      if (current_is_kswapd())
++              return false;
++
++      /* Only stall on lumpy reclaim */
++      if (!sc->lumpy_reclaim_mode)
++              return false;
++
++      /* If we have relaimed everything on the isolated list, no stall */
++      if (nr_freed == nr_taken)
++              return false;
++
++      /*
++       * For high-order allocations, there are two stall thresholds.
++       * High-cost allocations stall immediately where as lower
++       * order allocations such as stacks require the scanning
++       * priority to be much higher before stalling.
++       */
++      if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
++              lumpy_stall_priority = DEF_PRIORITY;
++      else
++              lumpy_stall_priority = DEF_PRIORITY / 3;
++
++      return priority <= lumpy_stall_priority;
++}
++
++/*
+  * shrink_inactive_list() is a helper for shrink_zone().  It returns the number
+  * of reclaimed pages
+  */
+@@ -1047,7 +1094,7 @@ static unsigned long shrink_inactive_lis
+               unsigned long nr_freed;
+               unsigned long nr_active;
+               unsigned int count[NR_LRU_LISTS] = { 0, };
+-              int mode = ISOLATE_INACTIVE;
++// use lumpy  int mode = ISOLATE_INACTIVE;
+               /*
+                * If we need a large contiguous chunk of memory, or have
+@@ -1056,13 +1103,11 @@ static unsigned long shrink_inactive_lis
+                *
+                * We use the same threshold as pageout congestion_wait below.
+                */
+-              if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
+-                      mode = ISOLATE_BOTH;
+-              else if (sc->order && priority < DEF_PRIORITY - 2)
+-                      mode = ISOLATE_BOTH;
+               nr_taken = sc->isolate_pages(sc->swap_cluster_max,
+-                           &page_list, &nr_scan, sc->order, mode,
++                           &page_list, &nr_scan, sc->order, 
++                              sc->lumpy_reclaim_mode ?
++                                      ISOLATE_BOTH : ISOLATE_INACTIVE,
+                               zone, sc->mem_cgroup, 0, file);
+               nr_active = clear_active_flags(&page_list, count);
+               __count_vm_events(PGDEACTIVATE, nr_active);
+@@ -1088,16 +1133,8 @@ static unsigned long shrink_inactive_lis
+               nr_scanned += nr_scan;
+               nr_freed = shrink_page_list(&page_list, sc, PAGEOUT_IO_ASYNC);
+-              /*
+-               * If we are direct reclaiming for contiguous pages and we do
+-               * not reclaim everything in the list, try again and wait
+-               * for IO to complete. This will stall high-order allocations
+-               * but that should be acceptable to the caller
+-               */
+-              if (nr_freed < nr_taken && !current_is_kswapd() &&
+-                                      sc->order > PAGE_ALLOC_COSTLY_ORDER) {
+-                      congestion_wait(WRITE, HZ/10);
+-
++              /* Check if we should syncronously wait for writeback */
++              if (should_reclaim_stall(nr_taken, nr_freed, priority, sc)) {
+                       /*
+                        * The attempt at page out may have made some
+                        * of the pages active, mark them inactive again.
+@@ -1404,6 +1441,20 @@ static void get_scan_ratio(struct zone *
+       percent[1] = 100 - percent[0];
+ }
++static void set_lumpy_reclaim_mode(int priority, struct scan_control *sc)
++{
++      /*
++      * If we need a large contiguous chunk of memory, or have
++      * trouble getting a small set of contiguous pages, we
++      * will reclaim both active and inactive pages.
++      */
++      if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
++              sc->lumpy_reclaim_mode = 1;
++      else if (sc->order && priority < DEF_PRIORITY - 2)
++              sc->lumpy_reclaim_mode = 1;
++      else
++              sc->lumpy_reclaim_mode = 0;
++}
+ /*
+  * This is a basic per-zone page freer.  Used by both kswapd and direct reclaim.
+@@ -1419,6 +1470,8 @@ static unsigned long shrink_zone(int pri
+       get_scan_ratio(zone, sc, percent);
++      set_lumpy_reclaim_mode(priority, sc);
++
+       for_each_evictable_lru(l) {
+               if (scan_global_lru(sc)) {
+                       int file = is_file_lru(l);
diff --git a/kernel-power-2.6.28/debian/patches/arm-proc-v7.diff b/kernel-power-2.6.28/debian/patches/arm-proc-v7.diff
new file mode 100644 (file)
index 0000000..9e5c7e3
--- /dev/null
@@ -0,0 +1,11 @@
+--- kernel-power-2.6.28.orig/arch/arm/mm/proc-v7.S
++++ kernel-power-2.6.28/arch/arm/mm/proc-v7.S
+@@ -85,7 +85,7 @@
+ #ifdef CONFIG_MMU
+       mov     r2, #0
+       ldr     r1, [r1, #MM_CONTEXT_ID]        @ get mm->context.id
+-      orr     r0, r0, #TTB_RGN_OC_WB          @ mark PTWs outer cacheable, WB
++      orr     r0, r0, #TTB_RGN_OC_WB
+       mcr     p15, 0, r2, c13, c0, 1          @ set reserved context ID
+       isb
+ 1:    mcr     p15, 0, r0, c2, c0, 0           @ set TTB 0
diff --git a/kernel-power-2.6.28/debian/patches/board-rx51-peripherals.patch b/kernel-power-2.6.28/debian/patches/board-rx51-peripherals.patch
new file mode 100644 (file)
index 0000000..92e0619
--- /dev/null
@@ -0,0 +1,12 @@
+--- kernel-power-2.6.28/arch/arm/mach-omap2/board-rx51-peripherals.c   2011-01-23 03:53:13.000000000 +0100
++++ kernel-power-2.6.28/arch/arm/mach-omap2/board-rx51-peripherals.c   2011-01-23 04:02:21.000000000 +0100
+@@ -572,6 +580,9 @@ static struct i2c_board_info __initdata 
+               I2C_BOARD_INFO("tsl2563", 0x29),
+               .platform_data = &rx51_tsl2563_platform_data,
+       },
++      {
++              I2C_BOARD_INFO("bq27200", 0x55),
++      },
+ };
+ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_3[] = {
diff --git a/kernel-power-2.6.28/debian/patches/bq24150-sniff.diff b/kernel-power-2.6.28/debian/patches/bq24150-sniff.diff
deleted file mode 100644 (file)
index 78d6c80..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
---- kernel-power-2.6.28.orig/drivers/i2c/i2c-core.c
-+++ kernel-power-2.6.28/drivers/i2c/i2c-core.c
-@@ -1042,7 +1042,26 @@
-                               (msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : "");
-               }
- #endif
--
-+              // inserted
-+              int i;
-+              if (msgs[0].addr == 0x6b) {
-+                printk("%s ", dev_name(&adap->dev));
-+                for (ret = 0; ret < num; ret++) { // nr of messages in this call
-+                  if (!(msgs[ret].flags & I2C_M_RD)) {
-+                    printk("(W):");
-+                    for (i = 0; i < msgs[ret].len; i++) {
-+                      printk(" 0x%02x", msgs[ret].buf[i]);
-+                    }
-+                  }
-+                  else {
-+                    printk("(R) %d bytes", msgs[ret].len);
-+                  }
-+                  printk(", ");
-+                }
-+                printk("\n");
-+              }
-+              // end inserted
-+              
-               if (in_atomic() || irqs_disabled()) {
-                       ret = mutex_trylock(&adap->bus_lock);
-                       if (!ret)
-@@ -1054,7 +1073,20 @@
-               ret = adap->algo->master_xfer(adap,msgs,num);
-               mutex_unlock(&adap->bus_lock);
--
-+              
-+              // inserted
-+              int j;
-+              for (i = 0; i < num; i++) {
-+                if (msgs[i].addr == 0x6b && (msgs[i].flags & I2C_M_RD)) {
-+                  printk("i2c_read: ");
-+                  for (j = 0; j < msgs[i].len; j++) {
-+                    printk(" 0x%02x", msgs[i].buf[j]);
-+                  }
-+                  printk("\n");
-+                }
-+              }
-+              // end inserted
-+              
-               return ret;
-       } else {
-               dev_dbg(&adap->dev, "I2C level transfers not supported\n");
diff --git a/kernel-power-2.6.28/debian/patches/bq27x00_battery.patch b/kernel-power-2.6.28/debian/patches/bq27x00_battery.patch
new file mode 100644 (file)
index 0000000..b46ed98
--- /dev/null
@@ -0,0 +1,974 @@
+--- kernel-power-2.6.28/drivers/power/bq27x00_battery.c        2011-05-01 01:48:44.000000000 +0200
++++ kernel-power-2.6.28/drivers/power/bq27x00_battery.c        2011-05-01 01:51:12.000000000 +0200
+@@ -3,6 +3,8 @@
+  *
+  * Copyright (C) 2008 Rodolfo Giometti <giometti@linux.it>
+  * Copyright (C) 2008 Eurotech S.p.A. <info@eurotech.it>
++ * Copyright (C) 2010-2011 Lars-Peter Clausen <lars@metafoo.de>
++ * Copyright (C) 2011 Pali Rohár <pali.rohar@gmail.com>
+  *
+  * Based on a previous work by Copyright (C) 2008 Texas Instruments, Inc.
+  *
+@@ -15,6 +17,13 @@
+  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  *
+  */
++
++/*
++ * Datasheets:
++ * http://focus.ti.com/docs/prod/folders/print/bq27000.html
++ * http://focus.ti.com/docs/prod/folders/print/bq27500.html
++ */
++
+ #include <linux/module.h>
+ #include <linux/param.h>
+ #include <linux/jiffies.h>
+@@ -24,144 +33,407 @@
+ #include <linux/power_supply.h>
+ #include <linux/idr.h>
+ #include <linux/i2c.h>
++#include <linux/slab.h>
+ #include <asm/unaligned.h>
+-#define DRIVER_VERSION                        "1.0.0"
++#define CONFIG_BATTERY_BQ27X00_I2C
++
++struct bq27000_platform_data {
++      const char *name;
++      int (*read)(struct device *dev, unsigned int);
++};
++
++#define DRIVER_VERSION                        "1.2.0"
+ #define BQ27x00_REG_TEMP              0x06
+ #define BQ27x00_REG_VOLT              0x08
+-#define BQ27x00_REG_RSOC              0x0B /* Relative State-of-Charge */
+ #define BQ27x00_REG_AI                        0x14
+ #define BQ27x00_REG_FLAGS             0x0A
++#define BQ27x00_REG_TTE                       0x16
++#define BQ27x00_REG_TTF                       0x18
++#define BQ27x00_REG_TTECP             0x26
++#define BQ27x00_REG_NAC                       0x0C /* Nominal available capaciy */
++#define BQ27x00_REG_LMD                       0x12 /* Last measured discharge */
++#define BQ27x00_REG_CYCT              0x2A /* Cycle count total */
++#define BQ27x00_REG_AE                        0x22 /* Available enery */
++
++#define BQ27000_REG_RSOC              0x0B /* Relative State-of-Charge */
++#define BQ27000_REG_ILMD              0x76 /* Initial last measured discharge */
++#define BQ27000_FLAG_CHGS             BIT(7)
++#define BQ27000_FLAG_FC                       BIT(5)
++
++#define BQ27500_REG_SOC                       0x2C
++#define BQ27500_REG_DCAP              0x3C /* Design capacity */
++#define BQ27500_FLAG_DSC              BIT(0)
++#define BQ27500_FLAG_FC                       BIT(9)
+-/* If the system has several batteries we need a different name for each
+- * of them...
+- */
+-static DEFINE_IDR(battery_id);
+-static DEFINE_MUTEX(battery_mutex);
++#define BQ27000_RS                    20 /* Resistor sense */
+ struct bq27x00_device_info;
+ struct bq27x00_access_methods {
+-      int (*read)(u8 reg, int *rt_value, int b_single,
+-              struct bq27x00_device_info *di);
++      int (*read)(struct bq27x00_device_info *di, u8 reg, bool single);
++};
++
++enum bq27x00_chip { BQ27000, BQ27500 };
++
++struct bq27x00_reg_cache {
++      int temperature;
++      int time_to_empty;
++      int time_to_empty_avg;
++      int time_to_full;
++      int charge_full;
++      int capacity;
++      int flags;
++
++      int current_now;
+ };
+ struct bq27x00_device_info {
+       struct device           *dev;
+       int                     id;
+-      int                     voltage_uV;
+-      int                     current_uA;
+-      int                     temp_C;
+-      int                     charge_rsoc;
+-      struct bq27x00_access_methods   *bus;
++      enum bq27x00_chip       chip;
++
++      struct bq27x00_reg_cache cache;
++      int charge_design_full;
++
++      unsigned long last_update;
++      struct delayed_work work;
++
+       struct power_supply     bat;
+-      struct i2c_client       *client;
++      struct bq27x00_access_methods bus;
++
++      struct mutex lock;
+ };
+ static enum power_supply_property bq27x00_battery_props[] = {
++      POWER_SUPPLY_PROP_STATUS,
+       POWER_SUPPLY_PROP_PRESENT,
+       POWER_SUPPLY_PROP_VOLTAGE_NOW,
+       POWER_SUPPLY_PROP_CURRENT_NOW,
+       POWER_SUPPLY_PROP_CAPACITY,
+       POWER_SUPPLY_PROP_TEMP,
++      POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
++      POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG,
++      POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
++      POWER_SUPPLY_PROP_TECHNOLOGY,
++      POWER_SUPPLY_PROP_CHARGE_FULL,
++      POWER_SUPPLY_PROP_CHARGE_NOW,
++      POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
+ };
++static unsigned int poll_interval = 360;
++module_param(poll_interval, uint, 0644);
++MODULE_PARM_DESC(poll_interval, "battery poll interval in seconds - " \
++                              "0 disables polling");
++
+ /*
+  * Common code for BQ27x00 devices
+  */
+-static int bq27x00_read(u8 reg, int *rt_value, int b_single,
+-                      struct bq27x00_device_info *di)
++static inline int bq27x00_read(struct bq27x00_device_info *di, u8 reg,
++              bool single)
+ {
+-      int ret;
++      return di->bus.read(di, reg, single);
++}
++
++/*
++ * Return the battery Relative State-of-Charge
++ * Or < 0 if something fails.
++ */
++static int bq27x00_battery_read_rsoc(struct bq27x00_device_info *di)
++{
++      int rsoc;
+-      ret = di->bus->read(reg, rt_value, b_single, di);
+-      *rt_value = be16_to_cpu(*rt_value);
++      if (di->chip == BQ27500)
++              rsoc = bq27x00_read(di, BQ27500_REG_SOC, false);
++      else
++              rsoc = bq27x00_read(di, BQ27000_REG_RSOC, true);
+-      return ret;
++      if (rsoc < 0)
++              dev_err(di->dev, "error reading relative State-of-Charge\n");
++
++      return rsoc;
+ }
+ /*
+- * Return the battery temperature in Celcius degrees
++ * Return a battery charge value in µAh
+  * Or < 0 if something fails.
+  */
+-static int bq27x00_battery_temperature(struct bq27x00_device_info *di)
++static int bq27x00_battery_read_charge(struct bq27x00_device_info *di, u8 reg)
+ {
+-      int ret;
+-      int temp = 0;
++      int charge;
+-      ret = bq27x00_read(BQ27x00_REG_TEMP, &temp, 0, di);
+-      if (ret) {
+-              dev_err(di->dev, "error reading temperature\n");
+-              return ret;
++      charge = bq27x00_read(di, reg, false);
++      if (charge < 0) {
++              dev_err(di->dev, "error reading nominal available capacity\n");
++              return charge;
+       }
+-      return (temp >> 2) - 273;
++      if (di->chip == BQ27500)
++              charge *= 1000;
++      else
++              charge = charge * 3570 / BQ27000_RS;
++
++      return charge;
+ }
+ /*
+- * Return the battery Voltage in milivolts
++ * Return the battery Nominal available capaciy in µAh
+  * Or < 0 if something fails.
+  */
+-static int bq27x00_battery_voltage(struct bq27x00_device_info *di)
++static inline int bq27x00_battery_read_nac(struct bq27x00_device_info *di)
+ {
+-      int ret;
+-      int volt = 0;
++      return bq27x00_battery_read_charge(di, BQ27x00_REG_NAC);
++}
+-      ret = bq27x00_read(BQ27x00_REG_VOLT, &volt, 0, di);
+-      if (ret) {
+-              dev_err(di->dev, "error reading voltage\n");
+-              return ret;
++/*
++ * Return the battery Last measured discharge in µAh
++ * Or < 0 if something fails.
++ */
++static inline int bq27x00_battery_read_lmd(struct bq27x00_device_info *di)
++{
++      return bq27x00_battery_read_charge(di, BQ27x00_REG_LMD);
++}
++
++/*
++ * Return the battery Initial last measured discharge in µAh
++ * Or < 0 if something fails.
++ */
++static int bq27x00_battery_read_ilmd(struct bq27x00_device_info *di)
++{
++      int ilmd;
++
++      if (di->chip == BQ27500)
++              ilmd = bq27x00_read(di, BQ27500_REG_DCAP, false);
++      else
++              ilmd = bq27x00_read(di, BQ27000_REG_ILMD, true);
++
++      if (ilmd < 0) {
++              dev_err(di->dev, "error reading initial last measured discharge\n");
++              return ilmd;
+       }
+-      return volt;
++      if (di->chip == BQ27500)
++              ilmd *= 1000;
++      else
++              ilmd = ilmd * 256 * 3570 / BQ27000_RS;
++
++      return ilmd;
+ }
+ /*
+- * Return the battery average current
+- * Note that current can be negative signed as well
+- * Or 0 if something fails.
++ * Return the battery Cycle count total
++ * Or < 0 if something fails.
+  */
+-static int bq27x00_battery_current(struct bq27x00_device_info *di)
++static int bq27x00_battery_read_cyct(struct bq27x00_device_info *di)
+ {
+-      int ret;
+-      int curr = 0;
+-      int flags = 0;
++      int cyct;
+-      ret = bq27x00_read(BQ27x00_REG_AI, &curr, 0, di);
+-      if (ret) {
+-              dev_err(di->dev, "error reading current\n");
+-              return 0;
++      cyct = bq27x00_read(di, BQ27x00_REG_CYCT, false);
++      if (cyct < 0)
++              dev_err(di->dev, "error reading cycle count total\n");
++
++      return cyct;
++}
++
++/*
++ * Read a time register.
++ * Return < 0 if something fails.
++ */
++static int bq27x00_battery_read_time(struct bq27x00_device_info *di, u8 reg)
++{
++      int tval;
++
++      tval = bq27x00_read(di, reg, false);
++      if (tval < 0) {
++              dev_err(di->dev, "error reading register %02x: %d\n", reg, tval);
++              return tval;
+       }
+-      ret = bq27x00_read(BQ27x00_REG_FLAGS, &flags, 0, di);
+-      if (ret < 0) {
+-              dev_err(di->dev, "error reading flags\n");
++
++      if (tval == 65535)
+               return 0;
++
++      return tval * 60;
++}
++
++static void bq27x00_update(struct bq27x00_device_info *di)
++{
++      struct bq27x00_reg_cache cache = {0, };
++      bool is_bq27500 = di->chip == BQ27500;
++
++      cache.flags = bq27x00_read(di, BQ27x00_REG_FLAGS, is_bq27500);
++      if (cache.flags >= 0) {
++              cache.capacity = bq27x00_battery_read_rsoc(di);
++              cache.temperature = bq27x00_read(di, BQ27x00_REG_TEMP, false);
++              cache.time_to_empty = bq27x00_battery_read_time(di, BQ27x00_REG_TTE);
++              cache.time_to_empty_avg = bq27x00_battery_read_time(di, BQ27x00_REG_TTECP);
++              cache.time_to_full = bq27x00_battery_read_time(di, BQ27x00_REG_TTF);
++              cache.charge_full = bq27x00_battery_read_lmd(di);
++
++              if (!is_bq27500)
++                      cache.current_now = bq27x00_read(di, BQ27x00_REG_AI, false);
++
++              /* We only have to read charge design full once */
++              if (di->charge_design_full <= 0)
++                      di->charge_design_full = bq27x00_battery_read_ilmd(di);
+       }
+-      if ((flags & (1 << 7)) != 0) {
+-              dev_dbg(di->dev, "negative current!\n");
+-              return -curr;
++
++      /* Ignore current_now which is a snapshot of the current battery state
++       * and is likely to be different even between two consecutive reads */
++      if (memcmp(&di->cache, &cache, sizeof(cache) - sizeof(int)) != 0) {
++              di->cache = cache;
++              power_supply_changed(&di->bat);
++      }
++
++      di->last_update = jiffies;
++}
++
++static void bq27x00_battery_poll(struct work_struct *work)
++{
++      struct bq27x00_device_info *di =
++              container_of(work, struct bq27x00_device_info, work.work);
++
++      bq27x00_update(di);
++
++      if (poll_interval > 0) {
++              schedule_delayed_work(&di->work, poll_interval * HZ);
+       }
+-      return curr;
+ }
++
+ /*
+- * Return the battery Relative State-of-Charge
++ * Return the battery temperature in tenths of degree Celsius
+  * Or < 0 if something fails.
+  */
+-static int bq27x00_battery_rsoc(struct bq27x00_device_info *di)
++static int bq27x00_battery_temperature(struct bq27x00_device_info *di,
++      union power_supply_propval *val)
+ {
+-      int ret;
+-      int rsoc = 0;
++      if (di->cache.temperature < 0)
++              return di->cache.temperature;
+-      ret = bq27x00_read(BQ27x00_REG_RSOC, &rsoc, 1, di);
+-      if (ret) {
+-              dev_err(di->dev, "error reading relative State-of-Charge\n");
+-              return ret;
++      if (di->chip == BQ27500)
++              val->intval = di->cache.temperature - 2731;
++      else
++              val->intval = ((di->cache.temperature * 5) - 5463) / 2;
++
++      return 0;
++}
++
++/*
++ * Return the battery average current in µA
++ * Note that current can be negative signed as well
++ * Or 0 if something fails.
++ */
++static int bq27x00_battery_current(struct bq27x00_device_info *di,
++      union power_supply_propval *val)
++{
++      int curr;
++
++      if (di->chip == BQ27500)
++          curr = bq27x00_read(di, BQ27x00_REG_AI, false);
++      else
++          curr = di->cache.current_now;
++
++      if (curr < 0)
++              return curr;
++
++      if (di->chip == BQ27500) {
++              /* bq27500 returns signed value */
++              val->intval = (int)((s16)curr) * 1000;
++      } else {
++              if (di->cache.flags & BQ27000_FLAG_CHGS) {
++                      dev_dbg(di->dev, "negative current!\n");
++                      curr = -curr;
++              }
++
++              val->intval = curr * 3570 / BQ27000_RS;
+       }
+-      return rsoc >> 8;
++      return 0;
++}
++
++static int bq27x00_battery_status(struct bq27x00_device_info *di,
++      union power_supply_propval *val)
++{
++      int status;
++
++      if (di->chip == BQ27500) {
++              if (di->cache.flags & BQ27500_FLAG_FC)
++                      status = POWER_SUPPLY_STATUS_FULL;
++              else if (di->cache.flags & BQ27500_FLAG_DSC)
++                      status = POWER_SUPPLY_STATUS_DISCHARGING;
++              else
++                      status = POWER_SUPPLY_STATUS_CHARGING;
++      } else {
++              if (di->cache.flags & BQ27000_FLAG_FC)
++                      status = POWER_SUPPLY_STATUS_FULL;
++              else if (di->cache.flags & BQ27000_FLAG_CHGS)
++                      status = POWER_SUPPLY_STATUS_CHARGING;
++              else if (power_supply_am_i_supplied(&di->bat))
++                      status = POWER_SUPPLY_STATUS_NOT_CHARGING;
++              else
++                      status = POWER_SUPPLY_STATUS_DISCHARGING;
++      }
++
++      val->intval = status;
++
++      return 0;
++}
++
++/*
++ * Return the battery Voltage in milivolts
++ * Or < 0 if something fails.
++ */
++static int bq27x00_battery_voltage(struct bq27x00_device_info *di,
++      union power_supply_propval *val)
++{
++      int volt;
++
++      volt = bq27x00_read(di, BQ27x00_REG_VOLT, false);
++      if (volt < 0)
++              return volt;
++
++      val->intval = volt * 1000;
++
++      return 0;
++}
++
++/*
++ * Return the battery Available energy in µWh
++ * Or < 0 if something fails.
++ */
++static int bq27x00_battery_energy(struct bq27x00_device_info *di,
++      union power_supply_propval *val)
++{
++      int ae;
++
++      ae = bq27x00_read(di, BQ27x00_REG_AE, false);
++      if (ae < 0) {
++              dev_err(di->dev, "error reading available energy\n");
++              return ae;
++      }
++
++      if (di->chip == BQ27500)
++              ae *= 1000;
++      else
++              ae = ae * 29200 / BQ27000_RS;
++
++      val->intval = ae;
++
++      return 0;
++}
++
++
++static int bq27x00_simple_value(int value,
++      union power_supply_propval *val)
++{
++      if (value < 0)
++              return value;
++
++      val->intval = value;
++
++      return 0;
+ }
+ #define to_bq27x00_device_info(x) container_of((x), \
+@@ -171,89 +443,161 @@ static int bq27x00_battery_get_property(
+                                       enum power_supply_property psp,
+                                       union power_supply_propval *val)
+ {
++      int ret = 0;
+       struct bq27x00_device_info *di = to_bq27x00_device_info(psy);
++      mutex_lock(&di->lock);
++      if (time_is_before_jiffies(di->last_update + 5 * HZ)) {
++              cancel_delayed_work_sync(&di->work);
++              bq27x00_battery_poll(&di->work.work);
++      }
++      mutex_unlock(&di->lock);
++
++      if (psp != POWER_SUPPLY_PROP_PRESENT && di->cache.flags < 0)
++              return -ENODEV;
++
+       switch (psp) {
++      case POWER_SUPPLY_PROP_STATUS:
++              ret = bq27x00_battery_status(di, val);
++              break;
+       case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++              ret = bq27x00_battery_voltage(di, val);
++              break;
+       case POWER_SUPPLY_PROP_PRESENT:
+-              val->intval = bq27x00_battery_voltage(di);
+-              if (psp == POWER_SUPPLY_PROP_PRESENT)
+-                      val->intval = val->intval <= 0 ? 0 : 1;
++              val->intval = di->cache.flags < 0 ? 0 : 1;
+               break;
+       case POWER_SUPPLY_PROP_CURRENT_NOW:
+-              val->intval = bq27x00_battery_current(di);
++              ret = bq27x00_battery_current(di, val);
+               break;
+       case POWER_SUPPLY_PROP_CAPACITY:
+-              val->intval = bq27x00_battery_rsoc(di);
++              ret = bq27x00_simple_value(di->cache.capacity, val);
+               break;
+       case POWER_SUPPLY_PROP_TEMP:
+-              val->intval = bq27x00_battery_temperature(di);
++              ret = bq27x00_battery_temperature(di, val);
++              break;
++      case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
++              ret = bq27x00_simple_value(di->cache.time_to_empty, val);
++              break;
++      case POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG:
++              ret = bq27x00_simple_value(di->cache.time_to_empty_avg, val);
++              break;
++      case POWER_SUPPLY_PROP_TIME_TO_FULL_NOW:
++              ret = bq27x00_simple_value(di->cache.time_to_full, val);
++              break;
++      case POWER_SUPPLY_PROP_TECHNOLOGY:
++              val->intval = POWER_SUPPLY_TECHNOLOGY_LION;
++              break;
++      case POWER_SUPPLY_PROP_CHARGE_NOW:
++              ret = bq27x00_simple_value(bq27x00_battery_read_nac(di), val);
++              break;
++      case POWER_SUPPLY_PROP_CHARGE_FULL:
++              ret = bq27x00_simple_value(di->cache.charge_full, val);
++              break;
++      case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
++              ret = bq27x00_simple_value(di->charge_design_full, val);
++              break;
++      case POWER_SUPPLY_PROP_ENERGY_NOW:
++              ret = bq27x00_battery_energy(di, val);
+               break;
+       default:
+               return -EINVAL;
+       }
+-      return 0;
++      return ret;
+ }
+-static void bq27x00_powersupply_init(struct bq27x00_device_info *di)
++static void bq27x00_external_power_changed(struct power_supply *psy)
+ {
++      struct bq27x00_device_info *di = to_bq27x00_device_info(psy);
++
++      cancel_delayed_work_sync(&di->work);
++      schedule_delayed_work(&di->work, 0);
++}
++
++static int bq27x00_powersupply_init(struct bq27x00_device_info *di)
++{
++      int ret;
++
+       di->bat.type = POWER_SUPPLY_TYPE_BATTERY;
+       di->bat.properties = bq27x00_battery_props;
+       di->bat.num_properties = ARRAY_SIZE(bq27x00_battery_props);
+       di->bat.get_property = bq27x00_battery_get_property;
+-      di->bat.external_power_changed = NULL;
++      di->bat.external_power_changed = bq27x00_external_power_changed;
++
++      INIT_DELAYED_WORK(&di->work, bq27x00_battery_poll);
++      mutex_init(&di->lock);
++
++      ret = power_supply_register(di->dev, &di->bat);
++      if (ret) {
++              dev_err(di->dev, "failed to register battery: %d\n", ret);
++              return ret;
++      }
++
++      dev_info(di->dev, "support ver. %s enabled\n", DRIVER_VERSION);
++
++      bq27x00_update(di);
++
++      return 0;
+ }
+-/*
+- * BQ27200 specific code
++static void bq27x00_powersupply_unregister(struct bq27x00_device_info *di)
++{
++      cancel_delayed_work_sync(&di->work);
++
++      power_supply_unregister(&di->bat);
++
++      mutex_destroy(&di->lock);
++}
++
++
++/* i2c specific code */
++#ifdef CONFIG_BATTERY_BQ27X00_I2C
++
++/* If the system has several batteries we need a different name for each
++ * of them...
+  */
++static DEFINE_IDR(battery_id);
++static DEFINE_MUTEX(battery_mutex);
+-static int bq27200_read(u8 reg, int *rt_value, int b_single,
+-                      struct bq27x00_device_info *di)
++static int bq27x00_read_i2c(struct bq27x00_device_info *di, u8 reg, bool single)
+ {
+-      struct i2c_client *client = di->client;
+-      struct i2c_msg msg[1];
++      struct i2c_client *client = to_i2c_client(di->dev);
++      struct i2c_msg msg[2];
+       unsigned char data[2];
+-      int err;
++      int ret;
+       if (!client->adapter)
+               return -ENODEV;
+-      msg->addr = client->addr;
+-      msg->flags = 0;
+-      msg->len = 1;
+-      msg->buf = data;
+-
+-      data[0] = reg;
+-      err = i2c_transfer(client->adapter, msg, 1);
+-
+-      if (err >= 0) {
+-              if (!b_single)
+-                      msg->len = 2;
+-              else
+-                      msg->len = 1;
++      msg[0].addr = client->addr;
++      msg[0].flags = 0;
++      msg[0].buf = &reg;
++      msg[0].len = sizeof(reg);
++      msg[1].addr = client->addr;
++      msg[1].flags = I2C_M_RD;
++      msg[1].buf = data;
++      if (single)
++              msg[1].len = 1;
++      else
++              msg[1].len = 2;
+-              msg->flags = I2C_M_RD;
+-              err = i2c_transfer(client->adapter, msg, 1);
+-              if (err >= 0) {
+-                      if (!b_single)
+-                              *rt_value = get_unaligned_be16(data);
+-                      else
+-                              *rt_value = data[0];
++      ret = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
++      if (ret < 0)
++              return ret;
+-                      return 0;
+-              }
+-      }
+-      return err;
++      if (!single)
++              ret = get_unaligned_le16(data);
++      else
++              ret = data[0];
++
++      return ret;
+ }
+-static int bq27200_battery_probe(struct i2c_client *client,
++static int bq27x00_battery_probe(struct i2c_client *client,
+                                const struct i2c_device_id *id)
+ {
+       char *name;
+       struct bq27x00_device_info *di;
+-      struct bq27x00_access_methods *bus;
+       int num;
+       int retval = 0;
+@@ -267,7 +611,7 @@ static int bq27200_battery_probe(struct 
+       if (retval < 0)
+               return retval;
+-      name = kasprintf(GFP_KERNEL, "bq27200-%d", num);
++      name = kasprintf(GFP_KERNEL, "%s-%d", id->name, num);
+       if (!name) {
+               dev_err(&client->dev, "failed to allocate device name\n");
+               retval = -ENOMEM;
+@@ -280,37 +624,20 @@ static int bq27200_battery_probe(struct 
+               retval = -ENOMEM;
+               goto batt_failed_2;
+       }
+-      di->id = num;
+-      bus = kzalloc(sizeof(*bus), GFP_KERNEL);
+-      if (!bus) {
+-              dev_err(&client->dev, "failed to allocate access method "
+-                                      "data\n");
+-              retval = -ENOMEM;
+-              goto batt_failed_3;
+-      }
+-
+-      i2c_set_clientdata(client, di);
++      di->id = num;
+       di->dev = &client->dev;
++      di->chip = id->driver_data;
+       di->bat.name = name;
+-      bus->read = &bq27200_read;
+-      di->bus = bus;
+-      di->client = client;
+-
+-      bq27x00_powersupply_init(di);
++      di->bus.read = &bq27x00_read_i2c;
+-      retval = power_supply_register(&client->dev, &di->bat);
+-      if (retval) {
+-              dev_err(&client->dev, "failed to register battery\n");
+-              goto batt_failed_4;
+-      }
++      if (bq27x00_powersupply_init(di))
++              goto batt_failed_3;
+-      dev_info(&client->dev, "support ver. %s enabled\n", DRIVER_VERSION);
++      i2c_set_clientdata(client, di);
+       return 0;
+-batt_failed_4:
+-      kfree(bus);
+ batt_failed_3:
+       kfree(di);
+ batt_failed_2:
+@@ -323,11 +650,11 @@ batt_failed_1:
+       return retval;
+ }
+-static int bq27200_battery_remove(struct i2c_client *client)
++static int bq27x00_battery_remove(struct i2c_client *client)
+ {
+       struct bq27x00_device_info *di = i2c_get_clientdata(client);
+-      power_supply_unregister(&di->bat);
++      bq27x00_powersupply_unregister(di);
+       kfree(di->bat.name);
+@@ -340,31 +667,180 @@ static int bq27200_battery_remove(struct
+       return 0;
+ }
+-/*
+- * Module stuff
+- */
+-
+-static const struct i2c_device_id bq27200_id[] = {
+-      { "bq27200", 0 },
++static const struct i2c_device_id bq27x00_id[] = {
++      { "bq27200", BQ27000 }, /* bq27200 is same as bq27000, but with i2c */
++      { "bq27500", BQ27500 },
+       {},
+ };
++MODULE_DEVICE_TABLE(i2c, bq27x00_id);
++
++static struct i2c_driver bq27x00_battery_driver = {
++      .driver = {
++              .name = "bq27x00-battery",
++      },
++      .probe = bq27x00_battery_probe,
++      .remove = bq27x00_battery_remove,
++      .id_table = bq27x00_id,
++};
++
++static inline int bq27x00_battery_i2c_init(void)
++{
++      int ret = i2c_add_driver(&bq27x00_battery_driver);
++      if (ret)
++              printk(KERN_ERR "Unable to register BQ27x00 i2c driver\n");
++
++      return ret;
++}
++
++static inline void bq27x00_battery_i2c_exit(void)
++{
++      i2c_del_driver(&bq27x00_battery_driver);
++}
++
++#else
++
++static inline int bq27x00_battery_i2c_init(void) { return 0; }
++static inline void bq27x00_battery_i2c_exit(void) {};
++
++#endif
++
++/* platform specific code */
++#ifdef CONFIG_BATTERY_BQ27X00_PLATFORM
++
++static int bq27000_read_platform(struct bq27x00_device_info *di, u8 reg,
++                      bool single)
++{
++      struct device *dev = di->dev;
++      struct bq27000_platform_data *pdata = dev->platform_data;
++      unsigned int timeout = 3;
++      int upper, lower;
++      int temp;
++
++      if (!single) {
++              /* Make sure the value has not changed in between reading the
++               * lower and the upper part */
++              upper = pdata->read(dev, reg + 1);
++              do {
++                      temp = upper;
++                      if (upper < 0)
++                              return upper;
++
++                      lower = pdata->read(dev, reg);
++                      if (lower < 0)
++                              return lower;
++
++                      upper = pdata->read(dev, reg + 1);
++              } while (temp != upper && --timeout);
++
++              if (timeout == 0)
++                      return -EIO;
++
++              return (upper << 8) | lower;
++      }
++
++      return pdata->read(dev, reg);
++}
++
++static int __devinit bq27000_battery_probe(struct platform_device *pdev)
++{
++      struct bq27x00_device_info *di;
++      struct bq27000_platform_data *pdata = pdev->dev.platform_data;
++      int ret;
++
++      if (!pdata) {
++              dev_err(&pdev->dev, "no platform_data supplied\n");
++              return -EINVAL;
++      }
++
++      if (!pdata->read) {
++              dev_err(&pdev->dev, "no hdq read callback supplied\n");
++              return -EINVAL;
++      }
++
++      di = kzalloc(sizeof(*di), GFP_KERNEL);
++      if (!di) {
++              dev_err(&pdev->dev, "failed to allocate device info data\n");
++              return -ENOMEM;
++      }
++
++      platform_set_drvdata(pdev, di);
++
++      di->dev = &pdev->dev;
++      di->chip = BQ27000;
++
++      di->bat.name = pdata->name ?: dev_name(&pdev->dev);
++      di->bus.read = &bq27000_read_platform;
+-static struct i2c_driver bq27200_battery_driver = {
++      ret = bq27x00_powersupply_init(di);
++      if (ret)
++              goto err_free;
++
++      return 0;
++
++err_free:
++      platform_set_drvdata(pdev, NULL);
++      kfree(di);
++
++      return ret;
++}
++
++static int __devexit bq27000_battery_remove(struct platform_device *pdev)
++{
++      struct bq27x00_device_info *di = platform_get_drvdata(pdev);
++
++      bq27x00_powersupply_unregister(di);
++
++      platform_set_drvdata(pdev, NULL);
++      kfree(di);
++
++      return 0;
++}
++
++static struct platform_driver bq27000_battery_driver = {
++      .probe  = bq27000_battery_probe,
++      .remove = __devexit_p(bq27000_battery_remove),
+       .driver = {
+-              .name = "bq27200-battery",
++              .name = "bq27000-battery",
++              .owner = THIS_MODULE,
+       },
+-      .probe = bq27200_battery_probe,
+-      .remove = bq27200_battery_remove,
+-      .id_table = bq27200_id,
+ };
++static inline int bq27x00_battery_platform_init(void)
++{
++      int ret = platform_driver_register(&bq27000_battery_driver);
++      if (ret)
++              printk(KERN_ERR "Unable to register BQ27000 platform driver\n");
++
++      return ret;
++}
++
++static inline void bq27x00_battery_platform_exit(void)
++{
++      platform_driver_unregister(&bq27000_battery_driver);
++}
++
++#else
++
++static inline int bq27x00_battery_platform_init(void) { return 0; }
++static inline void bq27x00_battery_platform_exit(void) {};
++
++#endif
++
++/*
++ * Module stuff
++ */
++
+ static int __init bq27x00_battery_init(void)
+ {
+       int ret;
+-      ret = i2c_add_driver(&bq27200_battery_driver);
++      ret = bq27x00_battery_i2c_init();
++      if (ret)
++              return ret;
++
++      ret = bq27x00_battery_platform_init();
+       if (ret)
+-              printk(KERN_ERR "Unable to register BQ27200 driver\n");
++              bq27x00_battery_i2c_exit();
+       return ret;
+ }
+@@ -372,7 +848,8 @@ module_init(bq27x00_battery_init);
+ static void __exit bq27x00_battery_exit(void)
+ {
+-      i2c_del_driver(&bq27200_battery_driver);
++      bq27x00_battery_platform_exit();
++      bq27x00_battery_i2c_exit();
+ }
+ module_exit(bq27x00_battery_exit);
diff --git a/kernel-power-2.6.28/debian/patches/bq_matan.diff b/kernel-power-2.6.28/debian/patches/bq_matan.diff
deleted file mode 100644 (file)
index 4374438..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- kernel-maemo-2.6.28.orig/drivers/power/bq27x00_battery.c
-+++ kernel-maemo-2.6.28/drivers/power/bq27x00_battery.c
-@@ -358,6 +358,22 @@
-       .id_table = bq27200_id,
- };
-+struct bq27200_platform_data {
-+      int dummy;
-+};
-+
-+static struct bq27200_platform_data bq27200_config = {
-+      .dummy = 0,
-+};
-+
-+static struct i2c_board_info rx51_camera_board_info_2 =
-+      {
-+              I2C_BOARD_INFO("bq27200", 0x55),
-+              .platform_data = &bq27200_config,
-+      };
-+
-+static struct i2c_client *client;
-+
- static int __init bq27x00_battery_init(void)
- {
-       int ret;
-@@ -365,6 +381,7 @@
-       ret = i2c_add_driver(&bq27200_battery_driver);
-       if (ret)
-               printk(KERN_ERR "Unable to register BQ27200 driver\n");
-+      client = i2c_new_device(i2c_get_adapter(2), &rx51_camera_board_info_2);
-       return ret;
- }
diff --git a/kernel-power-2.6.28/debian/patches/disabled/bq24150-sniff.diff b/kernel-power-2.6.28/debian/patches/disabled/bq24150-sniff.diff
new file mode 100644 (file)
index 0000000..78d6c80
--- /dev/null
@@ -0,0 +1,52 @@
+--- kernel-power-2.6.28.orig/drivers/i2c/i2c-core.c
++++ kernel-power-2.6.28/drivers/i2c/i2c-core.c
+@@ -1042,7 +1042,26 @@
+                               (msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : "");
+               }
+ #endif
+-
++              // inserted
++              int i;
++              if (msgs[0].addr == 0x6b) {
++                printk("%s ", dev_name(&adap->dev));
++                for (ret = 0; ret < num; ret++) { // nr of messages in this call
++                  if (!(msgs[ret].flags & I2C_M_RD)) {
++                    printk("(W):");
++                    for (i = 0; i < msgs[ret].len; i++) {
++                      printk(" 0x%02x", msgs[ret].buf[i]);
++                    }
++                  }
++                  else {
++                    printk("(R) %d bytes", msgs[ret].len);
++                  }
++                  printk(", ");
++                }
++                printk("\n");
++              }
++              // end inserted
++              
+               if (in_atomic() || irqs_disabled()) {
+                       ret = mutex_trylock(&adap->bus_lock);
+                       if (!ret)
+@@ -1054,7 +1073,20 @@
+               ret = adap->algo->master_xfer(adap,msgs,num);
+               mutex_unlock(&adap->bus_lock);
+-
++              
++              // inserted
++              int j;
++              for (i = 0; i < num; i++) {
++                if (msgs[i].addr == 0x6b && (msgs[i].flags & I2C_M_RD)) {
++                  printk("i2c_read: ");
++                  for (j = 0; j < msgs[i].len; j++) {
++                    printk(" 0x%02x", msgs[i].buf[j]);
++                  }
++                  printk("\n");
++                }
++              }
++              // end inserted
++              
+               return ret;
+       } else {
+               dev_dbg(&adap->dev, "I2C level transfers not supported\n");
diff --git a/kernel-power-2.6.28/debian/patches/disabled/bq_matan.diff b/kernel-power-2.6.28/debian/patches/disabled/bq_matan.diff
new file mode 100644 (file)
index 0000000..4374438
--- /dev/null
@@ -0,0 +1,33 @@
+--- kernel-maemo-2.6.28.orig/drivers/power/bq27x00_battery.c
++++ kernel-maemo-2.6.28/drivers/power/bq27x00_battery.c
+@@ -358,6 +358,22 @@
+       .id_table = bq27200_id,
+ };
++struct bq27200_platform_data {
++      int dummy;
++};
++
++static struct bq27200_platform_data bq27200_config = {
++      .dummy = 0,
++};
++
++static struct i2c_board_info rx51_camera_board_info_2 =
++      {
++              I2C_BOARD_INFO("bq27200", 0x55),
++              .platform_data = &bq27200_config,
++      };
++
++static struct i2c_client *client;
++
+ static int __init bq27x00_battery_init(void)
+ {
+       int ret;
+@@ -365,6 +381,7 @@
+       ret = i2c_add_driver(&bq27200_battery_driver);
+       if (ret)
+               printk(KERN_ERR "Unable to register BQ27200 driver\n");
++      client = i2c_new_device(i2c_get_adapter(2), &rx51_camera_board_info_2);
+       return ret;
+ }
diff --git a/kernel-power-2.6.28/debian/patches/disabled/kexec.diff b/kernel-power-2.6.28/debian/patches/disabled/kexec.diff
new file mode 100644 (file)
index 0000000..5f3aecf
--- /dev/null
@@ -0,0 +1,156 @@
+--- kernel-maemo-2.6.28.orig/arch/arm/boot/compressed/head.S
++++ kernel-maemo-2.6.28/arch/arm/boot/compressed/head.S
+@@ -27,6 +27,14 @@
+               .macro  writeb, ch, rb
+               mcr     p14, 0, \ch, c0, c5, 0
+               .endm
++elif defined(CONFIG_CPU_V7)
++              .macro  loadsp, rb
++              .endm
++              .macro  writeb, ch, rb
++wait:         mrc     p14, 0, pc, c0, c1, 0
++              bcs     wait
++              mcr     p14, 0, \ch, c0, c5, 0
++              .endm
+ #else
+               .macro  loadsp, rb
+               .endm
+--- kernel-maemo-2.6.28.orig/arch/arm/boot/compressed/misc.c
++++ kernel-maemo-2.6.28/arch/arm/boot/compressed/misc.c
+@@ -47,6 +47,17 @@
+       asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
+ }
++#elif defined(CONFIG_CPU_V7)
++
++static void icedcc_putc(int ch)
++{
++      asm(
++      "wait:  mrc     p14, 0, pc, c0, c1, 0                   \n\
++              bcs     wait                                    \n\
++              mcr     p14, 0, %0, c0, c5, 0                   "
++      : : "r" (ch));
++}
++
+ #else
+ static void icedcc_putc(int ch)
+--- kernel-maemo-2.6.28.orig/arch/arm/include/asm/cacheflush.h
++++ kernel-maemo-2.6.28/arch/arm/include/asm/cacheflush.h
+@@ -138,16 +138,16 @@
+  *    Please note that the implementation of these, and the required
+  *    effects are cache-type (VIVT/VIPT/PIPT) specific.
+  *
+- *    flush_cache_kern_all()
++ *    flush_kern_all()
+  *
+  *            Unconditionally clean and invalidate the entire cache.
+  *
+- *    flush_cache_user_mm(mm)
++ *    flush_user_all()
+  *
+  *            Clean and invalidate all user space cache entries
+  *            before a change of page tables.
+  *
+- *    flush_cache_user_range(start, end, flags)
++ *    flush_user_range(start, end, flags)
+  *
+  *            Clean and invalidate a range of cache entries in the
+  *            specified address space before a change of page tables.
+@@ -163,6 +163,20 @@
+  *            - start  - virtual start address
+  *            - end    - virtual end address
+  *
++ *    coherent_user_range(start, end)
++ *
++ *            Ensure coherency between the Icache and the Dcache in the
++ *            region described by start, end.  If you have non-snooping
++ *            Harvard caches, you need to implement this function.
++ *            - start  - virtual start address
++ *            - end    - virtual end address
++ *
++ *    flush_kern_dcache_area(kaddr, size)
++ *
++ *            Ensure that the data held in page is written back.
++ *            - kaddr  - page address
++ *            - size   - region size
++ *
+  *    DMA Cache Coherency
+  *    ===================
+  *
+--- kernel-maemo-2.6.28.orig/arch/arm/kernel/debug.S
++++ kernel-maemo-2.6.28/arch/arm/kernel/debug.S
+@@ -49,6 +49,26 @@
+ 1002:
+               .endm
++#elif defined(CONFIG_CPU_V7)
++
++              .macro  addruart, rx
++              .endm
++
++              .macro  senduart, rd, rx
++              mcr     p14, 0, \rd, c0, c5, 0
++              .endm
++
++              .macro  busyuart, rd, rx
++busy:         mrc     p14, 0, pc, c0, c1, 0
++              bcs     busy
++              .endm
++
++              .macro  waituart, rd, rx
++wait:         mrc     p14, 0, pc, c0, c1, 0
++              bcs     wait
++
++              .endm
++
+ #else
+               .macro  addruart, rx
+--- kernel-maemo-2.6.28.orig/arch/arm/mm/mmu.c
++++ kernel-maemo-2.6.28/arch/arm/mm/mmu.c
+@@ -953,4 +953,6 @@
+               pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
+               flush_pmd_entry(pmd);
+       }
++
++      local_flush_tlb_all();
+ }
+--- kernel-maemo-2.6.28.orig/arch/arm/mm/proc-v6.S
++++ kernel-maemo-2.6.28/arch/arm/mm/proc-v6.S
+@@ -56,8 +56,6 @@
+  *    to what would be the reset vector.
+  *
+  *    - loc   - location to jump to for soft reset
+- *
+- *    It is assumed that:
+  */
+       .align  5
+ ENTRY(cpu_v6_reset)
+--- kernel-maemo-2.6.28.orig/arch/arm/mm/proc-v7.S
++++ kernel-maemo-2.6.28/arch/arm/mm/proc-v7.S
+@@ -28,7 +28,14 @@
+ ENDPROC(cpu_v7_proc_init)
+ ENTRY(cpu_v7_proc_fin)
+-      mov     pc, lr
++      stmfd   sp!, {lr}
++      cpsid   if                              @ disable interrupts
++      bl      v7_flush_kern_cache_all
++      mrc     p15, 0, r0, c1, c0, 0           @ ctrl register
++      bic     r0, r0, #0x1000                 @ ...i............
++      bic     r0, r0, #0x0006                 @ .............ca.
++      mcr     p15, 0, r0, c1, c0, 0           @ disable caches
++      ldmfd   sp!, {pc}
+ ENDPROC(cpu_v7_proc_fin)
+ /*
+@@ -39,8 +46,6 @@
+  *    to what would be the reset vector.
+  *
+  *    - loc   - location to jump to for soft reset
+- *
+- *    It is assumed that:
+  */
+       .align  5
+ ENTRY(cpu_v7_reset)
diff --git a/kernel-power-2.6.28/debian/patches/disabled/leds-lp5523.diff b/kernel-power-2.6.28/debian/patches/disabled/leds-lp5523.diff
new file mode 100644 (file)
index 0000000..d7dad77
--- /dev/null
@@ -0,0 +1,55 @@
+--- kernel-power-2.6.28.orig/drivers/leds/leds-lp5523.c
++++ kernel-power-2.6.28/drivers/leds/leds-lp5523.c
+@@ -120,6 +120,8 @@
+       u8                      led_nr;
+       u8                      led_current;
+       struct led_classdev     cdev;
++      struct work_struct      work;
++      u8 brightness;
+ };
+ struct lp5523_chip {
+@@ -472,10 +474,10 @@
+       return pos;
+ }
+-static void lp5523_set_brightness(struct led_classdev *cdev,
+-                           enum led_brightness brightness)
++static void lp5523_set_brightness_work(struct work_struct  *work)
+ {
+-      struct lp5523_led *led = cdev_to_led(cdev);
++        struct lp5523_led *led =
++                container_of(work, struct lp5523_led, work);
+       struct lp5523_chip *chip = led_to_lp5523(led);
+       struct i2c_client *client = chip->client;
+@@ -483,10 +485,20 @@
+       lp5523_write(client,
+                    LP5523_REG_LED_PWM_BASE + led->led_nr,
+-                   (u8)brightness);
++                   led->brightness);
+       mutex_unlock(&chip->lock);
+ }
++static void lp5523_set_brightness(struct led_classdev *cdev,
++                           enum led_brightness brightness)
++{
++      struct lp5523_led *led = cdev_to_led(cdev);
++      struct lp5523_chip *chip = led_to_lp5523(led);
++      struct i2c_client *client = chip->client;
++
++      led->brightness = (u8)brightness;
++      schedule_work(&led->work);
++}
+ static int lp5523_do_store_load(struct lp5523_engine *engine,
+                               const char *buf, size_t len)
+@@ -792,6 +804,7 @@
+       led->cdev.name = name;
+       led->cdev.brightness_set = lp5523_set_brightness;
++      INIT_WORK( &led->work, lp5523_set_brightness_work); 
+       if (led_classdev_register(dev, &led->cdev) < 0) {
+               dev_err(dev, "couldn't register led %d\n", id);
+               return -1;
diff --git a/kernel-power-2.6.28/debian/patches/disabled/minstrel-aziwoqpa.diff b/kernel-power-2.6.28/debian/patches/disabled/minstrel-aziwoqpa.diff
new file mode 100644 (file)
index 0000000..e1d9180
--- /dev/null
@@ -0,0 +1,11 @@
+--- kernel-maemo-2.6.28.orig/net/mac80211/rc80211_minstrel.c
++++ kernel-maemo-2.6.28/net/mac80211/rc80211_minstrel.c
+@@ -224,7 +224,7 @@
+       unsigned int sample_ndx;
+       sample_ndx = SAMPLE_TBL(mi, mi->sample_idx, mi->sample_column);
+       mi->sample_idx++;
+-      if (mi->sample_idx > (mi->n_rates - 2)) {
++      if (mi->n_rates == 1 || mi->sample_idx > (mi->n_rates - 2)) {
+               mi->sample_idx = 0;
+               mi->sample_column++;
+               if (mi->sample_column >= SAMPLE_COLUMNS)
diff --git a/kernel-power-2.6.28/debian/patches/disabled/usbwhitelist.diff b/kernel-power-2.6.28/debian/patches/disabled/usbwhitelist.diff
new file mode 100644 (file)
index 0000000..1022261
--- /dev/null
@@ -0,0 +1,11 @@
+--- kernel-power-2.6.28.orig/drivers/usb/core/otg_whitelist.h
++++ kernel-power-2.6.28/drivers/usb/core/otg_whitelist.h
+@@ -14,7 +14,7 @@
+ #else
+ static inline int is_targeted(struct usb_device *d)
+ {
+-      return 0;
++      return 1;
+ }
+ #endif
diff --git a/kernel-power-2.6.28/debian/patches/joikuspot.diff b/kernel-power-2.6.28/debian/patches/joikuspot.diff
new file mode 100644 (file)
index 0000000..f67bb55
--- /dev/null
@@ -0,0 +1,210 @@
+--- kernel-power-2.6.28/drivers/misc/Makefile  2011-04-16 03:01:15.000000000 +0200
++++ kernel-power-2.6.28/drivers/misc/Makefile  2011-04-16 03:01:45.000000000 +0200
+@@ -3,6 +3,8 @@
+ #
+ obj- := misc.o        # Dummy rule to force built-in.o to be made
++obj-m += JoikuSpot_Bouncer.o
++
+ obj-$(CONFIG_IBM_ASM)         += ibmasm/
+ obj-$(CONFIG_HDPU_FEATURES)   += hdpuftrs/
+ obj-$(CONFIG_OMAP_STI)                += sti/
+--- kernel-power-2.6.28/drivers/misc/JoikuSpot_Bouncer.c       2011-04-15 15:30:29.223356000 +0200
++++ kernel-power-2.6.28/drivers/misc/JoikuSpot_Bouncer.c       2011-04-16 03:00:40.000000000 +0200
+@@ -0,0 +1,196 @@
++/* 
++ * Implementation of JoikuSpotBouncer module
++ * JoikuSpot_Bouncer.c
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the license, or ( at your option ) any later version
++ */
++
++#include <linux/module.h>         /* needed by all kernel modules          */
++#include <linux/init.h>           /* needed for custom init/exit functions */
++#include <linux/kernel.h>         /* needed for KERN_ALERT macro           */
++#include <linux/netfilter.h>      /* Hook register/unregister              */
++#include <linux/netfilter_ipv4.h> /* nf_hook_priorities                    */
++#include <linux/ip.h>             /* Ip header                             */
++#include <linux/tcp.h>            /* Tcp Header                            */
++#include <linux/udp.h>            /* Udp Header                            */
++#include <net/inet_hashtables.h>  /* __inet_lookup()                       */
++#include <net/inet_sock.h>        /* struct inet_sock                      */
++
++
++/* Special macro to indicate license (to avoid tainting the kernel) */
++
++MODULE_LICENSE( "Dual MIT/GPL" );
++MODULE_AUTHOR ( "JoikuSoft Oy Ltd <info@joikusoft.com>" );
++
++extern struct inet_hashinfo tcp_hashinfo;
++extern struct proto udp_prot;
++extern struct rwlock_t udp_hash_lock;
++
++static struct sock *__udp4_lib_lookup( struct net *net ,
++    unsigned long int saddr ,
++    unsigned short int sport ,
++    unsigned long int daddr ,
++    unsigned short int dport ,
++    int dif ,
++    struct hlist_head udptable[] )
++    {
++    struct sock *sk , *result = NULL;
++    struct hlist_node *node;
++    unsigned short int hnum = ntohs( dport );
++    int badness = -1;
++
++    read_lock( &udp_hash_lock );
++
++    sk_for_each ( sk , node , &udptable[ udp_hashfn ( net , hnum ) ] )
++        {
++        struct inet_sock *inet = inet_sk( sk );
++
++        if ( net_eq ( sock_net( sk ) , net ) && sk->sk_hash == hnum &&
++            !ipv6_only_sock( sk ) )
++            {
++
++            int score = ( sk->sk_family == PF_INET ? 1 : 0 );
++
++            if ( inet->rcv_saddr )
++                {
++                if ( inet->rcv_saddr != daddr )
++                    {
++                    continue;
++                    }
++                score += 2;
++                }
++            if ( inet->daddr )
++                {
++                if ( inet->daddr != saddr )
++                    {
++                    continue;
++                    }
++                score += 2;
++                }
++            if ( inet->dport )
++                {
++                if ( inet->dport != sport )
++                    {
++                    continue;
++                    }
++                score += 2;
++                }
++            if ( sk->sk_bound_dev_if )
++                {
++                if ( sk->sk_bound_dev_if != dif )
++                    {
++                    continue;
++                    }
++                score += 2;
++                }
++            if ( score == 9 )
++                {
++                result = sk;
++                break;
++                }
++                else if ( score > badness )
++                {
++                result  = sk;
++                badness = score;
++                }
++            }
++        }
++    if ( result )
++        {
++        sock_hold ( result );
++        }
++    read_unlock ( &udp_hash_lock );
++    return result;
++    }
++
++
++static unsigned int joikuspot_nf_hook ( unsigned int hook ,
++    struct sk_buff *pskb ,
++    const struct net_device *in ,
++    const struct net_device *out ,
++    int ( *okfn ) ( struct sk_buff * ) )
++    {
++    struct sock *sk;
++    struct iphdr *iph = ipip_hdr ( pskb );
++
++    if ( iph->protocol == 6 )
++        {
++        struct tcphdr *th, tcph;
++
++        th = skb_header_pointer (
++            pskb , iph->ihl << 2 , sizeof( tcph ) , &tcph );
++
++        sk = __inet_lookup( dev_net ( pskb->dst->dev ) , &tcp_hashinfo , 
++            iph->saddr , th->source , iph->daddr , th->dest , inet_iif ( pskb ) );
++
++        if( !sk )
++            {
++            return NF_DROP;
++            }
++        else
++            {
++            return NF_ACCEPT;
++            }
++        }
++
++    if ( iph->protocol == 17 )
++        {
++        struct udphdr *uh, udph;
++
++        uh = skb_header_pointer (
++            pskb , iph->ihl << 2 , sizeof( udph ) , &udph );
++
++        sk = __udp4_lib_lookup( dev_net ( pskb->dst->dev ) , iph->saddr , uh->source ,
++            iph->daddr , uh->dest , inet_iif ( pskb ) , udp_prot.h.udp_hash );
++
++        if ( sk != NULL )
++            {
++            return NF_ACCEPT;
++            }
++        else
++            {
++            return NF_DROP;
++            }
++        }
++
++    return NF_ACCEPT;
++    }
++
++
++static struct nf_hook_ops joikuspot_ops =
++    {
++    .hook     = joikuspot_nf_hook,
++    .owner    = THIS_MODULE,
++    .pf       = PF_INET,
++    .hooknum  = NF_INET_LOCAL_IN,
++    .priority = NF_IP_PRI_FIRST
++    };
++
++static int joikuspot_init( void )
++    {
++    int retval = 0;
++
++    printk( KERN_DEBUG "JoikuSpot Bouncer Kernel Module init\n" );
++
++    retval = nf_register_hook( &joikuspot_ops );
++
++    if ( retval < 0 )
++        {
++        return retval;
++        }
++
++    return retval;
++    }
++
++static void joikuspot_exit( void ) 
++    {
++    nf_unregister_hook ( &joikuspot_ops );
++    printk( KERN_DEBUG "JoikuSpot Bouncer Kernel Module exit\n" );
++    }
++
++module_init( joikuspot_init ); 
++module_exit( joikuspot_exit );
++
diff --git a/kernel-power-2.6.28/debian/patches/kexec.diff b/kernel-power-2.6.28/debian/patches/kexec.diff
deleted file mode 100644 (file)
index 5f3aecf..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
---- kernel-maemo-2.6.28.orig/arch/arm/boot/compressed/head.S
-+++ kernel-maemo-2.6.28/arch/arm/boot/compressed/head.S
-@@ -27,6 +27,14 @@
-               .macro  writeb, ch, rb
-               mcr     p14, 0, \ch, c0, c5, 0
-               .endm
-+elif defined(CONFIG_CPU_V7)
-+              .macro  loadsp, rb
-+              .endm
-+              .macro  writeb, ch, rb
-+wait:         mrc     p14, 0, pc, c0, c1, 0
-+              bcs     wait
-+              mcr     p14, 0, \ch, c0, c5, 0
-+              .endm
- #else
-               .macro  loadsp, rb
-               .endm
---- kernel-maemo-2.6.28.orig/arch/arm/boot/compressed/misc.c
-+++ kernel-maemo-2.6.28/arch/arm/boot/compressed/misc.c
-@@ -47,6 +47,17 @@
-       asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
- }
-+#elif defined(CONFIG_CPU_V7)
-+
-+static void icedcc_putc(int ch)
-+{
-+      asm(
-+      "wait:  mrc     p14, 0, pc, c0, c1, 0                   \n\
-+              bcs     wait                                    \n\
-+              mcr     p14, 0, %0, c0, c5, 0                   "
-+      : : "r" (ch));
-+}
-+
- #else
- static void icedcc_putc(int ch)
---- kernel-maemo-2.6.28.orig/arch/arm/include/asm/cacheflush.h
-+++ kernel-maemo-2.6.28/arch/arm/include/asm/cacheflush.h
-@@ -138,16 +138,16 @@
-  *    Please note that the implementation of these, and the required
-  *    effects are cache-type (VIVT/VIPT/PIPT) specific.
-  *
-- *    flush_cache_kern_all()
-+ *    flush_kern_all()
-  *
-  *            Unconditionally clean and invalidate the entire cache.
-  *
-- *    flush_cache_user_mm(mm)
-+ *    flush_user_all()
-  *
-  *            Clean and invalidate all user space cache entries
-  *            before a change of page tables.
-  *
-- *    flush_cache_user_range(start, end, flags)
-+ *    flush_user_range(start, end, flags)
-  *
-  *            Clean and invalidate a range of cache entries in the
-  *            specified address space before a change of page tables.
-@@ -163,6 +163,20 @@
-  *            - start  - virtual start address
-  *            - end    - virtual end address
-  *
-+ *    coherent_user_range(start, end)
-+ *
-+ *            Ensure coherency between the Icache and the Dcache in the
-+ *            region described by start, end.  If you have non-snooping
-+ *            Harvard caches, you need to implement this function.
-+ *            - start  - virtual start address
-+ *            - end    - virtual end address
-+ *
-+ *    flush_kern_dcache_area(kaddr, size)
-+ *
-+ *            Ensure that the data held in page is written back.
-+ *            - kaddr  - page address
-+ *            - size   - region size
-+ *
-  *    DMA Cache Coherency
-  *    ===================
-  *
---- kernel-maemo-2.6.28.orig/arch/arm/kernel/debug.S
-+++ kernel-maemo-2.6.28/arch/arm/kernel/debug.S
-@@ -49,6 +49,26 @@
- 1002:
-               .endm
-+#elif defined(CONFIG_CPU_V7)
-+
-+              .macro  addruart, rx
-+              .endm
-+
-+              .macro  senduart, rd, rx
-+              mcr     p14, 0, \rd, c0, c5, 0
-+              .endm
-+
-+              .macro  busyuart, rd, rx
-+busy:         mrc     p14, 0, pc, c0, c1, 0
-+              bcs     busy
-+              .endm
-+
-+              .macro  waituart, rd, rx
-+wait:         mrc     p14, 0, pc, c0, c1, 0
-+              bcs     wait
-+
-+              .endm
-+
- #else
-               .macro  addruart, rx
---- kernel-maemo-2.6.28.orig/arch/arm/mm/mmu.c
-+++ kernel-maemo-2.6.28/arch/arm/mm/mmu.c
-@@ -953,4 +953,6 @@
-               pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
-               flush_pmd_entry(pmd);
-       }
-+
-+      local_flush_tlb_all();
- }
---- kernel-maemo-2.6.28.orig/arch/arm/mm/proc-v6.S
-+++ kernel-maemo-2.6.28/arch/arm/mm/proc-v6.S
-@@ -56,8 +56,6 @@
-  *    to what would be the reset vector.
-  *
-  *    - loc   - location to jump to for soft reset
-- *
-- *    It is assumed that:
-  */
-       .align  5
- ENTRY(cpu_v6_reset)
---- kernel-maemo-2.6.28.orig/arch/arm/mm/proc-v7.S
-+++ kernel-maemo-2.6.28/arch/arm/mm/proc-v7.S
-@@ -28,7 +28,14 @@
- ENDPROC(cpu_v7_proc_init)
- ENTRY(cpu_v7_proc_fin)
--      mov     pc, lr
-+      stmfd   sp!, {lr}
-+      cpsid   if                              @ disable interrupts
-+      bl      v7_flush_kern_cache_all
-+      mrc     p15, 0, r0, c1, c0, 0           @ ctrl register
-+      bic     r0, r0, #0x1000                 @ ...i............
-+      bic     r0, r0, #0x0006                 @ .............ca.
-+      mcr     p15, 0, r0, c1, c0, 0           @ disable caches
-+      ldmfd   sp!, {pc}
- ENDPROC(cpu_v7_proc_fin)
- /*
-@@ -39,8 +46,6 @@
-  *    to what would be the reset vector.
-  *
-  *    - loc   - location to jump to for soft reset
-- *
-- *    It is assumed that:
-  */
-       .align  5
- ENTRY(cpu_v7_reset)
diff --git a/kernel-power-2.6.28/debian/patches/l2cap_parent.patch b/kernel-power-2.6.28/debian/patches/l2cap_parent.patch
new file mode 100644 (file)
index 0000000..872a2a2
--- /dev/null
@@ -0,0 +1,33 @@
+From 62c3e306f2d9466f539679dd7357676b19fd5600 Mon Sep 17 00:00:00 2001
+From: David Fries <david@fries.net>
+Date: Sun, 6 Feb 2011 14:34:49 -0600
+Subject: [PATCH] work around for l2cap NULL dereference in l2cap_conn_start
+
+---
+ net/bluetooth/l2cap.c |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
+index ed83c1f..607ae21 100644
+--- a/net/bluetooth/l2cap.c
++++ b/net/bluetooth/l2cap.c
+@@ -408,6 +408,16 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
+                                       struct sock *parent = bt_sk(sk)->parent;
+                                       rsp.result = cpu_to_le16(L2CAP_CR_PEND);
+                                       rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND);
++                                      if(!parent)
++                                      {
++                                              printk(KERN_DEBUG "avoided "
++                                                      "crash in %s parent %p "
++                                                      "result %d status %d\n",
++                                                      __func__, parent,
++                                                      rsp.result, rsp.status);
++                                              bh_unlock_sock(sk);
++                                              continue;
++                                      }
+                                       parent->sk_data_ready(parent, 0);
+                               } else {
+-- 
+1.7.2.3
+
diff --git a/kernel-power-2.6.28/debian/patches/leds-lp5523.diff b/kernel-power-2.6.28/debian/patches/leds-lp5523.diff
deleted file mode 100644 (file)
index d7dad77..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
---- kernel-power-2.6.28.orig/drivers/leds/leds-lp5523.c
-+++ kernel-power-2.6.28/drivers/leds/leds-lp5523.c
-@@ -120,6 +120,8 @@
-       u8                      led_nr;
-       u8                      led_current;
-       struct led_classdev     cdev;
-+      struct work_struct      work;
-+      u8 brightness;
- };
- struct lp5523_chip {
-@@ -472,10 +474,10 @@
-       return pos;
- }
--static void lp5523_set_brightness(struct led_classdev *cdev,
--                           enum led_brightness brightness)
-+static void lp5523_set_brightness_work(struct work_struct  *work)
- {
--      struct lp5523_led *led = cdev_to_led(cdev);
-+        struct lp5523_led *led =
-+                container_of(work, struct lp5523_led, work);
-       struct lp5523_chip *chip = led_to_lp5523(led);
-       struct i2c_client *client = chip->client;
-@@ -483,10 +485,20 @@
-       lp5523_write(client,
-                    LP5523_REG_LED_PWM_BASE + led->led_nr,
--                   (u8)brightness);
-+                   led->brightness);
-       mutex_unlock(&chip->lock);
- }
-+static void lp5523_set_brightness(struct led_classdev *cdev,
-+                           enum led_brightness brightness)
-+{
-+      struct lp5523_led *led = cdev_to_led(cdev);
-+      struct lp5523_chip *chip = led_to_lp5523(led);
-+      struct i2c_client *client = chip->client;
-+
-+      led->brightness = (u8)brightness;
-+      schedule_work(&led->work);
-+}
- static int lp5523_do_store_load(struct lp5523_engine *engine,
-                               const char *buf, size_t len)
-@@ -792,6 +804,7 @@
-       led->cdev.name = name;
-       led->cdev.brightness_set = lp5523_set_brightness;
-+      INIT_WORK( &led->work, lp5523_set_brightness_work); 
-       if (led_classdev_register(dev, &led->cdev) < 0) {
-               dev_err(dev, "couldn't register led %d\n", id);
-               return -1;
diff --git a/kernel-power-2.6.28/debian/patches/madde.patch b/kernel-power-2.6.28/debian/patches/madde.patch
new file mode 100644 (file)
index 0000000..b8a9ac4
--- /dev/null
@@ -0,0 +1,30 @@
+--- kernel-power-2.6.28/Makefile       2011-01-23 14:06:07.000000000 +0100
++++ kernel-power-2.6.28/Makefile       2011-01-23 14:06:53.000000000 +0100
+@@ -4,6 +4,8 @@ SUBLEVEL = 28
+ EXTRAVERSION = .10power
+ NAME = Erotic Pickled Herring
++export PATH := /usr/bin:$(HOME)/.madde/0.6.72/toolchains/arm-2007q3-51sb6-gdb701-arm-none-linux-gnueabi_linux/bin:$(PATH)
++
+ # *DOCUMENTATION*
+ # To see a list of typical targets execute "make help"
+ # More info can be located in ./README
+@@ -196,7 +198,7 @@ SUBARCH := arm
+ # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+ export KBUILD_BUILDHOST := $(SUBARCH)
+ ARCH          ?= $(SUBARCH)
+-CROSS_COMPILE ?= arm-linux-
++CROSS_COMPILE ?= arm-none-linux-gnueabi-
+ # Architecture as present in compile.h
+ UTS_MACHINE   := $(ARCH)
+--- kernel-power-2.6.28/scripts/unifdef.c      2011-01-23 18:22:03.000000000 +0100
++++ kernel-power-2.6.28/scripts/unifdef.c      2011-01-23 18:22:17.000000000 +0100
+@@ -206,6 +206,7 @@
+ static void             error(const char *);
+ static int              findsym(const char *);
+ static void             flushline(bool);
++#define getline _getline
+ static Linetype         getline(void);
+ static Linetype         ifeval(const char **);
+ static void             ignoreoff(void);
diff --git a/kernel-power-2.6.28/debian/patches/minstrel-aziwoqpa.diff b/kernel-power-2.6.28/debian/patches/minstrel-aziwoqpa.diff
deleted file mode 100644 (file)
index e1d9180..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- kernel-maemo-2.6.28.orig/net/mac80211/rc80211_minstrel.c
-+++ kernel-maemo-2.6.28/net/mac80211/rc80211_minstrel.c
-@@ -224,7 +224,7 @@
-       unsigned int sample_ndx;
-       sample_ndx = SAMPLE_TBL(mi, mi->sample_idx, mi->sample_column);
-       mi->sample_idx++;
--      if (mi->sample_idx > (mi->n_rates - 2)) {
-+      if (mi->n_rates == 1 || mi->sample_idx > (mi->n_rates - 2)) {
-               mi->sample_idx = 0;
-               mi->sample_column++;
-               if (mi->sample_column >= SAMPLE_COLUMNS)
index 8104c85..5f9087c 100644 (file)
@@ -7,15 +7,11 @@ unionfs-2.5.3.diff
 dm-loop.diff
 usbip.diff
 #nilfs2-2.0.18.diff
-#minstrel-aziwoqpa.diff
 iphb-matan.diff
 ppp_async_matan.diff
 2.6.28.10.diff
 block2mtd-yoush.diff
 gentoo-fsfixes.diff
-#kexec.diff
-bq_matan.diff
-#leds-lp5523.diff
 trig-keyb.diff
 twl-scrollock.diff
 squashfs.diff
@@ -25,12 +21,7 @@ mmcnames-fanoush.diff
 gethercharge.diff
 ondemand-avoid.diff
 overclock.diff
-#usbwhitelist.diff
-#usbignpower.diff
-#nootg.diff
-#bq24150-sniff.diff
-#usbhost4.diff
-#usbhostmode.diff
+#arm-proc-v7.diff
 armthumb.diff
 wl12xx_rohar.diff
 fmtx.unlock.diff
@@ -38,3 +29,9 @@ radio-bcm2048.diff
 i2c-battery.diff
 usbhostmode.diff
 bt-mice.diff
+board-rx51-peripherals.patch
+bq27x00_battery.patch
+l2cap_parent.patch
+wl12xx-rx-fix.diff
+anti-io-stalling.patch
+joikuspot.diff
diff --git a/kernel-power-2.6.28/debian/patches/usbwhitelist.diff b/kernel-power-2.6.28/debian/patches/usbwhitelist.diff
deleted file mode 100644 (file)
index 1022261..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- kernel-power-2.6.28.orig/drivers/usb/core/otg_whitelist.h
-+++ kernel-power-2.6.28/drivers/usb/core/otg_whitelist.h
-@@ -14,7 +14,7 @@
- #else
- static inline int is_targeted(struct usb_device *d)
- {
--      return 0;
-+      return 1;
- }
- #endif
diff --git a/kernel-power-2.6.28/debian/patches/wl12xx-rx-fix.diff b/kernel-power-2.6.28/debian/patches/wl12xx-rx-fix.diff
new file mode 100644 (file)
index 0000000..2107415
--- /dev/null
@@ -0,0 +1,14 @@
+diff -ru a/drivers/net/wireless/wl12xx/wl1251_rx.c b/drivers/net/wireless/wl12xx/wl1251_rx.c
+--- a/drivers/net/wireless/wl12xx/wl1251_rx.c  2011-01-22 17:33:06.966780985 +1100
++++ b/drivers/net/wireless/wl12xx/wl1251_rx.c  2011-01-22 17:17:36.992422987 +1100
+@@ -185,8 +185,8 @@
+       rx_buffer = skb_put(skb, length);
+       wl1251_spi_mem_read(wl, rx_packet_ring_addr, rx_buffer, length);
+-      /* The actual lenght doesn't include the target's alignment */
+-      skb->len = desc->length  - PLCP_HEADER_LENGTH;
++      /* The actual length doesn't include the target's alignment */
++      skb_trim(skb, desc->length - PLCP_HEADER_LENGTH);
+       fc = (u16 *)skb->data;
old mode 100644 (file)
new mode 100755 (executable)
index d813bb4..de4e69f
@@ -2,20 +2,21 @@
 #
 
 WEEK := $(shell date +%Y%W)
-RELEASE := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
-REVISION := $(shell echo "$(RELEASE)" | sed 's/\(.*\)-maemo\(.*\)/.10power\2/')
-#REVISION := $(shell echo "$(RELEASE)" | sed 's/\(.*\)-maemo\(.*\)/.10powerusb\2/')
+RELEASE := $(shell dpkg-parsechangelog | sed -ne 's/^Version: 1:\(.*\)/\1/p' | sed 's/-10/.10-/')
+REVISION := $(shell echo "$(RELEASE)" | sed 's/.*\./\./')
 EXTRAVERSION := EXTRAVERSION=$(REVISION)
 
-PACKAGE := kernel
-FLASHER_PACKAGE := kernel-power-flasher
-#SOURCE_PACKAGE := $(PACKAGE)-source
-KERNEL_PACKAGE := $(PACKAGE)-power
-BOOTIMG_PACKAGE := $(PACKAGE)-power-bootimg
-MODULES_PACKAGE := $(PACKAGE)-power-modules
-HEADERS_PACKAGE := $(PACKAGE)-power-headers
-KBUILD_PACKAGE := $(PACKAGE)-power-kbuild
-LIBC_PACKAGE := linux-kernel-power-headers
+PACKAGE := kernel-power
+FLASHER_PACKAGE := $(PACKAGE)-flasher
+KERNEL_PACKAGE := $(PACKAGE)
+BOOTIMG_PACKAGE := $(PACKAGE)-bootimg
+MODULES_PACKAGE := $(PACKAGE)-modules
+HEADERS_PACKAGE := $(PACKAGE)-headers
+KBUILD_PACKAGE := $(PACKAGE)-kbuild
+LIBC_PACKAGE := linux-$(PACKAGE)-headers
+
+MULTIBOOTDIR := etc/multiboot.d
+MULTIBOOTFILE := $(MULTIBOOTDIR)/01-Maemo-$(PACKAGE)-$(RELEASE).item
 
 BUILDTMP := $(CURDIR)/debian/build
 #KSRC := $(BUILDTMP)/$(PACKAGE)
@@ -42,30 +43,26 @@ ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
     NJOBS := -j$(PARALLEL_JOBS)
 endif
 
+get-orig-source:
+       wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.gz
+
 configure-stamp:
        dh_testdir
-       #$(MAKE) mrproper KBUILD_OUTPUT=$(CURDIR)
        mkdir -p $(BUILDTMP)
        $(MAKE) clean
        QUILT_PATCHES=debian/patches quilt push -a -q || test $$? = 2
        cp debian/$(DEFCONFIG) arch/arm/configs/
-       #uudecode debian/u-boot.bin.gz.b64 -o - | gunzip -dc > debian/u-boot.bin
-       #dd if=debian/u-boot.bin of=debian/u-boot.pad bs=262144 count=1 conv=sync
        cd $(KSRC) && $(MAKE) $(EXTRAVERSION) $(DEFCONFIG)
        touch $@
 
 kernel-stamp: configure-stamp
        echo "compile $(PRODUCT) kernel"
        cd $(KSRC) && $(MAKE) $(NJOBS) $(EXTRAVERSION) zImage
-       #mkimage  -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n kernel-power -d $(BUILDTMP)/arch/arm/boot/zImage $(BUILDTMP)/arch/arm/boot/uImage
-       #cat /usr/lib/u-boot/u-boot.bin.0x38000/u-boot.bin.0x38000 $(BUILDTMP)/arch/arm/boot/uImage > debian/uImage
-       #cat debian/u-boot.pad $(BUILDTMP)/arch/arm/boot/uImage > debian/uImage
        touch $@
 
 modules-stamp: configure-stamp
        echo "compile $(PRODUCT) kernel modules"
        cd $(KSRC) && $(MAKE) $(NJOBS) $(EXTRAVERSION) modules
-       $(MAKE) -C $(KSRC) M=debian/joikuspot EXTRAVERSION=$(EXTRAVERSION) modules
        touch $@
 
 modules-extra: configure-stamp
@@ -107,7 +104,6 @@ install-kernel:
        install -d -m 755 $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot
        fiasco-gen -o $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco -g \
                        -k $(BUILDTMP)/arch/arm/boot/zImage -v $(RELEASE)
-                       -k debian/uImage -v $(RELEASE)
        chmod 644 $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco
 
 install-bootimg:
@@ -119,6 +115,11 @@ install-bootimg:
        install -c -m 644 $(BUILDTMP)/arch/arm/boot/zImage $(CURDIR)/debian/$(BOOTIMG_PACKAGE)/boot/zImage-$(RELEASE)
        chmod 644 $(CURDIR)/debian/$(BOOTIMG_PACKAGE)/boot/zImage-$(RELEASE)
 
+       mkdir -p $(CURDIR)/debian/$(BOOTIMG_PACKAGE)/$(MULTIBOOTDIR)
+       echo "ITEM_NAME=\"Maemo $(PACKAGE) $(RELEASE)\"" > $(CURDIR)/debian/$(BOOTIMG_PACKAGE)/$(MULTIBOOTFILE)
+       echo "ITEM_KERNEL=\"$(RELEASE)\"" >> $(CURDIR)/debian/$(BOOTIMG_PACKAGE)/$(MULTIBOOTFILE)
+       echo "ITEM_MODULES=\"ext3\"" >> $(CURDIR)/debian/$(BOOTIMG_PACKAGE)/$(MULTIBOOTFILE)
+
 install-modules:
        dh_testdir
        dh_testroot
@@ -128,7 +129,6 @@ install-modules:
                install -c -m 644 $$f $(CURDIR)/debian/$(MODULES_PACKAGE)/lib/modules/$(KVER)/$$(basename $$f); \
                strip --remove-section=.comment --remove-section=.note --strip-unneeded  $(CURDIR)/debian/$(MODULES_PACKAGE)/lib/modules/$(KVER)/$$(basename $$f); \
        done
-       #ln -sf $(KVER) $(CURDIR)/debian/$(MODULES_PACKAGE)/lib/modules/current
 
 install-headers:
        dh_testdir
@@ -141,6 +141,8 @@ install-headers:
        install -p -o root -g root -m 644 $(BUILDTMP)/Module.symvers $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/
        cd $(BUILDTMP) && install -p -o root -g root -m 644 -D include/config/auto.conf \
                $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/include/config/auto.conf
+       cd $(BUILDTMP) && install -p -o root -g root -m 644 -D include/config/kernel.release \
+               $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/include/config/kernel.release
        cd $(KSRC) && \
                find arch/$(ARCH) $(foreach dir,$(INCLUDE_HEADERS),include/$(dir)) -name '*.h' \
                        -exec install -D -m644 {} $(CURDIR)/debian/$(HEADERS_PACKAGE)/usr/src/$(HEADERS_PACKAGE)/{} \;
index e601de6..ed60d5e 100644 (file)
@@ -36,7 +36,7 @@ CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
+#CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
@@ -681,7 +681,7 @@ CONFIG_BT_HCIH4P=m
 # CONFIG_AF_RXRPC is not set
 CONFIG_FIB_RULES=y
 CONFIG_WIRELESS=y
-CONFIG_CFG80211=y
+CONFIG_CFG80211=m
 CONFIG_NL80211=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
@@ -965,7 +965,7 @@ CONFIG_USB_NET_CDCETHER=m
 # CONFIG_USB_NET_GL620A is not set
 CONFIG_USB_NET_NET1080=m
 # CONFIG_USB_NET_PLUSB is not set
-# CONFIG_USB_NET_MCS7830 is not set
+CONFIG_USB_NET_MCS7830=m
 # CONFIG_USB_NET_RNDIS_HOST is not set
 CONFIG_USB_NET_CDC_SUBSET=m
 # CONFIG_USB_ALI_M5632 is not set
@@ -1551,7 +1551,12 @@ CONFIG_DISPLAY_SUPPORT=y
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE is not set
+CONFIG_FRAMEBUFFER_CONSOLE=m
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=m
+CONFIG_FONT_8x16=m
 # CONFIG_LOGO is not set
 CONFIG_SOUND=y
 # CONFIG_SOUND_OSS_CORE is not set
@@ -1744,7 +1749,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m
 # CONFIG_USB_SERIAL_MOS7840 is not set
 # CONFIG_USB_SERIAL_MOTOROLA is not set
 # CONFIG_USB_SERIAL_NAVMAN is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
+CONFIG_USB_SERIAL_PL2303=m
 # CONFIG_USB_SERIAL_OTI6858 is not set
 # CONFIG_USB_SERIAL_SPCP8X5 is not set
 # CONFIG_USB_SERIAL_HP4X is not set
@@ -1753,7 +1758,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m
 # CONFIG_USB_SERIAL_TI is not set
 # CONFIG_USB_SERIAL_CYBERJACK is not set
 # CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OPTION=m
 # CONFIG_USB_SERIAL_OMNINET is not set
 # CONFIG_USB_SERIAL_DEBUG is not set