Commit Graph

205 Commits

Author SHA1 Message Date
Russell King 05e3475451 Merge branch 'p2v' into devel
Conflicts:
	arch/arm/kernel/module.c
	arch/arm/mach-s5pv210/sleep.S
2011-03-16 23:35:27 +00:00
Russell King f4117ac9e2 ARM: P2V: separate PHYS_OFFSET from platform definitions
This uncouple PHYS_OFFSET from the platform definitions, thereby
facilitating run-time computation of the physical memory offset.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Magnus Damm <damm@opensource.se>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-02-17 23:26:55 +00:00
Ben Hutchings e66a022a80 arm/ixp4xx: Rename FREQ macro to avoid collisions
FREQ is a ridiculously short name for a platform-specific macro in a
generic header, and it now conflicts with an enumeration in the
gspca/ov519 driver.

Also delete conditional reference to ixp4xx_get_board_tick_rate()
which is not defined anywhere.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2011-02-06 16:49:48 +01:00
Krzysztof Hałasa 3c3a3b4c12 IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries.
Queues should be empty when released, if not, there is a safety valve.
Make sure the queue is usable after it triggers.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2011-02-06 16:49:48 +01:00
Lennert Buytenhek ee04087add ARM: ixp4xx: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
2011-01-13 17:18:40 +01:00
Russell King 58daf18cdc Merge branch 'clksrc' into devel
Conflicts:
	arch/arm/mach-vexpress/v2m.c
	arch/arm/plat-omap/counter_32k.c
	arch/arm/plat-versatile/Makefile
2011-01-05 18:09:03 +00:00
Russell King 31edf274f9 Merge branches 'ftrace', 'gic', 'io', 'kexec', 'mod', 'sa11x0', 'sh' and 'versatile' into devel 2011-01-05 18:08:10 +00:00
Imre Kaloz 88a5810160 ARM: fix IXP4xx build failure
arm: export dma_set_coherent_mask

While a regression was fixed with commit 710224fa27 (arm: fix
"arm: fix pci_set_consistent_dma_mask for dmabounce devices"), a
new one was introduced as dma_set_coherent_mask wasn't exported
for modules. This patch takes care for this issue.

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-28 11:22:20 -08:00
Russell King 5b0d495c06 ARM: ixp4xx: convert sched_clock() to use new infrastructure
Convert ixp4xx to use the new sched_clock() infrastructure for
extending 32bit counters to full 64-bit nanoseconds.

Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-22 22:44:44 +00:00
Russell King 5e06b6492e ARM: ensure all sched_clock() implementations are notrace marked
ftrace requires sched_clock() to be notrace.  Ensure that all
implementations are so marked.  Also make sure that they include
linux/sched.h

Also ensure OMAP clocksource read functions are marked notrace as
they're used for sched_clock() too.

Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Eric Miao <eric.y.miao@gmail.com>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-22 22:44:42 +00:00
Russell King b7c7c50adc ARM: ixp4xx: update clock source registration
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants.  Switch over to using this new interface.

Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-22 22:44:31 +00:00
Russell King a0b7bd0829 ARM: io: make iounmap() a simple macro
Defining iounmap() with arguments prevents it from being used as a
function pointer, causing platforms to work around this.  Instead,
define it to be a simple macro.

Do the same for __arch_io(re|un)map too.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-08 13:57:04 +00:00
Nicolas Pitre 6451d7783b arm: remove machine_desc.io_pg_offst and .phys_io
Since we're now using addruart to establish the debug mapping, we can
remove the io_pg_offst and phys_io members of struct machine_desc.

The various declarations were removed using the following script:

  grep -rl MACHINE_START arch/arm | xargs \
  sed -i '/MACHINE_START/,/MACHINE_END/ { /\.\(phys_io\|io_pg_offst\)/d }'

[ Initial patch was from Jeremy Kerr, example script from Russell King ]

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Eric Miao <eric.miao at canonical.com>
2010-10-20 00:27:46 -04:00
Jeremy Kerr 0ea1293009 arm: return both physical and virtual addresses from addruart
Rather than checking the MMU status in every instance of addruart, do it
once in kernel/debug.S, and change the existing addruart macros to
return both physical and virtual addresses. The main debug code can then
select the appropriate address to use.

This will also allow us to retreive the address of a uart for the MMU
state that we're not current in.

Updated with fixes for OMAP from Jason Wang <jason77.wang@gmail.com>
and Tony Lindgren <tony@atomide.com>, and fix for versatile express from
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-10-20 00:27:33 -04:00
FUJITA Tomonori 710224fa27 arm: fix "arm: fix pci_set_consistent_dma_mask for dmabounce devices"
This fixes the regression caused by the commit 6fee48cd33
("dma-mapping: arm: use generic pci_set_dma_mask and
pci_set_consistent_dma_mask").

ARM needs to clip the dma coherent mask for dmabounce devices. This
restores the old trick.

Note that strictly speaking, the DMA API doesn't allow architectures to do
such but I'm not sure it's worth adding the new API to set the dma mask
that allows architectures to clip it.

Reported-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-22 17:22:38 -07:00
Linus Torvalds 7355a5a654 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  mtd/nand_ids: Fix buswidth
  mtd/m25p80: fix test for end of loop
  mtd/m25p80: retlen is never NULL
  MIPS: Fix gen_nand probe structures contents
  gen_nand: Test if nr_chips field is valid
  BFIN: Fix gen_nand probe structures contents
  nand/denali: move all hardware initialization work to denali_hw_init
  nand/denali: Add a page check in denali_read_page & denali_read_page_raw
  nand/denali: use cpu_relax() while waiting for hardware interrupt
  nand/denali: change read_status function method
  nand/denali: Fixed check patch warnings
  ARM: Fix gen_nand probe structures contents
  mtd/nand_base: fix kernel-doc warnings & typos
  nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
  nand/denali: Fixed handle ECC error bugs
  nand/denali: use iowrite32() to replace denali_write32()
  nand/denali: Fixed probe function bugs
2010-08-15 17:32:47 -07:00
Marek Vasut ef077179a2 ARM: Fix gen_nand probe structures contents
These three platforms didn't properly fill nr_chips in gen_nand 
registration and therefore depended on gen_nand bug fixed by commit 
81cbb0b177 ("mtd: gen_nand: fix support for 
multiple chips")

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-12 02:21:18 +01:00
Linus Torvalds 946880fa27 Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
* 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6:
  IXP4xx: Fix LL debugging on little-endian CPU.
  IXP4xx: Fix sparse warnings in I/O primitives.
  IXP4xx: Make mdio_bus struct static in the Ethernet driver.
  IXP4xx: Fix ixp4xx_crypto little-endian operation.
  IXP4xx: Prevent HSS transmitter lockup by disabling FRaMe signals.
  ixp4xx/vulcan: add PCI support
  ixp4xx: base support for Arcom Vulcan
2010-08-11 09:17:27 -07:00
Russell King ceb0885d3b Merge branch 'misc' into devel
Conflicts:
	arch/arm/mm/init.c
2010-07-31 14:20:02 +01:00
Kirill A. Shutemov 6338a6aa7c ARM: 6269/1: Add 'code' parameter for hook_fault_code()
Add one more parameter to hook_fault_code() to be able to set 'code'
field of struct fsr_info.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-27 10:48:34 +01:00
Russell King b65b4781fb ARM: Remove 'node' argument form arch_adjust_zones()
Since we no longer support discontigmem, node is always zero, so
remove this argument.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-16 10:57:36 +01:00
Krzysztof Hałasa 42ea573f87 IXP4xx: Fix LL debugging on little-endian CPU.
IXP4xx only needs +3 offset for UART registers when running in big-endian mode.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2010-05-27 13:49:55 +02:00
Krzysztof Hałasa 59c290176e IXP4xx: Fix sparse warnings in I/O primitives.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2010-05-27 13:02:43 +02:00
Marc Zyngier ee977c2c4f ixp4xx/vulcan: add PCI support
Add PCI support for the Vulcan board, supporting USB and CF ports.
The PC/104 bus (actually a hack on the second CarBus slot) is not
currently supported.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2010-05-27 13:02:42 +02:00
Marc Zyngier 4d9be47f3d ixp4xx: base support for Arcom Vulcan
This patch adds some basic support for the Arcom Vulcan (ixp425 based).

Supported devices include:
- XR16L551 serial ports
- External watchdog
- Flash
- SRAM
- 1-wire id

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2010-05-27 13:02:42 +02:00
Russell King ac1d426e82 Merge branch 'devel-stable' into devel
Conflicts:
	arch/arm/Kconfig
	arch/arm/include/asm/system.h
	arch/arm/mm/Kconfig
2010-05-17 17:24:04 +01:00
Russell King 6262c92f51 ARM: Remove useless linux/bootmem.h includes
These files include linux/bootmem.h without using anything from this
file; remove the unnecessary include.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-15 15:03:48 +01:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
FUJITA Tomonori 6fee48cd33 dma-mapping: arm: use generic pci_set_dma_mask and pci_set_consistent_dma_mask
This converts arm to the generic pci_set_dma_mask and
pci_set_consistent_dma_mask (removes HAVE_ARCH_PCI_SET_DMA_MASK for
dmabounce).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Looked-over-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:42 -08:00
Russell King 2741ecb4ce Merge branch 'misc2' into devel 2010-02-25 22:09:41 +00:00
Russell King 186f93ea1f Merge branch 'tmpreg' into devel
Conflicts:
	arch/arm/Kconfig
	arch/arm/mach-ux500/include/mach/debug-macro.S
2010-02-25 22:07:25 +00:00
Fenkart/Bostandzhyan c931b4f655 ARM: 5928/1: Change type of VMALLOC_END to unsigned long.
Makes it consistent with VMALLOC_START

Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-15 21:40:33 +00:00
Tony Lindgren 4e6d488af3 ARM: 5910/1: ARM: Add tmp register for addruart and loadsp
Otherwise more complicated uart configuration won't be possible.
We can use r1 for tmp register for both head.S and debug.S.

NOTE: This patch depends on another patch to add the the tmp register
into all debug-macro.S files. That can be done with:

$ sed -i -e "s/addruart,rx|addruart, rx/addruart, rx, tmp/"
	arch/arm/*/include/*/debug-macro.S

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12 17:27:52 +00:00
Mikael Pettersson e00d9d4b17 ARM: 5869/1: ixp4xx: implement sched_clock()
Add a better sched_clock() to the ixp4xx platform,
implemented via its clocksource support.

This is based on the sched_clock() I implemented for
the IOP platform. Tested on a ds101 ixp420 machine.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-27 22:04:18 +00:00
Krzysztof Hałasa 0fd7dc7f6c IXP4xx: GTWX5715 platform only has two PCI IRQ lines, not four.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:41 +01:00
Krzysztof Hałasa 8d3fdf31dd IXP4xx: Introduce IXP4XX_GPIO_IRQ(n) macro and convert IXP4xx platform files.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:41 +01:00
Krzysztof Hałasa a8b7b34075 IXP4xx: move Gemtek GTWX5715 platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:40 +01:00
Krzysztof Hałasa 31bcde3785 IXP4xx: Remove unused Motorola PrPMC1100 platform macros.
PrPMC1100 is handled by IXDP425 platform code, there is no need for
duplicate set of macros. Remove them.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:40 +01:00
Krzysztof Hałasa 914e7bc28e IXP4xx: move FSG platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:40 +01:00
Krzysztof Hałasa 395e71276c IXP4xx: move DSM G600 platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:40 +01:00
Krzysztof Hałasa 23fa6846a2 IXP4xx: move NAS100D platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa c1117c63d5 IXP4xx: move NSLU2 platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa f89f44902a IXP4xx: move Coyote platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa ec66969685 IXP4xx: move AVILA platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa 9bf4d67689 IXP4xx: move IXDP425 platform macros to the platform code.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa ed5b9fa0d1 IXP4xx: Extend PCI MMIO indirect address space to 1 GB.
IXP4xx CPUs can indirectly access the whole 4 GB PCI MMIO address space (using
the non-prefetch registers). Previously the available space depended on the CPU
variant, since one of the IXP43x platforms needed more than the usual 128 MB.
1 GB should be enough for everyone, and if not, we can trivially increase it.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa cba362221b IXP4xx: Fix compilation failure with CONFIG_IXP4XX_INDIRECT_PCI.
Instead of including the heavy linux/mm.h for VMALLOC_START, test the addresses
against PCI MIN and MAX addresses. Indirect PCI uses 1:1 mapping for MMIO space
making this change possible.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa 58e570d118 IXP4xx: Drop "__ixp4xx_" prefix from in/out/ioread/iowrite functions for clarity.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:39 +01:00
Krzysztof Hałasa 28f85cd3f6 IXP4xx: Rename indirect MMIO primitives from __ixp4xx_* to __indirect_*.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:38 +01:00
Roel Kluin efec194f57 IXP4xx: Ensure index is positive in irq_to_gpio() and npe_request().
The indexes were signed, so negatives were possible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-12-05 16:58:38 +01:00