- 15 Jul, 2008 1 commit
-
-
Haavard Skinnemoen authored
This is a driver for the MMC controller on the AP7000 chips from Atmel. It should in theory work on AT91 systems too with some tweaking, but since the DMA interface is quite different, it's not entirely clear if it's worth merging this with the at91_mci driver. This driver has been around for a while in BSPs and kernel sources provided by Atmel, but this particular version uses the generic DMA Engine framework (with the slave extensions) instead of an avr32-only DMA controller framework. This driver can also use PIO transfers when no DMA channels are available, and for transfers where using DMA may be difficult or impractical for some reason (e.g. the DMA setup overhead is usually not worth it for very short transfers, and badly aligned buffers or lengths are difficult to handle.) Currently, the driver only support PIO transfers. DMA support has been split out to a separate patch to hopefully make it easier to review. The driver has been tested using mmc-block and ext3fs on several SD, SDHC and MMC+ cards. Reads and writes work fine, with read transfer rates up to 3.5 MiB/s on fast cards with debugging disabled. The driver has also been tested using the mmc_test module on the same cards. All tests except 7, 9, 15 and 17 succeed. The first two are unsupported by all the cards I have, so I don't know if the driver handles this correctly. The last two fail because the hardware flags a Data CRC Error instead of a Data Timeout error. I'm not sure how to deal with that. Documentation for this controller can be found in many data sheets from Atmel, including the AT32AP7000 data sheet which can be found here: http://www.atmel.com/dyn/products/datasheets.asp?family_id=682Signed-off-by:
Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 02 Jul, 2008 2 commits
-
-
Haavard Skinnemoen authored
Add SRAM allocator for avr32, which is just a thin wrapper around genalloc. Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
Haavard Skinnemoen authored
The SDRAM controller needs a clock in order to respond to our commands, and suspend doesn't work very well without the SDRAM in self-refresh mode. Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
- 28 Jun, 2008 1 commit
-
-
Haavard Skinnemoen authored
Combine at32_clock_init() and at32_portmux_init() into setup_platform() and remove setup_platform() from at32ap.c. No functional change since all setup_platform() ever did was call those two functions. Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
- 27 Jun, 2008 5 commits
-
-
Sedji Gaouaou authored
The name "mck" causes a conflict on AT91. Call it "pwm_clk" instead. Signed-off-by:
Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by:
Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-
David Brownell authored
This is a minor tweak to the at32ap700x pin configuration for the SPI input pin (MISO), enabling the on-chip weak pullup (typical 190K) to (a) ensure a fixed data value for missing or input-only slaves; (b) prevent power waste associated with inputs floating near VDDIO/2. Atmel's boards have no external pullup or pulldown on these pins, so it's unlikely other boards would address these issues with external pulldowns. Were there trouble, board-specific code could turn off the relevant pullup(s). Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-
Hans-Christian Egtvedt authored
This patch adds the PS/2 interface (PSIF) to the device code, split into two platform devices, one for each port. The function for adding the PSIF platform device is also added to the board header file. Signed-off-by:
Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by:
Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-
Hans-Christian Egtvedt authored
This patch lets the board code choose which pin out to use for the LCD interface. On AT32AP7000 the LCDC is wired to two sets of pins, which lets the user choose between dual ethernet and 32-bit EBI. For the ATNGW100 board it is vital to have the choice to select the alternative pinout since this pinout is routed to the external headers. Update ATSTK1002 and ATSTK1004 to use the new interface. Signed-off-by:
Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by:
Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-
Alex authored
On our custom board we have other oscillator rates than on atngw100 and atstk100x. Currently these rates are hardcoded in arch/avr32/mach-at32ap/at32ap700x.c. This patch moves them into board specific code. Signed-off-by:
Alex Raimondi <raimondi@miromico.ch> Signed-off-by:
Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
-
- 19 Apr, 2008 3 commits
-
-
Hans-Christian Egtvedt authored
This patch is a take two of adding full functionality to PLL1 on AT32AP7000. This allows board-specific code and drivers to configure and enable PLL1. This is useful when precise control over the frequency of e.g. a genclock is needed and requested by users for the ABDAC device. The patch is based upon previous patches from both Haavard Skinnemoen and David Brownell. Signed-off-by:
Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
David Brownell authored
This combines three patches from David Brownell: * avr32: tclib support * avr32: simplify clocksources * avr32: Turn count/compare into a oneshot clockevent device Register both TC blocks (instead of just the first one) so that the AT32/AT91 tclib code will pick them up (instead of just the avr32-only PIT-style clocksource). Rename the first one and its resources appropriately. More cleanups to the cycle counter clocksource code - Disable all the weak symbol magic; remove the AVR32-only TCB-based clocksource code (source and header). - Mark the __init code properly. - Don't forget to report IRQF_TIMER. - Make the system work properly with this clocksource, by preventing use of the CPU "idle" sleep state in the idle loop when it's used. Package the avr32 count/compare timekeeping support as a oneshot clockevent device, so it supports NO_HZ and high res timers. This means it also supports plugging in other clockevent devices and clocksources. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
Ben Nizette authored
New-style I2C drivers require that motherboard-mounted I2C devices are registered with the I2C core, typically at arch_initcall time. This can be done nice and neat by passing the struct i2c_board_info[] through at32_add_device_twi just like we do for the SPI board info. While we've got the hood up, remove a duplicate declaration of at32_add_device_twi() in board.h. [hskinnemoen@atmel.com: add missing i2c_board_info forward-declaration] Signed-Off-By:
Ben Nizette <bn@niasdigital.com> Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
- 06 Apr, 2008 1 commit
-
-
Stelian Pop authored
The atmel_usba_udc driver is being used by several platforms and arches (avr32 and at91 ATM), and each platform may have different endpoint settings. The patch below moves the endpoint declarations into the platform data and make the necessary adjustments for AVR32 (improved by Haavard Skinnemoen <hskinnemoen@atmel.com>). Signed-off-by:
Stelian Pop <stelian@popies.net> Acked-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
- 08 Feb, 2008 1 commit
-
-
David Brownell authored
PWM device setup, and a simple PWM driver exposing a programming interface giving access to each channel's full capabilities. Note that this doesn't support starting several channels in synch. [hskinnemoen@atmel.com: allocate platform device dynamically] [hskinnemoen@atmel.com: Kconfig fix] Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andrew Victor <linux@maxim.org.za> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 25 Jan, 2008 2 commits
-
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
- 15 Nov, 2007 2 commits
-
-
ben.nizette@iinet.net.au authored
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>
-
Hans-Christian Egtvedt authored
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>
-
- 23 Oct, 2007 3 commits
-
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Kristoffer Nyborg Gregertsen authored
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>
-
- 11 Oct, 2007 2 commits
-
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
We don't want to redefine this in every file that needs to access the PM. Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
- 18 Jul, 2007 3 commits
-
-
Hans-Christian Egtvedt authored
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>
-
Hans-Christian Egtvedt authored
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>
-
Haavard Skinnemoen authored
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>
-
- 23 Jun, 2007 1 commit
-
-
David Brownell authored
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>
-
- 15 May, 2007 1 commit
-
-
Haavard Skinnemoen authored
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>
-
- 27 Apr, 2007 3 commits
-
-
Haavard Skinnemoen authored
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>
-
Hans-Christian Egtvedt authored
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=3903Signed-off-by:
Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
Haavard Skinnemoen authored
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>
-
- 07 Mar, 2007 1 commit
-
-
Haavard Skinnemoen authored
Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
- 16 Feb, 2007 2 commits
-
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
- 09 Feb, 2007 4 commits
-
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
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>
-
Haavard Skinnemoen authored
Arch-neutral GPIO calls for AVR32. GPIO IRQ support written by David Brownell. Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
David Brownell authored
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>
-
- 08 Dec, 2006 2 commits
-
-
Haavard Skinnemoen authored
Add platform_device definition and pio init code for the second ethernet controller in AT32AP7000. Signed-off-by:
Haavard Skinnemoen <hskinnemoen@atmel.com>
-
Haavard Skinnemoen authored
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>
-