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
ee634c3f
Commit
ee634c3f
authored
Mar 17, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework ISA bridge probe and use, from Todd Inglett
parent
a6908fdd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
53 deletions
+15
-53
arch/ppc64/kernel/iSeries_pci.c
arch/ppc64/kernel/iSeries_pci.c
+0
-14
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/pSeries_pci.c
+0
-28
arch/ppc64/kernel/pci.c
arch/ppc64/kernel/pci.c
+6
-4
arch/ppc64/kernel/pci.h
arch/ppc64/kernel/pci.h
+1
-1
arch/ppc64/kernel/pci_dma.c
arch/ppc64/kernel/pci_dma.c
+6
-2
include/asm-ppc64/floppy.h
include/asm-ppc64/floppy.h
+2
-4
No files found.
arch/ppc64/kernel/iSeries_pci.c
View file @
ee634c3f
...
@@ -352,20 +352,6 @@ void iSeries_pcibios_fixup_bus(struct pci_bus* PciBus)
...
@@ -352,20 +352,6 @@ void iSeries_pcibios_fixup_bus(struct pci_bus* PciBus)
PPCDBG
(
PPCDBG_BUSWALK
,
__FUNCTION__
"(0x%04X) Entry.
\n
"
,
PciBus
->
number
);
PPCDBG
(
PPCDBG_BUSWALK
,
__FUNCTION__
"(0x%04X) Entry.
\n
"
,
PciBus
->
number
);
}
}
/***********************************************************************
* find_floppy(void)
*
* Finds the default floppy device, if the system has one, and returns
* the pci_dev for the isa bridge for the floppy device.
*
* Note: On iSeries there will only be a virtual diskette.
***********************************************************************/
struct
pci_dev
*
find_floppy
(
void
)
{
PPCDBG
(
PPCDBG_BUSWALK
,
"- Find Floppy pci_dev.. None on iSeries.
\n
"
);
return
NULL
;
}
/***********************************************************************
/***********************************************************************
...
...
arch/ppc64/kernel/pSeries_pci.c
View file @
ee634c3f
...
@@ -757,34 +757,6 @@ pci_find_hose_for_OF_device(struct device_node *node)
...
@@ -757,34 +757,6 @@ pci_find_hose_for_OF_device(struct device_node *node)
return
NULL
;
return
NULL
;
}
}
/***********************************************************************
* find_floppy(void)
*
* Finds the default floppy device, if the system has one, and returns
* the pci_dev for the isa bridge for the floppy device.
*
* Note: This functions finds the first "fdc" device and then looks to
* the parent device which should be the isa bridge device. If there
* is more than one floppy on the system, it will find the first one
* and maybe that is okay.
***********************************************************************/
struct
pci_dev
*
find_floppy
(
void
)
{
struct
device_node
*
floppy_dn
;
struct
pci_dev
*
floppy_dev
=
NULL
;
int
*
reg
;
floppy_dn
=
find_type_devices
(
"fdc"
);
if
(
floppy_dn
&&
floppy_dn
->
parent
)
{
if
((
reg
=
(
unsigned
int
*
)
get_property
(
floppy_dn
->
parent
,
"reg"
,
0
))
!=
NULL
)
floppy_dev
=
pci_find_slot
((
reg
[
0
]
&
0x00ff0000
)
>>
16
,
(
reg
[
0
]
&
0x0000ff00
)
>>
8
);
}
PPCDBG
(
PPCDBG_BUSWALK
,
"
\t
Floppy pci_dev
\n
"
);
PPCDBGCALL
(
PPCDBG_BUSWALK
,
dumpPci_Dev
(
floppy_dev
)
);
return
floppy_dev
;
}
/***********************************************************************
/***********************************************************************
* ppc64_pcibios_init
* ppc64_pcibios_init
*
*
...
...
arch/ppc64/kernel/pci.c
View file @
ee634c3f
...
@@ -58,7 +58,6 @@ static void fixup_broken_pcnet32(struct pci_dev* dev);
...
@@ -58,7 +58,6 @@ static void fixup_broken_pcnet32(struct pci_dev* dev);
static
void
fixup_windbond_82c105
(
struct
pci_dev
*
dev
);
static
void
fixup_windbond_82c105
(
struct
pci_dev
*
dev
);
void
fixup_resources
(
struct
pci_dev
*
dev
);
void
fixup_resources
(
struct
pci_dev
*
dev
);
struct
pci_dev
*
find_floppy
(
void
);
void
iSeries_pcibios_init
(
void
);
void
iSeries_pcibios_init
(
void
);
void
pSeries_pcibios_init
(
void
);
void
pSeries_pcibios_init
(
void
);
...
@@ -94,8 +93,8 @@ struct pci_controller *phbtab[PCI_MAX_PHB];
...
@@ -94,8 +93,8 @@ struct pci_controller *phbtab[PCI_MAX_PHB];
static
int
pci_bus_count
;
static
int
pci_bus_count
;
/*
Floppy dev for ppc64_fd_dma_setup(). May be null if no floppy in the system
. */
/*
Cached ISA bridge dev
. */
struct
pci_dev
*
ppc64_
floppy
_dev
=
NULL
;
struct
pci_dev
*
ppc64_
isabridge
_dev
=
NULL
;
struct
pci_fixup
pcibios_fixups
[]
=
{
struct
pci_fixup
pcibios_fixups
[]
=
{
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_TRIDENT
,
PCI_ANY_ID
,
fixup_broken_pcnet32
},
{
PCI_FIXUP_HEADER
,
PCI_VENDOR_ID_TRIDENT
,
PCI_ANY_ID
,
fixup_broken_pcnet32
},
...
@@ -492,7 +491,10 @@ pcibios_init(void)
...
@@ -492,7 +491,10 @@ pcibios_init(void)
create_tce_tables
();
create_tce_tables
();
PPCDBG
(
PPCDBG_BUSWALK
,
"pSeries create_tce_tables()
\n
"
);
PPCDBG
(
PPCDBG_BUSWALK
,
"pSeries create_tce_tables()
\n
"
);
#endif
#endif
ppc64_floppy_dev
=
find_floppy
();
/* Cache the location of the ISA bridge (if we have one) */
if
(
ppc64_isabridge_dev
=
pci_find_class
(
PCI_CLASS_BRIDGE_ISA
<<
8
,
NULL
))
printk
(
"ISA bridge at %s
\n
"
,
ppc64_isabridge_dev
->
slot_name
);
printk
(
"PCI: Probing PCI hardware done
\n
"
);
printk
(
"PCI: Probing PCI hardware done
\n
"
);
PPCDBG
(
PPCDBG_BUSWALK
,
"PCI: Probing PCI hardware done.
\n
"
);
PPCDBG
(
PPCDBG_BUSWALK
,
"PCI: Probing PCI hardware done.
\n
"
);
...
...
arch/ppc64/kernel/pci.h
View file @
ee634c3f
...
@@ -46,7 +46,7 @@ extern int pci_set_reset(struct pci_dev*,int);
...
@@ -46,7 +46,7 @@ extern int pci_set_reset(struct pci_dev*,int);
extern
int
device_Location
(
struct
pci_dev
*
,
char
*
);
extern
int
device_Location
(
struct
pci_dev
*
,
char
*
);
extern
int
format_device_location
(
struct
pci_dev
*
,
char
*
,
int
);
extern
int
format_device_location
(
struct
pci_dev
*
,
char
*
,
int
);
extern
struct
pci_dev
*
ppc64_
floppy_dev
;
extern
struct
pci_dev
*
ppc64_
isabridge_dev
;
/* may be NULL if no ISA bus */
/*******************************************************************
/*******************************************************************
* PCI device_node operations
* PCI device_node operations
...
...
arch/ppc64/kernel/pci_dma.c
View file @
ee634c3f
...
@@ -131,8 +131,12 @@ u8 iSeries_Get_Bus( struct pci_dev * dv )
...
@@ -131,8 +131,12 @@ u8 iSeries_Get_Bus( struct pci_dev * dv )
return
0
;
return
0
;
}
}
static
inline
struct
TceTable
*
get_tce_table
(
struct
pci_dev
*
dev
)
{
static
inline
struct
TceTable
*
get_tce_table
(
struct
pci_dev
*
dev
)
{
if
(
!
dev
)
dev
=
ppc64_isabridge_dev
;
if
(
!
dev
)
return
NULL
;
if
(
(
_machine
==
_MACH_iSeries
)
&&
(
dev
->
bus
)
)
if
(
(
_machine
==
_MACH_iSeries
)
&&
(
dev
->
bus
)
)
return
tceTables
[
dev
->
bus
->
number
];
return
tceTables
[
dev
->
bus
->
number
];
/* On the iSeries, the virtual bus will take this path. There is a */
/* On the iSeries, the virtual bus will take this path. There is a */
...
...
include/asm-ppc64/floppy.h
View file @
ee634c3f
...
@@ -36,8 +36,6 @@
...
@@ -36,8 +36,6 @@
#define fd_dma_setup(addr,size,mode,io) ppc64_fd_dma_setup(addr,size,mode,io)
#define fd_dma_setup(addr,size,mode,io) ppc64_fd_dma_setup(addr,size,mode,io)
extern
struct
pci_dev
*
ppc64_floppy_dev
;
static
__inline__
int
static
__inline__
int
ppc64_fd_dma_setup
(
char
*
addr
,
unsigned
long
size
,
int
mode
,
int
io
)
ppc64_fd_dma_setup
(
char
*
addr
,
unsigned
long
size
,
int
mode
,
int
io
)
{
{
...
@@ -52,12 +50,12 @@ ppc64_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
...
@@ -52,12 +50,12 @@ ppc64_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
if
(
bus_addr
if
(
bus_addr
&&
(
addr
!=
prev_addr
||
size
!=
prev_size
||
dir
!=
prev_dir
))
{
&&
(
addr
!=
prev_addr
||
size
!=
prev_size
||
dir
!=
prev_dir
))
{
/* different from last time -- unmap prev */
/* different from last time -- unmap prev */
pci_unmap_single
(
ppc64_floppy_dev
,
bus_addr
,
prev_size
,
prev_dir
);
pci_unmap_single
(
NULL
,
bus_addr
,
prev_size
,
prev_dir
);
bus_addr
=
0
;
bus_addr
=
0
;
}
}
if
(
!
bus_addr
)
/* need to map it */
{
if
(
!
bus_addr
)
/* need to map it */
{
bus_addr
=
pci_map_single
(
ppc64_floppy_dev
,
addr
,
size
,
dir
);
bus_addr
=
pci_map_single
(
NULL
,
addr
,
size
,
dir
);
}
}
/* remember this one as prev */
/* remember this one as prev */
...
...
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