U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
July 2010
- 157 participants
- 416 discussions
Add support for the NetusG20 board by Acmesystems srl.
This board is based on AT91SAM9G20 SoC.
Signed-off-by: Claudio Mignanti <c.mignanti(a)gmail.com>
---
MAKEALL | 1 +
Makefile | 3 +
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c | 5 +
board/acmesystems/netusg20/Makefile | 56 +++++++
board/acmesystems/netusg20/config.mk | 1 +
board/acmesystems/netusg20/led.c | 40 +++++
board/acmesystems/netusg20/netusg20.c | 152 +++++++++++++++++
board/acmesystems/netusg20/partition.c | 39 +++++
include/configs/netusg20.h | 181 +++++++++++++++++++++
9 files changed, 478 insertions(+), 0 deletions(-)
create mode 100644 board/acmesystems/netusg20/Makefile
create mode 100644 board/acmesystems/netusg20/config.mk
create mode 100644 board/acmesystems/netusg20/led.c
create mode 100644 board/acmesystems/netusg20/netusg20.c
create mode 100644 board/acmesystems/netusg20/partition.c
create mode 100644 include/configs/netusg20.h
diff --git a/MAKEALL b/MAKEALL
index d6d5f5b..60e36e1 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -684,6 +684,7 @@ LIST_at91=" \
meesc \
mp2usb \
m501sk \
+ netusg20 \
otc570 \
pm9261 \
pm9263 \
diff --git a/Makefile b/Makefile
index 87d5214..b73659f 100644
--- a/Makefile
+++ b/Makefile
@@ -2867,6 +2867,9 @@ at91sam9g45ekes_config : unconfig
fi;
@$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91
+netusg20_config: unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs netusg20 acmesystems at91
+
otc570_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs otc570 esd at91
diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
index 77d49ab..87ec531 100644
--- a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
+++ b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
@@ -59,7 +59,12 @@ void at91_serial3_hw_init(void)
{
at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
+#ifdef CONFIG_NETUSG20
+ /* pull-up active on DRXD*/
+ at91_set_a_periph(AT91_PIO_PORTB, 14, 1);
+#else
at91_set_a_periph(AT91_PIO_PORTB, 14, 0); /* DRXD */
+#endif
at91_set_a_periph(AT91_PIO_PORTB, 15, 1); /* DTXD */
writel(1 << AT91_ID_SYS, &pmc->pcer);
}
diff --git a/board/acmesystems/netusg20/Makefile b/board/acmesystems/netusg20/Makefile
new file mode 100644
index 0000000..31589fd
--- /dev/null
+++ b/board/acmesystems/netusg20/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd(a)denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop(a)leadtechdesign.com>
+# Lead Tech Design <www.leadtechdesign.com>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS-y += netusg20.o
+COBJS-y += led.o
+COBJS-y += partition.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/acmesystems/netusg20/config.mk b/board/acmesystems/netusg20/config.mk
new file mode 100644
index 0000000..ff2cfd1
--- /dev/null
+++ b/board/acmesystems/netusg20/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
diff --git a/board/acmesystems/netusg20/led.c b/board/acmesystems/netusg20/led.c
new file mode 100644
index 0000000..1016b98
--- /dev/null
+++ b/board/acmesystems/netusg20/led.c
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop(a)leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/at91sam9260.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+
+
+void coloured_LED_init(void)
+{
+ /* Enable clock */
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
+
+ at91_set_gpio_output(CONFIG_RED_LED, 1);
+
+ at91_set_gpio_value(CONFIG_RED_LED, 1);
+}
diff --git a/board/acmesystems/netusg20/netusg20.c b/board/acmesystems/netusg20/netusg20.c
new file mode 100644
index 0000000..94b4d4c
--- /dev/null
+++ b/board/acmesystems/netusg20/netusg20.c
@@ -0,0 +1,152 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop(a)leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2010
+ * Claudio Mignanti <c.mignanti(a)gmail.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/at91sam9260.h>
+#include <asm/arch/at91sam9260_matrix.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91_common.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
+#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
+#include <net.h>
+#endif
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* ------------------------------------------------------------------------- */
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+#ifdef CONFIG_MACB
+static void at91sam9260ek_macb_hw_init(void)
+{
+ unsigned long rstc;
+
+ /* Enable clock */
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
+
+ /*
+ * Disable pull-up on:
+ * RXDV (PA17) => PHY normal mode (not Test mode)
+ * ERX0 (PA14) => PHY ADDR0
+ * ERX1 (PA15) => PHY ADDR1
+ * ERX2 (PA25) => PHY ADDR2
+ * ERX3 (PA26) => PHY ADDR3
+ * ECRS (PA28) => PHY ADDR4 => PHYADDR = 0x0
+ *
+ * PHY has internal pull-down
+ */
+ writel(pin_to_mask(AT91_PIN_PA14) |
+ pin_to_mask(AT91_PIN_PA15) |
+ pin_to_mask(AT91_PIN_PA17) |
+ pin_to_mask(AT91_PIN_PA25) |
+ pin_to_mask(AT91_PIN_PA26) |
+ pin_to_mask(AT91_PIN_PA28),
+ pin_to_controller(AT91_PIN_PA0) + PIO_PUDR);
+
+ rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
+
+ at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
+
+ /* Wait for end hardware reset */
+ while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
+
+ /* Restore NRST value */
+ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
+ (rstc) |
+ AT91_RSTC_URSTEN);
+
+ /* Re-enable pull-up */
+ writel(pin_to_mask(AT91_PIN_PA14) |
+ pin_to_mask(AT91_PIN_PA15) |
+ pin_to_mask(AT91_PIN_PA17) |
+ pin_to_mask(AT91_PIN_PA25) |
+ pin_to_mask(AT91_PIN_PA26) |
+ pin_to_mask(AT91_PIN_PA28),
+ pin_to_controller(AT91_PIN_PA0) + PIO_PUER);
+
+ at91_macb_hw_init();
+}
+#endif
+
+int board_init(void)
+{
+ /* Enable Ctrlc */
+ console_init_f();
+
+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
+
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+ at91_serial_hw_init();
+#ifdef CONFIG_HAS_DATAFLASH
+ at91_spi0_hw_init((1 << 0) | (1 << 1));
+#endif
+#ifdef CONFIG_MACB
+ at91sam9260ek_macb_hw_init();
+#endif
+
+ return 0;
+}
+
+int dram_init(void)
+{
+ gd->bd->bi_dram[0].start = PHYS_SDRAM;
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+ return 0;
+}
+
+#ifdef CONFIG_RESET_PHY_R
+void reset_phy(void)
+{
+#ifdef CONFIG_MACB
+ /*
+ * Initialize ethernet HW addr prior to starting Linux,
+ * needed for nfsroot
+ */
+ eth_init(gd->bd);
+#endif
+}
+#endif
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_MACB
+ rc = macb_eth_initialize(0, (void *)AT91SAM9260_BASE_EMAC, 0x00);
+#endif
+ return rc;
+}
+
+void show_boot_progress (int val){}
diff --git a/board/acmesystems/netusg20/partition.c b/board/acmesystems/netusg20/partition.c
new file mode 100644
index 0000000..7d79e53
--- /dev/null
+++ b/board/acmesystems/netusg20/partition.c
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf(a)atmel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+#include <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
+ {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1, 1}
+};
+
+/*define the area offsets*/
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+ {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"},
+ {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+ {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"},
+ {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"},
+ {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"},
+};
diff --git a/include/configs/netusg20.h b/include/configs/netusg20.h
new file mode 100644
index 0000000..99b4f12
--- /dev/null
+++ b/include/configs/netusg20.h
@@ -0,0 +1,181 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop(a)leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * Configuation settings for the NetusG20 boards.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_AT91_LEGACY
+
+/* ARM asynchronous clock */
+#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
+#define CONFIG_SYS_HZ 1000
+
+#define CONFIG_DISPLAY_CPUINFO
+
+#define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
+#define CONFIG_AT91SAM9G20 1 /* It's an Atmel AT91SAM9G20 SoC*/
+#define CONFIG_NETUSG20 1
+
+#define CONFIG_ARCH_CPU_INIT
+#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
+
+#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS 1
+#define CONFIG_INITRD_TAG 1
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SKIP_RELOCATE_UBOOT
+
+/*
+ * Hardware drivers
+ */
+#define CONFIG_AT91_GPIO 1
+#define CONFIG_ATMEL_USART 1
+#undef CONFIG_USART0
+#undef CONFIG_USART1
+#undef CONFIG_USART2
+#define CONFIG_USART3 1 /* USART 3 is DBGU */
+
+/* LED */
+#define CONFIG_AT91_LED
+#define CONFIG_RED_LED AT91_PIN_PA9 /* this is the power led */
+#define CONFIG_GREEN_LED AT91_PIN_PA6 /* this is the user led */
+
+#define CONFIG_BOOTDELAY 3
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE 1
+#define CONFIG_BOOTP_BOOTPATH 1
+#define CONFIG_BOOTP_GATEWAY 1
+#define CONFIG_BOOTP_HOSTNAME 1
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
+
+#define CONFIG_CMD_PING 1
+#define CONFIG_CMD_DHCP 1
+#define CONFIG_CMD_USB 1
+
+/* SDRAM */
+#define CONFIG_NR_DRAM_BANKS 1
+#define PHYS_SDRAM 0x20000000
+#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
+
+/* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
+#define CONFIG_HAS_DATAFLASH 1
+#define CONFIG_SYS_SPI_WRITE_TOUT (5*CONFIG_SYS_HZ)
+#define CONFIG_SYS_MAX_DATAFLASH_BANKS 1
+#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 0xD0000000 /* CS1 */
+#define AT91_SPI_CLK 15000000
+
+#define DATAFLASH_TCSS (0x22 << 16)
+#define DATAFLASH_TCHS (0x1 << 24)
+
+/* no NAND flash on this board*/
+#define CONFIG_SYS_NO_FLASH
+
+/* Ethernet */
+#define CONFIG_MACB 1
+#define CONFIG_RMII 1
+#define CONFIG_NET_MULTI 1
+#define CONFIG_NET_RETRY_COUNT 20
+#define CONFIG_RESET_PHY_R 1
+
+/* MMC */
+#define CONFIG_MMC
+#define CONFIG_CMD_MMC
+#define CONFIG_ATMEL_MCI
+#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_IMI
+#define CONFIG_CMD_SOURCE
+
+#define MMCI_BASE 0xFFFA8000
+
+/* USB */
+#define CONFIG_USB_ATMEL
+#define CONFIG_USB_OHCI_NEW 1
+#define CONFIG_DOS_PARTITION 1
+#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
+#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9260_UHP_BASE */
+#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
+#define CONFIG_USB_STORAGE 1
+
+#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
+
+#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
+#define CONFIG_SYS_MEMTEST_END 0x23e00000
+
+/* Filesystem */
+#define CONFIG_CMD_FAT 1
+#define CONFIG_CMD_EXT2 1
+
+/* bootstrap + u-boot + env + linux in dataflash on CS1 */
+#define CONFIG_ENV_IS_IN_DATAFLASH 1
+#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
+#define CONFIG_ENV_OFFSET 0x4200
+#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
+#define CONFIG_ENV_SIZE 0x4200
+#define CONFIG_BOOTCOMMAND "mmc init; sleep 1; " \
+ "ext2load mmc 0 0x23000000 uImage; " \
+ "source 0x23000000"
+#define CONFIG_BOOTARGS "mem=64M console=ttyS0,115200 " \
+ "root=/dev/mmcblk0p1 rootwait"
+
+#define CONFIG_BAUDRATE 115200
+#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
+
+#define CONFIG_SYS_PROMPT "U-Boot> "
+#define CONFIG_SYS_CBSIZE 256
+#define CONFIG_SYS_MAXARGS 16
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_LONGHELP 1
+#define CONFIG_CMDLINE_EDITING 1
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
+#define CONFIG_SYS_GBL_DATA_SIZE 128 /* 128 bytes for initial data */
+
+#define CONFIG_STACKSIZE (32*1024) /* regular stack */
+
+#ifdef CONFIG_USE_IRQ
+#error CONFIG_USE_IRQ not supported
+#endif
+
+#endif
--
1.7.0.4
2
2
This patch adds support mmc driver for s5p SoC
Signed-off-by: Minkyu Kang <mk7.kang(a)samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung(a)samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park(a)samsung.com>
---
arch/arm/include/asm/arch-s5pc1xx/cpu.h | 2 +
arch/arm/include/asm/arch-s5pc1xx/mmc.h | 71 +++++
drivers/mmc/Makefile | 1 +
drivers/mmc/s5p_mmc.c | 478 +++++++++++++++++++++++++++++++
4 files changed, 552 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/include/asm/arch-s5pc1xx/mmc.h
create mode 100644 drivers/mmc/s5p_mmc.c
diff --git a/arch/arm/include/asm/arch-s5pc1xx/cpu.h b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
index 90485aa..b3af8cc 100644
--- a/arch/arm/include/asm/arch-s5pc1xx/cpu.h
+++ b/arch/arm/include/asm/arch-s5pc1xx/cpu.h
@@ -38,6 +38,7 @@
#define S5PC100_PWMTIMER_BASE 0xEA000000
#define S5PC100_WATCHDOG_BASE 0xEA200000
#define S5PC100_UART_BASE 0xEC000000
+#define S5PC100_MMC_BASE 0xED800000
/* S5PC110 */
#define S5PC110_GPIO_BASE 0xE0200000
@@ -45,6 +46,7 @@
#define S5PC110_WATCHDOG_BASE 0xE2700000
#define S5PC110_UART_BASE 0xE2900000
#define S5PC110_SROMC_BASE 0xE8000000
+#define S5PC110_MMC_BASE 0xEB000000
#define S5PC110_DMC0_BASE 0xF0000000
#define S5PC110_DMC1_BASE 0xF1400000
#define S5PC110_VIC0_BASE 0xF2000000
diff --git a/arch/arm/include/asm/arch-s5pc1xx/mmc.h b/arch/arm/include/asm/arch-s5pc1xx/mmc.h
new file mode 100644
index 0000000..ac560c2
--- /dev/null
+++ b/arch/arm/include/asm/arch-s5pc1xx/mmc.h
@@ -0,0 +1,71 @@
+/*
+ * (C) Copyright 2009 SAMSUNG Electronics
+ * Minkyu Kang <mk7.kang(a)samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ASM_ARCH_MMC_H_
+#define __ASM_ARCH_MMC_H_
+
+#ifndef __ASSEMBLY__
+struct s5p_mmc {
+ unsigned int sysad;
+ unsigned short blksize;
+ unsigned short blkcnt;
+ unsigned int argument;
+ unsigned short trnmod;
+ unsigned short cmdreg;
+ unsigned int rspreg0;
+ unsigned int rspreg1;
+ unsigned int rspreg2;
+ unsigned int rspreg3;
+ unsigned int bdata;
+ unsigned int prnsts;
+ unsigned char hostctl;
+ unsigned char pwrcon;
+ unsigned char blkgap;
+ unsigned char wakcon;
+ unsigned short clkcon;
+ unsigned char timeoutcon;
+ unsigned char swrst;
+ unsigned int norintsts; /* errintsts */
+ unsigned int norintstsen; /* errintstsen */
+ unsigned int norintsigen; /* errintsigen */
+ unsigned short acmd12errsts;
+ unsigned char res1[2];
+ unsigned int capareg;
+ unsigned char res2[4];
+ unsigned int maxcurr;
+ unsigned char res3[0x34];
+ unsigned int control2;
+ unsigned int control3;
+ unsigned int control4;
+ unsigned char res4[0x6e];
+ unsigned short hcver;
+ unsigned char res5[0xFFF00];
+};
+
+struct mmc_host {
+ struct s5p_mmc *reg;
+ unsigned int version; /* SDHCI spec. version */
+ unsigned int clock; /* Current clock (MHz) */
+};
+
+int s5p_mmc_init(int dev_index);
+
+#endif /* __ASSEMBLY__ */
+#endif
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 6fa04b8..8dfd8a3 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -32,6 +32,7 @@ COBJS-$(CONFIG_OMAP3_MMC) += omap3_mmc.o
COBJS-$(CONFIG_FSL_ESDHC) += fsl_esdhc.o
COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
COBJS-$(CONFIG_PXA_MMC) += pxa_mmc.o
+COBJS-$(CONFIG_S5P_MMC) += s5p_mmc.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
diff --git a/drivers/mmc/s5p_mmc.c b/drivers/mmc/s5p_mmc.c
new file mode 100644
index 0000000..669b1d0
--- /dev/null
+++ b/drivers/mmc/s5p_mmc.c
@@ -0,0 +1,478 @@
+/*
+ * (C) Copyright 2009 SAMSUNG Electronics
+ * Minkyu Kang <mk7.kang(a)samsung.com>
+ * Jaehoon Chung <jh80.chung(a)samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <mmc.h>
+#include <asm/io.h>
+#include <asm/arch/mmc.h>
+
+#ifdef DEBUG_S5P_HSMMC
+#define dbg(x...) printf(x)
+#else
+#define dbg(x...) do { } while (0)
+#endif
+
+/* support 4 mmc hosts */
+struct mmc mmc_dev[4];
+struct mmc_host mmc_host[4];
+
+static inline struct s5p_mmc *s5p_get_base_mmc(int dev_index)
+{
+ unsigned long offset = dev_index * sizeof(struct s5p_mmc);
+
+ if (cpu_is_s5pc100())
+ return (struct s5p_mmc *)(S5PC100_MMC_BASE + offset);
+ else
+ return (struct s5p_mmc *)(S5PC110_MMC_BASE + offset);
+}
+
+static void mmc_prepare_data(struct mmc_host *host, struct mmc_data *data)
+{
+ unsigned char ctrl;
+
+ dbg("data->dest: %08x\n", (u32)data->dest);
+ writel((u32)data->dest, &host->reg->sysad);
+ /*
+ * DMASEL[4:3]
+ * 00 = Selects SDMA
+ * 01 = Reserved
+ * 10 = Selects 32-bit Address ADMA2
+ * 11 = Selects 64-bit Address ADMA2
+ */
+ ctrl = readb(&host->reg->hostctl);
+ ctrl &= ~(3 << 3);
+ writeb(ctrl, &host->reg->hostctl);
+
+ /* We do not handle DMA boundaries, so set it to max (512 KiB) */
+ writew((7 << 12) | (512 << 0), &host->reg->blksize);
+ writew(data->blocks, &host->reg->blkcnt);
+}
+
+static void mmc_set_transfer_mode(struct mmc_host *host, struct mmc_data *data)
+{
+ unsigned short mode;
+
+ /*
+ * TRNMOD
+ * MUL1SIN0[5] : Multi/Single Block Select
+ * RD1WT0[4] : Data Transfer Direction Select
+ * 1 = read
+ * 0 = write
+ * ENACMD12[2] : Auto CMD12 Enable
+ * ENBLKCNT[1] : Block Count Enable
+ * ENDMA[0] : DMA Enable
+ */
+ mode = (1 << 1) | (1 << 0);
+ if (data->blocks > 1)
+ mode |= (1 << 5);
+ if (data->flags & MMC_DATA_READ)
+ mode |= (1 << 4);
+
+ writew(mode, &host->reg->trnmod);
+}
+
+static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
+ struct mmc_data *data)
+{
+ struct mmc_host *host = (struct mmc_host *)mmc->priv;
+ int flags, i;
+ unsigned int timeout;
+ unsigned int mask;
+ unsigned int retry = 0x100000;
+
+ /* Wait max 10 ms */
+ timeout = 10;
+
+ /*
+ * PRNSTS
+ * CMDINHDAT[1] : Command Inhibit (DAT)
+ * CMDINHCMD[0] : Command Inhibit (CMD)
+ */
+ mask = (1 << 0);
+ if ((data != NULL) || (cmd->resp_type & MMC_RSP_BUSY))
+ mask |= (1 << 1);
+
+ /*
+ * We shouldn't wait for data inihibit for stop commands, even
+ * though they might use busy signaling
+ */
+ if (data)
+ mask &= ~(1 << 1);
+
+ while (readl(&host->reg->prnsts) & mask) {
+ if (timeout == 0) {
+ printf("%s: timeout error\n", __func__);
+ return -1;
+ }
+ timeout--;
+ udelay(1000);
+ }
+
+ if (data)
+ mmc_prepare_data(host, data);
+
+ dbg("cmd->arg: %08x\n", cmd->cmdarg);
+ writel(cmd->cmdarg, &host->reg->argument);
+
+ if (data)
+ mmc_set_transfer_mode(host, data);
+
+ if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
+ return -1;
+
+ /*
+ * CMDREG
+ * CMDIDX[13:8] : Command index
+ * DATAPRNT[5] : Data Present Select
+ * ENCMDIDX[4] : Command Index Check Enable
+ * ENCMDCRC[3] : Command CRC Check Enable
+ * RSPTYP[1:0]
+ * 00 = No Response
+ * 01 = Length 136
+ * 10 = Length 48
+ * 11 = Length 48 Check busy after response
+ */
+ if (!(cmd->resp_type & MMC_RSP_PRESENT))
+ flags = 0;
+ else if (cmd->resp_type & MMC_RSP_136)
+ flags = (1 << 0);
+ else if (cmd->resp_type & MMC_RSP_BUSY)
+ flags = (3 << 0);
+ else
+ flags = (2 << 0);
+
+ if (cmd->resp_type & MMC_RSP_CRC)
+ flags |= (1 << 3);
+ if (cmd->resp_type & MMC_RSP_OPCODE)
+ flags |= (1 << 4);
+ if (data)
+ flags |= (1 << 5);
+
+ dbg("cmd: %d\n", cmd->cmdidx);
+
+ writew((cmd->cmdidx << 8) | flags, &host->reg->cmdreg);
+
+ for (i = 0; i < retry; i++) {
+ mask = readl(&host->reg->norintsts);
+ /* Command Complete */
+ if (mask & (1 << 0)) {
+ if (!data)
+ writel(mask, &host->reg->norintsts);
+ break;
+ }
+ }
+
+ if (i == retry) {
+ printf("%s: waiting for status update\n", __func__);
+ return TIMEOUT;
+ }
+
+ if (mask & (1 << 16)) {
+ /* Timeout Error */
+ dbg("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
+ return TIMEOUT;
+ } else if (mask & (1 << 15)) {
+ /* Error Interrupt */
+ dbg("error: %08x cmd %d\n", mask, cmd->cmdidx);
+ return -1;
+ }
+
+ if (cmd->resp_type & MMC_RSP_PRESENT) {
+ if (cmd->resp_type & MMC_RSP_136) {
+ /* CRC is stripped so we need to do some shifting. */
+ for (i = 0; i < 4; i++) {
+ unsigned int offset =
+ (unsigned int)(&host->reg->rspreg3 - i);
+ cmd->response[i] = readl(offset) << 8;
+
+ if (i != 3) {
+ cmd->response[i] |=
+ readb(offset - 1);
+ }
+ dbg("cmd->resp[%d]: %08x\n",
+ i, cmd->response[i]);
+ }
+ } else if (cmd->resp_type & MMC_RSP_BUSY) {
+ for (i = 0; i < retry; i++) {
+ /* PRNTDATA[23:20] : DAT[3:0] Line Signal */
+ if (readl(&host->reg->prnsts)
+ & (1 << 20)) /* DAT[0] */
+ break;
+ }
+
+ if (i == retry) {
+ printf("%s: card is still busy\n", __func__);
+ return TIMEOUT;
+ }
+
+ cmd->response[0] = readl(&host->reg->rspreg0);
+ dbg("cmd->resp[0]: %08x\n", cmd->response[0]);
+ } else {
+ cmd->response[0] = readl(&host->reg->rspreg0);
+ dbg("cmd->resp[0]: %08x\n", cmd->response[0]);
+ }
+ }
+
+ if (data) {
+ while (1) {
+ mask = readl(&host->reg->norintsts);
+
+ if (mask & (1 << 15)) {
+ /* Error Interrupt */
+ writel(mask, &host->reg->norintsts);
+ printf("%s: error during transfer: 0x%08x\n",
+ __func__, mask);
+ return -1;
+ } else if (mask & (1 << 3)) {
+ /* DMA Interrupt */
+ dbg("DMA end\n");
+ break;
+ } else if (mask & (1 << 1)) {
+ /* Transfer Complete */
+ dbg("r/w is done\n");
+ break;
+ }
+ }
+ writel(mask, &host->reg->norintsts);
+ }
+
+ udelay(1000);
+ return 0;
+}
+
+static void mmc_change_clock(struct mmc_host *host, uint clock)
+{
+ int div;
+ unsigned short clk;
+ unsigned long timeout;
+ unsigned long ctrl2;
+
+ /*
+ * SELBASECLK[5:4]
+ * 00/01 = HCLK
+ * 10 = EPLL
+ * 11 = XTI or XEXTCLK
+ */
+ ctrl2 = readl(&host->reg->control2);
+ ctrl2 &= ~(3 << 4);
+ ctrl2 |= (2 << 4);
+ writel(ctrl2, &host->reg->control2);
+
+ writew(0, &host->reg->clkcon);
+
+ /* XXX: we assume that clock is between 40MHz and 50MHz */
+ if (clock == 0)
+ goto out;
+ else if (clock <= 400000)
+ div = 0x100;
+ else if (clock <= 20000000)
+ div = 4;
+ else if (clock <= 26000000)
+ div = 2;
+ else
+ div = 1;
+ dbg("div: %d\n", div);
+
+ div >>= 1;
+ /*
+ * CLKCON
+ * SELFREQ[15:8] : base clock divied by value
+ * ENSDCLK[2] : SD Clock Enable
+ * STBLINTCLK[1] : Internal Clock Stable
+ * ENINTCLK[0] : Internal Clock Enable
+ */
+ clk = (div << 8) | (1 << 0);
+ writew(clk, &host->reg->clkcon);
+
+ /* Wait max 10 ms */
+ timeout = 10;
+ while (!(readw(&host->reg->clkcon) & (1 << 1))) {
+ if (timeout == 0) {
+ printf("%s: timeout error\n", __func__);
+ return;
+ }
+ timeout--;
+ udelay(1000);
+ }
+
+ clk |= (1 << 2);
+ writew(clk, &host->reg->clkcon);
+
+out:
+ host->clock = clock;
+}
+
+static void mmc_set_ios(struct mmc *mmc)
+{
+ struct mmc_host *host = mmc->priv;
+ unsigned char ctrl;
+ unsigned long val;
+
+ dbg("set_ios: bus_width: %x, clock: %d\n", mmc->bus_width, mmc->clock);
+
+ /*
+ * SELCLKPADDS[17:16]
+ * 00 = 2mA
+ * 01 = 4mA
+ * 10 = 7mA
+ * 11 = 9mA
+ */
+ writel(0x3 << 16, &host->reg->control4);
+
+ val = readl(&host->reg->control2);
+ val &= (0x3 << 4);
+
+ val |= (1 << 31) | /* write status clear async mode enable */
+ (1 << 30) | /* command conflict mask enable */
+ (1 << 14) | /* Feedback Clock Enable for Rx Clock */
+ (1 << 8); /* SDCLK hold enable */
+
+ writel(val, &host->reg->control2);
+
+ /*
+ * FCSEL1[15] FCSEL0[7]
+ * FCSel[1:0] : Rx Feedback Clock Delay Control
+ * Inverter delay means10ns delay if SDCLK 50MHz setting
+ * 01 = Delay1 (basic delay)
+ * 11 = Delay2 (basic delay + 2ns)
+ * 00 = Delay3 (inverter delay)
+ * 10 = Delay4 (inverter delay + 2ns)
+ */
+ writel(0x8080, &host->reg->control3);
+
+ mmc_change_clock(host, mmc->clock);
+
+ ctrl = readb(&host->reg->hostctl);
+
+ /*
+ * WIDE4[1]
+ * 1 = 4-bit mode
+ * 0 = 1-bit mode
+ */
+ if (mmc->bus_width == 4)
+ ctrl |= (1 << 1);
+ else
+ ctrl &= ~(1 << 1);
+
+ /*
+ * OUTEDGEINV[2]
+ * 1 = Riging edge output
+ * 0 = Falling edge output
+ */
+ ctrl &= ~(1 << 2);
+
+ writeb(ctrl, &host->reg->hostctl);
+}
+
+static void mmc_reset(struct mmc_host *host)
+{
+ unsigned int timeout;
+
+ /*
+ * RSTALL[0] : Software reset for all
+ * 1 = reset
+ * 0 = work
+ */
+ writeb((1 << 0), &host->reg->swrst);
+
+ host->clock = 0;
+
+ /* Wait max 100 ms */
+ timeout = 100;
+
+ /* hw clears the bit when it's done */
+ while (readb(&host->reg->swrst) & (1 << 0)) {
+ if (timeout == 0) {
+ printf("%s: timeout error\n", __func__);
+ return;
+ }
+ timeout--;
+ udelay(1000);
+ }
+}
+
+static int mmc_core_init(struct mmc *mmc)
+{
+ struct mmc_host *host = (struct mmc_host *)mmc->priv;
+ unsigned int mask;
+
+ mmc_reset(host);
+
+ host->version = readw(&host->reg->hcver);
+
+ /* mask all */
+ writel(0xffffffff, &host->reg->norintstsen);
+ writel(0xffffffff, &host->reg->norintsigen);
+
+ writeb(0xe, &host->reg->timeoutcon); /* TMCLK * 2^27 */
+
+ /*
+ * NORMAL Interrupt Status Enable Register init
+ * [5] ENSTABUFRDRDY : Buffer Read Ready Status Enable
+ * [4] ENSTABUFWTRDY : Buffer write Ready Status Enable
+ * [1] ENSTASTANSCMPLT : Transfre Complete Status Enable
+ * [0] ENSTACMDCMPLT : Command Complete Status Enable
+ */
+ mask = readl(&host->reg->norintstsen);
+ mask &= ~(0xffff);
+ mask |= (1 << 5) | (1 << 4) | (1 << 1) | (1 << 0);
+ writel(mask, &host->reg->norintstsen);
+
+ /*
+ * NORMAL Interrupt Signal Enable Register init
+ * [1] ENSTACMDCMPLT : Transfer Complete Signal Enable
+ */
+ mask = readl(&host->reg->norintsigen);
+ mask &= ~(0xffff);
+ mask |= (1 << 1);
+ writel(mask, &host->reg->norintsigen);
+
+ return 0;
+}
+
+static int s5p_mmc_initialize(int dev_index)
+{
+ struct mmc *mmc;
+
+ mmc = &mmc_dev[dev_index];
+
+ sprintf(mmc->name, "SAMSUNG SD/MMC");
+ mmc->priv = &mmc_host[dev_index];
+ mmc->send_cmd = mmc_send_cmd;
+ mmc->set_ios = mmc_set_ios;
+ mmc->init = mmc_core_init;
+
+ mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
+ mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS;
+
+ mmc->f_min = 400000;
+ mmc->f_max = 52000000;
+
+ mmc_host[dev_index].clock = 0;
+ mmc_host[dev_index].reg = s5p_get_base_mmc(dev_index);
+ mmc_register(mmc);
+
+ return 0;
+}
+
+int s5p_mmc_init(int dev_index)
+{
+ return s5p_mmc_initialize(dev_index);
+}
--
1.6.3.3
3
4
While running from flash, i. e. before relocation, we have only a
limited C runtime environment without writable data segment. In this
phase, some configurations (for example with environment in EEPROM)
must not use the normal getenv(), but a special function. This
function had been called getenv_r(), with the idea that the "_r"
suffix would mean the same as in the _r_eentrant versions of some of
the C library functions (for example getdate vs. getdate_r, getgrent
vs. getgrent_r, etc.).
Unfortunately this was a misleading name, as in U-Boot the "_r"
generally means "running from RAM", i. e. _after_ relocation.
To avoid confusion, rename into getenv_f() [as "running from flash"]
Signed-off-by: Wolfgang Denk <wd(a)denx.de>
---
README | 2 +-
arch/arm/lib/board.c | 2 +-
arch/avr32/lib/board.c | 2 +-
arch/blackfin/lib/board.c | 2 +-
arch/blackfin/lib/post.c | 2 +-
arch/i386/lib/board.c | 2 +-
arch/m68k/lib/board.c | 6 +++---
arch/mips/cpu/incaip_clock.c | 2 +-
arch/mips/lib/board.c | 2 +-
arch/powerpc/cpu/mpc8xx/speed.c | 2 +-
arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c | 2 +-
arch/powerpc/lib/board.c | 6 +++---
arch/sparc/lib/board.c | 2 +-
board/Marvell/db64360/mv_eth.c | 4 ++--
board/Marvell/db64460/mv_eth.c | 4 ++--
board/avnet/fx12mm/fx12mm.c | 2 +-
board/cray/L1/L1.c | 2 +-
board/dave/PPChameleonEVB/PPChameleonEVB.c | 2 +-
board/esd/adciop/adciop.c | 2 +-
board/esd/apc405/apc405.c | 2 +-
board/esd/ar405/ar405.c | 2 +-
board/esd/ash405/ash405.c | 2 +-
board/esd/canbt/canbt.c | 2 +-
board/esd/cms700/cms700.c | 2 +-
board/esd/cpci2dp/cpci2dp.c | 2 +-
board/esd/cpci405/cpci405.c | 2 +-
board/esd/cpci750/mv_eth.c | 4 ++--
board/esd/cpciiser4/cpciiser4.c | 2 +-
board/esd/dasa_sim/dasa_sim.c | 2 +-
board/esd/dp405/dp405.c | 2 +-
board/esd/du405/du405.c | 2 +-
board/esd/du440/du440.c | 2 +-
board/esd/hh405/hh405.c | 8 ++++----
board/esd/hub405/hub405.c | 4 ++--
board/esd/meesc/meesc.c | 2 +-
board/esd/ocrtc/ocrtc.c | 2 +-
board/esd/otc570/otc570.c | 4 ++--
board/esd/pci405/pci405.c | 2 +-
board/esd/plu405/plu405.c | 2 +-
board/esd/pmc405/pmc405.c | 2 +-
board/esd/voh405/voh405.c | 4 ++--
board/esd/vom405/vom405.c | 2 +-
board/esd/wuh405/wuh405.c | 2 +-
board/evb64260/eth.c | 2 +-
board/g2000/g2000.c | 2 +-
board/gen860t/gen860t.c | 6 +++---
board/inka4x0/inka4x0.c | 2 +-
board/ip860/ip860.c | 2 +-
board/kup/kup4k/kup4k.c | 4 ++--
board/mpl/common/common_util.c | 4 ++--
board/mpl/common/memtst.c | 2 +-
board/mpl/mip405/mip405.c | 2 +-
board/mpl/pati/pati.c | 2 +-
board/mpl/pip405/pip405.c | 2 +-
board/mpl/vcma9/vcma9.c | 4 ++--
board/ppmc8260/ppmc8260.c | 2 +-
board/prodrive/p3mx/mv_eth.c | 4 ++--
board/sbc405/sbc405.c | 2 +-
board/sbc8260/sbc8260.c | 2 +-
board/siemens/CCM/ccm.c | 2 +-
board/siemens/SCM/scm.c | 2 +-
board/snmc/qs850/qs850.c | 2 +-
board/snmc/qs860t/qs860t.c | 2 +-
board/tqc/tqm8260/tqm8260.c | 2 +-
board/trab/trab.c | 2 +-
board/uc100/uc100.c | 2 +-
common/cmd_nvedit.c | 2 +-
drivers/mtd/cfi_flash.c | 2 +-
include/common.h | 2 +-
post/post.c | 2 +-
70 files changed, 89 insertions(+), 89 deletions(-)
diff --git a/README b/README
index c9fb284..b6bf451 100644
--- a/README
+++ b/README
@@ -2572,7 +2572,7 @@ to save the current settings.
Please note that the environment is read-only until the monitor
has been relocated to RAM and a RAM copy of the environment has been
-created; also, when using EEPROM you will have to use getenv_r()
+created; also, when using EEPROM you will have to use getenv_f()
until then to read environment variables.
The environment is protected by a CRC32 checksum. Before the monitor
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index f5660a9..54519b0 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -125,7 +125,7 @@ void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
static int init_baudrate (void)
{
char tmp[64]; /* long enough for environment variables */
- int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+ int i = getenv_f("baudrate", tmp, sizeof (tmp));
gd->bd->bi_baudrate = gd->baudrate = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
: CONFIG_BAUDRATE;
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index 254aecf..9e741d2 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -102,7 +102,7 @@ static int init_baudrate(void)
char tmp[64];
int i;
- i = getenv_r("baudrate", tmp, sizeof(tmp));
+ i = getenv_f("baudrate", tmp, sizeof(tmp));
if (i > 0) {
gd->baudrate = simple_strtoul(tmp, NULL, 10);
} else {
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 4e9bb19..2d3230c 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -64,7 +64,7 @@ static int display_banner(void)
static int init_baudrate(void)
{
char baudrate[15];
- int i = getenv_r("baudrate", baudrate, sizeof(baudrate));
+ int i = getenv_f("baudrate", baudrate, sizeof(baudrate));
gd->bd->bi_baudrate = gd->baudrate = (i > 0)
? simple_strtoul(baudrate, NULL, 10)
: CONFIG_BAUDRATE;
diff --git a/arch/blackfin/lib/post.c b/arch/blackfin/lib/post.c
index faf6b96..bd6aaf5 100644
--- a/arch/blackfin/lib/post.c
+++ b/arch/blackfin/lib/post.c
@@ -168,7 +168,7 @@ static void post_get_flags(int *test_flags)
}
for (i = 0; i < varnum; i++) {
- if (getenv_r(var[i], list, sizeof(list)) <= 0)
+ if (getenv_f(var[i], list, sizeof(list)) <= 0)
continue;
for (j = 0; j < post_list_size; j++) {
diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c
index 0adc664..684cdb8 100644
--- a/arch/i386/lib/board.c
+++ b/arch/i386/lib/board.c
@@ -69,7 +69,7 @@ const char version_string[] =
static int init_baudrate (void)
{
char tmp[64]; /* long enough for environment variables */
- int i = getenv_r("baudrate", tmp, 64);
+ int i = getenv_f("baudrate", tmp, 64);
gd->baudrate = (i != 0)
? (int) simple_strtoul (tmp, NULL, 10)
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 732023d..b254079 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -134,7 +134,7 @@ typedef int (init_fnc_t) (void);
static int init_baudrate (void)
{
char tmp[64]; /* long enough for environment variables */
- int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+ int i = getenv_f("baudrate", tmp, sizeof (tmp));
gd->baudrate = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
@@ -278,7 +278,7 @@ board_init_f (ulong bootflag)
/*
* reserve protected RAM
*/
- i = getenv_r ("pram", tmp, sizeof (tmp));
+ i = getenv_f("pram", tmp, sizeof (tmp));
reg = (i > 0) ? simple_strtoul (tmp, NULL, 10) : CONFIG_PRAM;
addr -= (reg << 10); /* size is in kB */
debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
@@ -549,7 +549,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
* Fill in missing fields of bd_info.
* We do this here, where we have "normal" access to the
* environment; we used to do this still running from ROM,
- * where had to use getenv_r(), which can be pretty slow when
+ * where had to use getenv_f(), which can be pretty slow when
* the environment is in EEPROM.
*/
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
diff --git a/arch/mips/cpu/incaip_clock.c b/arch/mips/cpu/incaip_clock.c
index fc2c621..b65dfe0 100644
--- a/arch/mips/cpu/incaip_clock.c
+++ b/arch/mips/cpu/incaip_clock.c
@@ -105,7 +105,7 @@ int incaip_set_cpuclk (void)
char tmp[64];
ulong cpuclk;
- if (getenv_r ("cpuclk", tmp, sizeof (tmp)) > 0) {
+ if (getenv_f("cpuclk", tmp, sizeof (tmp)) > 0) {
cpuclk = simple_strtoul (tmp, NULL, 10) * 1000000;
cgu_init (cpuclk);
ebu_init (cpuclk);
diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index b2d113e..ab4a17c 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -114,7 +114,7 @@ static void display_flash_config(ulong size)
static int init_baudrate (void)
{
char tmp[64]; /* long enough for environment variables */
- int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+ int i = getenv_f("baudrate", tmp, sizeof (tmp));
gd->baudrate = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index f309f29..6e13e5d 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -266,7 +266,7 @@ int get_clocks_866 (void)
long cpuclk = 0;
long sccr_reg;
- if (getenv_r ("cpuclk", tmp, sizeof (tmp)) > 0)
+ if (getenv_f("cpuclk", tmp, sizeof (tmp)) > 0)
cpuclk = simple_strtoul (tmp, NULL, 10) * 1000000;
if ((CONFIG_SYS_8xx_CPUCLK_MIN > cpuclk) || (CONFIG_SYS_8xx_CPUCLK_MAX < cpuclk))
diff --git a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
index 2fee995..2cfc37f 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
@@ -985,7 +985,7 @@ u32 DQS_autocalibration(void)
puts(str);
#if defined(DEBUG_PPC4xx_DDR_AUTOCALIBRATION)
- i = getenv_r("autocalib", tmp, sizeof(tmp));
+ i = getenv_f("autocalib", tmp, sizeof(tmp));
if (i < 0)
strcpy(tmp, CONFIG_AUTOCALIB);
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index 7b09fb5..0e00d86 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -169,7 +169,7 @@ typedef int (init_fnc_t) (void);
static int init_baudrate (void)
{
char tmp[64]; /* long enough for environment variables */
- int i = getenv_r ("baudrate", tmp, sizeof (tmp));
+ int i = getenv_f("baudrate", tmp, sizeof (tmp));
gd->baudrate = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
@@ -442,7 +442,7 @@ void board_init_f (ulong bootflag)
/*
* reserve protected RAM
*/
- i = getenv_r ("pram", (char *)tmp, sizeof (tmp));
+ i = getenv_f("pram", (char *)tmp, sizeof (tmp));
reg = (i > 0) ? simple_strtoul ((const char *)tmp, NULL, 10) : CONFIG_PRAM;
addr -= (reg << 10); /* size is in kB */
debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
@@ -790,7 +790,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
* Fill in missing fields of bd_info.
* We do this here, where we have "normal" access to the
* environment; we used to do this still running from ROM,
- * where had to use getenv_r(), which can be pretty slow when
+ * where had to use getenv_f(), which can be pretty slow when
* the environment is in EEPROM.
*/
diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c
index b776c21..4f69709 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -88,7 +88,7 @@ ulong monitor_flash_len;
static int init_baudrate(void)
{
char tmp[64]; /* long enough for environment variables */
- int i = getenv_r("baudrate", tmp, sizeof(tmp));
+ int i = getenv_f("baudrate", tmp, sizeof(tmp));
gd->baudrate = (i > 0)
? (int)simple_strtoul(tmp, NULL, 10)
diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c
index d1ac0c5..30304b0 100644
--- a/board/Marvell/db64360/mv_eth.c
+++ b/board/Marvell/db64360/mv_eth.c
@@ -248,7 +248,7 @@ void mv6436x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
@@ -351,7 +351,7 @@ void mv6436x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c
index 58b63a3..cd9d5a4 100644
--- a/board/Marvell/db64460/mv_eth.c
+++ b/board/Marvell/db64460/mv_eth.c
@@ -248,7 +248,7 @@ void mv6446x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
@@ -350,7 +350,7 @@ void mv6446x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
diff --git a/board/avnet/fx12mm/fx12mm.c b/board/avnet/fx12mm/fx12mm.c
index 4858645..e671a7b 100644
--- a/board/avnet/fx12mm/fx12mm.c
+++ b/board/avnet/fx12mm/fx12mm.c
@@ -34,7 +34,7 @@ int checkboard(void)
{
char tmp[64];
char *s, *e;
- int i = getenv_r("serial", tmp, sizeof(tmp));
+ int i = getenv_f("serial", tmp, sizeof(tmp));
if (i < 0) {
printf("Avnet Virtex4 FX12 with no serial #");
diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c
index 1656e8a..33f2089 100644
--- a/board/cray/L1/L1.c
+++ b/board/cray/L1/L1.c
@@ -245,7 +245,7 @@ int testdram (void)
uint *pend = (uint *) L1_MEMSIZE;
uint *p;
- if (getenv_r("booted",NULL,0) <= 0)
+ if (getenv_f("booted",NULL,0) <= 0)
{
printf ("testdram..");
/*AA*/
diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c
index 6bc70ef..8e26996 100644
--- a/board/dave/PPChameleonEVB/PPChameleonEVB.c
+++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c
@@ -183,7 +183,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c
index 63aaf2c..8e00785 100644
--- a/board/esd/adciop/adciop.c
+++ b/board/esd/adciop/adciop.c
@@ -62,7 +62,7 @@ int board_early_init_f (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c
index b58c1eb..564ee00 100644
--- a/board/esd/apc405/apc405.c
+++ b/board/esd/apc405/apc405.c
@@ -404,7 +404,7 @@ int misc_init_r(void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c
index 21b2432..8879faf 100644
--- a/board/esd/ar405/ar405.c
+++ b/board/esd/ar405/ar405.c
@@ -151,7 +151,7 @@ int checkboard (void)
int index;
int len;
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
const unsigned char *fpga;
puts ("Board: ");
diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c
index 03c4098..ea28090 100644
--- a/board/esd/ash405/ash405.c
+++ b/board/esd/ash405/ash405.c
@@ -173,7 +173,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c
index bfec548..0d2d7f1 100644
--- a/board/esd/canbt/canbt.c
+++ b/board/esd/canbt/canbt.c
@@ -157,7 +157,7 @@ int checkboard (void)
int index;
int len;
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/esd/cms700/cms700.c b/board/esd/cms700/cms700.c
index 20346e1..dcd49d4 100644
--- a/board/esd/cms700/cms700.c
+++ b/board/esd/cms700/cms700.c
@@ -96,7 +96,7 @@ int checkboard (void)
puts ("Board: ");
- if (getenv_r("serial#", str, sizeof(str)) == -1) {
+ if (getenv_f("serial#", str, sizeof(str)) == -1) {
puts ("### No HW ID - assuming CMS700");
} else {
puts(str);
diff --git a/board/esd/cpci2dp/cpci2dp.c b/board/esd/cpci2dp/cpci2dp.c
index 00456a7..ecfcf59 100644
--- a/board/esd/cpci2dp/cpci2dp.c
+++ b/board/esd/cpci2dp/cpci2dp.c
@@ -94,7 +94,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c
index 51d3355..51e10fd 100644
--- a/board/esd/cpci405/cpci405.c
+++ b/board/esd/cpci405/cpci405.c
@@ -416,7 +416,7 @@ int checkboard(void)
int len;
#endif
char str[64];
- int i = getenv_r("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
unsigned short ver;
puts("Board: ");
diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c
index dedf734..781ad23 100644
--- a/board/esd/cpci750/mv_eth.c
+++ b/board/esd/cpci750/mv_eth.c
@@ -248,7 +248,7 @@ void mv6436x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
@@ -352,7 +352,7 @@ void mv6436x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c
index dcea50e..10a40be 100644
--- a/board/esd/cpciiser4/cpciiser4.c
+++ b/board/esd/cpciiser4/cpciiser4.c
@@ -153,7 +153,7 @@ int checkboard (void)
int index;
int len;
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c
index 127374b..e7f754c 100644
--- a/board/esd/dasa_sim/dasa_sim.c
+++ b/board/esd/dasa_sim/dasa_sim.c
@@ -168,7 +168,7 @@ int checkboard (void)
int index;
int len;
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
int fpga;
unsigned short val;
diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c
index 228a570..5878092 100644
--- a/board/esd/dp405/dp405.c
+++ b/board/esd/dp405/dp405.c
@@ -86,7 +86,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
unsigned char trans[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe,
0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf};
unsigned char id1, id2, rev;
diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c
index aa7ee92..e0faa77 100644
--- a/board/esd/du405/du405.c
+++ b/board/esd/du405/du405.c
@@ -163,7 +163,7 @@ int checkboard (void)
int index;
int len;
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/esd/du440/du440.c b/board/esd/du440/du440.c
index ba3c97c..ad255f9 100644
--- a/board/esd/du440/du440.c
+++ b/board/esd/du440/du440.c
@@ -350,7 +350,7 @@ int checkboard(void)
puts("Board: DU440");
- if (getenv_r("serial#", serno, sizeof(serno)) > 0) {
+ if (getenv_f("serial#", serno, sizeof(serno)) > 0) {
puts(", serial# ");
puts(serno);
}
diff --git a/board/esd/hh405/hh405.c b/board/esd/hh405/hh405.c
index ca7868c..c5e9514 100644
--- a/board/esd/hh405/hh405.c
+++ b/board/esd/hh405/hh405.c
@@ -650,7 +650,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
@@ -660,7 +660,7 @@ int checkboard (void)
puts(str);
}
- if (getenv_r("bd_type", str, sizeof(str)) != -1) {
+ if (getenv_f("bd_type", str, sizeof(str)) != -1) {
printf(" (%s", str);
} else {
puts(" (Missing bd_type!");
@@ -780,7 +780,7 @@ void video_get_info_str (int line_number, char *info)
{
char str[64];
char str2[64];
- int i = getenv_r("serial#", str2, sizeof(str));
+ int i = getenv_f("serial#", str2, sizeof(str));
if (line_number == 1) {
sprintf(str, " Board: ");
@@ -791,7 +791,7 @@ void video_get_info_str (int line_number, char *info)
strcat(str, str2);
}
- if (getenv_r("bd_type", str2, sizeof(str2)) != -1) {
+ if (getenv_f("bd_type", str2, sizeof(str2)) != -1) {
strcat(str, " (");
strcat(str, str2);
} else {
diff --git a/board/esd/hub405/hub405.c b/board/esd/hub405/hub405.c
index 2a2c434..d17c415 100644
--- a/board/esd/hub405/hub405.c
+++ b/board/esd/hub405/hub405.c
@@ -196,7 +196,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
@@ -206,7 +206,7 @@ int checkboard (void)
puts(str);
}
- if (getenv_r("bd_type", str, sizeof(str)) != -1) {
+ if (getenv_f("bd_type", str, sizeof(str)) != -1) {
printf(" (%s", str);
} else {
puts(" (Missing bd_type!");
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index a1b66cb..694bd74 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -184,7 +184,7 @@ int checkboard(void)
puts("Board: EtherCAN/2 Gateway");
break;
}
- if (getenv_r("serial#", str, sizeof(str)) > 0) {
+ if (getenv_f("serial#", str, sizeof(str)) > 0) {
puts(", serial# ");
puts(str);
}
diff --git a/board/esd/ocrtc/ocrtc.c b/board/esd/ocrtc/ocrtc.c
index ab909e5..24c92e3 100644
--- a/board/esd/ocrtc/ocrtc.c
+++ b/board/esd/ocrtc/ocrtc.c
@@ -68,7 +68,7 @@ int board_early_init_f (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/esd/otc570/otc570.c b/board/esd/otc570/otc570.c
index 07d9c62..410d8b4 100644
--- a/board/esd/otc570/otc570.c
+++ b/board/esd/otc570/otc570.c
@@ -258,7 +258,7 @@ int checkboard(void)
char str[32];
puts("Board: esd ARM9 HMI Panel - OTC570");
- if (getenv_r("serial#", str, sizeof(str)) > 0) {
+ if (getenv_f("serial#", str, sizeof(str)) > 0) {
puts(", serial# ");
puts(str);
}
@@ -308,7 +308,7 @@ int misc_init_r(void)
printf("USART0: ");
- if (getenv_r("usart0", str, sizeof(str)) == -1) {
+ if (getenv_f("usart0", str, sizeof(str)) == -1) {
printf("No entry - assuming 1-wire\n");
/* CTS pin, works as mode select pin (0 = 1-wire; 1 = RS485) */
at91_set_pio_output(AT91_PIO_PORTA, 29, 0);
diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c
index b0d7663..dd97c7a 100644
--- a/board/esd/pci405/pci405.c
+++ b/board/esd/pci405/pci405.c
@@ -298,7 +298,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c
index 3a8a4cf..b68ffaf 100644
--- a/board/esd/plu405/plu405.c
+++ b/board/esd/plu405/plu405.c
@@ -240,7 +240,7 @@ int misc_init_r(void)
int checkboard(void)
{
char str[64];
- int i = getenv_r("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts("Board: ");
diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c
index e7415e4..03143fe 100644
--- a/board/esd/pmc405/pmc405.c
+++ b/board/esd/pmc405/pmc405.c
@@ -123,7 +123,7 @@ int checkboard (void)
{
ulong val;
char str[64];
- int i = getenv_r("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c
index 6ed493e..da25212 100644
--- a/board/esd/voh405/voh405.c
+++ b/board/esd/voh405/voh405.c
@@ -271,7 +271,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
@@ -281,7 +281,7 @@ int checkboard (void)
puts(str);
}
- if (getenv_r("bd_type", str, sizeof(str)) != -1) {
+ if (getenv_f("bd_type", str, sizeof(str)) != -1) {
printf(" (%s)", str);
} else {
puts(" (Missing bd_type!)");
diff --git a/board/esd/vom405/vom405.c b/board/esd/vom405/vom405.c
index de35036..f665a3e 100644
--- a/board/esd/vom405/vom405.c
+++ b/board/esd/vom405/vom405.c
@@ -121,7 +121,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
int flashcnt;
int delay;
u8 *led_reg = (u8 *)(CAN_BA + 0x1000);
diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c
index 704cd02..5a65133 100644
--- a/board/esd/wuh405/wuh405.c
+++ b/board/esd/wuh405/wuh405.c
@@ -173,7 +173,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index ca8bab5..8d1b606 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -708,7 +708,7 @@ gt6426x_eth_initialize(bd_t *bis)
return;
}
- temp = getenv_r (s, buf, sizeof(buf));
+ temp = getenv_f(s, buf, sizeof(buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
diff --git a/board/g2000/g2000.c b/board/g2000/g2000.c
index 8b15e51..713b699 100644
--- a/board/g2000/g2000.c
+++ b/board/g2000/g2000.c
@@ -91,7 +91,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/gen860t/gen860t.c b/board/gen860t/gen860t.c
index b37a0f2..d175858 100644
--- a/board/gen860t/gen860t.c
+++ b/board/gen860t/gen860t.c
@@ -132,7 +132,7 @@ int checkboard (void)
char buf[64];
int i;
- i = getenv_r ("board_id", buf, sizeof (buf));
+ i = getenv_f("board_id", buf, sizeof (buf));
s = (i > 0) ? buf : NULL;
if (s) {
@@ -141,7 +141,7 @@ int checkboard (void)
printf ("<unknown> ");
}
- i = getenv_r ("serial#", buf, sizeof (buf));
+ i = getenv_f("serial#", buf, sizeof (buf));
s = (i > 0) ? buf : NULL;
if (s) {
@@ -276,7 +276,7 @@ int last_stage_init (void)
/*
* Read the environment to see what to do with the beeper
*/
- i = getenv_r ("beeper", buf, sizeof (buf));
+ i = getenv_f("beeper", buf, sizeof (buf));
if (i > 0) {
do_beeper (buf);
}
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 27b79ec..fc498d6 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -187,7 +187,7 @@ int misc_init_f (void)
char tmp[10];
int i, br;
- i = getenv_r("brightness", tmp, sizeof(tmp));
+ i = getenv_f("brightness", tmp, sizeof(tmp));
br = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
: CONFIG_SYS_BRIGHTNESS;
diff --git a/board/ip860/ip860.c b/board/ip860/ip860.c
index e2a1851..adff2b2 100644
--- a/board/ip860/ip860.c
+++ b/board/ip860/ip860.c
@@ -114,7 +114,7 @@ int checkboard (void)
puts ("Board: ");
- i = getenv_r ("serial#", (char *)buf, sizeof (buf));
+ i = getenv_f("serial#", (char *)buf, sizeof (buf));
s = (i > 0) ? buf : NULL;
if (!s || strncmp ((char *)s, "IP860", 5)) {
diff --git a/board/kup/kup4k/kup4k.c b/board/kup/kup4k/kup4k.c
index 98f5f5a..607fd79 100644
--- a/board/kup/kup4k/kup4k.c
+++ b/board/kup/kup4k/kup4k.c
@@ -314,7 +314,7 @@ void lcd_logo (bd_t * bd)
}
- n = getenv_r ("lcd", tmp, sizeof (tmp));
+ n = getenv_f("lcd", tmp, sizeof (tmp));
if (n > 0) {
if (!strcmp ("tft", tmp))
tft = 1;
@@ -342,7 +342,7 @@ void lcd_logo (bd_t * bd)
((S1D_VALUE *) fb_info.RegAddr)[s1dReg / sizeof(S1D_VALUE)] =
s1dValue;
}
- n = getenv_r ("contrast", tmp, sizeof (tmp));
+ n = getenv_f("contrast", tmp, sizeof (tmp));
((S1D_VALUE *) fb_info.RegAddr)[0xB3] =
(n > 0) ? (uchar) simple_strtoul (tmp, NULL, 10) * 255 / 100 : 0xA0;
switch (bd->bi_busfreq) {
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index b4343d8..624c708 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -284,13 +284,13 @@ void set_backup_values(int overwrite)
}
}
memcpy(back.signature,"MPL\0",4);
- i = getenv_r("serial#",back.serial_name,16);
+ i = getenv_f("serial#",back.serial_name,16);
if(i < 0) {
puts("Not possible to write Backup\n");
return;
}
back.serial_name[16]=0;
- i = getenv_r("ethaddr",back.eth_addr,20);
+ i = getenv_f("ethaddr",back.eth_addr,20);
if(i < 0) {
puts("Not possible to write Backup\n");
return;
diff --git a/board/mpl/common/memtst.c b/board/mpl/common/memtst.c
index 92c33ba..68973f9 100644
--- a/board/mpl/common/memtst.c
+++ b/board/mpl/common/memtst.c
@@ -29,7 +29,7 @@ int testdram (void)
unsigned char s[32];
int i;
- i = getenv_r ("testmem", s, 32);
+ i = getenv_f("testmem", s, 32);
if (i != 0) {
i = (int) simple_strtoul (s, NULL, 10);
if ((i > 0) && (i < 0xf)) {
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index af3a98a..7400ca6 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -589,7 +589,7 @@ int checkboard (void)
puts ("Board: ");
get_pcbrev_var(&bc,&var);
- i = getenv_r ("serial#", (char *)s, 32);
+ i = getenv_f("serial#", (char *)s, 32);
if ((i == 0) || strncmp ((char *)s, BOARD_NAME,sizeof(BOARD_NAME))) {
get_backup_values (b);
if (strncmp (b->signature, "MPL\0", 4) != 0) {
diff --git a/board/mpl/pati/pati.c b/board/mpl/pati/pati.c
index e12bc42..7f1164a 100644
--- a/board/mpl/pati/pati.c
+++ b/board/mpl/pati/pati.c
@@ -353,7 +353,7 @@ int checkboard (void)
puts ("\nBoard: ");
reg=in32(PLD_CONFIG_BASE+PLD_BOARD_TIMING);
rev=(char)(SYSCNTR_BREV(reg)+'A');
- i = getenv_r ("serial#", s, 32);
+ i = getenv_f("serial#", s, 32);
if ((i == -1)) {
puts ("### No HW ID - assuming " BOARD_NAME);
printf(" Rev. %c\n",rev);
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 792eccc..7b48c06 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -579,7 +579,7 @@ int checkboard (void)
puts ("Board: ");
- i = getenv_r ("serial#", (char *)s, 32);
+ i = getenv_f("serial#", (char *)s, 32);
if ((i == 0) || strncmp ((char *)s, "PIP405", 6)) {
get_backup_values (b);
if (strncmp (b->signature, "MPL\0", 4) != 0) {
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c
index 1835677..eaeec82 100644
--- a/board/mpl/vcma9/vcma9.c
+++ b/board/mpl/vcma9/vcma9.c
@@ -295,7 +295,7 @@ int checkboard(void)
int i;
backup_t *b = (backup_t *) s;
- i = getenv_r("serial#", s, 32);
+ i = getenv_f("serial#", s, 32);
if ((i < 0) || strncmp (s, "VCMA9", 5)) {
get_backup_values (b);
if (strncmp (b->signature, "MPL\0", 4) != 0) {
@@ -340,7 +340,7 @@ void print_vcma9_info(void)
char s[50];
int i;
- if ((i = getenv_r("serial#", s, 32)) < 0) {
+ if ((i = getenv_f("serial#", s, 32)) < 0) {
puts ("### No HW ID - assuming VCMA9");
printf("i %d", i*24);
} else {
diff --git a/board/ppmc8260/ppmc8260.c b/board/ppmc8260/ppmc8260.c
index 1808abd..bf0188c 100644
--- a/board/ppmc8260/ppmc8260.c
+++ b/board/ppmc8260/ppmc8260.c
@@ -285,7 +285,7 @@ int misc_init_r (void)
int res;
if ((ds != 0) && (ds != 0xff)) {
- res = getenv_r ("ethaddr", (char *)tmp, sizeof (tmp));
+ res = getenv_f("ethaddr", (char *)tmp, sizeof (tmp));
if (res > 0) {
ss = ((ds >> 4) & 0x0f);
ss += ss < 0x0a ? '0' : ('a' - 10);
diff --git a/board/prodrive/p3mx/mv_eth.c b/board/prodrive/p3mx/mv_eth.c
index 8fcc155..e67596b 100644
--- a/board/prodrive/p3mx/mv_eth.c
+++ b/board/prodrive/p3mx/mv_eth.c
@@ -298,7 +298,7 @@ void mv6446x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
@@ -397,7 +397,7 @@ void mv6446x_eth_initialize (bd_t * bis)
return;
}
- temp = getenv_r (s, buf, sizeof (buf));
+ temp = getenv_f(s, buf, sizeof (buf));
s = (temp > 0) ? buf : NULL;
#ifdef DEBUG
diff --git a/board/sbc405/sbc405.c b/board/sbc405/sbc405.c
index 74e6204..33b4d11 100644
--- a/board/sbc405/sbc405.c
+++ b/board/sbc405/sbc405.c
@@ -79,7 +79,7 @@ int misc_init_r (void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/board/sbc8260/sbc8260.c b/board/sbc8260/sbc8260.c
index f5f23be..33ce1a4 100644
--- a/board/sbc8260/sbc8260.c
+++ b/board/sbc8260/sbc8260.c
@@ -267,7 +267,7 @@ int misc_init_r (void)
int res;
if ((ds != 0) && (ds != 0xff)) {
- res = getenv_r ("ethaddr", tmp, sizeof (tmp));
+ res = getenv_f("ethaddr", tmp, sizeof (tmp));
if (res > 0) {
ss = ((ds >> 4) & 0x0f);
ss += ss < 0x0a ? '0' : ('a' - 10);
diff --git a/board/siemens/CCM/ccm.c b/board/siemens/CCM/ccm.c
index 8053da4..e91ceb0 100644
--- a/board/siemens/CCM/ccm.c
+++ b/board/siemens/CCM/ccm.c
@@ -102,7 +102,7 @@ int checkboard (void)
unsigned char *s;
unsigned char buf[64];
- s = (getenv_r ("serial#", (char *)&buf, sizeof(buf)) > 0) ? buf : NULL;
+ s = (getenv_f("serial#", (char *)&buf, sizeof(buf)) > 0) ? buf : NULL;
puts ("Board: Siemens CCM");
diff --git a/board/siemens/SCM/scm.c b/board/siemens/SCM/scm.c
index e0611fe..926e491 100644
--- a/board/siemens/SCM/scm.c
+++ b/board/siemens/SCM/scm.c
@@ -209,7 +209,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c
index cc8eaad..43f7495 100644
--- a/board/snmc/qs850/qs850.c
+++ b/board/snmc/qs850/qs850.c
@@ -100,7 +100,7 @@ int checkboard (void)
char buf[64];
int i;
- i = getenv_r("serial#", buf, sizeof(buf));
+ i = getenv_f("serial#", buf, sizeof(buf));
s = (i>0) ? buf : NULL;
if (!s || strncmp(s, BOARD_IDENTITY, 5)) {
diff --git a/board/snmc/qs860t/qs860t.c b/board/snmc/qs860t/qs860t.c
index b272d80..fa88707 100644
--- a/board/snmc/qs860t/qs860t.c
+++ b/board/snmc/qs860t/qs860t.c
@@ -93,7 +93,7 @@ int checkboard (void)
char buf[64];
int i;
- i = getenv_r("serial#", buf, sizeof(buf));
+ i = getenv_f("serial#", buf, sizeof(buf));
s = (i>0) ? buf : NULL;
if (!s || strncmp(s, "QS860T", 6)) {
diff --git a/board/tqc/tqm8260/tqm8260.c b/board/tqc/tqm8260/tqm8260.c
index 3039999..95073b8 100644
--- a/board/tqc/tqm8260/tqm8260.c
+++ b/board/tqc/tqm8260/tqm8260.c
@@ -196,7 +196,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof (str));
+ int i = getenv_f("serial#", str, sizeof (str));
puts ("Board: ");
diff --git a/board/trab/trab.c b/board/trab/trab.c
index 12fe120..828facd 100644
--- a/board/trab/trab.c
+++ b/board/trab/trab.c
@@ -414,7 +414,7 @@ static void tsc2000_set_brightness(void)
spi_init();
tsc2000_write(1, 2, 0x0); /* Power up DAC */
- i = getenv_r("brightness", tmp, sizeof(tmp));
+ i = getenv_f("brightness", tmp, sizeof(tmp));
br = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
: CONFIG_SYS_BRIGHTNESS;
diff --git a/board/uc100/uc100.c b/board/uc100/uc100.c
index 4dba290..bdee4de 100644
--- a/board/uc100/uc100.c
+++ b/board/uc100/uc100.c
@@ -150,7 +150,7 @@ int board_switch(void)
int checkboard (void)
{
char str[64];
- int i = getenv_r ("serial#", str, sizeof(str));
+ int i = getenv_f("serial#", str, sizeof(str));
puts ("Board: ");
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 1198954..16d5ff7 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -543,7 +543,7 @@ char *getenv (char *name)
return (NULL);
}
-int getenv_r (char *name, char *buf, unsigned len)
+int getenv_f(char *name, char *buf, unsigned len)
{
int i, nxt;
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 3267c5d..2d09caf 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1993,7 +1993,7 @@ unsigned long flash_init (void)
#ifdef CONFIG_SYS_FLASH_PROTECTION
/* read environment from EEPROM */
char s[64];
- getenv_r ("unlock", s, sizeof(s));
+ getenv_f("unlock", s, sizeof(s));
#endif
#define BANK_BASE(i) (((phys_addr_t [CFI_MAX_FLASH_BANKS])CONFIG_SYS_FLASH_BANKS_LIST)[i])
diff --git a/include/common.h b/include/common.h
index eddec22..6a79ec2 100644
--- a/include/common.h
+++ b/include/common.h
@@ -256,7 +256,7 @@ int env_init (void);
void env_relocate (void);
int envmatch (uchar *, int);
char *getenv (char *);
-int getenv_r (char *name, char *buf, unsigned len);
+int getenv_f (char *name, char *buf, unsigned len);
int saveenv (void);
#ifdef CONFIG_PPC /* ARM version to be fixed! */
int inline setenv (char *, char *);
diff --git a/post/post.c b/post/post.c
index 00e8353..8a9fd0d 100644
--- a/post/post.c
+++ b/post/post.c
@@ -187,7 +187,7 @@ static void post_get_flags (int *test_flags)
}
for (i = 0; i < varnum; i++) {
- if (getenv_r (var[i], list, sizeof (list)) <= 0)
+ if (getenv_f(var[i], list, sizeof (list)) <= 0)
continue;
for (j = 0; j < post_list_size; j++) {
--
1.7.1.1
2
2
Avoid warning:
cmd_bootm.c: In function 'bootm_load_os':
cmd_bootm.c:394: warning: passing argument 2 of
'lzmaBuffToBuffDecompress' from incompatible pointer type
For 32 bit systems, this change shouldn't make a difference to code size
since sizeof(size_t) and sizeof(unsigned int) are equal. But it does fix
the warning.
Signed-off-by: Mike Frysinger <vapier(a)gentoo.org>
---
common/cmd_bootm.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 8803202..f65eabf 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -386,12 +386,14 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
break;
#endif /* CONFIG_BZIP2 */
#ifdef CONFIG_LZMA
- case IH_COMP_LZMA:
+ case IH_COMP_LZMA: {
+ SizeT lzma_len = unc_len;
printf (" Uncompressing %s ... ", type_name);
int ret = lzmaBuffToBuffDecompress(
- (unsigned char *)load, &unc_len,
+ (unsigned char *)load, &lzma_len,
(unsigned char *)image_start, image_len);
+ unc_len = lzma_len;
if (ret != SZ_OK) {
printf ("LZMA: uncompress or overwrite error %d "
"- must RESET board to recover\n", ret);
@@ -400,6 +402,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
}
*load_end = load + unc_len;
break;
+ }
#endif /* CONFIG_LZMA */
#ifdef CONFIG_LZO
case IH_COMP_LZO:
--
1.7.2
2
1
Wolfgang,
Please pull u-boot-ti/master. I ran MAKEALL and saw no issues.
The patch modifying the I2c driver has an ACK from Heiko.
The patch restructuring the USB driver actually was a simple patch
adding some more #defines so i went ahead and added it.
Thanks,
Sandeep
The following changes since commit e9aecdec153ae166739858e6a570432449b979f7:
Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-ti
are available in the git repository at:
git://git.denx.de/u-boot-ti.git master
Steve Sakoman (8):
ARMV7: Add pad mux support for OMAP4
ARMV7: Fix udelay for OMAP4
ARMV7: Modify i2c driver for more reliable operation on OMAP4
ARMV7: Add support for the TWL6030 I2C power chip used in OMAP4 systems
ARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and OMAP4
ARMV7: Enable musb driver and usbtty on OMAP4430 SDP
ARMV7: Enable musb driver and usbtty on OMAP4 Panda
ARMV7: Update default environment for OMAP4 boards
arch/arm/cpu/armv7/omap-common/timer.c | 9 -
arch/arm/cpu/armv7/omap4/board.c | 11 +
arch/arm/include/asm/arch-omap3/cpu.h | 3 +
arch/arm/include/asm/arch-omap3/i2c.h | 4 +-
arch/arm/include/asm/arch-omap4/cpu.h | 3 +
arch/arm/include/asm/arch-omap4/mux_omap4.h | 344 +++++++++++++++++++++++++++
arch/arm/include/asm/arch-omap4/omap4.h | 2 +
arch/arm/include/asm/arch-omap4/sys_proto.h | 1 +
board/ti/panda/panda.c | 26 ++
board/ti/panda/panda.h | 265 +++++++++++++++++++++
board/ti/sdp4430/sdp.c | 26 ++
board/ti/sdp4430/sdp.h | 265 +++++++++++++++++++++
drivers/i2c/omap24xx_i2c.c | 31 ++-
drivers/i2c/omap24xx_i2c.h | 4 +
drivers/power/Makefile | 1 +
drivers/power/twl6030.c | 77 ++++++
drivers/usb/musb/omap3.c | 16 ++
drivers/usb/musb/omap3.h | 3 +-
include/configs/omap4_panda.h | 26 ++-
include/configs/omap4_sdp4430.h | 26 ++-
include/twl6030.h | 90 +++++++
21 files changed, 1208 insertions(+), 25 deletions(-)
create mode 100644 arch/arm/include/asm/arch-omap4/mux_omap4.h
create mode 100644 board/ti/panda/panda.h
create mode 100644 board/ti/sdp4430/sdp.h
create mode 100644 drivers/power/twl6030.c
create mode 100644 include/twl6030.h
3
4

04 Aug '10
Add support for initializing the SERDES blocks on CoreNet style QoriQ
devices and the p4080 specific SERDES tables to know which actual
componetns are enabled.
Additionally, split out the Frame Manger (FMAN) into its specific ethernet
ports instead of gross level of the full FMAN.
Signed-off-by: Li Yang <leoli(a)freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang(a)freescale.com>
Signed-off-by: Kumar Gala <galak(a)kernel.crashing.org>
---
arch/powerpc/cpu/mpc85xx/Makefile | 2 +
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 212 +++++++++++++++++++++++++
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 40 +++++
arch/powerpc/cpu/mpc85xx/p4080_serdes.c | 94 +++++++++++
arch/powerpc/include/asm/fsl_serdes.h | 11 +-
5 files changed, 357 insertions(+), 2 deletions(-)
create mode 100644 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
create mode 100644 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h
create mode 100644 arch/powerpc/cpu/mpc85xx/p4080_serdes.c
diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile
index 6ae113a..b7c0272 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -76,6 +76,8 @@ COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o
COBJS-$(CONFIG_QE) += qe_io.o
COBJS-$(CONFIG_CPM2) += serial_scc.o
+COBJS-$(CONFIG_FSL_CORENET) += fsl_corenet_serdes.o
+COBJS-$(CONFIG_PPC_P4080) += p4080_serdes.o
COBJS = $(COBJS-y)
COBJS += cpu.o
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
new file mode 100644
index 0000000..1c03061
--- /dev/null
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -0,0 +1,212 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/fsl_serdes.h>
+#include <asm/immap_85xx.h>
+#include <asm/io.h>
+#include <asm/processor.h>
+#include "fsl_corenet_serdes.h"
+
+static u32 serdes_prtcl_map;
+
+#ifdef DEBUG
+static const char *serdes_prtcl_str[] = {
+ [NONE] = "NA",
+ [PCIE1] = "PCIE1",
+ [PCIE2] = "PCIE2",
+ [PCIE3] = "PCIE3",
+ [PCIE4] = "PCIE4",
+ [SATA1] = "SATA1",
+ [SATA2] = "SATA2",
+ [SRIO1] = "SRIO1",
+ [SRIO2] = "SRIO2",
+ [SGMII_FM1_DTSEC1] = "SGMII_FM1_DTSEC1",
+ [SGMII_FM1_DTSEC2] = "SGMII_FM1_DTSEC2",
+ [SGMII_FM1_DTSEC3] = "SGMII_FM1_DTSEC3",
+ [SGMII_FM1_DTSEC4] = "SGMII_FM1_DTSEC4",
+ [SGMII_FM1_DTSEC5] = "SGMII_FM1_DTSEC5",
+ [SGMII_FM2_DTSEC1] = "SGMII_FM2_DTSEC1",
+ [SGMII_FM2_DTSEC2] = "SGMII_FM2_DTSEC2",
+ [SGMII_FM2_DTSEC3] = "SGMII_FM2_DTSEC3",
+ [SGMII_FM2_DTSEC4] = "SGMII_FM2_DTSEC4",
+ [XAUI_FM1] = "XAUI_FM1",
+ [XAUI_FM2] = "XAUI_FM2",
+ [AURORA] = "DEBUG",
+};
+#endif
+
+static const struct {
+ int idx;
+ unsigned int lpd; /* RCW lane powerdown bit */
+ int bank;
+} lanes[SRDS_MAX_LANES] = {
+ { 0, 152, FSL_SRDS_BANK_1 },
+ { 1, 153, FSL_SRDS_BANK_1 },
+ { 2, 154, FSL_SRDS_BANK_1 },
+ { 3, 155, FSL_SRDS_BANK_1 },
+ { 4, 156, FSL_SRDS_BANK_1 },
+ { 5, 157, FSL_SRDS_BANK_1 },
+ { 6, 158, FSL_SRDS_BANK_1 },
+ { 7, 159, FSL_SRDS_BANK_1 },
+ { 8, 160, FSL_SRDS_BANK_1 },
+ { 9, 161, FSL_SRDS_BANK_1 },
+ { 16, 162, FSL_SRDS_BANK_2 },
+ { 17, 163, FSL_SRDS_BANK_2 },
+ { 18, 164, FSL_SRDS_BANK_2 },
+ { 19, 165, FSL_SRDS_BANK_2 },
+ { 20, 170, FSL_SRDS_BANK_3 },
+ { 21, 171, FSL_SRDS_BANK_3 },
+ { 22, 172, FSL_SRDS_BANK_3 },
+ { 23, 173, FSL_SRDS_BANK_3 },
+};
+
+int serdes_get_lane_idx(int lane)
+{
+ return lanes[lane].idx;
+}
+
+int serdes_get_bank(int lane)
+{
+ return lanes[lane].bank;
+}
+
+int serdes_lane_enabled(int lane)
+{
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ serdes_corenet_t *regs = (void *)CONFIG_SYS_FSL_CORENET_SERDES_ADDR;
+
+ int bank = lanes[lane].bank;
+ int word = lanes[lane].lpd / 32;
+ int bit = lanes[lane].lpd % 32;
+
+ if (in_be32(®s->bank[bank].rstctl) & SRDS_RSTCTL_SDPD)
+ return 0;
+
+ return !(in_be32(&gur->rcwsr[word]) & (0x80000000 >> bit));
+}
+
+int is_serdes_configured(enum srds_prtcl device)
+{
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+ /* Is serdes enabled at all? */
+ if (!(in_be32(&gur->rcwsr[5]) & FSL_CORENET_RCWSR5_SRDS_EN))
+ return 0;
+
+ return (1 << device) & serdes_prtcl_map;
+}
+
+void fsl_serdes_init(void)
+{
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ int cfg;
+ serdes_corenet_t *srds_regs;
+ int lane, bank, idx;
+ enum srds_prtcl lane_prtcl;
+ long long end_tick;
+ int have_bank[SRDS_MAX_BANK] = {};
+
+ /* Is serdes enabled at all? */
+ if (!(in_be32(&gur->rcwsr[5]) & FSL_CORENET_RCWSR5_SRDS_EN))
+ return;
+
+ srds_regs = (void *)(CONFIG_SYS_FSL_CORENET_SERDES_ADDR);
+ cfg = (in_be32(&gur->rcwsr[4]) & FSL_CORENET_RCWSR4_SRDS_PRTCL) >> 26;
+ debug("Using SERDES configuration 0x%x, lane settings:\n", cfg);
+
+ if (!is_serdes_prtcl_valid(cfg)) {
+ printf("SERDES[PRTCL] = 0x%x is not valid\n", cfg);
+ return;
+ }
+
+ /* Look for banks with all lanes disabled, and power down the bank. */
+ for (lane = 0; lane < SRDS_MAX_LANES; lane++) {
+ enum srds_prtcl lane_prtcl = serdes_get_prtcl(cfg, lane);
+ if (serdes_lane_enabled(lane)) {
+ have_bank[serdes_get_bank(lane)] = 1;
+ serdes_prtcl_map |= (1 << lane_prtcl);
+ }
+ }
+
+ for (bank = 0; bank < SRDS_MAX_BANK; bank++) {
+ if (!have_bank[bank]) {
+ printf("SERDES: bank %d disabled\n", bank + 1);
+ setbits_be32(&srds_regs->bank[bank].rstctl,
+ SRDS_RSTCTL_SDPD);
+ }
+ }
+
+ for (lane = 0; lane < SRDS_MAX_LANES; lane++) {
+ idx = serdes_get_lane_idx(lane);
+ lane_prtcl = serdes_get_prtcl(cfg, lane);
+
+#ifdef DEBUG
+ switch (lane) {
+ case 0:
+ puts("Bank1: ");
+ break;
+ case 10:
+ puts("\nBank2: ");
+ break;
+ case 14:
+ puts("\nBank3: ");
+ break;
+ default:
+ break;
+ }
+
+ printf("%s ", serdes_prtcl_str[lane_prtcl]);
+#endif
+ }
+
+#ifdef DEBUG
+ puts("\n");
+#endif
+
+ for (idx = 0; idx < SRDS_MAX_BANK; idx++) {
+ u32 rstctl;
+
+ bank = idx;
+
+ /* Skip disabled banks */
+ if (!have_bank[bank])
+ continue;
+
+ /* reset banks for errata */
+ setbits_be32(&srds_regs->bank[bank].rstctl, SRDS_RSTCTL_RST);
+
+ /* wait for reset complete or 1-second timeout */
+ end_tick = usec2ticks(1000000) + get_ticks();
+ do {
+ rstctl = in_be32(&srds_regs->bank[bank].rstctl);
+ if (rstctl & SRDS_RSTCTL_RSTDONE)
+ break;
+ } while (end_tick > get_ticks());
+
+ if (!(rstctl & SRDS_RSTCTL_RSTDONE)) {
+ printf("SERDES: timeout resetting bank %d\n",
+ bank + 1);
+ continue;
+ }
+ }
+}
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h
new file mode 100644
index 0000000..4e1f331
--- /dev/null
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc.
+ *
+ * Author: Roy Zang <tie-fei.zang(a)freescale.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __FSL_CORENET_SERDES_H
+#define __FSL_CORENET_SERDES_H
+
+#define SRDS_MAX_LANES 18
+#define SRDS_MAX_BANK 3
+
+enum srds_bank {
+ FSL_SRDS_BANK_1 = 0,
+ FSL_SRDS_BANK_2 = 1,
+ FSL_SRDS_BANK_3 = 2,
+};
+
+int is_serdes_prtcl_valid(u32 prtcl);
+int serdes_get_lane_idx(int lane);
+int serdes_get_bank(int lane);
+int serdes_lane_enabled(int lane);
+enum srds_prtcl serdes_get_prtcl(int cfg, int lane);
+
+#endif /* __FSL_CORENET_SERDES_H */
diff --git a/arch/powerpc/cpu/mpc85xx/p4080_serdes.c b/arch/powerpc/cpu/mpc85xx/p4080_serdes.c
new file mode 100644
index 0000000..eb6223c
--- /dev/null
+++ b/arch/powerpc/cpu/mpc85xx/p4080_serdes.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2009-2010 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/fsl_serdes.h>
+#include <asm/processor.h>
+#include <asm/io.h>
+#include "fsl_corenet_serdes.h"
+
+static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = {
+ [0x2] = {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0x5] = {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0x8] = {PCIE1, PCIE1, PCIE3, PCIE3, PCIE2, PCIE2, PCIE2, PCIE2,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0xd] = {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, SGMII_FM2_DTSEC3,
+ SGMII_FM2_DTSEC4, AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM2, XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0xe] = {PCIE1, PCIE1, PCIE3, PCIE3, PCIE2, PCIE2, SGMII_FM2_DTSEC3,
+ SGMII_FM2_DTSEC4, AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM2, XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0xf] = {PCIE1, PCIE1, PCIE1, PCIE1, SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
+ SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4, AURORA, AURORA, XAUI_FM2,
+ XAUI_FM2, XAUI_FM2, XAUI_FM2, NONE, NONE, NONE, NONE},
+ [0x10] = {PCIE1, PCIE1, PCIE3, PCIE3, SGMII_FM2_DTSEC1,
+ SGMII_FM2_DTSEC2, SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ NONE, NONE, NONE, NONE},
+ [0x13] = {SRIO2, SRIO2, SRIO2, SRIO2, SRIO1, SRIO1, SRIO1, SRIO1,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0x16] = {SRIO2, SRIO2, SRIO2, SRIO2, SRIO1, SRIO1, SRIO1, SRIO1,
+ AURORA, AURORA, SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
+ SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4, SGMII_FM1_DTSEC1,
+ SGMII_FM1_DTSEC2, SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4},
+ [0x19] = {SRIO2, SRIO2, SRIO2, SRIO2, SRIO1, SRIO1, SRIO1, SRIO1,
+ AURORA, AURORA, PCIE3, PCIE3, PCIE3, PCIE3, SGMII_FM1_DTSEC1,
+ SGMII_FM1_DTSEC2, SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4},
+ [0x1d] = {PCIE1, PCIE1, PCIE3, PCIE3, NONE, SRIO2, NONE, SRIO1,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0x22] = {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+ [0x25] = {PCIE1, PCIE1, PCIE3, PCIE3, SRIO1, SRIO1, SRIO1, SRIO1,
+ AURORA, AURORA, XAUI_FM2, XAUI_FM2, XAUI_FM2, XAUI_FM2,
+ XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1},
+};
+
+enum srds_prtcl serdes_get_prtcl(int cfg, int lane)
+{
+ if (!serdes_lane_enabled(lane))
+ return NONE;
+
+ return serdes_cfg_tbl[cfg][lane];
+}
+
+int is_serdes_prtcl_valid(u32 prtcl) {
+ int i;
+
+ if (prtcl > ARRAY_SIZE(serdes_cfg_tbl))
+ return 0;
+
+ for (i = 0; i < SRDS_MAX_LANES; i++) {
+ if (serdes_cfg_tbl[prtcl][i] != NONE)
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/arch/powerpc/include/asm/fsl_serdes.h b/arch/powerpc/include/asm/fsl_serdes.h
index c7877b9..85518eb 100644
--- a/arch/powerpc/include/asm/fsl_serdes.h
+++ b/arch/powerpc/include/asm/fsl_serdes.h
@@ -32,8 +32,15 @@ enum srds_prtcl {
SATA2,
SRIO1,
SRIO2,
- SGMII_FM1,
- SGMII_FM2,
+ SGMII_FM1_DTSEC1,
+ SGMII_FM1_DTSEC2,
+ SGMII_FM1_DTSEC3,
+ SGMII_FM1_DTSEC4,
+ SGMII_FM1_DTSEC5,
+ SGMII_FM2_DTSEC1,
+ SGMII_FM2_DTSEC2,
+ SGMII_FM2_DTSEC3,
+ SGMII_FM2_DTSEC4,
SGMII_TSEC1,
SGMII_TSEC2,
SGMII_TSEC3,
--
1.6.0.6
3
11
This is version 2 of the patch set. It incorporates all feedback to date.
This patch series adds support for:
- pad mux initialization
- OMAP4 TWL6030 companion chip initialization
- usb driver and gadget support
It also fixes issues in the udelay implementation and the OMAP I2C
driver as well as tweaks the default environment.
These patches were tested on Panda and OMAP4430 SDP as well as on
the Gumstix Overo to verify that there were no regressions on OMAP3.
Steve Sakoman (8):
ARMV7: Add pad mux support for OMAP4
ARMV7: Fix udelay for OMAP4
ARMV7: Modify i2c driver for more reliable operation on OMAP4
ARMV7: Add support for the TWL6030 I2C power chip used in OMAP4
systems
ARMV7: Restructure omap3 musb driver to allow code sharing between
OMAP3 and OMAP4
ARMV7: Enable musb driver and usbtty on OMAP4430 SDP
ARMV7: Enable musb driver and usbtty on OMAP4 Panda
ARMV7: Update default environment for OMAP4 boards
arch/arm/cpu/armv7/omap-common/timer.c | 9 -
arch/arm/cpu/armv7/omap4/board.c | 11 +
arch/arm/include/asm/arch-omap3/cpu.h | 3 +
arch/arm/include/asm/arch-omap3/i2c.h | 4 +-
arch/arm/include/asm/arch-omap4/cpu.h | 3 +
arch/arm/include/asm/arch-omap4/mux_omap4.h | 344 +++++++++++++++++++++++++++
arch/arm/include/asm/arch-omap4/omap4.h | 2 +
arch/arm/include/asm/arch-omap4/sys_proto.h | 1 +
board/ti/panda/panda.c | 26 ++
board/ti/panda/panda.h | 265 +++++++++++++++++++++
board/ti/sdp4430/sdp.c | 26 ++
board/ti/sdp4430/sdp.h | 265 +++++++++++++++++++++
drivers/i2c/omap24xx_i2c.c | 31 ++-
drivers/i2c/omap24xx_i2c.h | 4 +
drivers/power/Makefile | 1 +
drivers/power/twl6030.c | 77 ++++++
drivers/usb/musb/omap3.c | 16 ++
drivers/usb/musb/omap3.h | 3 +-
include/configs/omap4_panda.h | 28 ++-
include/configs/omap4_sdp4430.h | 28 ++-
include/twl6030.h | 90 +++++++
21 files changed, 1210 insertions(+), 27 deletions(-)
create mode 100644 arch/arm/include/asm/arch-omap4/mux_omap4.h
create mode 100644 board/ti/panda/panda.h
create mode 100644 board/ti/sdp4430/sdp.h
create mode 100644 drivers/power/twl6030.c
create mode 100644 include/twl6030.h
3
12
Hi, please merge my "for-wd-master" branch into u-boot.git "master" branch.
Thanks
The following changes since commit 1f82ff4777f360e92aa37bbbed647f7b9d9d2044:
Merge branch 'master' of git://git.denx.de/u-boot-video (2010-07-17 20:49:59
+0200)
are available in the git repository at:
git://git.denx.de/u-boot-pxa.git for-wd-master
Marek Vasut (8):
ARM: Define __raw_readX and __raw_writeX
PXA: pxafb: Add ACX517AKN support
common: Enable serial for PXA250
PXA: Palm Tungsten|C Support
PXA: pxafb: Add support for Sharp LQ038J7DH53
PXA: Add initial Palm LifeDrive support
Merge branch 'palm' into for-wd-master
PXA: Vpac270 config fixes
arch/arm/cpu/pxa/pxafb.c | 68 +++++++++++
arch/arm/include/asm/io.h | 46 ++++++-
board/palmld/Makefile | 54 ++++++++
board/palmld/config.mk | 1 +
board/palmld/lowlevel_init.S | 46 +++++++
board/palmld/palmld.c | 81 ++++++++++++
board/palmld/u-boot.lds | 56 +++++++++
board/palmtc/Makefile | 54 ++++++++
board/palmtc/config.mk | 3 +
board/palmtc/lowlevel_init.S | 40 ++++++
board/palmtc/palmtc.c | 77 ++++++++++++
board/palmtc/u-boot.lds | 56 +++++++++
boards.cfg | 2 +
common/serial.c | 2 +-
include/configs/palmld.h | 275 ++++++++++++++++++++++++++++++++++++++++++
include/configs/palmtc.h | 250 ++++++++++++++++++++++++++++++++++++++
include/configs/vpac270.h | 12 ++-
17 files changed, 1115 insertions(+), 8 deletions(-)
create mode 100644 board/palmld/Makefile
create mode 100644 board/palmld/config.mk
create mode 100644 board/palmld/lowlevel_init.S
create mode 100644 board/palmld/palmld.c
create mode 100644 board/palmld/u-boot.lds
create mode 100644 board/palmtc/Makefile
create mode 100644 board/palmtc/config.mk
create mode 100644 board/palmtc/lowlevel_init.S
create mode 100644 board/palmtc/palmtc.c
create mode 100644 board/palmtc/u-boot.lds
create mode 100644 include/configs/palmld.h
create mode 100644 include/configs/palmtc.h
2
3
The following changes since commit 7385c28e9b5f7d47e6a8f1ad9800e6e70af714e2:
fs/fat: Big code cleanup. (2010-07-24 20:54:46 +0200)
are available in the git repository at:
git://www.denx.de/git/u-boot-blackfin.git master
Mike Frysinger (5):
Blackfin: bf533/bf561 boards: convert to new soft gpio i2c code
Blackfin: jtagconsole: disable output processing
Blackfin: jtag-console: robustify against missing peer
Blackfin: jtag-console: add debug markers
Blackfin: jtag-console: handle newline stuffing
arch/blackfin/cpu/jtag-console.c | 95 ++++++++++++++++++++++++++++++++----
include/configs/bf533-ezkit.h | 43 +----------------
include/configs/bf533-stamp.h | 43 +----------------
include/configs/bf561-ezkit.h | 42 +---------------
include/configs/bfin_adi_common.h | 1 +
include/configs/blackstamp.h | 28 +----------
include/configs/ibf-dsp561.h | 29 +----------
tools/jtagconsole | 4 +-
8 files changed, 97 insertions(+), 188 deletions(-)
2
2
I'm working on a project porting the latest version of u-boot to a
dm365evm based board from Appro [1]. The board is a bit different, but
most of the changes are to the /include/configs/<board>.h file. Should
I contribute the code when it's working? How should i proceed? This
board came with a old version of u-boot (1.3.4).
Thank you,
[1] http://www.appropho.com/NewWeb/Product_DM365IMX035.php
--
Henrique Camargo
2
1