Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: s0be/cm-kernel
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: android-msm-2.6.35-unified
Choose a base ref
...
head repository: riemervdzee/hero-kernel-2.6.35_OLD
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: android-msm-2.6.35-unified
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Jul 22, 2010

  1. Revert "Staging: android: delete android drivers"

    This reverts commit b0a0ccf.
    arve-android committed Jul 22, 2010
    Copy the full SHA
    3fcce2d View commit details
  2. staging/android: fix build issues

    Signed-off-by: Corentin Chary <corentincj@iksaif.net>
    iksaif authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    05edfb1 View commit details
  3. Revert "Staging: android: mark subsystem as broken"

    This reverts commit 2cdf99c.
    arve-android committed Jul 22, 2010
    Copy the full SHA
    4467715 View commit details
  4. ARM: Make low-level printk work

    Makes low-level printk work.
    
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    tmlind authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    537400c View commit details
  5. [ARM] Add code to prevent system calls from being restarted muliple t…

    …imes before returning from the kernel.
    
    Fixes crashes with thumb syscalls.
    arve-android committed Jul 22, 2010
    Copy the full SHA
    1bdf0e2 View commit details
  6. [ARM] armv6 dcc tty driver

    Signed-off-by: Brian Swetland <swetland@google.com>
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    173c502 View commit details
  7. [ARM] Allow ICEDCC to work with CPU_V7 as well as CPU_V6.

    The mechanism is the same -- just need to adjust some ifdefs.
    
    Signed-off-by: Brian Swetland <swetland@google.com>
    swetland authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    113fe88 View commit details
  8. [ARM] avoid mis-detecting some V7 cores in the decompressor

    This allows kernel decompress to happen nearly instantly instead
    of taking over 20 seconds.
    
    Signed-off-by: Brian Swetland <swetland@google.com>
    swetland authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    3aeb3da View commit details
  9. mm: Add min_free_order_shift tunable.

    By default the kernel tries to keep half as much memory free at each
    order as it does for one order below. This can be too agressive when
    running without swap.
    
    Change-Id: I5efc1a0b50f41ff3ac71e92d2efd175dedd54ead
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    5a56804 View commit details
  10. mm: Check if any page in a pageblock is reserved before marking it MI…

    …GRATE_RESERVE
    
    This fixes a problem where the first pageblock got marked MIGRATE_RESERVE even
    though it only had a few free pages. This in turn caused no contiguous memory
    to be reserved and frequent kswapd wakeups that emptied the caches to get more
    contiguous memory.
    arve-android committed Jul 22, 2010
    Copy the full SHA
    e1899e0 View commit details
  11. futex: Restore one of the fast paths eliminated by 38d47c1

    This improves futex performance until our user-space code is fixed to use
    FUTEX_PRIVATE_FLAG for non-shared futexes.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    14c462a View commit details
  12. [ARM] Optionally flush entire dcache from v6_dma_flush_range

    If CACHE_FLUSH_RANGE_LIMIT is defined, then the entire dcache will
    be flushed if the requested range is larger than this limit.
    
    Change-Id: I29277d645a9d6716b1952cf3b870c78496261dd0
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    9db0dad View commit details
  13. Copy the full SHA
    a07bddd View commit details
  14. sched: Enable might_sleep before initializing drivers.

    This allows detection of init bugs in built-in drivers.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    6f8c0de View commit details
  15. sched: make task dump print all 15 chars of proc comm

    Change-Id: I1a5c9676baa06c9f9b4424bbcab01b9b2fbfcd99
    Signed-off-by: Erik Gilling <konkers@android.com>
    Erik Gilling authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    a9df307 View commit details
  16. Make /dev/mem configurable, as we don't want it.

    Signed-off-by: Brian Swetland <swetland@google.com>
    Robert Love authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    b196005 View commit details
  17. w1: don't allow arbitrary users to remove w1 devices

    The search/pullup/add/remove device attributes were 0666 which would
    allow arbitrary users to affect the 1 wire bus.  Change to 0664 to
    prevent that.
    
    Signed-off-by: Brian Swetland <swetland@google.com>
    swetland authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    39088f0 View commit details
  18. [docs] android: Add android config documentation to boot framework.

    Signed-off-by: Mike Chan <mike@android.com>
    Mike Chan authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    4133c94 View commit details
  19. PM: Add wake lock api.

    arve-android committed Jul 22, 2010
    Copy the full SHA
    13520b8 View commit details
  20. Copy the full SHA
    d2e39f7 View commit details
  21. PM: Implement wakelock api.

    PM: wakelock: Replace expire work with a timer
    
    The expire work function did not work in the normal case.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    d0abed8 View commit details
  22. power: Prevent spinlock recursion when wake_unlock() is called

    Signed-off-by: Mike Chan <mike@android.com>
    Mike Chan authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    55e0ecd View commit details
  23. power: wakelocks: fix buffer overflow in print_wake_locks

    Change-Id: Ic944e3b3d3bc53eddc6fd0963565fd072cac373c
    Signed-off-by: Erik Gilling <konkers@android.com>
    Erik Gilling authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    82a1632 View commit details
  24. PM: wakelocks: Use seq_file for /proc/wakelocks so we can get more th…

    …an 3K of stats.
    
    Change-Id: I42ed8bea639684f7a8a95b2057516764075c6b01
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    add74ea View commit details
  25. Copy the full SHA
    39b9b38 View commit details
  26. PM: Enable early suspend through /sys/power/state

    If EARLYSUSPEND is enabled then writes to /sys/power/state no longer
    blocks, and the kernel will try to enter the requested state every
    time no wakelocks are held. Write "on" to resume normal operation.
    arve-android committed Jul 22, 2010
    Copy the full SHA
    04cbf5f View commit details
  27. PM: Add user-space wake lock api.

    This adds /sys/power/wake_lock and /sys/power/wake_unlock.
    Writing a string to wake_lock creates a wake lock the
    first time is sees a string and locks it. Optionally, the
    string can be followed by a timeout.
    To unlock the wake lock, write the same string to wake_unlock.
    
    Change-Id: I66c6e3fe6487d17f9c2fafde1174042e57d15cd7
    arve-android committed Jul 22, 2010
    Copy the full SHA
    f2f49cf View commit details
  28. PM: wakelock: Abort task freezing if a wake lock is held.

    Avoids a problem where the device sometimes hangs for 20 seconds
    before the screen is turned on.
    arve-android committed Jul 22, 2010
    Copy the full SHA
    b665321 View commit details
  29. PM: wakelock: Don't dump unfrozen task list when aborting try_to_free…

    …ze_tasks after less than one second
    
    Change-Id: Ib2976e5b97a5ee4ec9abd4d4443584d9257d0941
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    10e424c View commit details
  30. PM: earlysuspend: Add console switch when user requested sleep state …

    …changes.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    9371527 View commit details
  31. consoleearlysuspend: Fix for 2.6.32

    vt_waitactive now needs a 1 based console number
    
    Change-Id: I07ab9a3773c93d67c09d928c8d5494ce823ffa2e
    arve-android committed Jul 22, 2010
    Copy the full SHA
    70543a1 View commit details
  32. PM: earlysuspend: Removing dependence on console.

    Rather than signaling a full update of the display from userspace via a
    console switch, this patch introduces 2 files int /sys/power,
    wait_for_fb_sleep and wait_for_fb_wake.  Reading these files will block
    until the requested state has been entered.  When a read from
    wait_for_fb_sleep returns userspace should stop drawing.  When
    wait_for_fb_wake returns, it should do a full update.  If either are called
    when the fb driver is already in the requested state, they will return
    immediately.
    
    Signed-off-by: Rebecca Schultz <rschultz@google.com>
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    Rebecca Schultz authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    e7e155d View commit details
  33. Copy the full SHA
    18b8d08 View commit details
  34. rtc: alarm: Add in-kernel alarm interface

    Drivers can now create alarms that will use an hrtimer while the
    system is running and the rtc to wake up from suspend.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    22c2535 View commit details
  35. rtc: Try to prevent RTC errors from accumulating.

    When we resume we only know how many whole seconds has elapsed.
    These errors would accumulate in delta. We now only set the delta
    if it would change by more than two seconds. If we drift back by
    by more than a second add one in resume.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    2e26cb0 View commit details
  36. ledtrig-sleep: Add led trigger for sleep debugging.

    Signed-off-by: Brian Swetland <swetland@google.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    aa601dd View commit details
  37. Input: Hold wake lock while event queue is not empty.

    Allows userspace code to process input events while
    the device appears to be asleep.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    b53880a View commit details
  38. Input: Use monotonic time for event time stamps.

    Since wall time can jump backwards, it cannot be used to determine if one
    event occured before another or for how long a key was pressed.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    a7c88ad View commit details
  39. input: evdev: Use unique wakelock names

    wakelock names are now contain evdev->name and pid
    
    Signed-off-by: Mike Chan <mike@android.com>
    Mike Chan authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    dce3de3 View commit details
  40. power_supply: Hold a wake_lock while power supply change notification…

    …s are pending
    
    When connecting usb or the charger the device would often go back to sleep
    before the charge led and screen turned on.
    
    Change-Id: I01def6d86ddece0d4e31d2a91d176ed0975b6b9d
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    arve-android committed Jul 22, 2010
    Copy the full SHA
    4231d02 View commit details
  41. switch: switch class and GPIO drivers.

    switch: Export symbol switch_set_state.
    
    Signed-off-by: Mike Lockwood <lockwood@android.com>
    
    switch: gpio: Don't call request_irq with interrupts disabled
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    
    switch: Use device_create instead of device_create_drvdata.
    
    device_create_drvdata is obsolete.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    
    switch_gpio: Add missing #include <linux/interrupt.h>
    
    Change-Id: I6c397e41bbe1457162cc69e31a29db5d9f76fccb
    Signed-off-by: Mike Lockwood <lockwood@android.com>
    mikeandroid authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    29853d7 View commit details
  42. pmem: Add pmem driver

    Signed-off-by: Rebecca Schultz <rschultz@google.com>
    
    pmem: Use the thread group leader insted of the current thread.
    
    Instead of keeping track of the current thread, use the thread group leader
    
    Signed-off-by: Rebecca Schultz <rschultz@google.com>
    
    pmem: Add some apis to reference and flush pmem files by file struct
    
    The api to refer to pmem files by fd should be depricated, it can
    cause problems if a processes fd table changes while the kernel is processing
    data in a pmem file.  This change adds the safer api.
    
    Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
    
    pmem: Remove unused depricated fd api to pmem.
    
    Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
    
    pmem: Remove error message when calling get_pmem_addr
    
    This call is used from the mdp driver to determine if the memory
    is in pmem or in the fb.  We will encounter this case during normal operation
    so this error message should be removed.
    
    Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
    
    pmem: Add include sched.h to fix compile errors
    
    Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
    
    pmem: remove HW3D_* ioctls
    
    Signed-off-by: Dima Zavin <dima@android.com>
    
    pmem: Expose is_pmem_file to the in-kernel users.
    
    Signed-off-by: Dima Zavin <dima@android.com>
    
    pmem: Make the exposed functions be noops if CONFIG_ANDROID_PMEM is not set.
    
    Signed-off-by: Dima Zavin <dima@android.com>
    
    misc: pmem: don't flush if file was opened with O_SYNC
    
    Change-Id: I067218658a0d7f7ecc1fe73e9ff6b0c3b3054653
    Signed-off-by: Dima Zavin <dima@android.com>
    Rebecca Schultz authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    c739190 View commit details
  43. Add android_aid.h

    Add <linux/android_aid.h>, our mapping of AID defines to gid numbers.
    
    Signed-off-by: Robert Love <rlove@google.com>
    Robert Love authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    96b7efe View commit details
  44. ashmem for 2.6.27.

    Forward port of ashmem to 2.6.27.
    
    Signed-off-by: Robert Love <rlove@google.com>
    
    ashmem: Don't install fault handler for private mmaps.
    
    Ashmem is used to create named private heaps. If this heap is backed
    by a tmpfs file it will allocate two pages for every page touched.
    In 2.6.27, the extra page would later be freed, but 2.6.29 does not
    scan anonymous pages when running without swap so the memory is not
    freed while the file is referenced. This change changes the behavior
    of private ashmem mmaps to match /dev/zero instead tmpfs.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    
    ashmem: Add common prefix to name reported in /proc/pid/maps
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    
    ashmem: don't require a page aligned size
    
    This makes ashmem more similar to shmem and mmap, by
    not requiring the specified size to be page aligned,
    instead rounding it internally as needed.
    
    Signed-off-by: Marco Nelissen <marcone@android.com>
    Robert Love authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    d457dac View commit details
  45. Paranoid network.

    With CONFIG_ANDROID_PARANOID_NETWORK, require specific uids/gids to instantiate
    network sockets.
    
    Signed-off-by: Robert Love <rlove@google.com>
    
    paranoid networking: Use in_egroup_p() to check group membership
    
    The previous group_search() caused trouble for partners with module builds.
    in_egroup_p() is also cleaner.
    
    Signed-off-by: Nick Pelly <npelly@google.com>
    
    Fix 2.6.29 build.
    
    Signed-off-by: Arve Hjønnevåg <arve@android.com>
    
    net: Fix compilation of the IPv6 module
    
    Fix compilation of the IPv6 module -- current->euid does not exist anymore,
    current_euid() is what needs to be used.
    
    Signed-off-by: Steinar H. Gunderson <sesse@google.com>
    Robert Love authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    528f6d1 View commit details
  46. net: socket ioctl to reset connections matching local address

    Introduce a new socket ioctl, SIOCKILLADDR, that nukes all sockets
    bound to the same local address. This is useful in situations with
    dynamic IPs, to kill stuck connections.
    
    Signed-off-by: Brian Swetland <swetland@google.com>
    
    net: fix tcp_v4_nuke_addr
    
    Signed-off-by: Dima Zavin <dima@android.com>
    
    net: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke.
    
    We can't hold the lock while calling to tcp_done(), so we drop
    it before calling. We then have to start at the top of the chain again.
    
    Signed-off-by: Dima Zavin <dima@android.com>
    
    net: ipv4: Fix race in tcp_v4_nuke_addr().
    
    To fix a recursive deadlock in 2.6.29, we stopped holding the hash table lock
    across tcp_done() calls. This fixed the deadlock, but introduced a race where
    the socket could die or change state.
    
    Fix: Before unlocking the hash table, we grab a reference to the socket. We
    can then unlock the hash table without risk of the socket going away. We then
    lock the socket, which is safe because it is pinned. We can then call
    tcp_done() without recursive deadlock and without race. Upon return, we unlock
    the socket and then unpin it, killing it.
    
    Change-Id: Idcdae072b48238b01bdbc8823b60310f1976e045
    Signed-off-by: Robert Love <rlove@google.com>
    Acked-by: Dima Zavin <dima@android.com>
    
    ipv4: disable bottom halves around call to tcp_done().
    
    Signed-off-by: Robert Love <rlove@google.com>
    Signed-off-by: Colin Cross <ccross@android.com>
    
    ipv4: Move sk_error_report inside bh_lock_sock in tcp_v4_nuke_addr
    
    When sk_error_report is called, it wakes up the user-space thread, which then
    calls tcp_close.  When the tcp_close is interrupted by the tcp_v4_nuke_addr
    ioctl thread running tcp_done, it leaks 392 bytes and triggers a WARN_ON.
    
    This patch moves the call to sk_error_report inside the bh_lock_sock, which
    matches the locking used in tcp_v4_err.
    
    Signed-off-by: Colin Cross <ccross@android.com>
    Robert Love authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    3f58adf View commit details
  47. sysfs_net_ipv4: Add sysfs-based knobs for controlling TCP window size

    Add a family of knobs to /sys/kernel/ipv4 for controlling the TCP window size:
    
    	tcp_wmem_min
    	tcp_wmem_def
    	tcp_wmem_max
    	tcp_rmem_min
    	tcp_rmem_def
    	tcp_rmem_max
    
    This six values mirror the sysctl knobs in /proc/sys/net/ipv4/tcp_wmem and
    /proc/sys/net/ipv4/tcp_rmem.
    
    Sysfs, unlike sysctl, allows us to set and manage the files' permissions and
    owners.
    
    Signed-off-by: Robert Love <rlove@google.com>
    Robert Love authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    560ffd2 View commit details
  48. misc: uidstat: Adding uid stat driver to collect network statistics.

    Signed-off-by: Mike Chan <mike@android.com>
    Mike Chan authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    b455f85 View commit details
  49. FAT: Add new ioctl VFAT_IOCTL_GET_VOLUME_ID for reading the volume ID.

    Signed-off-by: Brian Swetland <swetland@google.com>
    mikeandroid authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    eab7c2c View commit details
  50. Grants system server access to /proc/<pid>/oom_adj for Android applic…

    …ations.
    
    Signed-off-by: Brian Swetland <swetland@google.com>
    Mike Chan authored and arve-android committed Jul 22, 2010
    Copy the full SHA
    71b1bc9 View commit details
Showing with 8,258 additions and 2,192 deletions.
  1. +181 −94 arch/arm/configs/hero_defconfig
  2. +207 −15 arch/arm/configs/msm_defconfig
  3. +86 −75 arch/arm/mach-msm/Kconfig
  4. +1 −1 arch/arm/mach-msm/Makefile
  5. +79 −235 arch/arm/mach-msm/acpuclock-arm11.c
  6. +1 −1 arch/arm/mach-msm/board-hero-mmc.c
  7. +22 −1 arch/arm/mach-msm/board-hero-panel.c
  8. +421 −151 arch/arm/mach-msm/board-hero.c
  9. +2 −2 arch/arm/mach-msm/board-hero.h
  10. +1 −1 arch/arm/mach-msm/board-sapphire.c
  11. +3 −1 arch/arm/mach-msm/clock-pcom.h
  12. +17 −96 arch/arm/mach-msm/devices_htc.c
  13. +6 −6 arch/arm/mach-msm/htc_headset_v1.c
  14. +194 −0 arch/arm/mach-msm/idle-v6.S
  15. +0 −10 arch/arm/mach-msm/include/mach/board_htc.h
  16. +4 −3 arch/arm/mach-msm/include/mach/camera.h
  17. +16 −9 arch/arm/mach-msm/include/mach/msm_rpc_version.h
  18. +0 −6 arch/arm/mach-msm/include/mach/msm_rpcrouter.h
  19. +4 −9 arch/arm/mach-msm/pm.c
  20. +1 −0 arch/arm/mach-msm/pwrtest.c
  21. +16 −24 arch/arm/mach-msm/qdsp5_comp/adsp.c
  22. +4 −0 arch/arm/mach-msm/qdsp5_comp/adsp_driver.c
  23. +84 −100 arch/arm/mach-msm/smd.c
  24. +13 −1 arch/arm/mach-msm/smd_qmi.c
  25. +81 −102 arch/arm/mach-msm/smd_rpcrouter.c
  26. +8 −13 arch/arm/mach-msm/smd_rpcrouter.h
  27. +5 −27 arch/arm/mach-msm/smd_rpcrouter_device.c
  28. +21 −16 arch/arm/mach-msm/smd_tty.c
  29. +12 −2 camera_bug
  30. +32 −24 drivers/cpufreq/cpufreq_smartass.c
  31. +5 −4 drivers/gpu/drm/radeon/rv770.c
  32. +55 −11 drivers/i2c/busses/i2c-msm.c
  33. +0 −22 drivers/input/touchscreen/Kconfig
  34. +24 −495 drivers/input/touchscreen/synaptics_i2c_rmi.c
  35. +15 −15 drivers/media/video/msm/Kconfig
  36. +3 −0 drivers/media/video/msm/Makefile
  37. +165 −163 drivers/media/video/msm/msm_camera.c
  38. +1 −1 drivers/media/video/msm/msm_vfe7x.c
  39. +46 −4 drivers/media/video/msm/mt9p012_fox.c
  40. +1,756 −0 drivers/media/video/msm/s5k3h1gx.c
  41. +93 −0 drivers/media/video/msm/s5k3h1gx.h
  42. +420 −0 drivers/media/video/msm/s5k3h1gx_reg.c
  43. +1,022 −0 drivers/media/video/msm/s5k6aafx.c
  44. +80 −0 drivers/media/video/msm/s5k6aafx.h
  45. +2,647 −0 drivers/media/video/msm/s5k6aafx_reg_mecha.c
  46. +10 −91 drivers/misc/pmem.c
  47. +4 −0 drivers/rtc/rtc-msm7x00a.c
  48. +13 −0 drivers/serial/msm_serial_hs.c
  49. +10 −0 drivers/staging/android/TODO
  50. +0 −1 drivers/staging/android/lowmemorykiller.c
  51. +76 −0 drivers/usb/gadget/f_mass_storage.c
  52. +1 −1 drivers/usb/gadget/f_mtp.c
  53. +47 −58 drivers/usb/gadget/msm72k_udc_htc.c
  54. +1 −1 drivers/video/msm/mddi.c
  55. +96 −63 drivers/video/msm/mddi_client_eid.c
  56. +44 −16 drivers/video/msm/mddi_client_toshiba.c
  57. +15 −80 drivers/video/msm/mddi_eid_cabc.c
  58. +1 −57 drivers/video/msm/mdp.c
  59. +16 −14 fs/ext4/mballoc.c
  60. +21 −4 include/linux/android_pmem.h
  61. +6 −0 include/linux/cpufreq.h
  62. +8 −0 include/linux/kmalloc_sizes.h
  63. +0 −25 include/linux/synaptics_i2c_rmi.h
  64. +2 −2 include/media/msm_camera.h
  65. +0 −6 kernel/sched.c
  66. +3 −3 kernel/sched_fair.c
  67. +30 −30 mm/vmscan.c
275 changes: 181 additions & 94 deletions arch/arm/configs/hero_defconfig

Large diffs are not rendered by default.

222 changes: 207 additions & 15 deletions arch/arm/configs/msm_defconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
CONFIG_EXPERIMENTAL=y
# CONFIG_SWAP is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_CGROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_PANIC_TIMEOUT=5
CONFIG_EMBEDDED=y
# CONFIG_SYSCTL_SYSCALL is not set
# CONFIG_ELF_CORE is not set
CONFIG_ASHMEM=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_MSM=y
CONFIG_MACH_HALIBUT=y
CONFIG_MACH_TROUT=y
@@ -18,60 +33,237 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="mem=64M console=ttyMSM,115200n8"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_PM=y
CONFIG_WAKELOCK=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_NET_KEY=y
CONFIG_INET=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
CONFIG_INET_ESP=y
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_IPV6=y
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
CONFIG_INET6_IPCOMP=y
CONFIG_IPV6_MIP6=y
CONFIG_IPV6_TUNNEL=y
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_DEBUG=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_SCTP=y
CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_CONNTRACK_H323=y
CONFIG_NF_CONNTRACK_IRC=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y
CONFIG_NF_CONNTRACK_PPTP=y
CONFIG_NF_CONNTRACK_SANE=y
CONFIG_NF_CONNTRACK_SIP=y
CONFIG_NF_CONNTRACK_TFTP=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
CONFIG_NETFILTER_XT_TARGET_LED=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
CONFIG_NETFILTER_XT_MATCH_STRING=y
CONFIG_NETFILTER_XT_MATCH_TIME=y
CONFIG_NETFILTER_XT_MATCH_U32=y
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_ADDRTYPE=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_NF_NAT=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y
CONFIG_NET_ACT_GACT=y
CONFIG_NET_ACT_MIRRED=y
CONFIG_BT=y
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_LL=y
CONFIG_RFKILL=y
# CONFIG_RFKILL_PM is not set
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_UID_STAT=y
CONFIG_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_DEBUG=y
CONFIG_DM_CRYPT=y
CONFIG_DM_UEVENT=y
CONFIG_NETDEVICES=y
CONFIG_IFB=y
CONFIG_DUMMY=y
CONFIG_TUN=y
CONFIG_NET_ETHERNET=y
CONFIG_SMC91X=y
CONFIG_PPP=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_PPP_MPPE=y
CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
CONFIG_MSM_RMNET_DEBUG=y
# CONFIG_INPUT_MOUSEDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_INPUT_KEYRESET=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ELAN_I2C_8232=y
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_KEYCHORD=y
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_GPIO=y
# CONFIG_SERIO is not set
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_VT is not set
# CONFIG_DEVMEM is not set
# CONFIG_DEVKMEM is not set
CONFIG_SERIAL_MSM=y
CONFIG_SERIAL_MSM_CONSOLE=y
CONFIG_SERIAL_MSM_RX_WAKEUP=y
CONFIG_SERIAL_MSM_HS=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_POWER_SUPPLY=y
# CONFIG_HWMON is not set
CONFIG_MEDIA_SUPPORT=y
CONFIG_VIDEO_DEV=y
# CONFIG_VIDEO_ALLOW_V4L1 is not set
CONFIG_MSM_CAMERA=y
CONFIG_MT9T013=y
CONFIG_DAB=y
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
CONFIG_FB_MSM=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_GADGET_MSM_72K=y
CONFIG_USB_ANDROID=y
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
CONFIG_USB_ANDROID_RNDIS=y
CONFIG_USB_ANDROID_RNDIS_WCEIS=y
CONFIG_MMC=y
CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MMC_EMBEDDED_SDIO=y
CONFIG_MMC_PARANOID_SD_INIT=y
# CONFIG_MMC_BLOCK_BOUNCE is not set
CONFIG_MMC_BLOCK_DEFERRED_RESUME=y
CONFIG_MMC_MSM7X00A=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_SLEEP=y
CONFIG_SWITCH=y
CONFIG_SWITCH_GPIO=y
CONFIG_RTC_CLASS=y
# CONFIG_RTC_INTF_SYSFS is not set
# CONFIG_RTC_INTF_PROC is not set
# CONFIG_RTC_INTF_DEV is not set
CONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_LOGGER=y
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_YAFFS_FS=y
CONFIG_YAFFS_DISABLE_TAGS_ECC=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_PRINTK_TIME=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_SCHEDSTATS=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_PREEMPT is not set
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_LL=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_TWOFISH=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
161 changes: 86 additions & 75 deletions arch/arm/mach-msm/Kconfig
Original file line number Diff line number Diff line change
@@ -106,7 +106,8 @@ config MSM_REMOTE_SPINLOCK
default y

config MSM_LEGACY_7X00A_AMSS
bool
bool "Legacy 7x00A AMSS"
default n

config TURBO_MODE
bool "Turbo mode"
@@ -212,114 +213,124 @@ config MACH_SAPPHIRE
bool "Sapphire"

choice
depends on ARCH_MSM7X00A
prompt "Hero"
default MACH_HERO_NONE
help
Select this to support the Hero GSM or CDMA device
depends on ARCH_MSM7X00A
prompt "Hero"
default MACH_HERO_NONE
help
Select this to support the Hero GSM or CDMA device

config MACH_HERO_NONE
bool "None"
config MACH_HERO_NONE
bool "None"

config MACH_HERO
bool "GSM"
select MSM_SMD_PKG3
help
Select this to support the Hero GSM device

config MACH_HEROC
bool "CDMA"
help
Select this to support the Hero CDMA device
config MACH_HEROC
bool "CDMA"
help
Select this to support the Hero CDMA device
endchoice

menu "Hero GSM specific devices"
depends on MACH_HERO

config HERO_EXPERIMENTAL_USBADSP
depends on MACH_HERO
bool "Experimental usb-adsp"
help
Use experimental usb-adsp setup
endmenu

menu "HeroC specific devices"
depends on MACH_HEROC
depends on MACH_HEROC

config HEROC_SERIAL
depends on MACH_HEROC
default n
bool "Serial Support"
help
Support for serial
depends on MACH_HEROC
default n
bool "Serial Support"
help
Support for serial

config HEROC_CAMERA
depends on MACH_HEROC
default y
bool "Camera Support"
help
Support for s5k3e2fx camera
depends on MACH_HEROC
default y
bool "Camera Support"
help
Support for s5k3e2fx camera

config HEROC_TS
depends on MACH_HEROC
default y
bool "Touchscreen Support"
help
Support for the touchscreen
depends on MACH_HEROC
default y
bool "Touchscreen Support"
help
Support for the touchscreen

config HEROC_H2W
depends on MACH_HEROC
default n
bool "h22 Support"
help
No clue
depends on MACH_HEROC
default n
bool "h22 Support"
help
No clue

config HEROC_AUDIO_JACK
depends on MACH_HEROC
default n
bool "Old audio jack support"
help
Leave disabled for now
depends on MACH_HEROC
default n
bool "Old audio jack support"
help
Leave disabled for now
endmenu

config MACH_MAHIMAHI
depends on ARCH_QSD8X50
default y
bool "Mahi-Mahi"
help
Select this to support the Mahi-Mahi device
depends on ARCH_QSD8X50
default y
bool "Mahi-Mahi"
help
Select this to support the Mahi-Mahi device

choice
depends on ARCH_QSD8X50
prompt "Bravo"
default MACH_BRAVO_NONE
help
Select this to support the Bravo GSM or CDMA device
depends on ARCH_QSD8X50
prompt "Bravo"
default MACH_BRAVO_NONE
help
Select this to support the Bravo GSM or CDMA device

config MACH_BRAVO_NONE
bool "None"
config MACH_BRAVO_NONE
bool "None"

config MACH_BRAVO
bool "GSM"
help
Select this to support the Bravo GSM device
config MACH_BRAVO
bool "GSM"
help
Select this to support the Bravo GSM device

config MACH_BRAVOC
bool "CDMA"
help
Select this to support the Bravo CDMA device
config MACH_BRAVOC
bool "CDMA"
help
Select this to support the Bravo CDMA device
endchoice

config MACH_SUPERSONIC
depends on ARCH_QSD8X50
default y
bool "Supersonic (HTC EVO 4G)"
help
Select this to support the Supersonic device
depends on ARCH_QSD8X50
default y
bool "Supersonic (HTC EVO 4G)"
help
Select this to support the Supersonic device

config MACH_QSD8X50_FFA
depends on ARCH_QSD8X50
default y
bool "8x50-ffa"
help
Select this to support the 8x50 ffa device
depends on ARCH_QSD8X50
default y
bool "8x50-ffa"
help
Select this to support the 8x50 ffa device

config MACH_MSM7X30_SURF
depends on ARCH_MSM7X30
default y
bool "QCT SURF7x30 Board"
help
Select this to support the Qualcomm SURF7X30 development board
depends on ARCH_MSM7X30
default y
bool "QCT SURF7x30 Board"
help
Select this to support the Qualcomm SURF7X30 development board

config MACH_MSM7X30_SURF
depends on ARCH_MSM7X30
@@ -397,15 +408,15 @@ config JESUS_PHONE
default n
bool "Enable Jesus Phone mode (DANGEROUS)"
help
Enable support for dangerous acpuclock frequencies/voltages.
Enable support for dangerous acpuclock frequencies/voltages.

if JESUS_PHONE
config JESUS_PHONE_SAFE
depends on JESUS_PHONE
default n
bool "Safe Max Jesus Phone"
help
set max speed to 691200
set max speed to 691200
endif


2 changes: 1 addition & 1 deletion arch/arm/mach-msm/Makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ obj-y += proc_comm.o
obj-y += io.o irq.o timer.o dma.o memory.o
obj-y += vreg.o
obj-y += pmic.o
obj-$(CONFIG_ARCH_MSM_ARM11) += acpuclock-arm11.o idle.o
obj-$(CONFIG_ARCH_MSM_ARM11) += acpuclock-arm11.o idle-v6.o
obj-$(CONFIG_ARCH_MSM_SCORPION) += idle-v7.o
obj-$(CONFIG_ARCH_MSM_SCORPION) += arch-init-scorpion.o
obj-$(CONFIG_ARCH_QSD8X50) += acpuclock-qsd8x50.o
314 changes: 79 additions & 235 deletions arch/arm/mach-msm/acpuclock-arm11.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion arch/arm/mach-msm/board-hero-mmc.c
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
#include "board-hero.h"
#include "proc_comm.h"

#define DEBUG_SDSLOT_VDD 1
// #define DEBUG_SDSLOT_VDD 1

/* r porting 29 */
extern int msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat,
23 changes: 22 additions & 1 deletion arch/arm/mach-msm/board-hero-panel.c
Original file line number Diff line number Diff line change
@@ -585,6 +585,23 @@ static void panel_eid_fixup(uint16_t *mfr_name, uint16_t *product_code)
*product_code= 0x0;
}

static int config_vsync(void)
{
int ret;
uint32_t config;

ret = gpio_request(HERO_GPIO_VSYNC, "vsync");
if (ret)
return ret;

config = PCOM_GPIO_CFG(HERO_GPIO_VSYNC, 1, GPIO_INPUT,
GPIO_PULL_DOWN, GPIO_2MA);
ret = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
if (ret)
gpio_free(HERO_GPIO_VSYNC);
return ret;
}

static struct msm_mddi_bridge_platform_data toshiba_client_data = {
.init = mddi_toshiba_client_init,
.uninit = mddi_toshiba_client_uninit,
@@ -629,7 +646,7 @@ static struct msm_mddi_platform_data hero_pdata = {
.clk_rate = 122880000,
.power_client = hero_mddi_sharp_power,
.fixup = panel_eid_fixup,
.vsync_irq = MSM_GPIO_TO_INT(HERO_GPIO_VSYNC),
//.vsync_irq = MSM_GPIO_TO_INT(HERO_GPIO_VSYNC),
.fb_resource = resources_msm_fb,
.num_clients = 2,
.client_platform_data = {
@@ -712,6 +729,10 @@ int __init hero_init_panel(void)
if (rc)
return rc;

rc = config_vsync();
if (rc)
return rc;

msm_device_mddi0.dev.platform_data = &hero_pdata;
rc = platform_device_register(&msm_device_mddi0);
if (rc)
572 changes: 421 additions & 151 deletions arch/arm/mach-msm/board-hero.c

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions arch/arm/mach-msm/board-hero.h
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@
#define MSM_EBI_BASE 0x19200000
#define MSM_EBI_SMI32_256MB_SIZE 0x0C600000

#define MSM_PMEM_GPU0_BASE 0x00000000
#define MSM_PMEM_GPU0_SIZE 0x00700000
#define SMI32_MSM_PMEM_GPU0_BASE 0x00000000
#define SMI32_MSM_PMEM_GPU0_SIZE 0x00700000


#define DECLARE_MSM_IOMAP
2 changes: 1 addition & 1 deletion arch/arm/mach-msm/board-sapphire.c
Original file line number Diff line number Diff line change
@@ -544,7 +544,7 @@ static void h2w_config_cpld(int route)

static void h2w_init_cpld(void)
{
h2w_config_cpld(H2W_UART3);
h2w_config_cpld(H2W_UART3);
}

static int h2w_dat_value;
4 changes: 3 additions & 1 deletion arch/arm/mach-msm/clock-pcom.h
Original file line number Diff line number Diff line change
@@ -72,7 +72,9 @@
#define P_USB_HS_P_CLK 37 /* High speed USB pbus clock */
#define P_USB_OTG_CLK 38 /* Full speed USB clock */
#define P_VDC_CLK 39 /* Video controller clock */
#if !defined(CONFIG_MSM_LEGACY_7X00A_AMSS)

// Riemer: added this for GSM Hero
#if !defined(CONFIG_MSM_LEGACY_7X00A_AMSS) || defined(CONFIG_MACH_HERO)
#define P_VFE_MDC_CLK 40 /* VFE MDDI client clock */
#define P_VFE_CLK 41 /* Camera / Video Front End clock */
#else/* For radio code base others */
113 changes: 17 additions & 96 deletions arch/arm/mach-msm/devices_htc.c
Original file line number Diff line number Diff line change
@@ -250,32 +250,6 @@ static struct android_pmem_platform_data pmem_camera_pdata = {
.cached = 0,
};

#ifdef CONFIG_BUILD_CIQ
static struct android_pmem_platform_data pmem_ciq_pdata = {
.name = "pmem_ciq",
.no_allocator = 0,
.cached = 0,
};

static struct android_pmem_platform_data pmem_ciq1_pdata = {
.name = "pmem_ciq1",
.no_allocator = 0,
.cached = 0,
};

static struct android_pmem_platform_data pmem_ciq2_pdata = {
.name = "pmem_ciq2",
.no_allocator = 0,
.cached = 0,
};

static struct android_pmem_platform_data pmem_ciq3_pdata = {
.name = "pmem_ciq3",
.no_allocator = 0,
.cached = 0,
};
#endif

static struct platform_device pmem_device = {
.name = "android_pmem",
.id = 0,
@@ -294,32 +268,6 @@ static struct platform_device pmem_camera_device = {
.dev = { .platform_data = &pmem_camera_pdata },
};

#ifdef CONFIG_BUILD_CIQ
static struct platform_device pmem_ciq_device = {
.name = "android_pmem",
.id = 5,
.dev = { .platform_data = &pmem_ciq_pdata },
};

static struct platform_device pmem_ciq1_device = {
.name = "android_pmem",
.id = 6,
.dev = { .platform_data = &pmem_ciq1_pdata },
};

static struct platform_device pmem_ciq2_device = {
.name = "android_pmem",
.id = 7,
.dev = { .platform_data = &pmem_ciq2_pdata },
};

static struct platform_device pmem_ciq3_device = {
.name = "android_pmem",
.id = 8,
.dev = { .platform_data = &pmem_ciq3_pdata },
};
#endif

static struct resource ram_console_resource[] = {
{
.flags = IORESOURCE_MEM,
@@ -372,69 +320,42 @@ void __init msm_add_mem_devices(struct msm_pmem_setting *setting)
pmem_pdata.size = setting->pmem_size;
platform_device_register(&pmem_device);
}

printk("pmem_adsp_device ");
if (setting->pmem_adsp_size) {
pmem_adsp_pdata.start = setting->pmem_adsp_start;
pmem_adsp_pdata.size = setting->pmem_adsp_size;
platform_device_register(&pmem_adsp_device);
}
printk("hw3d_device ");
if (setting->pmem_gpu0_size && setting->pmem_gpu1_size) {
struct resource *res;

res = platform_get_resource_byname(&hw3d_device, IORESOURCE_MEM,
"smi");
res->start = setting->pmem_gpu0_start;
res->end = res->start + setting->pmem_gpu0_size - 1;

res = platform_get_resource_byname(&hw3d_device, IORESOURCE_MEM,
"ebi");
res->start = setting->pmem_gpu1_start;
res->end = res->start + setting->pmem_gpu1_size - 1;
platform_device_register(&hw3d_device);
}
printk("pmem_camera_device ");

if (setting->pmem_gpu0_size && setting->pmem_gpu1_size) {
struct resource *res;

res = platform_get_resource_byname(&hw3d_device, IORESOURCE_MEM,
"smi");
res->start = setting->pmem_gpu0_start;
res->end = res->start + setting->pmem_gpu0_size - 1;

res = platform_get_resource_byname(&hw3d_device, IORESOURCE_MEM,
"ebi");
res->start = setting->pmem_gpu1_start;
res->end = res->start + setting->pmem_gpu1_size - 1;
platform_device_register(&hw3d_device);
}
if (setting->pmem_camera_size) {
pmem_camera_pdata.start = setting->pmem_camera_start;
pmem_camera_pdata.size = setting->pmem_camera_size;
platform_device_register(&pmem_camera_device);
}

printk("ram_console_device ");
if (setting->ram_console_size) {
ram_console_resource[0].start = setting->ram_console_start;
ram_console_resource[0].end = setting->ram_console_start
+ setting->ram_console_size - 1;
platform_device_register(&ram_console_device);
}
#ifdef CONFIG_BUILD_CIQ
printk("pmem_ciq_device ");
if(setting->pmem_ciq_size) {
pmem_ciq_pdata.start = setting->pmem_ciq_start;
pmem_ciq_pdata.size = setting->pmem_ciq_size;
platform_device_register(&pmem_ciq_device);
}
printk("pmem_ciqq_device ");

if(setting->pmem_ciq1_size) {
pmem_ciq1_pdata.start = setting->pmem_ciq1_start;
pmem_ciq1_pdata.size = setting->pmem_ciq1_size;
platform_device_register(&pmem_ciq1_device);
}

printk("pmem_ciq2_device ");
if(setting->pmem_ciq2_size) {
pmem_ciq2_pdata.start = setting->pmem_ciq2_start;
pmem_ciq2_pdata.size = setting->pmem_ciq2_size;
platform_device_register(&pmem_ciq2_device);
}

printk("pmem_ciq3_device ");
if(setting->pmem_ciq3_size) {
pmem_ciq3_pdata.start = setting->pmem_ciq3_start;
pmem_ciq3_pdata.size = setting->pmem_ciq3_size;
platform_device_register(&pmem_ciq3_device);
}
#endif
}

#if 0
12 changes: 6 additions & 6 deletions arch/arm/mach-msm/htc_headset_v1.c
Original file line number Diff line number Diff line change
@@ -226,7 +226,7 @@ void enable_h2w_irq(void)
enable_irq(hi->irq_btn);
enable_irq(hi->irq);
ret = set_irq_wake(hi->irq, 1);
ret = set_irq_wake(hi->irq_btn, 1);
//ret = set_irq_wake(hi->irq_btn, 1);
local_irq_restore(irq_flags);
}

@@ -242,7 +242,7 @@ void disable_h2w_irq(void)
disable_irq(hi->irq_btn);
disable_irq(hi->irq);
ret = set_irq_wake(hi->irq, 0);
ret = set_irq_wake(hi->irq_btn, 0);
//ret = set_irq_wake(hi->irq_btn, 0);
local_irq_restore(irq_flags);
}

@@ -2101,14 +2101,14 @@ static int h2w_probe(struct platform_device *pdev)
if (ret < 0)
goto err_request_h2w_headset_button_irq;

disable_irq(hi->irq_btn);
disable_irq_nosync(hi->irq_btn);

ret = set_irq_wake(hi->irq, 1);
if (ret < 0)
goto err_request_input_dev;
ret = set_irq_wake(hi->irq_btn, 1);
if (ret < 0)
goto err_request_input_dev;
//ret = set_irq_wake(hi->irq_btn, 1);
//if (ret < 0)
// goto err_request_input_dev;
}

if (hi->ext_mic_sel) {
194 changes: 194 additions & 0 deletions arch/arm/mach-msm/idle-v6.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
/*
* Idle processing for ARMv6-based Qualcomm SoCs.
* Work around bugs with SWFI.
*
* Copyright (C) 2007 Google, Inc.
* Copyright (c) 2007-2009, Code Aurora Forum. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/

#include <linux/linkage.h>
#include <asm/assembler.h>

.extern write_to_strongly_ordered_memory

ENTRY(msm_arch_idle)
mrs r2, cpsr /* save the CPSR state */
cpsid iaf /* explictly disable I,A and F */

#if defined(CONFIG_ARCH_MSM7X27)
mov r0, #0
mcr p15, 0, r0, c7, c10, 0 /* flush entire data cache */
mcr p15, 0, r0, c7, c10, 4 /* dsb */
stmfd sp!, {r2, lr} /* preserve r2, thus CPSR and LR */
bl write_to_strongly_ordered_memory /* flush AXI bus buffer */
ldmfd sp!, {r2, lr}
mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */
#else
mrc p15, 0, r1, c1, c0, 0 /* read current CR */
bic r0, r1, #(1 << 2) /* clear dcache bit */
bic r0, r0, #(1 << 12) /* clear icache bit */
mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */

mov r0, #0
mcr p15, 0, r0, c7, c5, 0 /* invalidate icache and flush */
/* branch target cache */
mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate dcache */

mcr p15, 0, r0, c7, c10, 4 /* dsb */
mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */

mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */
mcr p15, 0, r0, c7, c5, 4 /* isb */
#endif

msr cpsr_c, r2 /* restore the CPSR state */
mov pc, lr

ENTRY(msm_pm_collapse)
ldr r0, =saved_state
stmia r0!, {r4-r14}

cpsid f

mrc p15, 0, r1, c1, c0, 0 /* MMU control */
mrc p15, 0, r2, c2, c0, 0 /* ttb */
mrc p15, 0, r3, c3, c0, 0 /* dacr */
mrc p15, 0, ip, c13, c0, 1 /* context ID */
stmia r0!, {r1-r3, ip}
#if defined(CONFIG_OPROFILE)
mrc p15, 0, r1, c15, c12, 0 /* pmnc */
mrc p15, 0, r2, c15, c12, 1 /* ccnt */
mrc p15, 0, r3, c15, c12, 2 /* pmn0 */
mrc p15, 0, ip, c15, c12, 3 /* pmn1 */
stmia r0!, {r1-r3, ip}
#endif
mrc p15, 0, r1, c1, c0, 2 /* read CACR */
stmia r0!, {r1}

mrc p15, 0, r1, c1, c0, 0 /* read current CR */
bic r0, r1, #(1 << 2) /* clear dcache bit */
bic r0, r0, #(1 << 12) /* clear icache bit */
mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */

mov r0, #0
mcr p15, 0, r0, c7, c5, 0 /* invalidate icache and flush */
/* branch target cache */
mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate dcache */

mcr p15, 0, r0, c7, c10, 4 /* dsb */
mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */

mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */
mcr p15, 0, r0, c7, c5, 4 /* isb */

cpsie f

ldr r0, =saved_state /* restore registers */
ldmfd r0, {r4-r14}
mov r0, #0 /* return power collapse failed */
mov pc, lr

ENTRY(msm_pm_collapse_exit)
#if 0 /* serial debug */
mov r0, #0x80000016
mcr p15, 0, r0, c15, c2, 4
mov r0, #0xA9000000
add r0, r0, #0x00A00000 /* UART1 */
/*add r0, r0, #0x00C00000*/ /* UART3 */
mov r1, #'A'
str r1, [r0, #0x00C]
#endif
ldr r1, =saved_state_end
ldr r2, =msm_pm_collapse_exit
adr r3, msm_pm_collapse_exit
add r1, r1, r3
sub r1, r1, r2

ldmdb r1!, {r2}
mcr p15, 0, r2, c1, c0, 2 /* restore CACR */
#if defined(CONFIG_OPROFILE)
ldmdb r1!, {r2-r5}
mcr p15, 0, r3, c15, c12, 1 /* ccnt */
mcr p15, 0, r4, c15, c12, 2 /* pmn0 */
mcr p15, 0, r5, c15, c12, 3 /* pmn1 */
mcr p15, 0, r2, c15, c12, 0 /* pmnc */
#endif
ldmdb r1!, {r2-r5}
mcr p15, 0, r4, c3, c0, 0 /* dacr */
mcr p15, 0, r3, c2, c0, 0 /* ttb */
mcr p15, 0, r5, c13, c0, 1 /* context ID */
mov r0, #0
mcr p15, 0, r0, c7, c5, 4 /* isb */
ldmdb r1!, {r4-r14}

/* Add 1:1 map in the PMD to allow smooth switch when turning on MMU */
and r3, r3, #~0x7F /* mask off lower 7 bits of TTB */
adr r0, msm_pm_mapped_pa /* get address of the mapped instr */
lsr r1, r0, #20 /* get the addr range of addr in MB */
lsl r1, r1, #2 /* multiply by 4 to get to the pg index */
add r3, r3, r1 /* pgd + pgd_index(addr) */
ldr r1, [r3] /* save current entry to r1 */
lsr r0, #20 /* align current addr to 1MB boundary */
lsl r0, #20
/* Create new entry for this 1MB page */
orr r0, r0, #0x400 /* PMD_SECT_AP_WRITE */
orr r0, r0, #0x2 /* PMD_TYPE_SECT|PMD_DOMAIN(DOMAIN_KERNEL) */
str r0, [r3] /* put new entry into the MMU table */
mov r0, #0
mcr p15, 0, r0, c7, c10, 4 /* dsb */
mcr p15, 0, r2, c1, c0, 0 /* MMU control */
mcr p15, 0, r0, c7, c5, 4 /* isb */
msm_pm_mapped_pa:
/* Switch to virtual */
adr r2, msm_pm_pa_to_va
ldr r0, =msm_pm_pa_to_va
mov pc, r0
msm_pm_pa_to_va:
sub r0, r0, r2
/* Restore r1 in MMU table */
add r3, r3, r0
str r1, [r3]

mov r0, #0
mcr p15, 0, r0, c7, c10, 0 /* flush entire data cache */
mcr p15, 0, r0, c7, c10, 4 /* dsb */
mcr p15, 0, r0, c7, c5, 4 /* isb */
mcr p15, 0, r0, c8, c7, 0 /* invalidate entire unified TLB */
mcr p15, 0, r0, c7, c5, 6 /* invalidate entire branch target
* cache */
mcr p15, 0, r0, c7, c7, 0 /* invalidate both data and instruction
* cache */
mcr p15, 0, r0, c7, c10, 4 /* dsb */
mcr p15, 0, r0, c7, c5, 4 /* isb */

mov r0, #1
mov pc, lr
nop
nop
nop
nop
nop
1: b 1b


.data

saved_state:
.space 4 * 11 /* r4-14 */
.space 4 * 4 /* cp15 - MMU control, ttb, dacr, context ID */
#if defined(CONFIG_OPROFILE)
.space 4 * 4 /* more cp15 - pmnc, ccnt, pmn0, pmn1 */
#endif
.space 4 /* cacr */
saved_state_end:

10 changes: 0 additions & 10 deletions arch/arm/mach-msm/include/mach/board_htc.h
Original file line number Diff line number Diff line change
@@ -31,16 +31,6 @@ struct msm_pmem_setting{
resource_size_t pmem_camera_size;
resource_size_t ram_console_start;
resource_size_t ram_console_size;
#ifdef CONFIG_BUILD_CIQ
resource_size_t pmem_ciq_start;
resource_size_t pmem_ciq_size;
resource_size_t pmem_ciq1_start;
resource_size_t pmem_ciq1_size;
resource_size_t pmem_ciq2_start;
resource_size_t pmem_ciq2_size;
resource_size_t pmem_ciq3_start;
resource_size_t pmem_ciq3_size;
#endif
};

enum {
7 changes: 4 additions & 3 deletions arch/arm/mach-msm/include/mach/camera.h
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
#include <media/msm_camera.h>

#ifdef CONFIG_MSM_CAMERA_DEBUG
#define CDBG(fmt, args...) printk(KERN_INFO "msm_camera: " fmt, ##args)
#define CDBG(fmt, args...) printk(KERN_INFO "[CAM] msm_camera: " fmt, ##args)
#else
#define CDBG(fmt, args...) do { } while (0)
#endif
@@ -28,6 +28,7 @@
#define NUM_AUTOFOCUS_MULTI_WINDOW_GRIDS 16
#define NUM_STAT_OUTPUT_BUFFERS 3
#define NUM_AF_STAT_OUTPUT_BUFFERS 3
#define max_control_command_size 150

enum msm_queue {
MSM_CAM_Q_CTRL, /* control command or control command status */
@@ -104,7 +105,7 @@ struct msm_queue_cmd {
struct list_head list_pict;
enum msm_queue type;
void *command;
int on_heap;
atomic_t on_heap;
struct timespec ts;
};

@@ -186,7 +187,7 @@ struct msm_control_device {
struct msm_device *pmsm;

/* Used for MSM_CAM_IOCTL_CTRL_CMD_DONE responses */
uint8_t ctrl_data[50];
uint8_t ctrl_data[max_control_command_size];
struct msm_ctrl_cmd ctrl;
struct msm_queue_cmd qcmd;

25 changes: 16 additions & 9 deletions arch/arm/mach-msm/include/mach/msm_rpc_version.h
Original file line number Diff line number Diff line change
@@ -93,11 +93,19 @@

#elif (CONFIG_MSM_AMSS_VERSION == 6355)
#define INT_ADSP INT_ADSP_A9_A11
#ifdef CONFIG_MSM_LEGACY_7X00A_AMSS
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#else
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010000"
#define RPC_ADSP_RTOS_ATOM_VERS MSM_RPC_VERS(1,0)
#endif
#define RPC_ADSP_RTOS_ATOM_VERS MSM_RPC_VERS(1,1)
#define RPC_ADSP_RTOS_MTOA_VERS MSM_RPC_VERS(2,1) /* actual ver*/
#define AUDMGR_VERS 0x10002 /* 65538 */
#ifdef CONFIG_MSM_LEGACY_7X00A_AMSS
#define AUDMGR_CB_VERS 0x10002 /* 65538 */
#else
#define AUDMGR_CB_VERS 0xf8e3e2d9
#endif
#define DOG_KEEPALIVE_VERS 0x10001 /* 65537 */
#define RPC_DOG_KEEPALIVE_BEACON 2
#define TIME_REMOTE_MTOA_VERS 0x10001 /* 65537 */
@@ -111,7 +119,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 4001)
#define INT_ADSP INT_ADSP_A9_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:71d1094b"
#define MSM_ADSP_DRIVER_NAME "rs3000000a:71d1094b"
#define RPC_ADSP_RTOS_ATOM_VERS 0x71d1094b /* 1909524811 */
#define RPC_ADSP_RTOS_MTOA_VERS 0xf2441eae /* 4064550574 */
#define AUDMGR_VERS 0xe94e8f0c /* 3914239756 */
@@ -126,7 +134,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 1320)
#define INT_ADSP INT_ADSP_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define RPC_ADSP_RTOS_ATOM_VERS 0x10001 /* 65537 */
#define RPC_ADSP_RTOS_MTOA_VERS 0x10001 /* 65537 */
#define AUDMGR_VERS 0x10001 /* 65537 */
@@ -141,7 +149,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 1330)
#define INT_ADSP INT_ADSP_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define RPC_ADSP_RTOS_ATOM_VERS 0x10001
#define RPC_ADSP_RTOS_MTOA_VERS 0x10001
#define AUDMGR_VERS 0x10002
@@ -156,7 +164,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 1340)
#define INT_ADSP INT_ADSP_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define RPC_ADSP_RTOS_ATOM_VERS 0x10001
#define RPC_ADSP_RTOS_MTOA_VERS 0x10001
#define AUDMGR_VERS 0x10002
@@ -171,7 +179,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 1355)
#define INT_ADSP INT_ADSP_A9_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010000"
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010000"
#define RPC_ADSP_RTOS_ATOM_VERS 0x10001
#define RPC_ADSP_RTOS_MTOA_VERS 0x10001
#define AUDMGR_VERS 0x10002
@@ -186,7 +194,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 4110)
#define INT_ADSP INT_ADSP_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define RPC_ADSP_RTOS_ATOM_VERS 0x10001
#define RPC_ADSP_RTOS_MTOA_VERS 0x20001
#define AUDMGR_VERS 0x10001
@@ -216,8 +224,7 @@

#elif (CONFIG_MSM_AMSS_VERSION == 4410)
#define INT_ADSP INT_ADSP_A9_A11
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define ADSP_DRIVER_NAME MSM_ADSP_DRIVER_NAME
#define MSM_ADSP_DRIVER_NAME "rs3000000a:00010001"
#define RPC_ADSP_RTOS_ATOM_VERS 0x10001
#define RPC_ADSP_RTOS_MTOA_VERS 0x20001
#define AUDMGR_VERS 0x10002
6 changes: 0 additions & 6 deletions arch/arm/mach-msm/include/mach/msm_rpcrouter.h
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@
#include <linux/list.h>
#include <linux/platform_device.h>

#if !defined(CONFIG_MSM_LEGACY_7X00A_AMSS)
/* RPC API version structure
* Version bit 31 : 1->hashkey versioning,
* 0->major-minor (backward compatible) versioning
@@ -45,11 +44,6 @@
#define MSM_RPC_GET_MAJOR(vers) (((vers) & RPC_VERSION_MAJOR_MASK) >> \
RPC_VERSION_MAJOR_OFFSET)
#define MSM_RPC_GET_MINOR(vers) ((vers) & RPC_VERSION_MINOR_MASK)
#else
#define MSM_RPC_VERS(major, minor) (major)
#define MSM_RPC_GET_MAJOR(vers) (vers)
#define MSM_RPC_GET_MINOR(vers) 0
#endif

struct msm_rpc_endpoint;

13 changes: 4 additions & 9 deletions arch/arm/mach-msm/pm.c
Original file line number Diff line number Diff line change
@@ -694,16 +694,11 @@ void msm_pm_flush_console(void)
static void msm_pm_restart(char str, const char *cmd)
{
msm_pm_flush_console();

/* If there's a hard reset hook and the restart_reason
* is the default, prefer that to the (slower) proc_comm
* reset command.
*/
if ((restart_reason == 0x776655AA) && msm_hw_reset_hook) {
msm_hw_reset_hook();
} else {
/* always reboot device through proc comm */
if (restart_reason == 0x6f656d99)
msm_proc_comm(PCOM_RESET_CHIP_IMM, &restart_reason, 0);
else
msm_proc_comm(PCOM_RESET_CHIP, &restart_reason, 0);
}
for (;;) ;
}

1 change: 1 addition & 0 deletions arch/arm/mach-msm/pwrtest.c
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
*
*/
#include <linux/gpio.h>
#include <linux/module.h>
#include "devices.h"
#include "proc_comm.h"

40 changes: 16 additions & 24 deletions arch/arm/mach-msm/qdsp5_comp/adsp.c
Original file line number Diff line number Diff line change
@@ -275,15 +275,6 @@ int msm_adsp_get(const char *name, struct msm_adsp_module **out,

mutex_lock(&module->lock);
pr_info("adsp: opening module %s\n", module->name);
if (module->open_count++ == 0 && module->clk)
clk_enable(module->clk);

mutex_lock(&adsp_open_lock);
if (adsp_open_count++ == 0) {
enable_irq(INT_ADSP);
prevent_suspend();
}
mutex_unlock(&adsp_open_lock);

if (module->ops) {
rc = -EBUSY;
@@ -310,14 +301,6 @@ int msm_adsp_get(const char *name, struct msm_adsp_module **out,
pr_info("adsp: module %s has been registered\n", module->name);

done:
mutex_lock(&adsp_open_lock);
if (rc && --adsp_open_count == 0) {
disable_irq(INT_ADSP);
allow_suspend();
}
if (rc && --module->open_count == 0 && module->clk)
clk_disable(module->clk);
mutex_unlock(&adsp_open_lock);
mutex_unlock(&module->lock);
return rc;
}
@@ -329,8 +312,6 @@ void msm_adsp_put(struct msm_adsp_module *module)
unsigned long flags;

mutex_lock(&module->lock);
if (--module->open_count == 0 && module->clk)
clk_disable(module->clk);
if (module->ops) {
pr_info("adsp: closing module %s\n", module->name);

@@ -349,11 +330,6 @@ void msm_adsp_put(struct msm_adsp_module *module)

msm_rpc_close(module->rpc_client);
module->rpc_client = 0;
if (--adsp_open_count == 0) {
disable_irq(INT_ADSP);
allow_suspend();
pr_info("adsp: disable interrupt\n");
}
} else {
pr_info("adsp: module %s is already closed\n", module->name);
}
@@ -1011,6 +987,13 @@ int msm_adsp_enable(struct msm_adsp_module *module)
module->name);
rc = -ETIMEDOUT;
}
if (module->open_count++ == 0 && module->clk)
clk_enable(module->clk);

mutex_lock(&adsp_open_lock);
if (adsp_open_count++ == 0)
enable_irq(INT_ADSP);
mutex_unlock(&adsp_open_lock);
break;
case ADSP_STATE_ENABLING:
pr_warning("adsp: module '%s' enable in progress\n",
@@ -1044,6 +1027,15 @@ static int msm_adsp_disable_locked(struct msm_adsp_module *module)
rc = rpc_adsp_rtos_app_to_modem(RPC_ADSP_RTOS_CMD_DISABLE,
module->id, module);
module->state = ADSP_STATE_DISABLED;
if (--module->open_count == 0 && module->clk)
clk_disable(module->clk);
mutex_lock(&adsp_open_lock);
if (--adsp_open_count == 0) {
disable_irq(INT_ADSP);
pr_info("disable interrupt\n");
}
mutex_unlock(&adsp_open_lock);
break;
}
return rc;
}
4 changes: 4 additions & 0 deletions arch/arm/mach-msm/qdsp5_comp/adsp_driver.c
Original file line number Diff line number Diff line change
@@ -304,6 +304,8 @@ static long adsp_write_cmd(struct adsp_device *adev, void __user *arg)
rc = -EINVAL;
goto end;
}
/* complete the writes to the buffer */
wmb();
rc = msm_adsp_write(adev->module, cmd.queue, cmd_data, cmd.len);
end:
mutex_unlock(&adev->module->pmem_regions_lock);
@@ -417,6 +419,8 @@ static long adsp_get_event(struct adsp_device *adev, void __user *arg)
rc = -ETOOSMALL;
goto end;
}
/* order the reads to the buffer */
rmb();
if (data->msg_id != EVENT_MSG_ID) {
if (copy_to_user((void *)(evt.data), data->data.msg16,
data->size)) {
184 changes: 84 additions & 100 deletions arch/arm/mach-msm/smd.c
Original file line number Diff line number Diff line change
@@ -201,9 +201,9 @@ static int smd_packet_write_avail(struct smd_channel *ch)

static int ch_is_open(struct smd_channel *ch)
{
return ((ch->recv->state == SMD_SS_OPENED) ||
(ch->recv->state == SMD_SS_FLUSHING)) &&
(ch->send->state == SMD_SS_OPENED);
return (ch->recv->state == SMD_SS_OPENED ||
ch->recv->state == SMD_SS_FLUSHING)
&& (ch->send->state == SMD_SS_OPENED);
}

/* provide a pointer and length to readable data in the fifo */
@@ -267,17 +267,18 @@ static void update_packet_state(struct smd_channel *ch)
int r;

/* can't do anything if we're in the middle of a packet */
if (ch->current_packet != 0)
return;
while (ch->current_packet == 0) {
/* discard 0 length packets if any */

/* don't bother unless we can get the full header */
if (smd_stream_read_avail(ch) < SMD_HEADER_SIZE)
return;
/* don't bother unless we can get the full header */
if (smd_stream_read_avail(ch) < SMD_HEADER_SIZE)
return;

r = ch_read(ch, hdr, SMD_HEADER_SIZE);
BUG_ON(r != SMD_HEADER_SIZE);
r = ch_read(ch, hdr, SMD_HEADER_SIZE);
BUG_ON(r != SMD_HEADER_SIZE);

ch->current_packet = hdr[0];
ch->current_packet = hdr[0];
}
}

/* provide a pointer and length to next free space in the fifo */
@@ -342,68 +343,57 @@ static void smd_state_change(struct smd_channel *ch,
switch (next) {
case SMD_SS_OPENING:
if (ch->send->state == SMD_SS_CLOSING ||
ch->send->state == SMD_SS_CLOSED) {
ch->send->state == SMD_SS_CLOSED) {
ch->recv->tail = 0;
ch->send->head = 0;
ch_set_state(ch, SMD_SS_OPENING);
}
break;
break;
case SMD_SS_OPENED:
/*
* heroc only set state/notified when
* state == SMD_SS_OPENING
*/
if (ch->send->state != SMD_SS_OPENED)
if (ch->send->state == SMD_SS_OPENING) {
ch_set_state(ch, SMD_SS_OPENED);
ch->notify(ch->priv, SMD_EVENT_OPEN);
ch->notify(ch->priv, SMD_EVENT_OPEN);
}
break;
case SMD_SS_FLUSHING:
case SMD_SS_RESET:
/* we should force them to close? */
break;
case SMD_SS_CLOSED:
if (ch->send->state == SMD_SS_OPENED) {
ch_set_state(ch, SMD_SS_CLOSING);
ch->notify(ch->priv, SMD_EVENT_CLOSE);
}
break;
case SMD_SS_FLUSHING:
case SMD_SS_RESET:
/* we should force them to close? */
/* Heroc kernel doesn't have this fall
through */
default:
ch->notify(ch->priv, SMD_EVENT_CLOSE);
}
}

static void handle_smd_irq(struct list_head *list, void (*notify)(void))
{
unsigned long flags;
struct smd_channel *ch;
int do_notify = 0;
unsigned ch_flags;
unsigned tmp;
#ifdef CONFIG_BUILD_CIQ
/* put here to make sure we got the disable/enable index */
if (!msm_smd_ciq_info)
msm_smd_ciq_info = (*(volatile uint32_t *)(MSM_SHARED_RAM_BASE + 0xFC11C));
/* put here to make sure we got the disable/enable index */
if (!msm_smd_ciq_info)
msm_smd_ciq_info = (*(volatile uint32_t *)(MSM_SHARED_RAM_BASE + 0xFC11C));
#endif

spin_lock_irqsave(&smd_lock, flags);
list_for_each_entry(ch, list, ch_list) {
ch_flags = 0;
if (ch_is_open(ch)) {
if (ch->recv->fHEAD) {
ch->recv->fHEAD = 0;
ch_flags |= 1;
do_notify |= 1;
}
if (ch->recv->fTAIL) {
ch->recv->fTAIL = 0;
ch_flags |= 2;
do_notify |= 1;
}
if (ch->recv->fSTATE) {
ch->recv->fSTATE = 0;
ch_flags |= 4;
do_notify |= 1;
}
}
tmp = ch->recv->state;
@@ -414,8 +404,6 @@ static void handle_smd_irq(struct list_head *list, void (*notify)(void))
ch->notify(ch->priv, SMD_EVENT_DATA);
}
}
if (do_notify)
notify();
spin_unlock_irqrestore(&smd_lock, flags);
do_smd_probe();
}
@@ -426,14 +414,13 @@ static irqreturn_t smd_modem_irq_handler(int irq, void *data)
return IRQ_HANDLED;
}

/* Heroc includes this unconditionally? */
//#if defined(CONFIG_QDSP6)
#if defined(CONFIG_QDSP6)
static irqreturn_t smd_dsp_irq_handler(int irq, void *data)
{
handle_smd_irq(&smd_ch_list_dsp, notify_dsp_smd);
return IRQ_HANDLED;
}
//#endif
#endif

static void smd_fake_irq_handler(unsigned long arg)
{
@@ -514,12 +501,12 @@ static int smd_is_packet(int chn, unsigned type)

/* older AMSS reports SMD_KIND_UNKNOWN always */
#if defined(CONFIG_ARCH_MSM7225)
if (chn == 1)
return 0;
if (chn == 1)
return 0;
#endif
#ifdef CONFIG_BUILD_CIQ
if (chn == 26)
return 0;
if (chn == 26)
return 0;
#endif
if ((chn > 4) || (chn == 1))
return 1;
@@ -536,6 +523,8 @@ static int smd_stream_write(smd_channel_t *ch, const void *_data, int len)

if (len < 0)
return -EINVAL;
else if (len == 0)
return 0;

while ((xfer = ch_write_buffer(ch, &ptr)) != 0) {
if (!ch_is_open(ch))
@@ -550,7 +539,8 @@ static int smd_stream_write(smd_channel_t *ch, const void *_data, int len)
break;
}

ch->notify_other_cpu();
if (orig_len - len)
ch->notify_other_cpu();

return orig_len - len;
}
@@ -559,8 +549,10 @@ static int smd_packet_write(smd_channel_t *ch, const void *_data, int len)
{
unsigned hdr[5];

if (len <= 0)
if (len < 0)
return -EINVAL;
else if (len == 0)
return 0;

if (smd_stream_write_avail(ch) < (len + SMD_HEADER_SIZE))
return -ENOMEM;
@@ -610,7 +602,6 @@ static int smd_packet_read(smd_channel_t *ch, void *data, int len)

return r;
}
//This will need testing on a lot of systems... drastic change
#ifdef CONFIG_MSM_SMD_PKG3
/*
* This allocator assumes an SMD Package v3 which only exists on
@@ -619,10 +610,10 @@ static int smd_packet_read(smd_channel_t *ch, void *data, int len)
static inline int smd_alloc_channel_for_package_version(struct smd_channel *ch)
{
struct smd_shared_v1 *shared1;

shared1 = smem_alloc(ID_SMD_CHANNELS + ch->n, sizeof(*shared1));
if (!shared1) {
pr_err("smd_alloc_channel() cid %d does not exist\n", ch->n);
pr_err("[SMD]smd_alloc_channel(): cid %d does not exist\n", ch->n);
return -1;
}
ch->send = &shared1->ch0;
@@ -642,12 +633,18 @@ static inline int smd_alloc_channel_for_package_version(struct smd_channel *ch)
struct smd_shared_v2 *shared2;
void *buffer;
unsigned buffer_sz;

shared2 = smem_alloc(SMEM_SMD_BASE_ID + ch->n, sizeof(*shared2));
if (!shared2) {
pr_err("[SMD]smd_alloc_channel(): cid %d does not exist\n", ch->n);
return -1;
}
buffer = smem_item(SMEM_SMD_FIFO_BASE_ID + ch->n, &buffer_sz);

if (!buffer)
if (!buffer) {
pr_err("[SMD]smd_alloc_channel(): ch%d buffer allocate fail\n", ch->n);
return -1;
}

/* buffer must be a power-of-two size */
if (buffer_sz & (buffer_sz - 1))
@@ -662,8 +659,8 @@ static inline int smd_alloc_channel_for_package_version(struct smd_channel *ch)
return 0;
}
#endif /* CONFIG_MSM_SMD_PKG3 */
static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)

static unsigned smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
{
struct smd_channel *ch;

@@ -680,9 +677,9 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
}

ch->fifo_mask = ch->fifo_size - 1;
ch->type = type;
ch->type = type & SMD_TYPE_MASK;

if ((type & SMD_TYPE_MASK) == SMD_TYPE_APPS_MODEM)
if (ch->type == SMD_TYPE_APPS_MODEM)
ch->notify_other_cpu = notify_modem_smd;
else
ch->notify_other_cpu = notify_dsp_smd;
@@ -701,14 +698,16 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
ch->update_state = update_stream_state;
}

if ((type & SMD_TYPE_MASK) == SMD_TYPE_APPS_MODEM)
if (ch->type == SMD_TYPE_APPS_MODEM)
memcpy(ch->name, "SMD_", 4);
else
memcpy(ch->name, "DSP_", 4);

memcpy(ch->name + 4, name, 20);
ch->name[23] = 0;

ch->pdev.name = ch->name;
ch->pdev.id = ch->type & SMD_TYPE_MASK;
ch->pdev.id = ch->type;

pr_info("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
ch->n, ch->fifo_size, ch->name);
@@ -807,29 +806,14 @@ int smd_open(const char *name, smd_channel_t **_ch,

spin_lock_irqsave(&smd_lock, flags);

if ((ch->type & SMD_TYPE_MASK) == SMD_TYPE_APPS_MODEM)
if (ch->type == SMD_TYPE_APPS_MODEM)
list_add(&ch->ch_list, &smd_ch_list_modem);
else
list_add(&ch->ch_list, &smd_ch_list_dsp);

// smd_state_change(ch, ch->last_state, SMD_SS_OPENING);

/* If the remote side is CLOSING, we need to get it to
* move to OPENING (which we'll do by moving from CLOSED to
* OPENING) and then get it to move from OPENING to
* OPENED (by doing the same state change ourselves).
*
* Otherwise, it should be OPENING and we can move directly
* to OPENED so that it will follow.
*/
if (ch->recv->state == SMD_SS_CLOSING) {
ch->send->head = 0;
ch_set_state(ch, SMD_SS_OPENING);
} else {
ch_set_state(ch, SMD_SS_OPENED);
}
smd_state_change(ch, ch->last_state, SMD_SS_OPENING);

spin_unlock_irqrestore(&smd_lock, flags);
smd_kick(ch);

return 0;
}
@@ -901,22 +885,22 @@ int smd_wait_until_writable(smd_channel_t *ch, int bytes)

int smd_wait_until_opened(smd_channel_t *ch, int timeout_us)
{
#define POLL_INTERVAL_USEC 200
int count = 0;
#define POLL_INTERVAL_USEC 200
int count = 0;

if (timeout_us)
count = timeout_us / (POLL_INTERVAL_USEC + 1) + 1;
if (timeout_us)
count = timeout_us / (POLL_INTERVAL_USEC + 1) + 1;

do {
if (ch_is_open(ch))
return 0;
if (count--)
udelay(POLL_INTERVAL_USEC);
else
break;
} while (1);
do {
if (ch_is_open(ch))
return 0;
if (count--)
udelay(POLL_INTERVAL_USEC);
else
break;
} while (1);

return -1;
return -1;
}

int smd_cur_packet_size(smd_channel_t *ch)
@@ -993,9 +977,9 @@ static irqreturn_t smsm_irq_handler(int irq, void *data)
int smsm_change_state(enum smsm_state_item item,
uint32_t clear_mask, uint32_t set_mask)
{
unsigned long addr = smd_info.state + item * 4;
unsigned long flags;
unsigned state;
unsigned addr = smd_info.state + item * 4;

if (!smd_info.ready)
return -EIO;
@@ -1054,18 +1038,18 @@ int smsm_set_sleep_duration(uint32_t delay)

int smsm_set_sleep_limit(uint32_t sleep_limit)
{
struct msm_dem_slave_data *ptr;
struct msm_dem_slave_data *ptr;

ptr = smem_find(SMEM_APPS_DEM_SLAVE_DATA, sizeof(*ptr));
if (ptr == NULL) {
pr_err("smsm_set_sleep_limit <SM NO APPS_DEM_SLAVE_DATA>\n");
return -EIO;
}
if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
pr_info("smsm_set_sleep_limit %d -> %d\n",
ptr->resources_used, sleep_limit);
ptr->resources_used = sleep_limit;
return 0;
ptr = smem_find(SMEM_APPS_DEM_SLAVE_DATA, sizeof(*ptr));
if (ptr == NULL) {
pr_err("smsm_set_sleep_limit <SM NO APPS_DEM_SLAVE_DATA>\n");
return -EIO;
}
if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
pr_info("smsm_set_sleep_limit %d -> %d\n",
ptr->resources_used, sleep_limit);
ptr->resources_used = sleep_limit;
return 0;
}

#else
@@ -1088,7 +1072,7 @@ int smsm_set_sleep_duration(uint32_t delay)

inline int smsm_set_sleep_limit(uint32_t sleep_limit)
{
return 0;
return 0;
}

#endif
14 changes: 13 additions & 1 deletion arch/arm/mach-msm/smd_qmi.c
Original file line number Diff line number Diff line change
@@ -324,6 +324,18 @@ static void qmi_process_unicast_wds_msg(struct qmi_ctxt *ctxt,
if (qmi_get_status(msg, &err)) {
printk(KERN_ERR
"qmi: wds: network start failed (%04x)\n", err);
if (msg->size == 0x000c && (msg->tlv)[10] == 0x0b) {
printk(KERN_ERR
"qmi: wds: pdp activation collided with CCFC\n");
ctxt->state = STATE_OFFLINE;
ctxt->state_dirty = 1;
}
if (msg->size == 0x000c && (msg->tlv)[10] == 0x0c) {
printk(KERN_ERR
"qmi: wds: pdp activation failed. Cause: Operator-determined barring\n");
ctxt->state = STATE_OFFLINE;
ctxt->state_dirty = 1;
}
} else if (qmi_get_tlv(msg, 0x01, sizeof(ctxt->wds_handle), &ctxt->wds_handle)) {
printk(KERN_INFO
"qmi: wds no handle?\n");
@@ -648,7 +660,7 @@ static int qmi_print_state(struct qmi_ctxt *ctxt, char *buf, int max)
}

i = scnprintf(buf, max, "STATE=%s\n", statename);
i += scnprintf(buf + i, max - i, "CID=%d\n",ctxt->misc.minor); //wds_client_id);
i += scnprintf(buf + i, max - i, "CID=%d\n",ctxt->misc.minor);

if (ctxt->state != STATE_ONLINE){
return i;
183 changes: 81 additions & 102 deletions arch/arm/mach-msm/smd_rpcrouter.c
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ static struct wake_lock rpcrouter_wake_lock;
static int rpcrouter_need_len;

static atomic_t next_xid = ATOMIC_INIT(1);
static atomic_t next_mid = ATOMIC_INIT(0);
static uint8_t next_pacmarkid;

static void do_read_data(struct work_struct *work);
static void do_create_pdevs(struct work_struct *work);
@@ -118,6 +118,9 @@ static atomic_t rpcrouter_pdev_created = ATOMIC_INIT(0);
#define RR_STATE_BODY 2
#define RR_STATE_ERROR 3

#define RMT_STORAGE_APIPROG_BE32 0xa7000030
#define RMT_STORAGE_SRV_APIPROG_BE32 0x9c000030

struct rr_context {
struct rr_packet *pkt;
uint8_t *ptr;
@@ -254,17 +257,14 @@ struct msm_rpc_endpoint *msm_rpcrouter_create_local_endpoint(dev_t dev)
{
struct msm_rpc_endpoint *ept;
unsigned long flags;
int i;

ept = kmalloc(sizeof(struct msm_rpc_endpoint), GFP_KERNEL);
if (!ept)
return NULL;
memset(ept, 0, sizeof(struct msm_rpc_endpoint));

/* mark no reply outstanding */
ept->next_rroute = 0;
for (i = 0; i < MAX_REPLY_ROUTE; i++)
ept->rroute[i].pid = 0xffffffff;
ept->reply_pid = 0xffffffff;

ept->cid = (uint32_t) ept;
ept->pid = RPCROUTER_PID_LOCAL;
@@ -641,7 +641,7 @@ static void do_read_data(struct work_struct *work)

hdr.size -= sizeof(pm);

frag = rr_malloc(sizeof(*frag));
frag = rr_malloc(hdr.size + sizeof(*frag));
frag->next = NULL;
frag->length = hdr.size;
if (rr_read(frag->data, hdr.size)) {
@@ -749,69 +749,27 @@ int msm_rpc_close(struct msm_rpc_endpoint *ept)
}
EXPORT_SYMBOL(msm_rpc_close);

static int msm_rpc_write_pkt(struct msm_rpc_endpoint *ept,
struct rr_remote_endpoint *r_ept,
struct rr_header *hdr,
uint32_t pacmark,
void *buffer, int count)
{
DEFINE_WAIT(__wait);
unsigned long flags;
int needed;

for (;;) {
prepare_to_wait(&r_ept->quota_wait, &__wait,
TASK_INTERRUPTIBLE);
spin_lock_irqsave(&r_ept->quota_lock, flags);
if (r_ept->tx_quota_cntr < RPCROUTER_DEFAULT_RX_QUOTA)
break;
if (signal_pending(current) &&
(!(ept->flags & MSM_RPC_UNINTERRUPTIBLE)))
break;
spin_unlock_irqrestore(&r_ept->quota_lock, flags);
schedule();
}
finish_wait(&r_ept->quota_wait, &__wait);

if (signal_pending(current) &&
(!(ept->flags & MSM_RPC_UNINTERRUPTIBLE))) {
spin_unlock_irqrestore(&r_ept->quota_lock, flags);
return -ERESTARTSYS;
}
r_ept->tx_quota_cntr++;
if (r_ept->tx_quota_cntr == RPCROUTER_DEFAULT_RX_QUOTA)
hdr->confirm_rx = 1;

spin_unlock_irqrestore(&r_ept->quota_lock, flags);

spin_lock_irqsave(&smd_lock, flags);

needed = sizeof(*hdr) + hdr->size;
while (smd_write_avail(smd_channel) < needed) {
spin_unlock_irqrestore(&smd_lock, flags);
msleep(250);
spin_lock_irqsave(&smd_lock, flags);
}

/* TODO: deal with full fifo */
smd_write(smd_channel, hdr, sizeof(*hdr));
smd_write(smd_channel, &pacmark, sizeof(pacmark));
smd_write(smd_channel, buffer, count);

spin_unlock_irqrestore(&smd_lock, flags);

return 0;
}

int msm_rpc_write(struct msm_rpc_endpoint *ept, void *buffer, int count)
{
struct rr_header hdr;
uint32_t pacmark;
uint32_t mid;
struct rpc_request_hdr *rq = buffer;
struct rr_remote_endpoint *r_ept;
int ret;
int total;
unsigned long flags;
int needed;
DEFINE_WAIT(__wait);

if (((rq->prog&0xFFFFFFF0) == RMT_STORAGE_APIPROG_BE32) ||
((rq->prog&0xFFFFFFF0) == RMT_STORAGE_SRV_APIPROG_BE32)) {
printk(KERN_DEBUG
"rpc_write: prog = %x , procedure = %d, type = %d, xid = %d\n"
, be32_to_cpu(rq->prog), be32_to_cpu(rq->procedure)
, be32_to_cpu(rq->type), be32_to_cpu(rq->xid));
}

/* TODO: fragmentation for large outbound packets */
if (count > (RPCROUTER_MSGSIZE_MAX - sizeof(uint32_t)) || !count)
return -EINVAL;

/* snoop the RPC packet and enforce permissions */

@@ -859,21 +817,23 @@ int msm_rpc_write(struct msm_rpc_endpoint *ept, void *buffer, int count)
} else {
/* RPC REPLY */
/* TODO: locking */
for (ret = 0; ret < MAX_REPLY_ROUTE; ret++)
if (ept->rroute[ret].xid == rq->xid) {
if (ept->rroute[ret].pid == 0xffffffff)
continue;
hdr.dst_pid = ept->rroute[ret].pid;
hdr.dst_cid = ept->rroute[ret].cid;
/* consume this reply */
ept->rroute[ret].pid = 0xffffffff;
goto found_rroute;
}
if (ept->reply_pid == 0xffffffff) {
printk(KERN_ERR
"rr_write: rejecting unexpected reply\n");
return -EINVAL;
}
if (ept->reply_xid != rq->xid) {
printk(KERN_ERR
"rr_write: rejecting packet w/ bad xid\n");
return -EINVAL;
}

printk(KERN_ERR "rr_write: rejecting packet w/ bad xid\n");
return -EINVAL;
hdr.dst_pid = ept->reply_pid;
hdr.dst_cid = ept->reply_cid;

/* consume this reply */
ept->reply_pid = 0xffffffff;

found_rroute:
IO("REPLY on ept %p to xid=%d @ %d:%08x (%d bytes)\n",
ept,
be32_to_cpu(rq->xid), hdr.dst_pid, hdr.dst_cid, count);
@@ -893,36 +853,56 @@ int msm_rpc_write(struct msm_rpc_endpoint *ept, void *buffer, int count)
hdr.version = RPCROUTER_VERSION;
hdr.src_pid = ept->pid;
hdr.src_cid = ept->cid;
hdr.confirm_rx = 0;
hdr.size = count + sizeof(uint32_t);

total = count;
for (;;) {
prepare_to_wait(&r_ept->quota_wait, &__wait,
TASK_INTERRUPTIBLE);
spin_lock_irqsave(&r_ept->quota_lock, flags);
if (r_ept->tx_quota_cntr < RPCROUTER_DEFAULT_RX_QUOTA)
break;
if (signal_pending(current) &&
(!(ept->flags & MSM_RPC_UNINTERRUPTIBLE)))
break;
spin_unlock_irqrestore(&r_ept->quota_lock, flags);
schedule();
}
finish_wait(&r_ept->quota_wait, &__wait);

mid = atomic_add_return(1, &next_mid) & 0xFF;
if (signal_pending(current) &&
(!(ept->flags & MSM_RPC_UNINTERRUPTIBLE))) {
spin_unlock_irqrestore(&r_ept->quota_lock, flags);
return -ERESTARTSYS;
}
r_ept->tx_quota_cntr++;
if (r_ept->tx_quota_cntr == RPCROUTER_DEFAULT_RX_QUOTA)
hdr.confirm_rx = 1;

while (count > 0) {
unsigned xfer;
/* bump pacmark while interrupts disabled to avoid race
* probably should be atomic op instead
*/
pacmark = PACMARK(count, ++next_pacmarkid, 0, 1);

if (count > RPCROUTER_DATASIZE_MAX)
xfer = RPCROUTER_DATASIZE_MAX;
else
xfer = count;
spin_unlock_irqrestore(&r_ept->quota_lock, flags);

hdr.confirm_rx = 0;
hdr.size = xfer + sizeof(uint32_t);
spin_lock_irqsave(&smd_lock, flags);

/* total == count -> must be first packet
* xfer == count -> must be last packet
*/
pacmark = PACMARK(xfer, mid, (total == count), (xfer == count));
needed = sizeof(hdr) + hdr.size;
while (smd_write_avail(smd_channel) < needed) {
spin_unlock_irqrestore(&smd_lock, flags);
msleep(250);
spin_lock_irqsave(&smd_lock, flags);
}

ret = msm_rpc_write_pkt(ept, r_ept, &hdr, pacmark, buffer, xfer);
if (ret < 0)
return ret;
/* TODO: deal with full fifo */
smd_write(smd_channel, &hdr, sizeof(hdr));
smd_write(smd_channel, &pacmark, sizeof(pacmark));
smd_write(smd_channel, buffer, count);

buffer += xfer;
count -= xfer;
}
spin_unlock_irqrestore(&smd_lock, flags);

return total;
return count;
}
EXPORT_SYMBOL(msm_rpc_write);

@@ -1129,15 +1109,14 @@ int __msm_rpc_read(struct msm_rpc_endpoint *ept,
be32_to_cpu(rq->procedure),
be32_to_cpu(rq->xid));
/* RPC CALL */
if (ept->rroute[ept->next_rroute].pid != 0xffffffff) {
if (ept->reply_pid != 0xffffffff) {
printk(KERN_WARNING
"rr_read: lost previous reply xid...\n");
}
/* TODO: locking? */
ept->rroute[ept->next_rroute].pid = pkt->hdr.src_pid;
ept->rroute[ept->next_rroute].cid = pkt->hdr.src_cid;
ept->rroute[ept->next_rroute].xid = rq->xid;
ept->next_rroute = (ept->next_rroute + 1) & (MAX_REPLY_ROUTE - 1);
ept->reply_pid = pkt->hdr.src_pid;
ept->reply_cid = pkt->hdr.src_cid;
ept->reply_xid = rq->xid;
}
#if TRACE_RPC_MSG
else if ((rc >= (sizeof(uint32_t) * 3)) && (rq->type == 1))
21 changes: 8 additions & 13 deletions arch/arm/mach-msm/smd_rpcrouter.h
Original file line number Diff line number Diff line change
@@ -136,14 +136,6 @@ struct rr_remote_endpoint {
struct list_head list;
};

struct msm_reply_route {
uint32_t xid;
uint32_t pid;
uint32_t cid;
uint32_t unused;
};

#define MAX_REPLY_ROUTE 4

struct msm_rpc_endpoint {
struct list_head list;
@@ -171,12 +163,15 @@ struct msm_rpc_endpoint {
uint32_t dst_prog; /* be32 */
uint32_t dst_vers; /* be32 */

/* RPC_REPLY writes must be routed to the pid/cid of the
* RPC_CALL they are in reply to. Keep a cache of valid
* xid/pid/cid groups. pid 0xffffffff -> not valid.
/* reply remote address
* if reply_pid == 0xffffffff, none available
* RPC_REPLY writes may only go to the pid/cid/xid of the
* last RPC_CALL we received.
*/
unsigned next_rroute;
struct msm_reply_route rroute[MAX_REPLY_ROUTE];
uint32_t reply_pid;
uint32_t reply_cid;
uint32_t reply_xid; /* be32 */
uint32_t next_pm; /* Pacmark sequence */

/* device node if this endpoint is accessed via userspace */
dev_t dev;
32 changes: 5 additions & 27 deletions arch/arm/mach-msm/smd_rpcrouter_device.c
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Riemer: added (naughty hack) support for qdsp for the hero
*/
#include <linux/module.h>
#include <linux/kernel.h>
@@ -296,36 +295,15 @@ int msm_rpcrouter_create_server_cdev(struct rr_server *server)
*/
int msm_rpcrouter_create_server_pdev(struct rr_server *server)
{
uint32_t dev_vers;

sprintf(server->pdev_name, "rs%.8x:%.8x",
server->prog,
#if !defined(CONFIG_MSM_LEGACY_7X00A_AMSS)
// Riemer:
// To fix qdsp on hero, we need to have an exclude list
// These are then passed directly to the sprintf
// Without any masking going on
switch( server->prog)
{
case 0x3000000a:
case 0x3000000b:
dev_vers = server->vers;
//printk(KERN_DEBUG "Found an exclude device\n");
break;
// Normal treatment
default:
dev_vers =
(server->vers & RPC_VERSION_MODE_MASK) ? server->vers :
(server->vers & RPC_VERSION_MAJOR_MASK);
break;
}
(server->vers & RPC_VERSION_MODE_MASK) ? server->vers :
(server->vers & RPC_VERSION_MAJOR_MASK));
#else
dev_vers = server->vers;
server->vers);
#endif

sprintf(server->pdev_name, "rs%.8x:%.8x",
server->prog, dev_vers);

printk(KERN_INFO "Registered device: %s\n", server->pdev_name);

server->p_device.base.id = -1;
server->p_device.base.name = server->pdev_name;

37 changes: 21 additions & 16 deletions arch/arm/mach-msm/smd_tty.c
Original file line number Diff line number Diff line change
@@ -78,8 +78,8 @@ static void smd_tty_work_func(struct work_struct *work)
unsigned char *ptr;
int avail;
struct smd_tty_info *info = container_of(work,
struct smd_tty_info,
tty_work);//priv;
struct smd_tty_info,
tty_work);
struct tty_struct *tty = info->tty;

if (!tty)
@@ -90,11 +90,12 @@ static void smd_tty_work_func(struct work_struct *work)

mutex_lock(&smd_tty_lock);
for (;;) {
if (test_bit(TTY_THROTTLED, &tty->flags)) break;
if (test_bit(TTY_THROTTLED, &tty->flags))
break;

if (info->ch == 0) {
printk(KERN_ERR "smd_tty_work_func: info->ch null\n");
break;
break;
}

avail = smd_read_avail(info->ch);
@@ -105,13 +106,15 @@ static void smd_tty_work_func(struct work_struct *work)
break;
}

ptr = NULL;
avail = tty_prepare_flip_string(tty, &ptr, avail);

if (avail && ptr) {
if (smd_read(info->ch, ptr, avail) != avail) {
/* shouldn't be possible since we're in interrupt
** context here and nobody else could 'steal' our
** characters.
*/
* context here and nobody else could 'steal' our
* characters.
*/
printk(KERN_ERR "OOPS - smd_tty_buffer mismatch?!");
}

@@ -129,12 +132,12 @@ static void smd_tty_work_func(struct work_struct *work)

static void smd_tty_notify(void *priv, unsigned event)
{
struct smd_tty_info *info = priv;
struct smd_tty_info *info = priv;

if (event != SMD_EVENT_DATA)
return;
if (event != SMD_EVENT_DATA)
return;

queue_work(smd_tty_wq, &info->tty_work);
queue_work(smd_tty_wq, &info->tty_work);
}

static int smd_tty_open(struct tty_struct *tty, struct file *f)
@@ -157,10 +160,10 @@ static int smd_tty_open(struct tty_struct *tty, struct file *f)
info = smd_tty + n;

mutex_lock(&smd_tty_lock);
wake_lock_init(&info->wake_lock, WAKE_LOCK_SUSPEND, name);
tty->driver_data = info;

if (info->open_count++ == 0) {
wake_lock_init(&info->wake_lock, WAKE_LOCK_SUSPEND, name);
info->tty = tty;
if (info->ch) {
smd_kick(info->ch);
@@ -179,6 +182,8 @@ static void smd_tty_close(struct tty_struct *tty, struct file *f)

if (info == 0)
return;
/* wait for the work in workqueue to complete */
flush_work(&info->tty_work);

mutex_lock(&smd_tty_lock);
if (--info->open_count == 0) {
@@ -248,14 +253,14 @@ static int __init smd_tty_init(void)
int ret, i;

smd_tty_wq = create_singlethread_workqueue("smd_tty");
if (smd_tty_wq == 0)
return -ENOMEM;
if (smd_tty_wq == 0)
return -ENOMEM;

smd_tty_driver = alloc_tty_driver(MAX_SMD_TTYS);
if (smd_tty_driver == 0){
if (smd_tty_driver == 0) {
destroy_workqueue(smd_tty_wq);
return -ENOMEM;
}
}

smd_tty_driver->owner = THIS_MODULE;
smd_tty_driver->driver_name = "smd_tty_driver";
14 changes: 12 additions & 2 deletions camera_bug
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ Kernel: 2.6.35.10,

**Camera Problems**

March 2, 2011.
March 2, 2011. Matteo Benetti (MrBang)

Booted my Hero with kernel builded on hero_defconf config file.
Speed issue (cpu freq), bad screen on/off (power management).
@@ -40,7 +40,8 @@ Kernel: 2.6.35.10,
by missing header and/or minor porting errors.


March 3, 2011.

March 3, 2011. Matteo Benetti (MrBang)

Into drivers/i2c/busses/i2c-msm.c from legend there is an include
that isn't into cm-kernel:
@@ -61,7 +62,16 @@ Kernel: 2.6.35.10,



March 21, 2011. Riemer van der Zee

i2c problems are caused as I disabled the AF acuator earlier.
It seems with disabling this device, it is sometimes able to take a picture.
However disabling it, also disables the focusing a little.
I have reverted the driver totally to act like the original .29 HTC Hero drv

The problem seems to be somekind of timing problem or so?
Another possible lead is that it reports the gain and/or line is zero?
Getting quite clueless actually...

April 4, 2011. Riemer van der Zee

56 changes: 32 additions & 24 deletions drivers/cpufreq/cpufreq_smartass.c
Original file line number Diff line number Diff line change
@@ -26,17 +26,13 @@
#include <linux/cpu.h>
#include <linux/cpumask.h>
#include <linux/cpufreq.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/tick.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/kthread.h>

#include <linux/moduleparam.h>
#include <linux/earlysuspend.h>

#include <asm/cputime.h>
#include <linux/earlysuspend.h>

static void (*pm_idle_old)(void);
static atomic_t active_count = ATOMIC_INIT(0);
@@ -77,13 +73,13 @@ static unsigned long debug_mask;
/*
* The minimum amount of time to spend at a frequency before we can ramp up.
*/
#define DEFAULT_UP_RATE_US 12000;
#define DEFAULT_UP_RATE_US 24000;
static unsigned long up_rate_us;

/*
* The minimum amount of time to spend at a frequency before we can ramp down.
*/
#define DEFAULT_DOWN_RATE_US 24000;
#define DEFAULT_DOWN_RATE_US 49000;
static unsigned long down_rate_us;

/*
@@ -99,14 +95,14 @@ static unsigned int up_min_freq;
* to minimize wakeup issues.
* Set sleep_max_freq=0 to disable this behavior.
*/
#define DEFAULT_SLEEP_MAX_FREQ CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN
#define DEFAULT_SLEEP_MAX_FREQ 352000
static unsigned int sleep_max_freq;

/*
* The frequency to set when waking up from sleep.
* When sleep_max_freq=0 this will have no effect.
*/
#define DEFAULT_SLEEP_WAKEUP_FREQ CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX
#define DEFAULT_SLEEP_WAKEUP_FREQ 999999
static unsigned int sleep_wakeup_freq;

/*
@@ -224,8 +220,17 @@ static void cpufreq_smartass_timer(unsigned long data)

this_smartass->cur_cpu_load = cpu_load;

// Scale up if load is above max or if there where no idle cycles since coming out of idle.
if (cpu_load > max_cpu_load || delta_idle == 0) {
// Scale up if load is above max or if there where no idle cycles since coming out of idle,
// or when we are above our max speed for a very long time (should only happend if entering sleep
// at high loads)
if ((cpu_load > max_cpu_load || delta_idle == 0) &&
!(policy->cur > this_smartass->max_speed &&
cputime64_sub(update_time, this_smartass->freq_change_time) > 100*down_rate_us)) {

if (policy->cur > this_smartass->max_speed) {
reset_timer(data,this_smartass);
}

if (policy->cur == policy->max)
return;

@@ -643,44 +648,47 @@ static void smartass_suspend(int cpu, int suspend)
return;

smartass_update_min_max(this_smartass,policy,suspend);
if (suspend) {
if (policy->cur > this_smartass->max_speed) {
new_freq = this_smartass->max_speed;

if (debug_mask & SMARTASS_DEBUG_JUMPS)
printk(KERN_INFO "SmartassS: suspending at %d\n",new_freq);

__cpufreq_driver_target(policy, new_freq,
CPUFREQ_RELATION_H);
}
} else { // resume at max speed:
if (!suspend) { // resume at max speed:
new_freq = validate_freq(this_smartass,sleep_wakeup_freq);

if (debug_mask & SMARTASS_DEBUG_JUMPS)
printk(KERN_INFO "SmartassS: awaking at %d\n",new_freq);

__cpufreq_driver_target(policy, new_freq,
CPUFREQ_RELATION_L);

if (policy->cur < this_smartass->max_speed && !timer_pending(&this_smartass->timer))
reset_timer(smp_processor_id(),this_smartass);
} else {
// to avoid wakeup issues with quick sleep/wakeup don't change actual frequency when entering sleep
// to allow some time to settle down.
// we reset the timer, if eventually, even at full load the timer will lower the freqeuncy.
reset_timer(smp_processor_id(),this_smartass);

this_smartass->freq_change_time_in_idle =
get_cpu_idle_time_us(cpu,&this_smartass->freq_change_time);

if (debug_mask & SMARTASS_DEBUG_JUMPS)
printk(KERN_INFO "SmartassS: suspending at %d\n",policy->cur);
}
}

static void smartass_early_suspend(struct early_suspend *handler) {
int i;
suspended = 1;
for_each_online_cpu(i)
smartass_suspend(i,1);
}

static void smartass_late_resume(struct early_suspend *handler) {
int i;
suspended = 0;
for_each_online_cpu(i)
smartass_suspend(i,0);
}

static struct early_suspend smartass_power_suspend = {
.suspend = smartass_early_suspend,
.resume = smartass_late_resume,
.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1,
};

static int __init cpufreq_smartass_init(void)
9 changes: 5 additions & 4 deletions drivers/gpu/drm/radeon/rv770.c
Original file line number Diff line number Diff line change
@@ -627,10 +627,11 @@ static void rv770_gpu_init(struct radeon_device *rdev)
else
gb_tiling_config |= BANK_TILING((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT);
rdev->config.rv770.tiling_nbanks = 4 << ((gb_tiling_config >> 4) & 0x3);

gb_tiling_config |= GROUP_SIZE(0);
rdev->config.rv770.tiling_group_size = 256;

gb_tiling_config |= GROUP_SIZE((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT);
if ((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT)
rdev->config.rv770.tiling_group_size = 512;
else
rdev->config.rv770.tiling_group_size = 256;
if (((mc_arb_ramcfg & NOOFROWS_MASK) >> NOOFROWS_SHIFT) > 3) {
gb_tiling_config |= ROW_TILING(3);
gb_tiling_config |= SAMPLE_SPLIT(3);
66 changes: 55 additions & 11 deletions drivers/i2c/busses/i2c-msm.c
Original file line number Diff line number Diff line change
@@ -24,9 +24,9 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/wakelock.h>
#include <mach/system.h>
/* new */
#include <linux/slab.h>
#include <mach/system.h>

#define DEBUG 0

enum {
@@ -77,8 +77,10 @@ struct msm_i2c_dev {
int flush_cnt;
void *complete;
struct wake_lock wakelock;
bool is_suspended;
int clk_drv_str;
int dat_drv_str;
int skip_recover;
};

#if DEBUG
@@ -336,17 +338,24 @@ msm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
long timeout;
unsigned long flags;

wake_lock(&dev->wakelock);
/*
* If there is an i2c_xfer after driver has been suspended,
* grab wakelock to abort suspend.
*/
if (dev->is_suspended)
wake_lock(&dev->wakelock);
clk_enable(dev->clk);
enable_irq(dev->irq);

ret = msm_i2c_poll_notbusy(dev, 1);
if (ret) {
dev_err(dev->dev, "Still busy in starting xfer(%02X)\n",
msgs->addr);
ret = msm_i2c_recover_bus_busy(dev);
if (ret)
goto err;
if (!dev->skip_recover) {
ret = msm_i2c_recover_bus_busy(dev);
if (ret)
goto err;
}
}

spin_lock_irqsave(&dev->lock, flags);
@@ -398,12 +407,15 @@ msm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
if (ret < 0) {
dev_err(dev->dev, "Error during data xfer (%d) (%02X)\n",
ret, msgs->addr);
msm_i2c_recover_bus_busy(dev);
if (!dev->skip_recover)
msm_i2c_recover_bus_busy(dev);
}
err:
disable_irq(dev->irq);
clk_disable(dev->clk);
wake_unlock(&dev->wakelock);
if (dev->is_suspended)
wake_unlock(&dev->wakelock);

return ret;
}

@@ -488,10 +500,12 @@ msm_i2c_probe(struct platform_device *pdev)
dev->clk_drv_str = 0;
dev->dat_drv_str = 0;
i2c_clock = 100000;
dev->skip_recover = 1;
}

msm_set_i2c_mux(false, NULL, NULL,
dev->clk_drv_str, dev->dat_drv_str);
if (!dev->skip_recover)
msm_set_i2c_mux(false, NULL, NULL,
dev->clk_drv_str, dev->dat_drv_str);

clk_enable(clk);

@@ -521,7 +535,8 @@ msm_i2c_probe(struct platform_device *pdev)
}

ret = request_irq(dev->irq, msm_i2c_interrupt,
IRQF_DISABLED | IRQF_TRIGGER_RISING, pdev->name, dev);
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TIMER,
pdev->name, dev);
if (ret) {
dev_err(&pdev->dev, "request_irq failed\n");
goto err_request_irq_failed;
@@ -562,12 +577,41 @@ msm_i2c_remove(struct platform_device *pdev)
return 0;
}

static int msm_i2c_suspend_noirq(struct device *device)
{
struct platform_device *pdev = to_platform_device(device);
struct msm_i2c_dev *dev = platform_get_drvdata(pdev);

/* Block to allow any i2c_xfers to finish */
i2c_lock_adapter(&dev->adapter);
dev->is_suspended = true;
i2c_unlock_adapter(&dev->adapter);
return 0;
}

static int msm_i2c_resume_noirq(struct device *device) {
struct platform_device *pdev = to_platform_device(device);
struct msm_i2c_dev *dev = platform_get_drvdata(pdev);

/* Block to allow any i2c_xfers to finish */
i2c_lock_adapter(&dev->adapter);
dev->is_suspended = false;
i2c_unlock_adapter(&dev->adapter);
return 0;
}

static struct dev_pm_ops msm_i2c_pm_ops = {
.suspend_noirq = msm_i2c_suspend_noirq,
.resume_noirq = msm_i2c_resume_noirq,
};

static struct platform_driver msm_i2c_driver = {
.probe = msm_i2c_probe,
.remove = msm_i2c_remove,
.driver = {
.name = "msm_i2c",
.owner = THIS_MODULE,
.pm = &msm_i2c_pm_ops,
},
};

22 changes: 0 additions & 22 deletions drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
@@ -346,28 +346,6 @@ config TOUCHSCREEN_SYNAPTICS_I2C_RMI
help
This enables support for Synaptics RMI over I2C based touchscreens.

config TOUCHSCREEN_IME_IMPROVEMENT
bool "Improved IME"
depends on TOUCHSCREEN_SYNAPTICS_I2C_RMI
default y
help
Not sure

config TOUCHSCREEN_CONCATENATE_REPORT
bool "Touchscreen concatenate report"
depends on TOUCHSCREEN_SYNAPTICS_I2C_RMI
default n
help
This enables support for concatenate report style in touchscreen driver
This support could reduce the number of reports in touchscreen driver

config TOUCHSCREEN_COMPATIBLE_REPORT
bool "Touchscreen compatible report"
depends on TOUCHSCREEN_SYNAPTICS_I2C_RMI
default n
help
This enables support for old report style in touchscreen driver

config TOUCHSCREEN_DUPLICATED_FILTER
bool "Touchscreen duplicated report filter"
depends on TOUCHSCREEN_SYNAPTICS_I2C_RMI
519 changes: 24 additions & 495 deletions drivers/input/touchscreen/synaptics_i2c_rmi.c

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions drivers/media/video/msm/Kconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
comment "Qualcomm MSM Camera And Video"

menuconfig MSM_CAMERA
bool "Qualcomm MSM camera and video capture support"
depends on ARCH_MSM
help
Say Y here to enable selecting the video adapters for
Qualcomm msm camera and video encoding
bool "Qualcomm MSM camera and video capture support"
depends on ARCH_MSM
help
Say Y here to enable selecting the video adapters for
Qualcomm msm camera and video encoding

config 720P_CAMERA
bool "Qualcomm MSM camera with 720P video support"
depends on MSM_CAMERA
help
720P video support
bool "Qualcomm MSM camera with 720P video support"
depends on MSM_CAMERA
help
720P video support

config MSM_CAMERA_V4L2
bool "Video For Linux interface to MSM camera"
depends on MSM_CAMERA && VIDEO_V4L2 && EXPERIMENTAL
help
Say Y here to enable the V4L2 interface for the MSM camera.
Not everything works through this interface and it has not
been thoroughly tested.
bool "Video For Linux interface to MSM camera"
depends on MSM_CAMERA && VIDEO_V4L2 && EXPERIMENTAL
help
Say Y here to enable the V4L2 interface for the MSM camera.
Not everything works through this interface and it has not
been thoroughly tested.

config MSM_CAMERA_DEBUG
bool "Qualcomm MSM camera debugging with printk"
3 changes: 3 additions & 0 deletions drivers/media/video/msm/Makefile
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ obj-$(CONFIG_MT9P012) += mt9p012_fox.o mt9p012_reg.o
obj-$(CONFIG_MSM_CAMERA) += msm_camera.o
obj-$(CONFIG_MSM_CAMERA_V4L2) += msm_v4l2.o
obj-$(CONFIG_S5K3E2FX) += s5k3e2fx.o
obj-$(CONFIG_S5K4E1GX) += s5k4e1gx.o s5k4e1gx_reg.o
obj-$(CONFIG_S5K6AAFX) += s5k6aafx.o s5k6aafx_reg_mecha.o
obj-$(CONFIG_ARCH_MSM_ARM11) += msm_vfe7x.o msm_io7x.o
obj-$(CONFIG_ARCH_QSD8X50) += msm_vfe8x.o msm_vfe8x_proc.o msm_io8x.o
obj-$(CONFIG_OV8810) += ov8810.o
obj-$(CONFIG_S5K3H1GX) += s5k3h1gx.o s5k3h1gx_reg.o
328 changes: 165 additions & 163 deletions drivers/media/video/msm/msm_camera.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion drivers/media/video/msm/msm_vfe7x.c
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
*
*/

#define ILOVEBUGSINMYKERNEL
//#define ILOVEBUGSINMYKERNEL

#include <linux/msm_adsp.h>
#include <linux/slab.h>
50 changes: 46 additions & 4 deletions drivers/media/video/msm/mt9p012_fox.c
Original file line number Diff line number Diff line change
@@ -1026,8 +1026,8 @@ static int mt9p012_probe_init_sensor(const struct msm_camera_sensor_info *data)
rc = gpio_request(data->sensor_reset, "mt9p012");
/*++ update 20100111 ++*/
if (!rc) {
//gpio_direction_output(data->sensor_reset, 0);
//mdelay(5);
gpio_direction_output(data->sensor_reset, 0);
mdelay(5);
gpio_direction_output(data->sensor_reset, 1);
}
/*-- update 20100111 --*/
@@ -1121,7 +1121,7 @@ static int mt9p012_sensor_open_init(const struct msm_camera_sensor_info *data)
mdelay(20);

/*++ update 20100111 ++*/
#if 1
#if 0
if (data) {
rc = mt9p012_probe_init_sensor(data);
if (rc < 0)
@@ -1342,7 +1342,7 @@ int mt9p012_sensor_release(void)
mt9p012_power_down();

/*++ update 20100111 ++*/
#if 1
#if 0
gpio_direction_output(mt9p012_ctrl->sensordata->sensor_reset, 0);
#endif
/*-- update 20100111 --*/
@@ -1408,6 +1408,47 @@ static struct i2c_driver mt9p012_i2c_driver = {
},
};


static const char *mt9p012Vendor = "Micron";
static const char *mt9p012NAME = "mt9p012";
static const char *mt9p012fxSize = "5M";

static ssize_t sensor_vendor_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
ssize_t ret = 0;

sprintf(buf, "%s %s %s\n", mt9p012Vendor, mt9p012NAME, mt9p012fxSize);
ret = strlen(buf) + 1;

return ret;
}

static DEVICE_ATTR(sensor, 0444, sensor_vendor_show, NULL);

static struct kobject *android_mt9p012;

static int mt9p012_sysfs_init(void)
{
int ret ;
pr_info("mt9p012:kobject creat and add\n");
android_mt9p012 = kobject_create_and_add("android_camera", NULL);
if (android_mt9p012 == NULL) {
pr_info("mt9p012_sysfs_init: subsystem_register " \
"failed\n");
ret = -ENOMEM;
return ret ;
}
pr_info("mt9p012:sysfs_create_file\n");
ret = sysfs_create_file(android_mt9p012, &dev_attr_sensor.attr);
if (ret) {
pr_info("mt9p012_sysfs_init: sysfs_create_file " \
"failed\n");
kobject_del(android_mt9p012);
}
return 0 ;
}

static int mt9p012_sensor_probe(const struct msm_camera_sensor_info *info,
struct msm_sensor_ctrl *s)
{
@@ -1437,6 +1478,7 @@ static int mt9p012_sensor_probe(const struct msm_camera_sensor_info *info,
s->s_release = mt9p012_sensor_release;
s->s_config = mt9p012_sensor_config;
mt9p012_probe_init_done(info);
mt9p012_sysfs_init();

probe_done:
CDBG("%s %s:%d\n", __FILE__, __func__, __LINE__);
Loading