Commit graph

334 commits

Author SHA1 Message Date
Warner Losh 0f30f5d36b 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
Warner Losh bb6e4fd030 Add hint and sysctl support for 4 wire mode.
PR:		155241
Submitted by:	Ian Lapore
2012-08-27 04:30:53 +00:00
Warner Losh f535f4234a Minor style(9) nit. 2012-08-27 04:08:43 +00:00
Warner Losh b8e36ef7e0 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
Warner Losh 6e31adaf33 Fetch the chip select in the bridge driver, like all the other spi
bridges do.
2012-08-23 22:38:37 +00:00
Warner Losh fe49e25285 Use proper resource type when freeing.
Submitted by:	Ian Lapore (indirectly in a larger patch)
2012-08-23 21:31:52 +00:00
Hans Petter Selasky 94d6bc8895 Make some at91_pcm_xxx() functions NULL safe. 2012-08-21 19:55:24 +00:00
Andrew Turner 19a0f7f9cb 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
Warner Losh 06832193b8 Preliminary Embest ATEB9200 support. 2012-08-16 05:03:59 +00:00
Oleksandr Tymoshenko cf0df2b399 Unbreak build for the rest of AT91 platforms 2012-08-15 18:33:58 +00:00
Oleksandr Tymoshenko b208396ea3 Unbreak ATMEL kernel build 2012-08-15 08:34:31 +00:00
Oleksandr Tymoshenko cf1a573f04 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
Warner Losh 56c265f2f9 Correct the PLLA setting functions and centralize. 2012-08-11 05:45:19 +00:00
Warner Losh bcc1a5425a Update comments about setting PLLA and refernce the tables in the
datasheet that express the limits.
2012-08-11 05:12:46 +00:00
Warner Losh 19b89339dc Don't use C++ comments. 2012-08-11 05:03:30 +00:00
Warner Losh cb8b429ed3 More comments about setting PLLA, or rather that we never do. 2012-08-10 04:48:06 +00:00
Warner Losh e2af3b9a86 Add charge pump current register. 2012-08-10 04:47:20 +00:00
Warner Losh 679d446fde Allow chip selects other than 0. The SAM9260EK board
has its dataflash on CS1.
2012-07-31 19:14:22 +00:00
Warner Losh 336a1fd275 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
Warner Losh 29b71fbb75 List the members of the AT91SAM9G45 family. 2012-07-30 21:19:19 +00:00
Warner Losh 3ab2f2eb3e 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
Warner Losh 6ecf8b7749 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
Warner Losh 954bfb8bbf 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
Warner Losh e69d4e1fbd 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
Warner Losh 5880116cbf Add (back?) ohci atmel attachment. 2012-07-27 05:28:02 +00:00
Andrew Turner aaa1966f6b Add support for the DesignA Electronics Snapper9g45 System on Module.
Reviewed by:	imp
2012-07-26 08:05:28 +00:00
Andrew Turner 25d95ee2cc Add support for the Atmel AT91SAM9G45 CPU.
Reviewed by:	imp
2012-07-26 08:01:25 +00:00
Warner Losh 045da1cf0e Some models have 6 USARTS + DBGU. Set a consistent name. 2012-07-26 05:46:56 +00:00
Oleksandr Tymoshenko 86bce74937 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
Warner Losh 17fda71d9f These were never used, remove them. 2012-07-15 06:08:11 +00:00
Warner Losh eac2306319 Configure the peripheral pins for MCI devices. Eliminate the now-unused
at91_pio_rm9200.h.
2012-07-15 05:41:43 +00:00
Warner Losh f5dca533c2 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
Warner Losh 2f35297b24 uboot should be telling us it is an ETHERNUT5 for this board. Tag it
as such.
2012-07-14 06:00:37 +00:00
Warner Losh a81c202d81 Create common routines for configuring the serial ports and use them
on all the at91rm9200 boards.
2012-07-14 05:46:52 +00:00
Warner Losh 1221371f4a 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
Warner Losh bc52deb7a9 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
Warner Losh 1c882be4bc Remember where we found the DBGU and use that for our console. 2012-07-12 19:11:37 +00:00
Warner Losh 097047f652 Fix whitespace divot. 2012-07-12 13:54:24 +00:00
Warner Losh a68d1f48b9 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
Warner Losh 7f6eecf580 Create the children devices for the SoC in atmelarm bus node, not in
the identify routine of the CPU.
2012-07-12 04:23:11 +00:00
Warner Losh 0fb8b6b070 Export the interrupt status vector via soc_data. Set the interrupt
priorities in the AIC in the atmelarm driver before attaching the
children.  Delete redunant copies of the code.
2012-07-12 02:58:45 +00:00
Warner Losh 691b3c3238 Make the SoC stuff a little more modular, and start to move away from
having the CPU device that's a child of atmelarm that does stuff.

o Create a linker_set for the support fucntions for the SoCs.
o Rename soc_data to soc_info.
o Move the delay and reset function pointers to new soc_data struct
o Create elements for all known SoCs
o Add lookup of the SoC we found, and print a warning if it isn't one
  we know about.
2012-07-11 20:17:14 +00:00
Warner Losh a83760ee77 at91pit->at91_pit for consistnecy with other drivers. 2012-07-11 17:11:54 +00:00
Warner Losh f81522c98a at91$DEV->at91_$DEV to match other Atmel drivers. Also, export
at91_rst_cpu_reset.
2012-07-11 17:11:07 +00:00
Warner Losh 83f45363d0 Remove some more unused code. 2012-07-10 23:11:52 +00:00
Warner Losh 6e21b3a1b6 Go ahead and disable the interrupts for the DBGU the boot loader may
have left enabled after we detect the CPU, and remove the multiplely
copied code from the SoC modules.
2012-07-10 19:48:42 +00:00
Warner Losh d67febb24f Remove a useless bit of indirection. On all Atmel ARM products, irq 1
is the system IRQ, so use the define for it and get on with life.
2012-07-10 15:02:29 +00:00
Warner Losh 58bcb2a9b4 Pure style mischief. at91_$DEV_ rather than at91$DEV_ to match
others.
2012-07-10 06:21:42 +00:00
Warner Losh 37620f94c0 Minor rework to eliminate at91rm9200reg.h dependency and possibly set the
stage for a detach routine (unlikely to be useful, but while I was here..)
2012-07-10 06:18:53 +00:00
Warner Losh 19f4a07329 Collapse all copies of at91_add_child into at91.c. They were
logically identical before today, and actually identical after today's
changes.
2012-07-10 04:17:49 +00:00