coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
npcd378.h File Reference
#include <stdint.h>
Include dependency graph for npcd378.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NPCD837_HWM_WRITE_LOCK_CTRL   0x4
 
#define NPCD837_HWM_WRITE_LOCK_BIT   0x1
 
#define NPCD378_HWM_PSU_FAN_MIN   0x17
 
#define NPCD378_HWM_PSU_FAN_MAX   0xf8
 
#define NPCD378_HWM_PSU_FAN_PWM_CTRL   0x198
 
#define NPCD378_FDC   0x00 /* Floppy */
 
#define NPCD378_PP   0x01 /* Parallel port */
 
#define NPCD378_SP1   0x02 /* Com1 */
 
#define NPCD378_SP2   0x03 /* Com2 & IR */
 
#define NPCD378_PWR   0x04 /* LED and PWR button control */
 
#define NPCD378_AUX   0x05 /* PS/2 mouse */
 
#define NPCD378_KBC   0x06 /* PS/2 keyboard */
 
#define NPCD378_WDT1   0x07
 
#define NPCD378_HWM   0x08 /* HWM: 16 pages with each 255 byte */
 
#define NPCD378_GPIO_PP_OD   0x0F /* GPIO Push-Pull/Open drain select */
 
#define NPCD378_I2C   0x15 /* Provides 35Khz at IOBASE + 0x9 */
 
#define NPCD378_SUSPEND   0x1c /* Suspend control ? */
 
#define NPCD378_GPIOA   0x1e
 

Functions

uint8_t npcd378_hwm_read (const uint16_t iobase, const uint16_t reg)
 
void npcd378_hwm_write (const uint16_t iobase, const uint16_t reg, const uint8_t val)
 
void npcd378_hwm_write_start (const uint16_t iobase)
 
void npcd378_hwm_write_finished (const uint16_t iobase)
 

Macro Definition Documentation

◆ NPCD378_AUX

#define NPCD378_AUX   0x05 /* PS/2 mouse */

Definition at line 58 of file npcd378.h.

◆ NPCD378_FDC

#define NPCD378_FDC   0x00 /* Floppy */

Definition at line 53 of file npcd378.h.

◆ NPCD378_GPIO_PP_OD

#define NPCD378_GPIO_PP_OD   0x0F /* GPIO Push-Pull/Open drain select */

Definition at line 63 of file npcd378.h.

◆ NPCD378_GPIOA

#define NPCD378_GPIOA   0x1e

Definition at line 66 of file npcd378.h.

◆ NPCD378_HWM

#define NPCD378_HWM   0x08 /* HWM: 16 pages with each 255 byte */

Definition at line 62 of file npcd378.h.

◆ NPCD378_HWM_PSU_FAN_MAX

#define NPCD378_HWM_PSU_FAN_MAX   0xf8

Definition at line 13 of file npcd378.h.

◆ NPCD378_HWM_PSU_FAN_MIN

#define NPCD378_HWM_PSU_FAN_MIN   0x17

Definition at line 12 of file npcd378.h.

◆ NPCD378_HWM_PSU_FAN_PWM_CTRL

#define NPCD378_HWM_PSU_FAN_PWM_CTRL   0x198

Definition at line 14 of file npcd378.h.

◆ NPCD378_I2C

#define NPCD378_I2C   0x15 /* Provides 35Khz at IOBASE + 0x9 */

Definition at line 64 of file npcd378.h.

◆ NPCD378_KBC

#define NPCD378_KBC   0x06 /* PS/2 keyboard */

Definition at line 59 of file npcd378.h.

◆ NPCD378_PP

#define NPCD378_PP   0x01 /* Parallel port */

Definition at line 54 of file npcd378.h.

◆ NPCD378_PWR

#define NPCD378_PWR   0x04 /* LED and PWR button control */

Definition at line 57 of file npcd378.h.

◆ NPCD378_SP1

#define NPCD378_SP1   0x02 /* Com1 */

Definition at line 55 of file npcd378.h.

◆ NPCD378_SP2

#define NPCD378_SP2   0x03 /* Com2 & IR */

Definition at line 56 of file npcd378.h.

◆ NPCD378_SUSPEND

#define NPCD378_SUSPEND   0x1c /* Suspend control ? */

Definition at line 65 of file npcd378.h.

◆ NPCD378_WDT1

#define NPCD378_WDT1   0x07

Definition at line 61 of file npcd378.h.

◆ NPCD837_HWM_WRITE_LOCK_BIT

#define NPCD837_HWM_WRITE_LOCK_BIT   0x1

Definition at line 10 of file npcd378.h.

◆ NPCD837_HWM_WRITE_LOCK_CTRL

#define NPCD837_HWM_WRITE_LOCK_CTRL   0x4

Definition at line 9 of file npcd378.h.

Function Documentation

◆ npcd378_hwm_read()

uint8_t npcd378_hwm_read ( const uint16_t  iobase,
const uint16_t  reg 
)

Definition at line 17 of file superio.c.

References inb(), and outb().

Referenced by npcd378_hwm_write_finished(), and npcd378_hwm_write_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ npcd378_hwm_write()

void npcd378_hwm_write ( const uint16_t  iobase,
const uint16_t  reg,
const uint8_t  val 
)

Definition at line 28 of file superio.c.

References outb(), and val.

Referenced by npcd378_hwm_write_finished(), npcd378_hwm_write_start(), and npcd378_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ npcd378_hwm_write_finished()

void npcd378_hwm_write_finished ( const uint16_t  iobase)

Definition at line 43 of file superio.c.

References npcd378_hwm_read(), npcd378_hwm_write(), NPCD837_HWM_WRITE_LOCK_BIT, and NPCD837_HWM_WRITE_LOCK_CTRL.

Referenced by npcd378_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ npcd378_hwm_write_start()

void npcd378_hwm_write_start ( const uint16_t  iobase)

Definition at line 36 of file superio.c.

References npcd378_hwm_read(), npcd378_hwm_write(), NPCD837_HWM_WRITE_LOCK_BIT, and NPCD837_HWM_WRITE_LOCK_CTRL.

Referenced by npcd378_init().

Here is the call graph for this function:
Here is the caller graph for this function: