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
ccf944bd
Commit
ccf944bd
authored
Sep 11, 2002
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc low level ide driver updates
parent
8afb2f5f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
551 additions
and
464 deletions
+551
-464
drivers/ide/ppc/mpc8xx.c
drivers/ide/ppc/mpc8xx.c
+23
-23
drivers/ide/ppc/pmac.c
drivers/ide/ppc/pmac.c
+496
-437
drivers/ide/ppc/swarm.c
drivers/ide/ppc/swarm.c
+32
-4
No files found.
drivers/ide/ppc/mpc8xx.c
View file @
ccf944bd
...
...
@@ -44,13 +44,13 @@
#include <asm/irq.h>
#include "ide_modes.h"
static
int
identify
(
volatile
u
nsigned
char
*
p
);
static
void
print_fixed
(
volatile
u
nsigned
char
*
p
);
static
int
identify
(
volatile
u
8
*
p
);
static
void
print_fixed
(
volatile
u
8
*
p
);
static
void
print_funcid
(
int
func
);
static
int
check_ide_device
(
unsigned
long
base
);
static
void
ide_interrupt_ack
(
void
*
dev
);
static
void
m8xx_ide_tuneproc
(
ide_drive_t
*
drive
,
byte
pio
);
static
void
m8xx_ide_tuneproc
(
ide_drive_t
*
drive
,
u8
pio
);
typedef
struct
ide_ioport_desc
{
unsigned
long
base_off
;
/* Offset to PCMCIA memory */
...
...
@@ -433,7 +433,7 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
/* Calculate PIO timings */
static
void
m8xx_ide_tuneproc
(
ide_drive_t
*
drive
,
byte
pio
)
m8xx_ide_tuneproc
(
ide_drive_t
*
drive
,
u8
pio
)
{
ide_pio_data_t
d
;
#if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_IDE_8xx_DIRECT)
...
...
@@ -617,12 +617,12 @@ ide_interrupt_ack (void *dev)
static
int
check_ide_device
(
unsigned
long
base
)
{
volatile
u
nsigned
char
*
ident
=
NULL
;
volatile
u
nsigned
char
*
feature_p
[
MAX_FEATURES
];
volatile
u
nsigned
char
*
p
,
*
start
;
volatile
u
8
*
ident
=
NULL
;
volatile
u
8
*
feature_p
[
MAX_FEATURES
];
volatile
u
8
*
p
,
*
start
;
int
n_features
=
0
;
u
nsigned
char
func_id
=
~
0
;
u
nsigned
char
code
,
len
;
u
8
func_id
=
~
0
;
u
8
code
,
len
;
unsigned
short
config_base
=
0
;
int
found
=
0
;
int
i
;
...
...
@@ -630,7 +630,7 @@ static int check_ide_device (unsigned long base)
#ifdef DEBUG
printk
(
"PCMCIA MEM: %08lX
\n
"
,
base
);
#endif
start
=
p
=
(
volatile
u
nsigned
char
*
)
base
;
start
=
p
=
(
volatile
u
8
*
)
base
;
while
((
p
-
start
)
<
MAX_TUPEL_SZ
)
{
...
...
@@ -642,7 +642,7 @@ static int check_ide_device (unsigned long base)
len
=
*
p
;
p
+=
2
;
#ifdef DEBUG_PCMCIA
{
volatile
u
nsigned
char
*
q
=
p
;
{
volatile
u
8
*
q
=
p
;
printk
(
"
\n
Tuple code %02x length %d
\n\t
Data:"
,
code
,
len
);
...
...
@@ -673,7 +673,7 @@ static int check_ide_device (unsigned long base)
found
=
identify
(
ident
);
if
(
func_id
!=
((
u
nsigned
char
)
~
0
))
{
if
(
func_id
!=
((
u
8
)
~
0
))
{
print_funcid
(
func_id
);
if
(
func_id
==
CISTPL_FUNCID_FIXED
)
...
...
@@ -692,7 +692,7 @@ static int check_ide_device (unsigned long base)
}
/* set level mode irq and I/O mapped device in config reg*/
*
((
u
nsigned
char
*
)(
base
+
config_base
))
=
0x41
;
*
((
u
8
*
)(
base
+
config_base
))
=
0x41
;
return
(
0
);
}
...
...
@@ -738,14 +738,14 @@ static void print_funcid (int func)
/* ------------------------------------------------------------------------- */
static
void
print_fixed
(
volatile
u
nsigned
char
*
p
)
static
void
print_fixed
(
volatile
u
8
*
p
)
{
if
(
p
==
NULL
)
return
;
switch
(
*
p
)
{
case
CISTPL_FUNCE_IDE_IFACE
:
{
u
nsigned
char
iface
=
*
(
p
+
2
);
{
u
8
iface
=
*
(
p
+
2
);
printk
((
iface
==
CISTPL_IDE_INTERFACE
)
?
" IDE"
:
" unknown"
);
printk
(
" interface "
);
...
...
@@ -753,8 +753,8 @@ static void print_fixed (volatile unsigned char *p)
}
case
CISTPL_FUNCE_IDE_MASTER
:
case
CISTPL_FUNCE_IDE_SLAVE
:
{
u
nsigned
char
f1
=
*
(
p
+
2
);
u
nsigned
char
f2
=
*
(
p
+
4
);
{
u
8
f1
=
*
(
p
+
2
);
u
8
f2
=
*
(
p
+
4
);
printk
((
f1
&
CISTPL_IDE_SILICON
)
?
" [silicon]"
:
" [rotating]"
);
...
...
@@ -796,17 +796,17 @@ static void print_fixed (volatile unsigned char *p)
#define MAX_IDENT_CHARS 64
#define MAX_IDENT_FIELDS 4
static
u
nsigned
char
*
known_cards
[]
=
{
static
u
8
*
known_cards
[]
=
{
"ARGOSY PnPIDE D5"
,
NULL
};
static
int
identify
(
volatile
u
nsigned
char
*
p
)
static
int
identify
(
volatile
u
8
*
p
)
{
u
nsigned
char
id_str
[
MAX_IDENT_CHARS
];
u
nsigned
char
data
;
u
nsigned
char
*
t
;
u
nsigned
char
**
card
;
u
8
id_str
[
MAX_IDENT_CHARS
];
u
8
data
;
u
8
*
t
;
u
8
**
card
;
int
i
,
done
;
if
(
p
==
NULL
)
...
...
drivers/ide/ppc/pmac.c
View file @
ccf944bd
This diff is collapsed.
Click to expand it.
drivers/ide/ppc/swarm.c
View file @
ccf944bd
...
...
@@ -31,6 +31,9 @@
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/sibyte/sb1250_int.h>
#define __IDE_SWARM_C
#include <asm/sibyte/swarm_ide.h>
void
__init
swarm_ide_probe
(
void
)
...
...
@@ -62,12 +65,37 @@ void __init swarm_ide_probe(void)
hwif
->
hw
.
io_ports
[
IDE_STATUS_OFFSET
]
=
SWARM_IDE_REG
(
0x1f7
);
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
SWARM_IDE_REG
(
0x3f6
);
hwif
->
hw
.
io_ports
[
IDE_IRQ_OFFSET
]
=
SWARM_IDE_REG
(
0x3f7
);
// hwif->hw->ack_intr
= swarm_ide_ack_intr;
// hwif->hw->ack_intr = swarm_ide_ack_intr;
hwif
->
hw
.
irq
=
SWARM_IDE_INT
;
hwif
->
ideproc
=
swarm_ideproc
;
#if 0
hwif->iops = swarm_iops;
#else
hwif
->
OUTB
=
hwif
->
OUTBP
=
swarm_outb
;
hwif
->
OUTW
=
hwif
->
OUTWP
=
swarm_outw
;
hwif
->
OUTL
=
hwif
->
OUTLP
=
swarm_outl
;
hwif
->
OUTSW
=
hwif
->
OUTSWP
=
swarm_outsw
;
hwif
->
OUTSL
=
hwif
->
OUTSLP
=
swarm_outsl
;
hwif
->
INB
=
hwif
->
INBP
=
swarm_inb
;
hwif
->
INW
=
hwif
->
INWP
=
swarm_inw
;
hwif
->
INL
=
hwif
->
INLP
=
swarm_inl
;
hwif
->
INSW
=
hwif
->
INSWP
=
swarm_insw
;
hwif
->
INSL
=
hwif
->
INSLP
=
swarm_insl
;
#endif
#if 0
hwif->pioops = swarm_pio_ops;
#else
hwif
->
ata_input_data
=
swarm_ata_input_data
;
hwif
->
ata_output_data
=
swarm_ata_output_data
;
hwif
->
atapi_input_bytes
=
swarm_atapi_input_bytes
;
hwif
->
atapi_output_bytes
=
swarm_atapi_output_bytes
;
#endif
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
irq
=
hwif
->
hw
.
irq
;
hwif
->
irq
=
hwif
->
hw
.
irq
;
printk
(
"SWARM onboard IDE configured as device %i
\n
"
,
i
);
#ifndef HWIF_PROBE_CLASSIC_METHOD
probe_hwif_init
(
hwif
->
index
);
#endif
/* HWIF_PROBE_CLASSIC_METHOD */
}
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