Commit Graph

49 Commits

Author SHA1 Message Date
joel
2e980c4bcf The NetBSD Foundation has granted permission to remove clause 3 and 4 from
the software.

Obtained from:	NetBSD
2010-03-03 17:55:51 +00:00
rrs
7a79101227 - Move rmi_pci_bus_space to header and avoid extern
- remove unused and commented code (MIPS_BUS_SPACE_PCI, pic_usb_ack)
- use rmi_pci_bus_space for USB too (needs byteswap)
- uncomment xls_ehci.c in files.xlr
- changes to xls_ehci.c - updated with dev/usb/controller/ehci_*.c as

Obtained from:	JC - c.jayachandran@gmail.com
2010-03-02 12:11:00 +00:00
rrs
05c4bc6f8b Fix another fo-pa of mine... duplicate patches should
not be applied and randy needs coffee in the morning
when working to help keep things sorted out... obviously :-)
2010-02-21 17:27:20 +00:00
rrs
b41b03a2e0 Fix for the rge driver for boards without rge6 and rge7.
- changes to avoid adding theses instances on specific chips
Obtained from:	C. Jayachandran - JC - c.jayachandran@gmail.com
2010-02-20 17:24:33 +00:00
rrs
f70d155673 Changes for pci and pci-e support
- add bus_space_rmi_pci.c for PCI bus space
- files.xlr update for changes in files
- pcibus.c merged into xlr_pci.c (they were small files with inter-dependencies)
- xlr_pci.c - lot of changes here with few fixes, formatting cleanup
Obtained from:	C. Jayachandran (JC) - c.jayachandran@gmail.com
2010-02-20 17:19:16 +00:00
rrs
08e82a2182 Opps forgot to add this:
- add bus_space_rmi_pci.c for PCI bus space

Obtained from:	C. Jayachandran -  <c.jayachandran@gmail.com>
2010-02-20 17:12:07 +00:00
rrs
a1acb96630 Cleanups for sys/mips/rmi/bus_space_rmi.c
- remove pci related code from bus_space_rmi.c, we will have another
file for PCI bus space functions which will do byte-swapping.
- remove local SWAP implementation
- added TODO stub for unimplemented functions

Obtained from:	C. Jayachandran - c.jayachandran@gmail.com
2010-02-20 16:32:33 +00:00
rrs
c3a2e02803 Some fixes to the current RMI interrupt handling, changes in this patch are:
- (cleanup) remove rmi specific 'struct mips_intrhand' - this is no
longer needed since 'struct intr_event' have all the required hooks
- add xlr_cpu_establish_hardintr, which has args for pre/post ithread
and filter hooks, so that the PCI code can add the PCI controller
interrupt ack code here
- make 'cpu_establish_hardintr' use the above function.
- (fix) change type of eirr/eimr from register_t to uint64_t. These
have to be 64bit otherwise we cannot handle interrupts from 32.
- (fix) use eimr to mask eirr before checking interrupts, so that we
will not handle masked interrupts.

Obtained from:  C. Jayachandran - c.jayachandran@gmail.com
2010-02-20 16:30:29 +00:00
rrs
1fff76b217 If a mbuf is split across two pages, we
have code that detects this and makes two
transmit descriptors. However its possible
that the algorithm detects when the second
page is not used (when the data aligns perfectly
to the bottom of the page). This caused a 0
len descriptor to be added which locks up the
rge device. Skip such things with a continue.

JC provided this patch... Thanks JC :-)
Obtained from:	JC (c.jayachandran@gmail.com)
2010-02-10 13:48:34 +00:00
rrs
74e6490161 Its possible that our RMI box has memory extending
above 4Gig. If so when we add the base address with
the size we will wrap. So for now we just ignore
such memory and only use what we can. When we
get 64 bit working then we will be much better ;->
2010-01-29 04:05:17 +00:00
rrs
644ee9feb9 Move ID up into comment block.. per bsdimp 2010-01-29 04:03:36 +00:00
rrs
c764df610e Make compilable.. i.e. the FreeBSD id I added must
be in comments.
2010-01-28 14:01:47 +00:00
rrs
35fcb712f9 Changes the msg ring so its a filter not a
handler. Somehow rrs missed this.. Thanks
to JC for catching this ;-)

Obtained from:	JC (jayachandranc@netlogicmicro.com
2010-01-28 14:01:16 +00:00
rrs
8ebfc85b25 Spacing changes in pic_ack and pic_delayed_ack 2010-01-26 14:33:57 +00:00
rrs
1998b27896 1) Make sure static is init'd to 0
2) In one place make sure we call the backup
   startup routine (from the timer).
2010-01-26 05:14:50 +00:00
rrs
5db9bca76f To prevent a LOR we need to pass in
a lock flag in the pic routines. In
some places we hold the pic lock, others
we do not.
2010-01-26 05:11:48 +00:00
rrs
c7c33d974e Fix up the msg ring driver a bit tighter
so that we don't loose an interrupt which
we appeared to be doing.
2010-01-26 05:10:10 +00:00
rrs
7fcbb3e319 Fixes setup of clock. It was not properly
initialized, thus backward time warnings
were being spewed to the console.
2010-01-26 05:07:41 +00:00
rrs
6bfde02405 Changes the order of the setting the int happened (inside
the lock).
2010-01-24 01:06:02 +00:00
rrs
3fd2819818 This hopefully will fix the network problem I was seeing.
Basically the msg ring interrupt was being re-enabled
inside a spinlock as the thread set it self up for rescheduling.
This won't work since inside the re-enable is another
spin lock.. which means on return from the reenable
the  interrupts have been reenabled. Thus you would
get a clock int and end up panicing holding a spin
lock to long :-o
2010-01-22 14:25:17 +00:00
imp
9dc568d9ce Place proper svn:keywords tag on all these files. They were created
somehow without them on projects/mips, and that mistake was propigated
over to head.

Submitted by:	rpaulo@
2010-01-12 21:17:36 +00:00
imp
24dcc74198 Correct a path in an include I missed earlier
Remove references to if_watchdog.  The rge_watchdog routine was empty anyway.
2010-01-11 17:29:20 +00:00
imp
5a323364a3 Attempt to cope with the dev/rmi -> mips/rmi/dev move. 2010-01-11 04:49:44 +00:00
imp
e5eacd7d63 Merge from projects/mips to head by hand:
Copy sys/dev/rmi to sys/mips/rmi/dev [sic].  For devices that are on
only one SoC, or family of SoC, we place them under sys/<vendor>/dev.
I'll fix the build problems this causes as best I can since rmi kernel
require external toolchains due to lack of support for rmi op-codes in
the ancient binutils we have in the tree.
2010-01-10 05:11:27 +00:00
imp
687f1a7fca Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the
BSP.  Provide a missing prototype.
2010-01-09 03:08:22 +00:00
imp
382bd114d4 Centralize initialization of pcpu, and set curthread early... 2010-01-08 22:48:21 +00:00
rrs
b82be8de61 Add missing function that doesintr naming and
init.
2009-12-23 14:55:33 +00:00
rrs
ef0ffba9da This is a list of the files for RMI's md_root
file system to get to multi-user. There are
still some rough edges, rge has an issue. And
someone held a spin lock to long.. But its
coming along :-)
2009-12-23 14:48:26 +00:00
rrs
e69c30c1a5 Fixes so kdb works. 2009-12-21 11:29:30 +00:00
rrs
f446703d10 Adds JC's fix to get rid of stray intr's.
Obtained from:	JC - jayachandraanc@netlogicmicro.com
2009-12-20 17:53:35 +00:00
rrs
861bbe697e Ok set in the values in clock 7 as in the
original codes (I had changed one by accident)
Also do the pic_ack/pic_delayed_ack after the interrupt
so we clear it. The clock with these changes starts working.
Its off doing a short/long short/long warning but it
now runs.

My NFS mount now works but has the same problem with
sbin/init (errno 8 ENOEXEC) so it panics with no init.

Either this is a problem with my buildworld.. OR its a
yet undiscovered RMI issue.
2009-11-11 22:36:19 +00:00
rrs
848686a92d Ok we need to have the clock handlers has filters. This
gets us up to a mount request :-)
2009-11-09 19:25:30 +00:00
rrs
05e1b5a011 a little more paran's 2009-11-09 19:22:57 +00:00
rrs
1f7c864732 White space changes. 2009-11-09 16:43:02 +00:00
rrs
029c5e0887 - Comment out recrusive call to setup interrupt.
- Change the way we pass the irq.
2009-11-09 16:42:08 +00:00
rrs
eae021635d Ok With this commit we actually get through
the mi_startup (or to the last of it).. and
hit a panic after :

uart0: <16550 or compatible> on iodi0
Trap cause = 2 (TLB miss....)

I did have to take the pci bus OUT of the
build to get this far, hit a cache error with
the PCI code in. Interesting thing is the machine
reboots too ;-)
2009-11-06 12:52:51 +00:00
rrs
1b573ec595 white space changes 2009-11-05 18:15:16 +00:00
rrs
7d19c2a8b4 ok we now get so that the uart init's and we can print. We
cannot set baud rate as they did in 6.4, this hoses things and
we loose our 38400 default term.

We now lock somewhere in tcinit.
2009-11-05 18:14:25 +00:00
rrs
2a289042be Fix spacing 2009-11-02 15:08:59 +00:00
rrs
3ee9c75c6d adds rmi specific mips extensions file and makes sure
the includes point to the new place.
2009-10-29 21:30:21 +00:00
rrs
73703ef8b3 White space changes
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    rmi/xls_ehci.c
M    rmi/clock.h
M    rmi/xlr_pci.c
M    rmi/perfmon.h
M    rmi/uart_bus_xlr_iodi.c
M    rmi/perfmon_percpu.c
M    rmi/iodi.c
M    rmi/pcibus.c
M    rmi/perfmon_kern.c
M    rmi/perfmon_xlrconfig.h
M    rmi/pcibus.h
M    rmi/tick.c
M    rmi/xlr_boot1_console.c
M    rmi/debug.h
M    rmi/uart_cpu_mips_xlr.c
M    rmi/xlrconfig.h
M    rmi/interrupt.h
M    rmi/xlr_i2c.c
M    rmi/shared_structs.h
M    rmi/msgring.c
M    rmi/iomap.h
M    rmi/ehcireg.h
M    rmi/msgring.h
M    rmi/shared_structs_func.h
M    rmi/on_chip.c
M    rmi/pic.h
M    rmi/xlr_machdep.c
M    rmi/ehcivar.h
M    rmi/board.c
M    rmi/clock.c
M    rmi/shared_structs_offsets.h
M    rmi/perfmon_utils.h
M    rmi/board.h
M    rmi/msgring_xls.c
M    rmi/intr_machdep.c
2009-10-29 21:14:10 +00:00
rrs
25289eefb5 more Updates on the RMI code close to compiling now ;-) 2009-10-29 15:55:25 +00:00
thompsa
16239c304f Fix build from r198563 (again). Sigh. 2009-10-28 21:41:23 +00:00
thompsa
97ba6bcbcf Fix build from r198563 2009-10-28 21:39:33 +00:00
thompsa
c9d4e4eaa6 Use init_static_kenv() and setenv() to simplify the environment string handling. 2009-10-28 21:36:46 +00:00
rrs
9eb34b6264 White space changes. 2009-10-26 11:00:37 +00:00
rrs
eeb2f3bff6 Fix Copyright ;-) 2009-10-26 10:59:55 +00:00
rrs
160ac8a2f4 More initial RMI files. Note that these so far do NOT
compile and many of them may disappear. For example
the xlr_boot1_console.c is old code that is ifdef'd out.
I will clean these sorts of things up as I make progress
on the port. So far the only thing I have I think straightened
out is the bits around the interupt handling... and hey that
may be broke ;-)
2009-10-15 21:14:42 +00:00
rrs
6e361eec02 Adds the first files from the RMI work with my re-work of their
intr_machdep.c to use updated interfaces etc. More coming.. and
some day it may compile ;-)
2009-10-15 21:05:09 +00:00