Rename mipsel-yeeloong to mipsel-loongson

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-02-19 13:18:05 +01:00
parent a9fa2a22d7
commit 54da1febce
30 changed files with 116 additions and 114 deletions

View file

@ -125,7 +125,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
endif
if COND_mips_yeeloong
if COND_mips_loongson
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h

View file

@ -32,11 +32,11 @@ kernel = {
i386_coreboot_ldflags = '-Wl,-Ttext=0x8200';
i386_multiboot_ldflags = '-Wl,-Ttext=0x8200';
i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000';
mips_yeeloong_ldflags = '-Wl,-Ttext,0x80200000';
mips_loongson_ldflags = '-Wl,-Ttext,0x80200000';
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK';
mips_loongson_cppflags = '-DUSE_ASCII_FAILBACK';
i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
emu_cflags = '$(CFLAGS_GNULIB)';
emu_cppflags = '$(CPPFLAGS_GNULIB)';
@ -48,7 +48,7 @@ kernel = {
i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
i386_coreboot_startup = kern/i386/coreboot/startup.S;
i386_multiboot_startup = kern/i386/coreboot/startup.S;
mips_yeeloong_startup = kern/mips/startup.S;
mips_loongson_startup = kern/mips/startup.S;
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
@ -81,7 +81,7 @@ kernel = {
i386_qemu = kern/generic/rtc_get_time_ms.c;
i386_coreboot = kern/generic/rtc_get_time_ms.c;
i386_multiboot = kern/generic/rtc_get_time_ms.c;
mips_yeeloong = kern/generic/rtc_get_time_ms.c;
mips_loongson = kern/generic/rtc_get_time_ms.c;
ieee1275 = disk/ieee1275/ofdisk.c;
ieee1275 = kern/ieee1275/cmain.c;
@ -136,20 +136,20 @@ kernel = {
i386_ieee1275 = kern/ieee1275/init.c;
mips_yeeloong = term/ns8250.c;
mips_yeeloong = bus/bonito.c;
mips_yeeloong = bus/cs5536.c;
mips_yeeloong = bus/pci.c;
mips_yeeloong = kern/mips/cache.S;
mips_yeeloong = kern/mips/dl.c;
mips_yeeloong = kern/mips/init.c;
mips_yeeloong = kern/mips/yeeloong/init.c;
mips_yeeloong = term/at_keyboard.c;
mips_yeeloong = term/serial.c;
mips_yeeloong = video/sm712.c;
mips_yeeloong = video/sis315pro.c;
mips_loongson = term/ns8250.c;
mips_loongson = bus/bonito.c;
mips_loongson = bus/cs5536.c;
mips_loongson = bus/pci.c;
mips_loongson = kern/mips/cache.S;
mips_loongson = kern/mips/dl.c;
mips_loongson = kern/mips/init.c;
mips_loongson = kern/mips/loongson/init.c;
mips_loongson = term/at_keyboard.c;
mips_loongson = term/serial.c;
mips_loongson = video/sm712.c;
mips_loongson = video/sis315pro.c;
extra_dist = video/sm712_init.c;
mips_yeeloong = commands/keylayouts.c;
mips_loongson = commands/keylayouts.c;
powerpc_ieee1275 = kern/ieee1275/init.c;
powerpc_ieee1275 = kern/powerpc/cache.S;
@ -323,18 +323,18 @@ image = {
image = {
name = fwstart;
mips_yeeloong = boot/mips/yeeloong/fwstart.S;
mips_loongson = boot/mips/loongson/fwstart.S;
objcopyflags = '-O binary';
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
enable = mips_yeeloong;
enable = mips_loongson;
};
image = {
name = fwstart_fuloong;
mips_yeeloong = boot/mips/yeeloong/fuloong.S;
mips_loongson = boot/mips/loongson/fuloong.S;
objcopyflags = '-O binary';
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
enable = mips_yeeloong;
enable = mips_loongson;
};
module = {
@ -358,8 +358,8 @@ module = {
module = {
name = lsspd;
mips_yeeloong = commands/mips/yeeloong/lsspd.c;
enable = mips_yeeloong;
mips_loongson = commands/mips/loongson/lsspd.c;
enable = mips_loongson;
};
module = {
@ -1236,10 +1236,10 @@ module = {
x86_efi = mmap/efi/mmap.c;
mips_yeeloong = mmap/mips/yeeloong/uppermem.c;
mips_loongson = mmap/mips/loongson/uppermem.c;
enable = x86;
enable = mips_yeeloong;
enable = mips_loongson;
};
module = {

View file

@ -16,8 +16,8 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/mips/yeeloong/serial.h>
#include <grub/mips/yeeloong/pci.h>
#include <grub/mips/loongson/serial.h>
#include <grub/mips/loongson/pci.h>
#include <grub/mips/loongson.h>
#include <grub/pci.h>
#include <grub/machine/serial.h>
@ -129,7 +129,7 @@ retry_cs5536:
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
/* Yeeloong has only one memory slot. */
/* Yeeloong and Fuloong have only one memory slot. */
/* Output first byte on serial for debugging. */
ori $a1, $zero, GRUB_SMB_RAM_START_ADDR
bal read_spd

View file

@ -50,7 +50,7 @@ codestart:
/* Parse arguments. Has to be done before relocation.
So need to do it in asm. */
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
move $s2, $zero
move $s3, $zero
move $s4, $zero

View file

@ -36,7 +36,7 @@ grub_dma_free (struct grub_pci_dma_chunk *ch)
}
/* #endif */
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
volatile void *
grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
{
@ -99,13 +99,13 @@ grub_pci_iterate (grub_pci_iteratefunc_t hook)
continue;
}
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
/* Skip ghosts. */
if (id == GRUB_YEELOONG_OHCI_PCIID
&& dev.function == GRUB_YEELOONG_OHCI_GHOST_FUNCTION)
if (id == GRUB_LOONGSON_OHCI_PCIID
&& dev.function == GRUB_LOONGSON_OHCI_GHOST_FUNCTION)
continue;
if (id == GRUB_YEELOONG_EHCI_PCIID
&& dev.function == GRUB_YEELOONG_EHCI_GHOST_FUNCTION)
if (id == GRUB_LOONGSON_EHCI_PCIID
&& dev.function == GRUB_LOONGSON_EHCI_GHOST_FUNCTION)
continue;
#endif

View file

@ -53,8 +53,8 @@ grub_module_iterate (int (*hook) (struct grub_module_header *header))
}
}
/* This is actualy platform-independant but used only on yeeloong and sparc. */
#if defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_SPARC64)
/* This is actualy platform-independant but used only on loongson and sparc. */
#if defined (GRUB_MACHINE_MIPS_LOONGSON) || defined (GRUB_MACHINE_SPARC64)
grub_addr_t
grub_modules_get_end (void)
{

View file

@ -80,7 +80,7 @@ init_pci (void)
/* FIXME: autoscan for BARs and devices. */
switch (pciid)
{
case GRUB_YEELOONG_OHCI_PCIID:
case GRUB_LOONGSON_OHCI_PCIID:
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
grub_pci_write (addr, 0x5025000);
addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
@ -92,7 +92,7 @@ init_pci (void)
addr = grub_pci_make_address (dev, GRUB_PCI_REG_STATUS);
grub_pci_write_word (addr, 0x0200 | GRUB_PCI_STATUS_CAPABILITIES);
break;
case GRUB_YEELOONG_EHCI_PCIID:
case GRUB_LOONGSON_EHCI_PCIID:
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
grub_pci_write (addr, 0x5026000);
addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
@ -164,7 +164,7 @@ grub_machine_init (void)
if (err)
grub_fatal ("Couldn't init SMBus: %s\n", grub_errmsg);
/* Yeeloong has only one memory slot. */
/* Yeeloong and Fuloong have only one memory slot. */
err = grub_cs5536_read_spd (smbbase, GRUB_SMB_RAM_START_ADDR, &spd);
if (err)
grub_fatal ("Couldn't read SPD: %s\n", grub_errmsg);

View file

@ -36,7 +36,7 @@ start:
bal cont
nop
. = _start + GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE
. = _start + GRUB_KERNEL_MIPS_LOONGSON_TOTAL_MODULE_SIZE
total_module_size:
.long 0
@ -51,7 +51,7 @@ VARIABLE(grub_prefix)
*/
. = _start + GRUB_KERNEL_MACHINE_PREFIX_END
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
VARIABLE (grub_arch_busclock)
.long 0
VARIABLE (grub_arch_cpuclock)
@ -67,7 +67,7 @@ cont:
/* Save our base. */
move $s0, $ra
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
lui $t1, %hi(grub_arch_busclock)
addiu $t1, %lo(grub_arch_busclock)
sw $s2, 0($t1)

View file

@ -32,7 +32,7 @@
#include <grub/pci.h>
#include <grub/machine/time.h>
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
#include <grub/machine/kernel.h>
const char loongson_machtypes[][60] =
@ -224,7 +224,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
/* For arguments. */
linux_argc = argc;
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
linux_argc++;
#endif
/* Main arguments. */
@ -239,7 +239,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
/* Normal arguments. */
for (i = 1; i < argc; i++)
size += ALIGN_UP (grub_strlen (argv[i]) + 1, 4);
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
size += ALIGN_UP (sizeof (loongson_machtypes[0]), 4);
#endif
@ -279,7 +279,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
linux_argv++;
linux_args += ALIGN_UP (sizeof ("a0"), 4);
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
{
unsigned mtype = grub_arch_machine;
if (mtype >= ARRAY_SIZE (loongson_machtypes))

View file

@ -257,7 +257,7 @@ grub_keyboard_controller_write (grub_uint8_t c)
grub_outb (c, KEYBOARD_REG_DATA);
}
#if !defined (GRUB_MACHINE_MIPS_YEELOONG) && !defined (GRUB_MACHINE_QEMU)
#if !defined (GRUB_MACHINE_MIPS_LOONGSON) && !defined (GRUB_MACHINE_QEMU)
static grub_uint8_t
grub_keyboard_controller_read (void)
@ -562,7 +562,7 @@ grub_keyboard_controller_init (struct grub_term_input *term __attribute__ ((unus
keyboard_controller_wait_until_ready ();
grub_inb (KEYBOARD_REG_DATA);
}
#if defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_QEMU)
#if defined (GRUB_MACHINE_MIPS_LOONGSON) || defined (GRUB_MACHINE_QEMU)
grub_keyboard_controller_orig = 0;
grub_keyboard_orig_set = 2;
#else

View file

@ -66,8 +66,8 @@ serial_get_divisor (const struct grub_serial_port *port,
for (i = 0; i < ARRAY_SIZE (divisor_tab); i++)
if (divisor_tab[i].speed == config->speed)
{
/* internal UART in Yeeloong runs twice the usual rate. */
#ifdef GRUB_MACHINE_MIPS_YEELOONG
/* internal Loongson UART runs twice the usual rate. */
#ifdef GRUB_MACHINE_MIPS_LOONGSON
if (port->port == 0xbff003f8)
return 2 * divisor_tab[i].div;
else
@ -115,8 +115,8 @@ do_real_config (struct grub_serial_port *port)
| stop_bits[port->config.stop_bits]);
grub_outb (status, port->port + UART_LCR);
/* In Yeeloong serial port has only 3 wires. */
#ifndef GRUB_MACHINE_MIPS_YEELOONG
/* On Loongson machines serial port has only 3 wires. */
#ifndef GRUB_MACHINE_MIPS_LOONGSON
/* Enable the FIFO. */
grub_outb (UART_ENABLE_FIFO_TRIGGER1, port->port + UART_FCR);

View file

@ -26,7 +26,7 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
#include <grub/list.h>
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
#include <grub/machine/kernel.h>
#endif
@ -298,7 +298,7 @@ grub_serial_register (struct grub_serial_port *port)
port->term_in = in;
port->term_out = out;
grub_terminfo_output_register (out, "vt100");
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
if (grub_strcmp (port->name,
(grub_arch_machine == GRUB_ARCH_MACHINE_YEELOONG)
? "com0" : "com2") == 0)