Enable USB compilation on Yeeloong

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-16 19:46:22 +02:00
parent 1c9d6bb81b
commit 9130433353
4 changed files with 42 additions and 11 deletions

View file

@ -5,7 +5,7 @@ COMMON_CFLAGS += -march=mips3
COMMON_ASFLAGS += -march=mips3 COMMON_ASFLAGS += -march=mips3
kernel_img_HEADERS += pci.h bitmap.h video.h gfxterm.h font.h \ kernel_img_HEADERS += pci.h bitmap.h video.h gfxterm.h font.h \
bitmap_scale.h bufio.h cs5536.h bitmap_scale.h bufio.h cs5536.h machine/pci.h
include $(srcdir)/conf/mips.mk include $(srcdir)/conf/mips.mk
@ -27,7 +27,7 @@ kernel_img_SOURCES = kern/$(target_cpu)/startup.S \
video/fb/fbfill.c video/fb/fbutil.c video/bitmap.c \ video/fb/fbfill.c video/fb/fbutil.c video/bitmap.c \
video/bitmap_scale.c video/sm712.c bus/pci.c bus/bonito.c \ video/bitmap_scale.c video/sm712.c bus/pci.c bus/bonito.c \
term/gfxterm.c commands/extcmd.c lib/arg.c \ term/gfxterm.c commands/extcmd.c lib/arg.c \
bus/cs5536.c \ bus/cs5536.c term/serial.c term/terminfo.c term/tparm.c \
symlist.c symlist.c
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DUSE_ASCII_FAILBACK kernel_img_CFLAGS = $(COMMON_CFLAGS) -DUSE_ASCII_FAILBACK
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
@ -92,5 +92,35 @@ halt_mod_SOURCES = commands/halt.c
halt_mod_CFLAGS = $(COMMON_CFLAGS) halt_mod_CFLAGS = $(COMMON_CFLAGS)
halt_mod_LDFLAGS = $(COMMON_LDFLAGS) halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For usb.mod
pkglib_MODULES += usb.mod
usb_mod_SOURCES = bus/usb/usb.c bus/usb/usbtrans.c bus/usb/usbhub.c
usb_mod_CFLAGS = $(COMMON_CFLAGS)
usb_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For usbtest.mod
pkglib_MODULES += usbtest.mod
usbtest_mod_SOURCES = commands/usbtest.c
usbtest_mod_CFLAGS = $(COMMON_CFLAGS)
usbtest_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For ohci.mod
pkglib_MODULES += ohci.mod
ohci_mod_SOURCES = bus/usb/ohci.c
ohci_mod_CFLAGS = $(COMMON_CFLAGS)
ohci_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For usbms.mod
pkglib_MODULES += usbms.mod
usbms_mod_SOURCES = disk/usbms.c
usbms_mod_CFLAGS = $(COMMON_CFLAGS)
usbms_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For usb_keyboard.mod
pkglib_MODULES += usb_keyboard.mod
usb_keyboard_mod_SOURCES = term/usb_keyboard.c
usb_keyboard_mod_CFLAGS = $(COMMON_CFLAGS)
usb_keyboard_mod_LDFLAGS = $(COMMON_LDFLAGS)
sbin_SCRIPTS += grub-install sbin_SCRIPTS += grub-install
grub_install_SOURCES = util/grub-install.in grub_install_SOURCES = util/grub-install.in

View file

@ -169,9 +169,11 @@
#ifndef ASM_FILE #ifndef ASM_FILE
int EXPORT_FUNC (grub_cs5536_find) (grub_pci_device_t *devp); int EXPORT_FUNC (grub_cs5536_find) (grub_pci_device_t *devp);
grub_uint64_t grub_cs5536_read_msr (grub_pci_device_t dev, grub_uint32_t addr); grub_uint64_t EXPORT_FUNC (grub_cs5536_read_msr) (grub_pci_device_t dev,
void grub_cs5536_write_msr (grub_pci_device_t dev, grub_uint32_t addr, grub_uint32_t addr);
grub_uint64_t val); void EXPORT_FUNC (grub_cs5536_write_msr) (grub_pci_device_t dev,
grub_uint32_t addr,
grub_uint64_t val);
grub_err_t grub_cs5536_read_spd_byte (grub_port_t smbbase, grub_uint8_t dev, grub_err_t grub_cs5536_read_spd_byte (grub_port_t smbbase, grub_uint8_t dev,
grub_uint8_t addr, grub_uint8_t *res); grub_uint8_t addr, grub_uint8_t *res);
grub_err_t EXPORT_FUNC (grub_cs5536_read_spd) (grub_port_t smbbase, grub_err_t EXPORT_FUNC (grub_cs5536_read_spd) (grub_port_t smbbase,

View file

@ -105,12 +105,12 @@ grub_pci_write_byte (grub_pci_address_t addr, grub_uint8_t data)
} }
volatile void * volatile void *
grub_pci_device_map_range (grub_pci_device_t dev __attribute__ ((unused)), EXPORT_FUNC (grub_pci_device_map_range) (grub_pci_device_t dev,
grub_addr_t base, grub_size_t size); grub_addr_t base, grub_size_t size);
void void
grub_pci_device_unmap_range (grub_pci_device_t dev __attribute__ ((unused)), EXPORT_FUNC (grub_pci_device_unmap_range) (grub_pci_device_t dev,
volatile void *mem, volatile void *mem,
grub_size_t size __attribute__ ((unused))); grub_size_t size);
#endif #endif
#endif /* GRUB_MACHINE_PCI_H */ #endif /* GRUB_MACHINE_PCI_H */

View file

@ -18,7 +18,6 @@
*/ */
#include <grub/term.h> #include <grub/term.h>
#include <grub/machine/console.h>
#include <grub/time.h> #include <grub/time.h>
#include <grub/cpu/io.h> #include <grub/cpu/io.h>
#include <grub/misc.h> #include <grub/misc.h>