From 0abb0aeeead1058fa750b35d68dc4e4f63c8f0a7 Mon Sep 17 00:00:00 2001
From: Piotr Wilczek
Date: Tue, 21 May 2013 15:39:04 +0200
Subject: [PATCH 01/42] arm:exynos:gpio: fix s5p_gpio_part_max for exynos4x12
This patch fix wrong value returned by 's5p_gpio_part_max' function
for Exynos4412.
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
Signed-off-by: Minkyu Kang
---
arch/arm/include/asm/arch-exynos/gpio.h | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h
index e955811..a1a7439 100644
--- a/arch/arm/include/asm/arch-exynos/gpio.h
+++ b/arch/arm/include/asm/arch-exynos/gpio.h
@@ -290,10 +290,19 @@ static inline unsigned int s5p_gpio_part_max(int nr)
return EXYNOS5_GPIO_PART2_MAX;
} else if (cpu_is_exynos4()) {
- if (nr < EXYNOS4_GPIO_PART1_MAX)
- return 0;
- else
- return EXYNOS4_GPIO_PART1_MAX;
+ if (proid_is_exynos4412()) {
+ if (nr < EXYNOS4X12_GPIO_PART1_MAX)
+ return 0;
+ else if (nr < EXYNOS4X12_GPIO_PART2_MAX)
+ return EXYNOS4X12_GPIO_PART1_MAX;
+ else
+ return EXYNOS4X12_GPIO_PART2_MAX;
+ } else {
+ if (nr < EXYNOS4_GPIO_PART1_MAX)
+ return 0;
+ else
+ return EXYNOS4_GPIO_PART1_MAX;
+ }
}
return 0;
From ad403e71b8d081852efd57842ffb7125ed253bee Mon Sep 17 00:00:00 2001
From: Chander Kashyap
Date: Thu, 25 Jul 2013 18:28:52 +0530
Subject: [PATCH 02/42] CONFIG: EXYNOS5: Replace misnomer SMDK5250 with
EXYNOS5250 and update Makefiles
Update the Makefiles so that all boards can use the same spl generation tool
Signed-off-by: Inderpal Singh
Acked-by: Simon Glass
Signed-off-by: Minkyu Kang
---
Makefile | 2 +-
include/configs/exynos5250-dt.h | 2 +-
tools/Makefile | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 5461a21..488db8a 100644
--- a/Makefile
+++ b/Makefile
@@ -813,7 +813,7 @@ clean:
$(obj)tools/gdb/{astest,gdbcont,gdbsend} \
$(obj)tools/gen_eth_addr $(obj)tools/img2srec \
$(obj)tools/mk{env,}image $(obj)tools/mpc86x_clk \
- $(obj)tools/mk{smdk5250,}spl \
+ $(obj)tools/mk{$(BOARD),}spl \
$(obj)tools/mxsboot \
$(obj)tools/ncb $(obj)tools/ubsha1 \
$(obj)tools/kernel-doc/docproc \
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 2ce5a78..2b93a45 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -13,7 +13,7 @@
#define CONFIG_SAMSUNG /* in a SAMSUNG core */
#define CONFIG_S5P /* S5P Family */
#define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */
-#define CONFIG_SMDK5250 /* which is in a SMDK5250 */
+#define CONFIG_EXYNOS5250
#include /* get chip and board defs */
diff --git a/tools/Makefile b/tools/Makefile
index 33fad6b..b941192 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -52,7 +52,7 @@ BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
BIN_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX)
BIN_FILES-y += mkenvimage$(SFX)
BIN_FILES-y += mkimage$(SFX)
-BIN_FILES-$(CONFIG_SMDK5250) += mksmdk5250spl$(SFX)
+BIN_FILES-$(CONFIG_EXYNOS5250) += mk$(BOARD)spl$(SFX)
BIN_FILES-$(CONFIG_MX23) += mxsboot$(SFX)
BIN_FILES-$(CONFIG_MX28) += mxsboot$(SFX)
BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX)
@@ -87,7 +87,7 @@ NOPED_OBJ_FILES-y += image-host.o
NOPED_OBJ_FILES-y += omapimage.o
NOPED_OBJ_FILES-y += mkenvimage.o
NOPED_OBJ_FILES-y += mkimage.o
-OBJ_FILES-$(CONFIG_SMDK5250) += mkexynosspl.o
+OBJ_FILES-$(CONFIG_EXYNOS5250) += mkexynosspl.o
OBJ_FILES-$(CONFIG_MX23) += mxsboot.o
OBJ_FILES-$(CONFIG_MX28) += mxsboot.o
OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
From 08bcbc4ae7616c9b9a6f76fbcae55e2e807b300b Mon Sep 17 00:00:00 2001
From: Minkyu Kang
Date: Tue, 6 Aug 2013 20:57:03 +0900
Subject: [PATCH 03/42] arm: smdkc100: remove config.mk file
Since config.mk is deprecated, remove this file,
and move CONFIG_SYS_TEXT_BASE define to config file.
Signed-off-by: Minkyu Kang
Cc: Wolfgang Denk
---
board/samsung/smdkc100/config.mk | 16 ----------------
include/configs/smdkc100.h | 3 +++
2 files changed, 3 insertions(+), 16 deletions(-)
delete mode 100644 board/samsung/smdkc100/config.mk
diff --git a/board/samsung/smdkc100/config.mk b/board/samsung/smdkc100/config.mk
deleted file mode 100644
index 3a08bb1..0000000
--- a/board/samsung/smdkc100/config.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2008 # Samsung Elecgtronics
-# Kyungmin Park
-#
-
-# On S5PC100 we use the 128 MiB OneDRAM bank at
-#
-# 0x30000000 to 0x35000000 (80MiB)
-# 0x38000000 to 0x40000000 (128MiB)
-#
-# On S5PC110 we use the 128 MiB OneDRAM bank at
-#
-# 0x30000000 to 0x35000000 (80MiB)
-# 0x40000000 to 0x48000000 (128MiB)
-#
-CONFIG_SYS_TEXT_BASE = 0x34800000
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index a572e62..507a5d3 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -34,6 +34,9 @@
/* DRAM Base */
#define CONFIG_SYS_SDRAM_BASE 0x30000000
+/* Text Base */
+#define CONFIG_SYS_TEXT_BASE 0x34800000
+
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_CMDLINE_TAG
#define CONFIG_INITRD_TAG
From 35bea619779f95fb450b18b1d996c95442807fbc Mon Sep 17 00:00:00 2001
From: Minkyu Kang
Date: Tue, 6 Aug 2013 20:57:53 +0900
Subject: [PATCH 04/42] arm: goni: remove config.mk file
Since config.mk is deprecated, remove this file,
and move CONFIG_SYS_TEXT_BASE define to config file.
Signed-off-by: Minkyu Kang
---
board/samsung/goni/config.mk | 18 ------------------
include/configs/s5p_goni.h | 3 +++
2 files changed, 3 insertions(+), 18 deletions(-)
delete mode 100644 board/samsung/goni/config.mk
diff --git a/board/samsung/goni/config.mk b/board/samsung/goni/config.mk
deleted file mode 100644
index e1cadbc..0000000
--- a/board/samsung/goni/config.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2010 Samsung Electronics
-# Kyungmin Park
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-# On S5PC100 we use the 128 MiB OneDRAM bank at
-#
-# 0x30000000 to 0x35000000 (80MiB)
-# 0x38000000 to 0x40000000 (128MiB)
-#
-# On S5PC110 we use the 128 MiB OneDRAM bank at
-#
-# 0x30000000 to 0x35000000 (80MiB)
-# 0x40000000 to 0x50000000 (256MiB)
-#
-CONFIG_SYS_TEXT_BASE = 0x34800000
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index d0fafd7..c303244 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -29,6 +29,9 @@
/* DRAM Base */
#define CONFIG_SYS_SDRAM_BASE 0x30000000
+/* Text Base */
+#define CONFIG_SYS_TEXT_BASE 0x34800000
+
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_CMDLINE_TAG
#define CONFIG_INITRD_TAG
From a2ac68fb2b35e57cd483e7d6fb30b9d9331acc01 Mon Sep 17 00:00:00 2001
From: Chander Kashyap
Date: Wed, 21 Aug 2013 10:38:56 +0530
Subject: [PATCH 05/42] exynos5250: Add arndale board support
Arndale board is based on samsung's exynos5250 soc.
Signed-off-by: Inderpal Singh
Signed-off-by: Chander Kashyap
Signed-off-by: Minkyu Kang
---
MAINTAINERS | 4 +
board/samsung/arndale/Makefile | 34 +++++
board/samsung/arndale/arndale.c | 87 +++++++++++
board/samsung/arndale/arndale_spl.c | 50 ++++++
board/samsung/dts/exynos5250-arndale.dts | 21 +++
boards.cfg | 1 +
include/configs/arndale.h | 255 +++++++++++++++++++++++++++++++
7 files changed, 452 insertions(+)
create mode 100644 board/samsung/arndale/Makefile
create mode 100644 board/samsung/arndale/arndale.c
create mode 100644 board/samsung/arndale/arndale_spl.c
create mode 100644 board/samsung/dts/exynos5250-arndale.dts
create mode 100644 include/configs/arndale.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 23965a8..9700ec9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -465,6 +465,10 @@ Andre Schwarz
mvblm7 MPC8343
mvsmr MPC5200
+Inderpal Singh
+
+ Arndale ARM ARMV7 (EXYNOS5250 SoC)
+
Jon Smirl
pcm030 MPC5200
diff --git a/board/samsung/arndale/Makefile b/board/samsung/arndale/Makefile
new file mode 100644
index 0000000..afd8db3
--- /dev/null
+++ b/board/samsung/arndale/Makefile
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2013 Samsung Electronics
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).o
+
+COBJS += arndale_spl.o
+
+ifndef CONFIG_SPL_BUILD
+COBJS += arndale.o
+endif
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+ALL := $(obj).depend $(LIB)
+
+all: $(ALL)
+
+$(LIB): $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
new file mode 100644
index 0000000..84d8f19
--- /dev/null
+++ b/board/samsung/arndale/arndale.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include
+#include
+#include
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
+ return 0;
+}
+
+int dram_init(void)
+{
+ int i;
+ u32 addr;
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+ addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
+ gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE);
+ }
+ return 0;
+}
+
+int power_init_board(void)
+{
+ set_ps_hold_ctrl();
+ return 0;
+}
+
+void dram_init_banksize(void)
+{
+ int i;
+ u32 addr, size;
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+ addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
+ size = get_ram_size((long *)addr, SDRAM_BANK_SIZE);
+
+ gd->bd->bi_dram[i].start = addr;
+ gd->bd->bi_dram[i].size = size;
+ }
+}
+
+static int board_uart_init(void)
+{
+ int err = 0, uart_id;
+
+ for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) {
+ err = exynos_pinmux_config(uart_id, PINMUX_FLAG_NONE);
+ if (err) {
+ debug("UART%d not configured\n",
+ (uart_id - PERIPH_ID_UART0));
+ return err;
+ }
+ }
+ return err;
+}
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
+int board_early_init_f(void)
+{
+ int err;
+
+ err = board_uart_init();
+ if (err) {
+ debug("UART init failed\n");
+ return err;
+ }
+ return err;
+}
+#endif
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard(void)
+{
+ printf("\nBoard: Arndale\n");
+
+ return 0;
+}
+#endif
diff --git a/board/samsung/arndale/arndale_spl.c b/board/samsung/arndale/arndale_spl.c
new file mode 100644
index 0000000..2949c08
--- /dev/null
+++ b/board/samsung/arndale/arndale_spl.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2012 The Chromium OS Authors.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include
+#include
+
+#define SIGNATURE 0xdeadbeef
+
+/* Parameters of early board initialization in SPL */
+static struct spl_machine_param machine_param
+ __attribute__((section(".machine_param"))) = {
+ .signature = SIGNATURE,
+ .version = 1,
+ .params = "vmubfasirM",
+ .size = sizeof(machine_param),
+
+ .mem_iv_size = 0x1f,
+ .mem_type = DDR_MODE_DDR3,
+
+ /*
+ * Set uboot_size to 0x100000 bytes.
+ *
+ * This is an overly conservative value chosen to accommodate all
+ * possible U-Boot image. You are advised to set this value to a
+ * smaller realistic size via scripts that modifies the .machine_param
+ * section of output U-Boot image.
+ */
+ .uboot_size = 0x100000,
+
+ .boot_source = BOOT_MODE_OM,
+ .frequency_mhz = 800,
+ .arm_freq_mhz = 1000,
+ .serial_base = 0x12c30000,
+ .i2c_base = 0x12c60000,
+ .mem_manuf = MEM_MANUF_SAMSUNG,
+};
+
+struct spl_machine_param *spl_get_machine_params(void)
+{
+ if (machine_param.signature != SIGNATURE) {
+ /* Will hang if SIGNATURE dont match */
+ while (1)
+ ;
+ }
+
+ return &machine_param;
+}
diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts
new file mode 100644
index 0000000..d3c0527
--- /dev/null
+++ b/board/samsung/dts/exynos5250-arndale.dts
@@ -0,0 +1,21 @@
+/*
+ * SAMSUNG Arndale board device tree source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+*/
+
+/dts-v1/;
+/include/ ARCH_CPU_DTS
+
+/ {
+ model = "SAMSUNG Arndale board based on EXYNOS5250";
+ compatible = "samsung,arndale", "samsung,exynos5250";
+
+ aliases {
+ serial0 = "/serial@12C20000";
+ console = "/serial@12C20000";
+ };
+};
diff --git a/boards.cfg b/boards.cfg
index d7c8d34..598561b 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -323,6 +323,7 @@ omap5_uevm arm armv7 omap5_uevm ti oma
dra7xx_evm arm armv7 dra7xx ti omap5
s5p_goni arm armv7 goni samsung s5pc1xx
smdkc100 arm armv7 smdkc100 samsung s5pc1xx
+arndale arm armv7 arndale samsung exynos
origen arm armv7 origen samsung exynos
s5pc210_universal arm armv7 universal_c210 samsung exynos
snow arm armv7 smdk5250 samsung exynos
diff --git a/include/configs/arndale.h b/include/configs/arndale.h
new file mode 100644
index 0000000..ed44a04
--- /dev/null
+++ b/include/configs/arndale.h
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * Configuration settings for the SAMSUNG Arndale board.
+ */
+
+#ifndef __CONFIG_ARNDALE_H
+#define __CONFIG_ARNDALE_H
+
+/* High Level Configuration Options */
+#define CONFIG_SAMSUNG /* in a SAMSUNG core */
+#define CONFIG_S5P /* S5P Family */
+#define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */
+#define CONFIG_EXYNOS5250
+
+#include /* get chip and board defs */
+
+#define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_ARCH_CPU_INIT
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DISPLAY_BOARDINFO
+
+/* Enable fdt support for Exynos5250 */
+#define CONFIG_ARCH_DEVICE_TREE exynos5250
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_SEPARATE
+
+/* Allow tracing to be enabled */
+#define CONFIG_TRACE
+#define CONFIG_CMD_TRACE
+#define CONFIG_TRACE_BUFFER_SIZE (16 << 20)
+#define CONFIG_TRACE_EARLY_SIZE (8 << 20)
+#define CONFIG_TRACE_EARLY
+#define CONFIG_TRACE_EARLY_ADDR 0x50000000
+
+/* Keep L2 Cache Disabled */
+#define CONFIG_SYS_DCACHE_OFF
+
+#define CONFIG_SYS_SDRAM_BASE 0x40000000
+#define CONFIG_SYS_TEXT_BASE 0x43E00000
+
+/* input clock of PLL: SMDK5250 has 24MHz input clock */
+#define CONFIG_SYS_CLK_FREQ 24000000
+
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_INITRD_TAG
+#define CONFIG_CMDLINE_EDITING
+
+/* Power Down Modes */
+#define S5P_CHECK_SLEEP 0x00000BAD
+#define S5P_CHECK_DIDLE 0xBAD00000
+#define S5P_CHECK_LPA 0xABAD0000
+
+/* Offset for inform registers */
+#define INFORM0_OFFSET 0x800
+#define INFORM1_OFFSET 0x804
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20))
+
+/* select serial console configuration */
+#define CONFIG_BAUDRATE 115200
+#define EXYNOS5_DEFAULT_UART_OFFSET 0x010000
+#define CONFIG_SILENT_CONSOLE
+
+/* Console configuration */
+#define CONFIG_CONSOLE_MUX
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define EXYNOS_DEVICE_SETTINGS \
+ "stdin=serial\0" \
+ "stdout=serial\0" \
+ "stderr=serial\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ EXYNOS_DEVICE_SETTINGS
+
+/* SD/MMC configuration */
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_SDHCI
+#define CONFIG_S5P_SDHCI
+#define CONFIG_DWMMC
+#define CONFIG_EXYNOS_DWMMC
+#define CONFIG_SUPPORT_EMMC_BOOT
+
+
+#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+/* PWM */
+#define CONFIG_PWM
+
+/* allow to overwrite serial and ethaddr */
+#define CONFIG_ENV_OVERWRITE
+
+/* Command definition*/
+#include
+
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_MMC
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_HASH
+
+#define CONFIG_BOOTDELAY 3
+#define CONFIG_ZERO_BOOTDELAY_CHECK
+
+/* USB */
+#define CONFIG_CMD_USB
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_EXYNOS
+#define CONFIG_USB_STORAGE
+
+/* MMC SPL */
+#define CONFIG_SPL
+#define COPY_BL2_FNPTR_ADDR 0x02020030
+
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+
+/* specific .lds file */
+#define CONFIG_SPL_LDSCRIPT "board/samsung/common/exynos-uboot-spl.lds"
+#define CONFIG_SPL_TEXT_BASE 0x02023400
+#define CONFIG_SPL_MAX_FOOTPRINT (14 * 1024)
+
+#define CONFIG_BOOTCOMMAND "mmc read 40007000 451 2000; bootm 40007000"
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_LONGHELP /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT "ARNDALE # "
+#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
+#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
+/* memtest works on */
+#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
+#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5E00000)
+#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000)
+
+#define CONFIG_SYS_HZ 1000
+
+#define CONFIG_RD_LVL
+
+#define CONFIG_NR_DRAM_BANKS 8
+#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
+#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
+#define PHYS_SDRAM_1_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_2 (CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE)
+#define PHYS_SDRAM_2_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_3 (CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_3_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_4 (CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_4_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_5 (CONFIG_SYS_SDRAM_BASE + (4 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_5_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_6 (CONFIG_SYS_SDRAM_BASE + (5 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_6_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_7 (CONFIG_SYS_SDRAM_BASE + (6 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_7_SIZE SDRAM_BANK_SIZE
+#define PHYS_SDRAM_8 (CONFIG_SYS_SDRAM_BASE + (7 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_8_SIZE SDRAM_BANK_SIZE
+
+#define CONFIG_SYS_MONITOR_BASE 0x00000000
+
+/* FLASH and environment organization */
+#define CONFIG_SYS_NO_FLASH
+#undef CONFIG_CMD_IMLS
+#define CONFIG_IDENT_STRING " for ARNDALE"
+
+#define CONFIG_SYS_MMC_ENV_DEV 0
+
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SECURE_BL1_ONLY
+
+/* Secure FW size configuration */
+#ifdef CONFIG_SECURE_BL1_ONLY
+#define CONFIG_SEC_FW_SIZE (8 << 10) /* 8KB */
+#else
+#define CONFIG_SEC_FW_SIZE 0
+#endif
+
+/* Configuration of BL1, BL2, ENV Blocks on mmc */
+#define CONFIG_RES_BLOCK_SIZE (512)
+#define CONFIG_BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
+#define CONFIG_BL2_SIZE (512UL << 10UL) /* 512 KB */
+#define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
+
+#define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
+#define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE)
+#define CONFIG_ENV_OFFSET (CONFIG_BL2_OFFSET + CONFIG_BL2_SIZE)
+
+/* U-boot copy size from boot Media to DRAM.*/
+#define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512)
+#define BL2_SIZE_BLOC_COUNT (CONFIG_BL2_SIZE/512)
+
+#define CONFIG_SPI_BOOTING
+#define EXYNOS_COPY_SPI_FNPTR_ADDR 0x02020058
+#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
+
+#define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION
+#define CONFIG_CMD_PART
+#define CONFIG_PARTITION_UUIDS
+
+
+#define CONFIG_IRAM_STACK 0x02050000
+
+#define CONFIG_SYS_INIT_SP_ADDR CONFIG_IRAM_STACK
+
+/* I2C */
+#define CONFIG_SYS_I2C_INIT_BOARD
+#define CONFIG_HARD_I2C
+#define CONFIG_CMD_I2C
+#define CONFIG_SYS_I2C_SPEED 100000 /* 100 Kbps */
+#define CONFIG_DRIVER_S3C24X0_I2C
+#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_MAX_I2C_NUM 8
+#define CONFIG_SYS_I2C_SLAVE 0x0
+#define CONFIG_I2C_EDID
+
+/* PMIC */
+#define CONFIG_PMIC
+#define CONFIG_PMIC_I2C
+#define CONFIG_PMIC_MAX77686
+
+#define CONFIG_DEFAULT_DEVICE_TREE exynos5250-arndale
+
+/* Ethernet Controllor Driver */
+#ifdef CONFIG_CMD_NET
+#define CONFIG_SMC911X
+#define CONFIG_SMC911X_BASE 0x5000000
+#define CONFIG_SMC911X_16_BIT
+#define CONFIG_ENV_SROM_BANK 1
+#endif /*CONFIG_CMD_NET*/
+
+/* Enable PXE Support */
+#ifdef CONFIG_CMD_NET
+#define CONFIG_CMD_PXE
+#define CONFIG_MENU
+#endif
+
+/* Enable devicetree support */
+#define CONFIG_OF_LIBFDT
+
+/* Enable Time Command */
+#define CONFIG_CMD_TIME
+
+#endif /* __CONFIG_H */
From cc2b1012cbdb0422fc96d6e6c813baed0722f373 Mon Sep 17 00:00:00 2001
From: Inderpal Singh
Date: Wed, 21 Aug 2013 10:38:57 +0530
Subject: [PATCH 06/42] exynos5250: arndale: Add mmc support
This patch adds mmc support to the arndale board.
Signed-off-by: Inderpal Singh
Signed-off-by: Minkyu Kang
---
board/samsung/arndale/arndale.c | 14 ++++++++++++++
board/samsung/dts/exynos5250-arndale.dts | 18 ++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index 84d8f19..052fecd 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -6,6 +6,7 @@
#include
#include
+#include
#include
DECLARE_GLOBAL_DATA_PTR;
@@ -48,6 +49,19 @@ void dram_init_banksize(void)
}
}
+#ifdef CONFIG_GENERIC_MMC
+int board_mmc_init(bd_t *bis)
+{
+ int ret;
+ /* dwmmc initializattion for available channels */
+ ret = exynos_dwmmc_init(gd->fdt_blob);
+ if (ret)
+ debug("dwmmc init failed\n");
+
+ return ret;
+}
+#endif
+
static int board_uart_init(void)
{
int err = 0, uart_id;
diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts
index d3c0527..c700e45 100644
--- a/board/samsung/dts/exynos5250-arndale.dts
+++ b/board/samsung/dts/exynos5250-arndale.dts
@@ -18,4 +18,22 @@
serial0 = "/serial@12C20000";
console = "/serial@12C20000";
};
+
+ mmc@12200000 {
+ samsung,bus-width = <8>;
+ samsung,timing = <1 3 3>;
+ };
+
+ mmc@12210000 {
+ status = "disabled";
+ };
+
+ mmc@12220000 {
+ samsung,bus-width = <4>;
+ samsung,timing = <1 2 3>;
+ };
+
+ mmc@12230000 {
+ status = "disabled";
+ };
};
From 812d7576cdbecc12d7eec7b533333d3a4a06234b Mon Sep 17 00:00:00 2001
From: Piotr Wilczek
Date: Tue, 25 Jun 2013 09:59:47 +0200
Subject: [PATCH 07/42] drivers:power:max77686: add function to set voltage and
mode
This patch add new functions to pmic max77686 to set voltage and mode.
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
Acked-by: Rajeshwari Shinde
Acked-by: Tom Rini
Signed-off-by: Minkyu Kang
---
drivers/power/pmic/pmic_max77686.c | 192 +++++++++++++++++++++++++++++++++++++
include/power/max77686_pmic.h | 26 +++++
2 files changed, 218 insertions(+)
diff --git a/drivers/power/pmic/pmic_max77686.c b/drivers/power/pmic/pmic_max77686.c
index 7208e5b..d4c430e 100644
--- a/drivers/power/pmic/pmic_max77686.c
+++ b/drivers/power/pmic/pmic_max77686.c
@@ -14,6 +14,198 @@
DECLARE_GLOBAL_DATA_PTR;
+static const char max77686_buck_addr[] = {
+ 0xff, 0x10, 0x12, 0x1c, 0x26, 0x30, 0x32, 0x34, 0x36, 0x38
+};
+
+static unsigned int max77686_ldo_volt2hex(int ldo, ulong uV)
+{
+ unsigned int hex = 0;
+
+ switch (ldo) {
+ case 1:
+ case 2:
+ case 6:
+ case 7:
+ case 8:
+ case 15:
+ hex = (uV - 800000) / 25000;
+ break;
+ default:
+ hex = (uV - 800000) / 50000;
+ }
+
+ if (hex >= 0 && hex <= MAX77686_LDO_VOLT_MAX_HEX)
+ return hex;
+
+ debug("%s: %ld is wrong voltage value for LDO%d\n", __func__, uV, ldo);
+ return 0;
+}
+
+int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV)
+{
+ unsigned int val, ret, hex, adr;
+
+ if (ldo < 1 && ldo > 26) {
+ printf("%s: %d is wrong ldo number\n", __func__, ldo);
+ return -1;
+ }
+
+ adr = MAX77686_REG_PMIC_LDO1CTRL1 + ldo - 1;
+ hex = max77686_ldo_volt2hex(ldo, uV);
+
+ if (!hex)
+ return -1;
+
+ ret = pmic_reg_read(p, adr, &val);
+ if (ret)
+ return ret;
+
+ val &= ~MAX77686_LDO_VOLT_MASK;
+ val |= hex;
+ ret |= pmic_reg_write(p, adr, val);
+
+ return ret;
+}
+
+int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode)
+{
+ unsigned int val, ret, adr, mode;
+
+ if (ldo < 1 && 26 < ldo) {
+ printf("%s: %d is wrong ldo number\n", __func__, ldo);
+ return -1;
+ }
+
+ adr = MAX77686_REG_PMIC_LDO1CTRL1 + ldo - 1;
+
+ /* mode */
+ switch (opmode) {
+ case OPMODE_OFF:
+ mode = MAX77686_LDO_MODE_OFF;
+ break;
+ case OPMODE_STANDBY:
+ switch (ldo) {
+ case 2:
+ case 6:
+ case 7:
+ case 8:
+ case 10:
+ case 11:
+ case 12:
+ case 14:
+ case 15:
+ case 16:
+ mode = MAX77686_LDO_MODE_STANDBY;
+ break;
+ default:
+ mode = 0xff;
+ }
+ break;
+ case OPMODE_LPM:
+ mode = MAX77686_LDO_MODE_LPM;
+ break;
+ case OPMODE_ON:
+ mode = MAX77686_LDO_MODE_ON;
+ break;
+ default:
+ mode = 0xff;
+ }
+
+ if (mode == 0xff) {
+ printf("%s: %d is not supported on LDO%d\n",
+ __func__, opmode, ldo);
+ return -1;
+ }
+
+ ret = pmic_reg_read(p, adr, &val);
+ if (ret)
+ return ret;
+
+ val &= ~MAX77686_LDO_MODE_MASK;
+ val |= mode;
+ ret |= pmic_reg_write(p, adr, val);
+
+ return ret;
+}
+
+int max77686_set_buck_mode(struct pmic *p, int buck, char opmode)
+{
+ unsigned int val, ret, mask, adr, size, mode, mode_shift;
+
+ size = ARRAY_SIZE(max77686_buck_addr);
+ if (buck >= size) {
+ printf("%s: %d is wrong buck number\n", __func__, buck);
+ return -1;
+ }
+
+ adr = max77686_buck_addr[buck];
+
+ /* mask */
+ switch (buck) {
+ case 2:
+ case 3:
+ case 4:
+ mode_shift = MAX77686_BUCK_MODE_SHIFT_2;
+ break;
+ default:
+ mode_shift = MAX77686_BUCK_MODE_SHIFT_1;
+ }
+
+ mask = MAX77686_BUCK_MODE_MASK << mode_shift;
+
+ /* mode */
+ switch (opmode) {
+ case OPMODE_OFF:
+ mode = MAX77686_BUCK_MODE_OFF;
+ break;
+ case OPMODE_STANDBY:
+ switch (buck) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ mode = MAX77686_BUCK_MODE_STANDBY << mode_shift;
+ break;
+ default:
+ mode = 0xff;
+ }
+ break;
+ case OPMODE_LPM:
+ switch (buck) {
+ case 2:
+ case 3:
+ case 4:
+ mode = MAX77686_BUCK_MODE_LPM << mode_shift;
+ break;
+ default:
+ mode = 0xff;
+ }
+ break;
+ case OPMODE_ON:
+ mode = MAX77686_BUCK_MODE_ON << mode_shift;
+ break;
+ default:
+ mode = 0xff;
+ }
+
+ if (mode == 0xff) {
+ printf("%s: %d is not supported on BUCK%d\n",
+ __func__, opmode, buck);
+ return -1;
+ }
+
+ ret = pmic_reg_read(p, adr, &val);
+ if (ret)
+ return ret;
+
+ val &= ~mask;
+ val |= mode;
+ ret |= pmic_reg_write(p, adr, val);
+
+ return ret;
+}
+
int pmic_init(unsigned char bus)
{
static const char name[] = "MAX77686_PMIC";
diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
index 91b7ba7..c98db1b 100644
--- a/include/power/max77686_pmic.h
+++ b/include/power/max77686_pmic.h
@@ -139,6 +139,32 @@ enum {
EN_LDO = (0x3 << 6),
};
+enum {
+ OPMODE_OFF = 0,
+ OPMODE_STANDBY,
+ OPMODE_LPM,
+ OPMODE_ON,
+};
+
+int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV);
+int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode);
+int max77686_set_buck_mode(struct pmic *p, int buck, char opmode);
+
+#define MAX77686_LDO_VOLT_MAX_HEX 0x3f
+#define MAX77686_LDO_VOLT_MASK 0x3f
+#define MAX77686_LDO_MODE_MASK 0xc0
+#define MAX77686_LDO_MODE_OFF (0x00 << 0x06)
+#define MAX77686_LDO_MODE_STANDBY (0x01 << 0x06)
+#define MAX77686_LDO_MODE_LPM (0x02 << 0x06)
+#define MAX77686_LDO_MODE_ON (0x03 << 0x06)
+#define MAX77686_BUCK_MODE_MASK 0x03
+#define MAX77686_BUCK_MODE_SHIFT_1 0x00
+#define MAX77686_BUCK_MODE_SHIFT_2 0x04
+#define MAX77686_BUCK_MODE_OFF 0x00
+#define MAX77686_BUCK_MODE_STANDBY 0x01
+#define MAX77686_BUCK_MODE_LPM 0x02
+#define MAX77686_BUCK_MODE_ON 0x03
+
/* Buck1 1 volt value */
#define MAX77686_BUCK1OUT_1V 0x5
/* Buck1 1.05 volt value */
From 628af1790ac3231455c1ae4a4e43b67136799fa2 Mon Sep 17 00:00:00 2001
From: Simon Glass
Date: Fri, 30 Aug 2013 11:00:09 -0600
Subject: [PATCH 08/42] sandbox: Correct compiler warnings in
cmd_bootm/cmd_ximg
Correct the following warnings found with sandbox when compression
is enabled.
cmd_bootm.c: In function 'bootm_load_os':
cmd_bootm.c:443:11: warning: passing argument 4 of 'lzop_decompress' from incompatible pointer type [enabled by default]
/usr/local/google/c/cosarm/src/third_party/u-boot/files/include/linux/lzo.h:31:5: note: expected 'size_t *' but argument is of type 'uint *'
cmd_ximg.c: In function 'do_imgextract':
cmd_ximg.c:225:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
cmd_ximg.c:225:14: warning: 'hdr' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Simon Glass
Acked-by: Kees Cook
---
common/cmd_bootm.c | 10 ++++++----
common/cmd_ximg.c | 5 +++--
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 1685c14..2dd2642 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -436,11 +436,12 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
}
#endif /* CONFIG_LZMA */
#ifdef CONFIG_LZO
- case IH_COMP_LZO:
+ case IH_COMP_LZO: {
+ size_t size;
+
printf(" Uncompressing %s ... ", type_name);
- ret = lzop_decompress(image_buf, image_len, load_buf,
- &unc_len);
+ ret = lzop_decompress(image_buf, image_len, load_buf, &size);
if (ret != LZO_E_OK) {
printf("LZO: uncompress or overwrite error %d "
"- must RESET board to recover\n", ret);
@@ -449,8 +450,9 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
return BOOTM_ERR_RESET;
}
- *load_end = load + unc_len;
+ *load_end = load + size;
break;
+ }
#endif /* CONFIG_LZO */
default:
printf("Unimplemented compression type %d\n", comp);
diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index b439be3..65a8319 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -20,6 +20,7 @@
#include
#endif
#include
+#include
#ifndef CONFIG_SYS_XIMG_LEN
/* use 8MByte as default max gunzip size */
@@ -34,7 +35,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
ulong data, len, count;
int verify;
int part = 0;
- image_header_t *hdr;
+ image_header_t *hdr = NULL;
#if defined(CONFIG_FIT)
const char *uname = NULL;
const void* fit_hdr;
@@ -222,7 +223,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
* which requires at most 2300 KB of memory.
*/
i = BZ2_bzBuffToBuffDecompress(
- (char *)ntohl(hdr->ih_load),
+ map_sysmem(ntohl(hdr->ih_load), 0),
&unc_len, (char *)data, len,
CONFIG_SYS_MALLOC_LEN < (4096 * 1024),
0);
From 3153e915b493a8d832e9260723c579d2544e5dc8 Mon Sep 17 00:00:00 2001
From: Kees Cook
Date: Fri, 16 Aug 2013 07:59:11 -0700
Subject: [PATCH 09/42] sandbox: add compression tests
This adds the "test_compression" command when building the sandbox. This
tests the existing compression and decompression routines for simple
sanity and for buffer overflow conditions.
Signed-off-by: Kees Cook
Acked-by: Simon Glass
---
include/configs/sandbox.h | 5 +
test/Makefile | 1 +
test/compression.c | 335 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 341 insertions(+)
create mode 100644 test/compression.c
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index af3d6ad..4027030 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -109,4 +109,9 @@
"stdout=serial\0" \
"stderr=serial\0"
+#define CONFIG_GZIP_COMPRESSED
+#define CONFIG_BZIP2
+#define CONFIG_LZO
+#define CONFIG_LZMA
+
#endif
diff --git a/test/Makefile b/test/Makefile
index 99ce890..a68613d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -9,6 +9,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libtest.o
COBJS-$(CONFIG_SANDBOX) += command_ut.o
+COBJS-$(CONFIG_SANDBOX) += compression.o
COBJS := $(sort $(COBJS-y))
SRCS := $(COBJS:.o=.c)
diff --git a/test/compression.c b/test/compression.c
new file mode 100644
index 0000000..8834d5e
--- /dev/null
+++ b/test/compression.c
@@ -0,0 +1,335 @@
+/*
+ * Copyright (c) 2013, The Chromium Authors
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#define DEBUG
+
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+
+static const char plain[] =
+ "I am a highly compressable bit of text.\n"
+ "I am a highly compressable bit of text.\n"
+ "I am a highly compressable bit of text.\n"
+ "There are many like me, but this one is mine.\n"
+ "If I were any shorter, there wouldn't be much sense in\n"
+ "compressing me in the first place. At least with lzo, anyway,\n"
+ "which appears to behave poorly in the face of short text\n"
+ "messages.\n";
+
+/* bzip2 -c /tmp/plain.txt > /tmp/plain.bz2 */
+static const char bzip2_compressed[] =
+ "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\xe5\x63\xdd\x09\x00\x00"
+ "\x28\x57\x80\x00\x10\x40\x85\x20\x20\x04\x00\x3f\xef\xdf\xf0\x30"
+ "\x00\xd6\xd0\x34\x91\x89\xa6\xf5\x4d\x19\x1a\x19\x0d\x02\x34\xd4"
+ "\xc9\x00\x34\x34\x00\x02\x48\x41\x35\x4f\xd4\xc6\x88\xd3\x50\x3d"
+ "\x4f\x51\x82\x4f\x88\xc3\x0d\x05\x62\x4f\x91\xa3\x52\x1b\xd0\x52"
+ "\x41\x4a\xa3\x98\xc2\x6b\xca\xa3\x82\xa5\xac\x8b\x15\x99\x68\xad"
+ "\xdf\x29\xd6\xf1\xf7\x5a\x10\xcd\x8c\x26\x61\x94\x95\xfe\x9e\x16"
+ "\x18\x28\x69\xd4\x23\x64\xcc\x2b\xe5\xe8\x5f\x00\xa4\x70\x26\x2c"
+ "\xee\xbd\x59\x6d\x6a\xec\xfc\x31\xda\x59\x0a\x14\x2a\x60\x1c\xf0"
+ "\x04\x86\x73\x9a\xc5\x5b\x87\x3f\x5b\x4c\x93\xe6\xb5\x35\x0d\xa6"
+ "\xb1\x2e\x62\x7b\xab\x67\xe7\x99\x2a\x14\x5e\x9f\x64\xcb\x96\xf4"
+ "\x0d\x65\xd4\x39\xe6\x8b\x7e\xea\x1c\x03\x69\x97\x83\x58\x91\x96"
+ "\xe1\xf0\x9d\xa4\x15\x8b\xb8\xc6\x93\xdc\x3d\xd9\x3c\x22\x55\xef"
+ "\xfb\xbb\x2a\xd3\x87\xa2\x8b\x04\xd9\x19\xf8\xe2\xfd\x4f\xdb\x1a"
+ "\x07\xc8\x60\xa3\x3f\xf8\xbb\x92\x29\xc2\x84\x87\x2b\x1e\xe8\x48";
+static const unsigned long bzip2_compressed_size = 240;
+
+/* lzma -z -c /tmp/plain.txt > /tmp/plain.lzma */
+static const char lzma_compressed[] =
+ "\x5d\x00\x00\x80\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x24\x88"
+ "\x08\x26\xd8\x41\xff\x99\xc8\xcf\x66\x3d\x80\xac\xba\x17\xf1\xc8"
+ "\xb9\xdf\x49\x37\xb1\x68\xa0\x2a\xdd\x63\xd1\xa7\xa3\x66\xf8\x15"
+ "\xef\xa6\x67\x8a\x14\x18\x80\xcb\xc7\xb1\xcb\x84\x6a\xb2\x51\x16"
+ "\xa1\x45\xa0\xd6\x3e\x55\x44\x8a\x5c\xa0\x7c\xe5\xa8\xbd\x04\x57"
+ "\x8f\x24\xfd\xb9\x34\x50\x83\x2f\xf3\x46\x3e\xb9\xb0\x00\x1a\xf5"
+ "\xd3\x86\x7e\x8f\x77\xd1\x5d\x0e\x7c\xe1\xac\xde\xf8\x65\x1f\x4d"
+ "\xce\x7f\xa7\x3d\xaa\xcf\x26\xa7\x58\x69\x1e\x4c\xea\x68\x8a\xe5"
+ "\x89\xd1\xdc\x4d\xc7\xe0\x07\x42\xbf\x0c\x9d\x06\xd7\x51\xa2\x0b"
+ "\x7c\x83\x35\xe1\x85\xdf\xee\xfb\xa3\xee\x2f\x47\x5f\x8b\x70\x2b"
+ "\xe1\x37\xf3\x16\xf6\x27\x54\x8a\x33\x72\x49\xea\x53\x7d\x60\x0b"
+ "\x21\x90\x66\xe7\x9e\x56\x61\x5d\xd8\xdc\x59\xf0\xac\x2f\xd6\x49"
+ "\x6b\x85\x40\x08\x1f\xdf\x26\x25\x3b\x72\x44\xb0\xb8\x21\x2f\xb3"
+ "\xd7\x9b\x24\x30\x78\x26\x44\x07\xc3\x33\xd1\x4d\x03\x1b\xe1\xff"
+ "\xfd\xf5\x50\x8d\xca";
+static const unsigned long lzma_compressed_size = 229;
+
+/* lzop -c /tmp/plain.txt > /tmp/plain.lzo */
+static const char lzo_compressed[] =
+ "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a\x10\x30\x20\x60\x09\x40\x01"
+ "\x05\x03\x00\x00\x09\x00\x00\x81\xb4\x52\x09\x54\xf1\x00\x00\x00"
+ "\x00\x09\x70\x6c\x61\x69\x6e\x2e\x74\x78\x74\x65\xb1\x07\x9c\x00"
+ "\x00\x01\x5e\x00\x00\x01\x0f\xc3\xc7\x7a\xe0\x00\x16\x49\x20\x61"
+ "\x6d\x20\x61\x20\x68\x69\x67\x68\x6c\x79\x20\x63\x6f\x6d\x70\x72"
+ "\x65\x73\x73\x61\x62\x6c\x65\x20\x62\x69\x74\x20\x6f\x66\x20\x74"
+ "\x65\x78\x74\x2e\x0a\x20\x2f\x9c\x00\x00\x22\x54\x68\x65\x72\x65"
+ "\x20\x61\x72\x65\x20\x6d\x61\x6e\x79\x20\x6c\x69\x6b\x65\x20\x6d"
+ "\x65\x2c\x20\x62\x75\x74\x20\x74\x68\x69\x73\x20\x6f\x6e\x65\x20"
+ "\x69\x73\x20\x6d\x69\x6e\x65\x2e\x0a\x49\x66\x20\x49\x20\x77\x84"
+ "\x06\x0a\x6e\x79\x20\x73\x68\x6f\x72\x74\x65\x72\x2c\x20\x74\x90"
+ "\x08\x00\x08\x77\x6f\x75\x6c\x64\x6e\x27\x74\x20\x62\x65\x20\x6d"
+ "\x75\x63\x68\x20\x73\x65\x6e\x73\x65\x20\x69\x6e\x0a\xf8\x19\x02"
+ "\x69\x6e\x67\x20\x6d\x64\x02\x64\x06\x00\x5a\x20\x66\x69\x72\x73"
+ "\x74\x20\x70\x6c\x61\x63\x65\x2e\x20\x41\x74\x20\x6c\x65\x61\x73"
+ "\x74\x20\x77\x69\x74\x68\x20\x6c\x7a\x6f\x2c\x20\x61\x6e\x79\x77"
+ "\x61\x79\x2c\x0a\x77\x68\x69\x63\x68\x20\x61\x70\x70\x65\x61\x72"
+ "\x73\x20\x74\x6f\x20\x62\x65\x68\x61\x76\x65\x20\x70\x6f\x6f\x72"
+ "\x6c\x79\x20\x69\x6e\x20\x74\x68\x65\x20\x66\x61\x63\x65\x20\x6f"
+ "\x66\x20\x73\x68\x6f\x72\x74\x20\x74\x65\x78\x74\x0a\x6d\x65\x73"
+ "\x73\x61\x67\x65\x73\x2e\x0a\x11\x00\x00\x00\x00\x00\x00";
+static const unsigned long lzo_compressed_size = 334;
+
+
+#define TEST_BUFFER_SIZE 512
+
+typedef int (*mutate_func)(void *, unsigned long, void *, unsigned long,
+ unsigned long *);
+
+static int compress_using_gzip(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ int ret;
+ unsigned long inout_size = out_max;
+
+ ret = gzip(out, &inout_size, in, in_size);
+ if (out_size)
+ *out_size = inout_size;
+
+ return ret;
+}
+
+static int uncompress_using_gzip(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ int ret;
+ unsigned long inout_size = in_size;
+
+ ret = gunzip(out, out_max, in, &inout_size);
+ if (out_size)
+ *out_size = inout_size;
+
+ return ret;
+}
+
+static int compress_using_bzip2(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ /* There is no bzip2 compression in u-boot, so fake it. */
+ assert(in_size == strlen(plain));
+ assert(memcmp(plain, in, in_size) == 0);
+
+ if (bzip2_compressed_size > out_max)
+ return -1;
+
+ memcpy(out, bzip2_compressed, bzip2_compressed_size);
+ if (out_size)
+ *out_size = bzip2_compressed_size;
+
+ return 0;
+}
+
+static int uncompress_using_bzip2(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ int ret;
+ unsigned int inout_size = out_max;
+
+ ret = BZ2_bzBuffToBuffDecompress(out, &inout_size, in, in_size,
+ CONFIG_SYS_MALLOC_LEN < (4096 * 1024), 0);
+ if (out_size)
+ *out_size = inout_size;
+
+ return (ret != BZ_OK);
+}
+
+static int compress_using_lzma(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ /* There is no lzma compression in u-boot, so fake it. */
+ assert(in_size == strlen(plain));
+ assert(memcmp(plain, in, in_size) == 0);
+
+ if (lzma_compressed_size > out_max)
+ return -1;
+
+ memcpy(out, lzma_compressed, lzma_compressed_size);
+ if (out_size)
+ *out_size = lzma_compressed_size;
+
+ return 0;
+}
+
+static int uncompress_using_lzma(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ int ret;
+ SizeT inout_size = out_max;
+
+ ret = lzmaBuffToBuffDecompress(out, &inout_size, in, in_size);
+ if (out_size)
+ *out_size = inout_size;
+
+ return (ret != SZ_OK);
+}
+
+static int compress_using_lzo(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ /* There is no lzo compression in u-boot, so fake it. */
+ assert(in_size == strlen(plain));
+ assert(memcmp(plain, in, in_size) == 0);
+
+ if (lzo_compressed_size > out_max)
+ return -1;
+
+ memcpy(out, lzo_compressed, lzo_compressed_size);
+ if (out_size)
+ *out_size = lzo_compressed_size;
+
+ return 0;
+}
+
+static int uncompress_using_lzo(void *in, unsigned long in_size,
+ void *out, unsigned long out_max,
+ unsigned long *out_size)
+{
+ int ret;
+ size_t input_size = in_size;
+ size_t output_size = out_max;
+
+ ret = lzop_decompress(in, input_size, out, &output_size);
+ if (out_size)
+ *out_size = output_size;
+
+ return (ret != LZO_E_OK);
+}
+
+#define errcheck(statement) if (!(statement)) { \
+ fprintf(stderr, "\tFailed: %s\n", #statement); \
+ ret = 1; \
+ goto out; \
+}
+
+static int run_test(char *name, mutate_func compress, mutate_func uncompress)
+{
+ ulong orig_size, compressed_size, uncompressed_size;
+ void *orig_buf;
+ void *compressed_buf = NULL;
+ void *uncompressed_buf = NULL;
+ void *compare_buf = NULL;
+ int ret;
+
+ printf(" testing %s ...\n", name);
+
+ orig_buf = (void *)plain;
+ orig_size = strlen(orig_buf); /* Trailing NULL not included. */
+ errcheck(orig_size > 0);
+
+ compressed_size = uncompressed_size = TEST_BUFFER_SIZE;
+ compressed_buf = malloc(compressed_size);
+ errcheck(compressed_buf != NULL);
+ uncompressed_buf = malloc(uncompressed_size);
+ errcheck(uncompressed_buf != NULL);
+ compare_buf = malloc(uncompressed_size);
+ errcheck(compare_buf != NULL);
+
+ /* Compress works as expected. */
+ printf("\torig_size:%lu\n", orig_size);
+ memset(compressed_buf, 'A', TEST_BUFFER_SIZE);
+ errcheck(compress(orig_buf, orig_size,
+ compressed_buf, compressed_size,
+ &compressed_size) == 0);
+ printf("\tcompressed_size:%lu\n", compressed_size);
+ errcheck(compressed_size > 0);
+ errcheck(compressed_size < orig_size);
+ errcheck(((char *)compressed_buf)[compressed_size-1] != 'A');
+ errcheck(((char *)compressed_buf)[compressed_size] == 'A');
+
+ /* Uncompresses with space remaining. */
+ errcheck(uncompress(compressed_buf, compressed_size,
+ uncompressed_buf, uncompressed_size,
+ &uncompressed_size) == 0);
+ printf("\tuncompressed_size:%lu\n", uncompressed_size);
+ errcheck(uncompressed_size == orig_size);
+ errcheck(memcmp(orig_buf, uncompressed_buf, orig_size) == 0);
+
+ /* Uncompresses with exactly the right size output buffer. */
+ memset(uncompressed_buf, 'A', TEST_BUFFER_SIZE);
+ errcheck(uncompress(compressed_buf, compressed_size,
+ uncompressed_buf, orig_size,
+ &uncompressed_size) == 0);
+ errcheck(uncompressed_size == orig_size);
+ errcheck(memcmp(orig_buf, uncompressed_buf, orig_size) == 0);
+ errcheck(((char *)uncompressed_buf)[orig_size] == 'A');
+
+ /* Make sure compression does not over-run. */
+ memset(compare_buf, 'A', TEST_BUFFER_SIZE);
+ ret = compress(orig_buf, orig_size,
+ compare_buf, compressed_size - 1,
+ NULL);
+ errcheck(((char *)compare_buf)[compressed_size] == 'A');
+ errcheck(ret != 0);
+ printf("\tcompress does not overrun\n");
+
+ /* Make sure decompression does not over-run. */
+ memset(compare_buf, 'A', TEST_BUFFER_SIZE);
+ ret = uncompress(compressed_buf, compressed_size,
+ compare_buf, uncompressed_size - 1,
+ NULL);
+ errcheck(((char *)compare_buf)[uncompressed_size - 1] == 'A');
+ errcheck(ret != 0);
+ printf("\tuncompress does not overrun\n");
+
+ /* Got here, everything is fine. */
+ ret = 0;
+
+out:
+ printf(" %s: %s\n", name, ret == 0 ? "ok" : "FAILED");
+
+ free(compare_buf);
+ free(uncompressed_buf);
+ free(compressed_buf);
+
+ return ret;
+}
+
+
+static int do_test_compression(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ int err = 0;
+
+ err += run_test("gzip", compress_using_gzip, uncompress_using_gzip);
+ err += run_test("bzip2", compress_using_bzip2, uncompress_using_bzip2);
+ err += run_test("lzma", compress_using_lzma, uncompress_using_lzma);
+ err += run_test("lzo", compress_using_lzo, uncompress_using_lzo);
+
+ printf("test_compression %s\n", err == 0 ? "ok" : "FAILED");
+
+ return err;
+}
+
+U_BOOT_CMD(
+ test_compression, 5, 1, do_test_compression,
+ "Basic test of compressors: gzip bzip2 lzma lzo", ""
+);
From 8ef70478458432b5352980a823039c508359523e Mon Sep 17 00:00:00 2001
From: Kees Cook
Date: Fri, 16 Aug 2013 07:59:12 -0700
Subject: [PATCH 10/42] documentation: add more compression configs
This adds the missing compression config items to the README.
Signed-off-by: Kees Cook
Acked-by: Simon Glass
---
README | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README b/README
index 677c3dc..63706be 100644
--- a/README
+++ b/README
@@ -1680,6 +1680,10 @@ CBFS (Coreboot Filesystem) support
to compress the specified memory at its best effort.
- Compression support:
+ CONFIG_GZIP
+
+ Enabled by default to support gzip compressed images.
+
CONFIG_BZIP2
If this option is set, support for bzip2 compressed
@@ -1713,6 +1717,11 @@ CBFS (Coreboot Filesystem) support
then calculate the amount of needed dynamic memory (ensuring
the appropriate CONFIG_SYS_MALLOC_LEN value).
+ CONFIG_LZO
+
+ If this option is set, support for LZO compressed images
+ is included.
+
- MII/PHY support:
CONFIG_PHY_ADDR
From b75650d84d4b7892179ae183523011f6d898423d Mon Sep 17 00:00:00 2001
From: Kees Cook
Date: Fri, 16 Aug 2013 07:59:13 -0700
Subject: [PATCH 11/42] gzip: correctly bounds-check output buffer
The output buffer size must not be reset by the gzip decoder or there
is a risk of overflowing memory during decompression.
Signed-off-by: Kees Cook
Acked-by: Simon Glass
---
lib/gunzip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/gunzip.c b/lib/gunzip.c
index 9959781..35abfb3 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -89,13 +89,13 @@ int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
s.avail_out = dstlen;
do {
r = inflate(&s, Z_FINISH);
- if (r != Z_STREAM_END && r != Z_BUF_ERROR && stoponerr == 1) {
+ if (stoponerr == 1 && r != Z_STREAM_END &&
+ (s.avail_out == 0 || r != Z_BUF_ERROR)) {
printf("Error: inflate() returned %d\n", r);
inflateEnd(&s);
return -1;
}
s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned char*)dst);
- s.avail_out = dstlen;
} while (r == Z_BUF_ERROR);
*lenp = s.next_out - (unsigned char *) dst;
inflateEnd(&s);
From afca294289949b118a192b77be947379734ea620 Mon Sep 17 00:00:00 2001
From: Kees Cook
Date: Fri, 16 Aug 2013 07:59:14 -0700
Subject: [PATCH 12/42] lzma: correctly bounds-check output buffer
The output buffer size must be correctly passed to the lzma decoder or
there is a risk of overflowing memory during decompression. Switching
to the LZMA_FINISH_END mode means nothing is left in an unknown state
once the buffer becomes full.
Signed-off-by: Kees Cook
Acked-by: Simon Glass
---
lib/lzma/LzmaTools.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index 8d1165e11b..0aec2f9 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -97,15 +97,19 @@ int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
g_Alloc.Alloc = SzAlloc;
g_Alloc.Free = SzFree;
+ /* Short-circuit early if we know the buffer can't hold the results. */
+ if (outSizeFull != (SizeT)-1 && *uncompressedSize < outSizeFull)
+ return SZ_ERROR_OUTPUT_EOF;
+
/* Decompress */
- outProcessed = outSizeFull;
+ outProcessed = *uncompressedSize;
WATCHDOG_RESET();
res = LzmaDecode(
outStream, &outProcessed,
inStream + LZMA_DATA_OFFSET, &compressedSize,
- inStream, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &state, &g_Alloc);
+ inStream, LZMA_PROPS_SIZE, LZMA_FINISH_END, &state, &g_Alloc);
*uncompressedSize = outProcessed;
if (res != SZ_OK) {
return res;
From ff9d2efdbf1b3b5263f81e843c6724b8bead7f1f Mon Sep 17 00:00:00 2001
From: Kees Cook
Date: Fri, 16 Aug 2013 07:59:15 -0700
Subject: [PATCH 13/42] lzo: correctly bounds-check output buffer
This checks the size of the output buffer and fails if it was going to
overflow the buffer during lzo decompression.
Signed-off-by: Kees Cook
Acked-by: Simon Glass
---
lib/lzo/lzo1x_decompress.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c
index e6ff708..35f3793 100644
--- a/lib/lzo/lzo1x_decompress.c
+++ b/lib/lzo/lzo1x_decompress.c
@@ -68,13 +68,14 @@ int lzop_decompress(const unsigned char *src, size_t src_len,
unsigned char *start = dst;
const unsigned char *send = src + src_len;
u32 slen, dlen;
- size_t tmp;
+ size_t tmp, remaining;
int r;
src = parse_header(src);
if (!src)
return LZO_E_ERROR;
+ remaining = *dst_len;
while (src < send) {
/* read uncompressed block size */
dlen = get_unaligned_be32(src);
@@ -93,6 +94,10 @@ int lzop_decompress(const unsigned char *src, size_t src_len,
if (slen <= 0 || slen > dlen)
return LZO_E_ERROR;
+ /* abort if buffer ran out of room */
+ if (dlen > remaining)
+ return LZO_E_OUTPUT_OVERRUN;
+
/* decompress */
tmp = dlen;
r = lzo1x_decompress_safe((u8 *) src, slen, dst, &tmp);
@@ -105,6 +110,7 @@ int lzop_decompress(const unsigned char *src, size_t src_len,
src += slen;
dst += dlen;
+ remaining -= dlen;
}
return LZO_E_INPUT_OVERRUN;
From 315c0ace7c220591a9b220ab7698e85624b430c0 Mon Sep 17 00:00:00 2001
From: Kees Cook
Date: Fri, 16 Aug 2013 07:59:16 -0700
Subject: [PATCH 14/42] bootm: allow correct bounds-check of destination
While nothing presently examines the destination size, it should at
least be correct so that future users of sys_mapmem() will not be
surprised. Without this, it might be possible to overflow memory.
Signed-off-by: Kees Cook
Acked-by: Simon Glass
---
common/cmd_bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 2dd2642..b07b0f4 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -368,7 +368,7 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
const char *type_name = genimg_get_type_name(os.type);
- load_buf = map_sysmem(load, image_len);
+ load_buf = map_sysmem(load, unc_len);
image_buf = map_sysmem(image_start, image_len);
switch (comp) {
case IH_COMP_NONE:
From 1a05b5f91e12845cf06f4b1ef34096861bf718b5 Mon Sep 17 00:00:00 2001
From: Thomas Chou
Date: Tue, 3 Sep 2013 09:36:04 +0800
Subject: [PATCH 15/42] nios2: fix missing comment terminator from SPDX License
commit
The commit 1a4596601fd395f3afb8f82f3f840c5e00bdd57a
Add GPL-2.0+ SPDX-License-Identifier to source files
generated a warning due to a missing comment terminator.
longlong.h:7:1: warning: "/*" within comment
Signed-off-by: Thomas Chou
---
arch/nios2/lib/longlong.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/nios2/lib/longlong.h b/arch/nios2/lib/longlong.h
index 63c64ed..45ec5f0 100644
--- a/arch/nios2/lib/longlong.h
+++ b/arch/nios2/lib/longlong.h
@@ -3,6 +3,7 @@
2005 Free Software Foundation, Inc.
* SPDX-License-Identifier: GPL-2.0+
+ */
/* You have to define the following before including this file:
From 3c950c4fca1774f55e0941fc3d0f762c23a0b1c1 Mon Sep 17 00:00:00 2001
From: "Robert P. J. Day"
Date: Wed, 4 Sep 2013 08:41:44 -0400
Subject: [PATCH 16/42] am335x_evm.h: Add back the actual load of the kernel
image
Somewhere along the line of refactoring the am335x header files, the
kernel image load was lost, so put it back in.
Signed-off-by: Robert P. J. Day
---
include/configs/am335x_evm.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index e0a87f8..7969e07 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -132,7 +132,9 @@
"echo Running uenvcmd ...;" \
"run uenvcmd;" \
"fi;" \
- "run mmcloados;" \
+ "if run loaduimage; then " \
+ "run mmcloados;" \
+ "fi;" \
"fi;\0" \
"spiboot=echo Booting from spi ...; " \
"run spiargs; " \
From dc19ec11d7ac174de8a2580760b5385c8c96ed66 Mon Sep 17 00:00:00 2001
From: Pantelis Antoniou
Date: Thu, 8 Aug 2013 19:15:47 +0300
Subject: [PATCH 17/42] git-mailrc: Update MMC custodian
Update git-mailrc with my nick and replace afleming as mmc custodian.
Signed-off-by: Pantelis Antoniou
---
doc/git-mailrc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/git-mailrc b/doc/git-mailrc
index e3a47c4..03fc482 100644
--- a/doc/git-mailrc
+++ b/doc/git-mailrc
@@ -24,6 +24,7 @@ alias kimphill Kim Phillips
alias macpaul Macpaul Lin
alias marex Marek Vasut
alias monstr Michal Simek
+alias panto Pantelis Antoniou
alias prafulla Prafulla Wadaskar
alias prom Minkyu Kang
alias rbohmer Remy Bohmer
@@ -102,7 +103,7 @@ alias cfi uboot, stroese
alias kerneldoc uboot, marex
alias fdt uboot, Jerry Van Baren
alias i2c uboot, hs
-alias mmc uboot, afleming
+alias mmc uboot, panto
alias nand uboot, scottwood
alias net uboot, jhersh
alias usb uboot, marex
From 7ea50d52849fe8ffa5b5b74c979b60b1045d6fc9 Mon Sep 17 00:00:00 2001
From: Jeroen Hofstee
Date: Sat, 10 Aug 2013 17:16:50 +0200
Subject: [PATCH 18/42] compiler_gcc: do not redefine __gnu_attributes
gcc allows extensions to be non compiler specific by defining
__* macros for the attributes supported by gcc. Having a
different definition causes many warnings during the build
(cdefs.h on FreeBSD uses __attribute((__pure__)) where u-boot
uses __attribute__((pure)) for example). Do not redefine
these macros to suppress these warnings.
This patch ignores the checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))
Signed-off-by: Jeroen Hofstee
---
include/linux/compiler-gcc.h | 12 +++++++++---
include/linux/compiler-gcc4.h | 4 +++-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 73dcf80..9896e54 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -50,7 +50,9 @@
#endif
#define __deprecated __attribute__((deprecated))
-#define __packed __attribute__((packed))
+#ifndef __packed
+# define __packed __attribute__((packed))
+#endif
#define __weak __attribute__((weak))
/*
@@ -73,8 +75,12 @@
* would be.
* [...]
*/
-#define __pure __attribute__((pure))
-#define __aligned(x) __attribute__((aligned(x)))
+#ifndef __pure
+# define __pure __attribute__((pure))
+#endif
+#ifndef __aligned
+# define __aligned(x) __attribute__((aligned(x)))
+#endif
#define __printf(a,b) __attribute__((format(printf,a,b)))
#define noinline __attribute__((noinline))
#define __attribute_const__ __attribute__((__const__))
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index 94dea3f..27d11ca 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -12,7 +12,9 @@
#define __used __attribute__((__used__))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
-#define __always_inline inline __attribute__((always_inline))
+#ifndef __always_inline
+# define __always_inline inline __attribute__((always_inline))
+#endif
/*
* A trick to suppress uninitialized variable warning without generating any
From 6b8f185faf29db302a20f584cc54253667535f08 Mon Sep 17 00:00:00 2001
From: "Wu, Josh"
Date: Wed, 24 Jul 2013 17:55:30 +0800
Subject: [PATCH 19/42] fs: fat: don't call disk_write with zero sector num
In the set_cluster() function, it will convert the buffer size to sector
numbers. Then call disk_write() to write by sector.
For remaining buffer, the size is less than a sector, call disk_write()
again to write them in one sector.
But if the total buffer size is less then one sector, the original code
will call disk_write() with zero sector number. It is unnecessary.
So this patch fix this. Now it will not call disk_write() if total buffer size
is less than one sector.
Signed-off-by: Josh Wu
---
fs/fat/fat_write.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index b78026a..b7a21e0 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -552,9 +552,11 @@ set_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer,
debug("clustnum: %d, startsect: %d\n", clustnum, startsect);
- if (disk_write(startsect, size / mydata->sect_size, buffer) < 0) {
- debug("Error writing data\n");
- return -1;
+ if ((size / mydata->sect_size) > 0) {
+ if (disk_write(startsect, size / mydata->sect_size, buffer) < 0) {
+ debug("Error writing data\n");
+ return -1;
+ }
}
if (size % mydata->sect_size) {
From 4412db46468d5965da736d06f84d13e68a6e0b51 Mon Sep 17 00:00:00 2001
From: Jack Mitchell
Date: Tue, 16 Jul 2013 14:44:23 +0100
Subject: [PATCH 20/42] standalone-examples: support custom GCC lib
Add support for defining the gcc lib in standalone examples as is
done in the main u-boot Makefile
Signed-off-by: Jack Mitchell
---
examples/standalone/Makefile | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index 4afedea..45b0fdc 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -52,7 +52,18 @@ ELF := $(addprefix $(obj),$(ELF))
BIN := $(addprefix $(obj),$(BIN))
SREC := $(addprefix $(obj),$(SREC))
-gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
+# Add GCC lib
+ifdef USE_PRIVATE_LIBGCC
+ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
+PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o
+else
+PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
+endif
+else
+PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
+endif
+PLATFORM_LIBS += $(PLATFORM_LIBGCC)
+export PLATFORM_LIBS
CPPFLAGS += -I..
@@ -82,7 +93,7 @@ $(ELF):
$(obj)%: $(obj)%.o $(LIB)
$(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
- -L$(gcclibdir) -lgcc
+ $(PLATFORM_LIBS)
$(SREC):
$(obj)%.srec: $(obj)%
From 2915a0223ae9632c9f555809ed20b3257ea47949 Mon Sep 17 00:00:00 2001
From: Richard Gibbs
Date: Sat, 24 Aug 2013 10:10:47 -0500
Subject: [PATCH 21/42] ahci: use ports implemented map instead of num_ports
The AHCI driver was incorrectly using the Capabilities register NP (number
of ports) field to determine which ports to activate. This commit changes
it to correctly use the PORTS_IMPL register as a port map.
Signed-off-by: Richard Gibbs
Reviewed-by: Tom Rini
---
drivers/block/ahci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index e455ba5..02ba02f 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -119,6 +119,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
u32 tmp, cap_save, cmd;
int i, j;
volatile u8 *port_mmio;
+ u32 port_map;
debug("ahci_host_init: start\n");
@@ -160,6 +161,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
#endif
probe_ent->cap = readl(mmio + HOST_CAP);
probe_ent->port_map = readl(mmio + HOST_PORTS_IMPL);
+ port_map = probe_ent->port_map;
probe_ent->n_ports = (probe_ent->cap & 0x1f) + 1;
debug("cap 0x%x port_map 0x%x n_ports %d\n",
@@ -169,6 +171,8 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
probe_ent->n_ports = CONFIG_SYS_SCSI_MAX_SCSI_ID;
for (i = 0; i < probe_ent->n_ports; i++) {
+ if (!(port_map & (1 << i)))
+ continue;
probe_ent->port[i].port_mmio = ahci_port_base((u32) mmio, i);
port_mmio = (u8 *) probe_ent->port[i].port_mmio;
ahci_setup_port(&probe_ent->port[i], (unsigned long)mmio, i);
From 48c3a87c0a7026866c014fcc1a55281585fa5a41 Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:48 -0500
Subject: [PATCH 22/42] ahci: fix unaligned access
gcc 4.7 will generate unaligned accesses to local char arrays, so make
them static to avoid that.
Signed-off-by: Rob Herring
Reviewed-by: Tom Rini
---
drivers/block/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 02ba02f..f4d1d81 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -610,7 +610,7 @@ static void dump_ataid(hd_driveid_t *ataid)
*/
static int ata_scsiop_inquiry(ccb *pccb)
{
- u8 hdr[] = {
+ static const u8 hdr[] = {
0,
0,
0x5, /* claim SPC-3 version compatibility */
From 796c2ebd6f17da605a05eb233c907e4d8330f751 Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:49 -0500
Subject: [PATCH 23/42] ahci: fix memory leak in ata_scsiop_inquiry
This fixes a memory leak when scsi inquiry fails.
Signed-off-by: Rob Herring
Reviewed-by: Tom Rini
---
drivers/block/ahci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index f4d1d81..f088063 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -643,6 +643,7 @@ static int ata_scsiop_inquiry(ccb *pccb)
if (ahci_device_data_io(port, (u8 *) &fis, sizeof(fis), tmpid,
sizeof(hd_driveid_t), 0)) {
debug("scsi_ahci: SCSI inquiry command failure.\n");
+ free(tmpid);
return -EIO;
}
From 2bdb10dbf59f41ead73fb3fa69699de1b621f423 Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:50 -0500
Subject: [PATCH 24/42] ahci: add defines for PORT_SCR_STAT register bits
Replace hard-coded register values with proper defines for PORT_SCR_STAT
register.
Signed-off-by: Rob Herring
---
drivers/block/ahci.c | 5 +++--
include/ahci.h | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index f088063..ad7e95f 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -207,7 +207,8 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
j = 0;
while (j < WAIT_MS_LINKUP) {
tmp = readl(port_mmio + PORT_SCR_STAT);
- if ((tmp & 0xf) == 0x3)
+ tmp &= PORT_SCR_STAT_DET_MASK;
+ if (tmp == PORT_SCR_STAT_DET_PHYRDY)
break;
udelay(1000);
j++;
@@ -258,7 +259,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
/* register linkup ports */
tmp = readl(port_mmio + PORT_SCR_STAT);
debug("SATA port %d status: 0x%x\n", i, tmp);
- if ((tmp & 0xf) == 0x03)
+ if ((tmp & PORT_SCR_STAT_DET_MASK) == PORT_SCR_STAT_DET_PHYRDY)
probe_ent->link_port_map |= (0x01 << i);
}
diff --git a/include/ahci.h b/include/ahci.h
index 78a8c55..d76993c 100644
--- a/include/ahci.h
+++ b/include/ahci.h
@@ -87,6 +87,11 @@
| PORT_IRQ_DMAS_FIS | PORT_IRQ_PIOS_FIS \
| PORT_IRQ_D2H_REG_FIS
+/* PORT_SCR_STAT bits */
+#define PORT_SCR_STAT_DET_MASK 0x3
+#define PORT_SCR_STAT_DET_COMINIT 0x1
+#define PORT_SCR_STAT_DET_PHYRDY 0x3
+
/* PORT_CMD bits */
#define PORT_CMD_ATAPI (1 << 24) /* Device is ATAPI */
#define PORT_CMD_LIST_ON (1 << 15) /* cmd list DMA engine running */
From 124e9fa132338c32409bd556c9c0a47a2bb70cc2 Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:51 -0500
Subject: [PATCH 25/42] ahci: move link bring-up handling to separate function
Move the link bring-up handling to a separate weak function in order to
allow platforms to override it. This is needed on highbank platform which
needs special phy handling.
Signed-off-by: Rob Herring
---
drivers/block/ahci.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index ad7e95f..5e7d01b 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -107,6 +107,27 @@ static int waiting_for_cmd_completed(volatile u8 *offset,
return (i < timeout_msec) ? 0 : -1;
}
+int __weak ahci_link_up(struct ahci_probe_ent *probe_ent, u8 port)
+{
+ u32 tmp;
+ int j = 0;
+ u8 *port_mmio = (u8 *)probe_ent->port[port].port_mmio;
+
+ /*
+ * Bring up SATA link.
+ * SATA link bringup time is usually less than 1 ms; only very
+ * rarely has it taken between 1-2 ms. Never seen it above 2 ms.
+ */
+ while (j < WAIT_MS_LINKUP) {
+ tmp = readl(port_mmio + PORT_SCR_STAT);
+ tmp &= PORT_SCR_STAT_DET_MASK;
+ if (tmp == PORT_SCR_STAT_DET_PHYRDY)
+ return 0;
+ udelay(1000);
+ j++;
+ }
+ return 1;
+}
static int ahci_host_init(struct ahci_probe_ent *probe_ent)
{
@@ -117,7 +138,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
#endif
volatile u8 *mmio = (volatile u8 *)probe_ent->mmio_base;
u32 tmp, cap_save, cmd;
- int i, j;
+ int i, j, ret;
volatile u8 *port_mmio;
u32 port_map;
@@ -200,20 +221,9 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
cmd |= PORT_CMD_SPIN_UP;
writel_with_flush(cmd, port_mmio + PORT_CMD);
- /* Bring up SATA link.
- * SATA link bringup time is usually less than 1 ms; only very
- * rarely has it taken between 1-2 ms. Never seen it above 2 ms.
- */
- j = 0;
- while (j < WAIT_MS_LINKUP) {
- tmp = readl(port_mmio + PORT_SCR_STAT);
- tmp &= PORT_SCR_STAT_DET_MASK;
- if (tmp == PORT_SCR_STAT_DET_PHYRDY)
- break;
- udelay(1000);
- j++;
- }
- if (j == WAIT_MS_LINKUP) {
+ /* Bring up SATA link. */
+ ret = ahci_link_up(probe_ent, i);
+ if (ret) {
printf("SATA link %d timeout.\n", i);
continue;
} else {
From 178210847f7d8492c6aa1d39867d99538be0e7d4 Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:52 -0500
Subject: [PATCH 26/42] ahci: handle COMINIT received during spin-up
Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes
the link to go down and we need to re-initialize the link.
Signed-off-by: Rob Herring
---
drivers/block/ahci.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 5e7d01b..a7044f2 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -243,8 +243,20 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
if (!(tmp & (ATA_STAT_BUSY | ATA_STAT_DRQ)))
break;
udelay(1000);
+ tmp = readl(port_mmio + PORT_SCR_STAT);
+ tmp &= PORT_SCR_STAT_DET_MASK;
+ if (tmp == PORT_SCR_STAT_DET_PHYRDY)
+ break;
j++;
}
+
+ tmp = readl(port_mmio + PORT_SCR_STAT) & PORT_SCR_STAT_DET_MASK;
+ if (tmp == PORT_SCR_STAT_DET_COMINIT) {
+ debug("SATA link %d down (COMINIT received), retrying...\n", i);
+ i--;
+ continue;
+ }
+
printf("Target spinup took %d ms.\n", j);
if (j == WAIT_MS_SPINUP)
debug("timeout.\n");
From 7610b41ddf3c8d1234b38817621f29407deaf32f Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:53 -0500
Subject: [PATCH 27/42] ahci: increase spin-up timeout to 20 sec
Based on Linux libata code, most drives are less than 10 sec, but some
need up to 20 sec.
Signed-off-by: Rob Herring
Reviewed-by: Tom Rini
---
drivers/block/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index a7044f2..7f78c00 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -38,7 +38,7 @@ hd_driveid_t *ataid[AHCI_MAX_PORTS];
#endif
/* Maximum timeouts for each event */
-#define WAIT_MS_SPINUP 10000
+#define WAIT_MS_SPINUP 20000
#define WAIT_MS_DATAIO 5000
#define WAIT_MS_FLUSH 5000
#define WAIT_MS_LINKUP 4
From 344ca0b40cf3a8feb1e7f9d4ff9e5041be706266 Mon Sep 17 00:00:00 2001
From: Rob Herring
Date: Sat, 24 Aug 2013 10:10:54 -0500
Subject: [PATCH 28/42] ahci: convert to use libata functions and definitions
libata already has similar functions as implemented in the ahci code.
Refactor the code to use the libata variants and remove the dependency on
ata.h. Convert some defines to use the version from libata.h. Also, remove
some unnecessary memset's of bss data.
This is a step toward hopefully merging ahci.c and dw_ahsata.c which are
essentially the same driver.
Signed-off-by: Rob Herring
Reviewed-by: Tom Rini
---
drivers/block/ahci.c | 80 +++++++++++++------------------------------
include/ahci.h | 23 -------------
include/configs/MPC8544DS.h | 1 +
include/configs/MPC8572DS.h | 1 +
include/configs/MPC8610HPCD.h | 1 +
include/configs/MPC8641HPCN.h | 1 +
include/configs/P2020DS.h | 1 +
include/configs/coreboot.h | 1 +
include/configs/highbank.h | 1 +
9 files changed, 31 insertions(+), 79 deletions(-)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 7f78c00..8cc9379 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -16,14 +16,14 @@
#include
#include
#include
-#include
+#include
#include
#include
static int ata_io_flush(u8 port);
struct ahci_probe_ent *probe_ent = NULL;
-hd_driveid_t *ataid[AHCI_MAX_PORTS];
+u16 *ataid[AHCI_MAX_PORTS];
#define writel_with_flush(a,b) do { writel(a,b); readl(b); } while (0)
@@ -240,7 +240,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
j = 0;
while (j < WAIT_MS_SPINUP) {
tmp = readl(port_mmio + PORT_TFDATA);
- if (!(tmp & (ATA_STAT_BUSY | ATA_STAT_DRQ)))
+ if (!(tmp & (ATA_BUSY | ATA_DRQ)))
break;
udelay(1000);
tmp = readl(port_mmio + PORT_SCR_STAT);
@@ -378,8 +378,6 @@ static int ahci_init_one(pci_dev_t pdev)
u16 vendor;
int rc;
- memset((void *)ataid, 0, sizeof(hd_driveid_t *) * AHCI_MAX_PORTS);
-
probe_ent = malloc(sizeof(struct ahci_probe_ent));
memset(probe_ent, 0, sizeof(struct ahci_probe_ent));
probe_ent->dev = pdev;
@@ -469,7 +467,7 @@ static void ahci_set_feature(u8 port)
memset(fis, 0, sizeof(fis));
fis[0] = 0x27;
fis[1] = 1 << 7;
- fis[2] = ATA_CMD_SETF;
+ fis[2] = ATA_CMD_SET_FEATURES;
fis[3] = SETFEATURES_XFER;
fis[12] = __ilog2(probe_ent->udma_mask + 1) + 0x40 - 0x01;
@@ -607,27 +605,6 @@ static char *ata_id_strcpy(u16 *target, u16 *src, int len)
return (char *)target;
}
-
-static void dump_ataid(hd_driveid_t *ataid)
-{
- debug("(49)ataid->capability = 0x%x\n", ataid->capability);
- debug("(53)ataid->field_valid =0x%x\n", ataid->field_valid);
- debug("(63)ataid->dma_mword = 0x%x\n", ataid->dma_mword);
- debug("(64)ataid->eide_pio_modes = 0x%x\n", ataid->eide_pio_modes);
- debug("(75)ataid->queue_depth = 0x%x\n", ataid->queue_depth);
- debug("(80)ataid->major_rev_num = 0x%x\n", ataid->major_rev_num);
- debug("(81)ataid->minor_rev_num = 0x%x\n", ataid->minor_rev_num);
- debug("(82)ataid->command_set_1 = 0x%x\n", ataid->command_set_1);
- debug("(83)ataid->command_set_2 = 0x%x\n", ataid->command_set_2);
- debug("(84)ataid->cfsse = 0x%x\n", ataid->cfsse);
- debug("(85)ataid->cfs_enable_1 = 0x%x\n", ataid->cfs_enable_1);
- debug("(86)ataid->cfs_enable_2 = 0x%x\n", ataid->cfs_enable_2);
- debug("(87)ataid->csf_default = 0x%x\n", ataid->csf_default);
- debug("(88)ataid->dma_ultra = 0x%x\n", ataid->dma_ultra);
- debug("(93)ataid->hw_config = 0x%x\n", ataid->hw_config);
-}
-
-
/*
* SCSI INQUIRY command operation.
*/
@@ -641,7 +618,7 @@ static int ata_scsiop_inquiry(ccb *pccb)
95 - 4,
};
u8 fis[20];
- u8 *tmpid;
+ u16 *tmpid;
u8 port;
/* Clean ccb data buffer */
@@ -656,15 +633,16 @@ static int ata_scsiop_inquiry(ccb *pccb)
/* Construct the FIS */
fis[0] = 0x27; /* Host to device FIS. */
fis[1] = 1 << 7; /* Command FIS. */
- fis[2] = ATA_CMD_IDENT; /* Command byte. */
+ fis[2] = ATA_CMD_ID_ATA; /* Command byte. */
/* Read id from sata */
port = pccb->target;
- if (!(tmpid = malloc(sizeof(hd_driveid_t))))
+ tmpid = malloc(ATA_ID_WORDS * 2);
+ if (!tmpid)
return -ENOMEM;
- if (ahci_device_data_io(port, (u8 *) &fis, sizeof(fis), tmpid,
- sizeof(hd_driveid_t), 0)) {
+ if (ahci_device_data_io(port, (u8 *) &fis, sizeof(fis), (u8 *)tmpid,
+ ATA_ID_WORDS * 2, 0)) {
debug("scsi_ahci: SCSI inquiry command failure.\n");
free(tmpid);
return -EIO;
@@ -672,13 +650,16 @@ static int ata_scsiop_inquiry(ccb *pccb)
if (ataid[port])
free(ataid[port]);
- ataid[port] = (hd_driveid_t *) tmpid;
+ ataid[port] = tmpid;
+ ata_swap_buf_le16(tmpid, ATA_ID_WORDS);
memcpy(&pccb->pdata[8], "ATA ", 8);
- ata_id_strcpy((u16 *) &pccb->pdata[16], (u16 *)ataid[port]->model, 16);
- ata_id_strcpy((u16 *) &pccb->pdata[32], (u16 *)ataid[port]->fw_rev, 4);
+ ata_id_strcpy((u16 *) &pccb->pdata[16], &tmpid[ATA_ID_PROD], 16);
+ ata_id_strcpy((u16 *) &pccb->pdata[32], &tmpid[ATA_ID_FW_REV], 4);
- dump_ataid(ataid[port]);
+#ifdef DEBUG
+ ata_dump_id(tmpid);
+#endif
return 0;
}
@@ -726,7 +707,7 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
now_blocks = min(MAX_SATA_BLOCKS_READ_WRITE, blocks);
- transfer_size = ATA_BLOCKSIZE * now_blocks;
+ transfer_size = ATA_SECT_SIZE * now_blocks;
if (transfer_size > user_buffer_size) {
printf("scsi_ahci: Error: buffer too small.\n");
return -EIO;
@@ -781,6 +762,7 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
static int ata_scsiop_read_capacity10(ccb *pccb)
{
u32 cap;
+ u64 cap64;
u32 block_size;
if (!ataid[pccb->target]) {
@@ -790,18 +772,11 @@ static int ata_scsiop_read_capacity10(ccb *pccb)
return -EPERM;
}
- cap = le32_to_cpu(ataid[pccb->target]->lba_capacity);
- if (cap == 0xfffffff) {
- unsigned short *cap48 = ataid[pccb->target]->lba48_capacity;
- if (cap48[2] || cap48[3]) {
- cap = 0xffffffff;
- } else {
- cap = (le16_to_cpu(cap48[1]) << 16) |
- (le16_to_cpu(cap48[0]));
- }
- }
+ cap64 = ata_id_n_sectors(ataid[pccb->target]);
+ if (cap64 > 0x100000000ULL)
+ cap64 = 0xffffffff;
- cap = cpu_to_be32(cap);
+ cap = cpu_to_be32(cap64);
memcpy(pccb->pdata, &cap, sizeof(cap));
block_size = cpu_to_be32((u32)512);
@@ -826,12 +801,7 @@ static int ata_scsiop_read_capacity16(ccb *pccb)
return -EPERM;
}
- cap = le32_to_cpu(ataid[pccb->target]->lba_capacity);
- if (cap == 0xfffffff) {
- memcpy(&cap, ataid[pccb->target]->lba48_capacity, sizeof(cap));
- cap = le64_to_cpu(cap);
- }
-
+ cap = ata_id_n_sectors(ataid[pccb->target]);
cap = cpu_to_be64(cap);
memcpy(pccb->pdata, &cap, sizeof(cap));
@@ -918,8 +888,6 @@ int ahci_init(u32 base)
int i, rc = 0;
u32 linkmap;
- memset(ataid, 0, sizeof(ataid));
-
probe_ent = malloc(sizeof(struct ahci_probe_ent));
memset(probe_ent, 0, sizeof(struct ahci_probe_ent));
diff --git a/include/ahci.h b/include/ahci.h
index d76993c..90e8509 100644
--- a/include/ahci.h
+++ b/include/ahci.h
@@ -108,29 +108,6 @@
#define AHCI_MAX_PORTS 32
-/* SETFEATURES stuff */
-#define SETFEATURES_XFER 0x03
-#define XFER_UDMA_7 0x47
-#define XFER_UDMA_6 0x46
-#define XFER_UDMA_5 0x45
-#define XFER_UDMA_4 0x44
-#define XFER_UDMA_3 0x43
-#define XFER_UDMA_2 0x42
-#define XFER_UDMA_1 0x41
-#define XFER_UDMA_0 0x40
-#define XFER_MW_DMA_2 0x22
-#define XFER_MW_DMA_1 0x21
-#define XFER_MW_DMA_0 0x20
-#define XFER_SW_DMA_2 0x12
-#define XFER_SW_DMA_1 0x11
-#define XFER_SW_DMA_0 0x10
-#define XFER_PIO_4 0x0C
-#define XFER_PIO_3 0x0B
-#define XFER_PIO_2 0x0A
-#define XFER_PIO_1 0x09
-#define XFER_PIO_0 0x08
-#define XFER_PIO_SLOW 0x00
-
#define ATA_FLAG_SATA (1 << 3)
#define ATA_FLAG_NO_LEGACY (1 << 4) /* no legacy mode check */
#define ATA_FLAG_MMIO (1 << 6) /* use MMIO, not PIO */
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 2a5e5d4..7f16285 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -318,6 +318,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_SCSI_AHCI
#ifdef CONFIG_SCSI_AHCI
+#define CONFIG_LIBATA
#define CONFIG_SATA_ULI5288
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
#define CONFIG_SYS_SCSI_MAX_LUN 1
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 05d8870..acd3981 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -539,6 +539,7 @@
#define CONFIG_SCSI_AHCI
#ifdef CONFIG_SCSI_AHCI
+#define CONFIG_LIBATA
#define CONFIG_SATA_ULI5288
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
#define CONFIG_SYS_SCSI_MAX_LUN 1
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index 1553a74..0b2cf87 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -326,6 +326,7 @@
#define CONFIG_SCSI_AHCI
#ifdef CONFIG_SCSI_AHCI
+#define CONFIG_LIBATA
#define CONFIG_SATA_ULI5288
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
#define CONFIG_SYS_SCSI_MAX_LUN 1
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index 6ca6f6b..0945ae1 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -412,6 +412,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_SCSI_AHCI
#ifdef CONFIG_SCSI_AHCI
+#define CONFIG_LIBATA
#define CONFIG_SATA_ULI5288
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
#define CONFIG_SYS_SCSI_MAX_LUN 1
diff --git a/include/configs/P2020DS.h b/include/configs/P2020DS.h
index b5078cd..785e497 100644
--- a/include/configs/P2020DS.h
+++ b/include/configs/P2020DS.h
@@ -513,6 +513,7 @@
#define CONFIG_SCSI_AHCI
#ifdef CONFIG_SCSI_AHCI
+#define CONFIG_LIBATA
#define CONFIG_SATA_ULI5288
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
#define CONFIG_SYS_SCSI_MAX_LUN 1
diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h
index c2dcef8..47215e5 100644
--- a/include/configs/coreboot.h
+++ b/include/configs/coreboot.h
@@ -56,6 +56,7 @@
#define CONFIG_SCSI_AHCI
#ifdef CONFIG_SCSI_AHCI
+#define CONFIG_LIBATA
#define CONFIG_SYS_64BIT_LBA
#define CONFIG_SATA_INTEL 1
#define CONFIG_SCSI_DEV_LIST {PCI_VENDOR_ID_INTEL, \
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index a5743d6..afb6e64 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -39,6 +39,7 @@
#define CONFIG_SYS_BOOTCOUNT_ADDR 0xfff3cf0c
#define CONFIG_MISC_INIT_R
+#define CONFIG_LIBATA
#define CONFIG_SCSI_AHCI
#define CONFIG_SCSI_AHCI_PLAT
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 5
From 4c267374a29156a3109d2a4394bc9df41e10b620 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?=
Date: Tue, 27 Aug 2013 00:37:22 +0200
Subject: [PATCH 29/42] Always build u-boot.img when using CONFIG_SPL_FRAMEWORK
Use of uImage formatted u-boot have long been preferred, and recent
changes to better support Falcon mode on MMC now enforces it on MMC.
Signed-off-by: Henrik Nordstrom
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index ed48279..8aa8039 100644
--- a/Makefile
+++ b/Makefile
@@ -398,6 +398,7 @@ ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin
ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin
ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin
+ALL-$(CONFIG_SPL_FRAMEWORK) += $(obj)u-boot.img
ALL-$(CONFIG_TPL) += $(obj)tpl/u-boot-tpl.bin
ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin
ifneq ($(CONFIG_SPL_TARGET),)
From a82ca7bcd7c50fdd710a5eee6b739429c2d8f8d8 Mon Sep 17 00:00:00 2001
From: Marek Vasut
Date: Tue, 27 Aug 2013 23:32:11 +0200
Subject: [PATCH 30/42] mail: Fix email address
Fix my email address.
Signed-off-by: Marek Vasut
Cc: Tom Rini
---
doc/git-mailrc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/git-mailrc b/doc/git-mailrc
index 03fc482..2cacaa0 100644
--- a/doc/git-mailrc
+++ b/doc/git-mailrc
@@ -22,7 +22,7 @@ alias jasonjin Jason Jin
alias jhersh Joe Hershberger
alias kimphill Kim Phillips
alias macpaul Macpaul Lin
-alias marex Marek Vasut
+alias marex Marek Vasut
alias monstr Michal Simek
alias panto Pantelis Antoniou
alias prafulla Prafulla Wadaskar
From 23ef62d741911e75f23bfa500005bf08044be0a2 Mon Sep 17 00:00:00 2001
From: Oliver Metz
Date: Fri, 30 Aug 2013 00:56:01 +0200
Subject: [PATCH 31/42] fw_env: add redundant env support for MTD_ABSENT
Signed-off-by: Oliver Metz
Tested-by: Luka Perkov
---
tools/env/fw_env.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 44607b1..65be5f3 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1136,6 +1136,9 @@ int fw_env_open(void)
} else if (DEVTYPE(dev_current) == MTD_UBIVOLUME &&
DEVTYPE(!dev_current) == MTD_UBIVOLUME) {
environment.flag_scheme = FLAG_INCREMENTAL;
+ } else if (DEVTYPE(dev_current) == MTD_ABSENT &&
+ DEVTYPE(!dev_current) == MTD_ABSENT) {
+ environment.flag_scheme = FLAG_INCREMENTAL;
} else {
fprintf (stderr, "Incompatible flash types!\n");
return -1;
From e387efbd6535724051364fd78469ef611165e489 Mon Sep 17 00:00:00 2001
From: Oliver Metz
Date: Fri, 30 Aug 2013 00:56:02 +0200
Subject: [PATCH 32/42] fw_env: fix writing environment for mtd devices
Signed-off-by: Oliver Metz
Tested-by: Luka Perkov
---
tools/env/fw_env.c | 70 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 42 insertions(+), 28 deletions(-)
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 65be5f3..577ce2d 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -727,27 +727,39 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,
MEMGETBADBLOCK needs 64 bits */
int rc;
- blocklen = DEVESIZE (dev);
+ /*
+ * For mtd devices only offset and size of the environment do matter
+ */
+ if (mtd_type == MTD_ABSENT) {
+ blocklen = count;
+ top_of_range = offset + count;
+ erase_len = blocklen;
+ blockstart = offset;
+ block_seek = 0;
+ write_total = blocklen;
+ } else {
+ blocklen = DEVESIZE(dev);
- top_of_range = ((DEVOFFSET(dev) / blocklen) +
- ENVSECTORS (dev)) * blocklen;
+ top_of_range = ((DEVOFFSET(dev) / blocklen) +
+ ENVSECTORS(dev)) * blocklen;
- erase_offset = (offset / blocklen) * blocklen;
+ erase_offset = (offset / blocklen) * blocklen;
- /* Maximum area we may use */
- erase_len = top_of_range - erase_offset;
+ /* Maximum area we may use */
+ erase_len = top_of_range - erase_offset;
- blockstart = erase_offset;
- /* Offset inside a block */
- block_seek = offset - erase_offset;
+ blockstart = erase_offset;
+ /* Offset inside a block */
+ block_seek = offset - erase_offset;
- /*
- * Data size we actually have to write: from the start of the block
- * to the start of the data, then count bytes of data, and to the
- * end of the block
- */
- write_total = ((block_seek + count + blocklen - 1) /
- blocklen) * blocklen;
+ /*
+ * Data size we actually write: from the start of the block
+ * to the start of the data, then count bytes of data, and
+ * to the end of the block
+ */
+ write_total = ((block_seek + count + blocklen - 1) /
+ blocklen) * blocklen;
+ }
/*
* Support data anywhere within erase sectors: read out the complete
@@ -818,17 +830,18 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,
continue;
}
- erase.start = blockstart;
- ioctl (fd, MEMUNLOCK, &erase);
- /* These do not need an explicit erase cycle */
- if (mtd_type != MTD_ABSENT &&
- mtd_type != MTD_DATAFLASH)
- if (ioctl (fd, MEMERASE, &erase) != 0) {
- fprintf (stderr, "MTD erase error on %s: %s\n",
- DEVNAME (dev),
- strerror (errno));
- return -1;
- }
+ if (mtd_type != MTD_ABSENT) {
+ erase.start = blockstart;
+ ioctl(fd, MEMUNLOCK, &erase);
+ /* These do not need an explicit erase cycle */
+ if (mtd_type != MTD_DATAFLASH)
+ if (ioctl(fd, MEMERASE, &erase) != 0) {
+ fprintf(stderr,
+ "MTD erase error on %s: %s\n",
+ DEVNAME(dev), strerror(errno));
+ return -1;
+ }
+ }
if (lseek (fd, blockstart, SEEK_SET) == -1) {
fprintf (stderr,
@@ -847,7 +860,8 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,
return -1;
}
- ioctl (fd, MEMLOCK, &erase);
+ if (mtd_type != MTD_ABSENT)
+ ioctl(fd, MEMLOCK, &erase);
processed += blocklen;
block_seek = 0;
From cb4ef5ba3653a60a4b7fcd59bab4c032cd5cc82a Mon Sep 17 00:00:00 2001
From: Masahiro Yamada
Date: Sun, 1 Sep 2013 15:04:26 +0900
Subject: [PATCH 33/42] config.mk: Delete unnecessary code
Currently no makefiles (board-specific config.mk)
set the following variables:
CONFIG_SPL_TEXT_BASE
CONFIG_UBOOT_PAD_TO
CONFIG_RESET_VECTOR_ADDRESS
CONFIG_TPL_PAD_TO
For all target boards using above macros
they are set in header files (include/configs/*.h),
so we do not need to set them as CPPFLAGS.
Signed-off-by: Masahiro Yamada
---
config.mk | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/config.mk b/config.mk
index b3ecaa7..5dfbad7 100644
--- a/config.mk
+++ b/config.mk
@@ -232,22 +232,10 @@ ifneq ($(CONFIG_SYS_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
endif
-ifneq ($(CONFIG_SPL_TEXT_BASE),)
-CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE)
-endif
-
ifneq ($(CONFIG_SPL_PAD_TO),)
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
endif
-ifneq ($(CONFIG_TPL_PAD_TO),)
-CPPFLAGS += -DCONFIG_TPL_PAD_TO=$(CONFIG_TPL_PAD_TO)
-endif
-
-ifneq ($(CONFIG_UBOOT_PAD_TO),)
-CPPFLAGS += -DCONFIG_UBOOT_PAD_TO=$(CONFIG_UBOOT_PAD_TO)
-endif
-
ifeq ($(CONFIG_SPL_BUILD),y)
CPPFLAGS += -DCONFIG_SPL_BUILD
ifeq ($(CONFIG_TPL_BUILD),y)
@@ -263,10 +251,6 @@ Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
endif
endif
-ifneq ($(RESET_VECTOR_ADDRESS),)
-CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
-endif
-
ifneq ($(OBJTREE),$(SRCTREE))
CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
endif
From 1affd4d4a3fe512050e1ad1636d9360c670da531 Mon Sep 17 00:00:00 2001
From: Masahiro Yamada
Date: Sun, 1 Sep 2013 15:04:27 +0900
Subject: [PATCH 34/42] cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header
For most boards which define CONFIG_SPL_PAD_TO,
it is defined in config header files.
Currently, there exists only one exception, cam_enc_4xx board.
This patch moves CONFIG_SPL_PAD_TO definition
from board/ait/cam_enc_4xx/config.mk
to include/configs/cam_enc_4xx.h.
With this modification, we can delete a glue code
in the top level config.mk:
ifneq ($(CONFIG_SPL_PAD_TO),)
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
endif
Signed-off-by: Masahiro Yamada
Cc: Heiko Schocher
---
board/ait/cam_enc_4xx/config.mk | 2 --
config.mk | 4 ----
include/configs/cam_enc_4xx.h | 2 ++
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/board/ait/cam_enc_4xx/config.mk b/board/ait/cam_enc_4xx/config.mk
index c280029..d7e7894 100644
--- a/board/ait/cam_enc_4xx/config.mk
+++ b/board/ait/cam_enc_4xx/config.mk
@@ -7,8 +7,6 @@
# (mem base + reserved)
#
-#Provide at least 16MB spacing between us and the Linux Kernel image
-CONFIG_SPL_PAD_TO := 12320
UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg
ifndef CONFIG_SPL_BUILD
ALL-y += $(obj)u-boot.ubl
diff --git a/config.mk b/config.mk
index 5dfbad7..b55ed56 100644
--- a/config.mk
+++ b/config.mk
@@ -232,10 +232,6 @@ ifneq ($(CONFIG_SYS_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
endif
-ifneq ($(CONFIG_SPL_PAD_TO),)
-CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
-endif
-
ifeq ($(CONFIG_SPL_BUILD),y)
CPPFLAGS += -DCONFIG_SPL_BUILD
ifeq ($(CONFIG_TPL_BUILD),y)
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index ac7ed81..db9eb0f 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -216,6 +216,8 @@
#define CONFIG_SPL_STACK (0x00010000 + 0x7f00)
#define CONFIG_SPL_TEXT_BASE 0x00000020 /*CONFIG_SYS_SRAM_START*/
+/* Provide at least 16MB spacing between us and the Linux Kernel image */
+#define CONFIG_SPL_PAD_TO 12320
#define CONFIG_SPL_MAX_FOOTPRINT 12288
#ifndef CONFIG_SPL_BUILD
From 9055f66c2dfb637d0f30372a7e79cca854e45bae Mon Sep 17 00:00:00 2001
From: Stefan Roese
Date: Mon, 26 Aug 2013 12:08:48 +0200
Subject: [PATCH 35/42] ppc4xx: Fix GPIO handling in lwmon5 and lcd4_lwmon5 BSP
LCD4 needs a slightly different GPIO configuration than the
original LWMON5 variant. GPIO49 needs to be configured to a
default output value of 0 (permanent voltage supply).
Additionally lcd4 also needs to enable the LSB transmitter.
Signed-off-by: Stefan Roese
---
board/lwmon5/lwmon5.c | 3 +++
include/configs/lwmon5.h | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c
index 4e4a594..e9aa0b7 100644
--- a/board/lwmon5/lwmon5.c
+++ b/board/lwmon5/lwmon5.c
@@ -527,6 +527,9 @@ void spl_board_init(void)
*/
board_early_init_f();
+ /* enable the LSB transmitter */
+ gpio_write_bit(CONFIG_SYS_GPIO_LSB_ENABLE, 1);
+
/*
* Clear resets
*/
diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h
index 8f5eb95..96f3ba5 100644
--- a/include/configs/lwmon5.h
+++ b/include/configs/lwmon5.h
@@ -565,6 +565,7 @@
#define CONFIG_SYS_GPIO_PHY1_RST 12
#define CONFIG_SYS_GPIO_FLASH_WP 14
#define CONFIG_SYS_GPIO_PHY0_RST 22
+#define CONFIG_SYS_GPIO_PERM_VOLT_FEED 49
#define CONFIG_SYS_GPIO_DSPIC_READY 51
#define CONFIG_SYS_GPIO_CAN_ENABLE 53
#define CONFIG_SYS_GPIO_LSB_ENABLE 54
@@ -577,6 +578,13 @@
#define CONFIG_SYS_GPIO_SYSMON_STATUS 62
#define CONFIG_SYS_GPIO_WATCHDOG 63
+/* On LCD4, GPIO49 has to be configured to 0 instead of 1 */
+#ifdef CONFIG_LCD4_LWMON5
+#define GPIO49_VAL 0
+#else
+#define GPIO49_VAL 1
+#endif
+
/*
* PPC440 GPIO Configuration
*/
@@ -635,7 +643,7 @@
{GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO46 UIC_IRQ(7) DMA_REQ(0) */ \
{GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO47 UIC_IRQ(8) DMA_ACK(0) */ \
{GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO48 UIC_IRQ(9) DMA_EOT/TC(0) */ \
-{GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO49 Unselect via TraceSelect Bit */ \
+{GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO49_VAL}, /* GPIO49 Unselect via TraceSelect Bit */ \
{GPIO1_BASE, GPIO_IN, GPIO_SEL , GPIO_OUT_0}, /* GPIO50 Unselect via TraceSelect Bit */ \
{GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO51 Unselect via TraceSelect Bit */ \
{GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO52 Unselect via TraceSelect Bit */ \
From 81b867aa4451e745b9706b00e53793df6b52f42a Mon Sep 17 00:00:00 2001
From: Ying Zhang
Date: Wed, 4 Sep 2013 17:03:45 +0800
Subject: [PATCH 36/42] SPL: P1022DS: switch to new multibus/multiadapter
support
- Added section "u_boot_list" in arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
- Use the function i2c_init_all instead of i2c_init
Signed-off-by: Ying Zhang
---
arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 5 +++++
board/freescale/p1022ds/spl.c | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
index 85ec74b..bc13267 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
@@ -44,6 +44,11 @@ SECTIONS
}
_edata = .;
+ . = ALIGN(4);
+ .u_boot_list : {
+ KEEP(*(SORT(.u_boot_list*)));
+ }
+
. = .;
__start___ex_table = .;
__ex_table : { *(__ex_table) }
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index b9dbf81..7f151e3 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -102,7 +102,11 @@ void board_init_r(gd_t *gd, ulong dest_addr)
env_relocate();
#endif
- i2c_init(CONFIG_SYS_FSL_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#ifdef CONFIG_SYS_I2C
+ i2c_init_all();
+#else
+ i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
gd->ram_size = initdram(0);
#ifdef CONFIG_SPL_NAND_BOOT
From f62b123813ea604d16ed6115fe2fa552b23d9102 Mon Sep 17 00:00:00 2001
From: Tang Yuantian
Date: Fri, 6 Sep 2013 10:45:40 +0800
Subject: [PATCH 37/42] powerpc/mpc85xx: Fix the I2C bus speed error on p1022
The source clock frequency of I2C bus on p1022 is the platform(CCB)
clock, not CCB/2. The wrong source clock frequency leads to wrong
I2C bus speed setting. so, fixed it.
Signed-off-by: Tang Yuantian
---
arch/powerpc/cpu/mpc85xx/speed.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index 07690f9..4b8d928 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -399,7 +399,8 @@ int get_clocks (void)
* AN2919.
*/
#if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
- defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555)
+ defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555) || \
+ defined(CONFIG_P1022)
gd->arch.i2c1_clk = sys_info.freq_systembus;
#elif defined(CONFIG_MPC8544)
/*
From e2238328f7e21585f8583389359469359efd0463 Mon Sep 17 00:00:00 2001
From: Chander Kashyap
Date: Tue, 10 Sep 2013 13:41:36 +0530
Subject: [PATCH 38/42] dts: samsung: arndale: Fix include path
As per new convention ARCH_CPU_DTS is not defined in "dtc/Makefile".
Hence Arndale comilation is failing. Fix this by adding proper include
file in "board/samsung/dts/exynos5250-arndale.dts".
Signed-off-by: Chander Kashyap
Signed-off-by: Minkyu Kang
---
board/samsung/dts/exynos5250-arndale.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts
index c700e45..202f2ea 100644
--- a/board/samsung/dts/exynos5250-arndale.dts
+++ b/board/samsung/dts/exynos5250-arndale.dts
@@ -8,7 +8,7 @@
*/
/dts-v1/;
-/include/ ARCH_CPU_DTS
+#include "exynos5250.dtsi"
/ {
model = "SAMSUNG Arndale board based on EXYNOS5250";
From 7324907082b94679fe57ba0067c1079a03cbfd89 Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Tue, 3 Sep 2013 14:57:52 +0200
Subject: [PATCH 39/42] arm:mmc:goni/exynos: Fix wrong mmc base register
devices offset.
On s5pc1xx mmc devices offset is multiply of 0x100000,
wrong value was 0x10000. Register offset always points
to mmc 0 before this change.
Add macro definition of mmc dev register offset to s5pc1xx and
exynos mmc.
Signed-off-by: Przemyslaw Marczak
Signed-off-by: Kyungmin Park
CC: Minkyu Kang
Acked-by: Jaehoon Chung
Signed-off-by: Minkyu Kang
---
arch/arm/include/asm/arch-exynos/mmc.h | 6 +++++-
arch/arm/include/asm/arch-s5pc1xx/mmc.h | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/arch-exynos/mmc.h b/arch/arm/include/asm/arch-exynos/mmc.h
index 96610b8..98312d1 100644
--- a/arch/arm/include/asm/arch-exynos/mmc.h
+++ b/arch/arm/include/asm/arch-exynos/mmc.h
@@ -8,6 +8,8 @@
#ifndef __ASM_ARCH_MMC_H_
#define __ASM_ARCH_MMC_H_
+#define S5P_MMC_DEV_OFFSET 0x10000
+
#define SDHCI_CONTROL2 0x80
#define SDHCI_CONTROL3 0x84
#define SDHCI_CONTROL4 0x8C
@@ -55,7 +57,9 @@ int s5p_sdhci_init(u32 regbase, int index, int bus_width);
static inline unsigned int s5p_mmc_init(int index, int bus_width)
{
- unsigned int base = samsung_get_base_mmc() + (0x10000 * index);
+ unsigned int base = samsung_get_base_mmc() +
+ (S5P_MMC_DEV_OFFSET * index);
+
return s5p_sdhci_init(base, index, bus_width);
}
#endif
diff --git a/arch/arm/include/asm/arch-s5pc1xx/mmc.h b/arch/arm/include/asm/arch-s5pc1xx/mmc.h
index 96610b8..55ff10b 100644
--- a/arch/arm/include/asm/arch-s5pc1xx/mmc.h
+++ b/arch/arm/include/asm/arch-s5pc1xx/mmc.h
@@ -8,6 +8,8 @@
#ifndef __ASM_ARCH_MMC_H_
#define __ASM_ARCH_MMC_H_
+#define S5P_MMC_DEV_OFFSET 0x100000
+
#define SDHCI_CONTROL2 0x80
#define SDHCI_CONTROL3 0x84
#define SDHCI_CONTROL4 0x8C
@@ -55,7 +57,9 @@ int s5p_sdhci_init(u32 regbase, int index, int bus_width);
static inline unsigned int s5p_mmc_init(int index, int bus_width)
{
- unsigned int base = samsung_get_base_mmc() + (0x10000 * index);
+ unsigned int base = samsung_get_base_mmc() +
+ (S5P_MMC_DEV_OFFSET * index);
+
return s5p_sdhci_init(base, index, bus_width);
}
#endif
From 5c18a1cf3e56e0177388258696be4a17a672e9d0 Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Tue, 10 Sep 2013 11:34:49 +0200
Subject: [PATCH 40/42] arm:goni:mmc: Add sd card detection and initialization.
This change allow to use sd card on Goni the same like mmc 0.
SD card is mmc dev 1, so it can be used like this: "fatls mmc 1:2".
SD card is inited even if eMMC initialization fails.
Signed-off-by: Przemyslaw Marczak
Signed-off-by: Kyungmin Park
CC: Minkyu Kang
Acked-by: Jaehoon Chung
Signed-off-by: Minkyu Kang
---
board/samsung/goni/goni.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index c05801d..4ddff04 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -68,7 +68,7 @@ int checkboard(void)
#ifdef CONFIG_GENERIC_MMC
int board_mmc_init(bd_t *bis)
{
- int i;
+ int i, ret, ret_sd = 0;
/* MASSMEMORY_EN: XMSMDATA7: GPJ2[7] output high */
s5p_gpio_direction_output(&s5pc110_gpio->j2, 7, 1);
@@ -91,7 +91,36 @@ int board_mmc_init(bd_t *bis)
s5p_gpio_set_drv(&s5pc110_gpio->g0, i, GPIO_DRV_4X);
}
- return s5p_mmc_init(0, 4);
+ ret = s5p_mmc_init(0, 4);
+ if (ret)
+ error("MMC: Failed to init MMC:0.\n");
+
+ /*
+ * SD card (T_FLASH) detect and init
+ * T_FLASH_DETECT: EINT28: GPH3[4] input mode
+ */
+ s5p_gpio_cfg_pin(&s5pc110_gpio->h3, 4, GPIO_INPUT);
+ s5p_gpio_set_pull(&s5pc110_gpio->h3, 4, GPIO_PULL_UP);
+
+ if (!s5p_gpio_get_value(&s5pc110_gpio->h3, 4)) {
+ for (i = 0; i < 7; i++) {
+ if (i == 2)
+ continue;
+
+ /* GPG2[0:6] special function 2 */
+ s5p_gpio_cfg_pin(&s5pc110_gpio->g2, i, 0x2);
+ /* GPG2[0:6] pull disable */
+ s5p_gpio_set_pull(&s5pc110_gpio->g2, i, GPIO_PULL_NONE);
+ /* GPG2[0:6] drv 4x */
+ s5p_gpio_set_drv(&s5pc110_gpio->g2, i, GPIO_DRV_4X);
+ }
+
+ ret_sd = s5p_mmc_init(2, 4);
+ if (ret_sd)
+ error("MMC: Failed to init SD card (MMC:2).\n");
+ }
+
+ return ret & ret_sd;
}
#endif
From 27af930e9a5c91365ca639ada580b338eabe4989 Mon Sep 17 00:00:00 2001
From: Albert ARIBAUD
Date: Wed, 11 Sep 2013 15:52:51 +0200
Subject: [PATCH 41/42] Merge and reformat boards.cfg and MAINTAINERS
Put all informations about targets, including state (active or
orphan) and maintainers, in boards.cfg; remove MAINTAINERS;
adjust the build system accordingly.
Signed-off-by: Albert ARIBAUD
---
MAINTAINERS | 1412 ----------------------------
MAKEALL | 51 +-
Makefile | 2 +-
README | 6 +-
boards.cfg | 2345 ++++++++++++++++++++++++-----------------------
mkconfig | 31 +-
tools/buildman/board.py | 2 +-
tools/reformat.py | 132 +++
8 files changed, 1350 insertions(+), 2631 deletions(-)
delete mode 100644 MAINTAINERS
create mode 100755 tools/reformat.py
diff --git a/MAINTAINERS b/MAINTAINERS
deleted file mode 100644
index 86a5ce4..0000000
--- a/MAINTAINERS
+++ /dev/null
@@ -1,1412 +0,0 @@
-#########################################################################
-# #
-# Regular Maintainers for U-Boot board support: #
-# #
-# For any board without permanent maintainer, please contact #
-# Wolfgang Denk #
-# and Cc: the mailing list. #
-# #
-# Note: lists sorted by Maintainer Name #
-# Note: These are the maintainers for specific *boards*. The #
-# custodians for general architectures and subsystems can #
-# be found here -- http://www.denx.de/wiki/U-Boot/Custodians #
-# #
-#########################################################################
-
-
-#########################################################################
-# PowerPC Systems: #
-# #
-# Maintainer Name, Email Address #
-# Board CPU #
-#########################################################################
-
-Poonam Aggrwal
-
- P2020RDB P2020
-
- BSC9131RDB BSC9131
-
-Naveen Burmi
-
- BSC9132QDS BSC9132
-
-Greg Allen
-
- UTX8245 MPC8245
-
-Pantelis Antoniou
-
- NETVIA MPC8xx
-
-Reinhard Arlt
-
- cpci5200 MPC5200
- mecp5123 MPC5121
- mecp5200 MPC5200
- pf5200 MPC5200
-
- caddy2 MPC8349
- vme8349 MPC8349
-
- CPCI750 PPC750FX/GX
-
-Peter Barada
-
- omap3_logic ARM ARMV7 (Logic OMAP35xx/DM37xx)
-
-Yuli Barcohen
-
- Adder MPC87x/MPC852T
- ep8248 MPC8248
- ISPAN MPC8260
- MPC8260ADS MPC826x/MPC827x/MPC8280
- Rattler MPC8248
- ZPC1900 MPC8265
-
-Michael Barkowski
-
- MPC8323ERDB MPC8323
-
-Jerry Van Baren
-
- sacsng MPC8260
-
-Oliver Brown
-
- gw8260 MPC8260
-
-Holger Brunck
-
- kmeter1 MPC8360
- kmcoge5ne MPC8360
- mgcoge MPC8247
- mgcoge3ne MPC8247
- suvd3 MPC8321
- tuge1 MPC8321
- tuxx1 MPC8321
-
-Conn Clark
-
- ESTEEM192E MPC8xx
-
-Jason Cooper
-
- dreamplug ARM926EJS (Kirkwood SoC)
-
-Joe D'Abbraccio
-
- MPC837xERDB MPC837x
-
-Kári DavÃðsson
-
- FLAGADM MPC823
-
-Torsten Demke
-
- eXalion MPC824x
-
-Wolfgang Denk
-
- IceCube_5200 MPC5200
-
- ARIA MPC5121e
-
- FPS850L MPC850
- FPS860L MPC860
- ICU862 MPC862
- IP860 MPC860
- IVML24 MPC860
- IVML24_128 MPC860
- IVML24_256 MPC860
- IVMS8 MPC860
- IVMS8_128 MPC860
- IVMS8_256 MPC860
- LWMON MPC823
- R360MPI MPC823
- RRvision MPC823
- SM850 MPC850
- SPD823TS MPC823
- TQM823L MPC823
- TQM823L_LCD MPC823
- TQM850L MPC850
- TQM855L MPC855
- TQM860L MPC860
- TQM860L_FEC MPC860
- hermes MPC860
- lwmon MPC823
-
- CU824 MPC8240
- Sandpoint8240 MPC8240
-
- ATC MPC8250
- PM825 MPC8250
-
- TQM8255 MPC8255
-
- CPU86 MPC8260
- PM826 MPC8260
- TQM8260 MPC8260
-
- P3G4 MPC7410
-
-Phil Edworthy
-
- rsk7264 SH7264
-
-egnite GmbH
-
- ethernut5 ARM926EJS (AT91SAM9XE SoC)
-
-Dirk Eibach
-
- controlcenterd P1022
- devconcenter PPC460EX
- dlvision PPC405EP
- dlvision-10g PPC405EP
- gdppc440etx PPC440EP/GR
- intip PPC460EX
- io PPC405EP
- io64 PPC405EX
- iocon PPC405EP
- neo PPC405EP
-
-Dave Ellis
-
- SXNI855T MPC8xx
-
-Thomas Frieden
-
- AmigaOneG3SE MPC7xx
-
-Matthias Fuchs
-
- APC405 PPC405GP
- AR405 PPC405GP
- ASH405 PPC405EP
- CPCI2DP PPC405GP
- CPCI405 PPC405GP
- CPCI4052 PPC405GP
- CPCI405AB PPC405GP
- CPCI405DT PPC405GP
- CPCIISER4 PPC405GP
- DP405 PPC405EP
- DU405 PPC405GP
- DU440 PPC440EPx
- G2000 PPC405EP
- HH405 PPC405EP
- HUB405 PPC405EP
- OCRTC PPC405GP
- ORSG PPC405GP
- PCI405 PPC405GP
- PLU405 PPC405EP
- PMC405 PPC405GP
- PMC405DE PPC405EP
- PMC440 PPC440EPx
- VOH405 PPC405EP
- VOM405 PPC405EP
- WUH405 PPC405EP
- CMS700 PPC405EP
-
-Siddarth Gore
-
- guruplug ARM926EJS (Kirkwood SoC)
-
-Paul Gortmaker
-
- sbc8349 MPC8349
- sbc8548 MPC8548
- sbc8641d MPC8641D
-
-Frank Gottschling
-
- MHPC MPC8xx
-
-Wolfgang Grandegger
-
- ipek01 MPC5200
-
- PN62 MPC8240
- IPHASE4539 MPC8260
-
-Anatolij Gustschin
-
- ac14xx MPC5121e
- O2D MPC5200
- O2D300 MPC5200
- O2DNT2 MPC5200
- O2I MPC5200
- O2MNT MPC5200
- O3DNT MPC5200
-
-Rob Herring
-
- highbank highbank
-
-Klaus Heydeck
-
- KUP4K MPC855
- KUP4X MPC859
-
-Gabriel Huau
-
- mini2440 s3c2440
-
-Gary Jennejohn
-
- quad100hd PPC405EP
-
-Murray Jensen
-
- cogent_mpc8xx MPC8xx
-
- cogent_mpc8260 MPC8260
- hymod MPC8260
-
-Larry Johnson
-
- korat PPC440EPx
-
-Feng Kan
-
- redwood PPC4xx
-
-Brad Kemp
-
- ppmc8260 MPC8260
-
-Sangmoon Kim
-
- debris MPC8245
- KVME080 MPC8245
-
-The LEOX team
-
- ELPT860 MPC860T
-
-Guennadi Liakhovetski
-
- linkstation MPC8241
-
-Dave Liu
-
- MPC8315ERDB MPC8315
- MPC832XEMDS MPC832x
- MPC8360EMDS MPC8360
- MPC837XEMDS MPC837x
-
-Nye Liu
-
- ZUMA MPC7xx_74xx
-
-Kumar Gala
-
- MPC8540ADS MPC8540
- MPC8560ADS MPC8560
- MPC8541CDS MPC8541
- MPC8555CDS MPC8555
-
- MPC8641HPCN MPC8641D
-
-Ron Madrid
-
- SIMPC8313 MPC8313
-
-Dan Malek
-
- stxgp3 MPC85xx
- stxssa MPC85xx
- stxxtc MPC8xx
-
-Ryan Mallon
-
- snapper9260 ARM926EJS (AT91SAM9260 SoC)
- snapper9g20 ARM926EJS (AT91SAM9G20 SoC)
-
-Andrea "llandre" Marson
-
- PPChameleonEVB PPC405EP
-
-Tirumala Marri
-
- bluestone APM821XX
-
-Reinhard Meyer
-
- TOP860 MPC860T
- TOP5200 MPC5200
- TOP9000 ARM926EJS (AT91SAM9xxx SoC)
-
-Kyle Moffett
-
- HWW1U1A P2020
-
-Tolunay Orkun
-
- csb272 PPC405GP
- csb472 PPC405GP
-
-John Otken
-
- luan PPC440SP
- taihu PPC405EP
-
-Keith Outwater
-
- GEN860T MPC860T
- GEN860T_SC MPC860T
-
-Frank Panno
-
- ep8260 MPC8260
-
-Chan-Taek Park
-
- tnetv107x_evm tnetv107x
-
-Denis Peter
-
- MIP405 PPC4xx
- PIP405 PPC4xx
-
-Werner Pfister
- digsy_mtc mpc5200
- digsy_mtc_rev5 mpc5200
-
-Kim Phillips
-
- MPC8349EMDS MPC8349
-
-Sergei Poselenov
-
- a4m072 MPC5200
-
-Sudhakar Rajashekhara
-
- da850evm ARM926EJS (DA850/OMAP-L138)
-
-Ricardo Ribalda
-
- ml507 PPC440x5
- v5fx30teval PPC440x5
- xilinx-ppc405-generic PPC405
- xilinx-ppc440-generic PPC440x5
-
-Stefan Roese
-
- a3m071 MPC5200
- a4m2k MPC5200
-
- P3M7448 MPC7448
-
- uc100 MPC857
-
- acadia PPC405EZ
- alpr PPC440GX
- bamboo PPC440EP
- bunbinga PPC405EP
- canyonlands PPC460EX
- ebony PPC440GP
- glacier PPC460GT
- haleakala PPC405EXr
- icon PPC440SPe
- katmai PPC440SPe
- kilauea PPC405EX
- lwmon5 PPC440EPx
- makalu PPC405EX
- ocotea PPC440GX
- p3p440 PPC440GP
- pcs440ep PPC440EP
- rainier PPC440GRx
- sequoia PPC440EPx
- sycamore PPC405GPr
- t3corp PPC460GT
- taishan PPC440GX
- walnut PPC405GP
- yellowstone PPC440GR
- yosemite PPC440EP
- zeus PPC405EP
-
- P3M750 PPC750FX/GX/GL
-
-Yusdi Santoso
-
- HIDDEN_DRAGON MPC8241/MPC8245
-
-Travis Sawyer (travis.sawyer@sandburst.com>
-
- KAREF PPC440GX
- METROBOX PPC440GX
-
-Georg Schardt
-
- fx12mm PPC405
-
-Heiko Schocher
-
- cam_enc_4xx davinci/ARM926EJS
- charon MPC5200
- ids8247 MPC8247
- ipam390 davinci/ARM926EJS
- jupiter MPC5200
- kmsupx5 MPC8321
- mucmc52 MPC5200
- muas3001 MPC8270
- municse MPC5200
- sc3 PPC405GP
- uc101 MPC5200
- ve8313 MPC8313
-
-Andre Schwarz
-
- mergerbox MPC8377
- mvbc_p MPC5200
- mvblm7 MPC8343
- mvsmr MPC5200
-
-Inderpal Singh
-
- Arndale ARM ARMV7 (EXYNOS5250 SoC)
-
-Jon Smirl
-
- pcm030 MPC5200
-
-Ira W. Snyder
-
- P2020COME P2020
-
-York Sun
-
- T4240EMU T4240
-
-Timur Tabi
-
- MPC8349E-mITX MPC8349
- MPC8349E-mITX-GP MPC8349
- P1022DS P1022
-
-Erik Theisen
-
- W7OLMC PPC4xx
- W7OLMG PPC4xx
-
-Jim Thompson
-
- MUSENKI MPC8245/8241
- Sandpoint8245 MPC8245
-
-Rune Torgersen
-
- MPC8266ADS MPC8266
-
-Peter Tyser
-
- xpedite1000 PPC440GX
- xpedite5170 MPC8640
- xpedite5200 MPC8548
- xpedite5370 MPC8572
- xpedite5500 P2020
-
-David Updegraff
-
- CRAYL1 PPC4xx
-
-Anton Vorontsov
-
- MPC8360ERDK MPC8360
-
-Josef Wagner
-
- CPC45 MPC8245
- PM520 MPC5200
-
-Michael Weiss
-
- PDM360NG MPC5121e
-
-Stephen Williams