aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-25[AVR32] extint: Set initial irq type to low levelHaavard Skinnemoen1-3/+3
David Brownell pointed out a mismatch in the avr32 extint code: > I noticed a small glitch that's not fixed by this patch: the > initial type is falling edge, but IRQ_TYPE_NONE is mapped to > IRQ_TYPE_LEVEL_LOW. Potentially surprising. Fix it by setting the initial type (and handler) to low level, matching the meaning of IRQ_TYPE_NONE. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] extint: change set_irq_type() handlingDavid Brownell1-11/+7
Update the AVR32 EIC code to use the new __set_irq_handler_unlocked() call, getting rid of one more instance of this widespread problem. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] NMI debuggingHaavard Skinnemoen2-7/+33
Change the NMI handler to use the die notifier chain to signal anyone who cares. Add a simple "nmi debugger" which hooks into this chain and that may dump registers, task state, etc. when it happens. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2008-01-25[AVR32] Add support for AT32AP7001 and AT32AP7002Haavard Skinnemoen3-9/+21
These are derivatives of the AT32AP7000 chip, which means that most of the code stays the same. Rename a few files, functions, definitions and config symbols to reflect that they apply to all AP700x chips, and exclude some platform devices from chips where they aren't present. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15[AVR32] Export intc_get_pending symbolHaavard Skinnemoen1-1/+3
Oprofile needs to call intc_get_pending() in order to determine whether a performance counter interrupt is pending. Also, include the header which declares intc_get_pending() and fix the definition to match the prototype. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15[AVR32] Fix duplicate clock index in at32ap machine codeben.nizette@iinet.net.au1-1/+1
There's a duplicate clock index between USART0 and USART1 which may be causing system crashes when USART0 is used. Change the USART0 index to '3', indicating the clock that is actually used by USART0. Signed-off-by: Ben Nizette <ben@niasdigital.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15[AVR32] Turn off debugging in SMC driverHaavard Skinnemoen1-1/+0
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15Extend I/O resource for wdt0 for at32ap7000 devicesHans-Christian Egtvedt1-1/+1
This patch extends the I/O resource to 0xfff000cf which will enable the watchdog driver to access the reset cause (RCAUSE) register. Making it capable of reporting boot status. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23[AVR32] ARRAY_SIZE() cleanupAlejandro Martinez Ruiz1-1/+1
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23[AVR32] Implement at32_add_device_cf()Haavard Skinnemoen1-31/+102
Implement at32_add_device_cf() which will add a platform_device for the at32_cf driver (not merged yet). Separate out most of the at32_add_device_ide() code and use it to implement at32_add_device_cf() as well. This changes the API in the following ways: * The board code must initialize data->cs to the chipselect ID to use before calling any of these functions. * The board code must use GPIO_PIN_NONE to indicate unused CF pins. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23[AVR32] Implement more at32_add_device_foo() functionsHaavard Skinnemoen1-0/+208
Implement functions for adding platform devices for TWI, MCI, AC97C and ABDAC. They may need to be modified to cope with platform data, etc. when the corresponding drivers are ready to be merged, but such changes are much less likely to conflict than adding support for a whole new type of device. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23[AVR32] Fix a couple of sparse warningsHaavard Skinnemoen2-3/+3
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-23[AVR32] Platform code for pata_at32Kristoffer Nyborg Gregertsen1-0/+65
This patch adds platform code for PATA devices on the AP7000. [hskinnemoen@atmel.com: board code left out for now since stk1000 doesn't support IDE out of the box] Signed-off-by: Kristoffer Nyborg Gregertsen <kngregertsen@norway.atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11[AVR32] SMC configuration in clock cyclesKristoffer Nyborg Gregertsen1-17/+112
This patch makes the SMC configuration take timings in clock cycles instead of nanoseconds. A function to calculate timings in clock cycles is added. This patch removes the rounding troubles of the previous SMC configuration method. [hskinnemoen@atmel.com: fix atstk1002/atngw100 flash config] Signed-off-by: Kristoffer Nyborg Gregertsen <gregerts@stud.ntnu.no> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11[AVR32] Wire up USBA deviceHaavard Skinnemoen1-0/+68
Implement at32_add_device_usba() and use it to wire up the USBA device on ATSTK1000 and ATNGW100. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11[AVR32] add multidrive support for pio driverMatteo Vit1-0/+4
This patch add multidrive support for pio driver Signed-off-by: Matteo Vit - Dave S.r.l. <matteo.vit@dave.eu> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11[AVR32] /sys/kernel/debug/at32ap_clkDavid Brownell1-0/+116
When debugfs is available, /sys/kernel/debug/at32ap_clk will provide a dump of the power manager registers and of the current clock tree. This can help sorting out various surprises, and when making runtime PM work. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11[AVR32] Move AT32_PM_BASE definition into pm.hHaavard Skinnemoen2-6/+8
We don't want to redefine this in every file that needs to access the PM. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18[AVR32] Add Atmel SSC driver platform device to AT32AP architectureHans-Christian Egtvedt1-0/+86
This patch adds register definitions, clocks and IRQs to the platform devices. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18[AVR32] CPU frequency scaling for AT32APHans-Christian Egtvedt3-2/+154
This patch enables CPU frequency scaling for AT32AP devices. This will enable the CPU to scale between the speed of the high speed bus and the master clock and thus save some power. The patch also adds a parent to cpu_clk and a cpu_clk_set_rate to enable changing the CPU clock divider in a sane way. The driver does not check if the given rate is 0, thus resulting in a div by 0. I think this check should be go into the clk_set_rate framework, and not here. Tested on AT32AP7000/ATSTK1000. Hardware documentation can be found in the AT32AP7000 datasheet. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-07-18[AVR32] Split SM device into PM, RTC, WDT and EICHaavard Skinnemoen5-426/+372
Split the SM platform device into separate platform devices for PM, RTC, WDT and EIC. This is more correct according to the documentation and allows us to simplify the code a little. Also turn the EIC driver into a real platform driver. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
2007-06-23[AVR32] Initialize dma_mask and dma_coherent_maskDavid Brownell1-0/+12
The current at32ap7000 platform devices aren't declared as supporting DMA, so that layered drivers can't tell whether they need to manage DMA. This patch makes all those platform devices report that they support DMA. Most do, but in a few cases this is inappropriate. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-05-15[AVR32] Implement platform hooks for atmel_lcdfb driverHaavard Skinnemoen1-17/+60
This modifies and extends the existing lcdc platform code to support the new atmel_lcdfb driver. The ATSTK1000 board code is set up to use the on-board Samsung LTV350QV LCD panel. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-05-09AVR32: Spinlock initializer cleanupThomas Gleixner1-1/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27[AVR32] Make I/O access macros work with external devicesHaavard Skinnemoen1-1/+25
Fix the I/O access macros so that they work with externally connected devices accessed in little-endian mode over any bus width: * Use a set of macros to define I/O port- and memory operations borrowed from MIPS. * Allow subarchitecture to specify address- and data-mangling * Implement at32ap-specific port mangling (with build-time configurable bus width. Only one bus width at a time supported for now.) * Rewrite iowriteN and friends to use write[bwl] and friends (not the __raw counterparts.) This has been tested using pata_pcmcia to access a CompactFlash card connected to the EBI (16-bit bus width.) Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27[AVR32] Don't enable clocks with no usersHaavard Skinnemoen2-1/+14
Bring the code that sets the initial PM clock masks in line with the comment preceding it by only enabling clocks that have users != 0. Fix SM clock definition and avr32_hpt_init() so that the SM and TC0 clocks keep ticking. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27[AVR32] Change system timer from count-compare to Timer/Counter 0Hans-Christian Egtvedt3-0/+236
Due to limitation of the count-compare system timer (not able to count when CPU is in sleep), the system timer had to be changed to use a peripheral timer/counter. The old COUNT-COMPARE code is still present in time.c as weak functions. The new timer is added to the architecture directory. This patch sets up TC0 as system timer The new timer has been tested on AT32AP7000/ATSTK1000 at 100 Hz, 250 Hz, 300 Hz and 1000 Hz. For more details about the timer/counter see the datasheet for AT32AP700x available at http://www.atmel.com/dyn/products/product_card.asp?part_id=3903 Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27[AVR32] Add mach-specific KconfigHaavard Skinnemoen1-0/+7
Include at32ap-specific Kconfig file from top-level Kconfig file. The at32ap Kconfig is currently empty, but it will grow some machine- specific options soon. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27[AVR32] Add nwait and tdf parameters to SMC configurationHans-Christian Egtvedt1-0/+23
Complete the SMC configuration code by adding nwait and tdf parameter. After this change, we support the same parameters as the hardware. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-04-27[AVR32] Add basic HMATRIX supportHaavard Skinnemoen2-0/+220
This adds register and clock definitions for the High-speed bus Matrix (HMATRIX) as well as a function that can be used to configure special EBI functionality like CompactFlash and NAND flash support. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-03-16[PATCH] gpio_direction_output() needs an initial valueDavid Brownell1-1/+3
It's been pointed out that output GPIOs should have an initial value, to avoid signal glitching ... among other things, it can be some time before a driver is ready. This patch corrects that oversight, fixing - documentation - platforms supporting the GPIO interface - users of that call (just one for now, others are pending) There's only one user of this call for now since most platforms are still using non-generic GPIO setup code, which in most cases already couples the initial value with its "set output mode" request. Note that most platforms are clear about the hardware letting the output value be set before the pin direction is changed, but the s3c241x docs are vague on that topic ... so those chips might not avoid the glitches. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Andrew Victor <andrew@sanpeople.com> Acked-by: Milan Svoboda <msvoboda@ra.rockwell.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-07[AVR32] at32_spi_setup_slaves should be __initHaavard Skinnemoen1-1/+1
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-19Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2-2/+2
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (117 commits) [ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports [ARM] 4140/1: AACI stability add ac97 timeout and retries [ARM] 4139/1: AACI record support [ARM] 4138/1: AACI: multiple channel support for IRQ handling [ARM] 4211/1: Provide a defconfig for ns9xxx [ARM] 4210/1: base for new machine type "NetSilicon NS9360" [ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM [ARM] 4221/1: S3C2443: DMA support [ARM] 4220/1: S3C24XX: DMA system initialised from sysdev [ARM] 4219/1: S3C2443: DMA source definitions [ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443 [ARM] 4217/1: S3C24XX: remove the dma channel show at startup [ARM] 4090/2: avoid clash between PXA and SA1111 defines [ARM] 4216/1: add .gitignore entries for ARM specific files [ARM] 4214/2: S3C2410: Add Armzone QT2410 [ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw [ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST [ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos [ARM] 4137/1: Add kexec support [ARM] 4201/1: SMP barriers pair needed for the secondary boot process ... Fix up conflict due to typedef removal in sound/arm/aaci.h
2007-02-16[AVR32] Use per-controller spi_board_info structuresHaavard Skinnemoen1-17/+38
Set up one spi_board_info array per controller and pass this to at32_add_device_spi so that it can set up any GPIO pins for chip selects based on this information. Extracted from a patch by David Brownell and adapted slightly. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-16[AVR32] Warn, don't BUG if clk_disable is called too many timesHaavard Skinnemoen1-1/+5
Print a helpful warning along with a stack dump if clk_disable is called on a already-disabled clock. Remove the BUG_ON(). Extracted from a patch by David Brownell. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-16[AVR32] Make sure all genclocks have a parentHaavard Skinnemoen1-16/+73
Initialize the parent field of each generic clock by looking at the PM registers. This means that the genclock operations can always assume that the parent field is non-null, so they don't have to check. Also remove a few unnecessary BUG_ON()s. Extracted from a patch by David Brownell. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] SPI platform code updateHaavard Skinnemoen1-8/+36
Move stuff in spi.c into ATSTK1002 board code and update SPI platform device definitions according to the new GPIO API. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] Add PIOE device and reserve SDRAM pinsHaavard Skinnemoen1-0/+10
The PIOE device was left out before because it muxes SDRAM pins (and is therefore a bit dangerous to mess with) and because no existing drivers had any use for it. It is needed for CompactFlash, however, and now that we have a way to protect the SDRAM pins, it can be safely added. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] Introduce at32_reserve_pin()Haavard Skinnemoen1-1/+22
at32_reserve_pin() can be used for reserving portmux pins without altering their configuration. Useful for e.g. SDRAM pins where we really don't want to change the bootloader-provided configuration. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] Don't reset PIO state at bootupHaavard Skinnemoen1-3/+0
Leave the PIO lines as the bootloader left them. This allows us to use PIOE without disturbing the SDRAM muxing. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] GPIO API implementationHaavard Skinnemoen3-16/+221
Arch-neutral GPIO calls for AVR32. GPIO IRQ support written by David Brownell. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] ext int fixesDavid Brownell1-19/+17
Bugfixes for external irq handler set_irq_type(): - If set_irq_type() can't set the type, don't change anything! - It's not OK to change the flow handler as part of set_irq_type(), among other issues that violates spinlock rules. Instead, we can call the relevant handler when we demux the external interrupts. - The external irq demux has no need to grab the spinlock. And in fact grabbing it that way was wrong, since that code might be pre-empted by an irq at a different priority level, and that code might then have tried to grab that spinlock... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-09[AVR32] fix serial port setup on ATSTK1000David Brownell1-2/+2
Fixes to USART setup on the stk-1000 ... don't configure USART 2, since its TXD/RXD are used for INT-A and INT-B buttons; and configure USART 0 (for IRDA, and with corrected IRQ) iff SW2 has a non-default setting. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-08[ARM] 4124/1: Rename mach-at91rm9200 and arch-at91rm9200 directoriesAndrew Victor2-2/+2
Now that Linux includes support for the Atmel AT91SAM9260 and AT91SAM9261 processors in addition to the original Atmel AT91RM9200 (with support for more AT91 processors pending), the "mach-at91rm9200" and "arch-at91rm9200" directories should be renamed to indicate their more generic nature. The following git commands should be run BEFORE applying this patch: git-mv arch/arm/mach-at91rm9200 arch/arm/mach-at91 git-mv include/asm-arm/arch-at91rm9200 include/asm-arm/arch-at91 Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-12-08[AVR32] Implement intc_get_pending()Haavard Skinnemoen1-0/+4
intc_get_pending() returns a bitmask with pending interrupts in a interrupt controller group (irq). This is used by the upcoming oprofile implementation for avr32 and may also be useful for chained interrupt controller drivers. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-12-08[AVR32] Set flow handler for external interruptsHaavard Skinnemoen1-2/+20
Make sure that the flow handler for external interrupts is updated whenever they type is changed. Also make sure that the defaults correspond with how the interrupt controller is configured. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-12-08[AVR32] Remove unused fileHaavard Skinnemoen1-289/+0
Remove arch/avr32/mach-at32ap/sm.c, which is not referenced by any Makefile. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-12-08[AVR32] Add macb1 platform_deviceHaavard Skinnemoen1-0/+38
Add platform_device definition and pio init code for the second ethernet controller in AT32AP7000. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-12-08[AVR32] Portmux API updateHaavard Skinnemoen2-83/+146
Rename portmux_set_func to at32_select_periph, add at32_select_gpio and add flags parameter to specify the initial state of the pins. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2006-10-25[PATCH] AVR32: Use __raw MMIO access for internal peripheralsHaavard Skinnemoen4-8/+14
The read[bwl] and write[bwl] functions are meant for accessing PCI devices. How this is achieved on AVR32 is unknown, as there are no systems with a PCI bridge available yet. On-chip peripheral access, however, should not depend on how we end up implementing PCI access, so using __raw_read[bwl]/__raw_write[bwl] is the right thing to do for on-chip peripherals. This patch converts the drivers for the static memory controller, interrupt controller, PIO controller and system manager to use __raw MMIO access. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>