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
Kirill Smelkov
linux
Commits
31814f4e
Commit
31814f4e
authored
Nov 25, 2002
by
Alan Cox
Committed by
Linus Torvalds
Nov 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] clean up siiimage ide for new ifdef style
parent
4fcc74e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+1
-7
drivers/ide/pci/siimage.h
drivers/ide/pci/siimage.h
+6
-6
No files found.
drivers/ide/pci/siimage.c
View file @
31814f4e
...
@@ -205,7 +205,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
...
@@ -205,7 +205,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
siimage_tuneproc
(
drive
,
(
speed
-
XFER_PIO_0
));
siimage_tuneproc
(
drive
,
(
speed
-
XFER_PIO_0
));
mode
|=
((
unit
)
?
0x10
:
0x01
);
mode
|=
((
unit
)
?
0x10
:
0x01
);
break
;
break
;
#ifdef CONFIG_BLK_DEV_IDEDMA
case
XFER_MW_DMA_2
:
case
XFER_MW_DMA_2
:
case
XFER_MW_DMA_1
:
case
XFER_MW_DMA_1
:
case
XFER_MW_DMA_0
:
case
XFER_MW_DMA_0
:
...
@@ -226,7 +225,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
...
@@ -226,7 +225,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
mode
|=
((
unit
)
?
0x30
:
0x03
);
mode
|=
((
unit
)
?
0x30
:
0x03
);
config_siimage_chipset_for_pio
(
drive
,
0
);
config_siimage_chipset_for_pio
(
drive
,
0
);
break
;
break
;
#endif
/* CONFIG_BLK_DEV_IDEDMA */
default:
default:
return
1
;
return
1
;
}
}
...
@@ -246,7 +244,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
...
@@ -246,7 +244,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
return
(
ide_config_drive_speed
(
drive
,
speed
));
return
(
ide_config_drive_speed
(
drive
,
speed
));
}
}
#ifdef CONFIG_BLK_DEV_IDEDMA
static
int
config_chipset_for_dma
(
ide_drive_t
*
drive
)
static
int
config_chipset_for_dma
(
ide_drive_t
*
drive
)
{
{
u8
speed
=
ide_dma_speed
(
drive
,
siimage_ratemask
(
drive
));
u8
speed
=
ide_dma_speed
(
drive
,
siimage_ratemask
(
drive
));
...
@@ -256,7 +253,7 @@ static int config_chipset_for_dma (ide_drive_t *drive)
...
@@ -256,7 +253,7 @@ static int config_chipset_for_dma (ide_drive_t *drive)
if
((
!
(
speed
)))
if
((
!
(
speed
)))
return
0
;
return
0
;
if
(
HWIF
(
drive
)
->
speedproc
(
drive
,
speed
))
if
(
ide_set_xfer_rate
(
drive
,
speed
))
return
0
;
return
0
;
if
(
!
drive
->
init_speed
)
if
(
!
drive
->
init_speed
)
...
@@ -392,7 +389,6 @@ static int siimage_mmio_ide_dma_verbose (ide_drive_t *drive)
...
@@ -392,7 +389,6 @@ static int siimage_mmio_ide_dma_verbose (ide_drive_t *drive)
#endif
#endif
return
temp
;
return
temp
;
}
}
#endif
/* CONFIG_BLK_DEV_IDEDMA */
static
int
siimage_busproc
(
ide_drive_t
*
drive
,
int
state
)
static
int
siimage_busproc
(
ide_drive_t
*
drive
,
int
state
)
{
{
...
@@ -811,7 +807,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
...
@@ -811,7 +807,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
if
(
hwif
->
pci_dev
->
device
!=
PCI_DEVICE_ID_SII_3112
)
if
(
hwif
->
pci_dev
->
device
!=
PCI_DEVICE_ID_SII_3112
)
hwif
->
atapi_dma
=
1
;
hwif
->
atapi_dma
=
1
;
#ifdef CONFIG_BLK_DEV_IDEDMA
hwif
->
ide_dma_check
=
&
siimage_config_drive_for_dma
;
hwif
->
ide_dma_check
=
&
siimage_config_drive_for_dma
;
if
(
!
(
hwif
->
udma_four
))
if
(
!
(
hwif
->
udma_four
))
hwif
->
udma_four
=
ata66_siimage
(
hwif
);
hwif
->
udma_four
=
ata66_siimage
(
hwif
);
...
@@ -827,7 +822,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
...
@@ -827,7 +822,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
hwif
->
autodma
=
1
;
hwif
->
autodma
=
1
;
hwif
->
drives
[
0
].
autodma
=
hwif
->
autodma
;
hwif
->
drives
[
0
].
autodma
=
hwif
->
autodma
;
hwif
->
drives
[
1
].
autodma
=
hwif
->
autodma
;
hwif
->
drives
[
1
].
autodma
=
hwif
->
autodma
;
#endif
/* CONFIG_BLK_DEV_IDEDMA */
}
}
static
void
__init
init_dma_siimage
(
ide_hwif_t
*
hwif
,
unsigned
long
dmabase
)
static
void
__init
init_dma_siimage
(
ide_hwif_t
*
hwif
,
unsigned
long
dmabase
)
...
...
drivers/ide/pci/siimage.h
View file @
31814f4e
...
@@ -62,14 +62,14 @@ inline void sii_insl (u32 port, void *addr, u32 count)
...
@@ -62,14 +62,14 @@ inline void sii_insl (u32 port, void *addr, u32 count)
// while (count--) { *(u32 *)addr = readl(port); addr += 4; }
// while (count--) { *(u32 *)addr = readl(port); addr += 4; }
}
}
inline
void
sii_outb
(
u8
addr
,
u32
port
)
inline
void
sii_outb
(
u8
value
,
u32
port
)
{
{
writeb
(
addr
,
port
);
writeb
(
value
,
port
);
}
}
inline
void
sii_outw
(
u16
addr
,
u32
port
)
inline
void
sii_outw
(
u16
value
,
u32
port
)
{
{
writew
(
addr
,
port
);
writew
(
value
,
port
);
}
}
inline
void
sii_outsw
(
u32
port
,
void
*
addr
,
u32
count
)
inline
void
sii_outsw
(
u32
port
,
void
*
addr
,
u32
count
)
...
@@ -77,9 +77,9 @@ inline void sii_outsw (u32 port, void *addr, u32 count)
...
@@ -77,9 +77,9 @@ inline void sii_outsw (u32 port, void *addr, u32 count)
while
(
count
--
)
{
writew
(
*
(
u16
*
)
addr
,
port
);
addr
+=
2
;
}
while
(
count
--
)
{
writew
(
*
(
u16
*
)
addr
,
port
);
addr
+=
2
;
}
}
}
inline
void
sii_outl
(
u32
addr
,
u32
port
)
inline
void
sii_outl
(
u32
value
,
u32
port
)
{
{
writel
(
addr
,
port
);
writel
(
value
,
port
);
}
}
inline
void
sii_outsl
(
u32
port
,
void
*
addr
,
u32
count
)
inline
void
sii_outsl
(
u32
port
,
void
*
addr
,
u32
count
)
...
...
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