Commit Graph

345 Commits

Author SHA1 Message Date
imp
144b70190e Minor cosmetic changes to bring atmel's initarm and the default
initarm for FDT closer together.  More to follow.
2012-11-07 16:59:12 +00:00
imp
cfdf328b7d Loop reading the RTC registers until the same values are obtained
twice, as advised in the atmel docs.

Submitted by:	Ian Lapore
2012-10-07 20:36:46 +00:00
imp
ca3e4e0819 Improve a few comments. 2012-10-07 02:08:19 +00:00
imp
1a947de79c Use the RTC unit to get the time. This works on all known AT91SAM9*
processors, either on reboot or after power down with battery backup.
However, the AT91RM9200 RTC always resets on reboot making it just
about useless at the moment (if we support a low-power mode or an
extended sleep mode, it might become useful).

Submitted by:	Ian Lepore
2012-10-07 01:58:32 +00:00
andrew
cd998f5e4e Create a common set_stackptrs in sys/arm/machdep.c.
On single core devices set_stackptrs is only ever called with cpu = 0 in
initarm and will be identical to the existing function. On SMP this needs
to be implemented for sys/arm/mp_machdep.c, but the implementations are
identical for each SoC.
2012-09-22 06:41:56 +00:00
imp
45fcaa2b41 Make this work on the AT91SAM9G20:
o Disable multi-block operations: they sometimes fail.
o Don't use the PROOF bits yet: they hang the system hard.
o Disable the the multi-block operations for !rm9200, but it
  still doesn't help.
o Fix writing < 12 bytes errata to actually work.
o Enable, for the moment, reporting extra bytes soaked up.
2012-08-29 06:42:39 +00:00
imp
c579535d2f When copying data, use memcpy instead of bcopy. It matches the
arguments better.
Also, set the need to use the workaround flag before we actually need
to use it, rather than after.
2012-08-29 04:41:25 +00:00
imp
cfecbd5482 Make AT91_MCI_ALLOW_OVERCLOCK a real option. Rename old use 30MHz to
this new option.  Only try to use > 25MHz when our best frequency is <
15MHz and overclocking is enabled. Fix minor style chaff.
2012-08-28 17:27:46 +00:00
imp
06cefb977a Clip the upper end to 31MHz for slow clock speeds. On faster
machines, we wind up with a 66MHz clock, which is too fast.
2012-08-28 14:19:10 +00:00
imp
d79b1491cd Move to using a flag instead of checking the CPU type each
transaction for the MCI1 rev 2.x write workarounds.
2012-08-28 03:46:31 +00:00
imp
30b2ebc07d Style: Move these routines to be before the forward declared functions
as is the normal practice.
2012-08-28 03:27:48 +00:00
imp
a87e5e3bfb Bring in the multi-block patches for mci. These required extensive
restructuring of the driver.  I've tried to preserve the other silicon
workarounds that we've added over the years, but haven't had a chance
to extensively test on other hardware.  On my AT91RM9200 with 30MHz/1
wire/64 block transfers, I've been able to go from ~.66MB/s to
2.25MB/s in the simple tests I performed, almost a 3.5x improvement.
This cuts the boot time almost in half when everything else goes
right (timed from rtc message to login: prompt).

PR:		155214
Submitted by:	Ian Lapore
2012-08-28 01:28:52 +00:00
imp
c28cc4caa1 Add hint and sysctl support for 4 wire mode.
PR:		155241
Submitted by:	Ian Lapore
2012-08-27 04:30:53 +00:00
imp
30c6609d71 Minor style(9) nit. 2012-08-27 04:08:43 +00:00
imp
0e233741f6 Don't puprosely overclock the SD bus to 30MHz, make the user
explicltly enable that.  The driver chose to use 60MHz / 2 (30MHz)
most of the time rather than 60MHz / 4 (15MHz) based on the Linux
driver of the time.  This pushes the spec a little in order to not
suffer the penalty of running at 15MHz.  However, when other bus
masters are active in the system, and the user tries 4-wire mode, the
internal bus arbitration would fail with data loss as a result.

# Comments from PR were reworked to reflect my historical perspective

PR:		155214 (partial)
Submitted by:	Ian Lepore
2012-08-27 04:03:49 +00:00
imp
c0d788882d Fetch the chip select in the bridge driver, like all the other spi
bridges do.
2012-08-23 22:38:37 +00:00
imp
acf06e8329 Use proper resource type when freeing.
Submitted by:	Ian Lapore (indirectly in a larger patch)
2012-08-23 21:31:52 +00:00
hselasky
631a411aee Make some at91_pcm_xxx() functions NULL safe. 2012-08-21 19:55:24 +00:00
andrew
ebd36ca42d Set machine correctly on ARM. This allows universe to use the correct world
when building each kernel.

Reviewed by:	imp
2012-08-18 05:48:19 +00:00
imp
7af781f113 Preliminary Embest ATEB9200 support. 2012-08-16 05:03:59 +00:00
gonzo
f60463b5c4 Unbreak build for the rest of AT91 platforms 2012-08-15 18:33:58 +00:00
gonzo
68f6dc6efd Unbreak ATMEL kernel build 2012-08-15 08:34:31 +00:00
gonzo
032427f3e9 Merging projects/armv6, part 1
Cummulative patch of changes that are not vendor-specific:
	- ARMv6 and ARMv7 architecture support
	- ARM SMP support
	- VFP/Neon support
	- ARM Generic Interrupt Controller driver
	- Simplification of startup code for all platforms
2012-08-15 03:03:03 +00:00
imp
5d28872c59 Correct the PLLA setting functions and centralize. 2012-08-11 05:45:19 +00:00
imp
dc70787a30 Update comments about setting PLLA and refernce the tables in the
datasheet that express the limits.
2012-08-11 05:12:46 +00:00
imp
24e221572d Don't use C++ comments. 2012-08-11 05:03:30 +00:00
imp
bf2909cb37 More comments about setting PLLA, or rather that we never do. 2012-08-10 04:48:06 +00:00
imp
2c7a0e23b3 Add charge pump current register. 2012-08-10 04:47:20 +00:00
imp
e198ea51a0 Allow chip selects other than 0. The SAM9260EK board
has its dataflash on CS1.
2012-07-31 19:14:22 +00:00
imp
94d6c8b29d These files will support the whole at91sam9x5 family when done,
so rename them now before they get copied further afield...
2012-07-30 21:30:43 +00:00
imp
299454071c List the members of the AT91SAM9G45 family. 2012-07-30 21:19:19 +00:00
imp
7f5d6e7486 Fix a couple of comments about the rm9200, and fix a couple of indentation
issues.  Add note that we need to implement at91sam9260 erratum workaround.
2012-07-30 06:00:31 +00:00
imp
a0e5c55d62 Add the usb device (gadget) side of things. Also add ehci bindings
while I'm here in anticipation of usb2 support for newer SoCs.

Requested by:	Hans Petter Selasky
2012-07-27 17:31:19 +00:00
imp
8aa20c163b Add new at91sam9g45 support and sn9g45 board to the ATMEL kernel.
Adapt SN9G45 board support to cope with multi-board.
2012-07-27 16:38:02 +00:00
imp
6efc75434f Turns out the ETHERNUT5 isn't anything like the SAM9260-EK. Make this
board init match better: UART1 instead of UART2, No RMMI, no SPI0, SPI1
comments.
2012-07-27 05:33:55 +00:00
imp
19fa71edda Add (back?) ohci atmel attachment. 2012-07-27 05:28:02 +00:00
andrew
8497a64002 Add support for the DesignA Electronics Snapper9g45 System on Module.
Reviewed by:	imp
2012-07-26 08:05:28 +00:00
andrew
ab76299bf9 Add support for the Atmel AT91SAM9G45 CPU.
Reviewed by:	imp
2012-07-26 08:01:25 +00:00
imp
8ebd4a20e0 Some models have 6 USARTS + DBGU. Set a consistent name. 2012-07-26 05:46:56 +00:00
gonzo
df07abd457 Move unmask IRQ function call up to nexus device level.
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@
2012-07-17 03:18:12 +00:00
imp
057a8ab456 These were never used, remove them. 2012-07-15 06:08:11 +00:00
imp
9acb87af3e Configure the peripheral pins for MCI devices. Eliminate the now-unused
at91_pio_rm9200.h.
2012-07-15 05:41:43 +00:00
imp
a709bd3b9d Add preliminary support for Atmel SAM9260-EK evaluation kit.
Initially identical to the Ethernut5, but will diverge shortly before
I refactor...
2012-07-14 06:13:23 +00:00
imp
3dcc564c1c uboot should be telling us it is an ETHERNUT5 for this board. Tag it
as such.
2012-07-14 06:00:37 +00:00
imp
a8c236d935 Create common routines for configuring the serial ports and use them
on all the at91rm9200 boards.
2012-07-14 05:46:52 +00:00
imp
28a7eca4eb For our at91rm9200 boards, register which subtype of SoC is on the
board.  We'll use this later to control the differences between these
two variants' pins.
2012-07-13 04:22:08 +00:00
imp
a8b00dea2c This file is no longer AT91RM9200 specific, but now is generic to all
Atmel AT91 SoC's we support.  Rename to reflect that.
2012-07-12 19:15:38 +00:00
imp
136515a603 Remember where we found the DBGU and use that for our console. 2012-07-12 19:11:37 +00:00
imp
65fd745ad0 Fix whitespace divot. 2012-07-12 13:54:24 +00:00
imp
2344bfa174 Complete the transition away from newbus to populate the children to
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.
2012-07-12 13:45:58 +00:00