summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91/at91.c
Commit message (Collapse)AuthorAgeFilesLines
* Move AIC related stuff to own file.imp2014-03-081-66/+9
|
* Properly round on unmapping.imp2014-03-081-1/+5
|
* Switch to using PAs rather than VAs for the addresses we map forimp2014-01-311-9/+21
| | | | | | | | | | | | devices. This is a nop, except for what's reported by atmelbus for the resources. It would be nice if we could dymanically allocated these things, but the pmap_mapdev panics if we don't keep the static mappings, so we still need to play the carefully allocate VA space between all supported SoC game. User's with their own devices may need to make adjustments.
* When mapping an address, the bsh needs the same offset we do for otherimp2014-01-311-1/+1
| | | | things.
* Bus space handles need to be the VA of the requested resource, not theimp2014-01-251-2/+4
| | | | | rounded page VA. Correct so the DBGU device can be mapped for FDT console since it isn't on a page boundary.
* Set the SoC name for the atmelbus name.imp2013-12-301-1/+1
|
* Move remaining code and data related to static device mapping into theian2013-11-041-2/+3
| | | | | | | new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future).
* Fix typo. Sorry!nwhitehorn2013-10-291-1/+1
|
* A last BUS_PROBE_NOWILDCARD. Move setting the postfilter function into thenwhitehorn2013-10-291-2/+3
| | | | | attach function probe shouldn't actually set anything up but just bid on the device.
* Replace kernel virtual address space allocation with vmem. This providesjeff2013-08-071-1/+1
| | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
* Move unmask IRQ function call up to nexus device level.gonzo2012-07-171-3/+0
| | | | | | | | | | FDT-enabled targets were broken after r238043 that relies on device up the hierarchy to properly setup interrupt. nexus device for ARM platforms did job only partially: setting handler but not unmasking interrupt. Unmasking was performed by platform code. Reviewed by: andrew@
* Fix whitespace divot.imp2012-07-121-1/+1
|
* Complete the transition away from newbus to populate the children toimp2012-07-121-0/+1
| | | | | | | | the linker set of CPU modules. The newbus method, although clever, had many flaws: it didn't really support multiple SoC, many of the comments about order were just wrong, and it did a few things far too late to be useful. delay and cpu_reset now work much earlier in the boot process.
* Create the children devices for the SoC in atmelarm bus node, not inimp2012-07-121-6/+16
| | | | the identify routine of the CPU.
* Export the interrupt status vector via soc_data. Set the interruptimp2012-07-121-2/+26
| | | | | priorities in the AIC in the atmelarm driver before attaching the children. Delete redunant copies of the code.
* Remove a useless bit of indirection. On all Atmel ARM products, irq 1imp2012-07-101-1/+1
| | | | is the system IRQ, so use the define for it and get on with life.
* Collapse all copies of at91_add_child into at91.c. They wereimp2012-07-101-2/+39
| | | | | logically identical before today, and actually identical after today's changes.
* Strip trailing whitespace before other changes.imp2012-06-131-9/+9
|
* Enhance the Atmel SoC chip identification routines to account for moreimp2012-06-061-2/+0
| | | | | | | | | | | | | | | | | | SoC variants. Fold the AT91SAM9XE chips into the AT91SAM9260 handling, where appropriate. The following SoCs/SoC families are recognized: at91cap9, at91rm9200, at91sam9260, at91sam9261, at91sam9263, at91sam9g10, at91sam9g20, at91sam9g45, at91sam9n12, at91sam9rl, at91sam9x5 and the following variations are also recognized: at91rm9200_bga, at91rm9200_pqfp, at91sam9xe, at91sam9g45, at91sam9m10, at91sam9g46, at91sam9m11, at91sam9g15, at91sam9g25, at91sam9g35, at91sam9x25, at91sam9x35 This is only the identification routine: no additional Atmel devices are supported at this time. # With these changes, I'm able to boot to the point of identification # on a few different Atmel SoCs that we don't yet support using the # KB920X config file -- someday tht will be an ATMEL config file...
* Compute the master clock frequency, so we no longer need to have itimp2012-05-291-4/+0
| | | | | | | | | | | compiled into the kernel. This allows us to boot the same kernel on machines with different master clock frequencies, so long as we can determine the main clock frequency accurately. Cleanup the pmc clock init function so it can be called in early boot so we can use the serial port just after we call cninit. # We have two calls to at91_pmc_clock_init for reasons unknown, that will # be fixed later -- it is harmless for now.
* Be a little less magical, not that these values are likely to change...imp2012-05-211-4/+4
|
* Check the return value of BUS_SETUP_INTR()kevlo2011-10-271-2/+6
| | | | Reviewed by: imp
* if_ate.c:cognet2010-10-061-316/+53
| | | | | | | | | | | | | | | | | | | | | | | * Support for sam9 "EMAC" controller. * Support for rmii interface to phy. at91.c & at91sam9.c: * Eliminate separate at91sam9.c file. * Add new devices to at91sam9_devs table. at91_machdep.c & at at91sam9_machdep.c: * Automatic chip type determination. * Remove compile time chip dependencies. * Eliminate separate at91sam9_machdep.c file. at91_pmc.c: * Corrected support for all of the sam926? and sam9g20 chips. * Remove compile time chip dependencies. My apologies to Greg for taking so long to take care of it.
* Pass the previously returned IRQ back to arm_get_next_irq() so thatmarcel2009-06-091-2/+1
| | | | | | | | | the implementation can guarantee forward progress in the event of a stuck interrupt or interrupt storm. This is especially critical for fast interrupt handlers, as they can cause a hard hang in that case. When first called, arm_get_next_irq() is passed -1. Obtained from: Juniper Networks, Inc.
* Fix name for driver to assign to the SPI device.imp2009-05-151-1/+1
|
* - Add the driver for AT91RM9200 CompactFlash controller. The driverstas2009-04-221-0/+8
| | | | | | | operates in the common memory mode and use polling mode to control the status of operations as I don't have any board with interrupt line routed yet. I'll add the GPIO interrupt driven mode as soon as I get one.
* Store at91_master_clock in a global variable as opposed to a compileimp2009-01-221-0/+2
| | | | | | time constant. This allows us to potentially change it at runtime or autodetect it early in the boot (the latter being much more likely to have a good outcome).
* Tweak the disclaimer section of the license to match COPYRIGHT, forimp2008-11-251-10/+11
| | | | | better or worse. Ok'd by folks that have additional copyrights to the files in cases where there's joint authorship.
* - Add stream bus_space operations.stas2008-10-261-0/+36
| | | | | | Reviewed by: cognet Approved by: kib (mentor, implicit) MFC after: 1 week
* - Add a missing NULL-pointer check.stas2008-10-261-2/+4
| | | | | | Reviewed by: cognet Approved by: kib (mentor, implicit) MFC after: 3 days
* Kill vestiges of the special case code we once had in place for usbimp2008-09-051-12/+2
| | | | | | memory allocation. It was change to include the range in the normal memory area, so these ifdef'd out special cases are no longer useful to keep around.
* Add IRQ line for usb device. I'm not 100% sure this is the rightimp2008-08-191-1/+1
| | | | | | | place to add this connection, since the interrupt is for a GPIO pin, but since we have no alternative at the moment... Submitted by: Hans Petter Selasky
* On the AT91, we need to write on the EOI register after we handle ancognet2008-04-201-0/+10
| | | | | | | | interrupt. So, add a new function pointer, arm_post_filter, which defaults to NULL, and which will be used as the post_filter arg for intr_event_create(). Set it properly for the AT91, so that it boots again. Reported by: hps
* Actually program the interrupt controller for priorities. As weimp2007-12-191-3/+43
| | | | | support more AT91 platforms, we'll need to move this into some platform init routine.
* Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULLkevlo2007-12-171-1/+1
| | | | Reviewed by: imp
* o substitute INTR_FAST with FILTER in a panic message.piso2007-03-061-3/+3
| | | | o wrap a BUS_SETUP_INTR() line at 80.
* Fix attach of at91_pio() after bus_setup_intr() modification.piso2007-02-251-1/+1
| | | | Reported and tested by: Krassimir Slavchev
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-3/+3
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* MFp4: Tweak descriptions in preparation for porting to other members ofimp2006-11-201-4/+4
| | | | the AT91 arm9 family.
* change bus space unmap protoypesam2006-11-191-1/+1
| | | | | Reviewed by: cognet, imp MFC After: 1 month
* Relocate the vector page for AT91, to work around bugs with the LOW_VECTORcognet2006-08-281-4/+8
| | | | code.
* We have an implementation of generic_bs_rr_1, so use it, as some drivers usecognet2006-05-191-1/+1
| | | | | | it. Submitted by: kevlo
* Resurrect Skyeye support :cognet2006-05-131-0/+8
| | | | | | | | | | | | | Add a new option, SKYEYE_WORKAROUNDS, which as the name suggests adds workarounds for things skyeye doesn't simulate. Specifically : - Use USART0 instead of DBGU as the console, make it not use DMA, and manually provoke an interrupt when we're done in the transmit function. - Skyeye maintains an internal counter for clock, but apparently there's no way to access it, so hack the timecounter code to return a value which is increased at every clock interrupts. This is gross, but I didn't find a better way to implement timecounters without hacking Skyeye to get the counter value. - Force the write-back of PTEs once we're done writing them, even if they are supposed to be write-through. I don't know why I have to do that.
* When returning a resource that we've allocated with rman_reserve_resource,imp2006-04-201-0/+1
| | | | go ahead and set the rid for that resource.
* Add debug writes in error cases that, in theory, should never happenimp2006-04-061-2/+5
|
* MFp4:imp2006-03-181-49/+195
| | | | | | | | | | | o Add memory barrier to bus space o Allow for up to 3 IRQs per device o Move to table driven population of children devices. o Add support for usb ohci memory mapped controller resource allocation. o Clean up a bunch of extra writes to disable interrupts that are now done elsewhere. o Force all system interrupt handlers be fast. We get deadlock if they aren't.
* Use the correct address for the ohci device.imp2006-02-111-1/+1
|
* Import support for the Atmel AT91RM9200 CPU/Microcontroller. This SoCimp2006-02-041-0/+516
is a ARM920T based CPU with a bunch of built-in peripherals. The inital import supports the SPI bus, the TWI bus (although iicbus integration is not complete), the uarts, the system timer and the onboard ethernet. Support for the Kwikbyte KB9202 (http://www.kwikbyte.com) board is also included, although there's no reason why the 9200 and the 9201 wouldn't also work. Primitive support for running under the skyeye emulator is also provided (although skyeye's support for the AT91RM9200 is a little weak). The code has been structured so that other members of Atmel's arm family can be supported in the future. The AT91SAM9260 is not presently supported due to lack of hardware. The arm7tdmi families are also not supported becasue they lack an MMU. Many thanks to cognet@ for his help and assistance in bringing up this board. He did much of the vm work and wrote parts of the uart and system timer code as well as the bus space implementation. The system boots to single user w/o problem, although the serial console is a little slow and the ethernet driver is still in flux. This work was sponsored by Timing Solutions, Corporation. I am grateful to their support of the FreeBSD project in this manner.
OpenPOWER on IntegriCloud