Commit Graph

32 Commits

Author SHA1 Message Date
Warner Losh
8440b5885d MFp4:
Reach over into the arm tree to grab some at91 definitions.
Better warnings
Lots of build tweaks
2006-08-10 18:22:56 +00:00
Warner Losh
20311a8e46 MFp4: remove obsolete files 2006-08-10 18:19:45 +00:00
Warner Losh
87ad01e6e3 MFp4:
Remove obsolete files in list
	Add spi flash reading routines
2006-08-10 18:14:35 +00:00
Warner Losh
d4a46cca62 MFp4: Numerous changes from p4 to try to improve tftp downloading,
reduce code footprint, etc.  While some problems still remain, the
reliability of tftp is much improved.
2006-08-10 18:11:22 +00:00
Warner Losh
cabd3e547a MFp4: consolidate #include files down to lib.h 2006-08-10 18:07:49 +00:00
Warner Losh
592c5848a6 MFp4: These will migrate to the boot specific directories because they
are too hard to share between the different boot loaders.
2006-08-10 18:07:01 +00:00
Warner Losh
98de821987 MFp4: Make it clearer that the address passed to the eeprom routines is
really an offset within the eeprom device, and not a IIC address.
2006-08-10 18:03:50 +00:00
Warner Losh
7492b55513 MFp4: Catchup with migration of some defines. 2006-08-10 18:02:27 +00:00
Warner Losh
5c35a13adf MFp4: Tweaks for our board. 2006-08-10 17:59:22 +00:00
Warner Losh
b51b3172ba MFp4: Increase character timeout to 10. Make it a #define for easier
changes in the future.  This helps with getting started and to
overcome the really sucky level of granuality this timeout has in
getc.  A timeout of 1 means 'wait until top of next second' rather
than 'wait for at least a second'.
2006-08-10 17:54:51 +00:00
Warner Losh
2e6c020cf2 Add a dummy makefile to keep build happy 2006-08-10 06:29:15 +00:00
Warner Losh
7ea1357336 MFp4:
Make getc(0) polling (this has the happy side effect of saving
	8 bytes in the generated code).
2006-04-21 13:58:51 +00:00
Warner Losh
69f5220b21 MFp4: Loop forever getting characters... A kludge for now. 2006-04-21 13:56:26 +00:00
Warner Losh
750f97a294 MFp4: Integrate support for building tag support for linux booting. 2006-04-21 13:51:47 +00:00
Warner Losh
0cef210b08 MFp4:
Init eeprom here now that we don't init the eeprom in arm_init.s
	and read in the second 8k of the data.
	Tweak formatting.
2006-04-21 13:44:58 +00:00
Warner Losh
ca2c5ec68f Move from arm_init.s -> .S. #ifdef linux vs freebsd defaults for the
boot loader (linux booting helps regression testing).  No repo copy
because of limited history.
2006-04-21 13:40:26 +00:00
Warner Losh
9b062675f0 MFp4: formatting nits and minor style changes that likely won't matter. 2006-04-21 07:45:57 +00:00
Warner Losh
acc47bab5b Allow one to enable building tags. Check the size of the boot imag. 2006-04-21 07:41:36 +00:00
Warner Losh
ac1e0174a6 MFp4:
On the KB9202 go ahead and enable the flash controller so the boot
loader can access the parallel flash.
2006-04-21 07:29:14 +00:00
Warner Losh
42ed626f87 MFp4:
Make this compile, assuming that you have linux installed in a
sensible place.  tag_list is disabled by default, since we don't
distribute linux, but it is desirable to allow the boot loader to boot
Linux or FreeBSD (mostly for testing).
2006-04-21 07:19:22 +00:00
Warner Losh
9ac58632a3 MFp4:
Minor diffs to reduce diffs to p4.
2006-04-21 07:12:12 +00:00
Warner Losh
fe51f25d3f spi flash updating boot loader. upload this file for the recovery
xmodem download.  Then download the image you want in the flash.
This will burn the image into the flash.  You must then reset the
unit and the new flash image will be used for booting...
2006-04-21 06:51:08 +00:00
Warner Losh
776524db7d iic eeprom updating boot loader. upload this file for the recovery
xmodem download.  Then download the image you want in the eeprom.
This will burn the image into the eeprom.  You must then reset the
unit and the new eeprom image will be used for booting...
2006-04-21 06:48:52 +00:00
Warner Losh
ecade1c5b5 Add boot0iic and boot0spi. These are 'shortcut' boot loaders designed
to replace either a bad iic eeprom with one you download with xmodem,
or likewise with a spi flash.
2006-04-21 06:43:32 +00:00
Warner Losh
ae78672c56 MFp4 (checkpoint of work in progress):
o Use a directory layout that is more akin to the i386 boot layout.
o Create a libat91 for library routines that are used by one or more
  of the boot loaders.
o Create bootiic for booting from an iic part.
o Create bootspi for booting from an spi part.
o Optimize the size of many of these routines (especially emac.c).  Except
  for the emac.c optimizations, all these have been tested.
o eliminate the inc directory, libat91 superceeds it.
o Move linker.cfg up a layer to allow it to be shared.
2006-04-19 17:16:49 +00:00
Warner Losh
78fd9f198c Fix style nit noticed by bde. 2006-04-15 02:51:53 +00:00
Warner Losh
e43d852f65 Add commented out define for TSC board's boot0. 2006-04-13 17:44:05 +00:00
Warner Losh
e439ab9afe MFp4:
For 32-bit SDRAM systems, enable D16 to D31 in the PIO controller.
Otherwise they read back as 0xffff.

Shave 8 bytes from the object size by using AT91C_BASE_PIOA directly
and by not assigning PIO_BSR to 0 in the DBGU init.  That's a nop in
two ways (everything defaults to peripheral A, and writing 0 changes
nothing).
2006-04-13 17:39:34 +00:00
Warner Losh
8015f1dbb8 Merge from p4:
Many places used #define FOO ((unsigned int) 0x23) where a simpler
#define FOO 0x23u would have sufficed.  This practice is overly
verbose and has the disadvantage that you can't say

	#if FOO == BAR
	#endif

because the extra "unsigned int" tokens choke cpp's little brain.
Migrate to the latter style to allow use in preprocessor statements.
The two are the same semantically anyway in a C context (at least for
the uses they are put to presently, C gurus can explain to me how they
differ).
2006-04-13 17:34:23 +00:00
Warner Losh
3de060b996 Need at91rm9200_lowlevel.h for SDRAM_BASE definition. 2006-04-13 17:31:02 +00:00
Warner Losh
6e8aee768a Common register definition for AT91RM9200 2006-04-12 21:23:36 +00:00
Warner Losh
e06ca69b2f Recovery boot loader for the AT91 family of processors. Download it
via xmodem to the DBGU port when the AT91 comes up in recovery mode.
The recovery loader will then load your program via xmodem into SDRAM
at 1MB which can do its things.  It needs to be tweaked to the
specific board one is using, but it fits in < 1kB (all of Atmel's ARM
products have at least 8kb of SRAM that I can tell, so this should
work for them all).

Parts of this code were provided by Kwikbyte with copyright
specifically disclaimed.  I heavily modified it to act as a recovery
loader (before it was a bootstrap loader) and to optimize for size
(before I started the size was closer to 8k).

Bootstrap loaders for SPI and IIC to follow.
2006-04-12 21:22:44 +00:00