mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
Merge git://git.denx.de/u-boot-x86
This commit is contained in:
@ -17,15 +17,6 @@
|
|||||||
#include "hte.h"
|
#include "hte.h"
|
||||||
#include "smc.h"
|
#include "smc.h"
|
||||||
|
|
||||||
/* t_rfc values (in picoseconds) per density */
|
|
||||||
static const uint32_t t_rfc[5] = {
|
|
||||||
90000, /* 512Mb */
|
|
||||||
110000, /* 1Gb */
|
|
||||||
160000, /* 2Gb */
|
|
||||||
300000, /* 4Gb */
|
|
||||||
350000, /* 8Gb */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* t_ck clock period in picoseconds per speed index 800, 1066, 1333 */
|
/* t_ck clock period in picoseconds per speed index 800, 1066, 1333 */
|
||||||
static const uint32_t t_ck[3] = {
|
static const uint32_t t_ck[3] = {
|
||||||
2500,
|
2500,
|
||||||
@ -35,8 +26,12 @@ static const uint32_t t_ck[3] = {
|
|||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
static const uint16_t ddr_wclk[] = {193, 158};
|
static const uint16_t ddr_wclk[] = {193, 158};
|
||||||
|
#ifdef BACKUP_WCTL
|
||||||
static const uint16_t ddr_wctl[] = {1, 217};
|
static const uint16_t ddr_wctl[] = {1, 217};
|
||||||
|
#endif
|
||||||
|
#ifdef BACKUP_WCMD
|
||||||
static const uint16_t ddr_wcmd[] = {1, 220};
|
static const uint16_t ddr_wcmd[] = {1, 220};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BACKUP_RCVN
|
#ifdef BACKUP_RCVN
|
||||||
static const uint16_t ddr_rcvn[] = {129, 498};
|
static const uint16_t ddr_rcvn[] = {129, 498};
|
||||||
|
@ -329,6 +329,15 @@ void acpi_create_gnvs(struct acpi_global_nvs *gnvs);
|
|||||||
void enter_acpi_mode(int pm1_cnt);
|
void enter_acpi_mode(int pm1_cnt);
|
||||||
ulong write_acpi_tables(ulong start);
|
ulong write_acpi_tables(ulong start);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* acpi_get_rsdp_addr() - get ACPI RSDP table address
|
||||||
|
*
|
||||||
|
* This routine returns the ACPI RSDP table address in the system memory.
|
||||||
|
*
|
||||||
|
* @return: ACPI RSDP table address
|
||||||
|
*/
|
||||||
|
ulong acpi_get_rsdp_addr(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* acpi_find_fadt() - find ACPI FADT table in the sytem memory
|
* acpi_find_fadt() - find ACPI FADT table in the sytem memory
|
||||||
*
|
*
|
||||||
|
@ -284,7 +284,7 @@ Device (PCI0)
|
|||||||
Return (STA_VISIBLE)
|
Return (STA_VISIBLE)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_CRS, 0, NotSerialized)
|
Method (_CRS, 0, Serialized)
|
||||||
{
|
{
|
||||||
Name (RBUF, ResourceTemplate ()
|
Name (RBUF, ResourceTemplate ()
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,7 @@ struct setup_header {
|
|||||||
__u64 pref_address;
|
__u64 pref_address;
|
||||||
__u32 init_size;
|
__u32 init_size;
|
||||||
__u32 handover_offset;
|
__u32 handover_offset;
|
||||||
|
__u64 acpi_rsdp_addr;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct sys_desc_table {
|
struct sys_desc_table {
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
*/
|
*/
|
||||||
extern const unsigned char AmlCode[];
|
extern const unsigned char AmlCode[];
|
||||||
|
|
||||||
|
/* ACPI RSDP address to be used in boot parameters */
|
||||||
|
static ulong acpi_rsdp_addr;
|
||||||
|
|
||||||
static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt,
|
static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt,
|
||||||
struct acpi_xsdt *xsdt)
|
struct acpi_xsdt *xsdt)
|
||||||
{
|
{
|
||||||
@ -357,8 +360,7 @@ void enter_acpi_mode(int pm1_cnt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* QEMU's version of write_acpi_tables is defined in
|
* QEMU's version of write_acpi_tables is defined in drivers/misc/qfw.c
|
||||||
* arch/x86/cpu/qemu/acpi_table.c
|
|
||||||
*/
|
*/
|
||||||
ulong write_acpi_tables(ulong start)
|
ulong write_acpi_tables(ulong start)
|
||||||
{
|
{
|
||||||
@ -461,6 +463,7 @@ ulong write_acpi_tables(ulong start)
|
|||||||
|
|
||||||
debug("current = %x\n", current);
|
debug("current = %x\n", current);
|
||||||
|
|
||||||
|
acpi_rsdp_addr = (unsigned long)rsdp;
|
||||||
debug("ACPI: done\n");
|
debug("ACPI: done\n");
|
||||||
|
|
||||||
/* Don't touch ACPI hardware on HW reduced platforms */
|
/* Don't touch ACPI hardware on HW reduced platforms */
|
||||||
@ -476,6 +479,11 @@ ulong write_acpi_tables(ulong start)
|
|||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ulong acpi_get_rsdp_addr(void)
|
||||||
|
{
|
||||||
|
return acpi_rsdp_addr;
|
||||||
|
}
|
||||||
|
|
||||||
static struct acpi_rsdp *acpi_valid_rsdp(struct acpi_rsdp *rsdp)
|
static struct acpi_rsdp *acpi_valid_rsdp(struct acpi_rsdp *rsdp)
|
||||||
{
|
{
|
||||||
if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0)
|
if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0)
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <asm/acpi_table.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
#include <asm/zimage.h>
|
#include <asm/zimage.h>
|
||||||
@ -246,14 +247,20 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
|
|||||||
hdr->setup_move_size = 0x9100;
|
hdr->setup_move_size = 0x9100;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_INTEL_MID)
|
|
||||||
hdr->hardware_subarch = X86_SUBARCH_INTEL_MID;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* build command line at COMMAND_LINE_OFFSET */
|
/* build command line at COMMAND_LINE_OFFSET */
|
||||||
build_command_line(cmd_line, auto_boot);
|
build_command_line(cmd_line, auto_boot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_INTEL_MID
|
||||||
|
if (bootproto >= 0x0207)
|
||||||
|
hdr->hardware_subarch = X86_SUBARCH_INTEL_MID;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_GENERATE_ACPI_TABLE
|
||||||
|
if (bootproto >= 0x020e)
|
||||||
|
hdr->acpi_rsdp_addr = acpi_get_rsdp_addr();
|
||||||
|
#endif
|
||||||
|
|
||||||
setup_video(&setup_base->screen_info);
|
setup_video(&setup_base->screen_info);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -31,7 +31,6 @@ config TARGET_CHROMEBOOK_LINK64
|
|||||||
|
|
||||||
config TARGET_CHROMEBOX_PANTHER
|
config TARGET_CHROMEBOX_PANTHER
|
||||||
bool "Chromebox panther (not available)"
|
bool "Chromebox panther (not available)"
|
||||||
select n
|
|
||||||
help
|
help
|
||||||
Note: At present this must be used with coreboot. See README.x86
|
Note: At present this must be used with coreboot. See README.x86
|
||||||
for instructions.
|
for instructions.
|
||||||
|
@ -377,6 +377,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
|
|
||||||
print_bi_dram(bd);
|
print_bi_dram(bd);
|
||||||
|
|
||||||
|
print_num("relocaddr", gd->relocaddr);
|
||||||
|
print_num("reloc off", gd->reloc_off);
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
print_eth_ip_addr();
|
print_eth_ip_addr();
|
||||||
print_mhz("ethspeed", bd->bi_ethspeed);
|
print_mhz("ethspeed", bd->bi_ethspeed);
|
||||||
|
@ -222,6 +222,14 @@ out:
|
|||||||
free(table_loader);
|
free(table_loader);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ulong acpi_get_rsdp_addr(void)
|
||||||
|
{
|
||||||
|
struct fw_file *file;
|
||||||
|
|
||||||
|
file = qemu_fwcfg_find_file("etc/acpi/rsdp");
|
||||||
|
return file->addr;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Read configuration item using fw_cfg PIO interface */
|
/* Read configuration item using fw_cfg PIO interface */
|
||||||
|
@ -62,8 +62,10 @@
|
|||||||
* Command line configuration.
|
* Command line configuration.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_BOOTCOMMAND
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
"ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
|
"ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_KGDB)
|
#if defined(CONFIG_CMD_KGDB)
|
||||||
#define CONFIG_KGDB_BAUDRATE 115200
|
#define CONFIG_KGDB_BAUDRATE 115200
|
||||||
|
Reference in New Issue
Block a user