Commit Graph

139 Commits

Author SHA1 Message Date
Sascha Hauer 2cb536d13c [ARM] MX35: add clock support
This patch adds clock support for i.MX35 SoCs. We do not support setting
of clock rates yet, but most interesting clock rates should be reported.
I couldn't test all clock rates and the datasheet contains some obvious
bugs, so expect some bugs in this code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:28 +01:00
Sascha Hauer 198016e1b1 [ARM] MXC: add cpu_is_ macros
We had hardcoded cpu_is_ macros for mxc architectures till now. As we
want to run the same kernel on i.MX31 and i.MX35 this patch adds cpu_is_
macros which expand to 0 or 1 if only one architecture is compiled in and
only check for the cpu type if more than one architecture is compiled
in.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:26 +01:00
Sascha Hauer c0a5f85523 [ARM] MX35: Add register definitions for the i.MX35
This patch moves the stuff common to i.MX31 and i.MX35 to mx3x.h and the
specifics to mx31.h/mx35.h. We can build a kernel which runs on i.MX31 and
i.MX35, so always include mx31.h and mx35.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:25 +01:00
Valentin Longchamp e00f0b4a93 mx31moboard: initial support for various baseboards
This enables our mx31moboard to be used on the different baseboards that
we are developping according to the application needs. There are not
many differences between the boards for now, but when other peripherals
are available for mx31 the differences are going to grow.

v2: takes Sascha's comments into account

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:21 +01:00
Valentin Longchamp e180a5c26f mx31: add pin definition for LCD
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:20 +01:00
Guennadi Liakhovetski 999981d943 mxc: first set GPIO level, then switch direction to output
Make sure not to create spurious pulses on GPIOs, when configuring them as
output: first set required level, then switch direction.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:19 +01:00
Holger Schurig 6bbdbf2f95 arm/imx: Kconfig beautification
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:18 +01:00
Sascha Hauer c2aaac70cd [ARM] iommux mx3: Add pin definitions for I2C
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:14 +01:00
Sascha Hauer 166091b189 [ARM] MXC: add pwm driver for i.MX SoCs
This driver has been tested on MX27/MX31. It should work on MX1/MX1
aswell, but the actual setting of the PWM is missing so far.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:10 +01:00
Sascha Hauer c0b90a31ef imxfb: add platform specific init/exit functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:07 +01:00
Valentin Longchamp b7222631c3 mx31: rework of iomux support
This new implemenatation avoids that two physical pins are claimed by
the same driver (also with the the gpr hardware modes).
The gpio kernel lib is also called when a capable gpio pin is assigned
its gpio function.
The mxc_iomux_mode function is still here for backward compatibility but
should not be used anymore.

V2:

In the precendent revision, the iomux code was claiming a pin when its
hardware mode was changed. This was uncorrect: when the hardware mode is
changed, the pin must still be claimed through the iomux.

In order to have a pin working in mode hw2, we must fist issue the
mxc_iomux_set_gpr call and then the corresponding mxc_iomux_mode calls
with the FUNC mode (usually done with mxc_iomux_setup_multiple_pins).
The reverse calls must be done to fee the pins.

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:34:00 +01:00
Mark Brown 4d5f9cdacb mx31ads: Fix build for missing mx31.h
Several of the macros in mx31ads.h depend on mx31.h which is no longer
included in quite so many standard headers as it once was. Include it
directly so we can build.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:57 +01:00
Holger Schurig e48135519b arm/imx21: Framebuffer support for i.MX21
This patch mimicks what Martin wrote on the mailing list:

* move arch/arm/mach-imx/include/mach/imxfb.h into
  arch/arm/mach-mxc/include/mach/imxfb.h
* changes Kconfig so that CONFIG_FB_IMX is selectable
* adds a platform device (copied from some pengutronix
  patches)

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:55 +01:00
Holger Schurig aa3b0a6f57 arm/imx21: clock support for i.MX21
Based on code from "Martin Fuzzey" <mfuzzey@gmail.com>

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:54 +01:00
Holger Schurig 260a1fd26c arm/imx2x: split i.MX21/i.MX27 register definitions
* define new CONFIG_ARCH_MX21 (this one is currently mutually exclusive to
  CONFIG_ARCH_MX27, but this might change)
* splits one header file. Memory definitions, interrupt sources,
  DMA channels are split into common part, i.MX27 specific and i.MX21
  specific.
* guard access to UART5/UART6, which don't exist on i.MX21

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:53 +01:00
Holger Schurig 058b7a6f46 arm/imx2x: removes a bunch of sparse-warnings
Here are some of the warnings that get fixed by this:

> 200 times: warning: cast adds address space to expression (<asn:2>)
twelve times: warning: symbol 'xxx' was not declared. Should it be static
two times: warning: symbol 'clock' shadows an earlier one
five times: warning: incorrect type in initializer (different address spaces)

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:52 +01:00
Sascha Hauer edfcea80eb [ARM] MX27 Clock rework
This changes MX27 to use common clkdev. It also cleans up MX27 clock
support to be more readable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:51 +01:00
Sascha Hauer d1755e3592 [ARM] MXC: add clkdev support
This patch only adds general clkdev support without actually switching
any MXC architecture to clkdev.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:50 +01:00
Sascha Hauer e65fb0099f [ARM] MXC: remove _clk suffix from clock names
The context makes it clear already that these are clocks, so there's
no need for such a suffix. This patch only changes the clocks actually
used in the tree. The remaining clocks are renamed in the subsequent
architecture specific patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:48 +01:00
Sascha Hauer 30c730f8f9 [ARM] MXC: rework timer/clock initialisation
- rename mxc_clocks_init to architecture specific versions. This
  allows us to have more than one architecture compiled in.
- call mxc_timer_init from clock initialisation instead from board
  code

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:47 +01:00
Sascha Hauer a2865197a5 [ARM] MXC: Use a single function for decoding a PLL
We had 3 versions of this function in clock support for MX1/2/3
Use a single one instead. I picked the one from the MX3 as it seems
to calculate more accurate as the other ones. Also, on MX27 and MX31 mfn
can be negative, this hasn't been handled correctly on MX27 since now.

This patch has been tested on MX27 and MX31 and produces the same clock
frequencies for me.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:46 +01:00
Holger Schurig 5512e88f3a arm/imx21: add kbuild support for the Freescale i.MX21
* adds Kconfig variables
* specifies different physical address for i.MX21 because of the
  different memory layouts
* disables support for UART5/UART6 in the i.MX serial driver
  (the i.MX21 doesn't have those modules)

Based on code from "Martin Fuzzey" <mfuzzey@gmail.com>

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:45 +01:00
Holger Schurig ccfe30a7c8 arm/imx2x: new IOMUX definitions
* removed iomux-mx1-mx2.h completely
* distributes the former contents to four different files (iomux-mx1.h,
  iomux-mx21.h, iomux-mx27.h and the file iomux-mx2x.h, which is common to
  both i.MX21 and i.MX27).
* adds all documented IOMUX definitions for i.MX21 and i.MX27
* fixes a few that were wrong (PD14_AOUT_FEC_CLR, PE16_AF_RTCK).
* don't silenly include <linux/io.h>
* and fixes all collateral damage from above

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-13 10:33:44 +01:00
Guennadi Liakhovetski 6e1588cbd8 i.MX31: framebuffer driver
This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
displays, vertical panning supported, no overlay support.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-02-26 14:00:58 -07:00
Dan Williams 1febd91acf Revert "i.MX31: framebuffer driver"
This reverts commit 86528da229.

This version of the patch was tab-to-space corrupted before
application.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-02-26 13:58:37 -07:00
Russell King 22b61a11fd Merge branch 'dma' into devel
Conflicts:

	arch/arm/plat-mxc/dma-mx1-mx2.c
2009-02-21 21:42:50 +00:00
Sascha Hauer d96be879ff mmc: Add a MX2/MX3 specific SDHC driver
This patch adds a MX2/MX3 specific SDHC driver. The hardware is basically
the same as in the MX1, but unlike the MX1 controller the MX2
controller just works as expected. Since the MX1 driver has more
workarounds for bugs than anything else I had no success with supporting
MX1 and MX2 in a sane way in one driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-02-02 20:57:05 +01:00
Guennadi Liakhovetski 86528da229 i.MX31: framebuffer driver
This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
displays, vertical panning supported, no overlay support.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-21 10:32:34 -07:00
Guennadi Liakhovetski 5296b56d1b i.MX31: Image Processing Unit DMA and IRQ drivers
i.MX3x SoCs contain an Image Processing Unit, consisting of a Control
Module (CM), Display Interface (DI), Synchronous Display Controller (SDC),
Asynchronous Display Controller (ADC), Image Converter (IC), Post-Filter
(PF), Camera Sensor Interface (CSI), and an Image DMA Controller (IDMAC).
CM contains, among other blocks, an Interrupt Generator (IG) and a Clock
and Reset Control Unit (CRCU). This driver serves IDMAC and IG. They are
supported over dmaengine and irq-chip APIs respectively.

IDMAC is a specialised DMA controller, its DMA channels cannot be used for
general-purpose operations, even though it might be possible to configure
a memory-to-memory channel for memcpy operation. This driver will not work
with generic dmaengine clients, clients, wishing to use it must use
respective wrapper structures, they also must specify which channels they
require, as channels are hard-wired to specific IPU functions.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-01-19 15:36:21 -07:00
Darius Augulis 2a4f136fbd USB: add imx udc gadget driver
Implementation of USB device driver integrated in Freescale's i.MXL
processor.

Adds USB device driver for i.MXL.

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07 10:00:11 -08:00
Linus Torvalds b840d79631 Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
  x86: export vector_used_by_percpu_irq
  x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  sched: nominate preferred wakeup cpu, fix
  x86: fix lguest used_vectors breakage, -v2
  x86: fix warning in arch/x86/kernel/io_apic.c
  sched: fix warning in kernel/sched.c
  sched: move test_sd_parent() to an SMP section of sched.h
  sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
  sched: activate active load balancing in new idle cpus
  sched: bias task wakeups to preferred semi-idle packages
  sched: nominate preferred wakeup cpu
  sched: favour lower logical cpu number for sched_mc balance
  sched: framework for sched_mc/smt_power_savings=N
  sched: convert BALANCE_FOR_xx_POWER to inline functions
  x86: use possible_cpus=NUM to extend the possible cpus allowed
  x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
  x86: update io_apic.c to the new cpumask code
  x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
  x86: xen: use smp_call_function_many()
  x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
  ...

Fixed up trivial conflict in kernel/time/tick-sched.c manually
2009-01-02 11:44:09 -08:00
Russell King 4e57ea9a2e [ARM] dma: remove usage of dmamode_t from MXC platform support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-02 12:34:31 +00:00
Sascha Hauer a244909152 [ARM] MXC: do not include mach/hardware.h from mach/memory.h
Instead of including other header files, define PHYS_OFFSET directly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-18 16:40:14 +01:00
Sascha Hauer 44421e4258 [ARM] MXC: do not include mach/hardware.h from mach/timex.h
Instead of including other header files, define CLOCK_TICK_RATE directly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-18 16:40:12 +01:00
Sascha Hauer 9d631b835f [ARM] MXC: remove dependency to other include files from irqs.h
This patch removes the inclusion of mach/hardware.h from mach/irqs.h and
switches to more meaningful names for the irq related macros.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-18 16:40:11 +01:00
Sascha Hauer 7c99502383 [ARM] MX1/MX2 DMA: add missing local_irq_restore()
This patch adds a missing call to local_irq_restore() and fixes some
compiler warnings about unused variables for MX1.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-18 16:40:04 +01:00
Sascha Hauer 2955de5fad [ARM] MX1: Add missing selection of ARM920T
The MX1 only has one possible CPU type, ARM920T. Select it in
Kconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-18 09:32:23 +01:00
Claudio Scordino 47fee6fedd Unused variable 'reg' removed.
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:44 +01:00
Paulius Zaleckas d7927e1916 patch-mxc-fiq
Drivers which are going to use it will have to select it and use
mxc_set_irq_fiq() to set FIQ mode for this interrupt.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:43 +01:00
Darius Augulis 5032630f39 patch-mx1-mtd-xip
Adds MTD XIP support for ARCH_MX1.

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:42 +01:00
Paulius Zaleckas cfca8b539f patch-mxc-add-ARCH_MX1
Adds MX1 architecture to platform MXC. It will supersede mach-imx
and let it die.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:40 +01:00
Darius Augulis d133d6a893 patch-iomux-mx1-mx2-cleanup
Fix GIUS register setup in the mxc_gpio_mode().

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:26 +01:00
Valentin Longchamp a3cce2a8e2 MX31: UART5 pins definition
pins definition for UART5 when used in alternate mode 2

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:18 +01:00
Valentin Longchamp d1b3cc6de8 MX31: definitions for UART2 pins
UART2 pins when used in functionnal mode

Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:17 +01:00
Fabio Estevam 1553a1ec83 Add basic support for MX31PDK board.
Add basic support to the MX31PDK development board, also known
as MX31 3DS or MX31 3-stack board (http://www.freescale.com/imx31pdk).

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:57:57 +01:00
Sascha Hauer 1d5aa17be1 [ARM] MX3 iomux: add more pin definitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:46:18 +01:00
Sascha Hauer 7bd1822135 [ARM] MX1/MX2: simplify mxc_gpio_setup_multiple_pins
mxc_gpio_setup_multiple_pins used to take several ALLOC_MODE flags. Most
of them are unused, so simplify the function by removing the flags. Also,
instead of using a confusing MXC_GPIO_ALLOC_MODE_RELEASE flag in a function
having alloc in its name, add a mxc_gpio_release_multiple_pins function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:46:14 +01:00
Julien Boibessot d1900d3a18 [ARM] MX27: add i.MX27 SDHC1 and SDHC2 GPIO declarations
Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:46:09 +01:00
Sascha Hauer 1e7f3f48b3 MX27: Add USB pin function defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:44:51 +01:00
Sascha Hauer 8c8409539b [ARM] MX27ads: remove unused define
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:44:38 +01:00
Sascha Hauer 7cb3f6d268 [ARM] MX2: Add IRQ_GPIOE definition
The MX2 has 5 gpio ports, IRQ_GPIOE was missing so far.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:44:29 +01:00
Sascha Hauer 619e15508b MX27: Fix EMMA Base addresses
The EMMA (Enhanced Multimedia Engine) is divided into two parts, the
postprocessor and the preprocessor. Fix the base addresses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:44:17 +01:00
Sascha Hauer 33ebc19d54 [ARM] MX2: DMA updates
This one updates DMA support on MX2 which got broken in:
[ARM] Hide ISA DMA API when ISA_DMA_API is unset

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 12:17:47 +01:00
Rusty Russell 320ab2b0b1 cpumask: convert struct clock_event_device to cpumask pointers.
Impact: change calling convention of existing clock_event APIs

struct clock_event_timer's cpumask field gets changed to take pointer,
as does the ->broadcast function.

Another single-patch change.  For safety, we BUG_ON() in
clockevents_register_device() if it's not set.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
2008-12-13 21:20:26 +10:30
Russell King 0560cf5aa5 [ARM] Add a common typesafe __io implementation
As Al did for Versatile in 2ad4f86b60,
add a typesafe __io implementation for platforms to use.  Convert
platforms to use this new simple typesafe implementation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-30 11:45:54 +00:00
Russell King dcea83adc6 [ARM] Hide ISA DMA API when ISA_DMA_API is unset
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.

This allows us to remove a lot of mach/dma.h files which don't contain
any useful code.  Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-29 18:42:40 +00:00
Russell King 7ef4de17cc Merge branch 'highmem' into devel
Conflicts:

	arch/arm/mach-clps7500/include/mach/memory.h
2008-11-28 15:39:02 +00:00
Nicolas Pitre b5ee900258 [ARM] remove a common set of __virt_to_bus definitions
Let's provide an overridable default instead of having every machine
class define __virt_to_bus and __bus_to_virt to the same thing.  What
most platforms are using is bus_addr == phys_addr so such is the default.

One exception is ebsa110 which has no DMA what so ever, so the actual
definition is not important except only for proper compilation.  Also
added a comment about the special footbridge bus translation.

Let's also remove comments alluding to set_dma_addr which is not
(and should not) be commonly used.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-28 15:36:49 +00:00
Russell King c750815e2d [ARM] Arrange for platforms to select appropriate CPU support
Rather than:

	config CPU_BLAH
		bool
		depends on ARCH_FOO || MACH_BAR
		default y if ARCH_FOO || MACH_BAR

arrange for ARCH_FOO and MACH_BAR to select CPU_BLAH directly.

Acked-by: Nicolas Pitre <nico@marvell.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Acked-by: Brian Swetland <swetland@google.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-27 12:38:00 +00:00
Darius Augulis 5cac9d6558 [ARM] MXC: Fix mxc_gpio_get(), which must read PSR register instead DR.
The Data register holds the value we have written to a gpio. To
get the input value we must read the Pad Status Register MX3 (or Sample
Status register in MX1/2 terms)

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-10-30 15:56:35 +01:00
Sascha Hauer eadefeff9c [ARM] MX3: Use ioremap wrapper to map SoC devices nonshared
The internal devices of the MX3 Processor have to be mapped
MT_DEVICE_NONSHARED devices, otherwise cache corruptions occur.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-10-30 15:56:14 +01:00
Linus Torvalds 2be508d847 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (69 commits)
  Revert "[MTD] m25p80.c code cleanup"
  [MTD] [NAND] GPIO driver depends on ARM... for now.
  [MTD] [NAND] sh_flctl: fix compile error
  [MTD] [NOR] AT49BV6416 has swapped erase regions
  [MTD] [NAND] GPIO NAND flash driver
  [MTD] cmdlineparts documentation change - explain where mtd-id comes from
  [MTD] cfi_cmdset_0002.c: Add Macronix CFI V1.0 TopBottom detection
  [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c
  [JFFS2] Write buffer offset adjustment for NOR-ECC (Sibley) flash
  [MTD] mtdoops: Fix a bug where block may not be erased
  [MTD] mtdoops: Add a magic number to logged kernel oops
  [MTD] mtdoops: Fix an off by one error
  [JFFS2] Correct parameter names of jffs2_compress() in comments
  [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL
  [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written
  [MTD] [MAPS] Remove unused variable after ROM API cleanup.
  [MTD] m25p80.c extended jedec support (v2)
  [MTD] remove unused mtd parameter in of_mtd_parse_partitions()
  [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE
  [MTD] [NAND] driver extension to support NAND on TQM85xx modules
  ...
2008-10-20 09:03:12 -07:00
Russell King b1add0480a Merge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git
Merge branch 'imx-devel' into devel
2008-10-09 21:33:03 +01:00
Russell King 6a4690c22f Merge branch 'ptebits' into devel
Conflicts:

	arch/arm/Kconfig
2008-10-09 21:31:56 +01:00
Sascha Hauer 58a85f465f MX2: Add DMA support for mx2 and (eventually) mx1
This patch adds DMA support for Freescale i.MX27 SoCs. It is derived
from the i.MX1 port and should (though currently untested) still be
working for the i.MX1.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:56 +02:00
Darius Augulis 8b69ac577e MXC: Remove WD IRQ priority setting
Remove WD IRQ priority setting from ARCH_MXC common init code, because
it's application specific.

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:54 +02:00
Luotao Fu defa8c309d i.MX3: Fix compiler warnings
Fix some base address declaration by adding a cast.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:53 +02:00
Luotao Fu 8b0171fad1 MXC: add RTCK alternate function definitions
This one adds definitions to configure RTCK pad (PE16) in primary and alternate
function. The RTCK Pin is used by one wire master controller and as JTAG Clock
return.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:53 +02:00
Luotao Fu 2cf842b896 mxc: add cscr register defintions
This adds macros to get CSCR upper, lower and additional registers.
These registers are needed to configure a chip select line. The offset
layouts of these Registers are identical on mx27 and mx31, hence we can
use the macros in generic way

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:52 +02:00
Luotao Fu 7113cdcdc1 MX31: add macros to configure spi pins
this adds convenience values usable by mxc_iomux_mode() to configure Pins of the
spi interfaces on mx31.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:51 +02:00
Darius Augulis 479c901f59 MXC: Lets handle IRQ by priority, defined with exported API function
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 12:13:50 +02:00
Gilles Chanteperdrix d7568f79d5 i.MX31ADS: Add CPLD interrupts demultiplexing (take 3).
Needed for 8250 serial port and CS89x0 ethernet interface.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 10:19:42 +02:00
Sascha Hauer cfc135632a i.MX27: add definitions for USB pins
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 10:19:41 +02:00
Sascha Hauer 282b13d066 MXC: add convenience function to register platform devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-09 10:19:40 +02:00
Russell King fced80c735 [ARM] Convert asm/io.h to linux/io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 12:10:45 +01:00
Huang Weiyi 8b540fdcb7 [ARM] remove unused #include <version.h>
The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  arch/arm/plat-mxc/clock.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-04 10:47:14 +01:00
Sascha Hauer 34f6e15786 [MTD] [NAND] Freescale i.MX2 NAND driver
This patch adds support for the integrated NAND flash controller of the
i.MX2 and i.MX3 family. It is tested on MX27 but should work on MX3
aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-02 22:35:36 +01:00
Russell King a09e64fbc0 [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:55:48 +01:00
Russell King be50972935 [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:40:08 +01:00
Dmitry Baryshkov 6cab486029 [ARM] 5179/1: Replace obsolete IRQT_* and __IRQT_* values with IRQ_TYPE_*
IRQT_* and __IRQT_* were obsoleted long ago by patch [3692/1].
Remove them completely. Sed script for the reference:

s/__IRQT_RISEDGE/IRQ_TYPE_EDGE_RISING/g
s/__IRQT_FALEDGE/IRQ_TYPE_EDGE_FALLING/g
s/__IRQT_LOWLVL/IRQ_TYPE_LEVEL_LOW/g
s/__IRQT_HIGHLVL/IRQ_TYPE_LEVEL_HIGH/g
s/IRQT_RISING/IRQ_TYPE_EDGE_RISING/g
s/IRQT_FALLING/IRQ_TYPE_EDGE_FALLING/g
s/IRQT_BOTHEDGE/IRQ_TYPE_EDGE_BOTH/g
s/IRQT_LOW/IRQ_TYPE_LEVEL_LOW/g
s/IRQT_HIGH/IRQ_TYPE_LEVEL_HIGH/g
s/IRQT_PROBE/IRQ_TYPE_PROBE/g
s/IRQT_NOEDGE/IRQ_TYPE_NONE/g

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-27 09:46:18 +01:00
Juergen Beisert 1bd55a436f i.MX2 family: Add basic mach support
This patch adds basic mach support for the mx2 processor family, based
on the original freescale code and adapted to mainline kernel coding
style.

This part adds the global build only.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2008-07-05 10:03:02 +02:00
Juergen Beisert aa10abd381 i.MX2 family: Add GPIO multiplexing support
This patch adds GPIO multiplexing support for the imx1/mxc2
family of procesors.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2008-07-05 10:02:55 +02:00
Juergen Beisert 259bcaae9a MXC arch: Simplify architecture's irq sources
Simplify architecture's irq headers and sources, to share these files
between MXC3 and MXC2.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2008-07-05 10:02:54 +02:00
Juergen Beisert d0f349fbce i.MXC family: Adding timer support
This patch adds timer support for the i.MX machine family. This code can
be used on the following machs:

 - i.MX1 (tested)
 - i.MX2 (i.MX21 (to be tested), i.MX27 (tested))
 - i.MX3 (i.MX31 (tested))

TODO: It seems impossible to build a kernel for more than one CPU because the
timer do not follow the platform device rules. So it does only work if
timer 1 can be accessed on all CPUs at the same address.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-07-05 10:02:50 +02:00
Juergen Beisert 07bd1a6cc7 MXC arch: Add gpio support for the whole platform
This patch bases on the one from Daniel Mack. The most important change to
Daniel's patch is to be more generic. This gpio routine supports at least
the i.MX27 and i.MX31 processors.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Acked-by: Daniel Mack <daniel@caiaq.de>
2008-07-05 10:02:49 +02:00
Juergen Beisert c0db2ea4e3 MXC family: Add clock handling
Internal clock path handling for the mxc CPUs.

Changed against the original Freescale code (and against clocklib for example):
 - clock rate is always calculated whenever one ask for the current rate
   (means struct clk has no more a member called "rate"). So switching the PLL
   base frequency will propagate immediately to all other clocks that are
   depending on this frequency.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2008-07-05 10:02:47 +02:00
Robert Schwebel d2db9aaa4a [ARM] 4887/1: i.MXC family: Separate current platform code
From: Juergen Beisert <j.beisert@pengutronix.de>

This patch separates the current code into i.MX2 and i.MX3 and modifies
the Kconfig files to reflect this separation in the menus.

Things happend since last review:
 - make i.MX3 compile again
 - fix some structure names to be conform with all the shared/common
   sources from i.MX1/i.MX2

Previous changes:
 - stay conform to other Kconfig files (note from Russell King)

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-17 16:15:17 +01:00
Robert Schwebel 2c130fd529 [ARM] 4877/1: i.MXC family: Clean up current platform code
From: Juergen Beisert <j.beisert@pengutronix.de>

This patch cleans up the in-kernel platform code from doxygen comments.
We don't know how this could have leak in, but anyway.

Changes since last release:
 - none

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Ross Wille <wille@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-03-31 19:46:49 +01:00
Quinn Jensen 52c543f90c [ARM] 4461/1: MXC platform and i.MX31ADS core support
This patch adds the foundation pieces for
the Freescale MXC platforms, including
i.MX2 and i.MX3 based systems.

The bare-bones MX31 support in this patch
boots to the rootdev panic with 8250 serial
console configured "console=ttyS0,115200".
It assumes that Redboot is the boot loader.

Signed-off-by: Quinn Jensen <quinn.jensen@freescale.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-22 15:44:46 +01:00