[U-Boot] [PATCH] ppc4xx: alpr: Remove some not needed commands to make image fit again
The latest changes increased the size of the alpr image a bit more. Now it doesn't fit into the 256k reserved for it. This patch now removes the commands ping and diag which are not needed in the production systems. Signed-off-by: Stefan Roese s...@denx.de Cc: Pieter Voorthuijsen pieter.voorthuij...@prodrive.nl --- include/configs/alpr.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/configs/alpr.h b/include/configs/alpr.h index 964630f..0fed9ad 100644 --- a/include/configs/alpr.h +++ b/include/configs/alpr.h @@ -232,7 +232,6 @@ #include config_cmd_default.h #define CONFIG_CMD_DHCP -#define CONFIG_CMD_DIAG #define CONFIG_CMD_EEPROM #define CONFIG_CMD_FPGA #define CONFIG_CMD_I2C @@ -240,7 +239,6 @@ #define CONFIG_CMD_NAND #define CONFIG_CMD_NET #define CONFIG_CMD_PCI -#define CONFIG_CMD_PING #undef CONFIG_CMD_NFS #undef CONFIG_WATCHDOG /* watchdog disabled*/ -- 1.6.6.rc2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] AM35x: Initial support for the processor
Thanks, Vaibhav Hiremath Platform Support Products Texas Instruments Inc Ph: +91-80-25099927 -Original Message- From: Tom [mailto:tom@windriver.com] Sent: Wednesday, December 16, 2009 1:32 AM To: Premi, Sanjeev Cc: u-boot@lists.denx.de; Hiremath, Vaibhav; Paulraj, Sandeep Subject: Re: [U-Boot] [PATCH 0/4] AM35x: Initial support for the processor Sanjeev Premi wrote: This patchset adds basic support for the AM35x processors. It also ensures that u-boot banner shows correct processor at start-up. Addition of AM35x impacts existing code for OMAP3, most patches in this set are applicable to both processor families. The series has been tested on the OMAP3EVM and AM3517EVM. To test on AM3517EVM, earlier patches posted by Vaibhav are required. [1] http://lists.denx.de/pipermail/u-boot/2009- November/064670.html The am3517 support is not in. This patchset is dependent on it. These changes can only be reviewed casually until then. Vaibhav, When will next rev of the am3517 changes be posted [Hiremath, Vaibhav] Tom, I am bit busy with some outstanding issues on Linux kernel, but probably sometime next week I will be able to re-submit the patches. Thanks, Vaibhav Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/9] Support for SPEAr SoCs
This patchset contains the support for 4 SoCs from SPEAr family SPEAr300 SPEAr310 SPEAr320 SPEAr600 It also contains the drivers needed for spear devices Regards Vipin Kumar Vipin (9): i2c driver support for SPEAr SoCs smi driver support for SPEAr SoCs nand driver support for SPEAr SoCs usbd driver and usb boot firmware support for SPEAr SoCs SPEAr600 SoC support added SPEAr300 SoC support added SPEAr310 SoC support added SPEAr320 SoC support added SPEAr600 build support added MAKEALL|4 + Makefile | 12 + board/spear/common/spr_lowlevel_init.S | 202 + board/spear/common/spr_misc.c | 270 +++ board/spear/spear300/Makefile | 52 ++ board/spear/spear300/config.mk | 39 + board/spear/spear300/spr300_board.c| 57 ++ board/spear/spear310/Makefile | 52 ++ board/spear/spear310/config.mk | 42 + board/spear/spear310/spr310_board.c| 58 ++ board/spear/spear320/Makefile | 52 ++ board/spear/spear320/config.mk | 42 + board/spear/spear320/spr320_board.c| 58 ++ board/spear/spear600/Makefile | 52 ++ board/spear/spear600/config.mk | 39 + board/spear/spear600/spr600_board.c| 53 ++ common/cmd_bdinfo.c| 20 + common/main.c |2 + cpu/arm926ejs/spear/Makefile | 52 ++ cpu/arm926ejs/spear/reset.c| 49 ++ cpu/arm926ejs/spear/timer.c| 148 drivers/i2c/Makefile |1 + drivers/i2c/spr_i2c.c | 321 drivers/mtd/Makefile |1 + drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/spr_nand.c| 126 +++ drivers/mtd/spr_smi.c | 548 + drivers/serial/usbtty.h|2 + drivers/usb/gadget/Makefile|1 + drivers/usb/gadget/spr_udc.c | 996 include/asm-arm/arch-spear/spr_defs.h | 31 + include/asm-arm/arch-spear/spr_emi.h | 55 ++ include/asm-arm/arch-spear/spr_gpt.h | 83 ++ include/asm-arm/arch-spear/spr_i2c.h | 143 include/asm-arm/arch-spear/spr_misc.h | 126 +++ include/asm-arm/arch-spear/spr_nand.h | 58 ++ include/asm-arm/arch-spear/spr_smi.h | 112 +++ include/asm-arm/arch-spear/spr_syscntl.h | 38 + include/asm-arm/arch-spear/spr_xloader_table.h | 67 ++ include/asm-arm/u-boot.h |5 + include/configs/spear300.h | 260 ++ include/configs/spear310.h | 353 + include/configs/spear320.h | 336 include/configs/spear600.h | 260 ++ include/usb/spr_udc.h | 227 ++ 45 files changed, 5506 insertions(+), 0 deletions(-) create mode 100755 board/spear/common/spr_lowlevel_init.S create mode 100755 board/spear/common/spr_misc.c create mode 100755 board/spear/spear300/Makefile create mode 100755 board/spear/spear300/config.mk create mode 100755 board/spear/spear300/spr300_board.c create mode 100755 board/spear/spear310/Makefile create mode 100755 board/spear/spear310/config.mk create mode 100755 board/spear/spear310/spr310_board.c create mode 100755 board/spear/spear320/Makefile create mode 100755 board/spear/spear320/config.mk create mode 100755 board/spear/spear320/spr320_board.c create mode 100755 board/spear/spear600/Makefile create mode 100755 board/spear/spear600/config.mk create mode 100755 board/spear/spear600/spr600_board.c create mode 100755 cpu/arm926ejs/spear/Makefile create mode 100755 cpu/arm926ejs/spear/reset.c create mode 100755 cpu/arm926ejs/spear/timer.c mode change 100644 = 100755 drivers/i2c/Makefile create mode 100755 drivers/i2c/spr_i2c.c mode change 100644 = 100755 drivers/mtd/Makefile create mode 100755 drivers/mtd/nand/spr_nand.c create mode 100755 drivers/mtd/spr_smi.c mode change 100644 = 100755 drivers/serial/usbtty.h mode change 100644 = 100755 drivers/usb/gadget/Makefile create mode 100755 drivers/usb/gadget/spr_udc.c create mode 100644 include/asm-arm/arch-spear/spr_defs.h create mode 100755 include/asm-arm/arch-spear/spr_emi.h create mode 100755 include/asm-arm/arch-spear/spr_gpt.h create mode 100755 include/asm-arm/arch-spear/spr_i2c.h create mode 100644 include/asm-arm/arch-spear/spr_misc.h create mode 100644 include/asm-arm/arch-spear/spr_nand.h create mode 100755 include/asm-arm/arch-spear/spr_smi.h create mode 100644 include/asm-arm/arch-spear/spr_syscntl.h create mode 100755
[U-Boot] [PATCH 1/9] i2c driver support for SPEAr SoCs
Signed-off-by: Vipin vipin.ku...@st.com --- drivers/i2c/Makefile |1 + drivers/i2c/spr_i2c.c| 321 ++ include/asm-arm/arch-spear/spr_i2c.h | 143 +++ 3 files changed, 465 insertions(+), 0 deletions(-) mode change 100644 = 100755 drivers/i2c/Makefile create mode 100755 drivers/i2c/spr_i2c.c create mode 100755 include/asm-arm/arch-spear/spr_i2c.h diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile old mode 100644 new mode 100755 index b860e89..a65543f --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -38,6 +38,7 @@ COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o +COBJS-$(CONFIG_SPEARI2C) += spr_i2c.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/i2c/spr_i2c.c b/drivers/i2c/spr_i2c.c new file mode 100755 index 000..43a9f35 --- /dev/null +++ b/drivers/i2c/spr_i2c.c @@ -0,0 +1,321 @@ +/* + * (C) Copyright 2009 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.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/io.h +#include asm/arch/spr_i2c.h + +static struct i2c_regs *const i2c_regs_p = + (struct i2c_regs *)CONFIG_SYS_I2C_BASE; + +/** + * i2c_setfreq - Set i2c working mode frequency + * + * Set i2c working mode frequency + */ +static void i2c_setfreq(unsigned int high, unsigned int low) +{ + unsigned int hcnt, lcnt; + + hcnt = (IC_CLK * high) / NANO_TO_MICRO; + writel(hcnt, i2c_regs_p-ic_fs_scl_hcnt); + + lcnt = (IC_CLK * low) / NANO_TO_MICRO; + writel(lcnt, i2c_regs_p-ic_fs_scl_lcnt); +} + +/** + * set_speed - Set the i2c speed mode (standard, high, fast) + * @i2c_spd: required i2c speed mode + * + * Set the i2c speed mode (standard, high, fast) + */ +static void set_speed(int i2c_spd) +{ + unsigned int cntl; + + if (i2c_spd == IC_SPEED_MODE_MAX) { + cntl = readl(i2c_regs_p-ic_con); + cntl |= IC_CON_SPH | IC_CON_SPL; + writel(cntl, i2c_regs_p-ic_con); + i2c_setfreq(MIN_HS_SCL_HIGHTIME, MIN_HS_SCL_LOWTIME); + } else if (i2c_spd == IC_SPEED_MODE_FAST) { + cntl = readl(i2c_regs_p-ic_con); + cntl |= IC_CON_SPH; + cntl = ~IC_CON_SPL; + writel(cntl, i2c_regs_p-ic_con); + i2c_setfreq(MIN_FS_SCL_HIGHTIME, MIN_FS_SCL_LOWTIME); + } else if (i2c_spd == IC_SPEED_MODE_STANDARD) { + cntl = readl(i2c_regs_p-ic_con); + cntl |= IC_CON_SPF; + cntl = ~IC_CON_SPL; + writel(cntl, i2c_regs_p-ic_con); + i2c_setfreq(MIN_SS_SCL_HIGHTIME, MIN_SS_SCL_LOWTIME); + } +} + +/** + * i2c_set_bus_speed - Set the i2c speed + * @speed: required i2c speed + * + * Set the i2c speed. + */ +void i2c_set_bus_speed(int speed) +{ + if (speed = I2C_MAX_SPEED) + set_speed(IC_SPEED_MODE_MAX); + else + if (speed = I2C_FAST_SPEED) + set_speed(IC_SPEED_MODE_FAST); + else + set_speed(IC_SPEED_MODE_STANDARD); +} + +/** + * i2c_get_bus_speed - Gets the i2c speed + * + * Gets the i2c speed. + */ +int i2c_get_bus_speed(void) +{ + if (((readl(i2c_regs_p-ic_con) IC_CON_SPH) == IC_CON_SPH) + ((readl(i2c_regs_p-ic_con) IC_CON_SPL) == IC_CON_SPL)) { + return I2C_MAX_SPEED; + + } else if (((readl(i2c_regs_p-ic_con) IC_CON_SPH) == IC_CON_SPH) + ((readl(i2c_regs_p-ic_con) IC_CON_SPL) == 0)) { + return I2C_FAST_SPEED; + + } else if (((readl(i2c_regs_p-ic_con) IC_CON_SPF) == IC_CON_SPF) + ((readl(i2c_regs_p-ic_con) IC_CON_SPL) == 0)) { + return I2C_STANDARD_SPEED; + } + + return 0; +} + +/** + * i2c_init - Init function + * @speed: required i2c speed + * @slaveadd: slave address for the spear device + * + * Initialization function. + */ +void i2c_init(int speed, int slaveadd) +{ + unsigned int enbl; + + /* Disable i2c */ + enbl =
[U-Boot] [PATCH 6/9] SPEAr300 SoC support added
Signed-off-by: Vipin vipin.ku...@st.com --- MAKEALL |1 + Makefile|3 + board/spear/spear300/Makefile | 52 +++ board/spear/spear300/config.mk | 39 + board/spear/spear300/spr300_board.c | 57 include/configs/spear300.h | 260 +++ 6 files changed, 412 insertions(+), 0 deletions(-) create mode 100755 board/spear/spear300/Makefile create mode 100755 board/spear/spear300/config.mk create mode 100755 board/spear/spear300/spr300_board.c create mode 100755 include/configs/spear300.h diff --git a/MAKEALL b/MAKEALL index ab1bb6f..e280e37 100755 --- a/MAKEALL +++ b/MAKEALL @@ -572,6 +572,7 @@ LIST_ARM9= \ sheevaplug \ smdk2400\ smdk2410\ + spear300\ trab\ VCMA9 \ versatile \ diff --git a/Makefile b/Makefile index 536ccb3..4489167 100644 --- a/Makefile +++ b/Makefile @@ -3056,6 +3056,9 @@ smdk2400_config : unconfig smdk2410_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0 +spear300_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs spear300 spear spear + SX1_stdout_serial_config \ SX1_config:unconfig @mkdir -p $(obj)include diff --git a/board/spear/spear300/Makefile b/board/spear/spear300/Makefile new file mode 100755 index 000..247c302 --- /dev/null +++ b/board/spear/spear300/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000-2004 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# 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 := spr300_board.o \ + ../common/spr_misc.o +SOBJS := ../common/spr_lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +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/spear/spear300/config.mk b/board/spear/spear300/config.mk new file mode 100755 index 000..90a6cf9 --- /dev/null +++ b/board/spear/spear300/config.mk @@ -0,0 +1,39 @@ +# +# (C) Copyright 2009 +# Vipin Kumar, ST Microelectronics vipin.ku...@st.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 +# + +# + +TEXT_BASE = 0x0070 + +ALL += $(obj)u-boot.img + +# Environment variables in NAND +ifeq ($(ENV),NAND) +PLATFORM_RELFLAGS += -DENV_IN_NAND +endif + +# Compile uboot as USB boot firmware +ifeq ($(CONSOLE),USB) +PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY +endif + diff --git a/board/spear/spear300/spr300_board.c b/board/spear/spear300/spr300_board.c new file mode 100755 index 000..97de0be --- /dev/null +++ b/board/spear/spear300/spr300_board.c @@ -0,0 +1,57 @@ +/* + * (C) Copyright 2009 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. + * + * See file
[U-Boot] [PATCH 2/9] smi driver support for SPEAr SoCs
Signed-off-by: Vipin vipin.ku...@st.com --- drivers/mtd/Makefile |1 + drivers/mtd/spr_smi.c| 548 ++ include/asm-arm/arch-spear/spr_smi.h | 112 +++ 3 files changed, 661 insertions(+), 0 deletions(-) mode change 100644 = 100755 drivers/mtd/Makefile create mode 100755 drivers/mtd/spr_smi.c create mode 100755 include/asm-arm/arch-spear/spr_smi.h diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile old mode 100644 new mode 100755 index 754d648..cbf6f15 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -34,6 +34,7 @@ COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o +COBJS-$(CONFIG_SPEARSMI) += spr_smi.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/spr_smi.c new file mode 100755 index 000..bc17c9d --- /dev/null +++ b/drivers/mtd/spr_smi.c @@ -0,0 +1,548 @@ +/* + * (C) Copyright 2009 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.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 flash.h +#include linux/err.h + +#include asm/io.h +#include asm/arch/spr_smi.h + +#if !defined(CONFIG_SYS_NO_FLASH) + +static struct smi_regs *const smicntl = + (struct smi_regs *const)CONFIG_SYS_SMI_BASE; +static ulong bank_base[CONFIG_SYS_MAX_FLASH_BANKS] = CONFIG_SYS_FLASH_ADDR_BASE; +flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; + +#define ST_M25Pxx_ID 0x2020 + +/** + * smi_wait_xfer_finish - Wait until TFF is set in status register + * @timeout:timeout in milliseconds + * + * Wait until TFF is set in status register + */ +static inline void smi_wait_xfer_finish(int timeout) +{ + while (timeout--) { + if (readl(smicntl-smi_sr) TFF) + break; + udelay(1000); + } +} + +/** + * smi_read_id - Read flash id + * @info: flash_info structure pointer + * @banknum:bank number + * + * Read the flash id present at bank #banknum + */ +static unsigned int smi_read_id(flash_info_t *info, int banknum) +{ + unsigned int value; + + writel(readl(smicntl-smi_cr1) | SW_MODE, smicntl-smi_cr1); + writel(READ_ID, smicntl-smi_tr); + writel((banknum BANKSEL_SHIFT) | SEND | TX_LEN_1 | RX_LEN_3, + smicntl-smi_cr2); + smi_wait_xfer_finish(XFER_FINISH_TOUT); + + value = (readl(smicntl-smi_rr) 0x00FF); + + writel(readl(smicntl-smi_sr) ~(TFF), smicntl-smi_sr); + writel(readl(smicntl-smi_cr1) ~(SW_MODE), smicntl-smi_cr1); + + return value; +} + +/** + * flash_get_size - Detect the SMI flash by reading the ID. + * @base: Base address of the flash area bank #banknum + * @banknum:Bank number + * + * Detect the SMI flash by reading the ID. Initializes the flash_info structure + * with size, sector count etc. + */ +static ulong flash_get_size(ulong base, int banknum) +{ + flash_info_t *info = flash_info[banknum]; + unsigned int value = 0; + unsigned int density = 0; + int i; + + value = smi_read_id(info, banknum); + density = (value 16) 0xff; + + switch (density) { + case 0x10: + info-size = 64 * 1024; + info-sector_count = 2; + break; + case 0x11: + info-size = 128 * 1024; + info-sector_count = 4; + break; + case 0x12: + info-size = 256 * 1024; + info-sector_count = 4; + break; + case 0x13: + info-size = 512 * 1024; + info-sector_count = 8; + break; + case 0x14: + info-size = 1 * 1024 * 1024; + info-sector_count = 16; + break; + case 0x15: + info-size = 2 * 1024 * 1024; + info-sector_count = 32; + break; + case 0x16: + info-size = 4 * 1024 * 1024; + info-sector_count = 64; + break; + case 0x17: +
[U-Boot] [PATCH 7/9] SPEAr310 SoC support added
Signed-off-by: Vipin vipin.ku...@st.com --- MAKEALL |1 + Makefile|3 + board/spear/spear310/Makefile | 52 + board/spear/spear310/config.mk | 42 board/spear/spear310/spr310_board.c | 58 ++ include/configs/spear310.h | 353 +++ 6 files changed, 509 insertions(+), 0 deletions(-) create mode 100755 board/spear/spear310/Makefile create mode 100755 board/spear/spear310/config.mk create mode 100755 board/spear/spear310/spr310_board.c create mode 100755 include/configs/spear310.h diff --git a/MAKEALL b/MAKEALL index e280e37..3abb4f0 100755 --- a/MAKEALL +++ b/MAKEALL @@ -573,6 +573,7 @@ LIST_ARM9= \ smdk2400\ smdk2410\ spear300\ + spear310\ trab\ VCMA9 \ versatile \ diff --git a/Makefile b/Makefile index 4489167..44f1d8b 100644 --- a/Makefile +++ b/Makefile @@ -3059,6 +3059,9 @@ smdk2410_config : unconfig spear300_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs spear300 spear spear +spear310_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs spear310 spear spear + SX1_stdout_serial_config \ SX1_config:unconfig @mkdir -p $(obj)include diff --git a/board/spear/spear310/Makefile b/board/spear/spear310/Makefile new file mode 100755 index 000..94d68e3 --- /dev/null +++ b/board/spear/spear310/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000-2004 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# 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 := spr310_board.o \ + ../common/spr_misc.o +SOBJS := ../common/spr_lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +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/spear/spear310/config.mk b/board/spear/spear310/config.mk new file mode 100755 index 000..8b7aa05 --- /dev/null +++ b/board/spear/spear310/config.mk @@ -0,0 +1,42 @@ +# +# (C) Copyright 2009 +# Vipin Kumar, ST Microelectronics vipin.ku...@st.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 +# + +# + +TEXT_BASE = 0x0070 + +ALL += $(obj)u-boot.img + +# Environment variables in NAND +ifeq ($(ENV),NAND) +PLATFORM_RELFLAGS += -DENV_IN_NAND +endif + +ifeq ($(FLASH),PNOR) +PLATFORM_RELFLAGS += -DPNOR_FLASH +endif + +ifeq ($(CONSOLE),USB) +PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY +endif + diff --git a/board/spear/spear310/spr310_board.c b/board/spear/spear310/spr310_board.c new file mode 100755 index 000..750e303 --- /dev/null +++ b/board/spear/spear310/spr310_board.c @@ -0,0 +1,58 @@ +/* + * (C) Copyright 2009 + * Ryan Chen, ST Micoelectronics, ryan.c...@st.com. + * Vipin
[U-Boot] [PATCH 8/9] SPEAr320 SoC support added
Signed-off-by: Vipin vipin.ku...@st.com --- MAKEALL |1 + Makefile|3 + board/spear/spear320/Makefile | 52 ++ board/spear/spear320/config.mk | 42 + board/spear/spear320/spr320_board.c | 58 ++ include/configs/spear320.h | 336 +++ 6 files changed, 492 insertions(+), 0 deletions(-) create mode 100755 board/spear/spear320/Makefile create mode 100755 board/spear/spear320/config.mk create mode 100755 board/spear/spear320/spr320_board.c create mode 100755 include/configs/spear320.h diff --git a/MAKEALL b/MAKEALL index 3abb4f0..0672ba0 100755 --- a/MAKEALL +++ b/MAKEALL @@ -574,6 +574,7 @@ LIST_ARM9= \ smdk2410\ spear300\ spear310\ + spear320\ trab\ VCMA9 \ versatile \ diff --git a/Makefile b/Makefile index 44f1d8b..1f60204 100644 --- a/Makefile +++ b/Makefile @@ -3062,6 +3062,9 @@ spear300_config : unconfig spear310_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs spear310 spear spear +spear320_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs spear320 spear spear + SX1_stdout_serial_config \ SX1_config:unconfig @mkdir -p $(obj)include diff --git a/board/spear/spear320/Makefile b/board/spear/spear320/Makefile new file mode 100755 index 000..1ddd1c2 --- /dev/null +++ b/board/spear/spear320/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000-2004 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# 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 := spr320_board.o \ + ../common/spr_misc.o +SOBJS := ../common/spr_lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +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/spear/spear320/config.mk b/board/spear/spear320/config.mk new file mode 100755 index 000..8b7aa05 --- /dev/null +++ b/board/spear/spear320/config.mk @@ -0,0 +1,42 @@ +# +# (C) Copyright 2009 +# Vipin Kumar, ST Microelectronics vipin.ku...@st.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 +# + +# + +TEXT_BASE = 0x0070 + +ALL += $(obj)u-boot.img + +# Environment variables in NAND +ifeq ($(ENV),NAND) +PLATFORM_RELFLAGS += -DENV_IN_NAND +endif + +ifeq ($(FLASH),PNOR) +PLATFORM_RELFLAGS += -DPNOR_FLASH +endif + +ifeq ($(CONSOLE),USB) +PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY +endif + diff --git a/board/spear/spear320/spr320_board.c b/board/spear/spear320/spr320_board.c new file mode 100755 index 000..750e303 --- /dev/null +++ b/board/spear/spear320/spr320_board.c @@ -0,0 +1,58 @@ +/* + * (C) Copyright 2009 + * Ryan Chen, ST Micoelectronics, ryan.c...@st.com. + * Vipin Kumar,
[U-Boot] [PATCH 4/9] usbd driver and usb boot firmware support for SPEAr SoCs
Signed-off-by: Vipin vipin.ku...@st.com --- common/main.c |2 + drivers/serial/usbtty.h |2 + drivers/usb/gadget/Makefile |1 + drivers/usb/gadget/spr_udc.c | 996 + include/asm-arm/arch-spear/spr_misc.h | 126 + include/usb/spr_udc.h | 227 6 files changed, 1354 insertions(+), 0 deletions(-) mode change 100644 = 100755 drivers/serial/usbtty.h mode change 100644 = 100755 drivers/usb/gadget/Makefile create mode 100755 drivers/usb/gadget/spr_udc.c create mode 100644 include/asm-arm/arch-spear/spr_misc.h create mode 100755 include/usb/spr_udc.h diff --git a/common/main.c b/common/main.c index 10d8904..79f3018 100644 --- a/common/main.c +++ b/common/main.c @@ -397,6 +397,7 @@ void main_loop (void) debug (### main_loop: bootcmd=\%s\\n, s ? s : UNDEFINED); +#if !defined(CONFIG_SPEAR_USBTTY) if (bootdelay = 0 s !abortboot (bootdelay)) { # ifdef CONFIG_AUTOBOOT_KEYED int prev = disable_ctrlc(1);/* disable Control C checking */ @@ -413,6 +414,7 @@ void main_loop (void) disable_ctrlc(prev);/* restore Control C checking */ # endif } +# endif # ifdef CONFIG_MENUKEY if (menukey == CONFIG_MENUKEY) { diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h old mode 100644 new mode 100755 index f746d63..c96b93e --- a/drivers/serial/usbtty.h +++ b/drivers/serial/usbtty.h @@ -31,6 +31,8 @@ #include usb/omap1510_udc.h #elif defined(CONFIG_PXA27X) #include usb/pxa27x_udc.h +#elif defined(CONFIG_SPEAR3XX) || defined(CONFIG_SPEAR600) +#include usb/spr_udc.h #endif #include version_autogenerated.h diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile old mode 100644 new mode 100755 index 2a19b1e..1d7362d --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -32,6 +32,7 @@ COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o COBJS-$(CONFIG_PXA27X) += pxa27x_udc.o +COBJS-$(CONFIG_SPEARUDC) += spr_udc.o endif COBJS := $(COBJS-y) diff --git a/drivers/usb/gadget/spr_udc.c b/drivers/usb/gadget/spr_udc.c new file mode 100755 index 000..5b135c7 --- /dev/null +++ b/drivers/usb/gadget/spr_udc.c @@ -0,0 +1,996 @@ +/* + * Based on drivers/usb/gadget/omap1510_udc.c + * TI OMAP1510 USB bus interface driver + * + * (C) Copyright 2009 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.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/io.h + +#include usbdevice.h +#include ep0.h +#include usb/spr_udc.h +#include asm/arch/spr_misc.h + +#define UDC_INIT_MDELAY 80 /* Device settle delay */ + +/* Some kind of debugging output... */ +#if 1 +#define UDCDBG(str) +#define UDCDBGA(fmt, args...) +#else +#define UDCDBG(str) serial_printf(str \n) +#define UDCDBGA(fmt, args...) serial_printf(fmt \n, ##args) +#endif + +static struct urb *ep0_urb; +static struct usb_device_instance *udc_device; + +static struct plug_regs *const plug_regs_p = + (struct plug_regs *const)CONFIG_SYS_PLUG_BASE; +static struct udc_regs *const udc_regs_p = + (struct udc_regs *const)CONFIG_SYS_USBD_BASE; +static struct udc_endp_regs *const outep_regs_p = + ((struct udc_regs *const)CONFIG_SYS_USBD_BASE)-out_regs[0]; +static struct udc_endp_regs *const inep_regs_p = + ((struct udc_regs *const)CONFIG_SYS_USBD_BASE)-in_regs[0]; + +/* + * udc_state_transition - Write the next packet to TxFIFO. + * @initial: Initial state. + * @final: Final state. + * + * Helper function to implement device state changes. The device states and + * the events that transition between them are: + * + * STATE_ATTACHED + * || /\ + * \/ || + * DEVICE_HUB_CONFIGURED DEVICE_HUB_RESET + * || /\ + * \/ || + * STATE_POWERED + * || /\
[U-Boot] Build failures at bb3bcfa2
Hi all, Just pulled latest master at: commit bb3bcfa2426cc6a0aecec7270e3ee67ca843a125 Merge: a200a7c 4b142fe Author: Wolfgang Denk w...@denx.de Date: Tue Dec 15 23:38:34 2009 +0100 Merge branch 'next' of ../next However, I am noticing build failures. See log below: Best regards, Sanjeev premi # make distclean premi # make omap3_evm_config Configuring for omap3_evm board... premi # make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- Generating include/autoconf.mk Generating include/autoconf.mk.dep for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done make[1]: Entering directory `/home/premi/u-boot/tools' make[1]: Leaving directory `/home/premi/u-boot/tools' make[1]: Entering directory `/home/premi/u-boot/tools' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/premi/u-boot/tools' make[1]: Entering directory `/home/premi/u-boot/examples/standalone' make[1]: Leaving directory `/home/premi/u-boot/examples/standalone' make[1]: Entering directory `/home/premi/u-boot/examples/standalone' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/premi/u-boot/examples/standalone' make[1]: Entering directory `/home/premi/u-boot/examples/api' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/premi/u-boot/examples/api' make -C tools all make[1]: Entering directory `/home/premi/u-boot/tools' arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/premi/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o crc32.o crc32.c -c arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/premi/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o env_embedded.o env_embedded.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/premi/u-boot/include -idirafter /home/premi/u-boot/include2 -idirafter /home/premi/u-boot/include -I /home/premi/u-boot/libfdt -I /home/premi/u-boot/tools -DTEXT_BASE=0x80e8 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o envcrc.o envcrc.c -c arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/premi/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o sha1.o sha1.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/premi/u-boot/include -idirafter /home/premi/u-boot/include2 -idirafter /home/premi/u-boot/include -I /home/premi/u-boot/libfdt -I /home/premi/u-boot/tools -DTEXT_BASE=0x80e8 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o envcrc crc32.o env_embedded.o envcrc.o sha1.o /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 40) crc32.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [envcrc] Error 1 make[1]: Leaving directory `/home/premi/u-boot/tools' make: *** [tools] Error 2 premi # ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build failures at bb3bcfa2
On Wednesday 16 December 2009 10:52:44 Premi, Sanjeev wrote: Just pulled latest master at: commit bb3bcfa2426cc6a0aecec7270e3ee67ca843a125 Merge: a200a7c 4b142fe Author: Wolfgang Denk w...@denx.de Date: Tue Dec 15 23:38:34 2009 +0100 Merge branch 'next' of ../next However, I am noticing build failures. See log below: Best regards, Sanjeev premi # make distclean premi # make omap3_evm_config Configuring for omap3_evm board... premi # make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- Generating include/autoconf.mk Generating include/autoconf.mk.dep for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done make[1]: Entering directory `/home/premi/u-boot/tools' make[1]: Leaving directory `/home/premi/u-boot/tools' make[1]: Entering directory `/home/premi/u-boot/tools' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/premi/u-boot/tools' make[1]: Entering directory `/home/premi/u-boot/examples/standalone' make[1]: Leaving directory `/home/premi/u-boot/examples/standalone' make[1]: Entering directory `/home/premi/u-boot/examples/standalone' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/premi/u-boot/examples/standalone' make[1]: Entering directory `/home/premi/u-boot/examples/api' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/premi/u-boot/examples/api' make -C tools all make[1]: Entering directory `/home/premi/u-boot/tools' arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/premi/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/i nclude -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o crc32.o crc32.c -c arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/premi/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/i nclude -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o env_embedded.o env_embedded.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/premi/u-boot/include -idirafter /home/premi/u-boot/include2 -idirafter /home/premi/u-boot/include -I /home/premi/u-boot/libfdt -I /home/premi/u-boot/tools -DTEXT_BASE=0x80e8 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o envcrc.o envcrc.c -c arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/premi/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/i nclude -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o sha1.o sha1.c -c gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/premi/u-boot/include -idirafter /home/premi/u-boot/include2 -idirafter /home/premi/u-boot/include -I /home/premi/u-boot/libfdt -I /home/premi/u-boot/tools -DTEXT_BASE=0x80e8 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic -o envcrc crc32.o env_embedded.o envcrc.o sha1.o /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 40) crc32.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [envcrc] Error 1 make[1]: Leaving directory `/home/premi/u-boot/tools' make: *** [tools] Error 2 Most likely the same problem I stumbled upon a few days ago. Here my thread: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/71125/focus=72327 Do you by any chance have a copy of/link to crc32.c, env_embedded.c, etc. sitting in your tools directory? Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] Prepare for da850 support
DA850/OMAP-L138 is a new SoC from Texas Instruments (http://focus.ti.com/docs/prod/folders/print/omap-l138.html). This SoC is similar to DA830/OMAP-L137 in many aspects. Hence rename the da830 specific files and folders to da8xx to accommodate DA850/OMAP-L138. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Makefile |4 +- board/davinci/da830evm/Makefile | 51 --- board/davinci/da830evm/config.mk | 43 - board/davinci/da830evm/da830evm.c | 127 - board/davinci/da8xxevm/Makefile | 53 +++ board/davinci/da8xxevm/config.mk | 43 + board/davinci/da8xxevm/da830evm.c | 127 + 7 files changed, 226 insertions(+), 222 deletions(-) delete mode 100644 board/davinci/da830evm/Makefile delete mode 100644 board/davinci/da830evm/config.mk delete mode 100644 board/davinci/da830evm/da830evm.c create mode 100644 board/davinci/da8xxevm/Makefile create mode 100644 board/davinci/da8xxevm/config.mk create mode 100644 board/davinci/da8xxevm/da830evm.c diff --git a/Makefile b/Makefile index b891b1b..769bf22 100644 --- a/Makefile +++ b/Makefile @@ -2934,7 +2934,9 @@ cp1026_config: unconfig @board/armltd/integrator/split_by_variant.sh cp $@ da830evm_config: unconfig - @$(MKCONFIG) $(@:_config=) arm arm926ejs da830evm davinci davinci + @mkdir -p $(obj)include + echo #define CONFIG_DA830_EVM $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) arm arm926ejs da8xxevm davinci davinci davinci_dvevm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs dvevm davinci davinci diff --git a/board/davinci/da830evm/Makefile b/board/davinci/da830evm/Makefile deleted file mode 100644 index 02636fa..000 --- a/board/davinci/da830evm/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# Copyright (C) 2007 Sergey Kubushyn k...@koi8.net -# -# 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 := da830evm.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -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 *~ .depend - -# -# This is for $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -# diff --git a/board/davinci/da830evm/config.mk b/board/davinci/da830evm/config.mk deleted file mode 100644 index 6da29a9..000 --- a/board/davinci/da830evm/config.mk +++ /dev/null @@ -1,43 +0,0 @@ -# -# (C) Copyright 2008, Texas Instruments, Inc. http://www.ti.com/ -# -# Copyright (C) 2007 Sergey Kubushyn k...@koi8.net -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, g...@denx.de -# David Mueller, ELSOFT AG, d.muel...@elsoft.ch -# -# 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 -# - -# Texas Instruments DA8xx EVM board (ARM925EJS) cpu -# see http://www.ti.com/ for more information on Texas Instruments -# -# DA8xx EVM has 1 bank of 64 MB SDRAM (2 16Meg x16 chips). -# Physical Address: -# C000' to
[U-Boot] [PATCH 2/3] Add board specific code for da850 EVM
Provides initial support for TI OMAP-L138/DA850 SoC devices on a Logic PD EVM board. Provides: Initial boot and configuration. Support for i2c. UART support (console). Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- board/davinci/da8xxevm/Makefile |1 + board/davinci/da8xxevm/da850evm.c | 124 +++ include/asm-arm/arch-davinci/hardware.h |1 + 3 files changed, 126 insertions(+), 0 deletions(-) create mode 100644 board/davinci/da8xxevm/da850evm.c diff --git a/board/davinci/da8xxevm/Makefile b/board/davinci/da8xxevm/Makefile index 45da94b..93dbcbb 100644 --- a/board/davinci/da8xxevm/Makefile +++ b/board/davinci/da8xxevm/Makefile @@ -28,6 +28,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a COBJS-$(CONFIG_DA830_EVM) += da830evm.o +COBJS-$(CONFIG_DA850_EVM) += da850evm.o COBJS := $(sort $(COBJS-y)) diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c new file mode 100644 index 000..92548e2 --- /dev/null +++ b/board/davinci/da8xxevm/da850evm.c @@ -0,0 +1,124 @@ +/* + * (C) Copyright 2009, Texas Instruments, Inc. http://www.ti.com/ + * + * Based on da830evm.c + * + * Copyright (C) 2007 Sergey Kubushyn k...@koi8.net + * + * Parts are shamelessly stolen from various TI sources, original copyright + * follows: + * - + * + * Copyright (C) 2004 Texas Instruments. + * + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include common.h +#include i2c.h +#include asm/arch/hardware.h +#include asm/io.h +#include ../common/misc.h + +DECLARE_GLOBAL_DATA_PTR; + +#define pinmux davinci_syscfg_regs-pinmux + +#ifdef CONFIG_SPI_FLASH +/* SPI0 pin muxer settings */ +const struct pinmux_config spi1_pins[] = { + { pinmux[5], 1, 1 }, + { pinmux[5], 1, 2 }, + { pinmux[5], 1, 4 }, + { pinmux[5], 1, 5 } +}; +#endif + +/* UART pin muxer settings */ +const struct pinmux_config uart_pins[] = { + { pinmux[0], 4, 6 }, + { pinmux[0], 4, 7 }, + { pinmux[4], 2, 4 }, + { pinmux[4], 2, 5 } +}; + +/* I2C pin muxer settings */ +const struct pinmux_config i2c_pins[] = { + { pinmux[4], 2, 2 }, + { pinmux[4], 2, 3 } +}; + +int board_init(void) +{ +#ifndef CONFIG_USE_IRQ + /* +* Mask all IRQs by clearing the global enable and setting +* the enable clear for all the 90 interrupts. +*/ + + writel(0, davinci_aintc_regs-ger); + + writel(0, davinci_aintc_regs-hier); + + writel(0x, davinci_aintc_regs-ecr1); + writel(0x, davinci_aintc_regs-ecr2); + writel(0x, davinci_aintc_regs-ecr3); +#endif + + /* arch number of the board */ + gd-bd-bi_arch_number = MACH_TYPE_DAVINCI_DA850_EVM; + + /* address of boot parameters */ + gd-bd-bi_boot_params = LINUX_BOOT_PARAM_ADDR; + + /* +* Power on required peripherals +* ARM does not have access by default to PSC0 and PSC1 +* assuming here that the DSP bootloader has set the IOPU +* such that PSC access is available to ARM +*/ + lpsc_on(DAVINCI_LPSC_AEMIF);/* NAND, NOR */ + lpsc_on(DAVINCI_LPSC_SPI1); /* Serial Flash */ + lpsc_on(DAVINCI_LPSC_EMAC); /* image download */ + lpsc_on(DAVINCI_LPSC_UART2);/* console */ + lpsc_on(DAVINCI_LPSC_GPIO); + + /* setup the SUSPSRC for ARM to control emulation suspend */ + writel(readl(davinci_syscfg_regs-suspsrc) + ~(DAVINCI_SYSCFG_SUSPSRC_EMAC | DAVINCI_SYSCFG_SUSPSRC_I2C | +DAVINCI_SYSCFG_SUSPSRC_SPI1 | DAVINCI_SYSCFG_SUSPSRC_TIMER0 | +DAVINCI_SYSCFG_SUSPSRC_UART2), + davinci_syscfg_regs-suspsrc); + +#ifdef CONFIG_SPI_FLASH + if (davinci_configure_pin_mux(spi1_pins, ARRAY_SIZE(spi1_pins)) != 0) + return 1; +#endif + + if (davinci_configure_pin_mux(uart_pins, ARRAY_SIZE(uart_pins)) != 0) + return 1; + + if (davinci_configure_pin_mux(i2c_pins, ARRAY_SIZE(i2c_pins)) != 0) + return 1; + +
[U-Boot] [PATCH 3/3] Create configuration file for da850 EVM
Provides initial support for TI OMAP-L138/DA850 SoC devices on a Logic PD EVM board. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- MAINTAINERS|4 + MAKEALL|1 + Makefile |5 ++ include/configs/da850evm.h | 142 4 files changed, 152 insertions(+), 0 deletions(-) create mode 100644 include/configs/da850evm.h diff --git a/MAINTAINERS b/MAINTAINERS index 8a61f5b..03d2ede 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -722,6 +722,10 @@ Nick Thompson nick.thomp...@gefanuc.com da830evmARM926EJS (DA830/OMAP-L137) +Sudhakar Rajashekhara sudhakar@ti.com + + da850evmARM926EJS (DA850/OMAP-L138) + Albin Tonnerre albin.tonne...@free-electrons.com sbc35_a9g20 ARM926EJS (AT91SAM9G20 SoC) diff --git a/MAKEALL b/MAKEALL index 6ee5c49..74bb85e 100755 --- a/MAKEALL +++ b/MAKEALL @@ -551,6 +551,7 @@ LIST_ARM9= \ cp946es \ cp966 \ da830evm\ + da850evm\ imx27lite \ lpd7a400\ mv88f6281gtw_ge \ diff --git a/Makefile b/Makefile index 769bf22..674dd1b 100644 --- a/Makefile +++ b/Makefile @@ -2933,6 +2933,11 @@ cp922_XA10_config\ cp1026_config: unconfig @board/armltd/integrator/split_by_variant.sh cp $@ +da850evm_config: unconfig + @mkdir -p $(obj)include + echo #define CONFIG_DA850_EVM $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) arm arm926ejs da8xxevm davinci davinci + da830evm_config: unconfig @mkdir -p $(obj)include echo #define CONFIG_DA830_EVM $(obj)include/config.h diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h new file mode 100644 index 000..f50ecc5 --- /dev/null +++ b/include/configs/da850evm.h @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2009 Texas Instruments, Inc www.ti.com + * + * Based on davinci_dvevm.h. Original Copyrights follow: + * + * Copyright (C) 2007 Sergey Kubushyn k...@koi8.net + * + * 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 + +/* + * Board + */ + +/* + * SoC Configuration + */ +#define CONFIG_MACH_DAVINCI_DA850_EVM +#define CONFIG_ARM926EJS /* arm926ejs CPU core */ +#define CONFIG_SOC_DA8XX /* TI DA8xx SoC */ +#define CONFIG_SYS_CLK_FREQclk_get(DAVINCI_ARM_CLKID) +#define CONFIG_SYS_OSCIN_FREQ 2400 +#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE +#define CONFIG_SYS_HZ_CLOCKclk_get(DAVINCI_AUXCLK_CLKID) +#define CONFIG_SYS_HZ 1000 +#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */ + +/* + * Memory Info + */ +#define CONFIG_SYS_MALLOC_LEN (0x1 + 1*1024*1024) /* malloc() len */ +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* reserved for initial data */ +#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */ +#define PHYS_SDRAM_1_SIZE (64 20) /* SDRAM size 64MB */ +#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* memtest start addr */ +#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 16*1024*1024) /* 16MB test */ +#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ +#define CONFIG_STACKSIZE (256*1024) /* regular stack */ + +/* + * Serial Driver info + */ +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE-4 /* NS16550 register size */ +#define CONFIG_SYS_NS16550_COM1DAVINCI_UART2_BASE /* Base address of UART2 */ +#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) +#define CONFIG_CONS_INDEX 1 /* use UART0 for console */ +#define CONFIG_BAUDRATE115200 /* Default baud rate */ +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } + +/* + * I2C Configuration + */ +#define CONFIG_HARD_I2C +#define CONFIG_DRIVER_DAVINCI_I2C +#define CONFIG_SYS_I2C_SPEED 25000 +#define CONFIG_SYS_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ + +/* + * U-Boot general configuration + */ +#undef
Re: [U-Boot] Build failures at bb3bcfa2
On Wednesday 16 December 2009 12:49:09 Premi, Sanjeev wrote: envcrc crc32.o env_embedded.o envcrc.o sha1.o /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 40) crc32.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [envcrc] Error 1 make[1]: Leaving directory `/home/premi/u-boot/tools' make: *** [tools] Error 2 Most likely the same problem I stumbled upon a few days ago. Here my thread: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/71125/f ocus=72327 Do you by any chance have a copy of/link to crc32.c, env_embedded.c, etc. sitting in your tools directory? Yes. I do have them. I looked at the thread; and the problem is same. One question: Theses links were not manually created. They would have been created earlier by some script; and or specific patch. I have to admit that I don't know how those files/links were created. If they are not needed; is it possible to remove them by a make distclean/mrproper - I had tried both. If it makes sense; I can attempt making a quick patch. git could help here. git clean should remove those files/links for you. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Ideas on implementing bootcount limit support on non PPC?
Hi, I did some experiments with my hardware (picoChip PC205) and it looks like the contents of the internal SRAM are kept during reset so I think making bootcount_load and bootcount_store to access a section in SRAM is the way to go rather than use EEPROM or NOR Flash for the counter (don't want to add wear to the parts). Regards, Brian ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build failures at bb3bcfa2
Dear Premi, Sanjeev, In message b85a65d85d7eb246be421b3fb0fbb59301e157b...@dbde02.ent.ti.com you wrote: Yes. I do have them. I looked at the thread; and the problem is same. One question: Theses links were not manually created. They would have been created earlier by some script; and or specific patch. They used to be created by the Makefiles. This was changed by commit fb8b33c1 tools/Makefile: Remove symlinks for remaining source files. If they are not needed; is it possible to remove them by a make distclean/mrproper - I had tried both. When they were created by the Makefiles, they were also removed by the distclean/mrproper targets. It seems you left them hanging around while updating the code - you should always run make mrproper before updating the tree. Even better: always use out-of-tree builds, so your repository does not collect any such crap. If it makes sense; I can attempt making a quick patch. I consider this a usage error. No fix is needed. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Quantum Mechanics is God's version of Trust me. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build failures at bb3bcfa2
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Wednesday, December 16, 2009 8:47 PM To: Premi, Sanjeev Cc: Stefan Roese; u-boot@lists.denx.de Subject: Re: [U-Boot] Build failures at bb3bcfa2 Dear Premi, Sanjeev, In message b85a65d85d7eb246be421b3fb0fbb59301e157b...@dbde02.ent.ti.com you wrote: Yes. I do have them. I looked at the thread; and the problem is same. One question: Theses links were not manually created. They would have been created earlier by some script; and or specific patch. They used to be created by the Makefiles. This was changed by commit fb8b33c1 tools/Makefile: Remove symlinks for remaining source files. If they are not needed; is it possible to remove them by a make distclean/mrproper - I had tried both. When they were created by the Makefiles, they were also removed by the distclean/mrproper targets. It seems you left them hanging around while updating the code - you should always run make mrproper before updating the tree. Even better: always use out-of-tree builds, so your repository does not collect any such crap. I ran distclean/mrproper after git-pull. If it makes sense; I can attempt making a quick patch. I consider this a usage error. No fix is needed. Agreed. Stefan provided good explanation earlier. Best regards, Sanjeev Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Quantum Mechanics is God's version of Trust me. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Ideas on implementing bootcount limit support on non PPC?
Dear Brian Hutchinson, In message 3d1967ab0912150803p1de72a6coa438d53d12e25...@mail.gmail.com you wrote: I have been searching the archives and I've seen posts that suggest that the bootcount feature is trivial to implement in non PPC cpu's but haven't seen a discussion of what would be involved or ideas on how to go about it. Well, basicly you need a CPU register or memory location (SRAM) that is guaranteed not to change it's value during a system reset. I have flash (where the u-boot env. vars are stored) and EEPROM via I2c. My ARM926ejs variant has SRAM on chip, but I'm not sure of its state on reset yet. You need to find out. So should I use flash or eeprom to store the bootcount? I know it was That's probably not a good idea. It would delay booting a lot, and cause high wear of the flash (or the eeprom). originally intended to increment only on reset (not power cycle) but I don't know how I can accomplish since I asked chip vendor if any registers survive reset and the answer was no. If there is on-chip-memory this might work, but again this is something that only the chip manufacturer will know for sure. Alternatively, use some small external SRAM device (for example, some RTCs feature a small, usually ultra-low power SRAM device [for example, search for timekeeper]). Looking for ideas on the best way to go about implementing this feature for a ARM926ejs based core. Actual chip is picoChip PC205. Sorry, I don;t know this particular device at all. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de It is necessary to have purpose. -- Alice #1, I, Mudd, stardate 4513.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mpc85xx: Add 4-bits eSDHC support for MPC8569E-MDS boards
On Dec 15, 2009, at 4:14 PM, Anton Vorontsov wrote: Thanks to Errata to MPC8569E PowerQUICC III Integrated Host Processor Family Reference Manual, Rev. 0 document, which describes all eSDHC pins, we can add 4-bits eSDHC support for MPC8569E-MDS boards. Signed-off-by: Anton Vorontsov avoront...@ru.mvista.com --- board/freescale/mpc8569mds/mpc8569mds.c | 14 ++ include/configs/MPC8569MDS.h|4 2 files changed, 18 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] tsec: Clean up Broadcom PHY status parsing
On Mon, 2009-11-09 at 13:09 -0600, Peter Tyser wrote: - Remove unnecessary printing Enet starting in speed/duplex This same information is already printed during normal ethernet operation in the form Speed: 1000, full duplex. - Add a check for link before determining link speed and duplex If there is no link, speed/duplex don't matter. This also removes the annoying and unneeded Auto-neg error, defaulting to 10BT/HD message that occurs when no link is detected. - Whitespace and line 80 characters cleanup Signed-off-by: Peter Tyser pty...@xes-inc.com Ping... Thanks, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tsec: Force TBI PHY to 1000Mbps full duplex in SGMII mode
On Tue, 2009-11-03 at 17:52 -0600, Peter Tyser wrote: In SGMII mode the link between a processor's internal TBI PHY and an external PHY should always be 1000Mbps, full duplex. Also, the SGMII interface between an internal TBI PHY and external PHY does not support in-band auto-negotation. Previously, when configured for SGMII mode a TBI PHY would attempt to restart auto-negotation during initializtion. This auto-negotation between a TBI PHY and external PHY would fail and result in unusable ethernet operation. Forcing the TBI PHY and and external PHY to link at 1000Mbps full duplex in SGMII mode resolves this issue of auto-negotation failing. Note that 10Mbps and 100Mbps operation is still possible on the external side of the external PHY even when SGMII is operating at 1000Mbps. The SGMII interface still operates at 1000Mbps, but each byte of data is repeated 100 or 10 times for 10/100Mbps and the external PHY handles converting this data stream into proper 10/100Mbps signalling. Signed-off-by: Peter Tyser pty...@xes-inc.com --- In-band SGMII auto-negotiation doesn't work according to a lengthy discussion with a Freescale FAE and the AN3869 SGMII appnote. XES's MPC8572 and MPC8640 boards need this patch in order to use ethernet. These boards generally use SGMII to connect to an BCM5482S PHY which has an external gigabit-capable copper or fiber interface. Some of Freescale's reference platforms have an SGMII riser card - any idea how those function when using auto-negotiation? Do they function? Are the really using SGMII, or are they using 1000 Base-X? Some of the info in the manuals is misleading/confusing so any comments are more than welcome from Freescalers:) Ping... ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7] 83xx/85xx/86xx ECC update
On Mon, 2009-11-09 at 17:37 -0600, Peter Tyser wrote: This patch series is similar to the 8xxx: Add 'ecc' command recently submitted but has the following changes: - Supports 83xx/85xx/86xx, previously 83xx wasn't supported - Removes the old 83xx ecc command and replaces it with this new implementation - Places the ecc code in a new drivers/edac directory instead of in cpu/8xxx - The ecc command is enabled via CONFIG_EDAC_FSL_ECC instead of CONFIG_CMD_ECC I compile tested on 83xx, but don't have any 83xx boards to test on, so it'd be much appreciated if someone else could give it a shot. If people don't want to actually ground signals on their boards, they can inject an error then modify memory or perform a mtest to simulate ecc errors. Ping... ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] fsl-ddr: add the override for write leveling
From: Dave Liu dave...@freescale.com add the override for write leveling sampling and start time according to specific board. Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c | 20 ++-- cpu/mpc8xxx/ddr/options.c |1 + include/asm-ppc/fsl_ddr_sdram.h |7 ++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/cpu/mpc8xxx/ddr/ctrl_regs.c b/cpu/mpc8xxx/ddr/ctrl_regs.c index a92f1a3..5e37ca6 100644 --- a/cpu/mpc8xxx/ddr/ctrl_regs.c +++ b/cpu/mpc8xxx/ddr/ctrl_regs.c @@ -1002,8 +1002,8 @@ static void set_ddr_zq_cntl(fsl_ddr_cfg_regs_t *ddr, unsigned int zq_en) } /* DDR Write Leveling Control (DDR_WRLVL_CNTL) */ -static void set_ddr_wrlvl_cntl(fsl_ddr_cfg_regs_t *ddr, - unsigned int wrlvl_en) +static void set_ddr_wrlvl_cntl(fsl_ddr_cfg_regs_t *ddr, unsigned int wrlvl_en, + const memctl_options_t *popts) { /* * First DQS pulse rising edge after margining mode @@ -1030,8 +1030,9 @@ static void set_ddr_wrlvl_cntl(fsl_ddr_cfg_regs_t *ddr, /* tWL_DQSEN min = 25 nCK, we set it 32 */ wrlvl_dqsen = 0x5; /* -* Write leveling sample time at least need 14 clocks -* due to tWLO = 9, we set it 15 clocks +* Write leveling sample time at least need 6 clocks +* higher than tWLO to allow enough time for progagation +* delay and sampling the prime data bits. */ wrlvl_smpl = 0xf; /* @@ -1044,9 +1045,16 @@ static void set_ddr_wrlvl_cntl(fsl_ddr_cfg_regs_t *ddr, * Write leveling start time * The value use for the DQS_ADJUST for the first sample * when write leveling is enabled. -* we set it 1 clock delay */ wrlvl_start = 0x8; + /* +* Override the write leveling sample and start time +* according to specific board +*/ + if (popts-wrlvl_override) { + wrlvl_smpl = popts-wrlvl_sample; + wrlvl_start = popts-wrlvl_start; + } } ddr-ddr_wrlvl_cntl = (0 @@ -1332,7 +1340,7 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts, set_timing_cfg_5(ddr); set_ddr_zq_cntl(ddr, zq_en); - set_ddr_wrlvl_cntl(ddr, wrlvl_en); + set_ddr_wrlvl_cntl(ddr, wrlvl_en, popts); set_ddr_sr_cntr(ddr, sr_it); diff --git a/cpu/mpc8xxx/ddr/options.c b/cpu/mpc8xxx/ddr/options.c index 2e030c1..3dcd33d 100644 --- a/cpu/mpc8xxx/ddr/options.c +++ b/cpu/mpc8xxx/ddr/options.c @@ -198,6 +198,7 @@ unsigned int populate_memctl_options(int all_DIMMs_registered, * meet the tQDSS under different loading. */ popts-wrlvl_en = 1; + popts-wrlvl_override = 0; #endif /* diff --git a/include/asm-ppc/fsl_ddr_sdram.h b/include/asm-ppc/fsl_ddr_sdram.h index 69b857b..15ab675 100644 --- a/include/asm-ppc/fsl_ddr_sdram.h +++ b/include/asm-ppc/fsl_ddr_sdram.h @@ -1,5 +1,5 @@ /* - * Copyright 2008 Freescale Semiconductor, Inc. + * Copyright 2008-2009 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -177,6 +177,11 @@ typedef struct memctl_options_s { unsigned int clk_adjust;/* */ unsigned int cpo_override; unsigned int write_data_delay; /* DQS adjust */ + + unsigned int wrlvl_override; + unsigned int wrlvl_sample; /* Write leveling */ + unsigned int wrlvl_start; + unsigned int half_strength_driver_enable; unsigned int twoT_en; unsigned int threeT_en; -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] fsl-ddr: Fix power-down timing settings
From: Dave Liu dave...@freescale.com 1. TIMING_CFG_0[ACT_PD_EXIT] was set to 6 clocks, but It should be set to tXP parameter, tXP=max(3CK, 7.5ns) 2. TIMING_CFG_0[PRE_PD_EXIT] was set to 6 clocks, but It should be set to tXP (if MR0[A12]=1) else to tXPDLL parameter We are setting the mode register MR0[A12]='1' Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cpu/mpc8xxx/ddr/ctrl_regs.c b/cpu/mpc8xxx/ddr/ctrl_regs.c index 2505041..a92f1a3 100644 --- a/cpu/mpc8xxx/ddr/ctrl_regs.c +++ b/cpu/mpc8xxx/ddr/ctrl_regs.c @@ -188,12 +188,13 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr) * The DDR3 spec has not tXARD, * we use the tXP instead of it. * tXP=max(3nCK, 7.5ns) for DDR3. -* we use the tXP=6 * spec has not the tAXPD, we use * tAXPD=8, need design to confirm. */ - act_pd_exit_mclk = 6; - pre_pd_exit_mclk = 6; + int tXP = max((get_memory_clk_period_ps() * 3), 7500); /* unit=ps */ + act_pd_exit_mclk = picos_to_mclk(tXP); + /* Mode register MR0[A12] is '1' - fast exit */ + pre_pd_exit_mclk = act_pd_exit_mclk; taxpd_mclk = 8; tmrd_mclk = 4; #else /* CONFIG_FSL_DDR2 */ -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] fsl-ddr: add override for the Rtt_WR
From: Dave Liu dave...@freescale.com It may be different settings of Rtt_nom and Rtt_WR for different boards, adding the override provide the capability. Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c | 10 +++--- include/asm-ppc/fsl_ddr_sdram.h |1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cpu/mpc8xxx/ddr/ctrl_regs.c b/cpu/mpc8xxx/ddr/ctrl_regs.c index 5e37ca6..3be7e22 100644 --- a/cpu/mpc8xxx/ddr/ctrl_regs.c +++ b/cpu/mpc8xxx/ddr/ctrl_regs.c @@ -576,18 +576,22 @@ static void set_ddr_sdram_cfg_2(fsl_ddr_cfg_regs_t *ddr, } /* DDR SDRAM Mode configuration 2 (DDR_SDRAM_MODE_2) */ -static void set_ddr_sdram_mode_2(fsl_ddr_cfg_regs_t *ddr) +static void set_ddr_sdram_mode_2(fsl_ddr_cfg_regs_t *ddr, + const memctl_options_t *popts) { unsigned short esdmode2 = 0;/* Extended SDRAM mode 2 */ unsigned short esdmode3 = 0;/* Extended SDRAM mode 3 */ #if defined(CONFIG_FSL_DDR3) - unsigned int rtt_wr = 2;/* 120 ohm Rtt_WR */ + unsigned int rtt_wr = 0;/* Rtt_WR - dynamic ODT off */ unsigned int srt = 0; /* self-refresh temerature, normal range */ unsigned int asr = 0; /* auto self-refresh disable */ unsigned int cwl = compute_cas_write_latency() - 5; unsigned int pasr = 0; /* partial array self refresh disable */ + if (popts-rtt_override) + rtt_wr = popts-rtt_wr_override_value; + esdmode2 = (0 | ((rtt_wr 0x3) 9) | ((srt 0x1) 7) @@ -1330,7 +1334,7 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts, set_ddr_sdram_cfg_2(ddr, popts); set_ddr_sdram_mode(ddr, popts, common_dimm, cas_latency, additive_latency); - set_ddr_sdram_mode_2(ddr); + set_ddr_sdram_mode_2(ddr, popts); set_ddr_sdram_interval(ddr, popts, common_dimm); set_ddr_data_init(ddr); set_ddr_sdram_clk_cntl(ddr, popts); diff --git a/include/asm-ppc/fsl_ddr_sdram.h b/include/asm-ppc/fsl_ddr_sdram.h index 15ab675..3216a50 100644 --- a/include/asm-ppc/fsl_ddr_sdram.h +++ b/include/asm-ppc/fsl_ddr_sdram.h @@ -192,6 +192,7 @@ typedef struct memctl_options_s { /* Rtt impedance */ unsigned int rtt_override; /* rtt_override enable */ unsigned int rtt_override_value;/* that is Rtt_Nom for DDR3 */ + unsigned int rtt_wr_override_value; /* this is Rtt_WR for DDR3 */ /* Automatic self refresh */ unsigned int auto_self_refresh_en; -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] fsl-ddr: setup ODT_RD_CFG ODT_WR_CFG when we interleave
From: Dave Liu dave...@freescale.com In chip-select interleaving case, we also need set the ODT_RD_CFG and ODT_WR_CFG in cs1_config register. Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/cpu/mpc8xxx/ddr/ctrl_regs.c b/cpu/mpc8xxx/ddr/ctrl_regs.c index 3be7e22..adc4f6e 100644 --- a/cpu/mpc8xxx/ddr/ctrl_regs.c +++ b/cpu/mpc8xxx/ddr/ctrl_regs.c @@ -1197,7 +1197,10 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts, /* Don't set up boundaries for other CS * other than CS0, if bank interleaving * is enabled and not CS2+CS3 interleaved. +* But we need to set the ODT_RD_CFG and +* ODT_WR_CFG for CS1_CONFIG here. */ + set_csn_config(i, ddr, popts, dimm_params); break; } -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc/p4080: Add Corenet Platform Cache (CPC) registers
From: Becky Bruce bec...@kernel.crashing.org Signed-off-by: Becky Bruce bec...@kernel.crashing.org Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- include/asm-ppc/immap_85xx.h | 74 ++ 1 files changed, 74 insertions(+), 0 deletions(-) diff --git a/include/asm-ppc/immap_85xx.h b/include/asm-ppc/immap_85xx.h index 43b3a2c..176a381 100644 --- a/include/asm-ppc/immap_85xx.h +++ b/include/asm-ppc/immap_85xx.h @@ -1562,6 +1562,77 @@ typedef struct par_io { u8 res[8]; } par_io_t; +#ifdef CONFIG_SYS_FSL_CPC +/* + * Define a single offset that is the start of all the CPC register + * blocks - if there is more than one CPC, we expect these to be + * contiguous 4k regions + */ + +typedef struct cpc_corenet { + u32 cpccsr0;/* Config/status reg */ +#define CPC_CSR0_CE0x8000 /* Cache Enable */ +#define CPC_CSR0_PE0x4000 /* Enable ECC */ +#define CPC_CSR0_FI0x0020 /* Cache Flash Invalidate */ +#define CPC_CSR0_WT0x0008 /* Write-through mode */ +#define CPC_CSR0_FL0x0800 /* Hardware cache flush */ +#define CPC_CSR0_LFC 0x0400 /* Cache Lock Flash Clear */ + u32 res1; + u32 cpccfg0;/* Configuration register */ +#define CPC_CFG0_SZ_MASK 0x3fff +#define CPC_CFG0_SZ_K(x) ((x CPC_CFG0_SZ_MASK) 6) +#define CPC_CFG0_NUM_WAYS(x) (((x 14) 0x1f) + 1) +#define CPC_CFG0_LINE_SZ(x)x 23) 0x3) + 1) * 32) + u32 res2; + u32 cpcewcr0; /* External Write reg 0 */ + u32 cpcewabr0; /* External write base reg 0 */ + u32 res3[2]; + u32 cpcewcr1; /* External Write reg 1 */ + u32 cpcewabr1; /* External write base reg 1 */ + u32 res4[54]; + u32 cpcsrcr1; /* SRAM control reg 1 */ +#define CPC_SRCR1_SRBARU_MASK 0x +#define CPC_SRCR1_SRBARU(x)(((unsigned long long)x 32) \ + CPC_SRCR1_SRBARU_MASK) + u32 cpcsrcr0; /* SRAM control reg 0 */ +#defineCPC_SRCR0_SRBARL_MASK 0x8000 +#define CPC_SRCR0_SRBARL(x)(x CPC_SRCR0_SRBARL_MASK) +#define CPC_SRCR0_INTLVEN 0x0100 +#define CPC_SRCR0_SRAMSZ_1_WAY 0x +#define CPC_SRCR0_SRAMSZ_2_WAY 0x0002 +#define CPC_SRCR0_SRAMSZ_4_WAY 0x0004 +#define CPC_SRCR0_SRAMSZ_8_WAY 0x0006 +#define CPC_SRCR0_SRAMSZ_16_WAY0x0008 +#define CPC_SRCR0_SRAMSZ_32_WAY0x000a +#define CPC_SRCR0_SRAMEN 0x0001 + u32 res5[62]; + struct { + u32 id; /* partition ID */ + u32 res; + u32 alloc; /* partition allocation */ + u32 way;/* partition way */ + } partition_regs[16]; + u32 res6[704]; + u32 cpcerrinjhi;/* Error injection high */ + u32 cpcerrinjlo;/* Error injection lo */ + u32 cpcerrinjctl; /* Error injection control */ + u32 res7[5]; + u32 cpccaptdatahi; /* capture data high */ + u32 cpccaptdatalo; /* capture data low */ + u32 cpcaptecc; /* capture ECC */ + u32 res8[5]; + u32 cpcerrdet; /* error detect */ + u32 cpcerrdis; /* error disable */ +#defineCPC_ERRDIS_TMHITDIS 0x0080 /* multi-way hit disable */ + u32 cpcerrinten;/* errir interrupt enable */ + u32 cpcerrattr; /* error attribute */ + u32 cpcerreaddr;/* error extended address */ + u32 cpcerraddr; /* error address */ + u32 cpcerrctl; /* error control */ + u32 res9[105]; /* pad out to 4k */ +} cpc_corenet_t; +#endif /* CONFIG_SYS_FSL_CPC */ + /* Global Utilities Block */ #ifdef CONFIG_FSL_CORENET typedef struct ccsr_gur { @@ -1937,6 +2008,7 @@ enum { #define CONFIG_SYS_FSL_CORENET_CLK_OFFSET 0xE1000 #define CONFIG_SYS_FSL_CORENET_RCPM_OFFSET 0xE2000 #define CONFIG_SYS_FSL_CORENET_SERDES_OFFSET 0xEA000 +#define CONFIG_SYS_FSL_CPC_OFFSET 0x1 #define CONFIG_SYS_MPC85xx_DMA_OFFSET 0x10 #define CONFIG_SYS_MPC85xx_ESPI_OFFSET 0x11 #define CONFIG_SYS_MPC85xx_ESDHC_OFFSET0x114000 @@ -1974,6 +2046,8 @@ enum { #define CONFIG_SYS_MPC85xx_PIC_OFFSET 0x4 #define CONFIG_SYS_MPC85xx_GUTS_OFFSET 0xE +#define CONFIG_SYS_FSL_CPC_ADDR\ + (CONFIG_SYS_CCSRBAR + CONFIG_SYS_FSL_CPC_OFFSET) #define CONFIG_SYS_FSL_CORENET_QMAN_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_CORENET_QMAN_OFFSET) #define CONFIG_SYS_FSL_CORENET_BMAN_ADDR \ -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] fsl-ddr: add the override for write leveling
On Dec 16, 2009, at 10:24 AM, Kumar Gala wrote: From: Dave Liu dave...@freescale.com add the override for write leveling sampling and start time according to specific board. Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c | 20 ++-- cpu/mpc8xxx/ddr/options.c |1 + include/asm-ppc/fsl_ddr_sdram.h |7 ++- 3 files changed, 21 insertions(+), 7 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/4] fsl-ddr: add override for the Rtt_WR
On Dec 16, 2009, at 10:24 AM, Kumar Gala wrote: From: Dave Liu dave...@freescale.com It may be different settings of Rtt_nom and Rtt_WR for different boards, adding the override provide the capability. Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c | 10 +++--- include/asm-ppc/fsl_ddr_sdram.h |1 + 2 files changed, 8 insertions(+), 3 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] fsl-ddr: setup ODT_RD_CFG ODT_WR_CFG when we interleave
On Dec 16, 2009, at 10:24 AM, Kumar Gala wrote: From: Dave Liu dave...@freescale.com In chip-select interleaving case, we also need set the ODT_RD_CFG and ODT_WR_CFG in cs1_config register. Signed-off-by: Dave Liu dave...@freescale.com --- cpu/mpc8xxx/ddr/ctrl_regs.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc/p4080: Add Corenet Platform Cache (CPC) registers
On Dec 16, 2009, at 10:29 AM, Kumar Gala wrote: From: Becky Bruce bec...@kernel.crashing.org Signed-off-by: Becky Bruce bec...@kernel.crashing.org Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- include/asm-ppc/immap_85xx.h | 74 ++ 1 files changed, 74 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request - mpc85xx
The following changes since commit bb3bcfa2426cc6a0aecec7270e3ee67ca843a125: Wolfgang Denk (1): Merge branch 'next' of ../next are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Anton Vorontsov (1): mpc85xx: Add 4-bits eSDHC support for MPC8569E-MDS boards Becky Bruce (1): ppc/p4080: Add Corenet Platform Cache (CPC) registers Dave Liu (5): p4080: add readback to bootpage translation window fsl-ddr: Fix power-down timing settings fsl-ddr: add the override for write leveling fsl-ddr: add override for the Rtt_WR fsl-ddr: setup ODT_RD_CFG ODT_WR_CFG when we interleave Kumar Gala (23): 85xx: Add support for e500mc cache stashing ppc/p4080: Added p4080 SERDES registers USB offset ppc/8xxx: Don't use pci_cfg on FSL_CORENET platforms 85xx: Add support to set DPAA (data path) devices clock frequencies NET: Base support for etsec2.0 ppc/85xx: Clean up MPC8544 DS PCI setup code ppc/85xx: Clean up MPC8569 MDS PCI setup code ppc/85xx: Clean up MPC8568 MDS PCI setup code ppc/85xx: Clean up ATUM8548 PCI setup code ppc/85xx: Clean up MPC8548 CDS PCI setup code ppc/86xx: Clean up MPC8610 HPCD PCI setup code ppc/85xx: Move to using fsl_setup_hose on MPC8572 DS ppc/85xx: Move to using fsl_setup_hose on P1/P2 RDB ppc/85xx: Move to using fsl_setup_hose on P2020 DS ppc/85xx: Move to using fsl_setup_hose on TQM 85xx ppc/8xxx: Remove is_fsl_pci_agent ppc/85xx: Add tracking of TLB CAM usage ppc/85xx: Make SPD DDR TLB setup code use dynamic entry allocation ppc/85xx: Remove CONFIG_SYS_DDR_TLB_START ppc/85xx: Make flash TLB entry determined at runtime on FSL boards ppc: Added macro to test for specific SVR revision ppc/85xx: Map boot page guarded for MP boot ppc/p4080: Fix reporting of PME FM clock frequencies Li Yang (1): fsl_law: add SRIO2 target id and law_size_bits() macro Mingkai Hu (1): ppc/85xx: Clean up MPC8536 DS PCI setup code Sandeep Gopalpet (1): NET: Move MDIO regs out of TSEC Space board/atum8548/atum8548.c | 162 ++- board/freescale/mpc8536ds/mpc8536ds.c | 259 - board/freescale/mpc8544ds/mpc8544ds.c | 249 board/freescale/mpc8548cds/mpc8548cds.c | 141 ++-- board/freescale/mpc8568mds/mpc8568mds.c | 137 +-- board/freescale/mpc8569mds/mpc8569mds.c | 100 +--- board/freescale/mpc8572ds/mpc8572ds.c | 16 +- board/freescale/mpc8572ds/tlb.c |2 +- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 199 +++--- board/freescale/p1_p2_rdb/p1_p2_rdb.c |2 +- board/freescale/p1_p2_rdb/pci.c | 10 +- board/freescale/p1_p2_rdb/tlb.c |2 +- board/freescale/p2020ds/p2020ds.c | 14 +- board/freescale/p2020ds/tlb.c |2 +- board/tqc/tqm85xx/tqm85xx.c |8 +- cpu/mpc85xx/cpu_init.c|6 + cpu/mpc85xx/fdt.c | 54 ++ cpu/mpc85xx/mp.c |5 +- cpu/mpc85xx/release.S | 17 ++- cpu/mpc85xx/speed.c | 12 +- cpu/mpc85xx/start.S |8 +- cpu/mpc85xx/tlb.c | 76 - cpu/mpc8xxx/ddr/ctrl_regs.c | 40 +++-- cpu/mpc8xxx/ddr/options.c |1 + cpu/mpc8xxx/pci_cfg.c | 47 +- drivers/net/tsec.c| 21 +-- drivers/pci/fsl_pci_init.c|9 + include/asm-ppc/config.h | 13 ++ include/asm-ppc/fsl_ddr_sdram.h |8 +- include/asm-ppc/fsl_law.h |3 + include/asm-ppc/fsl_pci.h |5 +- include/asm-ppc/global_data.h |3 + include/asm-ppc/immap_83xx.h |8 +- include/asm-ppc/immap_85xx.h | 170 +++ include/asm-ppc/immap_86xx.h |8 +- include/asm-ppc/mmu.h |2 + include/asm-ppc/processor.h |3 + include/configs/ATUM8548.h| 18 +- include/configs/MPC8569MDS.h |4 + include/configs/MPC8572DS.h |1 - include/configs/P1_P2_RDB.h |2 - include/configs/P2020DS.h |1 - include/tsec.h| 52 --- 43 files changed, 884 insertions(+), 1016 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3: Beagle: Update revision detection
New BeagleBoard revision C4 uses a new ID. Update revision detection. Signed-off-by: Dirk Behme dirk.be...@googlemail.com --- Tested on C1/2 and C4 (prototype). Patch against v2009.11 Known C4 changes: - Use OMAP3 720MHz devices. - Change in the way the USB Host PHY is powered. (to be added later based on this patch) board/ti/beagle/beagle.c | 68 ++- board/ti/beagle/beagle.h |9 -- 2 files changed, 51 insertions(+), 26 deletions(-) Index: u-boot-main/board/ti/beagle/beagle.c === --- u-boot-main.orig/board/ti/beagle/beagle.c +++ u-boot-main/board/ti/beagle/beagle.c @@ -38,7 +38,7 @@ #include asm/mach-types.h #include beagle.h -static int beagle_revision_c; +static int beagle_revision; /* * Routine: board_init @@ -60,41 +60,61 @@ int board_init(void) /* * Routine: beagle_get_revision * Description: Return the revision of the BeagleBoard this code is running on. - * If it is a revision Ax/Bx board, this function returns 0, - * on a revision C board you will get a 1. */ int beagle_get_revision(void) { - return beagle_revision_c; + return beagle_revision; } /* * Routine: beagle_identify - * Description: Detect if we are running on a Beagle revision Ax/Bx or - * Cx. This can be done by GPIO_171. If this is low, we are - * running on a revision C board. + * Description: Detect if we are running on a Beagle revision Ax/Bx, + * C1/2, C3, C4 or D. This can be done by reading + * the level of GPIO173, GPIO172 and GPIO171. This should + * result in + * GPIO173, GPIO172, GPIO171: 1 1 1 = Ax/Bx + * GPIO173, GPIO172, GPIO171: 1 1 0 = C1/2 + * GPIO173, GPIO172, GPIO171: 1 0 0 = C3 + * GPIO173, GPIO172, GPIO171: 1 0 1 = C4 + * GPIO173, GPIO172, GPIO171: 0 0 0 = D */ void beagle_identify(void) { - beagle_revision_c = 0; - if (!omap_request_gpio(171)) { - unsigned int val; - - omap_set_gpio_direction(171, 1); - val = omap_get_gpio_datain(171); - omap_free_gpio(171); - - if (val) - beagle_revision_c = 0; - else - beagle_revision_c = 1; - } + omap_request_gpio(171); + omap_request_gpio(172); + omap_request_gpio(173); + omap_set_gpio_direction(171, 1); + omap_set_gpio_direction(172, 1); + omap_set_gpio_direction(173, 1); + + beagle_revision = omap_get_gpio_datain(173) 2 | + omap_get_gpio_datain(172) 1 | + omap_get_gpio_datain(171); + omap_free_gpio(171); + omap_free_gpio(172); + omap_free_gpio(173); printf(Board revision ); - if (beagle_revision_c) - printf(C\n); - else + + switch (beagle_revision) { + case REVISION_AXBX: printf(Ax/Bx\n); + break; + case REVISION_C1: + printf(C1/2\n); + break; + case REVISION_C3: + printf(C3\n); + break; + case REVISION_C4: + printf(C4\n); + break; + case REVISION_D: + printf(D\n); + break; + default: + printf(unknown 0x%02x\n, beagle_revision); + } } /* @@ -137,7 +157,7 @@ void set_muxconf_regs(void) { MUX_BEAGLE(); - if (beagle_revision_c) { + if (beagle_revision != REVISION_AXBX) { MUX_BEAGLE_C(); } } Index: u-boot-main/board/ti/beagle/beagle.h === --- u-boot-main.orig/board/ti/beagle/beagle.h +++ u-boot-main/board/ti/beagle/beagle.h @@ -33,7 +33,12 @@ const omap3_sysinfo sysinfo = { #endif }; -#define BOARD_REVISION_MASK(0x1 11) +/* BeagleBoard revisions */ +#define REVISION_AXBX 0x7 +#define REVISION_C10x6 +#define REVISION_C30x4 +#define REVISION_C40x5 +#define REVISION_D 0x0 /* * IEN - Input Enable @@ -264,7 +269,7 @@ const omap3_sysinfo sysinfo = { MUX_VAL(CP(HDQ_SIO),(IDIS | PTU | EN | M4)) /*GPIO_170*/\ MUX_VAL(CP(MCSPI1_CLK), (IEN | PTU | EN | M4)) /*GPIO_171*/\ MUX_VAL(CP(MCSPI1_SIMO),(IEN | PTU | EN | M4)) /*GPIO_172*/\ - MUX_VAL(CP(MCSPI1_SOMI),(IEN | PTD | DIS | M0)) /*McSPI1_SOMI*/\ + MUX_VAL(CP(MCSPI1_SOMI),(IEN | PTU | EN | M4)) /*GPIO_173*/\ MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\ MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\ MUX_VAL(CP(MCSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176*/\ ___ U-Boot mailing list
Re: [U-Boot] [PATCH 0/9] Support for SPEAr SoCs
All, Just fyi SPEAr is an ARM based family of SoC designed by us here in STMicro. THx for your help in reviewing. Regards, Arm Vipin KUMAR wrote: This patchset contains the support for 4 SoCs from SPEAr family SPEAr300 SPEAr310 SPEAr320 SPEAr600 It also contains the drivers needed for spear devices Regards Vipin Kumar Vipin (9): i2c driver support for SPEAr SoCs smi driver support for SPEAr SoCs nand driver support for SPEAr SoCs usbd driver and usb boot firmware support for SPEAr SoCs SPEAr600 SoC support added SPEAr300 SoC support added SPEAr310 SoC support added SPEAr320 SoC support added SPEAr600 build support added MAKEALL|4 + Makefile | 12 + board/spear/common/spr_lowlevel_init.S | 202 + board/spear/common/spr_misc.c | 270 +++ board/spear/spear300/Makefile | 52 ++ board/spear/spear300/config.mk | 39 + board/spear/spear300/spr300_board.c| 57 ++ board/spear/spear310/Makefile | 52 ++ board/spear/spear310/config.mk | 42 + board/spear/spear310/spr310_board.c| 58 ++ board/spear/spear320/Makefile | 52 ++ board/spear/spear320/config.mk | 42 + board/spear/spear320/spr320_board.c| 58 ++ board/spear/spear600/Makefile | 52 ++ board/spear/spear600/config.mk | 39 + board/spear/spear600/spr600_board.c| 53 ++ common/cmd_bdinfo.c| 20 + common/main.c |2 + cpu/arm926ejs/spear/Makefile | 52 ++ cpu/arm926ejs/spear/reset.c| 49 ++ cpu/arm926ejs/spear/timer.c| 148 drivers/i2c/Makefile |1 + drivers/i2c/spr_i2c.c | 321 drivers/mtd/Makefile |1 + drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/spr_nand.c| 126 +++ drivers/mtd/spr_smi.c | 548 + drivers/serial/usbtty.h|2 + drivers/usb/gadget/Makefile|1 + drivers/usb/gadget/spr_udc.c | 996 include/asm-arm/arch-spear/spr_defs.h | 31 + include/asm-arm/arch-spear/spr_emi.h | 55 ++ include/asm-arm/arch-spear/spr_gpt.h | 83 ++ include/asm-arm/arch-spear/spr_i2c.h | 143 include/asm-arm/arch-spear/spr_misc.h | 126 +++ include/asm-arm/arch-spear/spr_nand.h | 58 ++ include/asm-arm/arch-spear/spr_smi.h | 112 +++ include/asm-arm/arch-spear/spr_syscntl.h | 38 + include/asm-arm/arch-spear/spr_xloader_table.h | 67 ++ include/asm-arm/u-boot.h |5 + include/configs/spear300.h | 260 ++ include/configs/spear310.h | 353 + include/configs/spear320.h | 336 include/configs/spear600.h | 260 ++ include/usb/spr_udc.h | 227 ++ 45 files changed, 5506 insertions(+), 0 deletions(-) create mode 100755 board/spear/common/spr_lowlevel_init.S create mode 100755 board/spear/common/spr_misc.c create mode 100755 board/spear/spear300/Makefile create mode 100755 board/spear/spear300/config.mk create mode 100755 board/spear/spear300/spr300_board.c create mode 100755 board/spear/spear310/Makefile create mode 100755 board/spear/spear310/config.mk create mode 100755 board/spear/spear310/spr310_board.c create mode 100755 board/spear/spear320/Makefile create mode 100755 board/spear/spear320/config.mk create mode 100755 board/spear/spear320/spr320_board.c create mode 100755 board/spear/spear600/Makefile create mode 100755 board/spear/spear600/config.mk create mode 100755 board/spear/spear600/spr600_board.c create mode 100755 cpu/arm926ejs/spear/Makefile create mode 100755 cpu/arm926ejs/spear/reset.c create mode 100755 cpu/arm926ejs/spear/timer.c mode change 100644 = 100755 drivers/i2c/Makefile create mode 100755 drivers/i2c/spr_i2c.c mode change 100644 = 100755 drivers/mtd/Makefile create mode 100755 drivers/mtd/nand/spr_nand.c create mode 100755 drivers/mtd/spr_smi.c mode change 100644 = 100755 drivers/serial/usbtty.h mode change 100644 = 100755 drivers/usb/gadget/Makefile create mode 100755 drivers/usb/gadget/spr_udc.c create mode 100644 include/asm-arm/arch-spear/spr_defs.h create mode 100755 include/asm-arm/arch-spear/spr_emi.h create mode 100755 include/asm-arm/arch-spear/spr_gpt.h create mode 100755 include/asm-arm/arch-spear/spr_i2c.h create mode 100644
Re: [U-Boot] [PATCH 5/9] SPEAr600 SoC support added
On Wed, 2009-12-16 at 14:48 +0530, Vipin KUMAR wrote: Signed-off-by: Vipin vipin.ku...@st.com --- board/spear/common/spr_lowlevel_init.S | 202 ++ board/spear/common/spr_misc.c | 270 board/spear/spear600/Makefile | 52 + board/spear/spear600/config.mk | 39 board/spear/spear600/spr600_board.c| 53 + The changes to board/* should be moved out of this patch and into patch 9 SPEAr600 build support added. Same comment for include/configs/spear600.h. common/cmd_bdinfo.c| 20 ++ cpu/arm926ejs/spear/Makefile | 52 + cpu/arm926ejs/spear/reset.c| 49 + cpu/arm926ejs/spear/timer.c| 148 + include/asm-arm/arch-spear/spr_defs.h | 31 +++ include/asm-arm/arch-spear/spr_emi.h | 55 + include/asm-arm/arch-spear/spr_gpt.h | 83 include/asm-arm/arch-spear/spr_syscntl.h | 38 include/asm-arm/arch-spear/spr_xloader_table.h | 67 ++ include/asm-arm/u-boot.h |5 + include/configs/spear600.h | 260 +++ It'd also be nice to give a description of each board and SOC you add. Eg what's the difference between the 300, 310, 320, 600? What peripherals do they support? What does SPEAr stand for? More commit messages in general wouldn't hurt:) Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] SPEAr600 SoC support added
Ciao Peter, The changes to board/* should be moved out of this patch and into patch 9 SPEAr600 build support added. Same comment for include/configs/spear600.h. Tomorrow we will resend patch_5 and patch_9. It'd also be nice to give a description of each board and SOC you add. Eg what's the difference between the 300, 310, 320, 600? What peripherals do they support? What does SPEAr stand for? More commit messages in general wouldn't hurt:) SPEAr (Structured Processor Enhanced Architecture). You can find some description throughout Internet, for example here: http://embedded-system.net/spear-basic-customizable-arm-based-soc-stmicroelectronics.html (SPEARBasic means SPEAr300.) As you can see this SoC family embeds a customizable logic that could be programmed one-time by a customer at silicon mask level (i.e. not at runtime!). We are now adding the support in u-boot for two SoC: SPEAr600 and SPEAr3xx. Pls note that SPEAr300/310/320 differs only for the default customization. All 4 SoCs share common peripherals. 1. ARM926ejs core based (sp600 has two AMP cores, the 2nd handled only in Linux) 2. FastEthernet (sp600 has Gbit version, but same controller - GMAC) 3. USB Host 4. USB Device 5. NAND controller (FSMC) 6. Serial NOR ctrl 7. I2C 8. SPI 9. CLCD 10. others .. sp600 is not customized by default. sp3xx are differently customized... sp300 is more oriented to TELECOM/video (it has tdm, i2s, ITU i/f support) sp310 for networking (a part GMAC in fixed part, it has 5 MACB ctrls in custom) sp320 for industrial (SPP ctrl, CAN ctrl, 2 MACBs, ...) Everything is supported in Linux. u-boot is not currently supporting all peripeharls (just a few). Regards, Arm Peter Tyser wrote: On Wed, 2009-12-16 at 14:48 +0530, Vipin KUMAR wrote: Signed-off-by: Vipin vipin.ku...@st.com --- board/spear/common/spr_lowlevel_init.S | 202 ++ board/spear/common/spr_misc.c | 270 board/spear/spear600/Makefile | 52 + board/spear/spear600/config.mk | 39 board/spear/spear600/spr600_board.c| 53 + The changes to board/* should be moved out of this patch and into patch 9 SPEAr600 build support added. Same comment for include/configs/spear600.h. common/cmd_bdinfo.c| 20 ++ cpu/arm926ejs/spear/Makefile | 52 + cpu/arm926ejs/spear/reset.c| 49 + cpu/arm926ejs/spear/timer.c| 148 + include/asm-arm/arch-spear/spr_defs.h | 31 +++ include/asm-arm/arch-spear/spr_emi.h | 55 + include/asm-arm/arch-spear/spr_gpt.h | 83 include/asm-arm/arch-spear/spr_syscntl.h | 38 include/asm-arm/arch-spear/spr_xloader_table.h | 67 ++ include/asm-arm/u-boot.h |5 + include/configs/spear600.h | 260 +++ It'd also be nice to give a description of each board and SOC you add. Eg what's the difference between the 300, 310, 320, 600? What peripherals do they support? What does SPEAr stand for? More commit messages in general wouldn't hurt:) Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- -- Every step appears to be the unavoidable consequence of the -- preceding one. (A. Einstein) -- Armando Visconti Mobile: (+39) 346 8879146 Senior SW EngineerFax:(+39) 02 93519290 CPG Work: (+39) 02 93519683 Computer System Division e-mail: armando.visco...@st.com ST Microelectronics TINA: 051 4683 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/9] SPEAr600 SoC support added
Hi Arm, snip It'd also be nice to give a description of each board and SOC you add. Eg what's the difference between the 300, 310, 320, 600? What peripherals do they support? What does SPEAr stand for? More commit messages in general wouldn't hurt:) SPEAr (Structured Processor Enhanced Architecture). You can find some description throughout Internet, for example here: http://embedded-system.net/spear-basic-customizable-arm-based-soc-stmicroelectronics.html (SPEARBasic means SPEAr300.) As you can see this SoC family embeds a customizable logic that could be programmed one-time by a customer at silicon mask level (i.e. not at runtime!). We are now adding the support in u-boot for two SoC: SPEAr600 and SPEAr3xx. Pls note that SPEAr300/310/320 differs only for the default customization. All 4 SoCs share common peripherals. 1. ARM926ejs core based (sp600 has two AMP cores, the 2nd handled only in Linux) 2. FastEthernet (sp600 has Gbit version, but same controller - GMAC) 3. USB Host 4. USB Device 5. NAND controller (FSMC) 6. Serial NOR ctrl 7. I2C 8. SPI 9. CLCD 10. others .. sp600 is not customized by default. sp3xx are differently customized... sp300 is more oriented to TELECOM/video (it has tdm, i2s, ITU i/f support) sp310 for networking (a part GMAC in fixed part, it has 5 MACB ctrls in custom) sp320 for industrial (SPP ctrl, CAN ctrl, 2 MACBs, ...) Everything is supported in Linux. u-boot is not currently supporting all peripeharls (just a few). I see. It'd be nice to put some of the above information in the U-Boot commit logs to give people an idea about what's going on without having to use google, etc. I haven't looked at the code differences between the sp3xx boards, but you might be able to use 1 common board file/header file to support them all. For example, take a look at the M5475AFE_config rule in U-Boot's ./Makefile. Some extra code in the Makefile and some #ifdefs in the sp3xx code might accommodate all 3 boards. Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] drivers/bios_emulator: Fix compile error in .depend not being generated
make -C drivers/bios_emulator/ make[2]: Entering directory `drivers/bios_emulator' In file included from atibios.c:49: biosemui.h:47:21: error: biosemu.h: No such file or directory In file included from biosemu.c:50: biosemui.h:47:21: error: biosemu.h: No such file or directory In file included from besys.c:51: biosemui.h:47:21: error: biosemu.h: No such file or directory In file included from bios.c:45: biosemui.h:47:21: error: biosemu.h: No such file or directory x86emu/decode.c:40:28: error: x86emu/x86emui.h: No such file or directory x86emu/ops2.c:45:28: error: x86emu/x86emui.h: No such file or directory x86emu/ops.c:76:28: error: x86emu/x86emui.h: No such file or directory x86emu/prim_ops.c:103:28: error: x86emu/x86emui.h: No such file or directory x86emu/sys.c:43:28: error: x86emu/x86emui.h: No such file or directory x86emu/debug.c:42:28: error: x86emu/x86emui.h: No such file or directory Due to lack of proper CPPFLAGS being passed to .depend generation rule Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- drivers/bios_emulator/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile index dd9c102..feba4da 100644 --- a/drivers/bios_emulator/Makefile +++ b/drivers/bios_emulator/Makefile @@ -23,6 +23,7 @@ EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \ CFLAGS += $(EXTRA_CFLAGS) HOSTCFLAGS += $(EXTRA_CFLAGS) +CPPFLAGS += $(EXTRA_CFLAGS) all: $(LIB) -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] LCD initialization in U-boot
Hello All, We are using Atmel's at91sam9263ek board and want to use a different LCD with it (Toshiba TX16D11VM2CAA). For that we want to make sure that we have correct LCD initialization in the u-boot-2009.08/board/atmel/at91sam9263ek/at91sam9263ek.c file. We are not clear about some of the values defined there. What do they actually mean: This is how they have been defined in the said file: ifdef CONFIG_LCD vidinfo_t panel_info = { vl_col: 240, vl_row:320, vl_clk: 4965000, vl_sync: ATMEL_LCDC_INVLINE_INVERTED | ATMEL_LCDC_INVFRAME_INVERTED, vl_bpix: 3, vl_tft: 1, vl_hsync_len: 5, vl_left_margin: 1, vl_right_margin:33, vl_vsync_len: 1, vl_upper_margin:1, vl_lower_margin:0, mmio: AT91SAM9263_LCDC_BASE, }; This is what we have from the data sheet of our LCD (typical values) Resoltuion - HVGA 240x640 Horizontal Front Porch - 32 Horizontal Back Porch - 37 Vertical Front Porch - 1 Vertical Back Porch - 4 Vsync Cycle - 491 Vsync Valid width - 2 Hsync cycle - 709 Hsync valid width - 5 Questions are : Hows these vales relate to the values in the function above? Do we need any other values for the proper initialization of LCD? Do we need to make changes in any other file/part of code other than the initilization above? Your help will be greatly appreciated. Thanks for your time. Jimmy. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build failures at bb3bcfa2
Dear Premi, Sanjeev, In message b85a65d85d7eb246be421b3fb0fbb59301e157b...@dbde02.ent.ti.com you wrote: When they were created by the Makefiles, they were also removed by the distclean/mrproper targets. It seems you left them hanging around while updating the code - you should always run make mrproper before updating the tree. Even better: always use out-of-tree builds, so your repository does not collect any such crap. I ran distclean/mrproper after git-pull. You should have done this _before_ pulling the changes - the new, changed Makefiles did not create those links any more, so they did not remove them either. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Don't you know anything? I should have thought anyone knows that who knows anything about anything... - Terry Pratchett, _Soul Music_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request - mpc85xx
Dear Kumar Gala, In message pine.lnx.4.64.0912161042280.21...@localhost.localdomain you wrote: The following changes since commit bb3bcfa2426cc6a0aecec7270e3ee67ca843a125: Wolfgang Denk (1): Merge branch 'next' of ../next are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Anton Vorontsov (1): mpc85xx: Add 4-bits eSDHC support for MPC8569E-MDS boards Becky Bruce (1): ppc/p4080: Add Corenet Platform Cache (CPC) registers Dave Liu (5): p4080: add readback to bootpage translation window fsl-ddr: Fix power-down timing settings fsl-ddr: add the override for write leveling fsl-ddr: add override for the Rtt_WR fsl-ddr: setup ODT_RD_CFG ODT_WR_CFG when we interleave ... These patches were posted a mere hours before this pull request. Um... can we please allow for a couple of days (3...5 at least) for others to review and comment on the patches, before you (re-) send a pull request? Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Mr. Cole's Axiom: The sum of the intelligence on the planet is a constant; the population is growing. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] TI: DaVinci: Updating EMAC driver for DM365, DM646x and DA8XX
Dear Nick Thompson, In message 4b2770f8.5090...@ge.com you wrote: The EMAC IP on DM365, DM646x and DA830 is slightly different from that on DM644x. This change updates the DaVinci EMAC driver so that EMAC becomes operational on SOCs with EMAC v2. Signed-off-by: Nick Thompson nick.thomp...@ge.com Signed-off-by: Sandeep Paulraj s-paul...@ti.com --- Applies to: u-boot-ti This is a combined patch with Sandeep's DM365 and DM646x changes and additional changes for DA830. It replaces previous submissions for EMAC support on these devices. drivers/net/davinci_emac.c | 131 - include/asm-arm/arch-davinci/emac_defs.h | 60 +- 2 files changed, 164 insertions(+), 27 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index fa8cee4..dbf94d2 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -42,6 +42,7 @@ #include miiphy.h #include malloc.h #include asm/arch/emac_defs.h +#include asm/io.h unsigned int emac_dbg = 0; #define debug_emac(fmt,args...) if (emac_dbg) printf(fmt,##args) @@ -107,6 +108,35 @@ static void davinci_eth_mdio_enable(void) while (adap_mdio-CONTROL MDIO_CONTROL_IDLE) {;} Please fix this as well while we are here. Please make this: while (adap_mdio-CONTROL MDIO_CONTROL_IDLE) ; + /* Wait for command to complete */ + while (readl(adap_mdio-USERACCESS0) MDIO_USERACCESS0_GO); Please make this: while (readl(adap_mdio-USERACCESS0) MDIO_USERACCESS0_GO) ; +static void emac_gigabit_enable(void) +{ +#ifdef DAVINCI_EMAC_GIG_ENABLE + int temp + + if (mdio_read(EMAC_MDIO_PHY_NUM, 0) (1 6)) { + /* + * Check if link detected is giga-bit + * If Gigabit mode detected, enable gigbit in MAC and PHY + */ + writel(EMAC_MACCONTROL_GIGFORCE | +EMAC_MACCONTROL_GIGABIT_ENABLE, +adap_emac-MACCONTROL); + + /* + * The SYS_CLK which feeds the SOC for giga-bit operation + * does not seem to be enabled after reset as expected. + * Force enabling SYS_CLK by writing to the PHY + */ + temp = mdio_read(EMAC_MDIO_PHY_NUM, 22); + temp |= (1 4); + mdio_write(EMAC_MDIO_PHY_NUM, 22, temp); + } +#endif +} Can we - instead of providing an empty function when DAVINCI_EMAC_GIG_ENABLE is not set - either omit this function completely, or use a weak implementation instead? if (!phy.get_link_speed(active_phy_addr)) return(0); + else + emac_gigabit_enable(); No else is needed here. Remove it, and un-indent the emac_gigabit_enable() call. if (!phy.get_link_speed (active_phy_addr)) { printf (WARN: emac_send_packet: No link\n); return (ret_status); - } + } else + emac_gigabit_enable(); Ditto. if (!phy.get_link_speed (active_phy_addr)) { davinci_eth_ch_teardown (EMAC_CH_TX); return (ret_status); - } + } else + emac_gigabit_enable(); And again. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de No problem is insoluble. -- Dr. Janet Wallace, The Deadly Years, stardate 3479.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] About GPL
Hello, Just a quick question: u-boot boot loader/linux kernel/bash is GPL right ? So whoever is using it he should public entire source code with an annotation that it's based on u-boot boot loader/linux kernel/bash ? Well, I'm a software programmer in the LG Electronics company, all these TVs has u-boot inside, with Linux kernel 2.6.10, bash etc. lots of GPL software and they not only didn't published the source code, they also changed all authors to themselves and claim that they actually invented all of this. Best Regards Domeny, serwer, Strona WWW za darmo! Pokaz Twoja firme w Sieci! www.nazwa.pl ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] OMAP3, AM35x: Detect exact CPU in arch_cpu_init()
Dear Sanjeev Premi, In message 1260902266-26009-3-git-send-email-pr...@ti.com you wrote: This patch identifies exact cpu in function arch_cpu_init(). It does the following: - It consolidates all related #defines into omap3.h. - Prefixes CTRL_ to #defines used in comparison against contents of Control Status Register returned by the function get_cpu_type(). - Adds new #defines to identify exact CPU id. Signed-off-by: Sanjeev Premi pr...@ti.com ... + cputype = get_cpu_type(); + switch (cpu_family) + { Incorrect brace style, please move the brace on previous line. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de This message was made from 100% recycled electrons. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/4] OMAP3, AM35x: Update function print_cpuinfo()
Dear Sanjeev Premi, In message 1260902266-26009-4-git-send-email-pr...@ti.com you wrote: The function is updated to make use of the cpu related information extracted in arch_cpu_init(). Signed-off-by: Sanjeev Premi pr...@ti.com --- cpu/arm_cortexa8/omap3/sys_info.c | 45 1 files changed, 30 insertions(+), 15 deletions(-) diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c index 3544d26..1228f5f 100644 --- a/cpu/arm_cortexa8/omap3/sys_info.c +++ b/cpu/arm_cortexa8/omap3/sys_info.c @@ -364,45 +364,60 @@ u32 get_device_type(void) */ int print_cpuinfo (void) { - char *cpu_s, *sec_s; + char cpu_s[16], sec_s[4]; - switch (get_cpu_type()) { + switch (cpu_id) { case OMAP3503: - cpu_s = 3503; + strcpy(cpu_s, OMAP3503); break; case OMAP3515: - cpu_s = 3515; + strcpy(cpu_s, OMAP3515); break; case OMAP3525: - cpu_s = 3525; + strcpy(cpu_s, OMAP3503); break; + case OMAP3430: case OMAP3530: - cpu_s = 3530; + strcpy(cpu_s, OMAP3430/3530); break; - default: - cpu_s = 35XX; + case CTRL_AM3505: + strcpy(cpu_s, AM3505); + break; + case CTRL_AM3517: + strcpy(cpu_s, AM3517); break; + + default: + if (cpu_family == CPU_AM35XX) + strcpy(cpu_s, AM35xx); + else + strcpy(cpu_s, OMAP34xx/35xx); } switch (get_device_type()) { case TST_DEVICE: - sec_s = TST; + strcpy(sec_s, TST); break; case EMU_DEVICE: - sec_s = EMU; + strcpy(sec_s, EMU); break; case HS_DEVICE: - sec_s = HS; + strcpy(sec_s, HS); break; case GP_DEVICE: - sec_s = GP; + strcpy(sec_s, GP); break; default: - sec_s = ?; + strcpy(sec_s, ?); } - printf(OMAP%s-%s ES%s, CPU-OPP2 L3-165MHz\n, - cpu_s, sec_s, rev_s[get_cpu_rev()]); + /* + * TBD: Revision numbers for AM35x may not be same as OMAP35x. + * Will need to re-look sometime later. + */ + printf(%s-%s ES%s,%s L3-165MHz\n, + cpu_s, sec_s, rev_s[get_cpu_rev()], + (cpu_family == CPU_AM35XX) ? : CPU-OPP2); Changing pointers to constant strings into using an array with lots of function calls (strcpy()) makes no sense to me. I think the resulting code is just bigger and slower. Or am I overlooking something? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de It's when they say 2 + 2 = 5 that I begin to argue.- Eric Pepke ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] omap3: Optimize detection of cpu revision
Dear Premi, Sanjeev, In message b85a65d85d7eb246be421b3fb0fbb59301e157a...@dbde02.ent.ti.com you wrote: Also, I don't believe there is any complexity added as the contents of register are being read and saved in a global variable for use later. Global variables are a bad thing if there is not really a good reason to hav ethem. Here it makes no sense to me. Execution time seems uncritical, and there is no kind of hardware wear involved with readin the registers, so like Tom I don't see a reason for this optimization. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de How does a project get to be a year late? ... One day at a time. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] About GPL
Dear Hekko, In message 21445806094b2958a71cfb50.07474534.active.m...@poczta.nazwa.pl you wrote: Just a quick question: u-boot boot loader/linux kernel/bash is GPL right ? ... Yes, but there are different versions of the GPL. U-Boot is currently GPLv2+; Linux is GPLv2; bash is currently GPLv2+. ... So whoever is using it he should public entire source code with an annotation that it's based on u-boot boot loader/linux kernel/bash ? No, there is no need to publish the source code. Alternatively you can, for example, accompany your distribution with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code. Please see the GPL for exact details. Well, I'm a software programmer in the LG Electronics company, all these TVs has u-boot inside, with Linux kernel 2.6.10, bash etc. lots of GPL software and they not only didn't published the source code, they also changed all authors to themselves an d claim that they actually invented all of this. Do you have any proof for this statement? Did you contact LG and ask for a copy of the source code? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Systems programmers are the high priests of a low cult. -- R.S. Barton ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/9] i2c driver support for SPEAr SoCs
Dear Vipin KUMAR, In message 1260955110-5656-2-git-send-email-vipin.ku...@st.com you wrote: Signed-off-by: Vipin vipin.ku...@st.com --- drivers/i2c/Makefile |1 + drivers/i2c/spr_i2c.c| 321 ++ include/asm-arm/arch-spear/spr_i2c.h | 143 +++ 3 files changed, 465 insertions(+), 0 deletions(-) mode change 100644 = 100755 drivers/i2c/Makefile create mode 100755 drivers/i2c/spr_i2c.c create mode 100755 include/asm-arm/arch-spear/spr_i2c.h Your patch order is, um, sub-optimal. You start adding an I2C driver for a non-existing CPU here. This makes no sense, please reorder. --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -38,6 +38,7 @@ COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o +COBJS-$(CONFIG_SPEARI2C) += spr_i2c.o Please keep lists sorted (fix globally). +/** + * i2c_setfreq - Set i2c working mode frequency + * + * Set i2c working mode frequency + */ Incorrect multiline comment style. Please fix globally. +static void set_speed(int i2c_spd) +{ + unsigned int cntl; + + if (i2c_spd == IC_SPEED_MODE_MAX) { + cntl = readl(i2c_regs_p-ic_con); + cntl |= IC_CON_SPH | IC_CON_SPL; + writel(cntl, i2c_regs_p-ic_con); + i2c_setfreq(MIN_HS_SCL_HIGHTIME, MIN_HS_SCL_LOWTIME); + } else if (i2c_spd == IC_SPEED_MODE_FAST) { + cntl = readl(i2c_regs_p-ic_con); + cntl |= IC_CON_SPH; + cntl = ~IC_CON_SPL; + writel(cntl, i2c_regs_p-ic_con); + i2c_setfreq(MIN_FS_SCL_HIGHTIME, MIN_FS_SCL_LOWTIME); + } else if (i2c_spd == IC_SPEED_MODE_STANDARD) { + cntl = readl(i2c_regs_p-ic_con); + cntl |= IC_CON_SPF; + cntl = ~IC_CON_SPL; + writel(cntl, i2c_regs_p-ic_con); + i2c_setfreq(MIN_SS_SCL_HIGHTIME, MIN_SS_SCL_LOWTIME); + } It seems you can move the lines writel(cntl, i2c_regs_p-ic_con); i2c_setfreq(MIN_FS_SCL_HIGHTIME, MIN_FS_SCL_LOWTIME); out of the if/else blocks and make them common code. +void i2c_set_bus_speed(int speed) +{ + if (speed = I2C_MAX_SPEED) + set_speed(IC_SPEED_MODE_MAX); + else + if (speed = I2C_FAST_SPEED) Missing braces (mandatory for multiline statements). + set_speed(IC_SPEED_MODE_FAST); + else + set_speed(IC_SPEED_MODE_STANDARD); +} +/** + * i2c_get_bus_speed - Gets the i2c speed + * + * Gets the i2c speed. + */ +int i2c_get_bus_speed(void) +{ + if (((readl(i2c_regs_p-ic_con) IC_CON_SPH) == IC_CON_SPH) +((readl(i2c_regs_p-ic_con) IC_CON_SPL) == IC_CON_SPL)) { + return I2C_MAX_SPEED; + + } else if (((readl(i2c_regs_p-ic_con) IC_CON_SPH) == IC_CON_SPH) +((readl(i2c_regs_p-ic_con) IC_CON_SPL) == 0)) { + return I2C_FAST_SPEED; + + } else if (((readl(i2c_regs_p-ic_con) IC_CON_SPF) == IC_CON_SPF) +((readl(i2c_regs_p-ic_con) IC_CON_SPL) == 0)) { + return I2C_STANDARD_SPEED; + } It makes no sense to run readl(i2c_regs_p-ic_con) six times - run it once and latch the value. Also I tend to think the logic can be written clearer. +void i2c_init(int speed, int slaveadd) +{ + unsigned int enbl; + + /* Disable i2c */ + enbl = readl(i2c_regs_p-ic_enable); + enbl = ~IC_ENABLE_0B; + writel(enbl, i2c_regs_p-ic_enable); + + writel((IC_CON_SD | IC_CON_SPF | IC_CON_MM), i2c_regs_p-ic_con); + writel(IC_TL0, i2c_regs_p-ic_rx_tl); + writel(IC_TL0, i2c_regs_p-ic_tx_tl); Is this duplication intentional? If so, a comment is needed to explain why. +/** + * i2c_probe - Probe the i2c chip + * + * TBD + */ +int i2c_probe(uchar chip) +{ + return 0; +} Please do not add dead code. +int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) +{ + unsigned long start_time_rx; + + if (buffer == NULL) { + printf(I2C read: buffer is invalid\n); + return 1; + } + + if (alen 1) { + printf(I2C read: addr len %d not supported\n, alen); + return 1; + } + + if (addr + len 256) { + printf(I2C read: address out of range\n); + return 1; + } + + if (i2c_wait_for_bb()) + return 1; Why no error message here? + i2c_setaddress(chip); + writel(addr, i2c_regs_p-ic_cmd_data); + + start_time_rx = get_timer_masked(); + while (len) { + writel(IC_CMD, i2c_regs_p-ic_cmd_data); + if ((readl(i2c_regs_p-ic_status) IC_STATUS_RFNE) == + IC_STATUS_RFNE) { + *buffer++ = (uchar)readl(i2c_regs_p-ic_cmd_data); +
Re: [U-Boot] Pull request - mpc85xx
On Dec 16, 2009, at 3:52 PM, Wolfgang Denk wrote: Dear Kumar Gala, In message pine.lnx.4.64.0912161042280.21...@localhost.localdomain you wrote: The following changes since commit bb3bcfa2426cc6a0aecec7270e3ee67ca843a125: Wolfgang Denk (1): Merge branch 'next' of ../next are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Anton Vorontsov (1): mpc85xx: Add 4-bits eSDHC support for MPC8569E-MDS boards Becky Bruce (1): ppc/p4080: Add Corenet Platform Cache (CPC) registers Dave Liu (5): p4080: add readback to bootpage translation window fsl-ddr: Fix power-down timing settings fsl-ddr: add the override for write leveling fsl-ddr: add override for the Rtt_WR fsl-ddr: setup ODT_RD_CFG ODT_WR_CFG when we interleave ... These patches were posted a mere hours before this pull request. Um... can we please allow for a couple of days (3...5 at least) for others to review and comment on the patches, before you (re-) send a pull request? Thanks. My bad. I didn't think any of them would be that big of an issue. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/9] smi driver support for SPEAr SoCs
Dear Vipin KUMAR, In message 1260955110-5656-3-git-send-email-vipin.ku...@st.com you wrote: Signed-off-by: Vipin vipin.ku...@st.com ... +static ulong flash_get_size(ulong base, int banknum) +{ + flash_info_t *info = flash_info[banknum]; + unsigned int value = 0; + unsigned int density = 0; remove useless initialization. + int i; + + value = smi_read_id(info, banknum); + density = (value 16) 0xff; + + switch (density) { + case 0x10: + info-size = 64 * 1024; + info-sector_count = 2; + break; + case 0x11: + info-size = 128 * 1024; + info-sector_count = 4; + break; + case 0x12: + info-size = 256 * 1024; + info-sector_count = 4; + break; + case 0x13: + info-size = 512 * 1024; + info-sector_count = 8; + break; + case 0x14: + info-size = 1 * 1024 * 1024; + info-sector_count = 16; + break; + case 0x15: + info-size = 2 * 1024 * 1024; + info-sector_count = 32; + break; + case 0x16: + info-size = 4 * 1024 * 1024; + info-sector_count = 64; + break; + case 0x17: + info-size = 8 * 1024 * 1024; + info-sector_count = 128; + break; + case 0x18: + info-size = 16 * 1024 * 1024; + info-sector_count = 64; + break; + default: + return 0x0; + } Consider using lookup tables? + /* Assume that all sectors are unprotected by default */ + for (i = 0; i CONFIG_SYS_MAX_FLASH_SECT; i++) + info-protect[i] = 0; Um... is this assumption correct? +static int smi_wait_till_ready(int bank, int timeout) +{ + int count; + int sr; + + /* One chip guarantees max 5 msec wait here after page writes, +but potentially three seconds (!) after page erase. */ + for (count = 0; count timeout; count++) { + sr = smi_read_sr(bank); + if (sr 0) + break; + else if (!(sr WIP_BIT)) + return 0; Use braces here. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/9] usbd driver and usb boot firmware support for SPEAr SoCs
Dear Vipin KUMAR, In message 1260955110-5656-5-git-send-email-vipin.ku...@st.com you wrote: Signed-off-by: Vipin vipin.ku...@st.com --- common/main.c |2 + drivers/serial/usbtty.h |2 + drivers/usb/gadget/Makefile |1 + drivers/usb/gadget/spr_udc.c | 996 + include/asm-arm/arch-spear/spr_misc.h | 126 + include/usb/spr_udc.h | 227 6 files changed, 1354 insertions(+), 0 deletions(-) mode change 100644 = 100755 drivers/serial/usbtty.h mode change 100644 = 100755 drivers/usb/gadget/Makefile create mode 100755 drivers/usb/gadget/spr_udc.c create mode 100644 include/asm-arm/arch-spear/spr_misc.h create mode 100755 include/usb/spr_udc.h Please split into two patches: one with generic usbd driver, and the second adding support for SPEAr. diff --git a/common/main.c b/common/main.c index 10d8904..79f3018 100644 --- a/common/main.c +++ b/common/main.c @@ -397,6 +397,7 @@ void main_loop (void) debug (### main_loop: bootcmd=\%s\\n, s ? s : UNDEFINED); +#if !defined(CONFIG_SPEAR_USBTTY) if (bootdelay = 0 s !abortboot (bootdelay)) { # ifdef CONFIG_AUTOBOOT_KEYED int prev = disable_ctrlc(1);/* disable Control C checking */ @@ -413,6 +414,7 @@ void main_loop (void) disable_ctrlc(prev);/* restore Control C checking */ # endif } +# endif Why would this be needed? diff --git a/drivers/usb/gadget/spr_udc.c b/drivers/usb/gadget/spr_udc.c new file mode 100755 index 000..5b135c7 --- /dev/null +++ b/drivers/usb/gadget/spr_udc.c ... +/* Some kind of debugging output... */ +#if 1 +#define UDCDBG(str) +#define UDCDBGA(fmt, args...) +#else +#define UDCDBG(str) serial_printf(str \n) +#define UDCDBGA(fmt, args...) serial_printf(fmt \n, ##args) +#endif This looks wrong. Should that be a #ifndef DEBUG instead of #if 1? And cannot we use standard debug facilities? +static struct udc_endp_regs *const outep_regs_p = + ((struct udc_regs *const)CONFIG_SYS_USBD_BASE)-out_regs[0]; +static struct udc_endp_regs *const inep_regs_p = + ((struct udc_regs *const)CONFIG_SYS_USBD_BASE)-in_regs[0]; + +/* + * udc_state_transition - Write the next packet to TxFIFO. + * @initial: Initial state. + * @final: Final state. + * + * Helper function to implement device state changes. The device states and + * the events that transition between them are: + * + * STATE_ATTACHED + * || /\ + * \/ || + * DEVICE_HUB_CONFIGURED DEVICE_HUB_RESET + * || /\ + * \/ || + * STATE_POWERED + * || /\ + * \/ || + * DEVICE_RESETDEVICE_POWER_INTERRUPTION + * || /\ + * \/ || + * STATE_DEFAULT + * || /\ + * \/ || + * DEVICE_ADDRESS_ASSIGNED DEVICE_RESET + * || /\ + * \/ || + * STATE_ADDRESSED + * || /\ + * \/ || + * DEVICE_CONFIGURED DEVICE_DE_CONFIGURED + * || /\ + * \/ || + * STATE_CONFIGURED + * + * udc_state_transition transitions up (in the direction from STATE_ATTACHED + * to STATE_CONFIGURED) from the specified initial state to the specified final + * state, passing through each intermediate state on the way. If the initial + * state is at or above (i.e. nearer to STATE_CONFIGURED) the final state, then + * no state transitions will take place. + * + * udc_state_transition also transitions down (in the direction from + * STATE_CONFIGURED to STATE_ATTACHED) from the specified initial state to the + * specified final state, passing through each intermediate state on the way. + * If the initial state is at or below (i.e. nearer to STATE_ATTACHED) the final + * state, then no state transitions will take place. + * + * This function must only be called with interrupts disabled. + */ +static void udc_state_transition(usb_device_state_t initial, + usb_device_state_t final) ... +/* Stall endpoint */ +static void udc_stall_ep(u32 ep_num) ... +static void *get_fifo(int ep_num, int in) ... +static short usbgetpckfromfifo(int epNum, u8 *bufp, u32 len) ... +static void usbputpcktofifo(int epNum, u8 *bufp, u32 len) ... So far this code looks pretty generic to me. +/* + * spear_write_noniso_tx_fifo -
Re: [U-Boot] [PATCH 5/9] SPEAr600 SoC support added
Dear Vipin KUMAR, In message 1260955110-5656-6-git-send-email-vipin.ku...@st.com you wrote: Signed-off-by: Vipin vipin.ku...@st.com ... +int misc_init_r(void) +{ +#if defined(CONFIG_CMD_NET) + uchar mac_id[6]; + + if (!i2c_read_mac(mac_id)) + eth_setenv_enetaddr(ethaddr, mac_id); +#endif + setenv(verify, n); NAK. Please do not enforce such a policy on all your users. Let them decide if they want this, or not. ... +int do_setfreq(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + void (*sram_setfreq) (unsigned int, unsigned int); + unsigned int frequency; + + if (argc != 3) { + printf(Usage:\n%s\n, cmdtp-usage); + return 1; + } + + frequency = simple_strtoul(argv[2], NULL, 0); + + if (frequency 333) { + printf(Frequency is limited to 333MHz\n); + return 1; + } + sram_setfreq = memcpy((void *)0xD2801000, setfreq, setfreq_sz); + + if (!strcmp(argv[1], ddr)) { + sram_setfreq(DDR, frequency); + printf(DDR frequency changed to %u\n, frequency); + + } else if (!strcmp(argv[1], cpu)) { + sram_setfreq(CPU, frequency); + printf(CPU frequency changed to %u\n, frequency); + } else { + printf(Usage:\n%s\n, cmdtp-usage); + return 1; + } + + return 0; +} + +U_BOOT_CMD(setfreq, 3, 1, do_setfreq, +change ddr/cpu frequency, device[ddr/cpu] frequency); +#endif Do we need a new custom command for this? Either allow setting by environment variable only (cpuclk is already used by a number of systems), or use a common command name (chip_config was chosen for this after some discussion a while ago). Also, is no further checking needed? Can I set arbitrary frequencies, like 307 for CPU and 277 for DDR? + if ((buf[0] == 0x55) (buf[1] == 0xAA)) { + /* Valid MAC address is saved in I2C EEPROM, +read the MAC address from the +EEPROM update the buffer */ Incorrect multiline comment once more. + buf[0] = 0x55; + buf[1] = 0xAA; + i2c_write(0x50, /* Chip address */ + 0x0, /* Offset */ + 1,/* Address length */ + buf, /* buffer */ + 2); /* Length */ Argh. Please do not do this. + buf[0] = 0x44; + buf[1] = 0x66; + + i2c_read(0x50, /* Chip address */ + 0x0, /* Offset */ + 1, /* Address length */ + buf, /* buffer */ + 2);/* Length */ Ditto. diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 11c1547..412cad6 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -27,6 +27,10 @@ #include common.h #include command.h +#if defined(CONFIG_SPEAR600) || defined(CONFIG_SPEAR3XX) +#include asm/arch/spr_xloader_table.h +#endif + DECLARE_GLOBAL_DATA_PTR; static void print_num(const char *, ulong); @@ -339,6 +343,22 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif printf (baudrate= %d bps\n, bd-bi_baudrate); +#if defined(CONFIG_SPEAR600) || defined(CONFIG_SPEAR3XX) + if (bd-dramfreq == -1) + printf(DDR Freq= Not Known\n); + else + printf(DDR Freq= %d\n, bd-dramfreq); + + if (bd-dramtype == DDRMOBILE) + printf(DDR Type= MOBILE\n); + else if (bd-dramtype == DDR2) + printf(DDR Type= DDR2\n); + else + printf(DDR Type= Not Known\n); + + printf(Xloader Rev = %s\n, bd-version); +#endif + return 0; } I don't like such board-specific code in this common file. diff --git a/include/configs/spear600.h b/include/configs/spear600.h new file mode 100755 index 000..755114d ... +/* #define CONFIG_ETHADDR00:11:22:33:44:55 */ + +/* #define CONFIG_NETMASK255.255.255.0 */ +/* #define CONFIG_IPADDR 192.168.1.10 */ +/* #define CONFIG_SERVERIP 192.168.1.1 */ +/* #define CONFIG_GATEWAYIP 192.168.1.1 */ Please remove. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A witty saying proves nothing. - Voltaire ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] About GPL
I would suggest to be very cautious with such statements. You had better be in possession of valid, and legally obtained, proof of each and every one of the statements you made, otherwise you might be put to trial for libel. I don't know about your local law, but under French libel law, you've said enough to get yourself in trouble. In any case, you should discuss with a lawyer before publishing such statements as you just made. Amicalement, Easy Albert, it was just a question about GPL ;-) also according to my local law I can ask any question. In that case, to make it official: I'm sorry anyone who felt offended and took it as an accusation, also LG. I just wanted to ask simple about GPL, maybe I took words wrong / poor english. Best Regards Domeny, serwer, Strona WWW za darmo! Tylko teraz dla Twojej firmy! www.nazwa.pl ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] About GPL
Dear Hekko, In message 10217154154b296a67e0c072.86674490.active.m...@poczta.nazwa.pl you wrote: Easy Albert, it was just a question about GPL ;-) also according to my local law I can ask any question. In that case, to make it official: I'm sorry anyone who felt offended and took it as an accusation, also LG. I just wanted to ask simple about GPL, maybe I took words wrong / poor english. Just one more word: I can speak only ofr U-Boot - but if you really have proof that anybody uses U-Boot in a product, and they do not provide the source code when you ask for it, then please feel free to contact me and be assured that we will try to resolve this issue - one way or another. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Where would we be without rhetorical questions? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 00/25] Blackfin updates for v2010.03-rc0
Bunch o fixes here as well as support for a few more boards. Also quite a bit of code clean ups (punting dead/useless code). Cliff Cai (4): Blackfin: bfin_spi: let boards control idle value Blackfin: convert bfin_sdh to generic mmc Blackfin: bfin_spi: round up clock divider Blackfin: bf527-ezkit/bf548-ezkit: add musb board specific initialization Harald Krapfenbauer (1): Blackfin: update tiny board settings (voltage/default env) Michael Hennerich (1): Blackfin: add support for BF527-EZKIT v2.1 Mike Frysinger (18): Blackfin: tweak embedded LDR env config option Blackfin: bf537-stamp: rename SPI/MMC define Blackfin: ADI settings: enable silent console support Blackfin: move section length calculation to linker script Blackfin: do not require CONFIG_BAUDRATE Blackfin: kill off useless initdram() usage Blackfin: global_data.h: make pull in needed headers Blackfin: re-architecture initcode Blackfin: support boards with no external memory Blackfin: bf527-ezkit: auto-select NAND settings Blackfin: fix L1 Instruction sizes on BF52x/BF54x Blackfin: move watchdog config check to Makefile Blackfin: use new bfin read/write mmr helper funcs Blackfin: asm/string.h: drop useless includes Blackfin: bf533-stamp: split and cleanup CF/IDE code Blackfin: drop unused funcs from io.h Blackfin: section off the CF/IDE io.h hacks Blackfin: pull io funcs from linux Valentin Yakovenkov (1): Blackfin: bf561-acvilon: new board port MAINTAINERS |6 + MAKEALL |2 + Makefile|9 +- board/bf518f-ezbrd/bf518f-ezbrd.c | 15 +- board/bf526-ezbrd/bf526-ezbrd.c |7 - board/bf527-ezkit/bf527-ezkit.c | 20 +- board/bf527-ezkit/video.c | 144 +++- board/bf533-ezkit/bf533-ezkit.c |7 - board/bf533-stamp/Makefile |1 + board/bf533-stamp/bf533-stamp.c | 120 +--- board/bf533-stamp/ide-cf.c | 90 ++ board/bf537-minotaur/bf537-minotaur.c |7 - board/bf537-pnav/bf537-pnav.c |7 - board/bf537-srv1/bf537-srv1.c |7 - board/bf537-stamp/bf537-stamp.c |7 - board/bf538f-ezkit/bf538f-ezkit.c |7 - board/bf548-ezkit/bf548-ezkit.c | 31 +- board/bf561-acvilon/Makefile| 56 + board/bf561-acvilon/bf561-acvilon.c | 52 + board/bf561-acvilon/config.mk | 34 + board/bf561-ezkit/bf561-ezkit.c |7 - board/blackstamp/blackstamp.c |7 - board/cm-bf527/cm-bf527.c |7 - board/cm-bf533/cm-bf533.c |7 - board/cm-bf537e/cm-bf537e.c |7 - board/cm-bf537u/cm-bf537u.c |7 - board/cm-bf548/cm-bf548.c |7 - board/cm-bf561/cm-bf561.c |7 - board/ibf-dsp561/ibf-dsp561.c |7 - board/tcm-bf537/tcm-bf537.c |7 - cpu/blackfin/Makefile |2 +- cpu/blackfin/cpu.c | 11 +- cpu/blackfin/initcode.c | 250 -- cpu/blackfin/interrupts.c | 12 +- cpu/blackfin/serial.c | 20 +- cpu/blackfin/serial.h | 119 ++- cpu/blackfin/start.S| 24 +- cpu/blackfin/watchdog.c |4 +- drivers/mmc/bfin_sdh.c | 519 +++ drivers/mmc/bfin_sdh.h | 59 -- drivers/spi/bfin_spi.c | 13 +- include/asm-blackfin/bfin_logo_rgb565_230x230.h | 1242 +++ include/asm-blackfin/blackfin_local.h |4 +- include/asm-blackfin/config-pre.h |3 + include/asm-blackfin/config.h | 14 +- include/asm-blackfin/global_data.h |2 + include/asm-blackfin/io.h | 194 +++-- include/asm-blackfin/mach-bf527/BF522_def.h | 15 - include/asm-blackfin/mach-bf527/BF523_def.h | 15 - include/asm-blackfin/mach-bf527/BF524_def.h | 15 - include/asm-blackfin/mach-bf527/BF525_def.h | 15 - include/asm-blackfin/mach-bf527/BF526_def.h | 15 - include/asm-blackfin/mach-bf527/BF527_def.h | 15 - include/asm-blackfin/mach-bf527/def_local.h |1 + include/asm-blackfin/mach-bf527/mem_map.h | 21 + include/asm-blackfin/mach-bf548/BF542_def.h | 15 - include/asm-blackfin/mach-bf548/BF544_def.h | 15 - include/asm-blackfin/mach-bf548/BF547_def.h |9 - include/asm-blackfin/mach-bf548/BF548_def.h | 15 -
[U-Boot] [PATCH 01/25] Blackfin: tweak embedded LDR env config option
Use the common config option for extracting the environment for embedding into LDR files and clarify the LDR-specific option. Signed-off-by: Mike Frysinger vap...@gentoo.org --- Makefile |2 +- include/asm-blackfin/config.h|5 + include/configs/bf518f-ezbrd.h |2 +- include/configs/bf526-ezbrd.h|2 +- include/configs/bf527-ezkit.h|2 +- include/configs/bf533-stamp.h|2 +- include/configs/bf537-minotaur.h |2 +- include/configs/bf537-pnav.h |2 +- include/configs/bf537-srv1.h |2 +- include/configs/bf537-stamp.h|2 +- include/configs/bf538f-ezkit.h |2 +- include/configs/bf548-ezkit.h|4 ++-- include/configs/bf561-ezkit.h|2 +- include/configs/cm-bf527.h |2 +- include/configs/cm-bf537e.h |2 +- include/configs/cm-bf537u.h |2 +- include/configs/cm-bf548.h |2 +- include/configs/ibf-dsp561.h |2 +- include/configs/tcm-bf537.h |2 +- lib_blackfin/config.mk | 10 +++--- 20 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 536ccb3..56c6480 100644 --- a/Makefile +++ b/Makefile @@ -309,7 +309,7 @@ $(obj)u-boot.bin: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $ $@ $(obj)u-boot.ldr: $(obj)u-boot - $(obj)tools/envcrc --binary $(obj)env-ldr.o + $(CREATE_LDR_ENV) $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $ $(LDR_FLAGS) $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr diff --git a/include/asm-blackfin/config.h b/include/asm-blackfin/config.h index 327843d..fbfd598 100644 --- a/include/asm-blackfin/config.h +++ b/include/asm-blackfin/config.h @@ -79,6 +79,11 @@ # define CONFIG_ENV_SPI_CS BFIN_BOOT_SPI_SSEL #endif +/* We need envcrc to embed the env into LDRs */ +#ifdef CONFIG_ENV_IS_EMBEDDED_IN_LDR +# define CONFIG_BUILD_ENVCRC +#endif + /* Default/common Blackfin memory layout */ #ifndef CONFIG_SYS_SDRAM_BASE # define CONFIG_SYS_SDRAM_BASE 0 diff --git a/include/configs/bf518f-ezbrd.h b/include/configs/bf518f-ezbrd.h index 3db8171..4928403 100644 --- a/include/configs/bf518f-ezbrd.h +++ b/include/configs/bf518f-ezbrd.h @@ -109,7 +109,7 @@ #define CONFIG_ENV_SIZE0x2000 #define CONFIG_ENV_SECT_SIZE 0x2000 #endif -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR /* diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h index 97853af..711fa27 100644 --- a/include/configs/bf526-ezbrd.h +++ b/include/configs/bf526-ezbrd.h @@ -126,7 +126,7 @@ #define CONFIG_ENV_SIZE0x2000 #define CONFIG_ENV_SECT_SIZE 0x2000 #endif -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR /* diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h index 0d02354..5f3cb83 100644 --- a/include/configs/bf527-ezkit.h +++ b/include/configs/bf527-ezkit.h @@ -125,7 +125,7 @@ #define CONFIG_ENV_SIZE0x2000 #define CONFIG_ENV_SECT_SIZE 0x2000 #endif -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR /* diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h index 0006b02..083c030 100644 --- a/include/configs/bf533-stamp.h +++ b/include/configs/bf533-stamp.h @@ -117,7 +117,7 @@ #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS) #define ENV_IS_EMBEDDED #else -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR #endif #ifdef ENV_IS_EMBEDDED /* WARNING - the following is hand-optimized to fit within diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h index 463b7d0..86aa1f6 100644 --- a/include/configs/bf537-minotaur.h +++ b/include/configs/bf537-minotaur.h @@ -115,7 +115,7 @@ #define CONFIG_ENV_OFFSET 0x1 #define CONFIG_ENV_SIZE0x1 #define CONFIG_ENV_SECT_SIZE 0x1 -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR /* diff --git a/include/configs/bf537-pnav.h b/include/configs/bf537-pnav.h index 0f908ef..6627a04 100644 --- a/include/configs/bf537-pnav.h +++ b/include/configs/bf537-pnav.h @@ -94,7 +94,7 @@ * Env Storage Settings */ #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER) -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR #define CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_OFFSET 0x4000 #else diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h index 7368629..7e9dd36 100644 --- a/include/configs/bf537-srv1.h +++ b/include/configs/bf537-srv1.h @@ -115,7 +115,7 @@ #define CONFIG_ENV_OFFSET 0x1 #define CONFIG_ENV_SIZE0x1 #define CONFIG_ENV_SECT_SIZE 0x1 -#define ENV_IS_EMBEDDED_CUSTOM +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR /* diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h index 74b9ecd..017fb45 100644 --- a/include/configs/bf537-stamp.h
[U-Boot] [PATCH 02/25] Blackfin: update tiny board settings (voltage/default env)
From: Harald Krapfenbauer harald.krapfenba...@bluetechnix.at The tinyboards like to run at a little lower voltage than the default, and they prefer to boot over the network. For the latter, extend the common code a little to make this easier. Also fix the cm-bf527 env sector size while we're in here to reflect the flash that is actually in use. Signed-off-by: Harald Krapfenbauer harald.krapfenba...@bluetechnix.at Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/configs/bfin_adi_common.h |5 - include/configs/cm-bf527.h|7 ++- include/configs/cm-bf533.h|5 + include/configs/cm-bf537e.h |5 + include/configs/cm-bf537u.h | 11 ++- include/configs/cm-bf548.h|5 + include/configs/cm-bf561.h|7 ++- include/configs/tcm-bf537.h |5 + 8 files changed, 38 insertions(+), 12 deletions(-) diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 0fbd8f4..3fc0fa0 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -127,6 +127,9 @@ #ifndef CONFIG_BOOTARGS_ROOT # define CONFIG_BOOTARGS_ROOT /dev/mtdblock0 rw #endif +#ifndef FLASHBOOT_ENV_SETTINGS +# define FLASHBOOT_ENV_SETTINGS flashboot=bootm 0x2010\0 +#endif #define CONFIG_BOOTARGS\ root= CONFIG_BOOTARGS_ROOT \ clkin_hz= MK_STR(CONFIG_CLKIN_HZ) \ @@ -211,7 +214,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ NAND_ENV_SETTINGS \ NETWORK_ENV_SETTINGS \ - flashboot=bootm 0x2010\0 + FLASHBOOT_ENV_SETTINGS /* * Network Settings diff --git a/include/configs/cm-bf527.h b/include/configs/cm-bf527.h index 3d41bd1..eb0bc3f 100644 --- a/include/configs/cm-bf527.h +++ b/include/configs/cm-bf527.h @@ -38,6 +38,9 @@ /* Values can range from 1-15 */ #define CONFIG_SCLK_DIV4 +/* Decrease core voltage */ +#define CONFIG_VR_CTL_VAL (VLEV_120 | CLKBUFOE | FREQ_1000) + /* * Memory Settings @@ -105,7 +108,7 @@ #define CONFIG_ENV_ADDR0x20008000 #define CONFIG_ENV_OFFSET 0x8000 #define CONFIG_ENV_SIZE0x8000 -#define CONFIG_ENV_SECT_SIZE 0x2 +#define CONFIG_ENV_SECT_SIZE 0x8000 #define CONFIG_ENV_IS_EMBEDDED_IN_LDR @@ -125,6 +128,8 @@ #define CONFIG_MISC_INIT_R #define CONFIG_RTC_BFIN #define CONFIG_UART_CONSOLE0 +#define CONFIG_BOOTCOMMAND run flashboot +#define FLASHBOOT_ENV_SETTINGS flashboot=flread 2004 100 30; bootm 0x100\0 /* diff --git a/include/configs/cm-bf533.h b/include/configs/cm-bf533.h index 06eb288..7515296 100644 --- a/include/configs/cm-bf533.h +++ b/include/configs/cm-bf533.h @@ -38,6 +38,9 @@ /* Values can range from 1-15 */ #define CONFIG_SCLK_DIV5 +/* Decrease core voltage */ +#define CONFIG_VR_CTL_VAL (VLEV_115 | GAIN_20 | FREQ_1000) + /* * Memory Settings @@ -93,6 +96,8 @@ */ #define CONFIG_BAUDRATE115200 #define CONFIG_UART_CONSOLE0 +#define CONFIG_BOOTCOMMAND run flashboot +#define FLASHBOOT_ENV_SETTINGS flashboot=bootm 0x2004\0 /* diff --git a/include/configs/cm-bf537e.h b/include/configs/cm-bf537e.h index b243e1a..f51fa9c 100644 --- a/include/configs/cm-bf537e.h +++ b/include/configs/cm-bf537e.h @@ -38,6 +38,9 @@ /* Values can range from 1-15 */ #define CONFIG_SCLK_DIV4 +/* Decrease core voltage */ +#define CONFIG_VR_CTL_VAL (VLEV_115 | CLKBUFOE | GAIN_20 | FREQ_1000) + /* * Memory Settings @@ -127,6 +130,8 @@ #define CONFIG_MISC_INIT_R #define CONFIG_RTC_BFIN #define CONFIG_UART_CONSOLE0 +#define CONFIG_BOOTCOMMAND run flashboot +#define FLASHBOOT_ENV_SETTINGS flashboot=flread 2004 100 30; bootm 0x100\0 /* diff --git a/include/configs/cm-bf537u.h b/include/configs/cm-bf537u.h index 0ed5960..6937225 100644 --- a/include/configs/cm-bf537u.h +++ b/include/configs/cm-bf537u.h @@ -131,6 +131,8 @@ #define CONFIG_MISC_INIT_R #define CONFIG_RTC_BFIN #define CONFIG_UART_CONSOLE0 +#define CONFIG_BOOTCOMMAND run flashboot +#define FLASHBOOT_ENV_SETTINGS flashboot=flread 2004 100 28; bootm 0x100\0 /* @@ -138,13 +140,4 @@ */ #include configs/bfin_adi_common.h -#undef CONFIG_BOOTCOMMAND -#define CONFIG_BOOTCOMMAND run flashboot - -#undef CONFIG_EXTRA_ENV_SETTINGS -#define CONFIG_EXTRA_ENV_SETTINGS \ - NAND_ENV_SETTINGS \ - NETWORK_ENV_SETTINGS \ - flashboot=flread 2004 100 28; bootm 0x100\0 - #endif diff --git a/include/configs/cm-bf548.h b/include/configs/cm-bf548.h index 9630f7d..93c4c8d 100644 --- a/include/configs/cm-bf548.h +++ b/include/configs/cm-bf548.h @@ -38,6 +38,9 @@ /* Values can range from 1-15 */ #define
[U-Boot] [PATCH 04/25] Blackfin: ADI settings: enable silent console support
Very little additional code overhead, and only works when the user sets an env var ahead of time, so default to on makes sense. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/configs/bfin_adi_common.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 3fc0fa0..42f4cbc 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -96,6 +96,7 @@ #define CONFIG_AUTO_COMPLETE 1 #define CONFIG_LOADS_ECHO 1 #define CONFIG_JTAG_CONSOLE +#define CONFIG_SILENT_CONSOLE #ifndef CONFIG_BAUDRATE # define CONFIG_BAUDRATE 57600 #endif -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/25] Blackfin: bf537-stamp: rename SPI/MMC define
Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/configs/bf537-stamp.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h index 017fb45..de2add7 100644 --- a/include/configs/bf537-stamp.h +++ b/include/configs/bf537-stamp.h @@ -145,7 +145,7 @@ * SPI_MMC Settings */ #define CONFIG_MMC -#define CONFIG_BFIN_SPI_MMC +#define CONFIG_SPI_MMC /* -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 06/25] Blackfin: move section length calculation to linker script
The length of the sections is fixed at link time, so let the linker do the calculation rather than doing it ourselves at runtime. Signed-off-by: Mike Frysinger vap...@gentoo.org --- cpu/blackfin/cpu.c| 11 +-- cpu/blackfin/start.S | 18 -- lib_blackfin/u-boot.lds.S | 24 +--- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/cpu/blackfin/cpu.c b/cpu/blackfin/cpu.c index 9bb6407..2c8fd86 100644 --- a/cpu/blackfin/cpu.c +++ b/cpu/blackfin/cpu.c @@ -25,13 +25,12 @@ ulong bfin_poweron_retx; __attribute__ ((__noreturn__)) void cpu_init_f(ulong bootflag, ulong loaded_from_ldr) { - extern char _stext_l1; #ifndef CONFIG_BFIN_BOOTROM_USES_EVT1 /* Build a NOP slide over the LDR jump block. Whee! */ char nops[0xC]; serial_early_puts(NOP Slide\n); memset(nops, 0x00, sizeof(nops)); - memcpy(_stext_l1 - sizeof(nops), nops, sizeof(nops)); + memcpy((void *)L1_INST_SRAM, nops, sizeof(nops)); #endif if (!loaded_from_ldr) { @@ -40,10 +39,10 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr) * checking at build time. */ serial_early_puts(L1 Relocate\n); - extern char _stext_l1, _etext_l1, _stext_l1_lma; - memcpy(_stext_l1, _stext_l1_lma, (_etext_l1 - _stext_l1)); - extern char _sdata_l1, _edata_l1, _sdata_l1_lma; - memcpy(_sdata_l1, _sdata_l1_lma, (_edata_l1 - _sdata_l1)); + extern char _stext_l1[], _text_l1_lma[], _text_l1_len[]; + memcpy(_stext_l1, _text_l1_lma, (unsigned long)_text_l1_len); + extern char _sdata_l1[], _data_l1_lma[], _data_l1_len[]; + memcpy(_sdata_l1, _data_l1_lma, (unsigned long)_data_l1_len); } #if defined(__ADSPBF537__) || defined(__ADSPBF536__) || defined(__ADSPBF534__) /* The BF537 bootrom will reset the EBIU_AMGCTL register on us diff --git a/cpu/blackfin/start.S b/cpu/blackfin/start.S index 7cbd632..44e2725 100644 --- a/cpu/blackfin/start.S +++ b/cpu/blackfin/start.S @@ -139,11 +139,10 @@ ENTRY(_start) .Ldma_and_reprogram: r0.l = LO(L1_INST_SRAM); r0.h = HI(L1_INST_SRAM); - r1.l = __initcode_start; - r1.h = __initcode_start; - r2.l = __initcode_end; - r2.h = __initcode_end; - r2 = r2 - r1; /* convert r2 into length of initcode */ + r1.l = __initcode_lma; + r1.h = __initcode_lma; + r2.l = __initcode_len; + r2.h = __initcode_len; r1 = r1 - r4; /* convert r1 from load address of initcode ... */ r1 = r1 + r5; /* ... to current (not load) address of initcode */ p3 = r0; @@ -173,12 +172,11 @@ ENTRY(_start) * takes care of clearing things for us. */ serial_early_puts(Zero BSS); - r0.l = __bss_start; - r0.h = __bss_start; + r0.l = __bss_vma; + r0.h = __bss_vma; r1 = 0 (x); - r2.l = __bss_end; - r2.h = __bss_end; - r2 = r2 - r0; + r2.l = __bss_len; + r2.h = __bss_len; call _memset; .Lnorelocate: diff --git a/lib_blackfin/u-boot.lds.S b/lib_blackfin/u-boot.lds.S index 3604b78..8a9e8b1 100644 --- a/lib_blackfin/u-boot.lds.S +++ b/lib_blackfin/u-boot.lds.S @@ -65,16 +65,22 @@ MEMORY ENTRY(_start) SECTIONS { - .text : + .text.pre : { cpu/blackfin/start.o (.text .text.*) LDS_BOARD_TEXT + } ram_code - __initcode_start = .; + .text.init : + { cpu/blackfin/initcode.o (.text .text.*) - __initcode_end = .; + } ram_code + __initcode_lma = LOADADDR(.text.init); + __initcode_len = SIZEOF(.text.init); + .text : + { *(.text .text.*) } ram @@ -113,7 +119,9 @@ SECTIONS . = ALIGN(4); __etext_l1 = .; } l1_code ATram - __stext_l1_lma = LOADADDR(.text_l1); + __text_l1_lma = LOADADDR(.text_l1); + __text_l1_len = SIZEOF(.text_l1); + ASSERT (__text_l1_len = L1_INST_SRAM_SIZE, L1 text overflow!) .data_l1 : { @@ -124,16 +132,18 @@ SECTIONS . = ALIGN(4); __edata_l1 = .; } l1_data ATram - __sdata_l1_lma = LOADADDR(.data_l1); + __data_l1_lma = LOADADDR(.data_l1); + __data_l1_len = SIZEOF(.data_l1); + ASSERT (__data_l1_len = L1_DATA_B_SRAM_SIZE, L1 data B overflow!) .bss : { . = ALIGN(4); - __bss_start = .; *(.sbss) *(.scommon) *(.dynbss) *(.bss .bss.*) *(COMMON) - __bss_end = .; } ram + __bss_vma = ADDR(.bss); + __bss_len = SIZEOF(.bss); } -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de
[U-Boot] [PATCH 07/25] Blackfin: do not require CONFIG_BAUDRATE
Signed-off-by: Mike Frysinger vap...@gentoo.org --- cpu/blackfin/initcode.c |3 +++ lib_blackfin/board.c|2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/cpu/blackfin/initcode.c b/cpu/blackfin/initcode.c index a039cbb..90a5fc3 100644 --- a/cpu/blackfin/initcode.c +++ b/cpu/blackfin/initcode.c @@ -66,6 +66,9 @@ static inline void serial_init(void) int ucen = *pUART_GCTL UCEN; serial_early_init(); +#ifndef CONFIG_BAUDRATE +# define CONFIG_BAUDRATE 57600 +#endif /* If the UART is off, that means we need to program * the baud rate ourselves initially. */ diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 6cade7d..1c3b461 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -61,11 +61,13 @@ static int display_banner(void) static int init_baudrate(void) { +#ifdef CONFIG_BAUDRATE char baudrate[15]; int i = getenv_r(baudrate, baudrate, sizeof(baudrate)); gd-bd-bi_baudrate = gd-baudrate = (i 0) ? simple_strtoul(baudrate, NULL, 10) : CONFIG_BAUDRATE; +#endif return 0; } -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/25] Blackfin: bf561-acvilon: new board port
From: Valentin Yakovenkov yakoven...@niistt.ru Signed-off-by: Valentin Yakovenkov yakoven...@niistt.ru Signed-off-by: Mike Frysinger vap...@gentoo.org --- MAINTAINERS |5 + MAKEALL |1 + Makefile|2 +- board/bf561-acvilon/Makefile| 56 +++ board/bf561-acvilon/bf561-acvilon.c | 59 board/bf561-acvilon/config.mk | 34 +++ include/configs/bf561-acvilon.h | 178 +++ 7 files changed, 334 insertions(+), 1 deletions(-) create mode 100644 board/bf561-acvilon/Makefile create mode 100644 board/bf561-acvilon/bf561-acvilon.c create mode 100644 board/bf561-acvilon/config.mk create mode 100644 include/configs/bf561-acvilon.h diff --git a/MAINTAINERS b/MAINTAINERS index 9734b1d..2ef158d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -977,6 +977,11 @@ Blackfin Team u-boot-de...@blackfin.uclinux.org IBF-DSP561 BF561 +Valentin Yakovenkov yakoven...@niistt.ru +Anton Shurpin shurpin...@niistt.ru + + BF561-ACVILON BF561 + # # End of MAINTAINERS list # # diff --git a/MAKEALL b/MAKEALL index ab1bb6f..acb35d2 100755 --- a/MAKEALL +++ b/MAKEALL @@ -877,6 +877,7 @@ LIST_blackfin= \ bf537-stamp \ bf538f-ezkit\ bf548-ezkit \ + bf561-acvilon \ bf561-ezkit \ blackstamp \ cm-bf527\ diff --git a/Makefile b/Makefile index 56c6480..9ce0ecf 100644 --- a/Makefile +++ b/Makefile @@ -3559,7 +3559,7 @@ BFIN_BOARDS = bf518f-ezbrd bf526-ezbrd bf527-ezkit bf533-ezkit bf533-stamp \ BFIN_BOARDS += cm-bf527 cm-bf533 cm-bf537e cm-bf537u cm-bf548 cm-bf561 tcm-bf537 # Misc third party boards -BFIN_BOARDS += bf537-minotaur bf537-srv1 blackstamp +BFIN_BOARDS += bf537-minotaur bf537-srv1 bf561-acvilon blackstamp # I-SYST Micromodule BFIN_BOARDS += ibf-dsp561 diff --git a/board/bf561-acvilon/Makefile b/board/bf561-acvilon/Makefile new file mode 100644 index 000..cc039a0 --- /dev/null +++ b/board/bf561-acvilon/Makefile @@ -0,0 +1,56 @@ +# +# U-boot - Makefile +# +# Copyright (c) 2005-2007 Analog Device Inc. +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2009 CJSC NII STT, Russia, Smolensk +# +# 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:= $(BOARD).o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS-y)) + +$(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/bf561-acvilon/bf561-acvilon.c b/board/bf561-acvilon/bf561-acvilon.c new file mode 100644 index 000..3129f05 --- /dev/null +++ b/board/bf561-acvilon/bf561-acvilon.c @@ -0,0 +1,59 @@ +/* + * File: board/bf561-acvilon/bf561-acvilon.c + * Based on: board/bf561-ezkit/bf561-ezkit.c + * Author: + * + * Created: 2009-06-23 + * Description: Acvilon System On Module board file + * + * Modified: + * Copyright 2009 CJSC NII STT, http://www.niistt.ru/ + * Copyright (c) 2005-2008 Analog Devices Inc. + * + * (C) Copyright 2000-2004 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * Bugs: + * + * 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
[U-Boot] [PATCH 08/25] Blackfin: kill off useless initdram() usage
While the initdram() function makes sense on some arches, it doesn't for Blackfin systems as it's always implemented the same way. Signed-off-by: Mike Frysinger vap...@gentoo.org --- board/bf518f-ezbrd/bf518f-ezbrd.c |7 --- board/bf526-ezbrd/bf526-ezbrd.c |7 --- board/bf527-ezkit/bf527-ezkit.c |7 --- board/bf533-ezkit/bf533-ezkit.c |7 --- board/bf533-stamp/bf533-stamp.c |7 --- board/bf537-minotaur/bf537-minotaur.c |7 --- board/bf537-pnav/bf537-pnav.c |7 --- board/bf537-srv1/bf537-srv1.c |7 --- board/bf537-stamp/bf537-stamp.c |7 --- board/bf538f-ezkit/bf538f-ezkit.c |7 --- board/bf548-ezkit/bf548-ezkit.c |7 --- board/bf561-acvilon/bf561-acvilon.c |7 --- board/bf561-ezkit/bf561-ezkit.c |7 --- board/blackstamp/blackstamp.c |7 --- board/cm-bf527/cm-bf527.c |7 --- board/cm-bf533/cm-bf533.c |7 --- board/cm-bf537e/cm-bf537e.c |7 --- board/cm-bf537u/cm-bf537u.c |7 --- board/cm-bf548/cm-bf548.c |7 --- board/cm-bf561/cm-bf561.c |7 --- board/ibf-dsp561/ibf-dsp561.c |7 --- board/tcm-bf537/tcm-bf537.c |7 --- lib_blackfin/board.c |4 +++- 23 files changed, 3 insertions(+), 155 deletions(-) diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index 63be7cf..279c55c 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -25,13 +25,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return gd-bd-bi_memsize; -} - #if defined(CONFIG_BFIN_MAC) static void board_init_enetaddr(uchar *mac_addr) { diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c index 1666bf6..52d82cd 100644 --- a/board/bf526-ezbrd/bf526-ezbrd.c +++ b/board/bf526-ezbrd/bf526-ezbrd.c @@ -24,13 +24,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return gd-bd-bi_memsize; -} - #ifdef CONFIG_BFIN_MAC static void board_init_enetaddr(uchar *mac_addr) { diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c index 2cbfa8d..a880066 100644 --- a/board/bf527-ezkit/bf527-ezkit.c +++ b/board/bf527-ezkit/bf527-ezkit.c @@ -24,13 +24,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return gd-bd-bi_memsize; -} - #ifdef CONFIG_BFIN_MAC static void board_init_enetaddr(uchar *mac_addr) { diff --git a/board/bf533-ezkit/bf533-ezkit.c b/board/bf533-ezkit/bf533-ezkit.c index 8727dee..b1aa7b7 100644 --- a/board/bf533-ezkit/bf533-ezkit.c +++ b/board/bf533-ezkit/bf533-ezkit.c @@ -39,13 +39,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return gd-bd-bi_memsize; -} - /* miscellaneous platform dependent initialisations */ int misc_init_r(void) { diff --git a/board/bf533-stamp/bf533-stamp.c b/board/bf533-stamp/bf533-stamp.c index a226910..7a63c52 100644 --- a/board/bf533-stamp/bf533-stamp.c +++ b/board/bf533-stamp/bf533-stamp.c @@ -39,13 +39,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return gd-bd-bi_memsize; -} - /* PF0 and PF1 are used to switch between the ethernet and flash: * PF0 PF1 * flash: 00 diff --git a/board/bf537-minotaur/bf537-minotaur.c b/board/bf537-minotaur/bf537-minotaur.c index 71b452a..920429c 100644 --- a/board/bf537-minotaur/bf537-minotaur.c +++ b/board/bf537-minotaur/bf537-minotaur.c @@ -23,13 +23,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return gd-bd-bi_memsize; -} - #ifdef CONFIG_BFIN_MAC static void board_init_enetaddr(uchar *mac_addr) { diff --git a/board/bf537-pnav/bf537-pnav.c b/board/bf537-pnav/bf537-pnav.c index 12cfefa..c512528 100644 --- a/board/bf537-pnav/bf537-pnav.c +++ b/board/bf537-pnav/bf537-pnav.c @@ -23,13 +23,6 @@ int checkboard(void) return 0; } -phys_size_t initdram(int board_type) -{ - gd-bd-bi_memstart = CONFIG_SYS_SDRAM_BASE; - gd-bd-bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; - return
[U-Boot] [PATCH 09/25] Blackfin: global_data.h: make pull in needed headers
We need the definition of bd_t in this header, so pull in asm/u-boot.h. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/asm-blackfin/global_data.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/asm-blackfin/global_data.h b/include/asm-blackfin/global_data.h index b78b04c..c7099e6 100644 --- a/include/asm-blackfin/global_data.h +++ b/include/asm-blackfin/global_data.h @@ -28,6 +28,8 @@ #ifndef__ASM_GBL_DATA_H #define __ASM_GBL_DATA_H +#include asm/u-boot.h + /* * The following data structure is placed in some memory wich is * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 11/25] Blackfin: support boards with no external memory
Signed-off-by: Mike Frysinger vap...@gentoo.org --- cpu/blackfin/initcode.c | 16 +++- cpu/blackfin/start.S |6 ++ include/asm-blackfin/config.h |9 +++-- lib_blackfin/board.c | 22 -- lib_blackfin/u-boot.lds.S | 21 ++--- 5 files changed, 54 insertions(+), 20 deletions(-) diff --git a/cpu/blackfin/initcode.c b/cpu/blackfin/initcode.c index 9b0cfbc..b99f70c 100644 --- a/cpu/blackfin/initcode.c +++ b/cpu/blackfin/initcode.c @@ -541,10 +541,18 @@ program_memory_controller(ADI_BOOT_DATA *bootstruct, bool put_into_srfs) * self-refresh. So we have to pull it out before programming. */ #ifdef EBIU_RSTCTL +# ifdef CONFIG_EBIU_RSTCTL_VAL bfin_write_EBIU_RSTCTL(bfin_read_EBIU_RSTCTL() | 0x1 /*DDRSRESET*/ | CONFIG_EBIU_RSTCTL_VAL); +# endif +# ifdef CONFIG_EBIU_DDRCTL0_VAL bfin_write_EBIU_DDRCTL0(CONFIG_EBIU_DDRCTL0_VAL); +# endif +# ifdef CONFIG_EBIU_DDRCTL1_VAL bfin_write_EBIU_DDRCTL1(CONFIG_EBIU_DDRCTL1_VAL); +# endif +# ifdef CONFIG_EBIU_DDRCTL2_VAL bfin_write_EBIU_DDRCTL2(CONFIG_EBIU_DDRCTL2_VAL); +# endif # ifdef CONFIG_EBIU_DDRCTL3_VAL /* default is disable, so don't need to force this */ bfin_write_EBIU_DDRCTL3(CONFIG_EBIU_DDRCTL3_VAL); @@ -614,11 +622,17 @@ program_async_controller(ADI_BOOT_DATA *bootstruct) serial_putc('b'); -#ifdef EBIU_MODE /* Not all parts have these additional MMRs. */ +#ifdef EBIU_MODE +# ifdef CONFIG_EBIU_MBSCTL_VAL bfin_write_EBIU_MBSCTL(CONFIG_EBIU_MBSCTL_VAL); +# endif +# ifdef CONFIG_EBIU_MODE_VAL bfin_write_EBIU_MODE(CONFIG_EBIU_MODE_VAL); +# endif +# ifdef CONFIG_EBIU_FCTL_VAL bfin_write_EBIU_FCTL(CONFIG_EBIU_FCTL_VAL); +# endif #endif serial_putc('c'); diff --git a/cpu/blackfin/start.S b/cpu/blackfin/start.S index 44e2725..7a3abba 100644 --- a/cpu/blackfin/start.S +++ b/cpu/blackfin/start.S @@ -95,6 +95,7 @@ ENTRY(_start) /* Save RETX so we can pass it while booting Linux */ r7 = RETX; +#if CONFIG_MEM_SIZE /* Figure out where we are currently executing so that we can decide * how to best reprogram and relocate things. We'll pass below: * R4: load address of _start @@ -131,6 +132,9 @@ ENTRY(_start) r3.h = 0x2000; cc = r5 r3 (iu); if cc jump .Ldma_and_reprogram; +#else + r6 = 1 (x); /* fake loaded_from_ldr = 1 */ +#endif r0 = 0 (x); /* set bootstruct to NULL */ call _initcode; jump .Lprogrammed; @@ -154,6 +158,7 @@ ENTRY(_start) .Lprogrammed: serial_early_set_baud +#if CONFIG_MEM_SIZE /* Relocate from wherever we are (FLASH/RAM/etc...) to the hardcoded * monitor location in the end of RAM. We know that memcpy() only * uses registers, so it is safe to call here. Note that this only @@ -166,6 +171,7 @@ ENTRY(_start) r2.l = LO(CONFIG_SYS_MONITOR_LEN); r2.h = HI(CONFIG_SYS_MONITOR_LEN); call _memcpy_ASM; +#endif /* Initialize BSS section ... we know that memset() does not * use the BSS, so it is safe to call here. The bootrom LDR diff --git a/include/asm-blackfin/config.h b/include/asm-blackfin/config.h index fbfd598..0ae838a 100644 --- a/include/asm-blackfin/config.h +++ b/include/asm-blackfin/config.h @@ -92,7 +92,11 @@ # define CONFIG_SYS_MAX_RAM_SIZE (CONFIG_MEM_SIZE * 1024 * 1024) #endif #ifndef CONFIG_SYS_MONITOR_BASE -# define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_MAX_RAM_SIZE - CONFIG_SYS_MONITOR_LEN) +# if CONFIG_SYS_MAX_RAM_SIZE +# define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_MAX_RAM_SIZE - CONFIG_SYS_MONITOR_LEN) +# else +# define CONFIG_SYS_MONITOR_BASE 0 +# endif #endif #ifndef CONFIG_SYS_MALLOC_BASE # define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN) @@ -114,7 +118,8 @@ #endif /* Check to make sure everything fits in external RAM */ -#if ((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_SYS_MAX_RAM_SIZE) +#if CONFIG_SYS_MAX_RAM_SIZE \ +((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_SYS_MAX_RAM_SIZE) # error Memory Map does not fit into configuration #endif diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index f6ff89b..b682beb 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -132,17 +132,19 @@ void init_cplbtables(void) dcplb_add(0xFF80, L1_DMEMORY); ++i; - icplb_add(CONFIG_SYS_MONITOR_BASE CPLB_PAGE_MASK, SDRAM_IKERNEL); - dcplb_add(CONFIG_SYS_MONITOR_BASE CPLB_PAGE_MASK, SDRAM_DKERNEL); - ++i; - - /* If the monitor crosses a 4 meg boundary, we'll need -* to lock two entries for it. -*/ - if ((CONFIG_SYS_MONITOR_BASE CPLB_PAGE_MASK) != ((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) CPLB_PAGE_MASK)) { - icplb_add((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
[U-Boot] [PATCH 12/25] Blackfin: bf527-ezkit: auto-select NAND settings
While we're here, let the Blackfin NAND driver auto-select CMD_NAND. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/configs/bf527-ezkit.h | 11 --- include/configs/bf548-ezkit.h |1 - include/configs/bfin_adi_common.h |2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h index 5f3cb83..c7322b8 100644 --- a/include/configs/bf527-ezkit.h +++ b/include/configs/bf527-ezkit.h @@ -61,7 +61,8 @@ * (can't be used same time as ethernet) */ #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND) -#define CONFIG_BFIN_NFC +# define CONFIG_BFIN_NFC +# define CONFIG_BFIN_NFC_BOOTROM_ECC #endif #ifdef CONFIG_BFIN_NFC #define CONFIG_BFIN_NFC_CTL_VAL0x0033 @@ -69,7 +70,6 @@ #define CONFIG_SYS_NAND_BASE 0 /* not actually used */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define NAND_MAX_CHIPS 1 -#define CONFIG_CMD_NAND #endif @@ -118,14 +118,19 @@ #define CONFIG_ENV_OFFSET 0x1 #define CONFIG_ENV_SIZE0x2000 #define CONFIG_ENV_SECT_SIZE 0x1 +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR +#elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND) +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_OFFSET 0x4 +#define CONFIG_ENV_SIZE0x2 #else #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_OFFSET 0x4000 #define CONFIG_ENV_ADDR(CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) #define CONFIG_ENV_SIZE0x2000 #define CONFIG_ENV_SECT_SIZE 0x2000 -#endif #define CONFIG_ENV_IS_EMBEDDED_IN_LDR +#endif /* diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h index d0a9e49..297c3fd 100644 --- a/include/configs/bf548-ezkit.h +++ b/include/configs/bf548-ezkit.h @@ -133,7 +133,6 @@ #define CONFIG_SYS_NAND_BASE 0 /* not actually used */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define NAND_MAX_CHIPS 1 -#define CONFIG_CMD_NAND /* diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 42f4cbc..db10ccc 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -45,7 +45,7 @@ # define CONFIG_CMD_USB_STORAGE # define CONFIG_DOS_PARTITION # endif -# ifdef CONFIG_NAND_PLAT +# if defined(CONFIG_NAND_PLAT) || defined(CONFIG_DRIVER_NAND_BFIN) # define CONFIG_CMD_NAND # endif # ifdef CONFIG_POST -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/25] Blackfin: re-architecture initcode
The single initcode function was growing unwieldy, so split it up the distinct steps into their own function. This should making digesting the result much easier on people. Signed-off-by: Mike Frysinger vap...@gentoo.org --- cpu/blackfin/initcode.c | 221 --- 1 files changed, 169 insertions(+), 52 deletions(-) diff --git a/cpu/blackfin/initcode.c b/cpu/blackfin/initcode.c index 90a5fc3..9b0cfbc 100644 --- a/cpu/blackfin/initcode.c +++ b/cpu/blackfin/initcode.c @@ -9,6 +9,8 @@ * Licensed under the GPL-2 or later. */ +#define BFIN_IN_INITCODE + #include config.h #include asm/blackfin.h #include asm/mach-common/bits/bootrom.h @@ -17,7 +19,6 @@ #include asm/mach-common/bits/pll.h #include asm/mach-common/bits/uart.h -#define BFIN_IN_INITCODE #include serial.h __attribute__((always_inline)) @@ -216,6 +217,7 @@ static inline void serial_putc(char c) # define CONFIG_HAS_VR 1 #endif +#if CONFIG_MEM_SIZE #ifndef EBIU_RSTCTL /* Blackfin with SDRAM */ #ifndef CONFIG_EBIU_SDBCTL_VAL @@ -248,6 +250,7 @@ static inline void serial_putc(char c) # define CONFIG_EBIU_SDBCTL_VAL (CONFIG_EBCAW_VAL | CONFIG_EBSZ_VAL | EBE) #endif #endif +#endif /* Conflicting Column Address Widths Causes SDRAM Errors: * EB2CAW and EB3CAW must be the same @@ -258,28 +261,21 @@ static inline void serial_putc(char c) # endif #endif -BOOTROM_CALLED_FUNC_ATTR -void initcode(ADI_BOOT_DATA *bootstruct) +__attribute__((always_inline)) static inline void +program_early_devices(ADI_BOOT_DATA *bootstruct, uint *sdivB, uint *divB, uint *vcoB) { - ADI_BOOT_DATA bootstruct_scratch; + serial_putc('a'); /* Save the clock pieces that are used in baud rate calculation */ - unsigned int sdivB, divB, vcoB; - serial_init(); if (BFIN_DEBUG_EARLY_SERIAL || CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART) { - sdivB = bfin_read_PLL_DIV() 0xf; - vcoB = (bfin_read_PLL_CTL() 9) 0x3f; - divB = serial_early_get_div(); + serial_putc('b'); + *sdivB = bfin_read_PLL_DIV() 0xf; + *vcoB = (bfin_read_PLL_CTL() 9) 0x3f; + *divB = serial_early_get_div(); + serial_putc('c'); } - serial_putc('A'); - - /* If the bootstruct is NULL, then it's because we're loading -* dynamically and not via LDR (bootrom). So set the struct to -* some scratch space. -*/ - if (!bootstruct) - bootstruct = bootstruct_scratch; + serial_putc('d'); #ifdef CONFIG_HW_WATCHDOG # ifndef CONFIG_HW_WATCHDOG_TIMEOUT_INITCODE @@ -292,41 +288,69 @@ void initcode(ADI_BOOT_DATA *bootstruct) * timeout, so don't clobber that. */ if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS) { + serial_putc('e'); bfin_write_WDOG_CNT(MSEC_TO_SCLK(CONFIG_HW_WATCHDOG_TIMEOUT_INITCODE)); bfin_write_WDOG_CTL(0); + serial_putc('f'); } #endif - serial_putc('B'); + serial_putc('g'); + + /* Blackfin bootroms use the SPI slow read opcode instead of the SPI +* fast read, so we need to slow down the SPI clock a lot more during +* boot. Once we switch over to u-boot's SPI flash driver, we'll +* increase the speed appropriately. +*/ + if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER) { + serial_putc('h'); + if (BOOTROM_SUPPORTS_SPI_FAST_READ CONFIG_SPI_BAUD_INITBLOCK 4) + bootstruct-dFlags |= BFLAG_FASTREAD; + bfin_write_SPI_BAUD(CONFIG_SPI_BAUD_INITBLOCK); + serial_putc('i'); + } + + serial_putc('j'); +} + +__attribute__((always_inline)) static inline bool +maybe_self_refresh(ADI_BOOT_DATA *bootstruct) +{ + serial_putc('a'); + + if (!CONFIG_MEM_SIZE) + return false; /* If external memory is enabled, put it into self refresh first. */ - bool put_into_srfs = false; #ifdef EBIU_RSTCTL if (bfin_read_EBIU_RSTCTL() DDR_SRESET) { + serial_putc('b'); bfin_write_EBIU_RSTCTL(bfin_read_EBIU_RSTCTL() | SRREQ); - put_into_srfs = true; + return true; } #else if (bfin_read_EBIU_SDBCTL() EBE) { + serial_putc('b'); bfin_write_EBIU_SDGCTL(bfin_read_EBIU_SDGCTL() | SRFS); - put_into_srfs = true; + return true; } #endif - serial_putc('C'); + serial_putc('c'); - /* Blackfin bootroms use the SPI slow read opcode instead of the SPI -* fast read, so we need to slow down the SPI clock a lot more during -* boot. Once we switch over to u-boot's SPI flash driver, we'll -* increase the speed appropriately. -*/ - if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER) { -
[U-Boot] [PATCH 14/25] Blackfin: move watchdog config check to Makefile
Signed-off-by: Mike Frysinger vap...@gentoo.org --- cpu/blackfin/Makefile |2 +- cpu/blackfin/watchdog.c |4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cpu/blackfin/Makefile b/cpu/blackfin/Makefile index 5eef6a3..211b8d5 100644 --- a/cpu/blackfin/Makefile +++ b/cpu/blackfin/Makefile @@ -24,7 +24,7 @@ COBJS-y += os_log.o COBJS-y += reset.o COBJS-y += serial.o COBJS-y += traps.o -COBJS-y += watchdog.o +COBJS-$(CONFIG_HW_WATCHDOG) += watchdog.o ifeq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) COBJS-y += initcode.o diff --git a/cpu/blackfin/watchdog.c b/cpu/blackfin/watchdog.c index b47c6b6..1886bda 100644 --- a/cpu/blackfin/watchdog.c +++ b/cpu/blackfin/watchdog.c @@ -1,7 +1,7 @@ /* * watchdog.c - driver for Blackfin on-chip watchdog * - * Copyright (c) 2007-2008 Analog Devices Inc. + * Copyright (c) 2007-2009 Analog Devices Inc. * * Licensed under the GPL-2 or later. */ @@ -10,7 +10,6 @@ #include watchdog.h #include asm/blackfin.h -#ifdef CONFIG_HW_WATCHDOG void hw_watchdog_reset(void) { bfin_write_WDOG_STAT(0); @@ -22,4 +21,3 @@ void hw_watchdog_init(void) hw_watchdog_reset(); bfin_write_WDOG_CTL(0x0); } -#endif -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 13/25] Blackfin: fix L1 Instruction sizes on BF52x/BF54x
Unify the duplicated macros at the same time. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/asm-blackfin/blackfin_local.h |2 ++ include/asm-blackfin/mach-bf527/BF522_def.h | 15 --- include/asm-blackfin/mach-bf527/BF523_def.h | 15 --- include/asm-blackfin/mach-bf527/BF524_def.h | 15 --- include/asm-blackfin/mach-bf527/BF525_def.h | 15 --- include/asm-blackfin/mach-bf527/BF526_def.h | 15 --- include/asm-blackfin/mach-bf527/BF527_def.h | 15 --- include/asm-blackfin/mach-bf527/def_local.h |1 + include/asm-blackfin/mach-bf527/mem_map.h | 21 + include/asm-blackfin/mach-bf548/BF542_def.h | 15 --- include/asm-blackfin/mach-bf548/BF544_def.h | 15 --- include/asm-blackfin/mach-bf548/BF547_def.h |9 - include/asm-blackfin/mach-bf548/BF548_def.h | 15 --- include/asm-blackfin/mach-bf548/BF549_def.h | 15 --- include/asm-blackfin/mach-bf548/def_local.h |1 + include/asm-blackfin/mach-bf548/mem_map.h | 21 + include/asm-blackfin/mem_map.h | 26 ++ 17 files changed, 72 insertions(+), 159 deletions(-) create mode 100644 include/asm-blackfin/mach-bf527/mem_map.h create mode 100644 include/asm-blackfin/mach-bf548/mem_map.h create mode 100644 include/asm-blackfin/mem_map.h diff --git a/include/asm-blackfin/blackfin_local.h b/include/asm-blackfin/blackfin_local.h index 8ec7928..308014a 100644 --- a/include/asm-blackfin/blackfin_local.h +++ b/include/asm-blackfin/blackfin_local.h @@ -25,6 +25,8 @@ #ifndef __BLACKFIN_LOCAL_H__ #define __BLACKFIN_LOCAL_H__ +#include asm/mem_map.h + #define LO(con32) ((con32) 0x) #define lo(con32) ((con32) 0x) #define HI(con32) (((con32) 16) 0x) diff --git a/include/asm-blackfin/mach-bf527/BF522_def.h b/include/asm-blackfin/mach-bf527/BF522_def.h index 44143ba..bc05029 100644 --- a/include/asm-blackfin/mach-bf527/BF522_def.h +++ b/include/asm-blackfin/mach-bf527/BF522_def.h @@ -119,20 +119,5 @@ #define TPERIOD0xFFE03004 /* Core Timer Period Register */ #define TSCALE 0xFFE03008 /* Core Timer Scale Register */ #define TCOUNT 0xFFE0300C /* Core Timer Count Register */ -#define L1_DATA_A_SRAM 0xFF80 /* 0xFF80 - 0xFF803FFF Data Bank A SRAM */ -#define L1_DATA_A_SRAM_SIZE (0xFF803FFF - 0xFF80 + 1) -#define L1_DATA_A_SRAM_END (L1_DATA_A_SRAM + L1_DATA_A_SRAM_SIZE) -#define L1_DATA_B_SRAM 0xFF90 /* 0xFF90 - 0xFF903FFF Data Bank B SRAM */ -#define L1_DATA_B_SRAM_SIZE (0xFF903FFF - 0xFF90 + 1) -#define L1_DATA_B_SRAM_END (L1_DATA_B_SRAM + L1_DATA_B_SRAM_SIZE) -#define L1_INST_SRAM 0xFFA0 /* 0xFFA0 - 0xFFA07FFF Instruction Bank A SRAM */ -#define L1_INST_SRAM_SIZE (0xFFA07FFF - 0xFFA0 + 1) -#define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE) -#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 - 0xFFB00FFF Scratchpad SRAM */ -#define L1_SRAM_SCRATCH_SIZE (0xFFB00FFF - 0xFFB0 + 1) -#define L1_SRAM_SCRATCH_END (L1_SRAM_SCRATCH + L1_SRAM_SCRATCH_SIZE) -#define SYSMMR_BASE 0xFFC0 /* 0xFFC0 - 0x MMR registers */ -#define SYSMMR_BASE_SIZE (0x - 0xFFC0 + 1) -#define SYSMMR_BASE_END (SYSMMR_BASE + SYSMMR_BASE_SIZE) #endif /* __BFIN_DEF_ADSP_BF522_proc__ */ diff --git a/include/asm-blackfin/mach-bf527/BF523_def.h b/include/asm-blackfin/mach-bf527/BF523_def.h index 02675a9..c27fd64 100644 --- a/include/asm-blackfin/mach-bf527/BF523_def.h +++ b/include/asm-blackfin/mach-bf527/BF523_def.h @@ -119,20 +119,5 @@ #define TPERIOD0xFFE03004 /* Core Timer Period Register */ #define TSCALE 0xFFE03008 /* Core Timer Scale Register */ #define TCOUNT 0xFFE0300C /* Core Timer Count Register */ -#define L1_DATA_A_SRAM 0xFF80 /* 0xFF80 - 0xFF803FFF Data Bank A SRAM */ -#define L1_DATA_A_SRAM_SIZE (0xFF803FFF - 0xFF80 + 1) -#define L1_DATA_A_SRAM_END (L1_DATA_A_SRAM + L1_DATA_A_SRAM_SIZE) -#define L1_DATA_B_SRAM 0xFF90 /* 0xFF90 - 0xFF903FFF Data Bank B SRAM */ -#define L1_DATA_B_SRAM_SIZE (0xFF903FFF - 0xFF90 + 1) -#define L1_DATA_B_SRAM_END (L1_DATA_B_SRAM + L1_DATA_B_SRAM_SIZE) -#define L1_INST_SRAM 0xFFA0 /* 0xFFA0 - 0xFFA07FFF Instruction Bank A SRAM */ -#define L1_INST_SRAM_SIZE (0xFFA07FFF - 0xFFA0 + 1) -#define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE) -#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 - 0xFFB00FFF Scratchpad SRAM */ -#define L1_SRAM_SCRATCH_SIZE (0xFFB00FFF - 0xFFB0 + 1) -#define L1_SRAM_SCRATCH_END (L1_SRAM_SCRATCH + L1_SRAM_SCRATCH_SIZE) -#define SYSMMR_BASE 0xFFC0 /* 0xFFC0 - 0x MMR registers */ -#define SYSMMR_BASE_SIZE (0x - 0xFFC0 + 1) -#define SYSMMR_BASE_END (SYSMMR_BASE +
[U-Boot] [PATCH 17/25] Blackfin: bfin_spi: let boards control idle value
From: Cliff Cai cliff@analog.com Some SPI devices like to see high idle values rather than low. Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/spi/bfin_spi.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c index 2a72f99..093166e 100644 --- a/drivers/spi/bfin_spi.c +++ b/drivers/spi/bfin_spi.c @@ -314,6 +314,10 @@ void spi_release_bus(struct spi_slave *slave) SSYNC(); } +#ifndef CONFIG_BFIN_SPI_IDLE_VAL +# define CONFIG_BFIN_SPI_IDLE_VAL 0xff +#endif + int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { @@ -340,7 +344,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, /* todo: take advantage of hardware fifos and setup RX dma */ while (bytes--) { - u8 value = (tx ? *tx++ : 0); + u8 value = (tx ? *tx++ : CONFIG_BFIN_SPI_IDLE_VAL); debug(%s: tx:%x , __func__, value); write_SPI_TDBR(bss, value); SSYNC(); -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 15/25] Blackfin: use new bfin read/write mmr helper funcs
Signed-off-by: Mike Frysinger vap...@gentoo.org --- cpu/blackfin/initcode.c | 10 ++-- cpu/blackfin/interrupts.c | 12 ++-- cpu/blackfin/serial.c | 20 ++--- cpu/blackfin/serial.h | 119 +--- include/asm-blackfin/blackfin_local.h |2 +- 5 files changed, 83 insertions(+), 80 deletions(-) diff --git a/cpu/blackfin/initcode.c b/cpu/blackfin/initcode.c index b99f70c..a97664c 100644 --- a/cpu/blackfin/initcode.c +++ b/cpu/blackfin/initcode.c @@ -34,7 +34,7 @@ static inline void serial_init(void) size_t i; /* force RTS rather than relying on auto RTS */ - bfin_write_UART1_MCR(bfin_read_UART1_MCR() | FCPOL); + bfin_write16(pUART-mcr, bfin_read16(pUART-mcr) | FCPOL); /* Wait for the line to clear up. We cannot rely on UART * registers as none of them reflect the status of the RSR. @@ -64,7 +64,7 @@ static inline void serial_init(void) #endif if (BFIN_DEBUG_EARLY_SERIAL) { - int ucen = *pUART_GCTL UCEN; + int ucen = bfin_read16(pUART-gctl) UCEN; serial_early_init(); #ifndef CONFIG_BAUDRATE @@ -84,7 +84,7 @@ static inline void serial_deinit(void) #ifdef __ADSPBF54x__ if (BFIN_UART_USE_RTS CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART) { /* clear forced RTS rather than relying on auto RTS */ - bfin_write_UART1_MCR(bfin_read_UART1_MCR() ~FCPOL); + bfin_write16(pUART-mcr, bfin_read16(pUART-mcr) ~FCPOL); } #endif } @@ -98,9 +98,9 @@ static inline void serial_putc(char c) if (c == '\n') serial_putc('\r'); - *pUART_THR = c; + bfin_write16(pUART-thr, c); - while (!(*pUART_LSR TEMT)) + while (!(bfin_read16(pUART-lsr) TEMT)) continue; } diff --git a/cpu/blackfin/interrupts.c b/cpu/blackfin/interrupts.c index 921bfe0..54a67b4 100644 --- a/cpu/blackfin/interrupts.c +++ b/cpu/blackfin/interrupts.c @@ -97,12 +97,12 @@ void __udelay(unsigned long usec) #define MAX_TIM_LOAD 0x int timer_init(void) { - *pTCNTL = 0x1; + bfin_write_TCNTL(0x1); CSYNC(); - *pTSCALE = 0x0; - *pTCOUNT = MAX_TIM_LOAD; - *pTPERIOD = MAX_TIM_LOAD; - *pTCNTL = 0x7; + bfin_write_TSCALE(0x0); + bfin_write_TCOUNT(MAX_TIM_LOAD); + bfin_write_TPERIOD(MAX_TIM_LOAD); + bfin_write_TCNTL(0x7); CSYNC(); timestamp = 0; @@ -130,7 +130,7 @@ ulong get_timer(ulong base) ulong milisec; /* Number of clocks elapsed */ - ulong clocks = (MAX_TIM_LOAD - (*pTCOUNT)); + ulong clocks = (MAX_TIM_LOAD - bfin_read_TCOUNT()); /* * Find if the TCOUNT is reset diff --git a/cpu/blackfin/serial.c b/cpu/blackfin/serial.c index 2abda18..db12a5a 100644 --- a/cpu/blackfin/serial.c +++ b/cpu/blackfin/serial.c @@ -44,10 +44,6 @@ #ifdef CONFIG_UART_CONSOLE -#if defined(UART_LSR) (CONFIG_UART_CONSOLE != 0) -# error CONFIG_UART_CONSOLE must be 0 on parts with only one UART -#endif - #include serial.h #ifdef CONFIG_DEBUG_SERIAL @@ -63,7 +59,7 @@ size_t cache_count; static uint16_t uart_lsr_save; static uint16_t uart_lsr_read(void) { - uint16_t lsr = *pUART_LSR; + uint16_t lsr = bfin_read16(pUART-lsr); uart_lsr_save |= (lsr (OE|PE|FE|BI)); return lsr | uart_lsr_save; } @@ -71,15 +67,15 @@ static uint16_t uart_lsr_read(void) static void uart_lsr_clear(void) { uart_lsr_save = 0; - *pUART_LSR |= -1; + bfin_write16(pUART-lsr, bfin_read16(pUART-lsr) | -1); } #else /* When debugging is disabled, we only care about the DR bit, so if other * bits get set/cleared, we don't really care since we don't read them * anyways (and thus anomaly 0599 is irrelevant). */ -static inline uint16_t uart_lsr_read(void) { return *pUART_LSR; } -static inline void uart_lsr_clear(void) { *pUART_LSR = -1; } +static uint16_t uart_lsr_read(void) { return bfin_read16(pUART-lsr); } +static void uart_lsr_clear(void) { bfin_write16(pUART-lsr, bfin_read16(pUART-lsr) | -1); } #endif /* Symbol for our assembly to call. */ @@ -130,7 +126,7 @@ void serial_putc(const char c) continue; /* queue the character for transmission */ - *pUART_THR = c; + bfin_write16(pUART-thr, c); SSYNC(); WATCHDOG_RESET(); @@ -151,7 +147,7 @@ int serial_getc(void) continue; /* grab the new byte */ - uart_rbr_val = *pUART_RBR; + uart_rbr_val = bfin_read16(pUART-rbr); #ifdef CONFIG_DEBUG_SERIAL /* grab clear the LSR */ @@ -165,8 +161,8 @@ int serial_getc(void) uint16_t dll, dlh; printf(\n[SERIAL ERROR]\n); ACCESS_LATCH(); - dll = *pUART_DLL; - dlh = *pUART_DLH; +
[U-Boot] [PATCH 16/25] Blackfin: asm/string.h: drop useless includes
Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/asm-blackfin/string.h |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h index 18306dd..117f44c 100644 --- a/include/asm-blackfin/string.h +++ b/include/asm-blackfin/string.h @@ -29,9 +29,6 @@ #ifdef __KERNEL__ /* only set these up for kernel code */ -#include config.h -#include asm/blackfin.h - #define __HAVE_ARCH_STRCPY #define __HAVE_ARCH_STRNCPY #define __HAVE_ARCH_STRCMP @@ -47,7 +44,7 @@ extern int strcmp(const char *cs, const char *ct); extern int strncmp(const char *cs, const char *ct, size_t count); extern void *memcpy(void *dest, const void *src, size_t count); extern void *memset(void *s, int c, size_t count); -extern int memcmp(const void *, const void *, __kernel_size_t); +extern int memcmp(const void *, const void *, size_t); extern void *memmove(void *dest, const void *src, size_t count); #else /* KERNEL */ -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 18/25] Blackfin: convert bfin_sdh to generic mmc
From: Cliff Cai cliff@analog.com Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org CC: Andy Fleming aflem...@freescale.com --- board/bf518f-ezbrd/bf518f-ezbrd.c |8 + board/bf548-ezkit/bf548-ezkit.c |8 + drivers/mmc/bfin_sdh.c| 519 + drivers/mmc/bfin_sdh.h| 59 - include/asm-blackfin/mmc.h|1 - include/asm-blackfin/sdh.h| 17 ++ include/configs/bf518f-ezbrd.h|1 + include/configs/bf548-ezkit.h |1 + lib_blackfin/board.c |6 + 9 files changed, 161 insertions(+), 459 deletions(-) delete mode 100644 drivers/mmc/bfin_sdh.h delete mode 100644 include/asm-blackfin/mmc.h create mode 100644 include/asm-blackfin/sdh.h diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index 279c55c..85b350f 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -15,6 +15,7 @@ #include asm/blackfin.h #include asm/net.h #include asm/mach-common/bits/otp.h +#include asm/sdh.h DECLARE_GLOBAL_DATA_PTR; @@ -155,3 +156,10 @@ int board_early_init_f(void) #endif return 0; } + +#ifdef CONFIG_BFIN_SDH +int board_mmc_init(bd_t *bis) +{ + return bfin_mmc_init(bis); +} +#endif diff --git a/board/bf548-ezkit/bf548-ezkit.c b/board/bf548-ezkit/bf548-ezkit.c index 29c2e92..7659e34 100644 --- a/board/bf548-ezkit/bf548-ezkit.c +++ b/board/bf548-ezkit/bf548-ezkit.c @@ -11,6 +11,7 @@ #include config.h #include command.h #include asm/blackfin.h +#include asm/sdh.h DECLARE_GLOBAL_DATA_PTR; @@ -78,3 +79,10 @@ int board_eth_init(bd_t *bis) return smc911x_initialize(0, CONFIG_SMC911X_BASE); } #endif + +#ifdef CONFIG_BFIN_SDH +int board_mmc_init(bd_t *bis) +{ + return bfin_mmc_init(bis); +} +#endif diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c index 16c9695..f9d560a 100644 --- a/drivers/mmc/bfin_sdh.c +++ b/drivers/mmc/bfin_sdh.c @@ -1,7 +1,7 @@ /* * Driver for Blackfin on-chip SDH controller * - * Copyright (c) 2008 Analog Devices Inc. + * Copyright (c) 2008-2009 Analog Devices Inc. * * Licensed under the GPL-2 or later. */ @@ -18,20 +18,6 @@ #include asm/mach-common/bits/sdh.h #include asm/mach-common/bits/dma.h -#include bfin_sdh.h - -/* SD_CLK frequency must be less than 400k in identification mode */ -#ifndef CONFIG_SYS_MMC_CLK_ID -#define CONFIG_SYS_MMC_CLK_ID 20 -#endif -/* SD_CLK for normal working */ -#ifndef CONFIG_SYS_MMC_CLK_OP -#define CONFIG_SYS_MMC_CLK_OP 2500 -#endif -/* support 3.2-3.3V and 3.3-3.4V */ -#define CONFIG_SYS_MMC_OP_COND 0x0030 -#define MMC_DEFAULT_RCA1 - #if defined(__ADSPBF51x__) # define bfin_read_SDH_PWR_CTL bfin_read_RSI_PWR_CONTROL # define bfin_write_SDH_PWR_CTLbfin_write_RSI_PWR_CONTROL @@ -64,61 +50,17 @@ # error no support for this proc yet #endif -static unsigned int mmc_rca; -static int mmc_card_is_sd; -static block_dev_desc_t mmc_blkdev; -struct mmc_cid cid; -static __u32 csd[4]; - -#define get_bits(resp, start, size)\ - ({ \ - const int __size = size;\ - const uint32_t __mask = (__size 32 ? 1 __size : 0) - 1; \ - const int32_t __off = 3 - ((start) / 32); \ - const int32_t __shft = (start) 31;\ - uint32_t __res; \ - \ - __res = resp[__off] __shft; \ - if (__size + __shft 32) \ - __res |= resp[__off-1] ((32 - __shft) % 32); \ - __res __mask; \ - }) - - -block_dev_desc_t *mmc_get_dev(int dev) -{ - return mmc_blkdev; -} - -static void mci_set_clk(unsigned long clk) -{ - unsigned long sys_clk; - unsigned long clk_div; - __u16 clk_ctl = 0; - - /* setting SD_CLK */ - sys_clk = get_sclk(); - bfin_write_SDH_CLK_CTL(0); - if (sys_clk % (2 * clk) == 0) - clk_div = sys_clk / (2 * clk) - 1; - else - clk_div = sys_clk / (2 * clk); - - if (clk_div 0xff) - clk_div = 0xff; - clk_ctl |= (clk_div 0xff); - clk_ctl |= CLK_E; - bfin_write_SDH_CLK_CTL(clk_ctl); -} - static int -mmc_cmd(unsigned long cmd, unsigned long arg, void *resp, unsigned long flags) +sdh_send_cmd(struct mmc *mmc, struct mmc_cmd *mmc_cmd) { unsigned int sdh_cmd; unsigned int status; + int cmd = mmc_cmd-cmdidx; + int flags = mmc_cmd-resp_type; + int arg = mmc_cmd-cmdarg;
[U-Boot] [PATCH 20/25] Blackfin: drop unused funcs from io.h
Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/asm-blackfin/io.h | 38 -- 1 files changed, 0 insertions(+), 38 deletions(-) diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 6806494..354fb7d 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h @@ -147,43 +147,5 @@ static inline unsigned int readl(const volatile void *addr) #define outsw(port, addr, count) cf_outsw((unsigned short *)(port), (unsigned short *)addr, (count)) -#define IO_SPACE_LIMIT 0x - -/* Values for nocacheflag and cmode */ -#define IOMAP_FULL_CACHING 0 -#define IOMAP_NOCACHE_SER 1 -#define IOMAP_NOCACHE_NONSER 2 -#define IOMAP_WRITETHROUGH 3 - -extern void *__ioremap(unsigned long physaddr, unsigned long size, - int cacheflag); -extern void __iounmap(void *addr, unsigned long size); - -extern inline void *ioremap(unsigned long physaddr, unsigned long size) -{ - return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); -} -extern inline void *ioremap_nocache(unsigned long physaddr, unsigned long size) -{ - return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); -} -extern inline void *ioremap_writethrough(unsigned long physaddr, -unsigned long size) -{ - return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); -} -extern inline void *ioremap_fullcache(unsigned long physaddr, - unsigned long size) -{ - return __ioremap(physaddr, size, IOMAP_FULL_CACHING); -} - -extern void iounmap(void *addr); - -extern void blkfin_inv_cache_all(void); -#define dma_cache_inv(_start, _size) do { blkfin_inv_cache_all(); } while (0) -#define dma_cache_wback(_start, _size) do { } while (0) -#define dma_cache_wback_inv(_start, _size) do { blkfin_inv_cache_all(); } while (0) - #endif #endif -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 21/25] Blackfin: section off the CF/IDE io.h hacks
These need to be rethought, but until that happens, isolate the hack so that we can extend the common code without breaking things. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/asm-blackfin/io.h | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 354fb7d..898d674 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h @@ -34,12 +34,6 @@ static inline void sync(void) SSYNC(); } -/* function prototypes for CF support */ -extern void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words); -extern void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words); -extern unsigned char cf_inb(volatile unsigned char *addr); -extern void cf_outb(unsigned char val, volatile unsigned char *addr); - /* * Given a physical address and a length, return a virtual address * that can be used to access the memory range with the caching @@ -140,12 +134,21 @@ static inline unsigned int readl(const volatile void *addr) #define memcpy_fromio(a, b, c) memcpy((a), (void *)(b), (c)) #define memcpy_toio(a, b, c) memcpy((void *)(a), (b), (c)) -#define inb(addr) cf_inb((volatile unsigned char *)(addr)) -#define outb(x, addr) cf_outb((unsigned char)(x), (volatile unsigned char *)(addr)) - -#define insw(port, addr, count)cf_insw((unsigned short *)addr, (unsigned short *)(port), (count)) - -#define outsw(port, addr, count) cf_outsw((unsigned short *)(port), (unsigned short *)addr, (count)) +#if defined(CONFIG_STAMP_CF) || defined(CONFIG_BFIN_IDE) +/* This hack for CF/IDE needs to be addressed at some point */ +extern void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words); +extern void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words); +extern unsigned char cf_inb(volatile unsigned char *addr); +extern void cf_outb(unsigned char val, volatile unsigned char *addr); +#undef inb +#undef outb +#undef insw +#undef outsw +#define inb(addr) cf_inb((volatile unsigned char *)(addr)) +#define outb(x, addr) cf_outb((unsigned char)(x), (volatile unsigned char *)(addr)) +#define insw(port, addr, count) cf_insw((unsigned short *)(addr), (unsigned short *)(port), (count)) +#define outsw(port, addr, count) cf_outsw((unsigned short *)(port), (unsigned short *)(addr), (count)) +#endif #endif #endif -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 22/25] Blackfin: pull io funcs from linux
Some common code uses more of the io.h funcs than we currently provide, so pull in all of the ones from the linux kernel. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/asm-blackfin/config-pre.h |3 + include/asm-blackfin/io.h | 159 +++-- lib_blackfin/Makefile |2 + lib_blackfin/ins.S| 117 +++ lib_blackfin/outs.S | 60 ++ 5 files changed, 298 insertions(+), 43 deletions(-) create mode 100644 lib_blackfin/ins.S create mode 100644 lib_blackfin/outs.S diff --git a/include/asm-blackfin/config-pre.h b/include/asm-blackfin/config-pre.h index b1d3a94..eee3aa6 100644 --- a/include/asm-blackfin/config-pre.h +++ b/include/asm-blackfin/config-pre.h @@ -71,4 +71,7 @@ static inline const char *get_bfin_boot_mode(int bfin_boot) # define BFIN_BOOT_SPI_SSEL 1 #endif +/* We are single threaded most of the time */ +#define CONFIG_BFIN_INS_LOWOVERHEAD + #endif diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 898d674..8febce9 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h @@ -1,25 +1,9 @@ /* * U-boot - io.h IO routines * - * Copyright (c) 2005-2007 Analog Devices Inc. + * Copyright 2004-2009 Analog Devices 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., 51 Franklin St, Fifth Floor, Boston, - * MA 02110-1301 USA + * Licensed under the GPL-2 or later. */ #ifndef _BLACKFIN_IO_H @@ -29,6 +13,8 @@ #include asm/blackfin.h +#define __iomem + static inline void sync(void) { SSYNC(); @@ -70,70 +56,154 @@ static inline phys_addr_t virt_to_phys(void * vaddr) * * readX/writeX() are used to access memory mapped devices. On some * architectures the memory mapped IO stuff needs to be accessed - * differently. On the m68k architecture, we just read/write the + * differently. On the bfin architecture, we just read/write the * memory location directly. */ - #ifndef __ASSEMBLY__ -static inline unsigned char readb(const volatile void *addr) +static inline unsigned char readb(const volatile void __iomem *addr) { unsigned int val; int tmp; - __asm__ __volatile__ (cli %1;\n\t - NOP; NOP; SSYNC;\n\t - %0 = b [%2] (z);\n\t - sti %1;\n\t - : =d(val), =d(tmp): a(addr)); + __asm__ __volatile__ ( + cli %1; + NOP; NOP; SSYNC; + %0 = b [%2] (z); + sti %1; + : =d(val), =d(tmp) + : a(addr) + ); return (unsigned char) val; } -static inline unsigned short readw(const volatile void *addr) +static inline unsigned short readw(const volatile void __iomem *addr) { unsigned int val; int tmp; - __asm__ __volatile__ (cli %1;\n\t - NOP; NOP; SSYNC;\n\t - %0 = w [%2] (z);\n\t - sti %1;\n\t - : =d(val), =d(tmp): a(addr)); + __asm__ __volatile__ ( + cli %1; + NOP; NOP; SSYNC; + %0 = w [%2] (z); + sti %1; + : =d(val), =d(tmp) + : a(addr) + ); return (unsigned short) val; } -static inline unsigned int readl(const volatile void *addr) +static inline unsigned int readl(const volatile void __iomem *addr) { unsigned int val; int tmp; - __asm__ __volatile__ (cli %1;\n\t - NOP; NOP; SSYNC;\n\t - %0 = [%2];\n\t - sti %1;\n\t - : =d(val), =d(tmp): a(addr)); + __asm__ __volatile__ ( + cli %1; + NOP; NOP; SSYNC; + %0 = [%2]; + sti %1; + : =d(val), =d(tmp) + : a(addr) + ); + return val; } -#define __raw_readb readb -#define __raw_readw readw -#define __raw_readl readl - #endif /* __ASSEMBLY__ */ #define writeb(b, addr) (void)((*(volatile unsigned char *) (addr)) = (b)) #define writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = (b)) #define writel(b, addr) (void)((*(volatile
[U-Boot] [PATCH 23/25] Blackfin: bfin_spi: round up clock divider
From: Cliff Cai cliff@analog.com If the requested clock cannot be exactly obtained, round it up so that we err on the side of slightly slower rather than slightly faster. Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/spi/bfin_spi.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c index 093166e..f28d42b 100644 --- a/drivers/spi/bfin_spi.c +++ b/drivers/spi/bfin_spi.c @@ -85,6 +85,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, unsigned int max_hz, unsigned int mode) { struct bfin_spi_slave *bss; + ulong sclk; u32 mmr_base; u32 baud; @@ -105,7 +106,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, default: return NULL; } - baud = get_sclk() / (2 * max_hz); + sclk = get_sclk(); + baud = sclk / (2 * max_hz); + /* baud should be rounded up */ + if (sclk % (2 * max_hz)) + baud += 1; if (baud 2) baud = 2; else if (baud (u16)-1) -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 19/25] Blackfin: bf533-stamp: split and cleanup CF/IDE code
Give the CF/IDE code its own file to keep things cleanly separated. While we're here, clean up the code to use common functions. Signed-off-by: Mike Frysinger vap...@gentoo.org --- board/bf533-stamp/Makefile |1 + board/bf533-stamp/bf533-stamp.c | 113 +- board/bf533-stamp/ide-cf.c | 90 +++ 3 files changed, 94 insertions(+), 110 deletions(-) create mode 100644 board/bf533-stamp/ide-cf.c diff --git a/board/bf533-stamp/Makefile b/board/bf533-stamp/Makefile index dbba12b..832037b 100644 --- a/board/bf533-stamp/Makefile +++ b/board/bf533-stamp/Makefile @@ -30,6 +30,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a COBJS-y:= $(BOARD).o +COBJS-$(CONFIG_STAMP_CF) += ide-cf.o COBJS-$(CONFIG_VIDEO) += video.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) diff --git a/board/bf533-stamp/bf533-stamp.c b/board/bf533-stamp/bf533-stamp.c index 7a63c52..4abad08 100644 --- a/board/bf533-stamp/bf533-stamp.c +++ b/board/bf533-stamp/bf533-stamp.c @@ -62,118 +62,11 @@ void swap_to(int device_id) /* miscellaneous platform dependent initialisations */ int misc_init_r(void) { - int i; - int cf_stat = 0; - - /* Check whether CF card is inserted */ - *pFIO_EDGE = FIO_EDGE_CF_BITS; - *pFIO_POLAR = FIO_POLAR_CF_BITS; - for (i = 0; i 0x300; i++) - asm(nop;); - - if ((*pFIO_FLAG_S) CF_STAT_BITS) { - cf_stat = 0; - } else { - cf_stat = 1; - } - - *pFIO_EDGE = FIO_EDGE_BITS; - *pFIO_POLAR = FIO_POLAR_BITS; - - if (cf_stat) { - printf(Booting from COMPACT flash\n); - - for (i = 0; i 0x1000; i++) - asm(nop;); - for (i = 0; i 0x1000; i++) - asm(nop;); - for (i = 0; i 0x1000; i++) - asm(nop;); - - serial_setbrg(); - ide_init(); - - setenv(bootargs, ); - setenv(bootcmd, - fatload ide 0:1 0x100 uImage-stamp;bootm 0x100;bootm 0x2010); - } else { - printf(Booting from FLASH\n); - } - - return 0; -} -#endif - #ifdef CONFIG_STAMP_CF + cf_ide_init(); +#endif -void cf_outb(unsigned char val, volatile unsigned char *addr) -{ - /* -* Set PF1 PF0 respectively to 0 1 to divert address -* to the expansion memory banks -*/ - *pFIO_FLAG_S = CF_PF0; - *pFIO_FLAG_C = CF_PF1; - SSYNC(); - - *(addr) = val; - SSYNC(); - - /* Setback PF1 PF0 to 0 0 to address external -* memory banks */ - *(volatile unsigned short *)pFIO_FLAG_C = CF_PF1_PF0; - SSYNC(); -} - -unsigned char cf_inb(volatile unsigned char *addr) -{ - volatile unsigned char c; - - *pFIO_FLAG_S = CF_PF0; - *pFIO_FLAG_C = CF_PF1; - SSYNC(); - - c = *(addr); - SSYNC(); - - *pFIO_FLAG_C = CF_PF1_PF0; - SSYNC(); - - return c; -} - -void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words) -{ - int i; - - *pFIO_FLAG_S = CF_PF0; - *pFIO_FLAG_C = CF_PF1; - SSYNC(); - - for (i = 0; i words; i++) { - *(sect_buf + i) = *(addr); - SSYNC(); - } - - *pFIO_FLAG_C = CF_PF1_PF0; - SSYNC(); -} - -void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words) -{ - int i; - - *pFIO_FLAG_S = CF_PF0; - *pFIO_FLAG_C = CF_PF1; - SSYNC(); - - for (i = 0; i words; i++) { - *(addr) = *(sect_buf + i); - SSYNC(); - } - - *pFIO_FLAG_C = CF_PF1_PF0; - SSYNC(); + return 0; } #endif diff --git a/board/bf533-stamp/ide-cf.c b/board/bf533-stamp/ide-cf.c new file mode 100644 index 000..23e786b --- /dev/null +++ b/board/bf533-stamp/ide-cf.c @@ -0,0 +1,90 @@ +/* + * CF IDE addon card code + * + * Enter bugs at http://blackfin.uclinux.org/ + * + * Copyright (c) 2005-2009 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#include common.h +#include config.h +#include asm/blackfin.h +#include bf533-stamp.h + +void cf_outb(unsigned char val, volatile unsigned char *addr) +{ + /* ETHERNET means the expansion memory banks */ + swap_to(ETHERNET); + + *addr = val; + SSYNC(); + + swap_to(FLASH); +} + +unsigned char cf_inb(volatile unsigned char *addr) +{ + unsigned char c; + + swap_to(ETHERNET); + + c = *addr; + SSYNC(); + + swap_to(FLASH); + + return c; +} + +void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words) +{ + int i; + + swap_to(ETHERNET); + + for (i = 0; i words; i++) { + *(sect_buf + i) = *addr; + SSYNC(); + } + + swap_to(FLASH); +} + +void cf_outsw(unsigned short *addr,
[U-Boot] [PATCH 25/25] Blackfin: add support for BF527-EZKIT v2.1
From: Michael Hennerich michael.henner...@analog.com The new board revision has a different LCD. Signed-off-by: Michael Hennerich michael.henner...@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- i've removed include/asm-blackfin/bfin_logo_rgb565_230x230.h from the diffstat since it's so big (120kb) and it's generated output from easylogo and the Blackfin .tga. MAINTAINERS |1 + MAKEALL |1 + Makefile|5 +- board/bf527-ezkit/video.c | 144 +++- include/asm-blackfin/bfin_logo_rgb565_230x230.h | 1242 +++ include/configs/bf527-ezkit.h |9 + 6 files changed, 1389 insertions(+), 13 deletions(-) create mode 100644 include/asm-blackfin/bfin_logo_rgb565_230x230.h diff --git a/MAINTAINERS b/MAINTAINERS index 2ef158d..ce1845c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -942,6 +942,7 @@ Blackfin Team u-boot-de...@blackfin.uclinux.org BF518F-EZBRDBF518 BF526-EZBRD BF526 BF527-EZKIT BF527 + BF527-EZKIT-V2 BF527 BF533-EZKIT BF533 BF533-STAMP BF533 BF537-PNAV BF537 diff --git a/MAKEALL b/MAKEALL index acb35d2..c4577ff 100755 --- a/MAKEALL +++ b/MAKEALL @@ -869,6 +869,7 @@ LIST_blackfin= \ bf518f-ezbrd\ bf526-ezbrd \ bf527-ezkit \ + bf527-ezkit-v2 \ bf533-ezkit \ bf533-stamp \ bf537-minotaur \ diff --git a/Makefile b/Makefile index 9ce0ecf..4e56efd 100644 --- a/Makefile +++ b/Makefile @@ -3565,7 +3565,10 @@ BFIN_BOARDS += bf537-minotaur bf537-srv1 bf561-acvilon blackstamp BFIN_BOARDS += ibf-dsp561 $(BFIN_BOARDS:%=%_config) : unconfig - @$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=) + @$(MKCONFIG) $(MKCONFIG_$(@:_config=)) $(@:_config=) blackfin blackfin $(@:_config=) + +bf527-ezkit-v2_config : unconfig + @$(MKCONFIG) -t BF527_EZKIT_REV_2_1 bf527-ezkit blackfin blackfin bf527-ezkit # # AVR32 diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c index 0b6b7b2..7054273 100644 --- a/board/bf527-ezkit/video.c +++ b/board/bf527-ezkit/video.c @@ -12,27 +12,96 @@ #include malloc.h #include asm/blackfin.h #include asm/mach-common/bits/dma.h -#include i2c.h +#include spi.h #include linux/types.h #include stdio_dev.h int gunzip(void *, int, unsigned char *, unsigned long *); -#define DMA_SIZE16 2 - #include asm/mach-common/bits/ppi.h #include asm/mach-common/bits/timer.h +#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1 /* lq035q1 */ + +#define LCD_X_RES 320 /* Horizontal Resolution */ +#define LCD_Y_RES 240 /* Vertical Resolution */ +#defineDMA_BUS_SIZE16 + +#if !(defined(CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI) || defined(CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI)) +#define CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI +#endif + +/* Interface 16/18-bit TFT over an 8-bit wide PPI using a small Programmable Logic Device (CPLD) + * http://blackfin.uclinux.org/gf/project/stamp/frs/?action=FrsReleaseBrowsefrs_package_id=165 + */ + +#ifdef CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI +#include asm/bfin_logo_rgb565_230x230.h +#define LCD_BPP16 /* Bit Per Pixel */ +#define CLOCKS_PER_PIX 2 +#define CPLD_PIPELINE_DELAY_COR 3 /* RGB565 */ +#endif + +#ifdef CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI +#include asm/bfin_logo_230x230.h +#define LCD_BPP24 /* Bit Per Pixel */ +#define CLOCKS_PER_PIX 3 +#define CPLD_PIPELINE_DELAY_COR 5 /* RGB888 */ +#endif + + /* +* HS and VS timing parameters (all in number of PPI clk ticks) +*/ + +#define U_LINE 4 /* Blanking Lines */ + +#define H_ACTPIX (LCD_X_RES * CLOCKS_PER_PIX)/* active horizontal pixel */ +#define H_PERIOD (336 * CLOCKS_PER_PIX) /* HS period */ +#define H_PULSE(2 * CLOCKS_PER_PIX) /* HS pulse width */ +#define H_START(7 * CLOCKS_PER_PIX + CPLD_PIPELINE_DELAY_COR) /* first valid pixel */ + +#defineV_LINES (LCD_Y_RES + U_LINE)/* total vertical lines */ +#define V_PULSE(2 * CLOCKS_PER_PIX)/* VS pulse width (1-5 H_PERIODs) */ +#define V_PERIOD (H_PERIOD * V_LINES)/* VS period */ + +#define ACTIVE_VIDEO_MEM_OFFSET((U_LINE / 2) * LCD_X_RES * (LCD_BPP / 8)) + +/* + * LCD Modes + */ +#define LQ035_RL (0 8)/* Right - Left Scan */ +#define LQ035_LR (1 8)/* Left - Right Scan */ +#define LQ035_TB (1 9)/* Top - Botton Scan */ +#define LQ035_BT (0 9)/* Botton - Top Scan */ +#define LQ035_BGR (1 11) /* Use BGR
[U-Boot] [PATCH 24/25] Blackfin: bf527-ezkit/bf548-ezkit: add musb board specific initialization
From: Cliff Cai cliff@analog.com Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- board/bf527-ezkit/bf527-ezkit.c | 13 + board/bf548-ezkit/bf548-ezkit.c | 16 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c index a880066..a911880 100644 --- a/board/bf527-ezkit/bf527-ezkit.c +++ b/board/bf527-ezkit/bf527-ezkit.c @@ -68,3 +68,16 @@ int misc_init_r(void) return 0; } + +#ifdef CONFIG_USB_BLACKFIN +void board_musb_init(void) +{ + /* +* BF527 EZ-KITs require PG13 to be high for HOST mode +*/ + bfin_write_PORTG_FER(bfin_read_PORTG_FER() ~PG13); + bfin_write_PORTGIO_DIR(bfin_read_PORTGIO_DIR() | PG13); + bfin_write_PORTGIO_SET(PG13); + SSYNC(); +} +#endif diff --git a/board/bf548-ezkit/bf548-ezkit.c b/board/bf548-ezkit/bf548-ezkit.c index 7659e34..65fb81a 100644 --- a/board/bf548-ezkit/bf548-ezkit.c +++ b/board/bf548-ezkit/bf548-ezkit.c @@ -86,3 +86,19 @@ int board_mmc_init(bd_t *bis) return bfin_mmc_init(bis); } #endif + +#ifdef CONFIG_USB_BLACKFIN +void board_musb_init(void) +{ + /* +* Rev 1.0 BF549 EZ-KITs require PE7 to be high for both device +* and OTG host modes, while rev 1.1 and greater require PE7 to +* be low for device mode and high for host mode. We set it high +* here because we are in host mode. +*/ + bfin_write_PORTE_FER(bfin_read_PORTE_FER() ~PE7); + bfin_write_PORTE_DIR_SET(PE7); + bfin_write_PORTE_SET(PE7); + SSYNC(); +} +#endif -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] About GPL
Where exactly is the line for what you have to provide vs what you don't have to provide? We are building boards that are based on a standard board, but we have obviously had to modify include/config/boardname to setup for our hardware and create customized files to support our board. We have NOT modified files outside of customizing a /include/config/boardname and creating a board/boardname directory based on a existing board that is already released from the cpu vendor. Thanks, Rob Westfall On Wed, Dec 16, 2009 at 6:47 PM, Wolfgang Denk w...@denx.de wrote: Dear Hekko, In message 10217154154b296a67e0c072.86674490.active.m...@poczta.nazwa.pl you wrote: Easy Albert, it was just a question about GPL ;-) also according to my local law I can ask any question. In that case, to make it official: I'm sorry anyone who felt offended and took it as an accusation, also LG. I just wanted to ask simple about GPL, maybe I took words wrong / poor english. Just one more word: I can speak only ofr U-Boot - but if you really have proof that anybody uses U-Boot in a product, and they do not provide the source code when you ask for it, then please feel free to contact me and be assured that we will try to resolve this issue - one way or another. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Where would we be without rhetorical questions? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/5] usb: musb: make sure the register layout is packed
Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/usb/musb/musb_core.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index f9da3f0..5e01b98 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -97,7 +97,7 @@ struct musb_regs { u8 rxhubaddr; u8 rxhubport; } tar[16]; -} __attribute__((aligned(32))); +} __attribute__((packed, aligned(32))); /* * MUSB Register bits -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/5] usb: musb: make multipoint optional
From: Bryan Wu bryan...@analog.com The multipoint handling under MUSB is optional, and some parts (like the Blackfin processor) do not implement support for it. Signed-off-by: Bryan Wu bryan...@analog.com Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/usb/musb/musb_hcd.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 4ca94cb..8d94aea 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -402,11 +402,13 @@ static void config_hub_port(struct usb_device *dev, u8 ep) if (dev-parent-children[chid] == dev) break; +#ifndef MUSB_NO_MULTIPOINT /* configure the hub address and the port address */ writeb(hub, musbr-tar[ep].txhubaddr); writeb((chid + 1), musbr-tar[ep].txhubport); writeb(hub, musbr-tar[ep].rxhubaddr); writeb((chid + 1), musbr-tar[ep].rxhubport); +#endif } /* @@ -415,7 +417,9 @@ static void config_hub_port(struct usb_device *dev, u8 ep) int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int len, struct devrequest *setup) { +#ifndef MUSB_NO_MULTIPOINT int devnum = usb_pipedevice(pipe); +#endif u16 csr; u8 devspeed; @@ -423,9 +427,11 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, writeb(MUSB_CONTROL_EP, musbr-index); csr = readw(musbr-txcsr); +#ifndef MUSB_NO_MULTIPOINT /* target addr and (for multipoint) hub addr/port */ writeb(devnum, musbr-tar[MUSB_CONTROL_EP].txfuncaddr); writeb(devnum, musbr-tar[MUSB_CONTROL_EP].rxfuncaddr); +#endif /* configure the hub address and the port number as required */ devspeed = get_dev_speed(dev); @@ -435,10 +441,12 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, writeb(devspeed 6, musbr-txtype); } else { writeb(musb_cfg.musb_speed 6, musbr-txtype); +#ifndef MUSB_NO_MULTIPOINT writeb(0, musbr-tar[MUSB_CONTROL_EP].txhubaddr); writeb(0, musbr-tar[MUSB_CONTROL_EP].txhubport); writeb(0, musbr-tar[MUSB_CONTROL_EP].rxhubaddr); writeb(0, musbr-tar[MUSB_CONTROL_EP].rxhubport); +#endif } /* Control transfer setup phase */ @@ -497,7 +505,9 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, { int dir_out = usb_pipeout(pipe); int ep = usb_pipeendpoint(pipe); +#ifndef MUSB_NO_MULTIPOINT int devnum = usb_pipedevice(pipe); +#endif u8 type; u16 csr; u32 txlen = 0; @@ -507,11 +517,13 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, /* select bulk endpoint */ writeb(MUSB_BULK_EP, musbr-index); +#ifndef MUSB_NO_MULTIPOINT /* write the address of the device */ if (dir_out) writeb(devnum, musbr-tar[MUSB_BULK_EP].txfuncaddr); else writeb(devnum, musbr-tar[MUSB_BULK_EP].rxfuncaddr); +#endif /* configure the hub address and the port number as required */ devspeed = get_dev_speed(dev); @@ -524,6 +536,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, */ config_hub_port(dev, MUSB_BULK_EP); } else { +#ifndef MUSB_NO_MULTIPOINT if (dir_out) { writeb(0, musbr-tar[MUSB_BULK_EP].txhubaddr); writeb(0, musbr-tar[MUSB_BULK_EP].txhubport); @@ -531,6 +544,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, writeb(0, musbr-tar[MUSB_BULK_EP].rxhubaddr); writeb(0, musbr-tar[MUSB_BULK_EP].rxhubport); } +#endif devspeed = musb_cfg.musb_speed; } @@ -696,7 +710,9 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, { int dir_out = usb_pipeout(pipe); int ep = usb_pipeendpoint(pipe); +#ifndef MUSB_NO_MULTIPOINT int devnum = usb_pipedevice(pipe); +#endif u8 type; u16 csr; u32 txlen = 0; @@ -706,11 +722,13 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, /* select interrupt endpoint */ writeb(MUSB_INTR_EP, musbr-index); +#ifndef MUSB_NO_MULTIPOINT /* write the address of the device */ if (dir_out) writeb(devnum, musbr-tar[MUSB_INTR_EP].txfuncaddr); else writeb(devnum, musbr-tar[MUSB_INTR_EP].rxfuncaddr); +#endif /* configure the hub address and the port number as required */ devspeed = get_dev_speed(dev); @@ -723,6 +741,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, */
[U-Boot] [PATCH 2/5] usb: musb: make fifo support configurable
From: Bryan Wu bryan...@analog.com The dynamic FIFO handling under MUSB is optional, and some parts (like the Blackfin processor) do not implement support for it. Due to this, the FIFO reading/writing steps need special handling, so mark the common versions weak so drivers can override. Signed-off-by: Bryan Wu bryan...@analog.com Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/usb/musb/musb_core.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index ec57fc8..2bad610 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -48,6 +48,16 @@ void musb_start(void) #endif } +#ifdef MUSB_NO_DYNAMIC_FIFO +# define config_fifo(dir, idx, addr) +#else +# define config_fifo(dir, idx, addr) \ + do { \ + writeb(idx, musbr-dir##fifosz); \ + writew(fifoaddr 3, musbr-dir##fifoadd); \ + } while (0) +#endif + /* * This function configures the endpoint configuration. The musb hcd or musb * device implementation can use this function to configure the endpoints @@ -72,8 +82,8 @@ void musb_configure_ep(struct musb_epinfo *epinfo, u8 cnt) writeb(epinfo-epnum, musbr-index); if (epinfo-epdir) { /* Configure fifo size and fifo base address */ - writeb(idx, musbr-txfifosz); - writew(fifoaddr 3, musbr-txfifoadd); + config_fifo(tx, idx, fifoaddr); + #if defined(CONFIG_MUSB_HCD) /* clear the data toggle bit */ csr = readw(musbr-txcsr); @@ -85,8 +95,8 @@ void musb_configure_ep(struct musb_epinfo *epinfo, u8 cnt) musbr-txcsr); } else { /* Configure fifo size and fifo base address */ - writeb(idx, musbr-rxfifosz); - writew(fifoaddr 3, musbr-rxfifoadd); + config_fifo(rx, idx, fifoaddr); + #if defined(CONFIG_MUSB_HCD) /* clear the data toggle bit */ csr = readw(musbr-rxcsr); @@ -109,6 +119,7 @@ void musb_configure_ep(struct musb_epinfo *epinfo, u8 cnt) * length - number of bytes to write to FIFO * fifo_data - Pointer to data buffer that contains the data to write */ +__attribute__((weak)) void write_fifo(u8 ep, u32 length, void *fifo_data) { u8 *data = (u8 *)fifo_data; @@ -128,6 +139,7 @@ void write_fifo(u8 ep, u32 length, void *fifo_data) * length - number of bytes to read from FIFO * fifo_data- pointer to data buffer into which data is read */ +__attribute__((weak)) void read_fifo(u8 ep, u32 length, void *fifo_data) { u8 *data = (u8 *)fifo_data; -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/5] usb: musb: change rxcsr register from write to read/modify/write
From: Bryan Wu bryan...@analog.com The RX Control/Status register has bits that we want to preserve, so don't just write out a single bit. Preserve the others bits in the process. The original code posted to the u-boot list had this behavior, but looks like it was lost somewhere along the way to merging. Signed-off-by: Bryan Wu bryan...@analog.com Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/usb/musb/musb_hcd.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 8d94aea..281fc70 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -604,7 +604,8 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, (len-txlen) : dev-epmaxpacketin[ep]; /* Set the ReqPkt bit */ - writew(MUSB_RXCSR_H_REQPKT, musbr-rxcsr); + csr = readw(musbr-rxcsr); + writew(csr | MUSB_RXCSR_H_REQPKT, musbr-rxcsr); /* Wait until the RxPktRdy bit is set */ if (!wait_until_rxep_ready(dev, MUSB_BULK_EP)) { @@ -775,7 +776,8 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, (len-txlen) : dev-epmaxpacketin[ep]; /* Set the ReqPkt bit */ - writew(MUSB_RXCSR_H_REQPKT, musbr-rxcsr); + csr = readw(musbr-rxcsr); + writew(csr | MUSB_RXCSR_H_REQPKT, musbr-rxcsr); /* Wait until the RxPktRdy bit is set */ if (!wait_until_rxep_ready(dev, MUSB_INTR_EP)) { -- 1.6.5.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/5] usb: musb: add support for Blackfin MUSB
From: Bryan Wu bryan...@analog.com Signed-off-by: Bryan Wu bryan...@analog.com Signed-off-by: Cliff Cai cliff@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/usb/musb/Makefile |1 + drivers/usb/musb/blackfin_usb.c | 143 +++ drivers/usb/musb/blackfin_usb.h | 99 ++ drivers/usb/musb/musb_core.h| 16 ++ drivers/usb/musb/musb_hcd.h |4 +- include/asm-blackfin/mach-common/bits/usb.h | 264 +++ include/usb.h |3 +- 7 files changed, 528 insertions(+), 2 deletions(-) create mode 100644 drivers/usb/musb/blackfin_usb.c create mode 100644 drivers/usb/musb/blackfin_usb.h create mode 100644 include/asm-blackfin/mach-common/bits/usb.h diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile index 09e0a5f..40caf9b 100644 --- a/drivers/usb/musb/Makefile +++ b/drivers/usb/musb/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libusb_musb.a COBJS-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o +COBJS-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o COBJS-$(CONFIG_USB_DAVINCI) += davinci.o COBJS := $(COBJS-y) diff --git a/drivers/usb/musb/blackfin_usb.c b/drivers/usb/musb/blackfin_usb.c new file mode 100644 index 000..38aceb2 --- /dev/null +++ b/drivers/usb/musb/blackfin_usb.c @@ -0,0 +1,143 @@ +/* + * Blackfin MUSB HCD (Host Controller Driver) for u-boot + * + * Copyright (c) 2008-2009 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#include common.h + +#include usb.h + +#include asm/blackfin.h +#include asm/mach-common/bits/usb.h + +#include musb_core.h + +/* MUSB platform configuration */ +struct musb_config musb_cfg = { + .regs = (struct musb_regs *)USB_FADDR, + .timeout= 0x3FF, + .musb_speed = 0, +}; + +/* + * This function read or write data to endpoint fifo + * Blackfin use DMA polling method to avoid buffer alignment issues + * + * ep - Endpoint number + * length - Number of bytes to write to FIFO + * fifo_data - Pointer to data buffer to be read/write + * is_write- Flag for read or write + */ +void rw_fifo(u8 ep, u32 length, void *fifo_data, int is_write) +{ + struct bfin_musb_dma_regs *regs; + u32 val = (u32)fifo_data; + + blackfin_dcache_flush_invalidate_range(fifo_data, fifo_data + length); + + regs = (void *)USB_DMA_INTERRUPT; + regs += ep; + + /* Setup DMA address register */ + bfin_write16(regs-addr_low, val); + SSYNC(); + + bfin_write16(regs-addr_high, val 16); + SSYNC(); + + /* Setup DMA count register */ + bfin_write16(regs-count_low, length); + bfin_write16(regs-count_high, 0); + SSYNC(); + + /* Enable the DMA */ + val = (ep 4) | DMA_ENA | INT_ENA; + if (is_write) + val |= DIRECTION; + bfin_write16(regs-control, val); + SSYNC(); + + /* Wait for compelete */ + while (!(bfin_read_USB_DMA_INTERRUPT() (1 ep))) + continue; + + /* acknowledge dma interrupt */ + bfin_write_USB_DMA_INTERRUPT(1 ep); + SSYNC(); + + /* Reset DMA */ + bfin_write16(regs-control, 0); + SSYNC(); +} + +void write_fifo(u8 ep, u32 length, void *fifo_data) +{ + rw_fifo(ep, length, fifo_data, 1); +} + +void read_fifo(u8 ep, u32 length, void *fifo_data) +{ + rw_fifo(ep, length, fifo_data, 0); +} + + +/* + * CPU and board-specific MUSB initializations. Aliased function + * signals caller to move on. + */ +static void __def_musb_init(void) +{ +} +void board_musb_init(void) __attribute__((weak, alias(__def_musb_init))); + +int musb_platform_init(void) +{ + /* board specific initialization */ + board_musb_init(); + + if (ANOMALY_05000346) { + bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); + SSYNC(); + } + + if (ANOMALY_05000347) { + bfin_write_USB_APHY_CNTRL(0x0); + SSYNC(); + } + + /* Configure PLL oscillator register */ + bfin_write_USB_PLLOSC_CTRL(0x30a8); + SSYNC(); + + bfin_write_USB_SRP_CLKDIV((get_sclk()/1000) / 32 - 1); + SSYNC(); + + bfin_write_USB_EP_NI0_RXMAXP(64); + SSYNC(); + + bfin_write_USB_EP_NI0_TXMAXP(64); + SSYNC(); + + /* Route INTRUSB/INTR_RX/INTR_TX to USB_INT0*/ + bfin_write_USB_GLOBINTR(0x7); + SSYNC(); + + bfin_write_USB_GLOBAL_CTL(GLOBAL_ENA | EP1_TX_ENA | EP2_TX_ENA | + EP3_TX_ENA | EP4_TX_ENA | EP5_TX_ENA | + EP6_TX_ENA | EP7_TX_ENA | EP1_RX_ENA | + EP2_RX_ENA | EP3_RX_ENA | EP4_RX_ENA | + EP5_RX_ENA | EP6_RX_ENA | EP7_RX_ENA); + SSYNC(); + + return 0; +} + +/* + * This function performs Blackfin platform
Re: [U-Boot] About GPL
On Wednesday 16 December 2009 21:55:01 Rob Westfall wrote: Where exactly is the line for what you have to provide vs what you don't have to provide? We are building boards that are based on a standard board, but we have obviously had to modify include/config/boardname to setup for our hardware and create customized files to support our board. We have NOT modified files outside of customizing a /include/config/boardname and creating a board/boardname directory based on a existing board that is already released from the cpu vendor. why does it really matter. a tarball of a few files is just as easy as a tarball of the whole tree. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] About GPL
On Wednesday 16 December 2009 21:55:01 Rob Westfall wrote: Where exactly is the line for what you have to provide vs what you don't have to provide? also, this is what you should be asking your lawyers. legal advice on random mailing lists is a waste of time. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-boot doubts
Hi, why do we have two files(env_nand.c and env_flash.c) to manipulate environmental variables? According to my knowledge nand is also a flash type then why we have separate file called env_flash.c or is this file will be used for nor flash? chandru ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request - net/next
Wolfgang, The following changes since commit 4b142febff71eabdb7ddbb125c7b583b24ddc434: Heiko Schocher (1): common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL are available in the git repository at: git://git.denx.de/u-boot-net.git next Ben Warren (1): Net: Clean up LAN91C96 Support John Ogness (1): fec_mxc: incomplete error handling Mike Frysinger (1): net: pull CONFIG checks out of source and into makefile Nishanth Menon (3): NET: LAN91C96 CONFIG_NET_MULTIify TI OMAP3: SDP3430 FIX NET_MULTI Warning LAN91C96: Enable NET_MULTI LAN driver Reinhard Arlt (1): net: e1000: Add support for the Intel 82546GB controller Remy Bohmer (1): Add error codes/handling for TFTP-server Thomas Weber (1): net: dm9000x: fix debug output board/apollon/apollon.c | 13 +- board/assabet/assabet.c | 12 + board/dave/B2/B2.c | 12 + board/gcplus/gcplus.c| 12 + board/logicpd/zoom1/zoom1.c | 12 + board/logicpd/zoom2/zoom2.c | 12 + board/lubbock/lubbock.c | 12 + board/ti/omap1510inn/omap1510innovator.c | 12 + board/ti/omap1610inn/omap1610innovator.c | 12 + board/ti/omap2420h4/omap2420h4.c | 12 + board/ti/omap5912osk/omap5912osk.c | 12 + board/ti/omap730p2/omap730p2.c | 12 + board/ti/sdp3430/sdp.c | 12 +- drivers/net/Makefile |2 +- drivers/net/dm9000x.c|2 +- drivers/net/e1000.c |1 + drivers/net/fec_mxc.c|1 + drivers/net/lan91c96.c | 452 -- drivers/net/lan91c96.h | 110 include/configs/B2.h |4 +- include/configs/apollon.h|3 +- include/configs/assabet.h|3 +- include/configs/gcplus.h |3 +- include/configs/lubbock.h|3 +- include/configs/omap1510inn.h|3 +- include/configs/omap1610h2.h |3 +- include/configs/omap1610inn.h|3 +- include/configs/omap2420h4.h |3 +- include/configs/omap3_sdp3430.h |3 +- include/configs/omap5912osk.h|3 +- include/configs/omap730p2.h |3 +- include/configs/pleb2.h |6 +- include/netdev.h |1 + include/pci_ids.h|1 + net/Makefile | 12 +- net/bootp.c |4 - net/eth.c|7 +- net/net.c|4 - net/nfs.c|4 - net/rarp.c |4 - net/tftp.c | 36 ++- 41 files changed, 452 insertions(+), 389 deletions(-) regards, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-boot doubts
Dear Chandra Sekar, In message 67b11d980912162018j3febe826l91c6b52134123...@mail.gmail.com you wrote: why do we have two files(env_nand.c and env_flash.c) to manipulate environmental variables? Because NAND flahrequires diofferent handling than NOR flash. Note there is also common/env_dataflash.c, common/env_eeprom.c, common/env_mgdisk.c, common/env_nowhere.c, common/env_nvram.c, common/env_onenand.c, and common/env_sf.c According to my knowledge nand is also a flash type then why we have separate file called env_flash.c or is this file will be used for nor flash? NOR flash is a memory device which is byte-addressable by the processor. NAND flash is no memory, but a storage device instead, which needs to be read in buffers into RAM before you can access arbitrary bytes of it's content. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Carelessly planned projects take three times longer to complete than expected. Carefully planned projects take four times longer to complete than expected, mostly because the planners expect their planning to reduce the time it takes. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot