Commit Graph

38 Commits

Author SHA1 Message Date
scw 1a62c87dce Add a simple driver for the on-chip DMA controller. Its only use at
this time is for hardware-assisted page copy/zero.
2005-01-29 11:37:18 +00:00
chs fa37aec784 remove an unused macro (which was also removed from the sh3 version of this). 2004-12-13 02:34:03 +00:00
scw eb042dabb2 Fix format string lossage. 2003-11-09 21:12:08 +00:00
scw 89a3825de9 In scif_rxsoft, bail early if the input buffers have not been initialised yet.
This can happen if we drop into ddb on the serial console before
scif_attach() has been called.
2003-11-09 12:19:54 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
thorpej 96ea5b9ac4 Rename clock_rtc_config() to todr_attach(). 2003-07-18 21:41:22 +00:00
lukem ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
scw a7bc0a349e Some tweaks to reduce the effect of rounding errors in tmu_microtime()
and the calculation of the delay() constant.
2003-04-01 10:23:30 +00:00
scw bfca0494bd Try to configure all children of cprc0, not just clock. 2003-03-13 14:37:36 +00:00
scw d4f824014d A bunch of things:
- Clean up the way cpu-specific tlb/cache functions are configured
    and used.
  - Add a workaround for a problem whereby cpu* at superhyway? fails
    to probe.
  - Print more info about the cpu/cache.
  - Move the RESVEC handlers back into generic sh5 code and ditch
    the panic stack hack.
  - Make the on-chip SCIF device the default console on Cayman.
  - Add experimental support for booting via a standalone bootstrap
    program (not yet committed) and using the boot parameters passed
    in by it.
  - Add a few more SH elf constants.
  - Tick a couple of items off the TODO list.
2003-03-13 13:44:16 +00:00
scw 31b3a7c37f In scif_getc(), check SCIF_SCFSR2_RDF in addition to SCIF_SCFSR2_DR to
detect waiting Rx data. This fixes an occasional console lockup when
when pasting text at the ddb prompt.
2003-03-13 13:19:01 +00:00
thorpej dca15fc8c2 Use aprint_normal() for cfprint routines. 2003-01-01 02:10:08 +00:00
scw dbaff62d21 Make this compile again. 2002-11-23 09:14:14 +00:00
scw 511275734b Format string fixes. 2002-10-24 13:48:44 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
scw c01b319dcc There seem to be some stability problems with the scif serial port driver
at the moment, possibly as a side-effect of some yet-to-be-committed SH5
speed-ups.

Work-around it for now by using com0 as the console.
2002-10-19 08:43:32 +00:00
scw 89612efe30 Interrupt overhaul:
- Allocate interrupt handles dynamically from a pool(9) to reduce the
   number of TLB misses during interrupt dispatch.
 - Fully support evcnt(9) in all interrupt dispatchers.
2002-10-14 14:19:27 +00:00
scw a520b3b2c8 Convert to new devsw world order. 2002-10-04 10:16:56 +00:00
thorpej 89bf5a8f8e Add trailing ; to CFATTACH_DECL. 2002-10-02 15:52:22 +00:00
thorpej 3b6eef8108 Use CFATTACH_DECL(). 2002-10-01 19:24:47 +00:00
scw a7be636d26 Rename the SH5 PCI attachment to "sh5pci" instead of abusing the "pcibus"
config definition. The new config world order is more picky about such things.
2002-09-28 13:08:22 +00:00
scw 94b4198ec9 Bump the scif console priority to CN_REMOTE for now. 2002-09-28 13:03:22 +00:00
scw 3d776f64cf These hackish changes have been sitting around for a while. Commit
them so they don't get lost. This driver will be overhauled later
on anyway to make it shareable between sh[3-5].
2002-09-28 11:08:13 +00:00
scw e168d3e25c SH5's on-chip PCI bridge is attached as "pcibus", not "pchb". 2002-09-28 10:44:40 +00:00
scw 9c10dff0fb Print the intevt code in hex. 2002-09-28 10:43:36 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
scw 9393fbe941 Belated commit of code to calculate the delay constant used by delay(). 2002-09-22 20:57:23 +00:00
scw 7af71ec12b Some tidying up, and a fix for an event counter array overrun
which was responsible for corrupting the kernel IPT.
2002-09-07 20:43:32 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
scw ad5e71606f Don't claim we can support a stat clock at this time; I still need to
sort out some clocking issues.
2002-09-04 15:18:14 +00:00
scw 57ec33c922 s/==/!=/ when checking for counter wrap-around. 2002-09-02 20:04:25 +00:00
scw 986af15320 Setup the IRL[0-3] mode according to what the kernel config file specifies. 2002-08-30 10:41:24 +00:00
scw 14b4efaf64 If running on the simulator, skip the pbridge probe. 2002-08-30 10:39:26 +00:00
scw f6e3925495 Set the appropriate Timer Start bit after setting it all up. 2002-08-26 10:48:17 +00:00
scw aba39b410c Don't forget to initialise 'sc' on entry to the attach function ... 2002-08-26 10:45:55 +00:00
scw a1ed033a09 Hardcode FEMI base and top addresses, at least until I figure out
how to interpet VCR.MB_TOP and VCR.MB_BOT in some reasonable way.
2002-08-26 10:43:44 +00:00
scw 59474a8c82 NetBSD, meet the SH-5 cpu.
SH-5, meet NetBSD.

Let's hope this is the start of a long and fruitful relationship. :-)

This code, funded by Wasabi Systems, adds initial support for the
Hitachi SuperH(tm) SH-5 cpu architecture to NetBSD.

At the present time, NetBSD/evbsh5 only runs on a SH-5 core simulator
which has no simulated devices other than a simple console. However, it
is good enough to get to the "root device: " prompt.

Device driver support for Real SH-5 Hardware is in place, particularly for
supporting the up-coming Cayman evaluation board, and should be quite
easy to get running when the hardware is available.

There is no in-tree toolchain for this port at this time. Gcc-current has
rudimentary SH-5 support but it is known to be buggy. A working toolchain
was obtained from SuperH to facilitate this port. Gcc-current will be
fixed in due course.

The SH-5 architecture is fully 64-bit capable, although NetBSD/evbsh5 has
currently only been tested in 32-bit mode. It is bi-endian, via a boot-
time option and it also has an "SHcompact" mode in which it will execute
SH-[34] user-land instructions.

For more information on the SH-5, see www.superh.com. Suffice to say it
is *not* just another respin of the SH-[34].
2002-07-05 13:31:28 +00:00