]> git.sur5r.net Git - u-boot/log
u-boot
8 years agox86: acpi: Remove header length check when writing tables
Bin Meng [Wed, 11 May 2016 14:45:05 +0000 (07:45 -0700)]
x86: acpi: Remove header length check when writing tables

Before moving 'current' pointer during ACPI table writing, we always
check the table length to see if it is larger than the table header.
Since our purpose is to generate valid tables, the check logic is
always true, which can be avoided.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Remove the unnecessary checksum calculation of DSDT
Bin Meng [Wed, 11 May 2016 14:45:04 +0000 (07:45 -0700)]
x86: acpi: Remove the unnecessary checksum calculation of DSDT

The generated AmlCode[] from IASL already has the calculated DSDT
table checksum in place. No need for us to calculate it again.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Switch to ACPI mode by ourselves instead of requested by OSPM
Bin Meng [Wed, 11 May 2016 14:45:03 +0000 (07:45 -0700)]
x86: acpi: Switch to ACPI mode by ourselves instead of requested by OSPM

Per ACPI spec, during ACPI OS initialization, OSPM can determine
that the ACPI hardware registers are owned by SMI (by way of the
SCI_EN bit in the PM1_CNT register), in which case the ACPI OS
issues the ACPI_ENABLE command to the SMI_CMD port. The SCI_EN bit
effectively tracks the ownership of the ACPI hardware registers.

However since U-Boot does not support SMI, we report all 3 fields
in FADT (SMI_CMD, ACPI_ENABLE, ACPI_DISABLE) as zero, by following
the spec who says: these fields are reserved and must be zero on
system that does not support System Management mode.

U-Boot seems to behave in a correct way that the ACPI spec allows,
at least Linux does not complain, but apparently Windows does not
think so. During Windows bring up debugging, it is observed that
even these 3 fields are zero, Windows are still trying to issue SMI
with hardcoded SMI port address and commands, and expecting SCI_EN
to be changed by the firmware. Eventually Windows gives us a BSOD
(Blue Screen of Death) saying ACPI_BIOS_ERROR and refuses to start.

To fix this, turn on the SCI_EN bit by ourselves. With this patch,
now U-Boot can install and boot Windows 8.1/10 successfully with
the help of SeaBIOS using legacy interface (non-UEFI mode).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Use high_table_malloc() for tables passing to SeaBIOS
Bin Meng [Wed, 11 May 2016 14:45:02 +0000 (07:45 -0700)]
x86: Use high_table_malloc() for tables passing to SeaBIOS

Now that we already reserved high memory for configuration tables,
call high_table_malloc() to allocate tables from the region.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Reserve configuration tables in high memory
Bin Meng [Wed, 11 May 2016 14:45:01 +0000 (07:45 -0700)]
x86: Reserve configuration tables in high memory

When SeaBIOS is on, reserve configuration tables in reserve_arch().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Unify reserve_arch() for all x86 boards
Bin Meng [Wed, 11 May 2016 14:45:00 +0000 (07:45 -0700)]
x86: Unify reserve_arch() for all x86 boards

Instead of asking each platform to provide reserve_arch(),
supply it in arch/x86/cpu/cpu.c in a unified way.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Prepare configuration tables in dedicated high memory region
Bin Meng [Wed, 11 May 2016 14:44:59 +0000 (07:44 -0700)]
x86: Prepare configuration tables in dedicated high memory region

Currently when CONFIG_SEABIOS is on, U-Boot allocates configuration
tables via normal malloc(). To simplify, use a dedicated memory
region which is reserved on the stack before relocation for this
purpose. Add functions for reserve and malloc.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Compile coreboot_table.c only for SeaBIOS
Bin Meng [Wed, 11 May 2016 14:44:58 +0000 (07:44 -0700)]
x86: Compile coreboot_table.c only for SeaBIOS

coreboot_table.c only needs to be built when SeaBIOS is used.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Fix up PIRQ routing table checksum earlier
Bin Meng [Wed, 11 May 2016 14:44:57 +0000 (07:44 -0700)]
x86: Fix up PIRQ routing table checksum earlier

PIRQ routing table checksum is fixed up in copy_pirq_routing_table(),
which is fine if we only write the configuration table once. But with
the SeaBIOS case, when we write the table for the second time, the
checksum will be fixed up to zero per the checksum algorithm, which
is caused by the checksum field not being zero before fix up, since
the checksum has already been calculated in the first run.

To fix this, move the checksum fixup to create_pirq_routing_table(),
so that copy_pirq_routing_table() only does what its function name
suggests: copy the table to somewhere else.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Call board_final_cleanup() in last_stage_init()
Bin Meng [Wed, 11 May 2016 14:44:56 +0000 (07:44 -0700)]
x86: Call board_final_cleanup() in last_stage_init()

At present board_final_cleanup() is called before booting a Linux
kernel. This actually needs to be done before booting anything,
like SeaBIOS, VxWorks or Windows.

Move the call to last_stage_init() instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: minnowmax: Adjust U-Boot environment address in SPI flash
Bin Meng [Wed, 11 May 2016 14:44:55 +0000 (07:44 -0700)]
x86: minnowmax: Adjust U-Boot environment address in SPI flash

Currently U-Boot environment address is at offset 0x7fe00 of a 8MB
SPI flash. When creating a partial u-boot.rom image without flash
descriptor and ME firmware, U-Boot actually occupies the last 1MB
of the flash, and reprograming U-Boot causes previous environment
settings get lost which is not convenient during testing.

Adjust the environment address to 0x6ef000 instead (before the MRC
cache data region in the flash).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoconfig: sandbox: enable qfw and cmd_qfw for testing
Miao Yan [Mon, 23 May 2016 02:37:22 +0000 (19:37 -0700)]
config: sandbox: enable qfw and cmd_qfw for testing

This patch enables qfw and cmd_qfw on sandbox for build coverage test

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: rename qemu/acpi_table.c
Miao Yan [Mon, 23 May 2016 02:37:21 +0000 (19:37 -0700)]
x86: qemu: rename qemu/acpi_table.c

Rename qemu/acpi_table.c to qemu/e820.c, because ACPI stuff is moved
to qfw core, this file only contains code for installing e820 table.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: bring ACPI generation code into qfw core
Miao Yan [Mon, 23 May 2016 02:37:20 +0000 (19:37 -0700)]
cmd: qfw: bring ACPI generation code into qfw core

Loading ACPI table from QEMU's fw_cfg interface is not x86 specific
(ARM64 may also make use of it). So move the code to common place.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: do not depend on x86
Miao Yan [Mon, 23 May 2016 02:37:19 +0000 (19:37 -0700)]
cmd: qfw: do not depend on x86

The qfw command interface used to depend on X86, this patch removes
this restriction so it can be built for sandbox for testing. For normal
usage, it can only be used with CONFIG_QEMU.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: do not require default macros when building qfw command
Miao Yan [Mon, 23 May 2016 02:37:18 +0000 (19:37 -0700)]
cmd: qfw: do not require default macros when building qfw command

The qfw command interface makes use of CONFIG_LOADADDR and
CONFIG_RAMDISKADDR to setup kernel. But not all boards have these macros,
which causes build problem on those platforms.

This patch fixes this issue.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]
Miao Yan [Mon, 23 May 2016 02:37:17 +0000 (19:37 -0700)]
cmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]

Make file names consistent with CONFIG_QFW and CONFIG_CMD_QFW

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: add comment about qfw register endianness
Miao Yan [Mon, 23 May 2016 02:37:16 +0000 (19:37 -0700)]
x86: qemu: add comment about qfw register endianness

This patch adds some comments about qfw register endianness for clarity.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: move x86 specific operations out of qfw core
Miao Yan [Mon, 23 May 2016 02:37:15 +0000 (19:37 -0700)]
x86: qemu: move x86 specific operations out of qfw core

The original implementation of qfw includes several x86 specific
operations, like directly calling outb/inb and using some inline
assembly code which prevents it being ported to other architectures.

This patch adds callback functions and moves those to arch/x86/

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: split qfw command interface and qfw core
Miao Yan [Mon, 23 May 2016 02:37:14 +0000 (19:37 -0700)]
x86: qemu: split qfw command interface and qfw core

This patch splits qfw command interface and qfw core function into two
files, and introduces a new Kconfig option (CONFIG_QFW) for qfw core.

Now when qfw command interface is enabled, it will automatically select
qfw core. This patch also makes the ACPI table generation select
CONFIG_QFW.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: make fwcfg_present and fwcfg_dma_present public
Miao Yan [Mon, 23 May 2016 02:37:13 +0000 (19:37 -0700)]
cmd: qfw: make fwcfg_present and fwcfg_dma_present public

This patch is part of the qfw refactor work. This patch makes
qemu_fwcfg_present() and qemu_fwcfg_dma_present() public functions.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: remove qemu_fwcfg_free_files()
Miao Yan [Mon, 23 May 2016 02:37:12 +0000 (19:37 -0700)]
cmd: qfw: remove qemu_fwcfg_free_files()

This patch is part of the qfw refactor work.

The qemu_fwcfg_free_files() function is only used in error handling in
ACPI table generation, let's not make this a core function and move it
to the right place.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocmd: qfw: add API to iterate firmware list
Miao Yan [Mon, 23 May 2016 02:37:11 +0000 (19:37 -0700)]
cmd: qfw: add API to iterate firmware list

This patch is part of the refactor work of qfw. It adds 3 APIs to qfw
core to iterate firmware list.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: fix ACPI Kconfig options
Miao Yan [Mon, 23 May 2016 02:37:10 +0000 (19:37 -0700)]
x86: qemu: fix ACPI Kconfig options

CONFIG_GENENRATE_ACPI_TABLE controls the generation of ACPI table which
uses U-Boot's built-in methods and CONFIG_QEMU_ACPI_TABLE controls whether
to load ACPI table from QEMU's fw_cfg interface.

But with commit "697ec431469ce0a4c2fc2c02d8685d907491af84 x86: qemu: Drop
our own ACPI implementation", there is only one way to support ACPI table
for QEMU targets which is the fw_cfg interface. Having two Kconfig options
for this purpose is not necessary any more, so this patch consolidates
the two.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: Move qfw command over to cmd and add Kconfig entry
Tom Rini [Fri, 6 May 2016 14:40:22 +0000 (10:40 -0400)]
x86: qemu: Move qfw command over to cmd and add Kconfig entry

- Move the command portion of arch/x86/cpu/qemu/fw_cfg.c into
  cmd/qemu_fw_cfg.c
- Move arch/x86/include/asm/fw_cfg.h to include/qemu_fw_cfg.h
- Rename ACPI table portion to arch/x86/cpu/qemu/acpi_table.c

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: doc: Document ACPI support
Bin Meng [Sat, 7 May 2016 14:46:37 +0000 (07:46 -0700)]
x86: doc: Document ACPI support

Remove ACPI from the TODO list and add a new section to document
current ACPI support in U-Boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: doc: Minor update for accuracy
Bin Meng [Sat, 7 May 2016 14:46:36 +0000 (07:46 -0700)]
x86: doc: Minor update for accuracy

This updates the doc for the following places:
- Mention CRB for Bayley Bay
- Mention Congatec QEVAL 2.0 & conga-QA3/E3845
- Limit part of the QEMU paragraphs to 80 cols
- Correct some typos (drive, it's, Ubuntu)
- Add description for "console=ttyS0,115200"
- Remove CONFIG_BOOTDELAY description which is already
  in x86-common.h

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Remove acpi=off boot parameter when ACPI is on
Bin Meng [Sat, 7 May 2016 14:46:35 +0000 (07:46 -0700)]
x86: Remove acpi=off boot parameter when ACPI is on

Remove the kernel boot parameter acpi=off so that kernel can turn on
ACPI support.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Add .gitignore for ACPI enabled boards
Bin Meng [Sat, 7 May 2016 14:46:34 +0000 (07:46 -0700)]
x86: baytrail: Add .gitignore for ACPI enabled boards

Let git ignore dsdt.aml, dsdt.asl.tmp and dsdt.c files.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Enable ACPI table generation for all boards
Bin Meng [Sat, 7 May 2016 14:46:33 +0000 (07:46 -0700)]
x86: baytrail: Enable ACPI table generation for all boards

Enable ACPI table generation by creating a DSDT table for all baytrail
boards: conga-qeval20-qa3-e3845, bayleybay and minnowmax.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Generate ACPI FADT/MADT tables
Bin Meng [Sat, 7 May 2016 14:46:32 +0000 (07:46 -0700)]
x86: baytrail: Generate ACPI FADT/MADT tables

FADT/MADT tables are platform specific. Generate them for BayTrail.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Add platform ASL files
Bin Meng [Sat, 7 May 2016 14:46:31 +0000 (07:46 -0700)]
x86: baytrail: Add platform ASL files

This adds basic BayTrail platform ASL files. They are intended to be
included in dsdt.asl of any board that is based on this platform.

Note: ACPI mode support for GPIO/LPSS/SCC/LPE are not supported for
now. They will be added in the future.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Return table length in acpi_create_madt_lapics()
Bin Meng [Sat, 7 May 2016 14:46:30 +0000 (07:46 -0700)]
x86: acpi: Return table length in acpi_create_madt_lapics()

Like other MADT table write routines, make acpi_create_madt_lapics()
return how many bytes it has written instead of the table end addr.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Add some generic ASL libraries
Bin Meng [Sat, 7 May 2016 14:46:29 +0000 (07:46 -0700)]
x86: acpi: Add some generic ASL libraries

This adds several generic ASL libraries that can be included by
other ASL files, which are:

- debug.asl: for debug output using POST I/O port and legacy serial port
- globutil.asl: for string compare routines
- statdef.asl: for _STA status values

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Clean up table header revisions
Bin Meng [Sat, 7 May 2016 14:46:28 +0000 (07:46 -0700)]
x86: acpi: Clean up table header revisions

The comment of initializing table header revision says:

    /* ACPI 1.0/2.0: 1, ACPI 3.0: 2, ACPI 4.0: 3 */

which might mislead it may increase per ACPI spec revision.
However this is not the case. It's actually a fixed number
as defined in ACPI spec, and in the laest ACPI spec 6.1,
some table header revisions are still 1. Clean these up.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Align FACS table to a 64 byte boundary
Bin Meng [Sat, 7 May 2016 14:46:27 +0000 (07:46 -0700)]
x86: acpi: Align FACS table to a 64 byte boundary

Per ACPI spec, the FACS table address must be aligned to a 64 byte
boundary (Windows checks this, but Linux does not).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Use u32 in table write routines
Bin Meng [Sat, 7 May 2016 14:46:26 +0000 (07:46 -0700)]
x86: acpi: Use u32 in table write routines

Use u32 instead of unsigned long in the table write routines, as
other routines do.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Adjust order in acpi_table.c
Bin Meng [Sat, 7 May 2016 14:46:25 +0000 (07:46 -0700)]
x86: acpi: Adjust order in acpi_table.c

Rearrange the routine order a little bit, to follow the order
in which ACPI table is defined in acpi_table.h.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Change fill_header()
Bin Meng [Sat, 7 May 2016 14:46:24 +0000 (07:46 -0700)]
x86: acpi: Change fill_header()

Rename fill_header() to acpi_fill_header() for consistency.
Change its signature to remove the 'length' parameter and
make it a public API.

Also remove the unnecessary include files, and improve the
AmlCode[] comment a little bit.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Remove acpi_create_ssdt_generator()
Bin Meng [Sat, 7 May 2016 14:46:23 +0000 (07:46 -0700)]
x86: acpi: Remove acpi_create_ssdt_generator()

This acpi_create_ssdt_generator() currently does nothing.
Remove this for now.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Reorder code in acpi_table.h
Bin Meng [Sat, 7 May 2016 14:46:22 +0000 (07:46 -0700)]
x86: acpi: Reorder code in acpi_table.h

Reorder the ACPI tables appearance by following the order:
RSDP, RSDT, XSDT, FADT, FACS, MADT, MCFG. And adjust the
table flag defines accordingly.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Various changes to acpi_table.h
Bin Meng [Sat, 7 May 2016 14:46:21 +0000 (07:46 -0700)]
x86: acpi: Various changes to acpi_table.h

- Use "U-BOOT" and "U-BOOTBL" for the OEM ID and OEM table ID.
- Do not typedef acpi_header_t, instead use struct acpi_table_hader.
- Use a shorter name aslc_id and aslc-revision.
- Change MCFG base address to use 32-bit value pairs (_l and _h).
- Apply ACPI_APIC_ prefix to MADT APIC type macros and make
  their names to be more readable.
- Apply __packed to struct acpi_madt_irqoverride and struct
  acpi_madt_lapic_nmi tables, as they are not naturally aligned
  by the compiler which leads to wrong sizeof(struct).
- Rename model to res1 as it is reserved after ACPI spec 1.0.
- Apply ACPI_ prefix to the PM profile macros and change them
  to enum.
- Add ospm_flags to FACS structure which is defined since ACPI 4.0.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Remove unused codes
Bin Meng [Sat, 7 May 2016 14:46:20 +0000 (07:46 -0700)]
x86: acpi: Remove unused codes

- Remove #include <> header files.
- Remove APM_CNT register defines, which should not be here as
  they are SMI related.
- Remove MP_IRQ_ defines as they are duplicates of the same ones
  in asm/mpspec.h.
- Remove ACTL register defines, which should not be here as they
  are chipset specific.
- Remove functional fixed hardware defines, which are not used.
- Remove dev_scope related defines, which are not used.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoacpi: Output all errors/warnings/remarks when compiling ASL
Bin Meng [Sat, 7 May 2016 14:46:19 +0000 (07:46 -0700)]
acpi: Output all errors/warnings/remarks when compiling ASL

Remove -va option when invoking IASL compiler so that we can see
errors/warnings/remarks in the build log.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoacpi: Specify U-Boot include path for ASL files
Bin Meng [Sat, 7 May 2016 14:46:18 +0000 (07:46 -0700)]
acpi: Specify U-Boot include path for ASL files

It will be much easier if we split the whole dsdt.asl file into
multiple smaller ASL parts and have access to U-Boot include files.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoacpi: Explicitly spell out dsdt.c in the make rule
Bin Meng [Sat, 7 May 2016 14:46:17 +0000 (07:46 -0700)]
acpi: Explicitly spell out dsdt.c in the make rule

Currently the make rule for dsdt.c uses a wildcard, as below:

  $(obj)/%.c:    $(src)/%.asl

To avoid any side effect, explicitly mention dsdt.c as this is
the file we intend to use for ACPI DSDT AML generation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoacpi: Change build log for ASL files
Bin Meng [Sat, 7 May 2016 14:46:16 +0000 (07:46 -0700)]
acpi: Change build log for ASL files

Currently when compiling U-Boot with ASL file, the build log says:

  ASL     board/intel/bayleybay/dsdt.c

This looks odd as ASL compiler's input is ASL file, not C file.
Change the make rule to use $< instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: dts: Update to include ACTL register details
Bin Meng [Sat, 7 May 2016 14:46:15 +0000 (07:46 -0700)]
x86: dts: Update to include ACTL register details

This updates all x86 boards that currently have IRQ router in the
dts files to include ACTL register details.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: irq: Enable SCI on IRQ9
Bin Meng [Sat, 7 May 2016 14:46:14 +0000 (07:46 -0700)]
x86: irq: Enable SCI on IRQ9

By default SCI is disabled after power on. ACTL is the register to
enable SCI and route it to PIC/APIC. To support both ACPI in PIC
mode and APIC mode, configure SCI to use IRQ9.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
8 years agox86: irq: Reserve IRQ9 for ACPI in PIC mode
Bin Meng [Sat, 7 May 2016 14:46:13 +0000 (07:46 -0700)]
x86: irq: Reserve IRQ9 for ACPI in PIC mode

Reserve IRQ9 which is to be used as SCI interrupt number
for ACPI in PIC mode.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Fix compiler warnings in write_acpi_tables()
Bin Meng [Sat, 7 May 2016 14:46:12 +0000 (07:46 -0700)]
x86: acpi: Fix compiler warnings in write_acpi_tables()

Fix the following two build warnings in function 'write_acpi_tables':

  warning: format '%lx' expects argument of type 'long unsigned int',
  but argument 2 has type 'u32' [-Wformat=]

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Fix build warning in tables.c when CONFIG_SEABIOS
Bin Meng [Sat, 7 May 2016 14:46:11 +0000 (07:46 -0700)]
x86: Fix build warning in tables.c when CONFIG_SEABIOS

The following build warning is seen in tables.c:

  warning: implicit declaration of function 'memalign'

Add the missing header file to fix it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Drop asm/acpi.h
Bin Meng [Sat, 7 May 2016 14:46:10 +0000 (07:46 -0700)]
x86: Drop asm/acpi.h

Remove asm/acpi.h which is never used.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agopico-imx6ul: Select CONFIG_HUSH_PARSER option
Fabio Estevam [Tue, 17 May 2016 13:51:44 +0000 (10:51 -0300)]
pico-imx6ul: Select CONFIG_HUSH_PARSER option

Select CONFIG_HUSH_PARSER option in order to fix the following
problem:

Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
Unknown command 'fi' - try 'help'

Reported-by: Daiane Angolini <daiane.angolini@nxp.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Daiane Angolini <daiane.angolini@nxp.com>
8 years agoeeprom: merge cmdline parsing of eeprom commands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:13 +0000 (17:55 +0300)]
eeprom: merge cmdline parsing of eeprom commands

Merge the parsing of layout aware and layout unaware eeprom commands into
one parsing function. With this change, layout aware commands now follow
the eeprom read and eeprom write conventions of making i2c bus and i2c address
parameters optional.

Cc: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoeeprom: use eeprom_execute_command for all eeprom functions
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:12 +0000 (17:55 +0300)]
eeprom: use eeprom_execute_command for all eeprom functions

Update eeprom_execute_command() and related code to accommodate both layout
aware and layout unaware functions.

No functional changes.

Cc: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
[trini: Make eeprom_execute_command have ulong for i2c_addr]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agomalta: Support MIPS32r6 configurations
Paul Burton [Mon, 16 May 2016 09:52:14 +0000 (10:52 +0100)]
malta: Support MIPS32r6 configurations

Both real Malta boards & QEMU's Malta emulation can feature MIPS32r6
CPUs. Allow building U-Boot for such systems by selecting
CONFIG_SUPPORTS_CPU_MIPS32_R6 for Malta.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
8 years agomalta: Remove ".set mips32" directive
Paul Burton [Mon, 16 May 2016 09:52:13 +0000 (10:52 +0100)]
malta: Remove ".set mips32" directive

We always build for a mips32 or higher ISA, so this ".set mips32"
directive is redundant. Once MIPSr6 support is added it will become
harmful since some instruction encodings change & this directive will
cause the older encodings to be incorrectly emitted instead of the
appropriate ones for the build.

In preparation for supporting MIPSr6, remove this redundant directive.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
8 years agoMIPS: Support for targetting MIPSr6
Paul Burton [Mon, 16 May 2016 09:52:12 +0000 (10:52 +0100)]
MIPS: Support for targetting MIPSr6

Add support for targetting MIPS32r6 & MIPS64r6 systems, in the same way
that we currently select release 1 or release 2 targets. MIPSr6 is not
entirely backwards compatible with earlier releases of the architecture.
Some instructions are encoded differently, some are removed, some are
reused, so it is not practical to run U-Boot built for earlier revisions
on a MIPSr6 system. Update their Kconfig help text to reflect that.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
8 years agoMIPS: Simplify CONFIG_SYS_CPU values
Paul Burton [Mon, 16 May 2016 09:52:11 +0000 (10:52 +0100)]
MIPS: Simplify CONFIG_SYS_CPU values

Rather than having the values for CONFIG_SYS_CPU depend upon each
architecture revision, have them depend upon the more general
CONFIG_CPU_MIPS32 & CONFIG_CPU_MIPS64 which in turn depend upon the
architecture revisions.

This is done in preparation for adding MIPSr6 support, which would
otherwise need to introduce new cases here.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
8 years agoMIPS: Use unchecked immediate addition/subtraction
Paul Burton [Mon, 16 May 2016 09:52:10 +0000 (10:52 +0100)]
MIPS: Use unchecked immediate addition/subtraction

In MIPS assembly there have historically been 2 variants of immediate
addition - the standard "addi" which traps if an overflow occurs, and
the unchecked "addiu" which does not trap on overflow. In release 6 of
the MIPS architecture the trapping variants of immediate addition &
subtraction have been removed. In preparation for supporting MIPSr6,
stop using the trapping instructions from assembly & switch to their
unchecked variants.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
8 years agomips: ath79: Add support for TPLink WDR4300
Marek Vasut [Fri, 6 May 2016 18:10:41 +0000 (20:10 +0200)]
mips: ath79: Add support for TPLink WDR4300

Add support for the TPLink WDR4300 router, which is based on the
AR9344 MIPS 74Kc CPU and has 128 MiB of RAM. The USB is supported
on this system as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: Add AR934x support
Marek Vasut [Fri, 6 May 2016 18:10:40 +0000 (20:10 +0200)]
mips: ath79: Add AR934x support

Add support for the Atheros AR934x WiSoCs. This patchs adds complete
system init, including PLL and DRAM init, both of which happen from
full C environment, since the AR934x has proper SRAM.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: Add support for ungating ethernet on ar933x and ar934x
Marek Vasut [Fri, 6 May 2016 18:10:39 +0000 (20:10 +0200)]
mips: ath79: Add support for ungating ethernet on ar933x and ar934x

Add code to ungate the ethernet controller on ar933x and ar934x .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: dts: Add ethernet MAC nodes for ar933x
Marek Vasut [Fri, 6 May 2016 18:10:38 +0000 (20:10 +0200)]
mips: ath79: dts: Add ethernet MAC nodes for ar933x

Add node for both ethernet controllers in the ar933x.
The PHY is attached only to the first ethernet controller.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: Add support for ungating USB on ar933x and ar934x
Marek Vasut [Fri, 6 May 2016 18:10:37 +0000 (20:10 +0200)]
mips: ath79: Add support for ungating USB on ar933x and ar934x

Add code to ungate the USB controller on ar933x and ar934x .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: dts: Add generic-ehci node
Marek Vasut [Fri, 6 May 2016 18:10:36 +0000 (20:10 +0200)]
mips: ath79: dts: Add generic-ehci node

Add generic EHCI node for the ChipIdea EHCI controller in the ath79.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: Fix compiler warning on const assignment
Marek Vasut [Fri, 6 May 2016 18:10:35 +0000 (20:10 +0200)]
mips: ath79: Fix compiler warning on const assignment

The assignment const T var; var = value; is illegal, since var is
constant. Drop the const to fix the compiler warning.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: Fix ar71xx_regs.h indent
Marek Vasut [Fri, 6 May 2016 18:10:34 +0000 (20:10 +0200)]
mips: ath79: Fix ar71xx_regs.h indent

The indent in this file triggers my OCD, so fix it. Replace multiple
spaces with tabs and align the values in one column.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
8 years agomips: Add MIPS 74Kc tune
Marek Vasut [Fri, 6 May 2016 18:10:33 +0000 (20:10 +0200)]
mips: Add MIPS 74Kc tune

Add MIPS 74Kc tune Kconfig option.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Wills Wang <wills.wang@live.com>
[added missing tune-y entry in arch/mips/Makefile]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomips: Fix compiler warning in cpu.c
Marek Vasut [Thu, 5 May 2016 18:14:00 +0000 (20:14 +0200)]
mips: Fix compiler warning in cpu.c

There really is zero reason for including netdev.h in generic mips CPU code.
Removing the netdev.h from cpu.c also fixes the following compiler warning:

In file included from arch/mips/cpu/cpu.c:10:0:
include/netdev.h:204:41: warning: 'struct eth_device' declared inside parameter list [enabled by default]
 int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int));
                                         ^
include/netdev.h:204:41: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoath79: add readonly attribute for ath79_soc_desc
Wills Wang [Tue, 12 Apr 2016 10:24:10 +0000 (18:24 +0800)]
ath79: add readonly attribute for ath79_soc_desc

use 'const' keywork to qualify readonly attribute for lookup-table member

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agoath79: ar933x: use BIT macro for bit shift operation
Wills Wang [Tue, 12 Apr 2016 03:09:20 +0000 (11:09 +0800)]
ath79: ar933x: use BIT macro for bit shift operation

used a uniform BIT macro for register bit-field shift

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agoar933x: serial: Remove the explicit pinctrl setting
Wills Wang [Tue, 12 Apr 2016 03:09:19 +0000 (11:09 +0800)]
ar933x: serial: Remove the explicit pinctrl setting

The correct pinctrl is handled automatically so we don't need to do it in
the driver.

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agoath79: spi: Remove the explicit pinctrl setting
Wills Wang [Tue, 12 Apr 2016 03:09:18 +0000 (11:09 +0800)]
ath79: spi: Remove the explicit pinctrl setting

The correct pinctrl is handled automatically so we don't need to do it in
the driver.

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agomips: Report reloc information in bdinfo
Tim Chick [Thu, 31 Mar 2016 11:51:20 +0000 (12:51 +0100)]
mips: Report reloc information in bdinfo

Signed-off-by: Tim Chick <tim.chick@mediatek.com>
8 years agodrivers: mtd: add Microchip PIC32 internal non-CFI flash driver.
Purna Chandra Mandal [Fri, 18 Mar 2016 13:06:08 +0000 (18:36 +0530)]
drivers: mtd: add Microchip PIC32 internal non-CFI flash driver.

PIC32 internal flash devices are parallel NOR flash divided into
number of banks to allow erase-programming in one while fetch and
execution continues on other. As the flash banks are memory mapped
stored code can be executed directly from flash (XIP), also there
is additional hardware logic to prefetch and cache contents to
improve execution performance. These flash can also be used to
store user data (like environment).
Flash erase and programming are handled by on-chip NVM controller.

Driver implemented driver model but MTD is not really support.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoflash: add device ID for Microchip PIC32 internal flash.
Purna Chandra Mandal [Fri, 18 Mar 2016 13:06:07 +0000 (18:36 +0530)]
flash: add device ID for Microchip PIC32 internal flash.

Microchip PIC32 has internal parallel flash (non-CFI compliant).
These flash devices do not support any identifier command so no
standard IDs. Added unique IDs to seperate these flash devices
from others supported by U-Boot.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
8 years agomips: ath79: add AP143 reference board
Wills Wang [Wed, 16 Mar 2016 09:00:00 +0000 (17:00 +0800)]
mips: ath79: add AP143 reference board

This patch add board-level code and base DT for AP143.

Signed-off-by: Wills Wang <wills.wang@live.com>
[updated defconfig, enabled CONFIG_USE_PRIVATE_LIBGCC=y]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomips: ath79: add AP121 reference board
Wills Wang [Wed, 16 Mar 2016 08:59:59 +0000 (16:59 +0800)]
mips: ath79: add AP121 reference board

This patch add board-level code and base DT for AP121.

Signed-off-by: Wills Wang <wills.wang@live.com>
[updated defconfig, enabled CONFIG_USE_PRIVATE_LIBGCC=y]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agodrivers: spi: add spi support for QCA/Atheros ath79 SOCs
Wills Wang [Wed, 16 Mar 2016 08:59:58 +0000 (16:59 +0800)]
drivers: spi: add spi support for QCA/Atheros ath79 SOCs

This patch add a compatible spi driver for ath79 series SOC.

Signed-off-by: Wills Wang <wills.wang@live.com>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agodrivers: serial: add serial driver for ar933x SOC
Wills Wang [Wed, 16 Mar 2016 08:59:57 +0000 (16:59 +0800)]
drivers: serial: add serial driver for ar933x SOC

This patch add support for ar933x serial.

Signed-off-by: Wills Wang <wills.wang@live.com>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodrivers: pinctrl: Add simple pinctrl driver for Qualcomm/Atheros qca953x.
Wills Wang [Wed, 16 Mar 2016 08:59:56 +0000 (16:59 +0800)]
drivers: pinctrl: Add simple pinctrl driver for Qualcomm/Atheros qca953x.

This is a simple pinctrl driver, it just support uart and spi pin-mux now.

Signed-off-by: Wills Wang <wills.wang@live.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[fixed typo in commit subject line]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agodrivers: pinctrl: Add simple pinctrl driver for Qualcomm/Atheros ar933x.
Wills Wang [Wed, 16 Mar 2016 08:59:55 +0000 (16:59 +0800)]
drivers: pinctrl: Add simple pinctrl driver for Qualcomm/Atheros ar933x.

This is a simple pinctrl driver, it just support uart and spi pin-mux now.

Signed-off-by: Wills Wang <wills.wang@live.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[fixed typo in commit subject line]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomips: ath79: add support for QCA953x SOCs
Wills Wang [Wed, 16 Mar 2016 08:59:54 +0000 (16:59 +0800)]
mips: ath79: add support for QCA953x SOCs

This patch enable work for qca953x SOC.

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agomips: ath79: add support for AR933x SOCs
Wills Wang [Wed, 16 Mar 2016 08:59:53 +0000 (16:59 +0800)]
mips: ath79: add support for AR933x SOCs

This patch enable work for ar933x SOC.

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agomips: add base support for QCA/Atheros ath79 SOCs
Wills Wang [Wed, 16 Mar 2016 08:59:52 +0000 (16:59 +0800)]
mips: add base support for QCA/Atheros ath79 SOCs

This patch add some common code for QCA/Atheros ath79 SOCs such as
DDR tuning, chip reset and CPU detection.

Signed-off-by: Wills Wang <wills.wang@live.com>
8 years agoAdd support for 64-bit MIPS to examples/standalone
Stanislav Galabov [Wed, 17 Feb 2016 13:23:33 +0000 (15:23 +0200)]
Add support for 64-bit MIPS to examples/standalone

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years agoFix FreeBSD loader API so that it works on both 32-bit and 64-bit targets.
Stanislav Galabov [Wed, 17 Feb 2016 13:23:31 +0000 (15:23 +0200)]
Fix FreeBSD loader API so that it works on both 32-bit and 64-bit targets.

Specifically tested on MIPS under QEMU (works with all  combination of bit-ness and endian-ness)

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years agoUse CONFIG_IDE_SWAP_IO when running on big-endian MIPS (32 or 64-bit) in QEMU so...
Stanislav Galabov [Wed, 17 Feb 2016 13:23:30 +0000 (15:23 +0200)]
Use CONFIG_IDE_SWAP_IO when running on big-endian MIPS (32 or 64-bit) in QEMU so that IDE transfers work properly

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years agoProperly calculate ATA_SECTORWORDS, using a fixed-size integer, so it works for both...
Stanislav Galabov [Wed, 17 Feb 2016 13:23:29 +0000 (15:23 +0200)]
Properly calculate ATA_SECTORWORDS, using a fixed-size integer, so it works for both 32-bit and 64-bit targets

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years agoeeprom: refactor i2c bus and devaddr parsing
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:11 +0000 (17:55 +0300)]
eeprom: refactor i2c bus and devaddr parsing

Introduce parse_i2c_bus_addr() to generalize the parsing of i2c bus number and
i2c device address. This is done in preparation for merging layout aware and
layout unaware command parsing into one function.

No functional changes.

Cc: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: cm-t43: add support for eeprom layout comands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:10 +0000 (17:55 +0300)]
arm: cm-t43: add support for eeprom layout comands

Add support for EEPROM and EEPROM layout commands for CM-T43.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: cm-t35: add support for eeprom layout comands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:09 +0000 (17:55 +0300)]
arm: cm-t35: add support for eeprom layout comands

Add support for EEPROM and EEPROM layout commands for CM-T35.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: cm-t3517: add support for eeprom layout comands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:08 +0000 (17:55 +0300)]
arm: cm-t3517: add support for eeprom layout comands

Add support for EEPROM and EEPROM layout commands for CM-T3517.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: cm-t54: add support for eeprom layout comands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:07 +0000 (17:55 +0300)]
arm: cm-t54: add support for eeprom layout comands

Add support for EEPROM and EEPROM layout commands for CM-T54.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: cm-t335: add support for eeprom layout comands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:06 +0000 (17:55 +0300)]
arm: cm-t335: add support for eeprom layout comands

Add support for EEPROM and EEPROM layout commands for CM-T335.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: cm-fx6: add support for eeprom layout comands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:05 +0000 (17:55 +0300)]
arm: cm-fx6: add support for eeprom layout comands

Add support for EEPROM and EEPROM layout commands for CM-FX6.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agocompulab: add support for layout aware eeprom commands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:04 +0000 (17:55 +0300)]
compulab: add support for layout aware eeprom commands

Add layout definitions and implement functions for field printing/updating,
layout detection, layout assignment, and layout parsing.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agocmd: eeprom: add support for layout aware commands
Nikita Kiryanov [Sat, 16 Apr 2016 14:55:03 +0000 (17:55 +0300)]
cmd: eeprom: add support for layout aware commands

Introduce the (optional) eeprom print and eeprom update commands.

These commands are eeprom layout aware:
* The eeprom print command prints the contents of the eeprom in a human
  readable way (eeprom layout fields, and data formatted to be fit for human
  consumption).
* The eeprom update command allows user to update eeprom fields by specifying
  the field name, and providing the new data in a human readable format (same
  format as displayed by the eeprom print command).
* Both commands can either auto detect the layout, or be told which layout to
  use.

New CONFIG options:
CONFIG_CMD_EEPROM_LAYOUT - enables commands.
CONFIG_EEPROM_LAYOUT_HELP_STRING - tells user what layout names are supported

Feature API:
__weak int parse_layout_version(char *str)
- override to provide your own layout name parsing
__weak void __eeprom_layout_assign(struct eeprom_layout *layout, int layout_version);
- override to setup the layout metadata based on the version
__weak int eeprom_layout_detect(unsigned char *data)
- override to provide your own algorithm for detecting layout version
eeprom_field.c
- contains various printing and updating functions for common types of
  eeprom fields. Can be used for defining custom layouts.

Cc: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>