include/linux/hil.h

Source file repositories/reference/linux-study-clean/include/linux/hil.h

File Facts

System
Linux kernel
Corpus path
include/linux/hil.h
Extension
.h
Size
18857 bytes
Lines
484
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _HIL_H_
#define _HIL_H_

/*
 * Hewlett Packard Human Interface Loop (HP-HIL) Protocol -- header.
 *
 * Copyright (c) 2001 Brian S. Julin
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL").
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 *
 * References:
 * HP-HIL Technical Reference Manual.  Hewlett Packard Product No. 45918A
 *
 * A note of thanks to HP for providing and shipping reference materials
 * free of charge to help in the development of HIL support for Linux.
 *
 */

#include <asm/types.h>

/* Physical constants relevant to raw loop/device timing. 
 */ 

#define HIL_CLOCK		8MHZ
#define HIL_EK1_CLOCK		30HZ
#define HIL_EK2_CLOCK		60HZ

#define HIL_TIMEOUT_DEV         5	/* ms */
#define HIL_TIMEOUT_DEVS	10	/* ms */
#define HIL_TIMEOUT_NORESP	10	/* ms */
#define HIL_TIMEOUT_DEVS_DATA	16	/* ms */
#define HIL_TIMEOUT_SELFTEST	200	/* ms */


/* Actual wire line coding.  These will only be useful if someone is 
 * implementing a software MLC to run HIL devices on a non-parisc machine.
 */

#define HIL_WIRE_PACKET_LEN	15
enum hil_wire_bitpos {
	HIL_WIRE_START		= 0,
	HIL_WIRE_ADDR2,
	HIL_WIRE_ADDR1,
	HIL_WIRE_ADDR0,
	HIL_WIRE_COMMAND,
	HIL_WIRE_DATA7,
	HIL_WIRE_DATA6,
	HIL_WIRE_DATA5,
	HIL_WIRE_DATA4,
	HIL_WIRE_DATA3,
	HIL_WIRE_DATA2,
	HIL_WIRE_DATA1,
	HIL_WIRE_DATA0,
	HIL_WIRE_PARITY,
	HIL_WIRE_STOP
};

/* HP documentation uses these bit positions to refer to commands;
 * we will call these "packets".
 */
enum hil_pkt_bitpos {
	HIL_PKT_CMD		= 0x00000800,
	HIL_PKT_ADDR2		= 0x00000400,
	HIL_PKT_ADDR1		= 0x00000200,
	HIL_PKT_ADDR0		= 0x00000100,
	HIL_PKT_ADDR_MASK	= 0x00000700,
	HIL_PKT_ADDR_SHIFT	= 8,
	HIL_PKT_DATA7		= 0x00000080,
	HIL_PKT_DATA6		= 0x00000040,

Annotation

Implementation Notes