Fixes so we don't use any of the standard include paths
This commit is contained in:
parent
ef20fb22dc
commit
787deb4ae4
10 changed files with 40 additions and 53 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <printk.h>
|
||||
#include <cpu/p5/cpuid.h>
|
||||
#ifdef i586
|
||||
#include <asm/msr.h>
|
||||
#include <cpu/p6/msr.h>
|
||||
#endif
|
||||
|
||||
#ifdef i586
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ __OUTS(b)
|
|||
__OUTS(w)
|
||||
__OUTS(l)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifdef NONONONONO
|
||||
|
||||
#include <linux/vmalloc.h>
|
||||
#include <asm/page.h>
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ extern void printf(char *format, ...);
|
|||
#define PCI_FUNC(devfn) ((devfn) & 0x07)
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <types.h>
|
||||
|
||||
/*
|
||||
* There is one pci_dev structure for each slot-number/function-number
|
||||
|
|
@ -314,23 +314,23 @@ void pcibios_fixup(void);
|
|||
void pcibios_fixup_bus(struct pci_bus *);
|
||||
char *pcibios_setup (char *str);
|
||||
int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned char *val);
|
||||
unsigned char where, u8 *val);
|
||||
int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned short *val);
|
||||
unsigned char where, u16 *val);
|
||||
int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned int *val);
|
||||
unsigned char where, u32 *val);
|
||||
int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned char val);
|
||||
unsigned char where, u8 val);
|
||||
int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned short val);
|
||||
unsigned char where, u16 val);
|
||||
int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned int val);
|
||||
unsigned char where, u32 val);
|
||||
int pcibios_debugwrite_config_byte (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned char val);
|
||||
unsigned char where, u8 val);
|
||||
int pcibios_debugwrite_config_word (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned short val);
|
||||
unsigned char where, u16 val);
|
||||
int pcibios_debugwrite_config_dword (unsigned char bus, unsigned char dev_fn,
|
||||
unsigned char where, unsigned int val);
|
||||
unsigned char where, u32 val);
|
||||
|
||||
/* Don't use these in new code, use pci_find_... instead */
|
||||
|
||||
|
|
@ -376,35 +376,6 @@ void pci_enable(void);
|
|||
void intel_conf_writeb(unsigned long port, unsigned char value);
|
||||
unsigned char intel_conf_readb(unsigned long port);
|
||||
|
||||
#ifndef CONFIG_PCI
|
||||
/* If the system does not have PCI, clearly these return errors. Define
|
||||
these as simple inline functions to avoid hair in drivers. */
|
||||
extern inline int pcibios_present(void) { return 0; }
|
||||
|
||||
#define _PCI_NOP(o,s,t) \
|
||||
extern inline int pcibios_##o##_config_##s## (u8 bus, u8 dfn, u8 where, t val) \
|
||||
{ return PCIBIOS_FUNC_NOT_SUPPORTED; } \
|
||||
extern inline int pci_##o##_config_##s## (struct pci_dev *dev, u8 where, t val) \
|
||||
{ return PCIBIOS_FUNC_NOT_SUPPORTED; }
|
||||
#define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \
|
||||
_PCI_NOP(o,word,u16 x) \
|
||||
_PCI_NOP(o,dword,u32 x)
|
||||
_PCI_NOP_ALL(read, *)
|
||||
_PCI_NOP_ALL(write,)
|
||||
|
||||
extern inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, struct pci_dev *from)
|
||||
{ return NULL; }
|
||||
|
||||
extern inline struct pci_dev *pci_find_class(unsigned int class, struct pci_dev *from)
|
||||
{ return NULL; }
|
||||
|
||||
extern inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn)
|
||||
{ return NULL; }
|
||||
|
||||
extern inline void pci_set_master(struct pci_dev *dev)
|
||||
{ return; }
|
||||
|
||||
#endif /* !CONFIG_PCI */
|
||||
|
||||
#define kmalloc(x, y) malloc(x)
|
||||
void *malloc(unsigned int);
|
||||
|
|
|
|||
13
src/include/string.h
Normal file
13
src/include/string.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// yes, linux has fancy ones. We don't care. This stuff gets used
|
||||
// hardly at all. And the pain of including those files is just too high.
|
||||
|
||||
//extern inline void strcpy(char *dst, char *src) {while (*src) *dst++ = *src++;}
|
||||
|
||||
//extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;}
|
||||
extern inline int strnlen(const char *src, int max) {
|
||||
int i = 0;
|
||||
while ((*src++) && (i < max))
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ void intel_set_mtrr(unsigned long rambase, unsigned long ramsizeK);
|
|||
|
||||
#ifdef NEWPCI /* IRQ routing stuff */
|
||||
|
||||
#include <lbpci.h>
|
||||
#include <pci.h>
|
||||
#include <pci-i386.h>
|
||||
|
||||
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
|
||||
|
|
|
|||
|
|
@ -13,9 +13,11 @@
|
|||
* linux source tree, so keep your mods to a minimum, please
|
||||
* RGM
|
||||
*/
|
||||
#include <lbpci.h>
|
||||
#include <pci.h>
|
||||
#include <pci_ids.h>
|
||||
#include <cpu/p5/io.h>
|
||||
#include <printk.h>
|
||||
#include <types.h>
|
||||
|
||||
extern void intel_post(unsigned char value);
|
||||
#define DEBUG
|
||||
|
|
@ -241,7 +243,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((dev = kmalloc(sizeof(*dev), GFP_ATOMIC)) == NULL) {
|
||||
if ((dev = kmalloc(sizeof(*dev), GFP_ATOMIC)) == 0) {
|
||||
printk("PCI: out of memory.\n");
|
||||
continue;
|
||||
}
|
||||
|
|
@ -335,7 +337,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
|
|||
for (dev = bus->devices; dev; dev = dev->sibling)
|
||||
/* If it's a bridge, scan the bus behind it. */
|
||||
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
|
||||
unsigned int buses;
|
||||
u32 buses;
|
||||
unsigned int devfn = dev->devfn;
|
||||
unsigned short cr;
|
||||
#define NOTUSED
|
||||
|
|
@ -368,7 +370,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
|
|||
}
|
||||
#endif
|
||||
/* Insert it into the tree of buses. */
|
||||
if ((child = kmalloc(sizeof(*child), GFP_ATOMIC)) == NULL) {
|
||||
if ((child = kmalloc(sizeof(*child), GFP_ATOMIC)) == 0) {
|
||||
printk("PCI: out of memory for bridge.\n");
|
||||
continue;
|
||||
}
|
||||
|
|
@ -468,7 +470,7 @@ struct pci_bus *pci_scan_peer_bridge(int bus)
|
|||
struct pci_bus *b;
|
||||
|
||||
b = &pci_root;
|
||||
while ((b != NULL) && (bus != 0)) {
|
||||
while ((b != 0) && (bus != 0)) {
|
||||
if (b->number == bus)
|
||||
return (b);
|
||||
b = b->next;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
* the wisdom of Tom's recommendations ...
|
||||
*/
|
||||
/* single-pass allocation appears to be the way to go. */
|
||||
#include <lbpci.h>
|
||||
#include <pci.h>
|
||||
#undef __KERNEL__
|
||||
#include <asm/io.h>
|
||||
#include <cpu/p5/io.h>
|
||||
#include <printk.h>
|
||||
|
||||
#ifdef EMULATE
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ static char rcsid[] = "$Id$";
|
|||
|
||||
#include <cpu/p5/macros.h>
|
||||
#include <printk.h>
|
||||
#include <lbpci.h>
|
||||
#include <pci.h>
|
||||
#include <subr.h>
|
||||
#include <linux/asm-i386/msr.h>
|
||||
|
||||
#ifdef SERIAL_CONSOLE
|
||||
#include <serial_subr.h>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/string.h>
|
||||
#include <types.h>
|
||||
#include <string.h>
|
||||
|
||||
/* haha, don't need ctype.c */
|
||||
#define isdigit(c) ((c) >= '0' && (c) <= '9')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include <lbpci.h>
|
||||
#include <pci.h>
|
||||
#include <pc80/keyboard.h>
|
||||
#include <printk.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue