Commit Graph

25 Commits

Author SHA1 Message Date
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
6a7be52dbe Strip trailing whitespace before other changes. 2012-06-13 04:52:19 +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
b33fdab5e0 Revert debug and other immature code accidentally committed in r236372. 2012-06-01 03:00:36 +00:00
Warner Losh
b8b0747b3c Initialize the clocks before we call cninit() so that the serial
console so initialized will work upon return from cninit.  While this
is the very next line, other platforms setup all this stuff before
calling cninit.  Also, initialize the SDRAM base register in the inner
block in at91_ramsize().
2012-06-01 02:55:42 +00:00
Marius Strobl
f7f6865e6d - Add support for MCI1 revision 2xx controllers and a work-around for their
"Data Write Operation and number of bytes" erratum.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
2012-04-22 00:43:32 +00:00
Kevin Lo
d11bbab85d Remove pointless semicolons after label 2011-09-30 04:55:23 +00:00
Olivier Houchard
4ad6106939 if_ate.c:
* Support for sam9 "EMAC" controller.
    * Support for rmii interface to phy.

at91.c & at91sam9.c:

    * Eliminate separate at91sam9.c file.
    * Add new devices to at91sam9_devs table.

at91_machdep.c & at at91sam9_machdep.c:

    * Automatic chip type determination.
    * Remove compile time chip dependencies.
    * Eliminate separate at91sam9_machdep.c file.

at91_pmc.c:

    * Corrected support for all of the sam926? and sam9g20 chips.
    * Remove compile time chip dependencies.

My apologies to Greg for taking so long to take care of it.
2010-10-06 22:25:21 +00:00
Andriy Gapon
08d43f8e62 strict kobj signatures: number of fixes for arm architecture
no functional changes should result

Reviewed by:	imp, current@
Approved by:	jhb (mentor)
2009-06-11 17:05:13 +00:00
Warner Losh
3d74c77136 Move to having a caps flag. Newer versions of the AT91 family don't
need the bouncing, so save a few copies in that case.  Also convert
4-bit code selection to using it.
2009-01-23 00:51:25 +00:00
Warner Losh
d78f78230d Don't over-commit the DMA. Use the passed in size of the transfer
rather than a fixed 512...  This fixes the mount root problem on at91.
Prior to the SD card reorg, all data transfers were 512 bytes, so we
didn't notice.
2009-01-22 22:29:21 +00:00
Warner Losh
6af05bc921 Remove now-redundant declaration. 2009-01-22 21:55:04 +00:00
Warner Losh
c5fb414e0a o The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.
o Only set 4-bit caps on those boards that have 4-bit caps (this means that
  because we don't set wire4 yet, this forces us to always use 1-bit bus).
o Don't test wire4 when setting up the bus width, since bad things will
  happen if we do.

# This likely won't fix the busted at91 sd card support, but these are
# needful changes for correctness.
2009-01-21 17:39:11 +00:00
Alexander Motin
96dfc86948 Implement MMCBR_IVAR_CAPS. It should better be implemented, or results
can be unpredictable.

PR:		arm/128987
2009-01-20 17:36:58 +00:00
Warner Losh
82645a84eb Tweak the disclaimer section of the license to match COPYRIGHT, for
better or worse.  Ok'd by folks that have additional copyrights to the
files in cases where there's joint authorship.
2008-11-25 00:13:26 +00:00
Stanislav Sedov
ec5556611c - Fix two minor errors in at91 code.
PR:		arm/128959
Submitted by:	Bjorn Konig <bkoenig@alpha-tierchen.de>
Approved by:	kib (mentor)
2008-11-18 12:42:59 +00:00
Alexander Motin
3a4a255741 Allow card reader bridge driver to report maximum supported transfer size.
sdhci supports up to 65535 blocks transfers, at91_mci - one block.

Enable multiblock operations disabled before to follow at91_mci driver
limitations.

Reviewed by:	imp@
2008-10-29 20:01:26 +00:00
Warner Losh
2bfca5e908 Use bus_get_dma_tag() instead of NULL here. Not really needed for atmel
at the moment, but it is more correct.
2008-10-07 17:23:16 +00:00
Warner Losh
cc35bcd157 Properly implement read only. Also, the caps implementation is wrong
here, so I'm backing it out.
2008-09-30 02:32:41 +00:00
Warner Losh
093bb0f8cf Implement MMCBR_IVAR_CAPS for AT91 MCI device.
Submitted by:	mav@ (well, not this one, but the base impl was)
2008-09-28 23:37:56 +00:00
Warner Losh
8691fc004b Turn some lame pseudo-code into a less lame comment. 2008-09-05 22:30:59 +00:00
Warner Losh
f672b4aee5 Kill overly verbose messages about setting bus width.
Approved by: re@ (blanket)
2007-09-16 07:48:58 +00:00
Paolo Pisati
ef544f6312 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
2007-02-23 12:19:07 +00:00
Bernd Walter
05a3e0db5c MFp4: Read access require PDC to be setup first otherwise we might get
overrun errors.
	Write access however need cmd first, so keep the existing order
	for them.
2007-01-05 01:18:32 +00:00
Warner Losh
e41e815e5c MMC/SD bridge driver (host adapter) for AT91RM9200's MCI interface.
This interface also appears in the AT91SAM9260 and '61 as well as the
AVR32 based micros from Atmel.  We don't yet support write protect or
hot-swap in this bridge driver.
2006-10-20 06:44:04 +00:00