SuperH Interfaces Guide¶
- Author:
Paul Mundt
Memory Management¶
SH-4¶
Store Queue API¶
- voidsq_flush_range(unsignedlongstart,unsignedintlen)¶
Flush (prefetch) a specific SQ range
Parameters
unsignedlongstartthe store queue address to start flushing from
unsignedintlenthe length to flush
Description
Flushes the store queue cache fromstart tostart +len in alinear fashion.
- unsignedlongsq_remap(unsignedlongphys,unsignedintsize,constchar*name,pgprot_tprot)¶
Map a physical address through the Store Queues
Parameters
unsignedlongphysPhysical address of mapping.
unsignedintsizeLength of mapping.
constchar*nameUser invoking mapping.
pgprot_tprotProtection bits.
Description
Remaps the physical addressphys through the next available store queueaddress ofsize length.name is logged at boot time as well as throughthe sysfs interface.
- voidsq_unmap(unsignedlongvaddr)¶
Unmap a Store Queue allocation
Parameters
unsignedlongvaddrPre-allocated Store Queue mapping.
Description
Unmaps the store queue allocationmap that was previously created bysq_remap(). Also frees up the pte that was previously inserted intothe kernel page table and discards the UTLB translation.
Machine Specific Interfaces¶
mach-dreamcast¶
Parameters
structdevice*devthe RTC device (ignored)
structrtc_time*tmpointer to resulting RTC time structure
Description
Grabs the current RTC seconds counter and adjusts it to the Unix Epoch.
Parameters
structdevice*devthe RTC device (ignored)
structrtc_time*tmpointer to new RTC time structure
Description
Adjusts the giventv to the AICA Epoch and sets the RTC seconds counter.
mach-x3proto¶
- intilsel_enable(ilsel_source_tset)¶
Enable an ILSEL set.
Parameters
ilsel_source_tsetILSEL source (see ilsel_source_t
enumininclude/asm-sh/ilsel.h).
Description
Enables a given non-aliased ILSEL source (<= ILSEL_KEY) at the highestavailable interrupt level. Callers should take care to order callsitesnoting descending interrupt levels. Aliasing FPGA and external boardIRQs need to useilsel_enable_fixed().
The return value is an IRQ number that can later be taken down withilsel_disable().
- intilsel_enable_fixed(ilsel_source_tset,unsignedintlevel)¶
Enable an ILSEL set at a fixed interrupt level
Parameters
ilsel_source_tsetILSEL source (see ilsel_source_t
enumininclude/asm-sh/ilsel.h).unsignedintlevelInterrupt level (1 - 15)
Description
Enables a given ILSEL source at a fixed interrupt level. Necessaryboth for level reservation as well as for aliased sources that onlyexist on special ILSEL#s.
Returns an IRQ number (asilsel_enable()).
- voidilsel_disable(unsignedintirq)¶
Disable an ILSEL set
Parameters
unsignedintirqBit position for ILSEL set value (retval from enable routines)
Description
Disable a previously enabled ILSEL set.
Busses¶
Maple¶
- intmaple_driver_register(structmaple_driver*drv)¶
register a maple driver
Parameters
structmaple_driver*drvmaple driver to be registered.
Description
Registers the passed indrv, while updating the bus type.Devices with matching function IDs will be automatically probed.
- voidmaple_driver_unregister(structmaple_driver*drv)¶
unregister a maple driver.
Parameters
structmaple_driver*drvmaple driver to unregister.
Description
Cleans up aftermaple_driver_register(). To be invoked in the exitpath of any module drivers.
- voidmaple_getcond_callback(structmaple_device*dev,void(*callback)(structmapleq*mq),unsignedlonginterval,unsignedlongfunction)¶
setup handling MAPLE_COMMAND_GETCOND
Parameters
structmaple_device*devdevice responding
void(*callback)(structmapleq*mq)handler callback
unsignedlongintervalinterval in jiffies between callbacks
unsignedlongfunctionthe function code for the device
- intmaple_add_packet(structmaple_device*mdev,u32function,u32command,size_tlength,void*data)¶
add a single instruction to the maple bus queue
Parameters
structmaple_device*mdevmaple device
u32functionfunction on device being queried
u32commandmaple command to add
size_tlengthlength of command string (in 32 bit words)
void*dataremainder of command string