Commit Graph

304 Commits

Author SHA1 Message Date
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
Warner Losh
86f2e4dc63 Missed one of the special AT91SAM9xxx_BASE defines. This should be
AT91_BASE.
2012-07-10 02:44:15 +00:00
Warner Losh
89e57ebbb5 The system IRQ is always IRQ 1. Make it so. 2012-07-10 02:39:03 +00:00
Warner Losh
9a5f8be0a7 Eliminate the AT91XXXX_BASE for each SoC. AT91_BASE is the right way
to spell this since we only have one AT91_BASE for all Atmel arm9 SoCs.
2012-07-10 02:14:50 +00:00
Warner Losh
378d88b3dc Remove some unused variables/externs that have been copied too many times... 2012-07-10 01:49:50 +00:00
Warner Losh
0d814a369c There's nothing AT91RM9200 specific about this file at all. 2012-07-10 01:13:00 +00:00
Warner Losh
8304b99a75 Create a generic way to support multiple boards within an
arm platform.  Add all the atmel boards to the ATMEL kernel for
testing purposes.  Until boot loader arg parsing of baord type
is done, this won't actually be able to do the runtime selection.
2012-07-07 05:02:39 +00:00
Warner Losh
ba1227af3f Create a pseudo-lint kernel for all at91 SoCs. This kernel will not
currently boot, but will serve as a good linting.  make universe could
now be altered to skip building all the other at91 kernels...
2012-07-01 06:56:41 +00:00
Warner Losh
bb64064e5d Opt-in rather than opt-out of the SoC. We don't really support
running with multiple SoCs compiled in very well anyway, so this just
wastes space.  As more and more SoCs arrive in the tree, it is better
to edit one master file that builds them all than many board files.
2012-07-01 06:34:17 +00:00
Marius Strobl
478f9295ef Exclude at91sam9x25 support, which just wastes space for Ethernut 5. 2012-06-30 14:48:52 +00:00
Warner Losh
c2353ed4c0 Tweak comment. 2012-06-29 06:06:19 +00:00
Warner Losh
5cb96b1dbd Add PIOD, make at91sam9x25 a standard SoC, tweak some comments. 2012-06-29 06:05:44 +00:00
Warner Losh
65b1f169a4 Ooops, replaced the at91sam9g20 interrupt list with the at91sam9x25 ones. 2012-06-29 04:49:50 +00:00
Warner Losh
007c69d506 Initital support for AT91SAM9X25 SoC and the SAM9X25-EK evaluation
board.  Much work remains.
2012-06-29 04:18:52 +00:00
Warner Losh
5af29dd303 Fix a stray debug that I committed accidentally years ago... 2012-06-22 06:44:22 +00:00
Warner Losh
2403db9a0f Move these #defines to at91reg.h (where I should have put them in the
first place).
2012-06-22 05:54:34 +00:00
Marius Strobl
e1020aef06 Revert the part of r236495 that introduced checking of SPI_SR_TXEMPTY
for TX transfer completion as for reasons unknown this occasionally
causes SPI_SR_RXBUFF and SPI_SR_ENDRX to not rise.
In any case, once the RX part of the transfer is done it's obvious
that the preceding TX part had finished and checking of SPI_SR_TXEMPTY
was introduced to rule out a possible cause for the data corruption
mentioned in r236495 but which didn't turn out to be the problem
anyway.

MFC after:	3 days
2012-06-18 20:14:42 +00:00
Marius Strobl
da20f734c0 Try to bring this file closer to style(9). 2012-06-18 19:47:25 +00:00
Marius Strobl
352a43b07f Unbreak after r236658 by comparing the right things. 2012-06-18 19:22:10 +00:00
Warner Losh
6212b9963b Throw this debug behind bootverbose. The information isn't all that
exciting once the initial board bring up is over.
2012-06-16 04:34:46 +00:00
Warner Losh
b44f8e5e1e Make it possible to link together a sam and an rm kernel. The results
aren't very pretty yet, but this takes DELAY and cpu_reset and makes
them pointers.

# I worry that these are set too late in the boot, especially cpu_reset.
2012-06-15 08:37:50 +00:00
Warner Losh
e6e7584dcd Collapse the files.at91 and files.at91sam9 back into files.at91.
Create a new option for at91rm9200 support.  Set this option in
std.at91.  Create a new option for the at91sam9 standard devices.  Set
this option in std.at91sam9.  Retire files.at91sam9.  Add options for
at91sam9x25 SoC and SAM9X25EK board, but don't connect it just yet as
the supporting files aren't quite ready.

Note: device at91rm9200 and device at91sam9 are presently mutually
exclusive.
2012-06-15 07:50:26 +00:00
Warner Losh
1591de53b1 Take half a step closer towards having a unified atmel kernel by
rearranging where we initialize the time counter and putting the
common stubs into a central place.
2012-06-15 06:38:55 +00:00
Warner Losh
3590dad094 More Linux boot support. Create arm_dump_avail_init() to initialize
this array either from Linux boot data, when enabled, or in the
typical way that most ports do it.  arm_pyhs_avail_init is coming
soon since it must be a separate function.
2012-06-14 04:18:56 +00:00
Warner Losh
d39655d7a4 Modify all the arm platform files to call parse_boot_param passing in
the boot parameters from initarm first thing.  parse_boot_param parses
the boot arguments and converts them to the /boot/loader metadata the
rest of the kernel uses.  parse_boot_param is a weak alias to
fake_preload_metadata, which all the platforms use now, but may become
more extensive in the future.

Since it is a weak symbol, specific boards may define their own
parse_boot_param to interface to custom boot loaders.

Reviewed by:	cognet@, Ian Lapore
2012-06-14 04:00:30 +00:00
Warner Losh
6a7be52dbe Strip trailing whitespace before other changes. 2012-06-13 04:52:19 +00:00
Andrew Turner
16072bc718 Remove an unneeded increment from initarm. The variable is uninitialised,
is not used in this part of the function and correctly initialised later
when it is used.
2012-06-10 10:40:22 +00:00
Andrew Turner
4ea15b8776 Pull out the common code to initialise proc0 & thread0 from initarm to a
common function.

Reviewed by:	imp
2012-06-10 01:13:04 +00:00
Warner Losh
c6aea9681a Remove stray break; that resulted from a last-minute, untested change. 2012-06-06 14:31:14 +00:00
Warner Losh
73a4b7a9d8 Enhance the Atmel SoC chip identification routines to account for more
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...
2012-06-06 06:19:52 +00:00
Warner Losh
a687c5ecc9 Remove dead code. 2012-06-05 14:19:59 +00:00