Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
config.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/console.h>
#include <asm/bootinfo.h>
#include <asm/machdep.h>
#include <asm/blinken.h>
#include <asm/io.h>
#include <asm/hp300hw.h>
#include <asm/rtc.h>
#include "time.h"

Go to the source code of this file.

Macros

#define RTCBASE   0xf0420000
 
#define RTC_DATA   0x1
 
#define RTC_CMD   0x3
 
#define RTC_BUSY   0x02
 
#define RTC_DATA_RDY   0x01
 
#define rtc_busy()   (in_8(RTCBASE + RTC_CMD) & RTC_BUSY)
 
#define rtc_data_available()   (in_8(RTCBASE + RTC_CMD) & RTC_DATA_RDY)
 
#define rtc_status()   (in_8(RTCBASE + RTC_CMD))
 
#define rtc_command(x)   out_8(RTCBASE + RTC_CMD, (x))
 
#define rtc_read_data()   (in_8(RTCBASE + RTC_DATA))
 
#define rtc_write_data(x)   out_8(RTCBASE + RTC_DATA, (x))
 
#define RTC_SETREG   0xe0
 
#define RTC_WRITEREG   0xc2
 
#define RTC_READREG   0xc3
 
#define RTC_REG_SEC2   0
 
#define RTC_REG_SEC1   1
 
#define RTC_REG_MIN2   2
 
#define RTC_REG_MIN1   3
 
#define RTC_REG_HOUR2   4
 
#define RTC_REG_HOUR1   5
 
#define RTC_REG_WDAY   6
 
#define RTC_REG_DAY2   7
 
#define RTC_REG_DAY1   8
 
#define RTC_REG_MON2   9
 
#define RTC_REG_MON1   10
 
#define RTC_REG_YEAR2   11
 
#define RTC_REG_YEAR1   12
 
#define RTC_HOUR1_24HMODE   0x8
 
#define RTC_STAT_MASK   0xf0
 
#define RTC_STAT_RDY   0x40
 

Functions

 EXPORT_SYMBOL (hp300_ledstate)
 
void hp300_reset (void)
 
int __init hp300_parse_bootinfo (const struct bi_record *record)
 
void __init config_hp300 (void)
 

Variables

unsigned long hp300_model
 
unsigned long hp300_uart_scode = -1
 
unsigned char hp300_ledstate
 

Macro Definition Documentation

#define RTC_BUSY   0x02

Definition at line 114 of file config.c.

#define rtc_busy ( )    (in_8(RTCBASE + RTC_CMD) & RTC_BUSY)

Definition at line 117 of file config.c.

#define RTC_CMD   0x3

Definition at line 112 of file config.c.

#define rtc_command (   x)    out_8(RTCBASE + RTC_CMD, (x))

Definition at line 120 of file config.c.

#define RTC_DATA   0x1

Definition at line 111 of file config.c.

#define rtc_data_available ( )    (in_8(RTCBASE + RTC_CMD) & RTC_DATA_RDY)

Definition at line 118 of file config.c.

#define RTC_DATA_RDY   0x01

Definition at line 115 of file config.c.

#define RTC_HOUR1_24HMODE   0x8

Definition at line 142 of file config.c.

#define rtc_read_data ( )    (in_8(RTCBASE + RTC_DATA))

Definition at line 121 of file config.c.

#define RTC_READREG   0xc3

Definition at line 126 of file config.c.

#define RTC_REG_DAY1   8

Definition at line 136 of file config.c.

#define RTC_REG_DAY2   7

Definition at line 135 of file config.c.

#define RTC_REG_HOUR1   5

Definition at line 133 of file config.c.

#define RTC_REG_HOUR2   4

Definition at line 132 of file config.c.

#define RTC_REG_MIN1   3

Definition at line 131 of file config.c.

#define RTC_REG_MIN2   2

Definition at line 130 of file config.c.

#define RTC_REG_MON1   10

Definition at line 138 of file config.c.

#define RTC_REG_MON2   9

Definition at line 137 of file config.c.

#define RTC_REG_SEC1   1

Definition at line 129 of file config.c.

#define RTC_REG_SEC2   0

Definition at line 128 of file config.c.

#define RTC_REG_WDAY   6

Definition at line 134 of file config.c.

#define RTC_REG_YEAR1   12

Definition at line 140 of file config.c.

#define RTC_REG_YEAR2   11

Definition at line 139 of file config.c.

#define RTC_SETREG   0xe0

Definition at line 124 of file config.c.

#define RTC_STAT_MASK   0xf0

Definition at line 144 of file config.c.

#define RTC_STAT_RDY   0x40

Definition at line 145 of file config.c.

#define rtc_status ( )    (in_8(RTCBASE + RTC_CMD))

Definition at line 119 of file config.c.

#define rtc_write_data (   x)    out_8(RTCBASE + RTC_DATA, (x))

Definition at line 122 of file config.c.

#define RTC_WRITEREG   0xc2

Definition at line 125 of file config.c.

#define RTCBASE   0xf0420000

Definition at line 110 of file config.c.

Function Documentation

void __init config_hp300 ( void  )

Definition at line 249 of file config.c.

EXPORT_SYMBOL ( hp300_ledstate  )
int __init hp300_parse_bootinfo ( const struct bi_record record)

Definition at line 70 of file config.c.

void hp300_reset ( void  )

Variable Documentation

unsigned char hp300_ledstate

Definition at line 27 of file config.c.

unsigned long hp300_model

Definition at line 25 of file config.c.

unsigned long hp300_uart_scode = -1

Definition at line 26 of file config.c.