mirror of
https://gitlab.com/qemu-project/SLOF.git
synced 2024-06-25 11:36:33 +08:00
net-snk: Remove some unused PCI functions
The read/write_io ones are used by biosemu, though we should probably fix them to work on qemu platform at some stage. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Nikunj A Dadhania

parent
6495aef5b6
commit
0a341a279b
@ -14,12 +14,6 @@
|
||||
#ifndef _PCI_H
|
||||
#define _PCI_H
|
||||
|
||||
#include <of.h>
|
||||
|
||||
int pci_calc_bar_size (long long puid, int bus, int devfn, int bar);
|
||||
int pci_get_bar_start (long long puid, int bus, int devfn, int bar);
|
||||
void pci_set_bar_start (long long puid, int bus, int devfn, int bar, int value);
|
||||
|
||||
unsigned int read_io(void *addr, size_t sz);
|
||||
int write_io(void *addr, unsigned int value, size_t sz);
|
||||
|
||||
|
@ -19,33 +19,7 @@
|
||||
#include <cpu.h>
|
||||
#include <cache.h>
|
||||
|
||||
int
|
||||
pci_calc_bar_size(long long puid, int bus, int devfn, int bar)
|
||||
{
|
||||
int size;
|
||||
int old;
|
||||
bar = bar * 4 + 0x10;
|
||||
old = rtas_pci_config_read(puid, 4, bus, devfn, bar);
|
||||
rtas_pci_config_write(puid, 4, bus, devfn, bar, 0xffffffff);
|
||||
size = (rtas_pci_config_read(puid, 4, bus, devfn, bar) & (-4)) * -1;
|
||||
rtas_pci_config_write(puid, 4, bus, devfn, bar, old);
|
||||
return size;
|
||||
}
|
||||
|
||||
int
|
||||
pci_get_bar_start(long long puid, int bus, int devfn, int bar)
|
||||
{
|
||||
return rtas_pci_config_read(puid, 4, bus, devfn, bar * 4 + 0x10);
|
||||
}
|
||||
|
||||
void
|
||||
pci_set_bar_start(long long puid, int bus, int devfn, int bar, int value)
|
||||
{
|
||||
rtas_pci_config_write(puid, 4, bus, devfn, bar * 4 + 0x10, value);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
read_io(void *addr, size_t sz)
|
||||
unsigned int read_io(void *addr, size_t sz)
|
||||
{
|
||||
unsigned int ret;
|
||||
|
||||
@ -66,8 +40,7 @@ read_io(void *addr, size_t sz)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
write_io(void *addr, unsigned int value, size_t sz)
|
||||
int write_io(void *addr, unsigned int value, size_t sz)
|
||||
{
|
||||
switch (sz) {
|
||||
case 1:
|
||||
|
Reference in New Issue
Block a user