1. 20 5月, 2010 20 次提交
    • M
      OMAP3: I2C: Clean up Errata 1p153 handling · 8a9d97d3
      manjugk manjugk 提交于
      Clean up existing Errata 1p153 handling to use generic
      errata handling mechanism through dev flag.
      Signed-off-by: NManjunatha GK <manjugk@ti.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Alexander Shishkin <virtuoso@slind.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      8a9d97d3
    • M
      OMAP2/3: I2C: Errata ID i207: Clear wrong RDR interrupt · f3083d92
      manjugk manjugk 提交于
      Under certain rare conditions, I2C_STAT[13].RDR bit may be set
      and the corresponding interrupt fire, even there is no data in
      the receive FIFO, or the I2C data transfer is still ongoing.
      These spurious RDR events must be ignored by the software.
      
      This patch handles and ignores RDR spurious interrupts.
      
      The below sequence is required in interrupt handler for
      handling this errata:
      1. If RDR is set to 1, clear RDR
      2. Read I2C status register and check for BusBusy bit. If BusBusy
      bit is set, skip remaining steps.
      3. If BusBusy bit is not set, perform read operation on I2C status
      register.
      4. If RDR is set, clear the same. Check RDR again and clear if it sets
      RDR bit again.
      5. Perform I2C Data Read operation N number of times(where N is value
      read from the register BUFSTAT-RXSTAT bit fields).
      
      Note:
      This errata is not applicable for omap2420 and omap4.
      It is applicable for:
      1. omap2430
      2. omap34xx(including omap3630).
      Signed-off-by: NManjunatha GK <manjugk@ti.com>
      Cc: Hema Kalliguddi <hemahk@ti.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Aaro Koskinen <Aaro.Koskinen@nokia.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      f3083d92
    • A
      omap: i2c: add a timeout to the busy waiting · e9f59b9c
      Alexander Shishkin 提交于
      The errata 1.153 workaround is busy waiting on XUDF bit in interrupt
      context, which may lead to kernel hangs. The problem can be reproduced
      by running the bus with wrong (too high) speed.
      Signed-off-by: NAlexander Shishkin <virtuoso@slind.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      e9f59b9c
    • A
      omap: i2c: make errata 1.153 workaround a separate function · 2dd151ab
      Alexander Shishkin 提交于
      This is to avoid insanely long lines and levels of indentation.
      Signed-off-by: NAlexander Shishkin <virtuoso@slind.org>
      Cc: Nishant Menon <nm@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      2dd151ab
    • K
      i2c-omap: add mpu wake up latency constraint in i2c · 20c9d2c4
      Kalle Jokiniemi 提交于
      While waiting for completion of the i2c transfer, the
      MPU could hit OFF mode and cause several msecs of
      delay that made i2c transfers fail more often. The
      extra delays and subsequent re-trys cause i2c clocks
      to be active more often. This has also an negative
      effect on power consumption.
      
      Created a mechanism for passing and using the
      constraint setting function in driver code. The used
      mpu wake up latency constraints are now set individually
      per bus, and they are calculated based on clock rate
      and fifo size.
      
      Thanks to Jarkko Nikula, Moiz Sonasath, Paul Walmsley,
      and Nishanth Menon for tuning out the details of
      this patch.
      
      Updates by Kevin as requested by Tony:
      
      - Remove omap_set_i2c_constraint_func() in favor of conditionally
        adding the flag in omap_i2c_add_bus() in order to keep all the OMAP
        conditional checking in a single location.
      - Update set_mpu_wkup_lat prototypes to match OMAP PM layer so
        OMAP PM function can be used directly in pdata.
      
      Cc: Moiz Sonasath <m-sonasath@ti.com>
      Cc: Jarkko Nikula <jhnikula@gmail.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Nishanth Menon <nm@ti.com>
      Signed-off-by: NKalle Jokiniemi <kalle.jokiniemi@digia.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      20c9d2c4
    • S
      omap: i2c: Add i2c support on omap4 platform · f38e66e0
      Santosh Shilimkar 提交于
      This patch is rebased version of earlier post to add I2C
      driver support to OMAP4 platform. On OMAP4, all
      I2C register address offsets are changed from OMAP1/2/3 I2C.
      In order to not have #ifdef's at various places in code,
      as well as to support multi-OMAP build, an array is created
      to hold the register addresses with it's offset.
      
      This patch was submitted, reviewed and acked on mailing list
      already. For more details refer below link
      http://www.mail-archive.com/linux-i2c@vger.kernel.org/msg02281.html
      
      This updated verion has a depedancy on "Add support for 16-bit registers"
      posted on linux-omap. Below is the patch-works link for the same
      
      http://patchwork.kernel.org/patch/72295/Signed-off-by: NSyed Rafiuddin <rafiuddin.syed@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Reviewed-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Cory Maccarrone <darkstar6262@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      f38e66e0
    • S
      i2c-bfin-twi: return completion in interrupt for smbus quick transfers · f0ac131a
      Sonic Zhang 提交于
      A smbus quick transfer has no data after the address byte.
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      f0ac131a
    • S
      i2c-bfin-twi: remove redundant retry · be2f80f0
      Sonic Zhang 提交于
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      be2f80f0
    • S
      i2c-bfin-twi: fix lost interrupts at high speeds · 5481d075
      Sonic Zhang 提交于
      i2c event of next read/write byte may trigger before current int state
      is cleared in the interrupt handler. So, this should be done at the
      beginning of interrupt handler to avoid losing new i2c events.
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      5481d075
    • M
      i2c-bfin-twi: add debug output for error status · 5cfafc18
      Michael Hennerich 提交于
      Add some debug() code to decode the error register.
      Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      5cfafc18
    • S
      i2c-bfin-twi: integrate timeout timer with completion interface · dd7319a5
      Sonic Zhang 提交于
      There isn't much point in managing our own custom timeout timer when the
      completion interface already includes support for it.  This makes the
      resulting code much simpler and robust.
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      dd7319a5
    • M
      i2c-s3c2410: Remove unconditional 1ms delay on each transfer · 1bc2962e
      Mark Brown 提交于
      The S3C I2C controller indicates completion of I2C transfers before
      the bus has a stop condition on it. In order to ensure that we do not
      attempt to start a new transfer before the bus is idle the driver
      currently inserts a 1ms delay. This is vastly larger than is generally
      required and has a visible effect on performance under load, such as
      when bringing up audio CODECs or reading back status information with
      non-bulk I2C reads.
      
      Replace the sleep with a spin on the IIC status register for up to 1ms.
      This will busy wait but testing on my SMDK6410 system indicates that
      the overwhelming majority of transactions complete on the first spin,
      with maximum latencies of less than 10 spins so the absolute overhead
      of busy waiting should be at worst comprable to msleep(), and the
      overall system performance is dramatically improved.
      
      The main risk is poor interaction with multimaster systems where
      we may miss the bus going idle before the next transaction. Defend
      against this by falling back to the original 1ms delay after 20 spins.
      
      The overall effect in my testing is an approximately 20% improvement
      in kernel startup time.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      1bc2962e
    • L
      Merge branch 'davinci-for-linus' of... · 024a6b95
      Linus Torvalds 提交于
      Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
      
      * 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (48 commits)
        Revert "rtc: omap: let device wakeup capability be configured from chip init logic"
        DM365: Added more PINMUX configurations for AEMIF
        DM365: Make CLKOUTx available
        DM365: Added PINMUX definitions for GPIO30..32
        Davinci: iotable based ioremap() interception
        Davinci: pinmux - use ioremap()
        Davinci: aintc/cpintc - use ioremap()
        Davinci: psc - use ioremap()
        Davinci: timer - use ioremap()
        Davinci: jtag_id - use ioremap()
        Davinci: da8xx: rtc - use ioremap
        Davinci: gpio - use ioremap()
        davinci: edma: fix coding style issue related to breaking lines
        davinci: edma: use BIT() wherever possible
        davinci: edma: fix coding style issue related to usage of braces
        davinci: edma: use a more intuitive name for edma_info
        Davinci: serial - conditional reset via pwremu
        Davinci: serial - use ioremap()
        Davinci: serial - remove unnecessary define
        Davinci: watchdog reset separation across socs
        ...
      
      Fix up trivial conflict in arch/arm/Kconfig due to removal of "select
      GENERIC_TIME"
      024a6b95
    • L
      Merge branch 'for-linus/samsung4' of git://git.fluff.org/bjdooks/linux · 349e1fba
      Linus Torvalds 提交于
      * 'for-linus/samsung4' of git://git.fluff.org/bjdooks/linux: (98 commits)
        Input: s3c24xx_ts - depend on SAMSUNG_DEV_TS and update menu entry
        Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support
        Input: s3c24xx_ts - Implement generic GPIO configuration callback
        ARM: SAMSUNG: Move s3c64xx dev-ts.c to plat-samsung and rename configuration
        ARM: SAMSUNG: Implements cfg_gpio function for Samsung touchscreen
        ARM: S3C64XX: Add touchscreen platform device definition
        ARM: SAMSUNG: Move mach/ts.h to plat/ts.h
        ARM: S5PC100: Move i2c helpers from plat-s5pc1xx to mach-s5pc100
        ARM: S5PC100: Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100
        ARM: S5PC100: gpio.h cleanup
        ARM: S5PC100: Move gpio support from plat-s5pc1xx to mach-s5pc100
        ARM: S5PC100: Use common functions for gpiolib implementation
        drivers: serial: S5PC100 serial driver cleanup
        ARM: S5PC100: Pre-requisite clock patch for plat-s5pc1xx to plat-s5p move
        ARM: SAMSUNG: Copy common I2C0 device helpers to machine directories
        ARM: SAMSUNG: move driver strength gpio configuration helper to common dir
        ARM: S5PV210: Add GPIOlib support
        ARM: SAMSUNGy: fix broken timer irq base
        ARM: SMDK6440: Add audio devices on board
        ARM: S5P6440: Add audio platform devices
        ...
      349e1fba
    • K
      cpumask: fix compat getaffinity · fa9dc265
      KOSAKI Motohiro 提交于
      Commit a45185d2 "cpumask: convert kernel/compat.c" broke libnuma, which
      abuses sched_getaffinity to find out NR_CPUS in order to parse
      /sys/devices/system/node/node*/cpumap.
      
      On NUMA systems with less than 32 possibly CPUs, the current
      compat_sys_sched_getaffinity now returns '4' instead of the actual
      NR_CPUS/8, which makes libnuma bail out when parsing the cpumap.
      
      The libnuma call sched_getaffinity(0, bitmap, 4096) at first.  It mean
      the libnuma expect the return value of sched_getaffinity() is either len
      argument or NR_CPUS.  But it doesn't expect to return nr_cpu_ids.
      
      Strictly speaking, userland requirement are
      
      1) Glibc assume the return value mean the lengh of initialized
         of mask argument. E.g. if sched_getaffinity(1024) return 128,
         glibc make zero fill rest 896 byte.
      2) Libnuma assume the return value can be used to guess NR_CPUS
         in kernel. It assume len-arg<NR_CPUS makes -EINVAL. But
         it try len=4096 at first and 4096 is always bigger than
         NR_CPUS. Then, if we remove strange min_length normalization,
         we never hit -EINVAL case.
      
      sched_getaffinity() already solved this issue.  This patch adapts
      compat_sys_sched_getaffinity() to match the non-compat case.
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Reported-by: NKen Werner <ken.werner@web.de>
      Cc: stable@kernel.org
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa9dc265
    • L
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 · cf77e988
      Linus Torvalds 提交于
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
        [IA64] Drop duplicated "config IOMMU_HELPER"
        [IA64] invoke oom-killer from page fault
        [IA64] use __ratelimit
        [IA64] Use set_cpus_allowed_ptr
        [IA64] Use set_cpus_allowed_ptr
        [IA64] arch/ia64/hp/common/sba_iommu.c: Rename dev_info to adi
        [IA64] removing redundant ifdef
      cf77e988
    • L
      Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm · 1d3c6ff4
      Linus Torvalds 提交于
      * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (224 commits)
        ARM: remove 'select GENERIC_TIME'
        ARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO
        ARM: 6074/1: oprofile: convert from sysdev to platform device
        ARM: 6073/1: oprofile: remove old files and update KConfig
        ARM: 6072/1: oprofile: use perf-events framework as backend
        ARM: 6071/1: perf-events: allow modules to query the number of hardware counters
        ARM: 6070/1: perf-events: add support for xscale PMUs
        ARM: 6069/1: perf-events: use numeric ID to identify PMU
        ARM: 6064/1: pmu: register IRQs at runtime
        ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
        ARM: 6134/1: Handle instruction cache maintenance fault properly
        ARM: nwfpe: allow debugging output to be configured at runtime
        ARM: rename mach_cpu_disable() to platform_cpu_disable()
        ARM: 6132/1: PL330: Add common core driver
        ARM: 6094/1: Extend cache-l2x0 to support the 16-way PL310
        ARM: Move memory mapping into mmu.c
        ARM: Ensure meminfo is sorted prior to sanity_check_meminfo
        ARM: Remove useless linux/bootmem.h includes
        ARM: convert /proc/cpu/aligment to seq_file
        arm: use asm-generic/scatterlist.h
        ...
      1d3c6ff4
    • K
      Revert "rtc: omap: let device wakeup capability be configured from chip init logic" · 5e682ef8
      Kevin Hilman 提交于
      This reverts commit 9c0a342c because
      it was included without proper signoffs from RTC maintainers.
      5e682ef8
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · 7c7cbaf5
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (127 commits)
        sh: update defconfigs.
        sh: Fix up the NUMA build for recent LMB changes.
        sh64: provide a stub per_cpu_trap_init() definition.
        sh: fix up CONFIG_KEXEC=n build.
        sh: fixup the docbook paths for clock framework shuffling.
        driver core: Early dev_name() depends on slab_is_available().
        sh: simplify WARN usage in SH clock driver
        sh: Check return value of clk_get on ms7724
        sh: Check return value of clk_get on ecovec24
        sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c
        sh: move sh clock.c contents to drivers/sh/clk.
        sh: move sh asm/clock.h contents to linux/sh_clk.h V2
        sh: remove unused clock lookup
        sh: switch boards to clkdev
        sh: switch sh4-202 to clkdev
        sh: switch shx3 to clkdev
        sh: switch sh7757 to clkdev
        sh: switch sh7763 to clkdev
        sh: switch sh7780 to clkdev
        sh: switch sh7786 to clkdev
        ...
      7c7cbaf5
    • L
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · ba0234ec
      Linus Torvalds 提交于
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (24 commits)
        [S390] drivers/s390/char: Use kmemdup
        [S390] drivers/s390/char: Use kstrdup
        [S390] debug: enable exception-trace debug facility
        [S390] s390_hypfs: Add new attributes
        [S390] qdio: remove API wrappers
        [S390] qdio: set correct bit in dsci
        [S390] qdio: dont convert timestamps to microseconds
        [S390] qdio: remove memset hack
        [S390] qdio: prevent starvation on PCI devices
        [S390] qdio: count number of qdio interrupts
        [S390] user space fault: report fault before calling do_exit
        [S390] topology: expose core identifier
        [S390] dasd: remove uid from devmap
        [S390] dasd: add dynamic pav toleration
        [S390] vdso: add missing vdso_install target
        [S390] vdso: remove redundant check for CONFIG_64BIT
        [S390] avoid default_llseek in s390 drivers
        [S390] vmcp: disallow modular build
        [S390] add breaking event address for user space
        [S390] virtualization aware cpu measurement
        ...
      ba0234ec
  2. 19 5月, 2010 20 次提交