sfrench/cifs-2.6.git
16 years agosh: Provide dummy swapper pt_regs for SH-5 ctx switch.
Paul Mundt [Mon, 19 Nov 2007 10:07:51 +0000 (19:07 +0900)]
sh: Provide dummy swapper pt_regs for SH-5 ctx switch.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move over sh64 switch_to and stack unwinder.
Paul Mundt [Mon, 19 Nov 2007 10:00:41 +0000 (19:00 +0900)]
sh: Move over sh64 switch_to and stack unwinder.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out tlb-flush in to _32 and _64 variants.
Paul Mundt [Mon, 19 Nov 2007 09:57:03 +0000 (18:57 +0900)]
sh: Split out tlb-flush in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out pgtable.h in to _32 and _64 variants.
Paul Mundt [Mon, 19 Nov 2007 09:26:19 +0000 (18:26 +0900)]
sh: Split out pgtable.h in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: ioremap_64 needs proc_fs.h.
Paul Mundt [Mon, 19 Nov 2007 05:26:09 +0000 (14:26 +0900)]
sh: ioremap_64 needs proc_fs.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out ioremap in to _32 and _64 variants.
Paul Mundt [Sun, 11 Nov 2007 09:43:33 +0000 (18:43 +0900)]
sh: Split out ioremap in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out sh_ksyms.c in to _32 and _64 variants.
Paul Mundt [Sun, 11 Nov 2007 09:22:55 +0000 (18:22 +0900)]
sh: Split out sh_ksyms.c in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move over the SH-5 entry.S.
Paul Mundt [Sun, 11 Nov 2007 09:11:18 +0000 (18:11 +0900)]
sh: Move over the SH-5 entry.S.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out linker script to _32 and _64 variants.
Paul Mundt [Sun, 11 Nov 2007 08:58:11 +0000 (17:58 +0900)]
sh: Split out linker script to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out syscall ABI for _32 and _64 variants.
Paul Mundt [Sun, 11 Nov 2007 08:46:49 +0000 (17:46 +0900)]
sh: Split out syscall ABI for _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up the head-y targets for _32 and _64.
Paul Mundt [Sun, 11 Nov 2007 08:41:56 +0000 (17:41 +0900)]
sh: Fix up the head-y targets for _32 and _64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up header reference for arch/sh/lib64/panic.c.
Paul Mundt [Sun, 11 Nov 2007 08:41:35 +0000 (17:41 +0900)]
sh: Fix up header reference for arch/sh/lib64/panic.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off lib64 version of iomap wrappers.
Paul Mundt [Sun, 11 Nov 2007 08:37:21 +0000 (17:37 +0900)]
sh: Kill off lib64 version of iomap wrappers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out checksum.h in to _32 and _64 variants.
Paul Mundt [Sun, 11 Nov 2007 08:36:13 +0000 (17:36 +0900)]
sh: Split out checksum.h in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Plug in SH-5 ffz()/__ffs() bitops.
Paul Mundt [Sun, 11 Nov 2007 08:28:18 +0000 (17:28 +0900)]
sh: Plug in SH-5 ffz()/__ffs() bitops.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up 64kB page size selection on SH-5.
Paul Mundt [Sun, 11 Nov 2007 08:25:10 +0000 (17:25 +0900)]
sh: Fix up 64kB page size selection on SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out extable.c _32 and _64 variants.
Paul Mundt [Sun, 11 Nov 2007 08:24:50 +0000 (17:24 +0900)]
sh: Split out extable.c _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add SH-5 support to the consistent DMA impl.
Paul Mundt [Sun, 11 Nov 2007 08:07:06 +0000 (17:07 +0900)]
sh: Add SH-5 support to the consistent DMA impl.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: flush_cache_sigtramp() takes 1 arg only.
Paul Mundt [Sun, 11 Nov 2007 06:53:51 +0000 (15:53 +0900)]
sh: flush_cache_sigtramp() takes 1 arg only.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move vsyscall_init() defs up one level.
Paul Mundt [Sat, 10 Nov 2007 11:39:56 +0000 (20:39 +0900)]
sh: Move vsyscall_init() defs up one level.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Nopped out p3_cache_init() on SH-5 also.
Paul Mundt [Sat, 10 Nov 2007 11:39:32 +0000 (20:39 +0900)]
sh: Nopped out p3_cache_init() on SH-5 also.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up VMALLOC_START for SH-5.
Paul Mundt [Sat, 10 Nov 2007 11:39:06 +0000 (20:39 +0900)]
sh: Fix up VMALLOC_START for SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move over the SH-5 head.S and tlb.h.
Paul Mundt [Sat, 10 Nov 2007 11:35:53 +0000 (20:35 +0900)]
sh: Move over the SH-5 head.S and tlb.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Have SH-5 provide an {en,dis}able_fpu() impl.
Paul Mundt [Sat, 10 Nov 2007 11:27:03 +0000 (20:27 +0900)]
sh: Have SH-5 provide an {en,dis}able_fpu() impl.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Disable initial cache flush on SH-5.
Paul Mundt [Sat, 10 Nov 2007 11:25:28 +0000 (20:25 +0900)]
sh: Disable initial cache flush on SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Don't reference UBC code in CPU init on sh64.
Paul Mundt [Sat, 10 Nov 2007 11:18:18 +0000 (20:18 +0900)]
sh: Don't reference UBC code in CPU init on sh64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: imask IRQ depends on sh32.
Paul Mundt [Sat, 10 Nov 2007 11:15:31 +0000 (20:15 +0900)]
sh: imask IRQ depends on sh32.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move in the SH-5 traps.c impl.
Paul Mundt [Sat, 10 Nov 2007 11:14:15 +0000 (20:14 +0900)]
sh: Move in the SH-5 traps.c impl.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: timer.h stub for SH-5.
Paul Mundt [Sat, 10 Nov 2007 11:12:25 +0000 (20:12 +0900)]
sh: timer.h stub for SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move arch/sh64/kernel/sys_sh64.c to arch/sh/kernel/
Paul Mundt [Sat, 10 Nov 2007 11:12:01 +0000 (20:12 +0900)]
sh: Move arch/sh64/kernel/sys_sh64.c to arch/sh/kernel/

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move in the SH-5 signal trampoline impl.
Paul Mundt [Sat, 10 Nov 2007 11:07:57 +0000 (20:07 +0900)]
sh: Move in the SH-5 signal trampoline impl.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: More SH-5 cpuinfo tidying.
Paul Mundt [Sat, 10 Nov 2007 11:01:51 +0000 (20:01 +0900)]
sh: More SH-5 cpuinfo tidying.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Consolidate slab/kmalloc minalign values.
Paul Mundt [Sat, 10 Nov 2007 10:57:58 +0000 (19:57 +0900)]
sh: Consolidate slab/kmalloc minalign values.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out uaccess.h in to _32 and _64 variants.
Paul Mundt [Sat, 10 Nov 2007 10:55:50 +0000 (19:55 +0900)]
sh: Split out uaccess.h in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: SH-5 also uses the ASID cache.
Paul Mundt [Sat, 10 Nov 2007 10:54:16 +0000 (19:54 +0900)]
sh: SH-5 also uses the ASID cache.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move in the SH-5 ptrace impl.
Paul Mundt [Sat, 10 Nov 2007 10:53:31 +0000 (19:53 +0900)]
sh: Move in the SH-5 ptrace impl.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out system.h in to _32 and _64 variants.
Paul Mundt [Sat, 10 Nov 2007 10:46:31 +0000 (19:46 +0900)]
sh: Split out system.h in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out 29-bit and 32-bit physical mode definitions.
Paul Mundt [Sat, 10 Nov 2007 10:16:55 +0000 (19:16 +0900)]
sh: Split out 29-bit and 32-bit physical mode definitions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out processor.h in to _32 and _64 variants.
Paul Mundt [Fri, 9 Nov 2007 08:08:54 +0000 (17:08 +0900)]
sh: Split out processor.h in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: SH-5 pt_regs.
Paul Mundt [Fri, 9 Nov 2007 07:57:27 +0000 (16:57 +0900)]
sh: SH-5 pt_regs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out arch/sh/kernel/process.c for _32 and _64 variants.
Paul Mundt [Fri, 9 Nov 2007 07:57:04 +0000 (16:57 +0900)]
sh: Split out arch/sh/kernel/process.c for _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Have 32-bit use arch/sh/kernel/Makefile_32.
Paul Mundt [Fri, 9 Nov 2007 07:40:43 +0000 (16:40 +0900)]
sh: Have 32-bit use arch/sh/kernel/Makefile_32.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move in the SH-5 mmu_context headers.
Paul Mundt [Fri, 9 Nov 2007 07:37:18 +0000 (16:37 +0900)]
sh: Move in the SH-5 mmu_context headers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off lib64 version of io.c.
Paul Mundt [Fri, 9 Nov 2007 05:07:56 +0000 (14:07 +0900)]
sh: Kill off lib64 version of io.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move sh32 optimized I/O routines to arch/sh/lib/
Paul Mundt [Fri, 9 Nov 2007 05:06:24 +0000 (14:06 +0900)]
sh: Move sh32 optimized I/O routines to arch/sh/lib/

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: SH-5 byteorder routines.
Paul Mundt [Fri, 9 Nov 2007 04:58:44 +0000 (13:58 +0900)]
sh: SH-5 byteorder routines.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Consolidate CPU features in Kconfig.cpu.
Paul Mundt [Fri, 9 Nov 2007 04:45:42 +0000 (13:45 +0900)]
sh: Consolidate CPU features in Kconfig.cpu.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: SH-5 version of current_thread_info().
Paul Mundt [Fri, 9 Nov 2007 04:40:50 +0000 (13:40 +0900)]
sh: SH-5 version of current_thread_info().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out irqflags.h in to _32 and _64 variants.
Paul Mundt [Fri, 9 Nov 2007 04:34:36 +0000 (13:34 +0900)]
sh: Split out irqflags.h in to _32 and _64 variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out asm/string.h for sh32 and sh64.
Paul Mundt [Fri, 9 Nov 2007 04:00:30 +0000 (13:00 +0900)]
sh: Split out asm/string.h for sh32 and sh64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add SH-5 support to io.h.
Paul Mundt [Fri, 9 Nov 2007 03:58:12 +0000 (12:58 +0900)]
sh: Add SH-5 support to io.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add in cacheflush and DMA headers for SH-5.
Paul Mundt [Fri, 9 Nov 2007 03:56:06 +0000 (12:56 +0900)]
sh: Add in cacheflush and DMA headers for SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh64: Kill off arch/sh64/oprofile.
Paul Mundt [Thu, 8 Nov 2007 10:24:00 +0000 (19:24 +0900)]
sh64: Kill off arch/sh64/oprofile.

The same implementation exists in arch/sh/oprofile, so get rid of
this version.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move sh64 board defconfigs to arch/sh/configs.
Paul Mundt [Thu, 8 Nov 2007 10:22:26 +0000 (19:22 +0900)]
sh: Move sh64 board defconfigs to arch/sh/configs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move sh64 boards to arch/sh/.
Paul Mundt [Thu, 8 Nov 2007 10:21:50 +0000 (19:21 +0900)]
sh: Move sh64 boards to arch/sh/.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Correct SH-5 instruction size value.
Paul Mundt [Thu, 8 Nov 2007 10:08:28 +0000 (19:08 +0900)]
sh: Correct SH-5 instruction size value.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add cache definitions for SH-5.
Paul Mundt [Thu, 8 Nov 2007 10:00:27 +0000 (19:00 +0900)]
sh: Add cache definitions for SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add addrspace.h segmentation stub for SH-5.
Paul Mundt [Thu, 8 Nov 2007 09:58:52 +0000 (18:58 +0900)]
sh: Add addrspace.h segmentation stub for SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: BUGFLAG_WARNING needs GENERIC_BUG.
Paul Mundt [Thu, 8 Nov 2007 09:58:00 +0000 (18:58 +0900)]
sh: BUGFLAG_WARNING needs GENERIC_BUG.

Move the HAVE_ARCH_BUG/HAVE_ARCH_WARN_ON definitions underneath
CONFIG_GENERIC_BUG. This is needed for BUGFLAG_WARNING usage.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up fixmap location for SH-5.
Paul Mundt [Thu, 8 Nov 2007 09:55:39 +0000 (18:55 +0900)]
sh: Fix up fixmap location for SH-5.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add SH-5 support to asm/module.h.
Paul Mundt [Thu, 8 Nov 2007 09:54:58 +0000 (18:54 +0900)]
sh: Add SH-5 support to asm/module.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Switch Kconfig.sh64 to use arch/sh/mm/Kconfig.
Paul Mundt [Thu, 8 Nov 2007 09:54:16 +0000 (18:54 +0900)]
sh: Switch Kconfig.sh64 to use arch/sh/mm/Kconfig.

Consolidates the HUGETLB definitions and others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Plug SH-5 in to arch/sh/Makefile.
Paul Mundt [Thu, 8 Nov 2007 09:52:35 +0000 (18:52 +0900)]
sh: Plug SH-5 in to arch/sh/Makefile.

Adds the ISA tuning and a lib64 rule.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move arch/sh64/lib to arch/sh/lib64.
Paul Mundt [Thu, 8 Nov 2007 09:51:33 +0000 (18:51 +0900)]
sh: Move arch/sh64/lib to arch/sh/lib64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move the sh64 Kconfig to arch/sh/Kconfig.sh64.
Paul Mundt [Thu, 8 Nov 2007 09:46:51 +0000 (18:46 +0900)]
sh: Move the sh64 Kconfig to arch/sh/Kconfig.sh64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out cache status bits per-CPU family.
Paul Mundt [Thu, 8 Nov 2007 09:44:09 +0000 (18:44 +0900)]
sh: Split out cache status bits per-CPU family.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Split out PXSEG segmentation per-CPU family.
Paul Mundt [Thu, 8 Nov 2007 09:42:46 +0000 (18:42 +0900)]
sh: Split out PXSEG segmentation per-CPU family.

The CPU family abstraction already exists, so move out the PXSEG
definition for each one. SH-2A already has this special cased,
and SH-5 will as well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add a SUPERH32 config symbol.
Paul Mundt [Thu, 8 Nov 2007 09:39:33 +0000 (18:39 +0900)]
sh: Add a SUPERH32 config symbol.

We need to differentiate from SUPERH64, so add a SUPERH32 for
regular sh.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Move CPU subtypes to Kconfig.sh.
Paul Mundt [Thu, 8 Nov 2007 09:38:14 +0000 (18:38 +0900)]
sh: Move CPU subtypes to Kconfig.sh.

We intend to share the mm options, so move the SH-only subtypes
up a level.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Rename Kconfig to Kconfig.sh.
Paul Mundt [Thu, 8 Nov 2007 09:30:40 +0000 (18:30 +0900)]
sh: Rename Kconfig to Kconfig.sh.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh64: Use the generic rtc-sh driver.
Paul Mundt [Thu, 8 Nov 2007 05:45:55 +0000 (14:45 +0900)]
sh64: Use the generic rtc-sh driver.

Rip out the sh64-specific RTC bits, use rtc-sh instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agortc: rtc-sh: SH-5 support.
Paul Mundt [Thu, 8 Nov 2007 05:44:44 +0000 (14:44 +0900)]
rtc: rtc-sh: SH-5 support.

Trivial support for the SH-5 (sh64) on-chip RTC.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sun, 27 Jan 2008 21:15:24 +0000 (08:15 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (54 commits)
  MAINTIANERS: just use Mike gmail e-mail for contact and pawn the serial driver off onto Sonic
  [Blackfin] arch: remove old I2C BF54x porting.
  [Blackfin] arch: Add the semtimedop syscall.  Upstream uClibc doesn't compile without it.
  [Blackfin] arch: fix bug kernel boot message: memory information is not reasonable
  [Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver
  [Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up
  [Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core.
  [Blackfin] arch: Add proper SW System Reset delay sequence
  [Blackfin] arch: Update copyright date
  [Blackfin] arch: GPIO API cleanup and anomaly update
  [Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface
  [Blackfin] arch: Initial checkin of the memory protection support.
  [Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option
  [Blackfin] arch: Add some comments - fix semicolons
  [Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/
  [Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted
  [Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards
  [Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel
  [Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on
  [Blackfin] arch: update to latest anomaly sheets
  ...

16 years agoi2c-bfin-twi: Register adapter with a specific bus number
Kalle Pokki [Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)]
i2c-bfin-twi: Register adapter with a specific bus number

All the users of this driver explicitly specify the I2C bus numbers
to be used in their platform data. Make the driver respect that.

Signed-off-by: Kalle Pokki <kalle.pokki@eke.fi>
Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-au1550: Convert to platform driver
Manuel Lauss [Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)]
i2c-au1550: Convert to platform driver

Convert the i2c-au1550 bus driver to platform driver, and
register a platform device for the Alchemy Db/Pb series of
boards.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-au1550: properly terminate zero-byte transfers
Manuel Lauss [Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)]
i2c-au1550: properly terminate zero-byte transfers

Zero-bytes transfers would leave the bus transaction unfinished
(no i2c stop is sent), with the following transfer actually
sending the slave address to the previously addressed device,
resulting in weird device failures (e.g. reset minute register
values in my RTC).
This patch instructs the controller to send an I2C STOP right after
the slave address in case of a zero-byte transfer.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agompc-i2c: Propagate error values properly
Jon Smirl [Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)]
mpc-i2c: Propagate error values properly

Propagate the error values returned by i2c_wait() instead of overriding
them with a meaningless -1.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Add i2c_new_dummy() utility
David Brownell [Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)]
i2c: Add i2c_new_dummy() utility

This adds a i2c_new_dummy() primitive to help work with devices
that consume multiple addresses, which include many I2C eeproms
and at least one RTC.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Drop legacy locking in i2c_new_probed_device
Jean Delvare [Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)]
i2c: Drop legacy locking in i2c_new_probed_device

It is no longer required to hold adapter->clist_lock to call
i2c_check_addr.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
16 years agoi2c: Limit locking scope in i2c_detach_client
Jean Delvare [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c: Limit locking scope in i2c_detach_client

We only need to hold adapter->clist_lock when we touch the client list.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-remove-redundant-i2c_client-list.patch
David Brownell [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c-remove-redundant-i2c_client-list.patch

This goes on top of the patch removing most i2c_adapter.clients usage,
updating i2c_attach_client:

 - Don't call device_register() while holding clist_lock.  This
   removes a self-deadlock when on the i2c_driver.probe() path,
   for drivers that need to attach new devices (e.g. dummies).

 - Remove a redundant address check.  The driver model core does
   this as a consequence of guaranteeing unique names.

 - Move the "device registered" diagnostic so that it never lies;
   previously, on error paths it would falsely report success.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Drivers stop using the redundant client list
Jean Delvare [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c: Drivers stop using the redundant client list

The redundant i2c client list maintained by i2c-core is going away
soon, so drivers should stop using it now. Instead, they can use the
standard iterator provided by the device driver model
(device_for_each_child).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Michael Hunold <michael@mihu.de>
16 years agoi2c: Stop using the redundant client list
David Brownell [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c: Stop using the redundant client list

The i2c_adapter.clients list of i2c_client nodes duplicates driver
model state.  This patch starts removing that list, letting us remove
most existing users of those i2c-core lists.

 * The core I2C code now iterates over the driver model's list instead
   of the i2c-internal one in some places where it's safe:
      - Passing a command/ioctl to each client, a mechanims
        used almost exclusively by DVB adapters;
      - Device address checking, in both i2c-core and i2c-dev.

 * Provide i2c_verify_client() to use with driver model iterators.

 * Flag the relevant i2c_adapter and i2c_client fields as deprecated,
   to help prevent new users from appearing.

For the moment the list needs to stick around, since some issues show
up when deleting devices created by legacy I2C drivers.  (They don't
follow standard driver model rules.  Removing those devices can cause
self-deadlocks.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-viapro: Add support for the VT8237S
Jean Delvare [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c-viapro: Add support for the VT8237S

Add support for another variant of the VT8237. I couldn't test
I2C block support but I assume it is present as well.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-piix4: Drop redundant PCI function number check
Jean Delvare [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c-piix4: Drop redundant PCI function number check

Checking the PCI function number doesn't add any value, and it makes
adding dynamic IDs to the driver more difficult. Drop this check.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Let the user specify PCI driver data through new_id
Jean Delvare [Sun, 27 Jan 2008 17:14:51 +0000 (18:14 +0100)]
i2c: Let the user specify PCI driver data through new_id

The i2c-amd756 and i2c-viapro drivers make use of the driver_data
field of the PCI device ID. When adding device IDs dynamically (by
writing to the new_id sysfs file) you cannot set the value of this
field by default. It has to be allowed explicitly. Do that, and
check the value so that the user can't crash the kernel accidentally.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoi2c-pxa: Add polling transfer
Mike Rapoport [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c-pxa: Add polling transfer

Add polling I2C transfer implementation for PXA I2C. This is needed
for cases where I2C transactions have to occur at times interrups are
disabled.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Support i2c_transfer in atomic contexts
Mike Rapoport [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c: Support i2c_transfer in atomic contexts

Allow i2c_transfer to be called in contexts where sleeping is not allowed.
It is the reponsability of the caller to ensure that the underlying i2c bus
driver will not sleep either.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-sibyte: Remove the bus scan module parameter
Jean Delvare [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c-sibyte: Remove the bus scan module parameter

The implementation is unsafe, and anyway one can achieve the same from
userspace using i2c-dev + i2cdetect.

Also tag i2c_sibyte_add_bus __init.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
16 years agoi2c: Discard unused driver IDs
Jean Delvare [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c: Discard unused driver IDs

Discard all I2C driver IDs that aren't used anywhere. That's not just a
couple of them, but more like 49 or one quarter of all defined IDs! And
this is just a first pass, next will come all IDs that are set but
never used, or used but never set.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-i801: Implement I2C block read support
Jean Delvare [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c-i801: Implement I2C block read support

I2C block read is supported since the ICH5. I couldn't get it to work
using the block buffer, so it's using the old-style byte-by-byte mode
for now.

Note: I'm also updating the driver author... The i2c-i801 driver was
really written by Mark Studebaker, even though he based his work on
the i2c-piix4 driver which was written by Philip Edelbrock.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-i801: Clear special mode bits as needed
Jean Delvare [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c-i801: Clear special mode bits as needed

Clear special mode bits (PEC, block buffer) at driver load time,
you never know in which state the device was left by its last user.

Also make sure that we reset the block buffer mode at the end of every
transaction, not only when PEC was used.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-i801: More explicit names for chip features
Jean Delvare [Sun, 27 Jan 2008 17:14:50 +0000 (18:14 +0100)]
i2c-i801: More explicit names for chip features

Use separate flags with explicit names to describe the features of
the ICH chip.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-i801: Document which chip support what feature
Jean Delvare [Sun, 27 Jan 2008 17:14:49 +0000 (18:14 +0100)]
i2c-i801: Document which chip support what feature

Provide a clearer documentation of which additional features each
ICH chip support, and which of these the driver supports.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c/tps65010: move header to <linux/i2c/...>
David Brownell [Sun, 27 Jan 2008 17:14:49 +0000 (18:14 +0100)]
i2c/tps65010: move header to <linux/i2c/...>

Move the tps65010 header file from the OMAP arch directory to the
more generic <linux/i2c/...> directory, and remove the spurious
dependency of this driver on OMAP.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Rename main mutex
Jean Delvare [Sun, 27 Jan 2008 17:14:49 +0000 (18:14 +0100)]
i2c: Rename main mutex

Rename the main mutex in i2c-core from core_lists to core_lock. This
makes more sense now that the redundant lists are gone.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Drop redundant i2c_driver.list
Jean Delvare [Sun, 27 Jan 2008 17:14:49 +0000 (18:14 +0100)]
i2c: Drop redundant i2c_driver.list

i2c_driver.list is superfluous, this list duplicates the one
maintained by the driver core. Drop it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
16 years agoi2c: Drop redundant i2c_adapter.list
Jean Delvare [Sun, 27 Jan 2008 17:14:48 +0000 (18:14 +0100)]
i2c: Drop redundant i2c_adapter.list

i2c_adapter.list is superfluous, this list duplicates the one
maintained by the driver core. Drop it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
16 years agoi2c: Change prototypes of refcounting functions
Jean Delvare [Sun, 27 Jan 2008 17:14:48 +0000 (18:14 +0100)]
i2c: Change prototypes of refcounting functions

Use more standard prototypes for i2c_use_client() and
i2c_release_client(). The former now returns a pointer to the client,
and the latter no longer returns anything. This matches what all other
subsystems do.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
16 years agoi2c: Use the driver model reference counting
Jean Delvare [Sun, 27 Jan 2008 17:14:48 +0000 (18:14 +0100)]
i2c: Use the driver model reference counting

Don't implement our own reference counting mechanism for i2c clients
when the driver model already has one.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>