Commit Graph

79 Commits

Author SHA1 Message Date
alc
760248140c Eliminate unused global variables. 2006-11-11 20:57:52 +00:00
imp
bac59c3a27 MFp4:
o Fix the packet statistics
	o Make sure we set the FD bit when in full duplex
	o Improve TX side efficency by eliminating a data copy for
	  unfragmented mbufs (the hardware can't do s/g).
	o Minor busdma pedantry
	o better comments in some places, more XXX in others
	o Minor style nits.

This solves a problem I was seeing where I'd get no ethernet when not
booting with a NFS root.  Well, unless I unplugged the cable and
plugged it back in first so I'd get the same up down up messages I get
for NFS root...

Thanks to sam and scottl for suggestions on making this driver more
efficient through better use of approrpiate APIs.
2006-11-03 07:39:37 +00:00
jb
f82c799735 Make KSE a kernel option, turned on by default in all GENERIC
kernel configs except sun4v (which doesn't process signals properly
with KSE).

Reviewed by:	davidxu@
2006-10-26 21:42:22 +00:00
imp
d7da10161e MFp4: Move the parameters that are basically dictated by the AT91
organization to that file.
2006-10-25 08:00:11 +00:00
imp
d7e5c47a91 MFp4: Status register bits 2006-10-25 07:58:18 +00:00
imp
c24d0dcbc6 MFp4: Working SPI driver. 2006-10-20 07:10:13 +00:00
imp
105dd71b16 Commit WIP SSC driver, more work is needed here, but it configures
things OK.
2006-10-20 07:08:59 +00:00
imp
dbcd7809d1 More register definitions. 2006-10-20 07:08:15 +00:00
imp
22d781c5e8 Progress commit for getting TWI working 2006-10-20 07:06:39 +00:00
imp
e08539a4c7 Add sysctl to export current state of rmii vs mii configuraiton.
Fix a typo in resource allocation.
2006-10-20 07:04:56 +00:00
imp
4084c0b8bc Add configuration of the SSC lines for second SSC. 2006-10-20 07:03:57 +00:00
imp
3434ef1d27 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
imp
6af2f13b58 MFp4: first cut at getting I2C transfers working (generically). I'm
unsure if this driver correctly implements all the start/stop junk
right (but it did or didn't before I made this commit).
2006-09-07 21:53:28 +00:00
imp
423b53ad2f MFp4: berndt pointed me at an errata that shows that the stat register
offsets were originally documented incorrectly.  This fixes that.  It
shouldn't affect anything other than error stat reporting.
2006-09-07 21:50:01 +00:00
cognet
fa893a6f9c Relocate the vector page for AT91, to work around bugs with the LOW_VECTOR
code.
2006-08-28 20:05:00 +00:00
cognet
3748f87bf1 Do not create dma maps with bus_dmamap_create, as we call
bus_dmamem_alloc later which will overwrite the value, leading to a small
memory leak.
2006-08-25 13:38:42 +00:00
imp
8d1199edcd Hook into the watchdog device, if present. Also, turn off the
watchdog timer stuff when we boot because the boot blocks are turning
it on...
2006-08-09 20:58:55 +00:00
cognet
2d628bb4d9 Rewrite ARM_USE_SMALL_ALLOC so that instead of the current behavior, it maps
whole the physical memory, cached, using 1MB section mappings. This reduces
the address space available for user processes a bit, but given the amount of
memory a typical arm machine has, it is not (yet) a big issue.
It then provides a uma_small_alloc() that works as it does for architectures
which have a direct mapping.
2006-08-08 20:59:38 +00:00
kevlo
ae60705942 Remove a bogus i = 0.
Approved by: cognet
2006-08-08 01:18:18 +00:00
cognet
405961b2ae Use virtual_avail instead of freemempos as the starting point of the available
physical memory, as the vm uses the memory between freemempos and
virtual_avail.

MFC After:	3 days
2006-07-25 23:07:35 +00:00
cognet
83a16c4049 Fix ALT_BREAK_TO_DEBUGGER on the AT91 :
The core uart code expects the receive method to actually puts the
characters read into its buffers. For AT91, it's done in the ipend routine,
so also check if we have the alternate break sequence here.

MFC after:	3 days
2006-07-20 21:03:43 +00:00
cognet
34956b2cd0 If we can't defrag a packet, re-queue it instead of dropping it. 2006-07-17 21:36:08 +00:00
cognet
68d3bbc684 #if => #ifdef 2006-07-17 21:20:00 +00:00
cognet
1d520bd714 Add a comment explaining why the OHCI mapping has been commented out. 2006-07-15 00:09:53 +00:00
imp
29ab994ef0 MFp4: this now depends on new spi bus stuff 2006-07-14 22:41:54 +00:00
imp
a3607b2b33 MFp4: tweaks 2006-07-14 22:40:24 +00:00
imp
60a615aa4e MFp4: elevate quality of slow clock a little 2006-07-14 22:31:12 +00:00
imp
a96b0fc43f MFp4: paren police 2006-07-14 22:30:44 +00:00
imp
1248744935 MFp4:
Introduce framework to configure the multiplexed pins on boot.

	Since the USART supprots RS-485 multidrop mode, it allows the
	TX pins to float.  However, for RS-232 operations, we don't
	want these pins to float.  Instead, they should be pulled up
	to avoid mismatches.  Linux does something similar when it
	configures the TX lines.  This implies that we also allow the
	RX lines to float rather than be in the state they are left in
	by the boot loader.  Since they are input pins, I think that
	this is the right thing to do.

	Plus minor for our board.
2006-07-14 22:22:57 +00:00
imp
de4939a282 MFp4:
Fix typo in RTC_CALR_MK.
2006-07-14 22:06:01 +00:00
imp
05cb2db736 The TSC board uses a 16MHz base clock for the AT91RM9200, while the Kwikbyte
board uses a 10MHz base clock.  Cope with this difference.
2006-07-14 22:01:51 +00:00
imp
3b9505ced7 Implement the set_time function. Rather pointless with this RTC, as it
resets when the core resets, but there may be some use for it...
2006-07-14 21:37:19 +00:00
imp
d9d2d73de5 MF p4:
Adapt to forthcoming spi framework.  The ioctls for SPI commands and such
belong in the higher level driver.
2006-07-14 21:35:59 +00:00
imp
6dccb75673 Be sure to flush the cache after a partial read on timeout. Expand
comments about timeouts.  Fix a style nit.  Sometimes small messages
were getting corrupted.
2006-07-14 21:33:04 +00:00
imp
e5fffb8574 Move some of the common parameters into the std. files for this platform.
Also migrate from MD disk to NFS boot.
2006-07-14 15:20:31 +00:00
cognet
45301dddff Comment out the mapping of the OHCI controller registers va == pa. This
address is in the userland address space. The proper thing is either to choose
a virtual address in the kernel address space beyond the KVA, or to use
pmap_mapdev().
2006-07-12 00:48:50 +00:00
imp
d1b6a98346 Add support for configuring pins to be one of {GPIO, PERIPHERAL A or
PERIPHERAL B}, as well as direction of GPIO pin.  Add defines for all
the pins.
2006-07-02 03:50:44 +00:00
imp
7a60ad8bb4 MFp4:
Make serial ports more robust and reliable.  Make non-console ports
work.  This might have broken skyeye stuff.

o Introduce ping-pong receive buffers.
o Use DMA to copy characters directly into memory.
o Support baud rates other than 115200
o Use 1 stop bit when 1 stop bit is requested (otherwise 2 were used,
  which caused dropped characters when received in bursts).
o Use 1.5 stop bits for 5-bit bytes, and 2 stop bits otherwise when 2
  stop bits were requested.
o Actually update line parameters.
o Fix comments
o Move init into attach
o Tweaks to TX interrupt registers to get them reliable and non-storming.
o harvest data in ipend since the latency between it and the callback
  was too long.  This likely is how it should be, I don't know why I deferred
  things to the callback before.
o disable all interrupts in console init.  We don't want interrupts until
  we turn on an ISR.
o cosmetic tweaks
o Automatically detect of the TIMEOUT interrupt is supported.  If so, use
  it so we get better CPU utilization.  Otherwise do a character at a time
  RX.  Good news here is that it seems we have enough CPU and low enough
  fast interrupt latency to do this reliably.
o Don't read USART_CR.  It is a write-only register.
o start to implement bus_ioctl.  Do BAUD now...
2006-07-02 03:45:33 +00:00
cognet
5688b2b9fa Backout previous commit, Warner committed at91_pio.c... 2006-06-23 23:07:11 +00:00
cognet
109db2df6d Comment out at91_pio.c, it's not in CVS. 2006-06-23 22:30:55 +00:00
imp
7ac9e2a5c2 Compute physmem so we can print it correctly on boot.
Slightly optimize while I'm here.
2006-06-20 23:40:04 +00:00
imp
da7a558f2e Probe the memory size of the board better. Look at the bus width,
number of banks, rows and columns the SDRAMC is programmed to access
to determine the RAM size for the board, rather than hard-wiring it to
be 32MB.  My company's board with 64MB now probes correctly, as does
the KB9202 with only 32MB.  This means that to detect the right memory
size, our boot loader must correctly initialize these values.  This is
a fairly safe assumption because the boot loader has to initialize
SDRAM already, and it isn't really possible to change this register
after we've accessed SDRAM.
2006-06-20 20:13:40 +00:00
imp
efe72c3bf7 Carefully note the RMII bit in the config register at attach time.
The boot loader is supposed to leave this bit set to the right value
for the board.  If this bit was set at attach time, use it to init the
config register correctly.

Note: this means the boot loader has to properly initialize it.
2006-06-17 23:24:35 +00:00
imp
c2756c87a0 improve reporting of clocks 2006-06-17 23:22:10 +00:00
cognet
e928591f2a MFp4: Increase the L1 pagetable needed for the kernel from 8 to 22, to be
able to boot fat kernels.
2006-06-12 22:57:24 +00:00
imp
21150f79c2 Remove sa1_cache_clean_addr. It isn't needed.
Submitted by: kevlo
2006-06-07 05:36:10 +00:00
cognet
e748a32ffa We have an implementation of generic_bs_rr_1, so use it, as some drivers use
it.

Submitted by:	kevlo
2006-05-19 11:27:02 +00:00
cognet
2e58b61962 Resurrect Skyeye support :
Add a new option, SKYEYE_WORKAROUNDS, which as the name suggests adds
workarounds for things skyeye doesn't simulate. Specifically :
- Use USART0 instead of DBGU as the console, make it not use DMA, and           manually provoke an interrupt when we're done in the transmit function.
- Skyeye maintains an internal counter for clock, but apparently there's
no way to access it, so hack the timecounter code to return a value which
is increased at every clock interrupts. This is gross, but I didn't find a
better way to implement timecounters without hacking Skyeye to get the
counter value.
- Force the write-back of PTEs once we're done writing them, even if they
are supposed to be write-through. I don't know why I have to do that.
2006-05-13 23:41:16 +00:00
cognet
a100106c75 Get this to compile :
- The prototype of uart_bus_probe() hasn't been changed in cvs yet, so use the
old one.
- Add at91_pdcreg.h, needed by uart_dev_at91usart.c.
2006-05-11 14:30:28 +00:00
imp
09e17e600a When returning a resource that we've allocated with rman_reserve_resource,
go ahead and set the rid for that resource.
2006-04-20 04:12:02 +00:00