aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-04-19[ARM] pxa: move ARRAY_AND_SIZE definition to generic.heric miao4-4/+4
for use by other platforms Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: add MFP-alike pin configuration support for pxa{25x, 27x}eric miao5-2/+915
Pin configuration on pxa{25x,27x} has now separated from generic GPIO into dedicated mfp-pxa2xx.c by this patch. The name "mfp" is borrowed from pxa3xx and is used here to alert the difference between the two concepts: pin configuration and generic GPIOs. A GPIO can be called a "GPIO" _only_ when the corresponding pin is configured so. A pin configuration on pxa{25x,27x} is composed of: - alternate function selection (or pin mux as commonly called) - low power state or sleep state - wakeup enabling from low power mode The following MFP_xxx bit definitions in mfp.h are re-used: - MFP_PIN(x) - MFP_AFx - MFP_LPM_DRIVE_{LOW, HIGH} - MFP_LPM_EDGE_* Selecting alternate function on pxa{25x, 27x} involves configuration of GPIO direction register GPDRx, so a new bit and MFP_DIR_{IN, OUT} are introduced. And pin configurations are defined by the following two macros: - MFP_CFG_IN : for input alternate functions - MFP_CFG_OUT : for output alternate functions Every configuration should provide a low power state if it configured as output using MFP_CFG_OUT(). As a general guideline, the low power state should be decided to minimize the overall power dissipation. As an example, it is better to drive the pin as high level in low power mode if the GPIO is configured as an active low chip select. Pins configured as GPIO are defined by MFP_CFG_IN(). This is to avoid side effects when it is firstly configured as output. The actual direction of the GPIO is configured by gpio_direction_{input, output} Wakeup enabling on pxa{25x, 27x} is actually GPIO based wakeup, thus the device based enable_irq_wake() mechanism is not applicable here. E.g. invoking enable_irq_wake() with a GPIO IRQ as in the following code to enable OTG wakeup is by no means portable and intuitive, and it is valid _only_ when GPIO35 is configured as USB_P2_1: enable_irq_wake( gpio_to_irq(35) ); To make things worse, not every GPIO is able to wakeup the system. Only a small number of them can, on either rising or falling edge, or when level is high (for keypad GPIOs). Thus, another new bit is introduced to indicate that the GPIO will wakeup the system: - MFP_LPM_WAKEUP_ENABLE The following macros can be used in platform code, and be OR'ed to the GPIO configuration to enable its wakeup: - WAKEUP_ON_EDGE_{RISE, FALL, BOTH} - WAKEUP_ON_LEVEL_HIGH The WAKEUP_ON_LEVEL_HIGH is used for keypad GPIOs _only_, there is no edge settings for those GPIOs. These WAKEUP_ON_* flags OR'ed on wrong GPIOs will be ignored in case that platform code author is careless enough. The tradeoff here is that the wakeup source is fully determined by the platform configuration, instead of enable_irq_wake(). Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.heric miao35-301/+337
two reasons: 1. GPIO namings and their mode definitions are conceptually not part of the PXA register definitions 2. this is actually a temporary move in the transition of PXA2xx to use MFP-alike APIs (as what PXA3xx is now doing), so that legacy code will still work and new code can be added in step by step Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: move mfp sysdev registeration out for suspend/resume ordereric miao3-10/+13
MFP configurations after resume should be done before the GPIO registers are restored. Move the mfp sysdev registeration to the same place where GPIO and IRQ sysdev(s) are registered to better control the order. Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: rename mfp.c to mfp-pxa3xx.c to indicate it's pxa3xx specificeric miao2-1/+1
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: make pxa_gpio_irq_type() processor genericeric miao1-2/+18
The main issue here is that pxa3xx does not have GAFRx registers, access directly to these registers should be avoided for pxa3xx: 1. introduce __gpio_is_occupied() to indicate the GAFRx and GPDRx registers are already configured on pxa{25x,27x} while returns 0 always on pxa3xx 2. pxa_gpio_mode(gpio | GPIO_IN) is replaced directly with assign- ment of GPDRx, the side effect of this change is that the pin _must_ be configured before use, pxa_gpio_irq_type() will not change the pin to GPIO, as this restriction is sane, esp. with the new MFP framework Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: move GPIO sysdev outside of generic.c into gpio.ceric miao2-62/+57
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: merge assignment of set_wake into pxa_init_{irq,gpio}()eric miao6-49/+25
To further clean up the GPIO and IRQ structure: 1. pxa_init_irq_gpio() and pxa_init_gpio() combines into a single function pxa_init_gpio() 2. assignment of set_wake merged into pxa_init_{irq,gpio}() as an argument Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: integrate low IRQ chip (ICIP) and high IRQ chip (ICIP2) into oneeric miao6-105/+42
This makes the code better organized and simplified a bit. The change will lose a bit of performance when performing IRQ ack/mask/unmask,but that's not too much after checking the result binary. This patch also removes the ugly #ifdef CONFIG_PXA27x .. #endif by carefully not to access those pxa{27x,3xx} specific registers, this is done by keeping an internal IRQ number variable. The pxa-regs.h is also modified so registers for IRQ > PXA_IRQ(31) are made public even if CONFIG_PXA{27x,3xx} isn't defined (for pxa25x's sake) The incorrect assumption in the original code that internal irq starts from 0 is also corrected by comparing with PXA_IRQ(0). "struct sys_device" for the IRQ are reduced into one single device on pxa{27x,3xx}. Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: move GPIO IRQ specific code out of irq.c into gpio.ceric miao3-183/+185
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: introduce GPIO_CHIP() macro to clean up the definitionseric miao1-48/+18
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: cleanup the coding style of pxa_gpio_set_type()eric miao1-22/+20
by 1. wrapping long lines and making comments tidy 2. using IRQ_TYPE_* instead of migration macros __IRQT_* 3. introduce a pr_debug() for the commented printk(KERN_DEBUG ...) stuff Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: make GPIO IRQ code less dependent on the internal IRQseric miao1-5/+19
by: 1. introduce dedicated pxa_{mask,unmask}_low_gpio() 2. remove set_irq_chip(IRQ_GPIO_2_x, ...) which has already been initialized in pxa_init_irq() 3. introduce dedicated pxa_init_gpio_set_wake() Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] pxa: generalize the muxed gpio IRQ handling code with loop and ffs()eric miao1-58/+16
1. As David Brownell suggests, using ffs() is going to make the loop a bit faster (by avoiding unnecessary shift and iteration) 2. Russell suggested find_{first,next}_bit() being used with the gedr[] array Signed-off-by: eric miao <eric.miao@marvell.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4868/1: Enhance pxa270 GPIO definitionsRobert Jarzmik1-14/+54
Enhanced GPIO alternate functions descriptions, taken from Intel PXA270 Developers Manual. Signed-off-by: Robert Jarzmik <rjarzmik@free.fr> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4834/3: Convert ASoC pxa2xx-ac97 driver to use the clock APIMark Brown1-11/+38
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4833/3: Convert non-SoC PXA2xx AC97 driver to clock APIMark Brown1-8/+40
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4832/2: Support AC97CLK on PXA3xx via the clock APIMark Brown1-2/+28
The AC97 clock rate on PXA3xx is generated with a configurable divider from sys_pll. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4831/2: Add PXA2xx AC97 clocks to clock APIMark Brown2-0/+5
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4830/1: Add support for the CLK_POUT pin on PXA3xx CPUsMark Brown2-0/+31
Expose control of the PXA3xx 13MHz CLK_POUT pin via the clock API Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] remove redundant display of free swap space in show_mem()Johannes Weiner1-2/+0
Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] Fix kernel mode preemptionRussell King1-19/+5
Luc Van Oostenryck reported: The code removed by this patch tested the irq_cpustat_t members __local_irq_count and __local_bh_count but these fields have been removed some time ago: http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=3ab146c93e039dec99fec8d441a8dd046fe510cc Fix this oversight. Acked-by: Bill Gatliff <bgat@billgatliff.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4881/1: print unrecognised processor ID as part of failure messageLennert Buytenhek1-1/+6
If we fail to boot due to an unsupported processor ID, print the processor ID as part of the failure message. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4854/1: fix the load address of uImage for CONFIG_ZBOOT_ROM=yUwe Kleine-König1-1/+7
U-Boot puts an image at the load address specified in the uImage header before jumping to the entry point. In the CONFIG_ZBOOT_ROM case ZBOOT_ROM_TEXT is the right load address. Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] 4852/1: Add timerfd_create, timerfd_settime and timerfd_gettime syscall entriesUwe Kleine-König2-2/+6
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19[ARM] Update mach-typesRussell King1-4/+113
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-18Allow the L2X0 outer cache support to be configurableCatalin Marinas5-4/+11
By default, this option was selected by the platform Kconfig. This patch adds "depends on" to L2X0 so that it can be enabled/disabled manually. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Add the configuration and build changes for PB1176Bahadir Balban3-1/+9
This patch enables the building of Linux for the PB1176 platform. Signed-off-by: Bahadir Balban <bahadir.balban@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Add uncompressing support for PB1176Catalin Marinas1-0/+3
This patch adds the UART0 base address detection in uncompress.h. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Base support for the PB1176 platformBahadir Balban3-0/+443
This patch adds the base files for the PB1176 platform support. Signed-off-by: Bahadir Balban <bahadir.balban@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Add compactflash support for the PB11MPCore platformBahadir Balban1-0/+26
This patch adds the resource and device definitions for the compact flash. Signed-off-by: Bahadir Balban <bahadir.balban@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Enable the configuration options for PB11MPCoreBahadir Balban4-3/+13
This patch adds the PB11MPCore support to the corresponding Kconfig and Makefile to enable building. Signed-off-by: Bahadir Balban <bahadir.balban@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Add uncompressing support to PB11MPCoreCatalin Marinas1-0/+3
This patch adds the UART address detection in uncompress.h for the PB11MPCore platform. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Add the SMP initialisation support for PB11MPCoreCatalin Marinas1-2/+11
This patch adds the initialisation calls for the SMP support on the PB11MPCore platform. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Base support for the PB11MPCore platformBahadir Balban3-0/+501
This patch adds the base files for the PB11MPCore platform support. Signed-off-by: Bahadir Balban <bahadir.balban@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Change the IO_ADDRESS macroCatalin Marinas2-2/+2
This patch changes the IO_ADDRESS macro for the RealView platforms to accomodate a wider range of physical addresses on PB11MPCore. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Allow ARMv7 support for RealView/EBCatalin Marinas1-1/+1
This patch changes the CPU_V7 configuration dependency to allow MACH_REALVIEW_EB. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Move more device address definitions to board-eb.hCatalin Marinas3-36/+30
The upcoming PB11MPCore and PB1176 have different memory maps and some of the definitions in platform.h are no longer common. This patch moves them to the board-eb.h file and updates their usage in realview_eb.c. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Move the UART definitions to EB specific filesCatalin Marinas4-28/+44
Since the PB1176 has different UART base addresses, this patch moves the definitions form platorm.h to board-eb.h. It also modifies uncompress.h to detect the platform type at run-time. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Move the timer definitions into the EB specific filesCatalin Marinas5-25/+34
This patch moves the timer definitions from platform.h into board-eb.h as they are different on PB11MPCore and PB1176. It also adds timerX_va_base variables in core.c which are set by the realview_eb_timer_init function before invoking realview_timer_init. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Move the flash definitions out of platform.hCatalin Marinas5-12/+17
This patch moves the patch definitions into board-eb.h and realview_eb.c (from core.c) as they are different on the PB11MPCore and PB1176 platforms. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Move the EB GIC definitions to the board fileCatalin Marinas3-10/+11
This is in preparation for the RealView PB11MPCore and PB1176 patches which have different base addresses for the GIC. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18Add RealView/EB support for the LAN9118 Ethernet chipCatalin Marinas1-8/+31
RealView/EB revD platform comes with the SMSC LAN9118 Ethernet chip. This patch allows either the smc91x or the smc911x drivers to be used with the RealView/EB platform. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18RealView: Move the SCU initialisation out of __v6_setupCatalin Marinas4-40/+43
This patch moves the SCU initialisation from __v6_setup to the smp_prepare_cpus() function as it relies on platform-specific settings. Changes to get_core_count() are mainly for allowing cleaner code with the upcoming PB11MPCore patches. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18Linux Thumb-2 support for user-space applicationsPaul Brook1-9/+44
This patch implements Thumb-2 application support in Linux. Original implementation by Paul Brook with fixes for VFP and Neon by Catalin Marinas. Signed-off-by: Paul Brook <paul@codesourcery.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18Add a prefetch abort handlerPaul Brook22-40/+137
This patch adds a prefetch abort handler similar to the data abort one and renames the latter for consistency. Initial implementation by Paul Brook with some renaming by Catalin Marinas. Signed-off-by: Paul Brook <paul@codesourcery.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-18ARMv7: Add support for the ThumbEE state saving/restoringCatalin Marinas6-0/+96
This patch adds the detection and handling of the ThumbEE extension on ARMv7 CPUs. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2008-04-17[ARM] 4963/1: S3C2410 - add basic machine support for the TCT HammerDavid Anders4-0/+1054
Add the TinCanTools Hammer board to list of supported machines in the arch/arm/mach-s3c2410 directory, as well as a default config entry. the mach-tct_hammer.c file initializes basic i/o, clocks, irqs, as well as the mtd flash layout if enabled in the kernel configuration. Signed-off-by: David Anders <danders@amltd.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-17[ARM] 4883/1: Adds some missing gpio defines for S3C2410Davide Rizzo1-0/+4
This is a small addition of forgotten defines to regs-gpio.h include file for the Samsung S3C2410 ARM9 SoC Signed-off-by: Davide Rizzo <davide@elpa.it> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-17[ARM] 4987/1: S3C24XX: Ensure watchdog reset initiated from cached code.Ben Dooks3-45/+92
There seems to be some problem with at-least the S3C2440 and bus traffic during an reset. It is unlikely, but still possible that the system will hang in such a way that the watchdog cannot get the system out of the state it is in. Change to making the code that calls the watchdog reset run from cached memory so that instruction fetches have quiesced before the watchdog fires. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>