Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e51b59f6
Commit
e51b59f6
authored
Feb 25, 2002
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Shark machine type.
parent
4ce465d6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
176 deletions
+97
-176
arch/arm/def-configs/shark
arch/arm/def-configs/shark
+63
-20
arch/arm/kernel/via82c505.c
arch/arm/kernel/via82c505.c
+13
-87
arch/arm/mach-shark/pci.c
arch/arm/mach-shark/pci.c
+7
-4
include/asm-arm/arch-shark/hardware.h
include/asm-arm/arch-shark/hardware.h
+2
-1
include/asm-arm/arch-shark/keyboard.h
include/asm-arm/arch-shark/keyboard.h
+0
-2
include/asm-arm/arch-shark/param.h
include/asm-arm/arch-shark/param.h
+1
-5
include/asm-arm/arch-shark/time.h
include/asm-arm/arch-shark/time.h
+11
-57
No files found.
arch/arm/def-configs/shark
View file @
e51b59f6
...
...
@@ -9,6 +9,7 @@ CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
# CONFIG_GENERIC_BUST_SPINLOCK is not set
# CONFIG_GENERIC_ISA_DMA is not set
#
# Code maturity level options
...
...
@@ -26,14 +27,17 @@ CONFIG_KMOD=y
#
# System Type
#
# CONFIG_ARCH_ADIFCC is not set
# CONFIG_ARCH_ANAKIN is not set
# CONFIG_ARCH_ARCA5K is not set
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP310 is not set
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
...
...
@@ -66,12 +70,16 @@ CONFIG_ARCH_SHARK=y
# CONFIG_SA1100_ADSBITSY is not set
# CONFIG_SA1100_BRUTUS is not set
# CONFIG_SA1100_CERF is not set
# CONFIG_SA1100_H3100 is not set
# CONFIG_SA1100_H3600 is not set
# CONFIG_SA1100_H3800 is not set
# CONFIG_SA1100_H3XXX is not set
# CONFIG_SA1100_EXTENEX1 is not set
# CONFIG_SA1100_FLEXANET is not set
# CONFIG_SA1100_FREEBIRD is not set
# CONFIG_SA1100_GRAPHICSCLIENT is not set
# CONFIG_SA1100_GRAPHICSMASTER is not set
# CONFIG_SA1100_BADGE4 is not set
# CONFIG_SA1100_JORNADA720 is not set
# CONFIG_SA1100_HUW_WEBPANEL is not set
# CONFIG_SA1100_ITSY is not set
...
...
@@ -80,20 +88,28 @@ CONFIG_ARCH_SHARK=y
# CONFIG_SA1100_OMNIMETER is not set
# CONFIG_SA1100_PANGOLIN is not set
# CONFIG_SA1100_PLEB is not set
# CONFIG_SA1100_PT_SYSTEM3 is not set
# CONFIG_SA1100_SHANNON is not set
# CONFIG_SA1100_SHERMAN is not set
# CONFIG_SA1100_SIMPAD is not set
# CONFIG_SA1100_PFS168 is not set
# CONFIG_SA1100_VICTOR is not set
# CONFIG_SA1100_XP860 is not set
# CONFIG_SA1100_YOPY is not set
# CONFIG_SA1100_USB is not set
# CONFIG_SA1100_USB_NETLINK is not set
# CONFIG_SA1100_USB_CHAR is not set
# CONFIG_H3600_SLEEVE is not set
#
# CLPS711X/EP721X Implementations
#
# CONFIG_ARCH_AUTCPU12 is not set
# CONFIG_ARCH_CDB89712 is not set
# CONFIG_ARCH_CLEP7312 is not set
# CONFIG_ARCH_EDB7211 is not set
# CONFIG_ARCH_P720T is not set
# CONFIG_ARCH_FORTUNET is not set
# CONFIG_ARCH_EP7211 is not set
# CONFIG_ARCH_EP7212 is not set
# CONFIG_ARCH_ACORN is not set
...
...
@@ -112,9 +128,12 @@ CONFIG_CPU_32v4=y
# CONFIG_CPU_ARM710 is not set
# CONFIG_CPU_ARM720T is not set
# CONFIG_CPU_ARM920T is not set
# CONFIG_CPU_ARM922T is not set
# CONFIG_CPU_ARM926T is not set
# CONFIG_CPU_ARM1020 is not set
CONFIG_CPU_SA110=y
# CONFIG_CPU_SA1100 is not set
# CONFIG_XSCALE_PMU is not set
# CONFIG_ARM_THUMB is not set
# CONFIG_DISCONTIGMEM is not set
...
...
@@ -122,8 +141,11 @@ CONFIG_CPU_SA110=y
# General setup
#
CONFIG_PCI=y
# CONFIG_PCI_HOST_PLX90X0 is not set
CONFIG_PCI_HOST_VIA82C505=y
CONFIG_ISA=y
CONFIG_ISA_DMA=y
# CONFIG_FIQ is not set
# CONFIG_PCI_NAMES is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
...
...
@@ -143,6 +165,7 @@ CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PM is not set
# CONFIG_APM is not set
# CONFIG_ARTHUR is not set
CONFIG_LEDS=y
CONFIG_LEDS_TIMER=y
...
...
@@ -172,7 +195,6 @@ CONFIG_PARPORT_PC_CML1=y
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set
#
# Block devices
...
...
@@ -182,6 +204,7 @@ CONFIG_PARPORT_PC_CML1=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_CISS_SCSI_TAPE is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
...
...
@@ -204,10 +227,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
#
# Networking options
#
# CONFIG_PACKET is not set
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
...
...
@@ -220,6 +244,7 @@ CONFIG_INET=y
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
#
#
...
...
@@ -260,6 +285,7 @@ CONFIG_NETDEVICES=y
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_ARM_AM79C961A is not set
# CONFIG_SUNLANCE is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNBMAC is not set
...
...
@@ -280,6 +306,7 @@ CONFIG_NET_PCI=y
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
CONFIG_CS89x0=y
# CONFIG_DE2104X is not set
# CONFIG_TULIP is not set
# CONFIG_DE4X5 is not set
# CONFIG_DGRS is not set
...
...
@@ -291,6 +318,7 @@ CONFIG_CS89x0=y
# CONFIG_NE2K_PCI is not set
# CONFIG_NE3210 is not set
# CONFIG_ES3210 is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
...
...
@@ -300,6 +328,7 @@ CONFIG_CS89x0=y
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_VIA_RHINE_MMIO is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_NET_POCKET is not set
...
...
@@ -416,7 +445,6 @@ CONFIG_CHR_DEV_SG=m
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_DEBUG_QUEUES is not set
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
...
...
@@ -453,6 +481,7 @@ CONFIG_CHR_DEV_SG=m
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_NCR53C8XX is not set
# CONFIG_SCSI_SYM53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
...
...
@@ -521,16 +550,20 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_21285 is not set
# CONFIG_SERIAL_21285_OLD is not set
# CONFIG_SERIAL_21285_CONSOLE is not set
# CONFIG_SERIAL_UART00 is not set
# CONFIG_SERIAL_UART00_CONSOLE is not set
# CONFIG_SERIAL_SA1100 is not set
# CONFIG_SERIAL_SA1100_CONSOLE is not set
# CONFIG_SERIAL_8250 is not set
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_ATOMWIDE_SERIAL is not set
# CONFIG_DUALSP_SERIAL is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_
HUB6
is not set
# CONFIG_SERIAL_8250_
RSA
is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
...
...
@@ -588,7 +621,6 @@ CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
#
# Ftape, the floppy tape device driver
...
...
@@ -596,7 +628,6 @@ CONFIG_RTC=y
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
#
# Multimedia devices
...
...
@@ -617,7 +648,6 @@ CONFIG_RTC=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_CMS_FS is not set
CONFIG_EXT3_FS=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
...
...
@@ -630,12 +660,12 @@ CONFIG_VFAT_FS=y
# CONFIG_JFFS2_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_TMPFS is not set
# CONFIG_RAMFS is not set
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_
FREE
VXFS_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
...
...
@@ -807,7 +837,7 @@ CONFIG_SOUND_OSS=m
# CONFIG_SOUND_DMAP is not set
# CONFIG_SOUND_AD1816 is not set
# CONFIG_SOUND_SGALAXY is not set
# CONFIG_SOUND_ADLIB is not set
CONFIG_SOUND_ADLIB=m
# CONFIG_SOUND_ACI_MIXER is not set
# CONFIG_SOUND_CS4232 is not set
# CONFIG_SOUND_SSCAPE is not set
...
...
@@ -850,8 +880,9 @@ CONFIG_SOUND_SB=m
# CONFIG_USB is not set
#
# USB
Controll
ers
# USB
Host Controller Driv
ers
#
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_UHCI is not set
# CONFIG_USB_UHCI_ALT is not set
# CONFIG_USB_OHCI is not set
...
...
@@ -867,10 +898,10 @@ CONFIG_SOUND_SB=m
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_HP8200e is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
...
...
@@ -898,12 +929,10 @@ CONFIG_SOUND_SB=m
#
# Video4Linux support is needed for USB Multimedia device support
#
# CONFIG_USB_DABUSB is not set
#
# USB Network adaptors
#
# CONFIG_USB_PLUSB is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_CATC is not set
...
...
@@ -926,27 +955,31 @@ CONFIG_SOUND_SB=m
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_VISOR is not set
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OMNINET is not set
#
#
Miscellaneous USB
drivers
#
USB Miscellaneous
drivers
#
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_
ID75
is not set
# CONFIG_USB_
AUERSWALD
is not set
#
# Bluetooth support
...
...
@@ -957,11 +990,21 @@ CONFIG_SOUND_SB=m
# Kernel hacking
#
CONFIG_NO_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_NO_PGT_CACHE is not set
CONFIG_DEBUG_LL=y
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_WAITQ is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_DEBUG_ERRORS is not set
# CONFIG_DEBUG_LL is not set
# CONFIG_DEBUG_DC21285_PORT is not set
# CONFIG_DEBUG_CLPS711X_UART2 is not set
#
# Library routines
#
CONFIG_CRC32=y
arch/arm/kernel/via82c505.c
View file @
e51b59f6
...
...
@@ -74,85 +74,7 @@ static struct pci_ops via82c505_ops = {
via82c505_write_config_dword
,
};
#ifdef CONFIG_ARCH_SHARK
static
char
size_wanted
;
static
int
dummy_read_config_byte
(
struct
pci_dev
*
dev
,
int
where
,
u8
*
value
)
{
*
value
=
0
;
return
PCIBIOS_SUCCESSFUL
;
}
static
int
dummy_read_config_word
(
struct
pci_dev
*
dev
,
int
where
,
u16
*
value
)
{
*
value
=
0
;
return
PCIBIOS_SUCCESSFUL
;
}
static
int
dummy_read_config_dword
(
struct
pci_dev
*
dev
,
int
where
,
u32
*
value
)
{
if
(
dev
->
devfn
!=
0
)
*
value
=
0
;
else
switch
(
where
)
{
case
PCI_VENDOR_ID
:
*
value
=
PCI_VENDOR_ID_INTERG
|
PCI_DEVICE_ID_INTERG_2010
<<
16
;
break
;
case
PCI_CLASS_REVISION
:
*
value
=
PCI_CLASS_DISPLAY_VGA
<<
16
;
break
;
case
PCI_BASE_ADDRESS_0
:
if
(
size_wanted
)
{
/* 0x00900000 bytes long (0xff700000) */
*
value
=
0xff000000
;
size_wanted
=
0
;
}
else
{
*
value
=
FB_START
;
}
break
;
case
PCI_INTERRUPT_LINE
:
*
value
=
6
;
break
;
default:
*
value
=
0
;
}
return
PCIBIOS_SUCCESSFUL
;
}
static
int
dummy_write_config_byte
(
struct
pci_dev
*
dev
,
int
where
,
u8
value
)
{
return
PCIBIOS_SUCCESSFUL
;
}
static
int
dummy_write_config_word
(
struct
pci_dev
*
dev
,
int
where
,
u16
value
)
{
return
PCIBIOS_SUCCESSFUL
;
}
static
int
dummy_write_config_dword
(
struct
pci_dev
*
dev
,
int
where
,
u32
value
)
{
if
((
dev
->
devfn
==
0
)
&&
(
where
==
PCI_BASE_ADDRESS_0
)
&&
(
value
==
0xffffffff
))
size_wanted
=
1
;
return
PCIBIOS_SUCCESSFUL
;
}
static
struct
pci_ops
dummy_ops
=
{
dummy_read_config_byte
,
dummy_read_config_word
,
dummy_read_config_dword
,
dummy_write_config_byte
,
dummy_write_config_word
,
dummy_write_config_dword
,
};
#endif
void
__init
via82c505_init
(
void
*
sysdata
)
void
__init
via82c505_preinit
(
void
*
sysdata
)
{
struct
pci_bus
*
bus
;
...
...
@@ -166,13 +88,17 @@ void __init via82c505_init(void *sysdata)
outb
(
0x93
,
0xA8
);
outb
(
0xd0
,
0xA9
);
pci_scan_bus
(
0
,
&
via82c505_ops
,
sysdata
);
}
int
__init
via82c505_setup
(
int
nr
,
struct
pci_sys_data
*
sys
)
{
return
(
nr
==
0
);
}
struct
pci_bus
*
__init
via82c505_scan_bus
(
int
nr
,
struct
pci_sys_data
*
sysdata
)
{
if
(
nr
==
0
)
return
pci_scan_bus
(
0
,
&
via82c505_ops
,
sysdata
);
#ifdef CONFIG_ARCH_SHARK
/*
* Initialize a fake pci-bus number 1 for the CyberPro
* on the vlbus
*/
bus
=
pci_scan_bus
(
1
,
&
dummy_ops
,
sysdata
);
#endif
return
NULL
;
}
arch/arm/mach-shark/pci.c
View file @
e51b59f6
...
...
@@ -17,11 +17,14 @@ static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
if
(
dev
->
bus
->
number
==
0
)
if
(
dev
->
devfn
==
0
)
return
255
;
else
return
11
;
else
return
6
;
else
return
255
;
}
struct
hw_pci
shark_pci
__initdata
=
{
init:
via82c505_init
,
swizzle:
no_swizzle
,
map_irq:
shark_map_irq
setup:
via82c505_setup
,
swizzle:
pci_std_swizzle
,
map_irq:
shark_map_irq
,
nr_controllers:
1
,
scan:
via82c505_scan_bus
,
preinit:
via82c505_preinit
};
include/asm-arm/arch-shark/hardware.h
View file @
e51b59f6
...
...
@@ -38,7 +38,8 @@
/* defines for the Framebuffer */
#define FB_START 0x06000000
#define FB_START 0x06000000
#define FB_SIZE 0x01000000
#define UNCACHEABLE_ADDR 0xdf010000
...
...
include/asm-arm/arch-shark/keyboard.h
View file @
e51b59f6
...
...
@@ -29,7 +29,6 @@ extern unsigned char pckbd_sysrq_xlate[128];
static
inline
void
kbd_init_hw
(
void
)
{
if
(
have_isa_bridge
)
{
k_setkeycode
=
pckbd_setkeycode
;
k_getkeycode
=
pckbd_getkeycode
;
k_translate
=
pckbd_translate
;
...
...
@@ -40,7 +39,6 @@ static inline void kbd_init_hw(void)
k_sysrq_xlate
=
pckbd_sysrq_xlate
;
#endif
pckbd_init_hw
();
}
}
/*
...
...
include/asm-arm/arch-shark/param.h
View file @
e51b59f6
...
...
@@ -4,9 +4,5 @@
* by Alexander Schulz
*/
/* This must be a power of 2 because the RTC
* can't use anything else.
*/
#define HZ 64
#define HZ 100
#define hz_to_std(a) ((a * HZ)/100)
include/asm-arm/arch-shark/time.h
View file @
e51b59f6
...
...
@@ -3,44 +3,21 @@
*
* by Alexander Schulz
*
* Uses the real time clock because you can't run
* the timer with level triggered interrupts and
* you can't run the shark with edge triggered
* inetrrupts (loses ints and hangs).
*
* derived from linux/drivers/char/rtc.c and:
* linux/include/asm-arm/arch-ebsa110/time.h
* derived from include/asm-arm/arch-ebsa110/time.h
* Copyright (c) 1996,1997,1998 Russell King.
*/
#include <asm/leds.h>
#include <linux/mc146818rtc.h>
#define IRQ_TIMER 8
#include <asm/param.h>
extern
void
get_rtc_time
(
struct
rtc_time
*
rtc_tm
);
extern
void
set_rtc_irq_bit
(
unsigned
char
bit
);
extern
unsigned
long
epoch
;
#define IRQ_TIMER 0
#define HZ_TIME ((1193180 + HZ/2) / HZ)
static
void
timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
CMOS_READ
(
RTC_INTR_FLAGS
);
do_leds
();
{
#ifdef DIVISOR
static
unsigned
int
divisor
;
if
(
divisor
--
==
0
)
{
divisor
=
DIVISOR
-
1
;
#else
{
#endif
do_timer
(
regs
);
}
}
do_timer
(
regs
);
do_profile
(
regs
);
}
/*
...
...
@@ -48,38 +25,15 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*/
void
__init
time_init
(
void
)
{
struct
rtc_time
r_time
;
unsigned
long
flags
;
int
tmp
=
0
;
unsigned
char
val
;
/*
* Set the clock to 128 Hz, we already have a valid
* vector now:
*/
while
(
HZ
>
(
1
<<
tmp
))
tmp
++
;
/*
* Check that the input was really a power of 2.
*/
if
(
HZ
!=
(
1
<<
tmp
))
panic
(
"Please set HZ to a power of 2!"
);
save_flags
(
flags
);
cli
();
val
=
CMOS_READ
(
RTC_FREQ_SELECT
)
&
0xf0
;
val
|=
(
16
-
tmp
);
CMOS_WRITE
(
val
,
RTC_FREQ_SELECT
);
restore_flags
(
flags
);
set_rtc_irq_bit
(
RTC_PIE
);
outb
(
0x34
,
0x43
);
/* binary, mode 0, LSB/MSB, Ch 0 */
outb
(
HZ_TIME
&
0xff
,
0x40
);
/* LSB of count */
outb
(
HZ_TIME
>>
8
,
0x40
);
get_rtc_time
(
&
r_time
);
xtime
.
tv_sec
=
mktime
(
r_time
.
tm_year
+
epoch
,
r_time
.
tm_mon
+
1
,
r_time
.
tm_mday
,
r_time
.
tm_hour
,
r_time
.
tm_min
,
r_time
.
tm_sec
);
xtime
.
tv_sec
=
0
;
timer_irq
.
handler
=
timer_interrupt
;
timer_irq
.
flags
=
SA_INTERRUPT
;
/* FIXME: really? */
setup_
arm_
irq
(
IRQ_TIMER
,
&
timer_irq
);
setup_irq
(
IRQ_TIMER
,
&
timer_irq
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment