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
6d7b34ad
Commit
6d7b34ad
authored
Sep 10, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ide: initial PCI memory access annotations
parent
39861038
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
41 deletions
+39
-41
drivers/ide/ide-iops.c
drivers/ide/ide-iops.c
+11
-11
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+24
-26
include/asm-generic/ide_iops.h
include/asm-generic/ide_iops.h
+4
-4
No files found.
drivers/ide/ide-iops.c
View file @
6d7b34ad
...
@@ -112,57 +112,57 @@ EXPORT_SYMBOL(default_hwif_iops);
...
@@ -112,57 +112,57 @@ EXPORT_SYMBOL(default_hwif_iops);
static
u8
ide_mm_inb
(
unsigned
long
port
)
static
u8
ide_mm_inb
(
unsigned
long
port
)
{
{
return
(
u8
)
readb
(
port
);
return
(
u8
)
readb
(
(
void
__iomem
*
)
port
);
}
}
static
u16
ide_mm_inw
(
unsigned
long
port
)
static
u16
ide_mm_inw
(
unsigned
long
port
)
{
{
return
(
u16
)
readw
(
port
);
return
(
u16
)
readw
(
(
void
__iomem
*
)
port
);
}
}
static
void
ide_mm_insw
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
void
ide_mm_insw
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
{
{
__ide_mm_insw
(
port
,
addr
,
count
);
__ide_mm_insw
(
(
void
__iomem
*
)
port
,
addr
,
count
);
}
}
static
u32
ide_mm_inl
(
unsigned
long
port
)
static
u32
ide_mm_inl
(
unsigned
long
port
)
{
{
return
(
u32
)
readl
(
port
);
return
(
u32
)
readl
(
(
void
__iomem
*
)
port
);
}
}
static
void
ide_mm_insl
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
void
ide_mm_insl
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
{
{
__ide_mm_insl
(
port
,
addr
,
count
);
__ide_mm_insl
(
(
void
__iomem
*
)
port
,
addr
,
count
);
}
}
static
void
ide_mm_outb
(
u8
value
,
unsigned
long
port
)
static
void
ide_mm_outb
(
u8
value
,
unsigned
long
port
)
{
{
writeb
(
value
,
port
);
writeb
(
value
,
(
void
__iomem
*
)
port
);
}
}
static
void
ide_mm_outbsync
(
ide_drive_t
*
drive
,
u8
value
,
unsigned
long
port
)
static
void
ide_mm_outbsync
(
ide_drive_t
*
drive
,
u8
value
,
unsigned
long
port
)
{
{
writeb
(
value
,
port
);
writeb
(
value
,
(
void
__iomem
*
)
port
);
}
}
static
void
ide_mm_outw
(
u16
value
,
unsigned
long
port
)
static
void
ide_mm_outw
(
u16
value
,
unsigned
long
port
)
{
{
writew
(
value
,
port
);
writew
(
value
,
(
void
__iomem
*
)
port
);
}
}
static
void
ide_mm_outsw
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
void
ide_mm_outsw
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
{
{
__ide_mm_outsw
(
port
,
addr
,
count
);
__ide_mm_outsw
(
(
void
__iomem
*
)
port
,
addr
,
count
);
}
}
static
void
ide_mm_outl
(
u32
value
,
unsigned
long
port
)
static
void
ide_mm_outl
(
u32
value
,
unsigned
long
port
)
{
{
writel
(
value
,
port
);
writel
(
value
,
(
void
__iomem
*
)
port
);
}
}
static
void
ide_mm_outsl
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
void
ide_mm_outsl
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
{
{
__ide_mm_outsl
(
port
,
addr
,
count
);
__ide_mm_outsl
(
(
void
__iomem
*
)
port
,
addr
,
count
);
}
}
void
default_hwif_mmiops
(
ide_hwif_t
*
hwif
)
void
default_hwif_mmiops
(
ide_hwif_t
*
hwif
)
...
...
drivers/ide/pci/siimage.c
View file @
6d7b34ad
...
@@ -727,8 +727,7 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
...
@@ -727,8 +727,7 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
unsigned
long
bar5
=
pci_resource_start
(
dev
,
5
);
unsigned
long
bar5
=
pci_resource_start
(
dev
,
5
);
unsigned
long
barsize
=
pci_resource_len
(
dev
,
5
);
unsigned
long
barsize
=
pci_resource_len
(
dev
,
5
);
u8
tmpbyte
=
0
;
u8
tmpbyte
=
0
;
unsigned
long
addr
;
void
__iomem
*
ioaddr
;
void
*
ioaddr
;
/*
/*
* Drop back to PIO if we can't map the mmio. Some
* Drop back to PIO if we can't map the mmio. Some
...
@@ -751,22 +750,21 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
...
@@ -751,22 +750,21 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
}
}
pci_set_master
(
dev
);
pci_set_master
(
dev
);
pci_set_drvdata
(
dev
,
ioaddr
);
pci_set_drvdata
(
dev
,
(
void
*
)
ioaddr
);
addr
=
(
unsigned
long
)
ioaddr
;
if
(
pdev_is_sata
(
dev
))
{
if
(
pdev_is_sata
(
dev
))
{
writel
(
0
,
addr
+
0x148
);
writel
(
0
,
io
addr
+
0x148
);
writel
(
0
,
addr
+
0x1C8
);
writel
(
0
,
io
addr
+
0x1C8
);
}
}
writeb
(
0
,
addr
+
0xB4
);
writeb
(
0
,
io
addr
+
0xB4
);
writeb
(
0
,
addr
+
0xF4
);
writeb
(
0
,
io
addr
+
0xF4
);
tmpbyte
=
readb
(
addr
+
0x4A
);
tmpbyte
=
readb
(
io
addr
+
0x4A
);
switch
(
tmpbyte
&
0x30
)
{
switch
(
tmpbyte
&
0x30
)
{
case
0x00
:
case
0x00
:
/* In 100 MHz clocking, try and switch to 133 */
/* In 100 MHz clocking, try and switch to 133 */
writeb
(
tmpbyte
|
0x10
,
addr
+
0x4A
);
writeb
(
tmpbyte
|
0x10
,
io
addr
+
0x4A
);
break
;
break
;
case
0x10
:
case
0x10
:
/* On 133Mhz clocking */
/* On 133Mhz clocking */
...
@@ -777,29 +775,29 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
...
@@ -777,29 +775,29 @@ static unsigned int setup_mmio_siimage (struct pci_dev *dev, const char *name)
case
0x30
:
case
0x30
:
/* Clocking is disabled */
/* Clocking is disabled */
/* 133 clock attempt to force it on */
/* 133 clock attempt to force it on */
writeb
(
tmpbyte
&
~
0x20
,
addr
+
0x4A
);
writeb
(
tmpbyte
&
~
0x20
,
io
addr
+
0x4A
);
break
;
break
;
}
}
writeb
(
0x72
,
addr
+
0xA1
);
writeb
(
0x72
,
io
addr
+
0xA1
);
writew
(
0x328A
,
addr
+
0xA2
);
writew
(
0x328A
,
io
addr
+
0xA2
);
writel
(
0x62DD62DD
,
addr
+
0xA4
);
writel
(
0x62DD62DD
,
io
addr
+
0xA4
);
writel
(
0x43924392
,
addr
+
0xA8
);
writel
(
0x43924392
,
io
addr
+
0xA8
);
writel
(
0x40094009
,
addr
+
0xAC
);
writel
(
0x40094009
,
io
addr
+
0xAC
);
writeb
(
0x72
,
addr
+
0xE1
);
writeb
(
0x72
,
io
addr
+
0xE1
);
writew
(
0x328A
,
addr
+
0xE2
);
writew
(
0x328A
,
io
addr
+
0xE2
);
writel
(
0x62DD62DD
,
addr
+
0xE4
);
writel
(
0x62DD62DD
,
io
addr
+
0xE4
);
writel
(
0x43924392
,
addr
+
0xE8
);
writel
(
0x43924392
,
io
addr
+
0xE8
);
writel
(
0x40094009
,
addr
+
0xEC
);
writel
(
0x40094009
,
io
addr
+
0xEC
);
if
(
pdev_is_sata
(
dev
))
{
if
(
pdev_is_sata
(
dev
))
{
writel
(
0xFFFF0000
,
addr
+
0x108
);
writel
(
0xFFFF0000
,
io
addr
+
0x108
);
writel
(
0xFFFF0000
,
addr
+
0x188
);
writel
(
0xFFFF0000
,
io
addr
+
0x188
);
writel
(
0x00680000
,
addr
+
0x148
);
writel
(
0x00680000
,
io
addr
+
0x148
);
writel
(
0x00680000
,
addr
+
0x1C8
);
writel
(
0x00680000
,
io
addr
+
0x1C8
);
}
}
tmpbyte
=
readb
(
addr
+
0x4A
);
tmpbyte
=
readb
(
io
addr
+
0x4A
);
proc_reports_siimage
(
dev
,
(
tmpbyte
>>
4
),
name
);
proc_reports_siimage
(
dev
,
(
tmpbyte
>>
4
),
name
);
return
1
;
return
1
;
...
...
include/asm-generic/ide_iops.h
View file @
6d7b34ad
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#define __ide_outsw outsw
#define __ide_outsw outsw
#define __ide_outsl outsl
#define __ide_outsl outsl
static
__inline__
void
__ide_mm_insw
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
__inline__
void
__ide_mm_insw
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
{
while
(
count
--
)
{
while
(
count
--
)
{
*
(
u16
*
)
addr
=
readw
(
port
);
*
(
u16
*
)
addr
=
readw
(
port
);
...
@@ -13,7 +13,7 @@ static __inline__ void __ide_mm_insw(unsigned long port, void *addr, u32 count)
...
@@ -13,7 +13,7 @@ static __inline__ void __ide_mm_insw(unsigned long port, void *addr, u32 count)
}
}
}
}
static
__inline__
void
__ide_mm_insl
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
__inline__
void
__ide_mm_insl
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
{
while
(
count
--
)
{
while
(
count
--
)
{
*
(
u32
*
)
addr
=
readl
(
port
);
*
(
u32
*
)
addr
=
readl
(
port
);
...
@@ -21,7 +21,7 @@ static __inline__ void __ide_mm_insl(unsigned long port, void *addr, u32 count)
...
@@ -21,7 +21,7 @@ static __inline__ void __ide_mm_insl(unsigned long port, void *addr, u32 count)
}
}
}
}
static
__inline__
void
__ide_mm_outsw
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
__inline__
void
__ide_mm_outsw
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
{
while
(
count
--
)
{
while
(
count
--
)
{
writew
(
*
(
u16
*
)
addr
,
port
);
writew
(
*
(
u16
*
)
addr
,
port
);
...
@@ -29,7 +29,7 @@ static __inline__ void __ide_mm_outsw(unsigned long port, void *addr, u32 count)
...
@@ -29,7 +29,7 @@ static __inline__ void __ide_mm_outsw(unsigned long port, void *addr, u32 count)
}
}
}
}
static
__inline__
void
__ide_mm_outsl
(
unsigned
long
port
,
void
*
addr
,
u32
count
)
static
__inline__
void
__ide_mm_outsl
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
{
while
(
count
--
)
{
while
(
count
--
)
{
writel
(
*
(
u32
*
)
addr
,
port
);
writel
(
*
(
u32
*
)
addr
,
port
);
...
...
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