Commit Graph

448 Commits

Author SHA1 Message Date
ian
3aefca1073 Remove the ARM_DEVICE_MULTIPASS option and make its effect be the default.
Multipass device attachment was tested on many arm platforms by users and
only success was reported on the arm@ mailing list.  This is just the
long-delayed followup of making it the default.

Multipass attachment is necessary when using vendor-supplied FDT data,
because our devices may need to be attached in a different order than they
are described in the FDT data.
2014-10-26 18:30:35 +00:00
kevlo
e0eb5b421d Fix the definitioin of AT91SAM9G45_IRQ_PIOE and rename it to
AT91SAM9G45_IRQ_PIODE.  According to the data sheet, both PIOD and PIOE
use the same IRQ.

While here remove duplicate definitions.
2014-09-27 14:39:00 +00:00
kevlo
f41bd0c035 Remove a bogus AIC.
Reviewed by:	imp
2014-09-27 02:15:45 +00:00
kevlo
5967c3f837 Fix the size of AT91SAM9260_PIT_SIZE. 2014-09-26 09:08:09 +00:00
kevlo
22bd80f0ab Fix typos. 2014-09-26 09:07:02 +00:00
glebius
38c3245a7b Mechanically convert to if_inc_counter(). 2014-09-19 09:20:16 +00:00
ian
5f75e2409e Convert the at91_pinctrl driver to use the new fdt_pinctrl interface. 2014-09-13 19:59:16 +00:00
andrew
249f5cbad9 Unify interrupts bit definition and usage. While here remove PSR_C_bit.
Submitted by:	Svatopluk Kraus <onwahe at gmail.com>,
		Michal Meloun <meloun at miracle.cz>
Differential Revision: https://reviews.freebsd.org/D754
2014-09-10 15:25:15 +00:00
imp
588ebd48d9 Wrap some long lines. 2014-09-04 16:40:54 +00:00
ian
b149a9e7ae Rename OF_xref_phandle() to OF_node_from_xref() and add a new function
that provides the inverse translation, OF_xref_from_node().

Discussed with:	nwhitehorn
2014-09-01 18:51:01 +00:00
imp
f7f2052abf Make note about reset vs RTOE actions... 2014-08-18 21:04:35 +00:00
bz
a62a72ce2b Remove keyboard entropy [1] from r270105.
Reported by:		ian [1]
(Pointy hat)^2 to:	imp
2014-08-17 18:27:02 +00:00
imp
00d9dc02d3 Add missing license to at91_common.c. It was committed w/o a license.
Pointy hat to: imp@
2014-08-17 16:53:19 +00:00
imp
4cff0ce854 Define at91_master_clock in only one file to eliminate warnings about
it multiply defined commons.
2014-08-17 16:53:14 +00:00
ian
4d87ddb2b8 Rename the old initarm_* functions to the new platform_* names. Also
move the registration of the static device map table into the function
intended to do devmap init stuff.
2014-08-17 02:53:36 +00:00
imp
f4c59deacc Implement the FDT static pinctl/pinmux spec for Atmel. This will
configure the mux and config registers for PIO devices based on what
we find in the FDT. I developed it per the spec that had been
committed to Linux in the January 2014 time frame and haven't
updated. In short, bundles of pins are activated in specific ways for
specific configurations, and we implement all of that.

What's not included is a MI device infrastructure, any dynamic
run-time changing of these pins, etc. Also not included are hooks into
all the drivers to enable the latter (static at boot no driver changes
are needed). These larger questions will need to be answered once we
have more drivers like this for more platforms, or somebody has a heck
of a lot of time to research a bunch of platforms, the Linux solution
(which is good, but has its warts), etc.
2014-08-15 16:08:52 +00:00
imp
6a0dd771d9 Print the symbolic bit names for the status when we get a timeout. 2014-08-14 23:17:33 +00:00
imp
dc346017bf Add AIC to at91sam9260 support, now that it is needed for multipass to
work. This gets my AT91SAM9260-based boards almost booting with
current in multi pass. The MCI driver is broken, but it is equally
broken before multi-pass.
2014-08-14 04:21:31 +00:00
imp
84d638ac06 Add support for multipass to Atmel, for both FDT and !FDT cases. 2014-08-14 04:21:25 +00:00
imp
7603d1d8c5 Start to add FDT support. 2014-08-14 04:21:20 +00:00
imp
a2466e5139 Add support for FDT and !FDT configs on Atmel, though FDT isn't
working yet.
Bump rev on arm Makefile since files.at91 uses new '!' operator.
2014-08-14 04:21:14 +00:00
jhb
de01564f85 Don't bother clearing maps for static DMA allocations to NULL. Instead,
leave them as purely opaque values that are only set by bus_dmamem_alloc().
2014-06-17 18:10:06 +00:00
jhb
e8769d6be2 Fix various NIC drivers to properly cleanup static DMA resources.
In particular, don't check the value of the bus_dma map against NULL
to determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded.
Instead, assume that bus_dmamap_load() succeeeded (and thus that
bus_dmamap_unload() should be called) if the bus address for a resource
is non-zero, and assume that bus_dmamem_alloc() succeeded (and thus
that bus_dmamem_free() should be called) if the virtual address for a
resource is not NULL.

In many cases these bugs could result in leaks when a driver was detached.

Reviewed by:	yongari
MFC after:	2 weeks
2014-06-11 14:53:58 +00:00
kevlo
701aae6977 Remove extra semicolons. 2014-06-06 16:37:42 +00:00
ian
56f425f93e When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE.
On armv4 these are defined as synonyms right now, but it's a bit ambiguous
what NOCACHE means (is buffering/write-combining also enabled or not?); this
is a first step towards replacing PTE_NOCACHE with a less ambiguous name.
2014-05-10 20:03:03 +00:00
ian
e825adc7a6 Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c
and the functionality it provided into arm/exception.S.  Rename the main
irq handling routine from arm_handler_execute() to arm_irq_handler() to
make it more congruent with how other exception handlers are named, and
also update its signature to reflect what has long been reality: it is
passed just a trapframe pointer, no interrupt number argument.
2014-03-10 18:10:09 +00:00
ian
3b592f9410 The arm exception entry points currently vector through a function pointer
to the actual handler routine.  All the pointers are static-intialized to
the only handlers available, and yet various platform-specific inits still
set those pointers (to the values they're already initialized to).  Begin
to drain the swamp by removing all the redundant external declarations and
runtime setting of the pointers that's scattered around various places.
2014-03-09 18:08:27 +00:00
imp
3b83a35d4d Remove bogus define that causes compile errors. Most of the defines
for SAM9X are going away soonish anyway (once FDT works), but until
then...
2014-03-09 02:28:30 +00:00
imp
c1c5cdf1e1 Move AIC related stuff to own file. 2014-03-08 06:06:50 +00:00
imp
0f914ddcb5 Properly round on unmapping. 2014-03-08 06:06:42 +00:00
imp
1395253f32 Make at91_soc_id() public. 2014-03-08 05:03:56 +00:00
imp
f53f2685ee tcb device for fdt 2014-02-28 03:00:28 +00:00
imp
44e4ff2e1a shdwc device for fdt 2014-02-28 03:00:25 +00:00
imp
a08374e360 Add device node for SDRAMC device. Currently just claims device's
resources.
2014-02-28 02:59:51 +00:00
imp
5c6b8c9969 Style(9) nit: Use tab here. 2014-02-27 08:19:19 +00:00
imp
bc45fe580c Honor the disabled status by only grabbing resources and returning
when running under FDT.
2014-02-13 16:50:08 +00:00
imp
9ecad450cb Fix board ID too... 2014-02-13 15:47:41 +00:00
imp
875b628e17 Fix board name. 2014-02-13 15:46:08 +00:00
ian
4ca4e5e369 Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf()
routine, now a platform can provide a pointer to an early_putc() routine
which is used instead of cn_putc().  Control can be handed off from early
printf support to standard console support by NULLing out the pointer
during standard console init.

This leverages all the existing error reporting that uses printf calls,
such as panic() which can now be usefully employed even in early
platform init code (useful at least to those who maintain that code and
build kernels with EARLY_PRINTF defined).

Reviewed by:	imp, eadler
2014-02-12 00:53:38 +00:00
ian
74fc279d26 Check in the "real" board_tsc4370 file in place of the stubbed out one.
Real means the one TSC / Symmetricom / Microsemi actually uses on their 4370
and other rm9200 boards.  This code demonstrates a variety of useful things
board init code can do, including adjusting the master clock frequency.
2014-02-11 21:13:37 +00:00
ian
2ec8b64037 If someone tries to boot a generic ATMEL kernel that has no board_init()
routine compiled in, print a friendly error message about it rather than
mysteriously hanging while trying to init 4GB of nonexistant ram.
2014-02-09 21:21:10 +00:00
imp
f89ada715f Add FDT attachment. 2014-02-09 21:02:46 +00:00
imp
ef1ac29eb3 FDT attachment... 2014-02-09 21:01:53 +00:00
imp
bdaa9ef245 Add TWI attachment for FDT. We're only matching the SAMG20 device for
now, others to follow.
2014-02-09 21:01:10 +00:00
imp
da8067e163 Add FDT attachment. 2014-02-09 21:00:22 +00:00
imp
d8e5eadddc Add FDT attachment. Flag lost functionality with FDT_HACKS so we can
find it later.
2014-02-09 20:59:46 +00:00
imp
5d72dffadd Add FDT attachment. 2014-02-09 20:58:03 +00:00
imp
b4092f9107 Add FDT attachment, plus minor code shuffle. 2014-02-09 20:57:26 +00:00
imp
813fe7dc49 Add FDT attachment. 2014-02-09 20:56:39 +00:00
imp
8a6437c7ce Add FDT matching code. 2014-02-09 20:55:49 +00:00