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
Expand all
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
This diff is collapsed.
Click to expand it.
arch/arm/kernel/via82c505.c
View file @
e51b59f6
...
@@ -74,85 +74,7 @@ static struct pci_ops via82c505_ops = {
...
@@ -74,85 +74,7 @@ static struct pci_ops via82c505_ops = {
via82c505_write_config_dword
,
via82c505_write_config_dword
,
};
};
#ifdef CONFIG_ARCH_SHARK
void
__init
via82c505_preinit
(
void
*
sysdata
)
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
)
{
{
struct
pci_bus
*
bus
;
struct
pci_bus
*
bus
;
...
@@ -166,13 +88,17 @@ void __init via82c505_init(void *sysdata)
...
@@ -166,13 +88,17 @@ void __init via82c505_init(void *sysdata)
outb
(
0x93
,
0xA8
);
outb
(
0x93
,
0xA8
);
outb
(
0xd0
,
0xA9
);
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
return
NULL
;
/*
* Initialize a fake pci-bus number 1 for the CyberPro
* on the vlbus
*/
bus
=
pci_scan_bus
(
1
,
&
dummy_ops
,
sysdata
);
#endif
}
}
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)
...
@@ -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
->
bus
->
number
==
0
)
if
(
dev
->
devfn
==
0
)
return
255
;
if
(
dev
->
devfn
==
0
)
return
255
;
else
return
11
;
else
return
11
;
else
return
6
;
else
return
255
;
}
}
struct
hw_pci
shark_pci
__initdata
=
{
struct
hw_pci
shark_pci
__initdata
=
{
init:
via82c505_init
,
setup:
via82c505_setup
,
swizzle:
no_swizzle
,
swizzle:
pci_std_swizzle
,
map_irq:
shark_map_irq
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 @@
...
@@ -38,7 +38,8 @@
/* defines for the Framebuffer */
/* defines for the Framebuffer */
#define FB_START 0x06000000
#define FB_START 0x06000000
#define FB_SIZE 0x01000000
#define UNCACHEABLE_ADDR 0xdf010000
#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];
...
@@ -29,7 +29,6 @@ extern unsigned char pckbd_sysrq_xlate[128];
static
inline
void
kbd_init_hw
(
void
)
static
inline
void
kbd_init_hw
(
void
)
{
{
if
(
have_isa_bridge
)
{
k_setkeycode
=
pckbd_setkeycode
;
k_setkeycode
=
pckbd_setkeycode
;
k_getkeycode
=
pckbd_getkeycode
;
k_getkeycode
=
pckbd_getkeycode
;
k_translate
=
pckbd_translate
;
k_translate
=
pckbd_translate
;
...
@@ -40,7 +39,6 @@ static inline void kbd_init_hw(void)
...
@@ -40,7 +39,6 @@ static inline void kbd_init_hw(void)
k_sysrq_xlate
=
pckbd_sysrq_xlate
;
k_sysrq_xlate
=
pckbd_sysrq_xlate
;
#endif
#endif
pckbd_init_hw
();
pckbd_init_hw
();
}
}
}
/*
/*
...
...
include/asm-arm/arch-shark/param.h
View file @
e51b59f6
...
@@ -4,9 +4,5 @@
...
@@ -4,9 +4,5 @@
* by Alexander Schulz
* by Alexander Schulz
*/
*/
/* This must be a power of 2 because the RTC
#define HZ 100
* can't use anything else.
*/
#define HZ 64
#define hz_to_std(a) ((a * HZ)/100)
include/asm-arm/arch-shark/time.h
View file @
e51b59f6
...
@@ -3,44 +3,21 @@
...
@@ -3,44 +3,21 @@
*
*
* by Alexander Schulz
* by Alexander Schulz
*
*
* Uses the real time clock because you can't run
* derived from include/asm-arm/arch-ebsa110/time.h
* 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
* Copyright (c) 1996,1997,1998 Russell King.
* Copyright (c) 1996,1997,1998 Russell King.
*/
*/
#include <asm/leds.h>
#include <asm/leds.h>
#include <linux/mc146818rtc.h>
#include <asm/param.h>
#define IRQ_TIMER 8
extern
void
get_rtc_time
(
struct
rtc_time
*
rtc_tm
);
#define IRQ_TIMER 0
extern
void
set_rtc_irq_bit
(
unsigned
char
bit
);
#define HZ_TIME ((1193180 + HZ/2) / HZ)
extern
unsigned
long
epoch
;
static
void
timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
CMOS_READ
(
RTC_INTR_FLAGS
);
do_leds
();
do_leds
();
do_timer
(
regs
);
{
do_profile
(
regs
);
#ifdef DIVISOR
static
unsigned
int
divisor
;
if
(
divisor
--
==
0
)
{
divisor
=
DIVISOR
-
1
;
#else
{
#endif
do_timer
(
regs
);
}
}
}
}
/*
/*
...
@@ -48,38 +25,15 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -48,38 +25,15 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*/
*/
void
__init
time_init
(
void
)
void
__init
time_init
(
void
)
{
{
struct
rtc_time
r_time
;
unsigned
long
flags
;
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
);
outb
(
0x34
,
0x43
);
/* binary, mode 0, LSB/MSB, Ch 0 */
cli
();
outb
(
HZ_TIME
&
0xff
,
0x40
);
/* LSB of count */
val
=
CMOS_READ
(
RTC_FREQ_SELECT
)
&
0xf0
;
outb
(
HZ_TIME
>>
8
,
0x40
);
val
|=
(
16
-
tmp
);
CMOS_WRITE
(
val
,
RTC_FREQ_SELECT
);
restore_flags
(
flags
);
set_rtc_irq_bit
(
RTC_PIE
);
get_rtc_time
(
&
r_time
);
xtime
.
tv_sec
=
0
;
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
);
timer_irq
.
handler
=
timer_interrupt
;
timer_irq
.
handler
=
timer_interrupt
;
timer_irq
.
flags
=
SA_INTERRUPT
;
/* FIXME: really? */
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