Russell King [Mon, 20 Oct 2008 10:18:40 +0000 (11:18 +0100)]
[ARM] dma: correct dma_supported() implementation
dma_supported() is supposed to indicate whether the system can support
the DMA mask it was passed, which depends on the maximal address which
can be returned for DMA allocations. If the mask is smaller than that,
we are unable to guarantee that the driver can reliably obtain suitable
memory.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Anton Vorontsov [Thu, 23 Oct 2008 19:06:56 +0000 (21:06 +0200)]
[ARM] pxa: add basic support for HP iPAQ h5000
This patch adds HP iPAQ h5000's (h5400, h5500) basic definitions.
Kernel will able to boot, work via serial console, mount filesystems
placed on flashes and run USB gadgets (g_ether by default).
Other device drivers (frame buffer, LCD, touchscreen, backlight,
bluetooth, w1/battery, ...) are depend on SAMCOP and MediaQ
SoCs/MFDs, drivers to which will be submitted too, after massive
cleanups.
This machine will be used as "real user" for these new drivers.
This is an updated version of the patch, which contains fixes proposed on
linux-arm-kernel mailing list.
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Robert Jarzmik [Sat, 15 Nov 2008 15:09:59 +0000 (16:09 +0100)]
[ARM] pxa/MioA701: improve power supply sources
Take advantage of the newly created wm97xx battery driver
and remove useless code in mioa701 board code. Add also the
ac connection detect capability after the matching gpio was
discovered.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Robert Jarzmik [Tue, 18 Nov 2008 19:23:32 +0000 (20:23 +0100)]
[ARM] pxa/MioA701: discovered new gpio definitions.
The charger enable gpio is straight (1 means draw from USB
Vbus, 0 mean do not draw). The USB Vbus sensing is inverted
(1 means no Vbus voltage sensed, 0 means Vbus voltage
present).
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Robert Jarzmik [Sat, 15 Nov 2008 15:09:58 +0000 (16:09 +0100)]
[ARM] pxa/MioA701: change reset function to preserve RTC.
Change the halt and reboot method from gpio based to "jump
to ROM IPL beginning". This gives control back to IPL, which
without PowerOn key pressed, will put the device into deep
sleep until PowerOn is pressed for 1 second.
But this has the benefit of keeping the RTC registers across
reboots, which is good for OS change.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Robert Jarzmik [Sat, 15 Nov 2008 15:09:54 +0000 (16:09 +0100)]
[ARM] pxa/MioA701: add camera support for Mio A701 board.
Add GPIO configuration and platform specific declarations
to make Mitac Mio A701 camera chip work. The chip is a
Micron MT9M111 CMOS sensor, based on PXA QIF interface and
I2C bus for sensor control.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Since mioa701 board has migrated to the mfp architecture,
low power gpio setup is now correctly handled even when gpio
led driver is not loaded, and leds and vibrator don't stay
activated in suspend mode (especially vibrator).
Remove the not needed anymore dependency.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Philipp Zabel [Sun, 29 Jun 2008 14:53:34 +0000 (16:53 +0200)]
[ARM] pxa: cpufreq-pxa2xx: sdram_rows detection support
This patch implements Eric Miao's idea to detect the correct value of
sdram_rows by inspecting the MDCNFG register settings.
It is only tested on two pxa27x devices with 64MB RAM (magician and
hx4700) so far.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Marc Zyngier [Tue, 4 Nov 2008 12:33:25 +0000 (13:33 +0100)]
[ARM] pxa: cpufreq-pxa2xx: allow frequency table selection
Following the removal of the "->policy" usage for PXA255 in patch 459fc208abd1b365fa013c17d433dfb5b4bc1e3a (cpufreq: remove
policy->governor setting in drivers initialization), this patch
introduces an option (called "pxa255_turbo_table") to select either
the "run" or "turbo" frequency table.
It also cures the runtime warning that was printed each time the
frequency was changed.
Got rid of all references to CPUFREQ_POLICY_* for pxa255, and sticked
with the run/turbo thing.
Tested on an Arcom/Eurotech Viper.
Signed-off-by: Marc Zyngier <maz@misterjones.org> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Eric Miao [Sat, 29 Nov 2008 13:42:39 +0000 (21:42 +0800)]
[ARM] pxa: add base PXA935 support due to CPUID change
PXA935 has changed its implementor ID from Intel to Marvell, this
patch modifies arch/arm/boot/compressed/head.S and proc-xsc3.S to
support a smooth bootup.
Eric Miao [Fri, 28 Nov 2008 06:19:33 +0000 (14:19 +0800)]
[ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h
The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.
Eric Miao [Fri, 28 Nov 2008 05:38:03 +0000 (13:38 +0800)]
[ARM] pxa: remove the now unused IMPMCR/IMPMSR register definitions
There two are internal registers that are used to control the power
management of the Internal Memory (i.e. Internal SRAM). They are
referenced nowhere and removed here to simplify pxa-regs.h a bit.
Eric Miao [Thu, 27 Nov 2008 09:08:42 +0000 (17:08 +0800)]
[ARM] pxa: remove unused PWM register definitions, use generic PWM API
We now have generic PWM API for PXA, the PWM registers definitions are
now used nowhere, and it is not encouraged to manipulate them directly
by driver code.
Eric Miao [Sun, 30 Nov 2008 12:58:42 +0000 (20:58 +0800)]
[ARM] pxa: removed unused declarations of pxa_gpio_* in hardware.h
pxa_gpio_{get,set}_value() are not used anymore, remove them from hardware.h.
Declaration of pxa_gpio_mode() is still being referenced and thus moved into
pxa2xx-gpio.h
Eric Miao [Wed, 26 Nov 2008 10:12:04 +0000 (18:12 +0800)]
[ARM] pxa: add support for additional GPIOs on PXA26x
Original patch from Marek Vasut, the problems with PXA26x are:
1. there are additional 4 GPIOs 86,87,88,89 have their direction bits
inverted in GPDR2, as well as their alternate function bits being
'1' for their GPIO functionality in GAFRx
2. there is no easy way to decide if the processor is a pxa26x or a
pxa250/pxa255 at run-time, so the assumption here is the pxa26x
will be treated as one of the pxa25x variants, and board code
should have a better knowledge of the processor it is featured
Introduce pxa26x_init_irq() for the second purpose, and treat the
additional GPIOs > 85 on PXA25x specially.
Kconfig option CONFIG_CPU_PXA26x is introduced to optimize the code
a bit when PXA26x support isn't needed. Board config options have
to select this to enable the support for PXA26x.
__gpio_is_inverted() will be optimized way when CONFIG_CPU_PXA26x
isn't selected.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Hartley Sweeten [Tue, 28 Oct 2008 16:55:30 +0000 (17:55 +0100)]
[ARM] 5324/2: ep93xx: support gpio interrupt debounce
Add debounce support for ep93xx gpio interrupts.
On the EP93xx, GPIO ports A, B, and F can be used to generate
interrupts. For each port, if interrupts are enabled, it is
possible to debouce the input signal. Debouncing is implemented
by passing the input signal through a 2-bit shift register clocked
by a 128Hz clock.
This patch adds a platform specific way to enable the debouce
feature for these input ports.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Hartley Sweeten [Thu, 16 Oct 2008 22:57:03 +0000 (23:57 +0100)]
[ARM] 5311/1: ep93xx: add core support for built in i2c bus
Allow the ep93xx platform init code to register the built-in i2c bus.
The EP93xx processor has two GPIO pins dedicated for an I2C bus. This
patch registers the platform supplied i2c_board_info and the necessary
platform_device information for the i2c-gpio driver to use these pins.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Stelian Pop [Wed, 22 Oct 2008 12:52:08 +0000 (13:52 +0100)]
[ARM] 5319/1: AT91: support AT91CAP9 revC CPUs
The AT91CAP9 revC CPU has a few differences over the previous,
revB CPU which was distributed in small quantities only (revA was
an internal Atmel product only).
This patch adds the detection routines to recognize the different
AT91CAP9 revisions (based on the PMC subsystem version number), and
uses them to:
- activate a workaround for the external interrupts levels
(on revB CPUs)
- set the UDPHS_BYPASS bit (on revB CPUs)
- set AT91_GPBR register address to the correct offset
(0xfffffd50 on revB, 0xfffffd60 on revC)
For debugging usage, the CPU revision can be found in /proc/cpuinfo
on the 'Revision' line.
This patch is extracted from Andrew Victor's -at91 patch (2.6.27-at91.patch)
where it has been tested for the last 6 months.
Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Mon, 6 Oct 2008 19:13:53 +0000 (20:13 +0100)]
[ARM] 5290/1: [AT91] Add support for the Adeneo NeoCore 926 board
Add support for the Adeneo NeoCore 926 board.
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Mon, 6 Oct 2008 19:05:35 +0000 (20:05 +0100)]
[ARM] 5289/1: [AT91] Convert boards to use sam9_smc_configure()
Convert the SAM9 and CAP9 board-specific files to make use of the
sam9_smc_configure() method to configure the memory-controller for
external peripherals.
The following boards have been modified:
cam60 : NAND
cap9adk : NAND, NOR
qil-a9260 : NAND
sam9-l9260 : NAND
sam9260ek : NAND
sam9261ek : DM9000 Ethernet, NAND
sam9263 : NAND
sam9g20ek : NAND
sam9rlek : NAND
usb-a9260 : NAND
usb-a9263 .: NAND
Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Mon, 6 Oct 2008 19:01:00 +0000 (20:01 +0100)]
[ARM] 5288/1: [AT91] Remove SMC configuration from devices.c files
In at91_add_device_nand(), do not configure the Static Memory
controller with specific timing values.
The *_devices.c files are board independent, and the SMC timing values
are specific to the NAND devices that are installed on the board.
The board-specific files are now responsible for configuring the
Static Memory controller (if the don't want to leave it up to a
bootloader).
Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Andrew Victor [Mon, 13 Oct 2008 19:28:13 +0000 (20:28 +0100)]
[ARM] 5287/2: [AT91] Configuration of Static Memory Controller
Add a structure 'sam9_smc_config' and function sam9_smc_configure() to
allow the board-specific files to specify the configuration of the
Static Memory Controller per chip-select. This allows the board file
to specify timings for NAND flash, NOR flash or other external
peripherals.
This functionality can be used for all the SAM9 and CAP9 processors.
(the AT91RM9200 has a different memory-controller)
This patch is based on similar code in the AVR32 architecture.
Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Catalin Marinas [Mon, 1 Dec 2008 14:55:00 +0000 (14:55 +0000)]
RealView: Update the realview-smp_defconfig file to a newer kernel
The original file was based on 2.6.19-rc3. Apart from the new symbols,
the explicitly enabled eatures are AEABI, REALVIEW_HIGH_PHYS_OFFSET and
MACH_REALVIEW_PB11MP.
Catalin Marinas [Mon, 1 Dec 2008 14:54:59 +0000 (14:54 +0000)]
RealView: Update the realview_defconfig file to a newer kernel
The original file was based on 2.6.14-rc2. Apart from the new symbols,
the explicitly enabled features are AACI, MMC, AEABI,
MACH_REALVIEW_PB1176 and MACH_REALVIEW_PB11MP.
Catalin Marinas [Mon, 1 Dec 2008 14:54:59 +0000 (14:54 +0000)]
RealView: Allow the in-kernel smc911x.c driver on RealView
This patch adds smc911x.c device configuration to the RealView
platforms. At some point it may be changed to the new smsc911x.c driver
(once complete testing was done).
Catalin Marinas [Mon, 1 Dec 2008 14:54:57 +0000 (14:54 +0000)]
RealView: Use only the shadow mapping of ARM11MPCore local timers
All the cases where the local timer for a CPU is accessed happen on the
corresponding current CPU, hence no need to access the per-CPU local
timer mappings.
Catalin Marinas [Mon, 1 Dec 2008 14:54:55 +0000 (14:54 +0000)]
RealView: Allow PHYS_OFFSET at 0x70000000
RealView boards like PB11MPCore have 512MB of RAM available contiguously
at 0x70000000. Half of the memory is mirrored at 0x00000000 for
backwards compatibility. This patch adds the
CONFIG_REALVIEW_HIGH_PHYS_OFFSET option option to change the physical
base address so that the full amount of RAM is available to Linux. Note
that the EB board has 256MB of RAM also mirrored at 0x70000000, the only
board without this feature being PB1176.
Russell King [Mon, 1 Dec 2008 11:53:07 +0000 (11:53 +0000)]
[ARM] use asm/sections.h
Update to use the asm/sections.h header rather than declaring these
symbols ourselves. Change __data_start to _data to conform with the
naming found within asm/sections.h.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Sun, 30 Nov 2008 17:38:14 +0000 (17:38 +0000)]
[ARM] amba drivers: don't pass a consumer clock name for devices with unique clocks
Where devices only have one consumer, passing a consumer clock ID
has no real benefit, and it only encourages wrong implementations of
the clk API. Remove it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Sun, 30 Nov 2008 11:45:54 +0000 (11:45 +0000)]
[ARM] Add a common typesafe __io implementation
As Al did for Versatile in 2ad4f86b60b649fd7428265c08d73a3bd360c81b,
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>
Russell King [Sat, 29 Nov 2008 19:14:31 +0000 (19:14 +0000)]
[ARM] give RiscPC a NR_IRQS definition and remove default
RiscPC is the only platform using the default setting for NR_IRQS,
so the default NR_IRQS doesn't really make sense; remove it and
make RiscPC provide such a definition.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Sat, 29 Nov 2008 11:40:28 +0000 (11:40 +0000)]
[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>
Russell King [Sat, 29 Nov 2008 10:56:33 +0000 (10:56 +0000)]
[ARM] fix constant values of MAX_DMA_ADDRESS
Since 8d5796d2ec6b5a4e7a52861144e63af438d6f8f7, we have allowed
PAGE_OFFSET to be configurable, so a constant virtual address
for MAX_DMA_ADDRESS is buggy. It should be defined in terms of
PAGE_OFFSET rather than a constant virtual address.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Fri, 28 Nov 2008 16:13:44 +0000 (16:13 +0000)]
[ARM] iop3xx: avoid polluting the kernel's namespace
Avoid unnecessarily pollution of the kernel's namespace by avoiding
mach/hardware.h in mach/io.h, mach/memory.h and mach/timex.h. Include
this header file where necessary.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>