Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
OpenBMC Firmware
talos-obmc-linux
Commits
adb2705a
Commit
adb2705a
authored
19 years ago
by
Linus Torvalds
Browse files
Options
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
parents
f340c0d1
8644d2a4
Changes
69
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
118 additions
and
5 deletions
+118
-5
include/asm-sh/pci.h
include/asm-sh/pci.h
+10
-0
include/asm-sh64/pci.h
include/asm-sh64/pci.h
+10
-0
include/asm-sparc/pci.h
include/asm-sparc/pci.h
+10
-0
include/asm-sparc64/pci.h
include/asm-sparc64/pci.h
+19
-0
include/asm-v850/pci.h
include/asm-v850/pci.h
+10
-0
include/asm-x86_64/pci.h
include/asm-x86_64/pci.h
+10
-0
include/linux/acpi.h
include/linux/acpi.h
+16
-3
include/linux/pci.h
include/linux/pci.h
+31
-2
include/linux/pci_ids.h
include/linux/pci_ids.h
+2
-0
No files found.
include/asm-sh/pci.h
View file @
adb2705a
...
@@ -96,6 +96,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
...
@@ -96,6 +96,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
#define sg_dma_address(sg) (virt_to_bus((sg)->dma_address))
#define sg_dma_address(sg) (virt_to_bus((sg)->dma_address))
#define sg_dma_len(sg) ((sg)->length)
#define sg_dma_len(sg) ((sg)->length)
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
/* Board-specific fixup routines. */
/* Board-specific fixup routines. */
extern
void
pcibios_fixup
(
void
);
extern
void
pcibios_fixup
(
void
);
extern
void
pcibios_fixup_irqs
(
void
);
extern
void
pcibios_fixup_irqs
(
void
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-sh64/pci.h
View file @
adb2705a
...
@@ -86,6 +86,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
...
@@ -86,6 +86,16 @@ static inline void pcibios_penalize_isa_irq(int irq)
#define sg_dma_address(sg) ((sg)->dma_address)
#define sg_dma_address(sg) ((sg)->dma_address)
#define sg_dma_len(sg) ((sg)->length)
#define sg_dma_len(sg) ((sg)->length)
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
/* Board-specific fixup routines. */
/* Board-specific fixup routines. */
extern
void
pcibios_fixup
(
void
);
extern
void
pcibios_fixup
(
void
);
extern
void
pcibios_fixup_irqs
(
void
);
extern
void
pcibios_fixup_irqs
(
void
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-sparc/pci.h
View file @
adb2705a
...
@@ -144,6 +144,16 @@ extern inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
...
@@ -144,6 +144,16 @@ extern inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
#define pci_dac_dma_supported(dev, mask) (0)
#define pci_dac_dma_supported(dev, mask) (0)
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
static
inline
void
pcibios_add_platform_entries
(
struct
pci_dev
*
dev
)
static
inline
void
pcibios_add_platform_entries
(
struct
pci_dev
*
dev
)
{
{
}
}
...
...
This diff is collapsed.
Click to expand it.
include/asm-sparc64/pci.h
View file @
adb2705a
...
@@ -220,6 +220,25 @@ static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
...
@@ -220,6 +220,25 @@ static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
return
(
dma_addr
==
PCI_DMA_ERROR_CODE
);
return
(
dma_addr
==
PCI_DMA_ERROR_CODE
);
}
}
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
unsigned
long
cacheline_size
;
u8
byte
;
pci_read_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
&
byte
);
if
(
byte
==
0
)
cacheline_size
=
1024
;
else
cacheline_size
=
(
int
)
byte
*
4
;
*
strat
=
PCI_DMA_BURST_BOUNDARY
;
*
strategy_parameter
=
cacheline_size
;
}
#endif
/* Return the index of the PCI controller for device PDEV. */
/* Return the index of the PCI controller for device PDEV. */
extern
int
pci_domain_nr
(
struct
pci_bus
*
bus
);
extern
int
pci_domain_nr
(
struct
pci_bus
*
bus
);
...
...
This diff is collapsed.
Click to expand it.
include/asm-v850/pci.h
View file @
adb2705a
...
@@ -81,6 +81,16 @@ extern void
...
@@ -81,6 +81,16 @@ extern void
pci_free_consistent
(
struct
pci_dev
*
pdev
,
size_t
size
,
void
*
cpu_addr
,
pci_free_consistent
(
struct
pci_dev
*
pdev
,
size_t
size
,
void
*
cpu_addr
,
dma_addr_t
dma_addr
);
dma_addr_t
dma_addr
);
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
static
inline
void
pcibios_add_platform_entries
(
struct
pci_dev
*
dev
)
static
inline
void
pcibios_add_platform_entries
(
struct
pci_dev
*
dev
)
{
{
}
}
...
...
This diff is collapsed.
Click to expand it.
include/asm-x86_64/pci.h
View file @
adb2705a
...
@@ -123,6 +123,16 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
...
@@ -123,6 +123,16 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
flush_write_buffers
();
flush_write_buffers
();
}
}
#ifdef CONFIG_PCI
static
inline
void
pci_dma_burst_advice
(
struct
pci_dev
*
pdev
,
enum
pci_dma_burst_strategy
*
strat
,
unsigned
long
*
strategy_parameter
)
{
*
strat
=
PCI_DMA_BURST_INFINITY
;
*
strategy_parameter
=
~
0UL
;
}
#endif
#define HAVE_PCI_MMAP
#define HAVE_PCI_MMAP
extern
int
pci_mmap_page_range
(
struct
pci_dev
*
dev
,
struct
vm_area_struct
*
vma
,
extern
int
pci_mmap_page_range
(
struct
pci_dev
*
dev
,
struct
vm_area_struct
*
vma
,
enum
pci_mmap_state
mmap_state
,
int
write_combine
);
enum
pci_mmap_state
mmap_state
,
int
write_combine
);
...
...
This diff is collapsed.
Click to expand it.
include/linux/acpi.h
View file @
adb2705a
...
@@ -342,11 +342,19 @@ struct acpi_table_ecdt {
...
@@ -342,11 +342,19 @@ struct acpi_table_ecdt {
/* PCI MMCONFIG */
/* PCI MMCONFIG */
/* Defined in PCI Firmware Specification 3.0 */
struct
acpi_table_mcfg_config
{
u32
base_address
;
u32
base_reserved
;
u16
pci_segment_group_number
;
u8
start_bus_number
;
u8
end_bus_number
;
u8
reserved
[
4
];
}
__attribute__
((
packed
));
struct
acpi_table_mcfg
{
struct
acpi_table_mcfg
{
struct
acpi_table_header
header
;
struct
acpi_table_header
header
;
u8
reserved
[
8
];
u8
reserved
[
8
];
u32
base_address
;
struct
acpi_table_mcfg_config
config
[
0
];
u32
base_reserved
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
/* Table Handlers */
/* Table Handlers */
...
@@ -391,6 +399,7 @@ int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler);
...
@@ -391,6 +399,7 @@ int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler);
int
acpi_get_table_header_early
(
enum
acpi_table_id
id
,
struct
acpi_table_header
**
header
);
int
acpi_get_table_header_early
(
enum
acpi_table_id
id
,
struct
acpi_table_header
**
header
);
int
acpi_table_parse_madt
(
enum
acpi_madt_entry_id
id
,
acpi_madt_entry_handler
handler
,
unsigned
int
max_entries
);
int
acpi_table_parse_madt
(
enum
acpi_madt_entry_id
id
,
acpi_madt_entry_handler
handler
,
unsigned
int
max_entries
);
int
acpi_table_parse_srat
(
enum
acpi_srat_entry_id
id
,
acpi_madt_entry_handler
handler
,
unsigned
int
max_entries
);
int
acpi_table_parse_srat
(
enum
acpi_srat_entry_id
id
,
acpi_madt_entry_handler
handler
,
unsigned
int
max_entries
);
int
acpi_parse_mcfg
(
unsigned
long
phys_addr
,
unsigned
long
size
);
void
acpi_table_print
(
struct
acpi_table_header
*
header
,
unsigned
long
phys_addr
);
void
acpi_table_print
(
struct
acpi_table_header
*
header
,
unsigned
long
phys_addr
);
void
acpi_table_print_madt_entry
(
acpi_table_entry_header
*
madt
);
void
acpi_table_print_madt_entry
(
acpi_table_entry_header
*
madt
);
void
acpi_table_print_srat_entry
(
acpi_table_entry_header
*
srat
);
void
acpi_table_print_srat_entry
(
acpi_table_entry_header
*
srat
);
...
@@ -407,9 +416,13 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu);
...
@@ -407,9 +416,13 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu);
int
acpi_unmap_lsapic
(
int
cpu
);
int
acpi_unmap_lsapic
(
int
cpu
);
#endif
/* CONFIG_ACPI_HOTPLUG_CPU */
#endif
/* CONFIG_ACPI_HOTPLUG_CPU */
int
acpi_register_ioapic
(
acpi_handle
handle
,
u64
phys_addr
,
u32
gsi_base
);
int
acpi_unregister_ioapic
(
acpi_handle
handle
,
u32
gsi_base
);
extern
int
acpi_mp_config
;
extern
int
acpi_mp_config
;
extern
u32
pci_mmcfg_base_addr
;
extern
struct
acpi_table_mcfg_config
*
pci_mmcfg_config
;
extern
int
pci_mmcfg_config_num
;
extern
int
sbf_port
;
extern
int
sbf_port
;
...
...
This diff is collapsed.
Click to expand it.
include/linux/pci.h
View file @
adb2705a
...
@@ -734,16 +734,20 @@ void pcibios_update_irq(struct pci_dev *, int irq);
...
@@ -734,16 +734,20 @@ void pcibios_update_irq(struct pci_dev *, int irq);
/* Generic PCI functions used internally */
/* Generic PCI functions used internally */
extern
struct
pci_bus
*
pci_find_bus
(
int
domain
,
int
busnr
);
extern
struct
pci_bus
*
pci_find_bus
(
int
domain
,
int
busnr
);
void
pci_bus_add_devices
(
struct
pci_bus
*
bus
);
struct
pci_bus
*
pci_scan_bus_parented
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
);
struct
pci_bus
*
pci_scan_bus_parented
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
);
static
inline
struct
pci_bus
*
pci_scan_bus
(
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
static
inline
struct
pci_bus
*
pci_scan_bus
(
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
{
{
return
pci_scan_bus_parented
(
NULL
,
bus
,
ops
,
sysdata
);
struct
pci_bus
*
root_bus
;
root_bus
=
pci_scan_bus_parented
(
NULL
,
bus
,
ops
,
sysdata
);
if
(
root_bus
)
pci_bus_add_devices
(
root_bus
);
return
root_bus
;
}
}
int
pci_scan_slot
(
struct
pci_bus
*
bus
,
int
devfn
);
int
pci_scan_slot
(
struct
pci_bus
*
bus
,
int
devfn
);
struct
pci_dev
*
pci_scan_single_device
(
struct
pci_bus
*
bus
,
int
devfn
);
struct
pci_dev
*
pci_scan_single_device
(
struct
pci_bus
*
bus
,
int
devfn
);
unsigned
int
pci_scan_child_bus
(
struct
pci_bus
*
bus
);
unsigned
int
pci_scan_child_bus
(
struct
pci_bus
*
bus
);
void
pci_bus_add_device
(
struct
pci_dev
*
dev
);
void
pci_bus_add_device
(
struct
pci_dev
*
dev
);
void
pci_bus_add_devices
(
struct
pci_bus
*
bus
);
void
pci_name_device
(
struct
pci_dev
*
dev
);
void
pci_name_device
(
struct
pci_dev
*
dev
);
char
*
pci_class_name
(
u32
class
);
char
*
pci_class_name
(
u32
class
);
void
pci_read_bridge_bases
(
struct
pci_bus
*
child
);
void
pci_read_bridge_bases
(
struct
pci_bus
*
child
);
...
@@ -870,6 +874,15 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass
...
@@ -870,6 +874,15 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass
#define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
#define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
#define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
#define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
enum
pci_dma_burst_strategy
{
PCI_DMA_BURST_INFINITY
,
/* make bursts as large as possible,
strategy_parameter is N/A */
PCI_DMA_BURST_BOUNDARY
,
/* disconnect at every strategy_parameter
byte boundaries */
PCI_DMA_BURST_MULTIPLE
,
/* disconnect at some multiple of
strategy_parameter byte boundaries */
};
#if defined(CONFIG_ISA) || defined(CONFIG_EISA)
#if defined(CONFIG_ISA) || defined(CONFIG_EISA)
extern
struct
pci_dev
*
isa_bridge
;
extern
struct
pci_dev
*
isa_bridge
;
#endif
#endif
...
@@ -972,6 +985,8 @@ static inline int pci_proc_domain(struct pci_bus *bus)
...
@@ -972,6 +985,8 @@ static inline int pci_proc_domain(struct pci_bus *bus)
}
}
#endif
#endif
#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
#endif
/* !CONFIG_PCI */
#endif
/* !CONFIG_PCI */
/* these helpers provide future and backwards compatibility
/* these helpers provide future and backwards compatibility
...
@@ -1016,6 +1031,20 @@ static inline char *pci_name(struct pci_dev *pdev)
...
@@ -1016,6 +1031,20 @@ static inline char *pci_name(struct pci_dev *pdev)
#define pci_pretty_name(dev) ""
#define pci_pretty_name(dev) ""
#endif
#endif
/* Some archs don't want to expose struct resource to userland as-is
* in sysfs and /proc
*/
#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
static
inline
void
pci_resource_to_user
(
const
struct
pci_dev
*
dev
,
int
bar
,
const
struct
resource
*
rsrc
,
u64
*
start
,
u64
*
end
)
{
*
start
=
rsrc
->
start
;
*
end
=
rsrc
->
end
;
}
#endif
/* HAVE_ARCH_PCI_RESOURCE_TO_USER */
/*
/*
* The world is not perfect and supplies us with broken PCI devices.
* The world is not perfect and supplies us with broken PCI devices.
* For at least a part of these bugs we need a work-around, so both
* For at least a part of these bugs we need a work-around, so both
...
...
This diff is collapsed.
Click to expand it.
include/linux/pci_ids.h
View file @
adb2705a
...
@@ -62,6 +62,8 @@
...
@@ -62,6 +62,8 @@
#define PCI_BASE_CLASS_SYSTEM 0x08
#define PCI_BASE_CLASS_SYSTEM 0x08
#define PCI_CLASS_SYSTEM_PIC 0x0800
#define PCI_CLASS_SYSTEM_PIC 0x0800
#define PCI_CLASS_SYSTEM_PIC_IOAPIC 0x080010
#define PCI_CLASS_SYSTEM_PIC_IOXAPIC 0x080020
#define PCI_CLASS_SYSTEM_DMA 0x0801
#define PCI_CLASS_SYSTEM_DMA 0x0801
#define PCI_CLASS_SYSTEM_TIMER 0x0802
#define PCI_CLASS_SYSTEM_TIMER 0x0802
#define PCI_CLASS_SYSTEM_RTC 0x0803
#define PCI_CLASS_SYSTEM_RTC 0x0803
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
Next
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