[U-Boot] [PATCH v2] powerpc/mpc85xxcds: Fix PCI speed
From: chenhui zhao The CDS uses PCICLK as SYSCLK. The PCICLK should be Hz or Hz. Signed-off-by: Ebony Zhu Signed-off-by: Zhao Chenhui --- Changes for v2: -rewrite the description. -use strmhz(). board/freescale/common/cadmus.c |8 board/freescale/mpc8541cds/mpc8541cds.c |6 +++--- board/freescale/mpc8548cds/mpc8548cds.c |4 ++-- board/freescale/mpc8555cds/mpc8555cds.c |6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/board/freescale/common/cadmus.c b/board/freescale/common/cadmus.c index db54bc4..50b6e9f 100644 --- a/board/freescale/common/cadmus.c +++ b/board/freescale/common/cadmus.c @@ -1,5 +1,5 @@ /* - * Copyright 2004 Freescale Semiconductor. + * Copyright 2004, 2011 Freescale Semiconductor. * * See file CREDITS for list of people who contributed to this * project. @@ -61,12 +61,12 @@ get_clock_freq(void) uint pci1_speed = (cadmus->cm_pci >> 2) & 0x3; /* PSPEED in [4:5] */ if (pci1_speed == 0) { - return 3300; + return ; } else if (pci1_speed == 1) { - return 6600; + return ; } else { /* Really, unknown. Be safe? */ - return 3300; + return ; } } diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c index 0d3752d..d127137 100644 --- a/board/freescale/mpc8541cds/mpc8541cds.c +++ b/board/freescale/mpc8541cds/mpc8541cds.c @@ -1,5 +1,5 @@ /* - * Copyright 2004 Freescale Semiconductor. + * Copyright 2004, 2011 Freescale Semiconductor. * * (C) Copyright 2002 Scott McNutt * @@ -200,6 +200,7 @@ const iop_conf_t iop_conf_tab[4][32] = { int checkboard (void) { volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + char buf[32]; /* PCI slot in USER bits CSR[6:7] by convention. */ uint pci_slot = get_pci_slot (); @@ -222,8 +223,7 @@ int checkboard (void) printf("PCI1: %d bit, %s MHz, %s\n", (pci1_32) ? 32 : 64, - (pci1_speed == 3300) ? "33" : - (pci1_speed == 6600) ? "66" : "unknown", + strmhz(buf, pci1_speed), pci1_clk_sel ? "sync" : "async"); if (pci_dual) { diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index 8ab9752..3bcaac4 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -214,6 +214,7 @@ void pci_init_board(void) u32 devdisr, pordevsr, io_sel; u32 porpllsr, pci_agent, pci_speed, pci_32, pci_arb, pci_clk_sel; int first_free_busno = 0; + char buf[32]; devdisr = in_be32(&gur->devdisr); pordevsr = in_be32(&gur->pordevsr); @@ -238,8 +239,7 @@ void pci_init_board(void) pci_agent = fsl_setup_hose(&pci1_hose, pci_info.regs); printf("PCI1: %d bit, %s MHz, %s, %s, %s (base address %lx)\n", (pci_32) ? 32 : 64, - (pci_speed == 3000) ? "33" : - (pci_speed == 6000) ? "66" : "unknown", + strmhz(buf, pci_speed), pci_clk_sel ? "sync" : "async", pci_agent ? "agent" : "host", pci_arb ? "arbiter" : "external-arbiter", diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c index 60d1758..48ede98 100644 --- a/board/freescale/mpc8555cds/mpc8555cds.c +++ b/board/freescale/mpc8555cds/mpc8555cds.c @@ -1,5 +1,5 @@ /* - * Copyright 2004 Freescale Semiconductor. + * Copyright 2004, 2011 Freescale Semiconductor. * * See file CREDITS for list of people who contributed to this * project. @@ -198,6 +198,7 @@ const iop_conf_t iop_conf_tab[4][32] = { int checkboard (void) { volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + char buf[32]; /* PCI slot in USER bits CSR[6:7] by convention. */ uint pci_slot = get_pci_slot (); @@ -220,8 +221,7 @@ int checkboard (void) printf("PCI1: %d bit, %s MHz, %s\n", (pci1_32) ? 32 : 64, - (pci1_speed == 3300) ? "33" : - (pci1_speed == 6600) ? "66" : "unknown", + strmhz(buf, pci1_speed), pci1_clk_sel ? "sync" : "async"); if (pci_dual) { -- 1.6.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/p3060qds: Add board related support for P3060QDS platform
From: Shengzhou Liu The P3060QDS is a Freescale reference board for the six-core P3060 SOC. P3060QDS Board Overview: Memory subsystem: - 2G Bytes unbuffered DDR3 SDRAM SO-DIMM(64bit bus) - 128M Bytes NOR flash single-chip memory - 16M Bytes SPI flash - 8K Bytes AT24C64 I2C EEPROM for RCW Ethernet: - Eight Ethernet controllers (4x1G + 4x1G/2.5G) - Three VSC8641 PHYs on board (2xRGMII + 1xMII) - Suport multiple Vitesse VSC8234 SGMII Cards in Slot1/2/3 PCIe: Two PCI Express 2.0 controllers/ports USB: Two USB2.0, USB1(TYPE-A) and USB2(TYPE-AB) on board I2C: Four I2C controllers UART: Supports two dUARTs up to 115200 bps for console RapidIO: Two RapidIO, sRIO1 and sRIO2 Signed-off-by: Shengzhou Liu Signed-off-by: Kumar Gala --- board/freescale/common/Makefile |3 + board/freescale/common/ics307_clk.c | 21 +- board/freescale/common/qixis.c | 151 board/freescale/common/qixis.h | 101 board/freescale/p3060qds/Makefile| 54 board/freescale/p3060qds/ddr.c | 281 ++ board/freescale/p3060qds/eth.c | 440 ++ board/freescale/p3060qds/fixed_ddr.c | 214 + board/freescale/p3060qds/p3060qds.c | 239 ++ board/freescale/p3060qds/p3060qds.h | 30 +++ boards.cfg |2 + doc/README.p3060qds | 111 + include/configs/P3060QDS.h | 39 +++ include/configs/corenet_ds.h |4 + 14 files changed, 1682 insertions(+), 8 deletions(-) create mode 100644 board/freescale/common/qixis.c create mode 100644 board/freescale/common/qixis.h create mode 100644 board/freescale/p3060qds/Makefile create mode 100644 board/freescale/p3060qds/ddr.c create mode 100644 board/freescale/p3060qds/eth.c create mode 100644 board/freescale/p3060qds/fixed_ddr.c create mode 100644 board/freescale/p3060qds/p3060qds.c create mode 100644 board/freescale/p3060qds/p3060qds.h create mode 100644 doc/README.p3060qds create mode 100644 include/configs/P3060QDS.h diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index b27f054..2b9cc3f 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -34,6 +34,7 @@ COBJS-$(CONFIG_FSL_VIA) += cds_via.o COBJS-$(CONFIG_FMAN_ENET) += fman.o COBJS-$(CONFIG_FSL_PIXIS) += pixis.o COBJS-$(CONFIG_FSL_NGPIXIS)+= ngpixis.o +COBJS-$(CONFIG_FSL_QIXIS) += qixis.o COBJS-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o COBJS-$(CONFIG_ID_EEPROM) += sys_eeprom.o COBJS-$(CONFIG_FSL_SGMII_RISER)+= sgmii_riser.o @@ -50,12 +51,14 @@ COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o COBJS-$(CONFIG_P1022DS)+= ics307_clk.o COBJS-$(CONFIG_P2020DS)+= ics307_clk.o COBJS-$(CONFIG_P3041DS)+= ics307_clk.o +COBJS-$(CONFIG_P3060QDS) += ics307_clk.o COBJS-$(CONFIG_P4080DS)+= ics307_clk.o COBJS-$(CONFIG_P5020DS)+= ics307_clk.o # deal with common files for P-series corenet based devices SUBLIB-$(CONFIG_P2041RDB) += p_corenet/libp_corenet.o SUBLIB-$(CONFIG_P3041DS) += p_corenet/libp_corenet.o +SUBLIB-$(CONFIG_P3060QDS) += p_corenet/libp_corenet.o SUBLIB-$(CONFIG_P4080DS) += p_corenet/libp_corenet.o SUBLIB-$(CONFIG_P5020DS) += p_corenet/libp_corenet.o diff --git a/board/freescale/common/ics307_clk.c b/board/freescale/common/ics307_clk.c index 89d8810..596ed3a 100644 --- a/board/freescale/common/ics307_clk.c +++ b/board/freescale/common/ics307_clk.c @@ -1,5 +1,5 @@ /* - * Copyright 2010 Freescale Semiconductor, Inc. + * Copyright 2010-2011 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -25,10 +25,15 @@ #include "ics307_clk.h" -#ifdef CONFIG_FSL_NGPIXIS +#if defined(CONFIG_FSL_NGPIXIS) #include "ngpixis.h" +#define fpga_reg pixis +#elif defined(CONFIG_FSL_QIXIS) +#include "qixis.h" +#define fpga_reg ((struct qixis *)QIXIS_BASE) #else #include "pixis.h" +#define fpga_reg pixis #endif /* decode S[0-2] to Output Divider (OD) */ @@ -74,15 +79,15 @@ static unsigned long ics307_clk_freq(u8 cw0, u8 cw1, u8 cw2) unsigned long get_board_sys_clk(void) { return ics307_clk_freq( - in_8(&pixis->sclk[0]), - in_8(&pixis->sclk[1]), - in_8(&pixis->sclk[2])); + in_8(&fpga_reg->sclk[0]), + in_8(&fpga_reg->sclk[1]), + in_8(&fpga_reg->sclk[2])); } unsigned long get_board_ddr_clk(void) { return ics307_clk_freq( - in_8(&pixis->dclk[0]), - in_8(&pixis->dclk[1]), - in_8(&pixis->dclk[2])); + in_8(&fpga_reg->dclk[0]), + in_8(&fpga_reg->dclk[1]), +
[U-Boot] [PATCH 8/8] arm, davinci: add support for am1808 based enbw_cmc board
- booting from NOR Flash with direct boot method - POST support - LOGBUF support Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- board/enbw/enbw_cmc/Makefile | 51 board/enbw/enbw_cmc/enbw_cmc.c | 574 boards.cfg |1 + include/configs/enbw_cmc.h | 440 ++ 4 files changed, 1066 insertions(+), 0 deletions(-) create mode 100644 board/enbw/enbw_cmc/Makefile create mode 100644 board/enbw/enbw_cmc/enbw_cmc.c create mode 100644 include/configs/enbw_cmc.h diff --git a/board/enbw/enbw_cmc/Makefile b/board/enbw/enbw_cmc/Makefile new file mode 100644 index 000..bdba069 --- /dev/null +++ b/board/enbw/enbw_cmc/Makefile @@ -0,0 +1,51 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn +# +# 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).o + +COBJS := $(BOARD).o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(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/enbw/enbw_cmc/enbw_cmc.c b/board/enbw/enbw_cmc/enbw_cmc.c new file mode 100644 index 000..1b9ee67 --- /dev/null +++ b/board/enbw/enbw_cmc/enbw_cmc.c @@ -0,0 +1,574 @@ +/* + * (C) Copyright 2011 + * Heiko Schocher, DENX Software Engineering, h...@denx.de. + * + * Based on: + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * + * Based on da830evm.c. Original Copyrights follow: + * + * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. + * Copyright (C) 2007 Sergey Kubushyn + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static const struct lpsc_resource lpsc[] = { + { DAVINCI_LPSC_AEMIF }, /* NAND, NOR */ + { DAVINCI_LPSC_EMAC }, /* image download */ + { DAVINCI_LPSC_UART2 }, /* console */ + { DAVINCI_LPSC_GPIO }, +}; + +/* missing functions from board/davinci/common/misc.c */ +#ifndef CONFIG_USE_IRQ +void irq_init(void) +{ + /* +* 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 + +void davinci_emac_mii_mode_sel(int mode_sel) +{ + int val; + + val = readl(&davinci_syscfg_regs->cfgchip3); + if (mode_sel == 0) + val &= ~(1 << 8); + else + val |= (1 << 8); + writel(val, &davinci_syscfg_regs->cfgchip3); +} + +int da8xx_configure_lpsc_items(const struct lpsc_resource *item, + const int n_items) +{ +
[U-Boot] [PATCH 4/8] arm, davinci: add ddr2 definition
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/include/asm/arch-davinci/ddr2_defs.h | 96 + 1 files changed, 96 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-davinci/ddr2_defs.h diff --git a/arch/arm/include/asm/arch-davinci/ddr2_defs.h b/arch/arm/include/asm/arch-davinci/ddr2_defs.h new file mode 100644 index 000..1b9430c --- /dev/null +++ b/arch/arm/include/asm/arch-davinci/ddr2_defs.h @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2011 + * Heiko Schocher, DENX Software Engineering, h...@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 + */ +#ifndef _DV_DDR2_DEFS_H_ +#define _DV_DDR2_DEFS_H_ + +/* + * DDR2 Memory Ctrl Register structure + * See sprueh7d.pdf for more details. + */ +struct dv_ddr2_regs_ctrl { + unsigned char rsvd0[4]; /* 0x00 */ + unsigned intsdrstat;/* 0x04 */ + unsigned intsdbcr; /* 0x08 */ + unsigned intsdrcr; /* 0x0C */ + unsigned intsdtimr; /* 0x10 */ + unsigned intsdtimr2;/* 0x14 */ + unsigned char rsvd1[4]; /* 0x18 */ + unsigned intsdbcr2; /* 0x1C */ + unsigned intpbbpr; /* 0x20 */ + unsigned char rsvd2[156]; /* 0x24 */ + unsigned intirr;/* 0xC0 */ + unsigned intimr;/* 0xC4 */ + unsigned intimsr; /* 0xC8 */ + unsigned intimcr; /* 0xCC */ + unsigned char rsvd3[20]; /* 0xD0 */ + unsigned intddrphycr; /* 0xE4 */ + unsigned intddrphycr2; /* 0xE8 */ + unsigned char rsvd4[4]; /* 0xEC */ +}; + +#define DV_DDR_PHY_PWRDNEN 0x40 +#define DV_DDR_PHY_EXT_STRBEN 0x80 +#define DV_DDR_PHY_RD_LATENCY_SHIFT0 + +#define DV_DDR_SDTMR1_RFC_SHIFT25 +#define DV_DDR_SDTMR1_RP_SHIFT 22 +#define DV_DDR_SDTMR1_RCD_SHIFT19 +#define DV_DDR_SDTMR1_WR_SHIFT 16 +#define DV_DDR_SDTMR1_RAS_SHIFT11 +#define DV_DDR_SDTMR1_RC_SHIFT 6 +#define DV_DDR_SDTMR1_RRD_SHIFT3 +#define DV_DDR_SDTMR1_WTR_SHIFT0 + +#define DV_DDR_SDTMR2_RASMAX_SHIFT 27 +#define DV_DDR_SDTMR2_XP_SHIFT 25 +#define DV_DDR_SDTMR2_XSNR_SHIFT 16 +#define DV_DDR_SDTMR2_XSRD_SHIFT 8 +#define DV_DDR_SDTMR2_RTP_SHIFT5 +#define DV_DDR_SDTMR2_CKE_SHIFT0 + +#define DV_DDR_SDCR_DDR2TERM1_SHIFT27 +#define DV_DDR_SDCR_IBANK_POS_SHIFT26 +#define DV_DDR_SDCR_MSDRAMEN_SHIFT 25 +#define DV_DDR_SDCR_DDRDRIVE1_SHIFT24 +#define DV_DDR_SDCR_BOOTUNLOCK_SHIFT 23 +#define DV_DDR_SDCR_DDR_DDQS_SHIFT 22 +#define DV_DDR_SDCR_DDR2EN_SHIFT 20 +#define DV_DDR_SDCR_DDRDRIVE0_SHIFT18 +#define DV_DDR_SDCR_DDREN_SHIFT17 +#define DV_DDR_SDCR_SDRAMEN_SHIFT 16 +#define DV_DDR_SDCR_TIMUNLOCK_SHIFT15 +#define DV_DDR_SDCR_BUS_WIDTH_SHIFT14 +#define DV_DDR_SDCR_CL_SHIFT 9 +#define DV_DDR_SDCR_IBANK_SHIFT4 +#define DV_DDR_SDCR_PAGESIZE_SHIFT 0 + +#define DV_DDR_SRCR_LPMODEN_SHIFT 31 +#define DV_DDR_SRCR_MCLKSTOPEN_SHIFT 30 + +#define DV_DDR_BOOTUNLOCK (1 << DV_DDR_SDCR_BOOTUNLOCK_SHIFT) +#define DV_DDR_TIMUNLOCK (1 << DV_DDR_SDCR_TIMUNLOCK_SHIFT) + +#define dv_ddr2_regs_ctrl \ + ((struct dv_ddr2_regs_ctrl *)DAVINCI_DDR_EMIF_CTRL_BASE) + +#endif /* _DV_DDR2_DEFS_H_ */ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/8] arm, davinci: add some missing defines in hardware.h
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/include/asm/arch-davinci/hardware.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index dcc71d6..b6a3209 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -322,6 +322,11 @@ void davinci_errata_workarounds(void); #else /* CONFIG_SOC_DA8XX */ +#definePSC_ENABLE 0x3 +#definePSC_DISABLE 0x2 +#definePSC_SYNCRESET 0x1 +#definePSC_SWRSTDISABLE0x0 + #define PSC_PSC0_MODULE_ID_CNT 16 #define PSC_PSC1_MODULE_ID_CNT 32 @@ -464,6 +469,12 @@ struct davinci_syscfg1_regs { #define DDR_SLEW_CMOSEN_BIT4 +#define VTP_POWERDWN (1 << 6) +#define VTP_LOCK (1 << 7) +#define VTP_CLKRZ (1 << 13) +#define VTP_READY (1 << 15) +#define VTP_IOPWRDWN (1 << 14) + /* Interrupt controller */ struct davinci_aintc_regs { dv_reg revid; -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/8] arm, davinci, am1808: add lowlevel functions for booting from NOR
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/cpu/arm926ejs/davinci/Makefile|1 + arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c | 428 .../arm/include/asm/arch-davinci/am1808_lowlevel.h | 44 ++ 3 files changed, 473 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c create mode 100644 arch/arm/include/asm/arch-davinci/am1808_lowlevel.h diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile index b38623a..0310957 100644 --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -28,6 +28,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).o COBJS-y+= cpu.o timer.o psc.o +COBJS-$(CONFIG_AM18018_LOWLEVEL) += am1808_lowlevel.o COBJS-$(CONFIG_SOC_DM355) += dm355.o COBJS-$(CONFIG_SOC_DM365) += dm365.o COBJS-$(CONFIG_SOC_DM644X) += dm644x.o diff --git a/arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file mode 100644 index 000..1ea4a9f --- /dev/null +++ b/arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c @@ -0,0 +1,428 @@ +/* + * SoC-specific lowlevel code for AM1808 and similar chips + * + * Copyright (C) 2011 + * Heiko Schocher, DENX Software Engineering, h...@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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +void am1808_waitloop(unsigned long loopcnt) +{ + unsigned long i; + + for (i = 0; i < loopcnt; i++) + asm(" NOP"); +} + +int am1808_pll_init(struct davinci_pllc_regs *reg, unsigned long pllmult) +{ + if (reg == davinci_pllc0_regs) + /* Unlock PLL registers. */ + clrbits_le32(&davinci_syscfg_regs->cfgchip0, 0x0010); + + /* +* Set PLLENSRC '0',bit 5, PLL Enable(PLLEN) selection is controlled +* through MMR +*/ + clrbits_le32(®->pllctl, 0x0020); + /* PLLCTL.EXTCLKSRC bit 9 should be left at 0 for Freon */ + clrbits_le32(®->pllctl, 0x0200); + + /* Set PLLEN=0 => PLL BYPASS MODE */ + clrbits_le32(®->pllctl, 0x0001); + + am1808_waitloop(150); + + if (reg == davinci_pllc0_regs) { + /* +* Select the Clock Mode bit 8 as External Clock or On Chip +* Oscilator +*/ + dv_maskbits(®->pllctl, 0xFEFF); + setbits_le32(®->pllctl, (CONFIG_SYS_DV_CLKMODE << 8)); + } + + /* Clear PLLRST bit to reset the PLL */ + clrbits_le32(®->pllctl, 0x0008); + + /* Disable the PLL output */ + setbits_le32(®->pllctl, 0x0010); + + /* PLL initialization sequence */ + /* +* Power up the PLL- PWRDN bit set to 0 to bring the PLL out of +* power down bit +*/ + clrbits_le32(®->pllctl, 0x0002); + + /* Enable the PLL from Disable Mode PLLDIS bit to 0 */ + clrbits_le32(®->pllctl, 0x0010); + + /* Program the required multiplier value in PLLM */ + writel(pllmult, ®->pllm); + + /* program the postdiv */ + if (reg == davinci_pllc0_regs) + writel((0x8000 | CONFIG_SYS_AM1808_PLL0_POSTDIV), + ®->postdiv); + else + writel((0x8000 | CONFIG_SYS_AM1808_PLL1_POSTDIV), + ®->postdiv); + + /* +* Check for the GOSTAT bit in PLLSTAT to clear to 0 to indicate that +* no GO operation is currently in progress +*/ + while ((readl(®->pllstat) & 0x1) == 1) + ; + + if (reg == davinci_pllc0_regs) { + writel(CONFIG_SYS_AM1808_PLL0_PLLDIV1, ®->plldiv1); + writel(CONFIG_SYS_AM1808_PLL0_PLLDIV2, ®->plldiv2); + writel(CONFIG_SYS_AM1808_PLL0_PLLDIV3, ®->plldiv3); + writel(CONFIG_SYS_AM1808_PLL0_PLLDIV4, ®->plldiv4); + writel(CONFIG_SYS_AM1808_PLL0_PLLDIV5, ®->plldiv5); + writel(CONFIG_SYS_AM1808_PLL0_PLLDIV6, ®->plldiv6); + wri
[U-Boot] [PATCH 3/8] arm, davinci, am1808, gpio: add missing defines for bank 8
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/include/asm/arch-davinci/gpio.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/gpio.h b/arch/arm/include/asm/arch-davinci/gpio.h index 29dcccf..ef65ffb 100644 --- a/arch/arm/include/asm/arch-davinci/gpio.h +++ b/arch/arm/include/asm/arch-davinci/gpio.h @@ -35,6 +35,7 @@ #define DAVINCI_GPIO_BANK230x01E26038 #define DAVINCI_GPIO_BANK450x01E26060 #define DAVINCI_GPIO_BANK670x01E26088 +#define DAVINCI_GPIO_BANK8 0x01E260B0 #endif /* CONFIG_SOC_DA8XX */ struct davinci_gpio { @@ -62,6 +63,7 @@ struct davinci_gpio_bank { #define davinci_gpio_bank23 ((struct davinci_gpio *)DAVINCI_GPIO_BANK23) #define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45) #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) +#define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8) #define gpio_status() gpio_info() #define GPIO_NAME_SIZE 20 -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/8] arm, davinci: add SYSCFG1 base and register struct
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/include/asm/arch-davinci/hardware.h | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 19ab680..dcc71d6 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -142,6 +142,7 @@ typedef volatile unsigned int * dv_reg_p; #define DAVINCI_EMAC_WRAPPER_CNTRL_REGS_BASE 0x01e22000 #define DAVINCI_EMAC_WRAPPER_RAM_BASE 0x01e2 #define DAVINCI_MDIO_CNTRL_REGS_BASE 0x01e24000 +#define DAVINCI_SYSCFG1_BASE 0x01e2c000 #define DAVINCI_MMC_SD0_BASE 0x01c4 #define DAVINCI_MMC_SD1_BASE 0x01e1b000 #define DAVINCI_TIMER2_BASE0x01f0c000 @@ -448,6 +449,21 @@ struct davinci_syscfg_regs { #define DAVINCI_SYSCFG_SUSPSRC_UART2 (1 << 20) #define DAVINCI_SYSCFG_SUSPSRC_TIMER0 (1 << 27) +struct davinci_syscfg1_regs { + dv_reg vtpio_ctl; + dv_reg ddr_slew; + dv_reg deepsleep; + dv_reg pupd_ena; + dv_reg pupd_sel; + dv_reg rxactive; + dv_reg pwrdwn; +}; + +#define davinci_syscfg1_regs \ + ((struct davinci_syscfg1_regs *)DAVINCI_SYSCFG1_BASE) + +#define DDR_SLEW_CMOSEN_BIT4 + /* Interrupt controller */ struct davinci_aintc_regs { dv_reg revid; -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/8] arm, davinci, da8xx: add cpuinfo
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/cpu/arm926ejs/davinci/cpu.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/davinci/cpu.c b/arch/arm/cpu/arm926ejs/davinci/cpu.c index b705dfd..02819f6 100644 --- a/arch/arm/cpu/arm926ejs/davinci/cpu.c +++ b/arch/arm/cpu/arm926ejs/davinci/cpu.c @@ -115,7 +115,18 @@ int clk_get(enum davinci_clk_ids id) out: return pll_out; } -#endif /* CONFIG_SOC_DA8XX */ +#ifdef CONFIG_DISPLAY_CPUINFO +int print_cpuinfo(void) +{ + printf("Cores: ARM %d MHz", + clk_get(DAVINCI_ARM_CLKID) / 100); + printf("\nDDR: %d MHz\n", + /* DDR PHY uses an x2 input clock */ + clk_get(0x10001) / 100); + return 0; +} +#endif +#else /* CONFIG_SOC_DA8XX */ #ifdef CONFIG_DISPLAY_CPUINFO @@ -194,7 +205,8 @@ unsigned int davinci_arm_clk_get() return pll_sysclk_mhz(DAVINCI_PLL_CNTRL0_BASE, ARM_PLLDIV) * 100; } #endif -#endif +#endif /* CONFIG_DISPLAY_CPUINFO */ +#endif /* !CONFIG_SOC_DA8XX */ /* * Initializes on-chip ethernet controllers. -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/8] arm, davinci: add support for the am1808 based enbw_cmc board
Cores: ARM 456 MHz DDR: 300 MHz I2C: ready DRAM: 64 MiB WARNING: Caches not enabled Flash: 2 MiB NAND: 128 MiB In:serial Out: serial Err: serial Net: DaVinci-EMAC The enbw_cmc board boots from NOR flash with the NOR direct boot method. Heiko Schocher (8): arm, davinci: add SYSCFG1 base and register struct arm, davinci: add some missing defines in hardware.h arm, davinci, am1808, gpio: add missing defines for bank 8 arm, davinci: add ddr2 definition arm, davinci: add NOR Boot Configuration Word arm, davinci, am1808: add lowlevel functions for booting from NOR arm, davinci, da8xx: add cpuinfo arm, davinci: add support for am1808 based enbw_cmc board arch/arm/cpu/arm926ejs/davinci/Makefile|1 + arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c | 428 +++ arch/arm/cpu/arm926ejs/davinci/cpu.c | 16 +- arch/arm/cpu/arm926ejs/start.S |9 + .../arm/include/asm/arch-davinci/am1808_lowlevel.h | 44 ++ arch/arm/include/asm/arch-davinci/ddr2_defs.h | 96 arch/arm/include/asm/arch-davinci/gpio.h |2 + arch/arm/include/asm/arch-davinci/hardware.h | 27 + board/enbw/enbw_cmc/Makefile | 51 ++ board/enbw/enbw_cmc/enbw_cmc.c | 574 boards.cfg |1 + doc/README.davinci |9 + include/configs/enbw_cmc.h | 440 +++ 13 files changed, 1696 insertions(+), 2 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c create mode 100644 arch/arm/include/asm/arch-davinci/am1808_lowlevel.h create mode 100644 arch/arm/include/asm/arch-davinci/ddr2_defs.h create mode 100644 board/enbw/enbw_cmc/Makefile create mode 100644 board/enbw/enbw_cmc/enbw_cmc.c create mode 100644 include/configs/enbw_cmc.h The following patches are also needed for this board support: [U-Boot] : davinci: Replace CONFIG_PRELOADER with CONFIG_SPL_BUILD in board/davinci/common/misc.c http://patchwork.ozlabs.org/patch/114482/ [U-Boot] arm, fdt: update ethernet mac address before booting Linux http://patchwork.ozlabs.org/patch/114736/ [U-Boot] CFI: trigger watchdog in write_buf() http://patchwork.ozlabs.org/patch/114737/ [U-Boot] net, davinci_emac: make less verbose - turn printf() into debug() http://patchwork.ozlabs.org/patch/114738/ [U-Boot] i2c, davinci: add i2c set speed http://patchwork.ozlabs.org/patch/114739/ [U-Boot] arm, logbuffer: make it compileclean http://patchwork.ozlabs.org/patch/114740/ [U-Boot] post, arm: make post support for arm compile clean http://patchwork.ozlabs.org/patch/114741/ [U-Boot] cosmetic, post: Codingstyle cleanup http://patchwork.ozlabs.org/patch/114742/ [U-Boot] arm, post: add missing post_time_ms for arm http://patchwork.ozlabs.org/patch/114743/ [U-Boot] net, davinci_emac: add KSZ8864 switch http://patchwork.ozlabs.org/patch/114744/ [U-Boot] net, davinci_emac: let the EMAC detect the PHYs http://patchwork.ozlabs.org/patch/114745/ [U-Boot,1/3] arm, davinci: move davinci_timer in header file http://patchwork.ozlabs.org/patch/114747/ [U-Boot,2/3] arm, davinci: add missing timer baseaddresses for !DA8xx cpu http://patchwork.ozlabs.org/patch/114746/ [U-Boot,3/3] arm, davinci: add internal WDT support for AM1808 cpus http://patchwork.ozlabs.org/patch/114748/ [U-Boot,1/2] arm, davinci: add RTC base addr http://patchwork.ozlabs.org/patch/114749/ [U-Boot,2/2] rtc, davinci: add support for davinci internal RTC http://patchwork.ozlabs.org/patch/114750/ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/8] arm, davinci: add NOR Boot Configuration Word
to add the "NOR Boot Configuration Word" on AM18xx based boards, define CONFIG_SYS_DV_NOR_BOOT_CFG. Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/cpu/arm926ejs/start.S |9 + doc/README.davinci |9 + 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 16e35c2..9d0e3d7 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -51,9 +51,18 @@ */ +#ifdef CONFIG_SYS_DV_NOR_BOOT_CFG .globl _start _start: +.globl _NOR_BOOT_CFG +_NOR_BOOT_CFG: + .word CONFIG_SYS_DV_NOR_BOOT_CFG b reset +#else +.globl _start +_start: + b reset +#endif #ifdef CONFIG_SPL_BUILD /* No exception handlers in preloader */ ldr pc, _hang diff --git a/doc/README.davinci b/doc/README.davinci index 0204372..5f1bdc8 100644 --- a/doc/README.davinci +++ b/doc/README.davinci @@ -139,3 +139,12 @@ http://www.spectrumdigital.com/product_info.php?cPath=37&products_id=214 7) TI DA850 EVM http://focus.ti.com/docs/prod/folders/print/omap-l138.html http://www.logicpd.com/products/development-kits/zoom-omap-l138-evm-development-kit + +Davinci special defines +=== + +CONFIG_SYS_DV_NOR_BOOT_CFG:AM18xx based boards, booting in NOR Boot mode + need a "NOR Boot Configuration Word" stored + in the NOR Flash. This define adds this. + More Info about this, see: + spraba5a.pdf chapter 3.1 -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] rtc, davinci: add support for davinci internal RTC
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- drivers/rtc/Makefile |1 + drivers/rtc/davinci.c | 125 + 2 files changed, 126 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/davinci.c diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index ca27745..df440c6 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -30,6 +30,7 @@ LIB = $(obj)librtc.o COBJS-$(CONFIG_RTC_AT91SAM9_RTT) += at91sam9_rtt.o COBJS-$(CONFIG_RTC_BFIN) += bfin_rtc.o COBJS-y += date.o +COBJS-$(CONFIG_RTC_DAVINCI) += davinci.o COBJS-$(CONFIG_RTC_DS12887) += ds12887.o COBJS-$(CONFIG_RTC_DS1302) += ds1302.o COBJS-$(CONFIG_RTC_DS1306) += ds1306.o diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c new file mode 100644 index 000..8436cbf --- /dev/null +++ b/drivers/rtc/davinci.c @@ -0,0 +1,125 @@ +/* + * (C) Copyright 2011 DENX Software Engineering GmbH + * Heiko Schocher + * + * 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 +#include +#include +#include +#include + +#if defined(CONFIG_CMD_DATE) +struct davinci_rtc { + u_int32_t second; + u_int32_t minutes; + u_int32_t hours; + u_int32_t day; + u_int32_t month; /* 0x10 */ + u_int32_t year; + u_int32_t dotw; + u_int32_t resv1; + u_int32_t alarmsecond; /* 0x20 */ + u_int32_t alarmminute; + u_int32_t alarmhour; + u_int32_t alarmday; + u_int32_t alarmmonth; /* 0x30 */ + u_int32_t alarmyear; + u_int32_t resv2[2]; + u_int32_t ctrl; /* 0x40 */ + u_int32_t status; + u_int32_t irq; +}; + +#define RTC_STATE_BUSY 0x01 +#define RTC_STATE_RUN 0x02 + +#define davinci_rtc_base ((struct davinci_rtc *)DAVINCI_RTC_BASE) + +int rtc_get(struct rtc_time *tmp) +{ + struct davinci_rtc *rtc = davinci_rtc_base; + unsigned long sec, min, hour, mday, wday, mon_cent, year; + unsigned long status; + + status = readl(&rtc->status); + if ((status & RTC_STATE_RUN) != RTC_STATE_RUN) { + printf("RTC doesn't run\n"); + return -1; + } + if ((status & RTC_STATE_BUSY) == RTC_STATE_BUSY) + udelay(20); + + sec = readl(&rtc->second); + min = readl(&rtc->minutes); + hour= readl(&rtc->hours); + mday= readl(&rtc->day); + wday= readl(&rtc->dotw); + mon_cent = readl(&rtc->month); + year= readl(&rtc->year); + + debug("Get RTC year: %02lx mon/cent: %02lx mday: %02lx wday: %02lx " + "hr: %02lx min: %02lx sec: %02lx\n", + year, mon_cent, mday, wday, + hour, min, sec); + + tmp->tm_sec = bcd2bin(sec & 0x7F); + tmp->tm_min = bcd2bin(min & 0x7F); + tmp->tm_hour = bcd2bin(hour & 0x3F); + tmp->tm_mday = bcd2bin(mday & 0x3F); + tmp->tm_mon = bcd2bin(mon_cent & 0x1F); + tmp->tm_year = bcd2bin(year) + 2000; + tmp->tm_wday = bcd2bin(wday & 0x07); + tmp->tm_yday = 0; + tmp->tm_isdst = 0; + + debug("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", + tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + + return 0; +} + +int rtc_set(struct rtc_time *tmp) +{ + struct davinci_rtc *rtc = davinci_rtc_base; + + debug("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", + tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + writel(bin2bcd(tmp->tm_year % 100), &rtc->year); + writel(bin2bcd(tmp->tm_mon), &rtc->month); + + writel(bin2bcd(tmp->tm_wday), &rtc->dotw); + writel(bin2bcd(tmp->tm_mday), &rtc->day); + writel(bin2bcd(tmp->tm_hour), &rtc->hours); + writel(bin2bcd(tmp->tm_min), &rtc->minutes); + writel(bin2bcd(tmp->tm_sec), &rtc->second); + return 0; +} + +void rtc_reset(void) +{ + struct davinci_rtc *rtc = davinci_rtc_base; + + /* run RTC counter */ +
[U-Boot] [PATCH 0/2] arm, davinci: add rtc support
Cc: Paulraj Sandeep Cc: Albert ARIBAUD Heiko Schocher (2): arm, davinci: add RTC base addr rtc, davinci: add support for davinci internal RTC arch/arm/include/asm/arch-davinci/hardware.h |1 + drivers/rtc/Makefile |1 + drivers/rtc/davinci.c| 125 ++ 3 files changed, 127 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/davinci.c -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] arm, davinci: add RTC base addr
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/include/asm/arch-davinci/hardware.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 78680e6..19ab680 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -128,6 +128,7 @@ typedef volatile unsigned int * dv_reg_p; #define DAVINCI_TIMER0_BASE0x01c2 #define DAVINCI_TIMER1_BASE0x01c21000 #define DAVINCI_WDOG_BASE 0x01c21000 +#define DAVINCI_RTC_BASE 0x01c23000 #define DAVINCI_PLL_CNTRL0_BASE0x01c11000 #define DAVINCI_PLL_CNTRL1_BASE0x01e1a000 #define DAVINCI_PSC0_BASE 0x01c1 -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] arm, davinci: add internal WDT support for AM1808 cpus
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/cpu/arm926ejs/davinci/timer.c | 31 arch/arm/include/asm/arch-davinci/timer_defs.h |4 +++ 2 files changed, 35 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/davinci/timer.c b/arch/arm/cpu/arm926ejs/davinci/timer.c index 2e7ba48..c7bf7a5 100644 --- a/arch/arm/cpu/arm926ejs/davinci/timer.c +++ b/arch/arm/cpu/arm926ejs/davinci/timer.c @@ -108,3 +108,34 @@ ulong get_tbclk(void) { return CONFIG_SYS_HZ; } + +#ifdef CONFIG_HW_WATCHDOG +static struct davinci_timer * const wdttimer = + (struct davinci_timer *)CONFIG_SYS_WDTTIMERBASE; + +/* + * See prufw2.pdf for using Timer as a WDT + */ +void davinci_hw_watchdog_enable(void) +{ + writel(0x0, &wdttimer->tcr); + writel(0x0, &wdttimer->tgcr); + /* TIMMODE = 2h */ + writel(0x08 | 0x03 | ((TIM_CLK_DIV - 1) << 8), &wdttimer->tgcr); + writel(CONFIG_SYS_WDT_PERIOD_LOW, &wdttimer->prd12); + writel(CONFIG_SYS_WDT_PERIOD_HIGH, &wdttimer->prd34); + writel(2 << 22, &wdttimer->tcr); + writel(0x0, &wdttimer->tim12); + writel(0x0, &wdttimer->tim34); + /* set WDEN bit, WDKEY 0xa5c6 */ + writel(0xa5c64000, &wdttimer->wdtcr); + /* clear counter register */ + writel(0xda7e4000, &wdttimer->wdtcr); +} + +void davinci_hw_watchdog_reset(void) +{ + writel(0xa5c64000, &wdttimer->wdtcr); + writel(0xda7e4000, &wdttimer->wdtcr); +} +#endif diff --git a/arch/arm/include/asm/arch-davinci/timer_defs.h b/arch/arm/include/asm/arch-davinci/timer_defs.h index 2a20e49..53c961e 100644 --- a/arch/arm/include/asm/arch-davinci/timer_defs.h +++ b/arch/arm/include/asm/arch-davinci/timer_defs.h @@ -37,4 +37,8 @@ struct davinci_timer { u_int32_t wdtcr; }; +#ifdef CONFIG_HW_WATCHDOG +void davinci_hw_watchdog_enable(void); +void davinci_hw_watchdog_reset(void); +#endif #endif /* _TIMER_DEFS_H_ */ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] arm, davinci: move davinci_timer in header file
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/cpu/arm926ejs/davinci/timer.c | 15 + arch/arm/include/asm/arch-davinci/timer_defs.h | 40 2 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 arch/arm/include/asm/arch-davinci/timer_defs.h diff --git a/arch/arm/cpu/arm926ejs/davinci/timer.c b/arch/arm/cpu/arm926ejs/davinci/timer.c index 8b1734c..2e7ba48 100644 --- a/arch/arm/cpu/arm926ejs/davinci/timer.c +++ b/arch/arm/cpu/arm926ejs/davinci/timer.c @@ -39,23 +39,10 @@ #include #include +#include DECLARE_GLOBAL_DATA_PTR; -struct davinci_timer { - u_int32_t pid12; - u_int32_t emumgt; - u_int32_t na1; - u_int32_t na2; - u_int32_t tim12; - u_int32_t tim34; - u_int32_t prd12; - u_int32_t prd34; - u_int32_t tcr; - u_int32_t tgcr; - u_int32_t wdtcr; -}; - static struct davinci_timer * const timer = (struct davinci_timer *)CONFIG_SYS_TIMERBASE; diff --git a/arch/arm/include/asm/arch-davinci/timer_defs.h b/arch/arm/include/asm/arch-davinci/timer_defs.h new file mode 100644 index 000..2a20e49 --- /dev/null +++ b/arch/arm/include/asm/arch-davinci/timer_defs.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2011 DENX Software Engineering GmbH + * Heiko Schocher + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +#ifndef _TIMER_DEFS_H_ +#define _TIMER_DEFS_H_ + +struct davinci_timer { + u_int32_t pid12; + u_int32_t emumgt; + u_int32_t na1; + u_int32_t na2; + u_int32_t tim12; + u_int32_t tim34; + u_int32_t prd12; + u_int32_t prd34; + u_int32_t tcr; + u_int32_t tgcr; + u_int32_t wdtcr; +}; + +#endif /* _TIMER_DEFS_H_ */ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] arm, davinci: add missing timer baseaddresses for !DA8xx cpu
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/include/asm/arch-davinci/hardware.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 692d507..78680e6 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -143,6 +143,8 @@ typedef volatile unsigned int * dv_reg_p; #define DAVINCI_MDIO_CNTRL_REGS_BASE 0x01e24000 #define DAVINCI_MMC_SD0_BASE 0x01c4 #define DAVINCI_MMC_SD1_BASE 0x01e1b000 +#define DAVINCI_TIMER2_BASE0x01f0c000 +#define DAVINCI_TIMER3_BASE0x01f0d000 #define DAVINCI_ASYNC_EMIF_CNTRL_BASE 0x6800 #define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x4000 #define DAVINCI_ASYNC_EMIF_DATA_CE2_BASE 0x6000 -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] arm, davinci: add wdt support
Cc: Paulraj Sandeep Cc: Albert ARIBAUD Heiko Schocher (3): arm, davinci: move davinci_timer in header file arm, davinci: add missing timer baseaddresses for !DA8xx cpu arm, davinci: add internal WDT support for AM1808 cpus arch/arm/cpu/arm926ejs/davinci/timer.c | 46 --- arch/arm/include/asm/arch-davinci/hardware.h |2 + arch/arm/include/asm/arch-davinci/timer_defs.h | 44 ++ 3 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 arch/arm/include/asm/arch-davinci/timer_defs.h -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] net, davinci_emac: let the EMAC detect the PHYs
Once the MDIO state machine has been initialized and enabled, it starts polling all 32 PHY addresses on the MDIO bus, looking for an active PHY. Add a 5 ms delay, so all PHYs are for sure detected. This problem was detected on the cmc board with a KSZ8864 switch. Signed-off-by: Heiko Schocher --- drivers/net/davinci_emac.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index d58c28b..a8905b8 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -680,6 +680,9 @@ int davinci_emac_initialize(void) davinci_eth_mdio_enable(); + /* let the EMAC detect the PHYs */ + udelay(5000); + for (i = 0; i < 256; i++) { if (readl(&adap_mdio->ALIVE)) break; -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] net, davinci_emac: add KSZ8864 switch
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- arch/arm/cpu/arm926ejs/davinci/Makefile |2 +- arch/arm/cpu/arm926ejs/davinci/ksz8873.c | 74 + arch/arm/include/asm/arch-davinci/emac_defs.h |6 ++ drivers/net/davinci_emac.c|7 ++ 4 files changed, 88 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/davinci/ksz8873.c diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile index 3183e6a..b38623a 100644 --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -32,7 +32,7 @@ COBJS-$(CONFIG_SOC_DM355) += dm355.o COBJS-$(CONFIG_SOC_DM365) += dm365.o COBJS-$(CONFIG_SOC_DM644X) += dm644x.o COBJS-$(CONFIG_SOC_DM646X) += dm646x.o -COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o +COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o SOBJS = reset.o diff --git a/arch/arm/cpu/arm926ejs/davinci/ksz8873.c b/arch/arm/cpu/arm926ejs/davinci/ksz8873.c new file mode 100644 index 000..88929aa --- /dev/null +++ b/arch/arm/cpu/arm926ejs/davinci/ksz8873.c @@ -0,0 +1,74 @@ +/* + * Micrel KSZ8873 PHY Driver for TI DaVinci + * (TMS320DM644x) based boards. + * + * Copyright (C) 2011 Heiko Schocher + * + * based on: + * National Semiconductor DP83848 PHY Driver for TI DaVinci + * (TMS320DM644x) based boards. + * + * Copyright (C) 2007 Sergey Kubushyn + * + * + * + * 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 +#include +#include +#include +#include + +#ifdef CONFIG_DRIVER_TI_EMAC + +#ifdef CONFIG_CMD_NET + +int ksz8873_is_phy_connected(int phy_addr) +{ + u_int16_t dummy; + + return davinci_eth_phy_read(phy_addr, MII_PHYSID1, &dummy); +} + +int ksz8873_get_link_speed(int phy_addr) +{ + emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR; + + /* we always have a link to the switch, 100 FD */ + writel((EMAC_MACCONTROL_MIIEN_ENABLE | + EMAC_MACCONTROL_FULLDUPLEX_ENABLE), + &emac->MACCONTROL); + return 1; +} + + +int ksz8873_init_phy(int phy_addr) +{ + return 1; +} + + +int ksz8873_auto_negotiate(int phy_addr) +{ + return dp83848_get_link_speed(phy_addr); +} +#endif /* CONFIG_CMD_NET */ +#endif /* CONFIG_DRIVER_ETHER */ diff --git a/arch/arm/include/asm/arch-davinci/emac_defs.h b/arch/arm/include/asm/arch-davinci/emac_defs.h index 4a4ee04..294a9a8 100644 --- a/arch/arm/include/asm/arch-davinci/emac_defs.h +++ b/arch/arm/include/asm/arch-davinci/emac_defs.h @@ -377,6 +377,12 @@ typedef struct int (*auto_negotiate)(int phy_addr); } phy_t; +#define PHY_KSZ8873(0x00221450) +int ksz8873_is_phy_connected(int phy_addr); +int ksz8873_get_link_speed(int phy_addr); +int ksz8873_init_phy(int phy_addr); +int ksz8873_auto_negotiate(int phy_addr); + #define PHY_LXT972 (0x001378e2) int lxt972_is_phy_connected(int phy_addr); int lxt972_get_link_speed(int phy_addr); diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 5b8ab2d..d58c28b 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -711,6 +711,13 @@ int davinci_emac_initialize(void) phy_id |= tmp & 0x; switch (phy_id) { + case PHY_KSZ8873: + sprintf(phy.name, "KSZ8873 @ 0x%02x", active_phy_addr); + phy.init = ksz8873_init_phy; + phy.is_phy_connected = ksz8873_is_phy_connected; + phy.get_link_speed = ksz8873_get_link_speed; + phy.auto_negotiate = ksz8873_auto_negotiate; + break; case PHY_LXT972: sprintf(phy.name, "LXT972 @ 0x%02x", active_phy_addr); phy.init = lxt972_init_phy; -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm, post: add missing post_time_ms for arm
Signed-off-by: Heiko Schocher Cc: Albert ARIBAUD --- post/post.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/post/post.c b/post/post.c index 6c59f91..0bfca75 100644 --- a/post/post.c +++ b/post/post.c @@ -488,7 +488,7 @@ void post_reloc(void) */ unsigned long post_time_ms(unsigned long base) { -#ifdef CONFIG_PPC +#if defined(CONFIG_PPC) || defined(CONFIG_ARM) return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ)) - base; #else -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cosmetic, post: Codingstyle cleanup
Signed-off-by: Heiko Schocher --- post/post.c | 138 +++--- 1 files changed, 64 insertions(+), 74 deletions(-) diff --git a/post/post.c b/post/post.c index 852d6a5..6c59f91 100644 --- a/post/post.c +++ b/post/post.c @@ -40,7 +40,7 @@ DECLARE_GLOBAL_DATA_PTR; #define BOOTMODE_MAGIC 0xDEAD -int post_init_f (void) +int post_init_f(void) { int res = 0; unsigned int i; @@ -55,9 +55,7 @@ int post_init_f (void) gd->post_init_f_time = post_time_ms(0); if (!gd->post_init_f_time) - { - printf("post/post.c: post_time_ms seems not to be implemented\n"); - } + printf("%s: post_time_ms not implemented\n", __FILE__); return res; } @@ -95,102 +93,97 @@ int post_hotkeys_pressed(void) __attribute__((weak, alias("__post_hotkeys_pressed"))); -void post_bootmode_init (void) +void post_bootmode_init(void) { - int bootmode = post_bootmode_get (0); + int bootmode = post_bootmode_get(0); int newword; - if (post_hotkeys_pressed() && !(bootmode & POST_POWERTEST)) { + if (post_hotkeys_pressed() && !(bootmode & POST_POWERTEST)) newword = BOOTMODE_MAGIC | POST_SLOWTEST; - } else if (bootmode == 0) { + else if (bootmode == 0) newword = BOOTMODE_MAGIC | POST_POWERON; - } else if (bootmode == POST_POWERON || bootmode == POST_SLOWTEST) { + else if (bootmode == POST_POWERON || bootmode == POST_SLOWTEST) newword = BOOTMODE_MAGIC | POST_NORMAL; - } else { + else /* Use old value */ newword = post_word_load () & ~POST_COLDBOOT; - } if (bootmode == 0) - { /* We are booting after power-on */ newword |= POST_COLDBOOT; - } - post_word_store (newword); + post_word_store(newword); /* Reset activity record */ gd->post_log_word = 0; } -int post_bootmode_get (unsigned int *last_test) +int post_bootmode_get(unsigned int *last_test) { - unsigned long word = post_word_load (); + unsigned long word = post_word_load(); int bootmode; - if ((word & 0x) != BOOTMODE_MAGIC) { + if ((word & 0x) != BOOTMODE_MAGIC) return 0; - } bootmode = word & 0x7F; - if (last_test && (bootmode & POST_POWERTEST)) { + if (last_test && (bootmode & POST_POWERTEST)) *last_test = (word >> 8) & 0xFF; - } return bootmode; } /* POST tests run before relocation only mark status bits */ -static void post_log_mark_start ( unsigned long testid ) +static void post_log_mark_start(unsigned long testid) { - gd->post_log_word |= (testid)<<16; + gd->post_log_word |= (testid) << 16; } -static void post_log_mark_succ ( unsigned long testid ) +static void post_log_mark_succ(unsigned long testid) { gd->post_log_word |= testid; } /* ... and the messages are output once we are relocated */ -void post_output_backlog ( void ) +void post_output_backlog(void) { int j; for (j = 0; j < post_list_size; j++) { if (gd->post_log_word & (post_list[j].testid<<16)) { - post_log ("POST %s ", post_list[j].cmd); + post_log("POST %s ", post_list[j].cmd); if (gd->post_log_word & post_list[j].testid) - post_log ("PASSED\n"); + post_log("PASSED\n"); else { - post_log ("FAILED\n"); - show_boot_progress (-31); + post_log("FAILED\n"); + show_boot_progress(-31); } } } } -static void post_bootmode_test_on (unsigned int last_test) +static void post_bootmode_test_on(unsigned int last_test) { - unsigned long word = post_word_load (); + unsigned long word = post_word_load(); word |= POST_POWERTEST; word |= (last_test & 0xFF) << 8; - post_word_store (word); + post_word_store(word); } -static void post_bootmode_test_off (void) +static void post_bootmode_test_off(void) { - unsigned long word = post_word_load (); + unsigned long word = post_word_load(); word &= ~POST_POWERTEST; - post_word_store (word); + post_word_store(word); } -static void post_get_flags (int *test_flags) +static void post_get_flags(int *test_flags) { int flag[] = { POST_POWERON, POST_NORMAL, POST_SLOWTEST, POST_CRITICAL }; @@ -203,9 +196,8 @@ static void post_get_flags (int *test_flags) int last; int i, j; - for (j = 0; j < post_list_size; j++) { + for (j = 0; j < post_list_size; j++)
[U-Boot] [PATCH] post, arm: make post support for arm compile clean
Signed-off-by: Heiko Schocher Cc: Albert ARIBAUD --- arch/arm/include/asm/global_data.h |4 arch/arm/lib/board.c |4 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 4fc51fd..a6e2ab9 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -41,6 +41,10 @@ typedef struct global_data { unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long fb_base;/* base address of frame buffer */ +#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER) + unsigned long post_log_word; /* Record POST activities */ + unsigned long post_init_f_time; /* When post_init_f started */ +#endif #ifdef CONFIG_FSL_ESDHC unsigned long sdhc_clk; #endif diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index f888548..d67e415 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -64,6 +64,10 @@ #include #endif +#if defined(CONFIG_POST) +#include +#endif + DECLARE_GLOBAL_DATA_PTR; ulong monitor_flash_len; -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm, logbuffer: make it compileclean
Signed-off-by: Heiko Schocher Cc: Albert ARIBAUD --- arch/arm/lib/board.c |5 - common/cmd_log.c |2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index a7fb251..f888548 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -60,6 +60,10 @@ #include "../drivers/net/lan91c96.h" #endif +#if defined(CONFIG_LOGBUFFER) +#include +#endif + DECLARE_GLOBAL_DATA_PTR; ulong monitor_flash_len; @@ -78,7 +82,6 @@ extern void rtl8019_get_enetaddr (uchar * addr); #include #endif - / * Coloured LED functionality diff --git a/common/cmd_log.c b/common/cmd_log.c index 0e89357..249614f 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -68,7 +68,7 @@ static char *lbuf; unsigned long __logbuffer_base(void) { - return CONFIG_SYS_SDRAM_BASE + gd->bd->bi_memsize - LOGBUFF_LEN; + return CONFIG_SYS_SDRAM_BASE + gd->ram_size - LOGBUFF_LEN; } unsigned long logbuffer_base (void) __attribute__((weak, alias("__logbuffer_base"))); -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fm-eth: Add ability for board code to disable a port
On Sep 15, 2011, at 12:11 AM, Wolfgang Denk wrote: > Dear Kumar Gala, > > In message you > wrote: >> >> Now you could say that we should deal with this via #defines. Which is >> true, however our reference boards allow for running in hundreds if not >> thousands of various possible HW configurations and we've tried to avoid >> having different builds for such things unless completely unavoidable. > > Understood and agreed. > >> So this gives the option to the board code to disable things if it knows >> based on some other information. In the specific case for the P3060QDS >> board, we have "add-on" cards that provide 4-ports of 1-gig SGMII. We >> can detect if one of these cards is in a slot. If the card is missing >> we can 'disable' the ports associated with the slot. > > Well, can you not turn this logic around, and come up in a > configuration with all ports disabled, and then enable only those > ports that are actually present? That appears to make much more sense > to me. Eventually it is even more efficient in terms of things > likepower cinsumption etc. ? Unfortuantely not. The HW makes the assumption you turn things off, not on. Once we turn something 'off' in the HW we can't turn it back 'on' as the SoC will gate the power to the block and only a hard reset will bring it back up. > [In the long run (maybe not so long actually) you can even do this > device tree based …] - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] i2c, davinci: add i2c set speed
Signed-off-by: Heiko Schocher Cc: Paulraj Sandeep Cc: Albert ARIBAUD --- drivers/i2c/davinci_i2c.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c index eee1cbd..5e3406d 100644 --- a/drivers/i2c/davinci_i2c.c +++ b/drivers/i2c/davinci_i2c.c @@ -119,6 +119,11 @@ void i2c_init(int speed, int slaveadd) udelay(1000); } +int i2c_set_bus_speed(unsigned int speed) +{ + i2c_init(speed, CONFIG_SYS_I2C_SLAVE); + return 0; +} int i2c_probe(u_int8_t chip) { -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] net, davinci_emac: make less verbose - turn printf() into debug()
The PHY driver was too verbose and corrupted the boot message display like this: ... Net: Ethernet PHY: KSZ8873 @ 0x02 DaVinci-EMAC ... Turn printf() into debug() so we get the expected output again: ... Net: DaVinci-EMAC ... Signed-off-by: Heiko Schocher cc: Paulraj Sandeep --- drivers/net/davinci_emac.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index c0b8929..5b8ab2d 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -740,7 +740,7 @@ int davinci_emac_initialize(void) phy.auto_negotiate = gen_auto_negotiate; } - printf("Ethernet PHY: %s\n", phy.name); + debug("Ethernet PHY: %s\n", phy.name); miiphy_register(phy.name, davinci_mii_phy_read, davinci_mii_phy_write); return(1); -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] CFI: trigger watchdog in write_buf()
Signed-off-by: Heiko Schocher Cc: Stefan Roese --- drivers/mtd/cfi_flash.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index ac91dfd..dbeed5f 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -40,6 +40,7 @@ #include #include #include +#include /* * This file implements a Common Flash Interface (CFI) driver for @@ -1350,6 +1351,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) src += i; cnt -= i; FLASH_SHOW_PROGRESS(scale, dots, digit, i); + WATCHDOG_RESET(); } #else while (cnt >= info->portwidth) { @@ -1362,6 +1364,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) wp += info->portwidth; cnt -= info->portwidth; FLASH_SHOW_PROGRESS(scale, dots, digit, info->portwidth); + WATCHDOG_RESET(); } #endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm, fdt: update ethernet mac address before booting Linux
Signed-off-by: Heiko Schocher Cc: Albert ARIBAUD Cc: Gerald van Baren --- arch/arm/lib/bootm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 802e833..afa0093 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -206,6 +206,8 @@ static int bootm_linux_fdt(int machid, bootm_headers_t *images) fixup_memory_node(*of_flat_tree); + fdt_fixup_ethernet(*of_flat_tree); + fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1); announce_and_cleanup(); -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fm-eth: Add ability for board code to disable a port
Dear Kumar Gala, In message you wrote: > > Now you could say that we should deal with this via #defines. Which is > true, however our reference boards allow for running in hundreds if not > thousands of various possible HW configurations and we've tried to avoid > having different builds for such things unless completely unavoidable. Understood and agreed. > So this gives the option to the board code to disable things if it knows > based on some other information. In the specific case for the P3060QDS > board, we have "add-on" cards that provide 4-ports of 1-gig SGMII. We > can detect if one of these cards is in a slot. If the card is missing > we can 'disable' the ports associated with the slot. Well, can you not turn this logic around, and come up in a configuration with all ports disabled, and then enable only those ports that are actually present? That appears to make much more sense to me. Eventually it is even more efficient in terms of things likepower cinsumption etc. ? [In the long run (maybe not so long actually) you can even do this device tree based ...] 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 "Text processing has made it possible to right-justify any idea, even one which cannot be justified on any other grounds." -- J. Finnegan, USC. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fm-eth: Add ability for board code to disable a port
On Sep 14, 2011, at 3:13 PM, Wolfgang Denk wrote: > Dear Kumar Gala, > > In message <1316020387-6252-1-git-send-email-ga...@kernel.crashing.org> you > wrote: >> The SoC configuration may have more ports enabled than a given board >> actually can utilize. Add a routinue that allows the board code to >> disable a port that it knows isn't being used. > > I don't get it. If you know you are not using / able to use a > specific port, then why do you enable it in the first place? > > First creating a mess and then needing extra code to clean it up seems > well, let's say suboptimal to me. > > Best regards, > > Wolfgang Denk :) An example is you pick a SERDES configuration that has 8 gig-e ports. You make the choice because you might need other SERDES options like PCIe that the configuration gives you. However you only wire up 2 or 4 of those 8 gig-e ports. The SoC still thinks its configured with 8-gige ports. Now you could say that we should deal with this via #defines. Which is true, however our reference boards allow for running in hundreds if not thousands of various possible HW configurations and we've tried to avoid having different builds for such things unless completely unavoidable. So this gives the option to the board code to disable things if it knows based on some other information. In the specific case for the P3060QDS board, we have "add-on" cards that provide 4-ports of 1-gig SGMII. We can detect if one of these cards is in a slot. If the card is missing we can 'disable' the ports associated with the slot. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] EfikaMX: Adjust undocumented magic constant in config file
This magic constant with zero documentation, when it's last 8 bits are set to 0x45, configures correctly the PERCLK dividers. Therefore the I2C operates correctly when divider computed from PERCLK. Note: This constant is written to CBCDR register in arch/arm/cpu/armv7/mx5/lowlevel_init.S, but it's written only once. The register is accessed three more times in the file, with different values written to it each time. Signed-off-by: Marek Vasut --- include/configs/efikamx.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/configs/efikamx.h b/include/configs/efikamx.h index d4e77c2..1fa29d2 100644 --- a/include/configs/efikamx.h +++ b/include/configs/efikamx.h @@ -284,6 +284,6 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) #define CONFIG_SYS_DDR_CLKSEL 0 -#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100 +#define CONFIG_SYS_CLKTL_CBCDR 0x59E35145 #endif -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4 V2] I2C: mxc_i2c rework
Rewrite the mxc_i2c driver. * This version is much closer to Linux implementation. * Fixes IPG_PERCLK being incorrectly used as clock source * Fixes behaviour of the driver on iMX51 * Clean up coding style a bit ;-) Signed-off-by: Marek Vasut --- drivers/i2c/mxc_i2c.c | 423 + 1 files changed, 290 insertions(+), 133 deletions(-) V2: Use PERCLK as a source. diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index ebde3c5..c817f9f 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -1,7 +1,15 @@ /* - * i2c driver for Freescale mx31 + * i2c driver for Freescale i.MX series * * (c) 2007 Pengutronix, Sascha Hauer + * (c) 2011 Marek Vasut + * + * Based on i2c-imx.c from linux kernel: + * Copyright (C) 2005 Torsten Koschorrek + * Copyright (C) 2005 Matthias Blaschke + * Copyright (C) 2007 RightHand Technologies, Inc. + * Copyright (C) 2008 Darius Augulis + * * * See file CREDITS for list of people who contributed to this * project. @@ -30,11 +38,13 @@ #include #include -#define IADR 0x00 -#define IFDR 0x04 -#define I2CR 0x08 -#define I2SR 0x0c -#define I2DR 0x10 +struct mxc_i2c_regs { + uint32_tiadr; + uint32_tifdr; + uint32_ti2cr; + uint32_ti2sr; + uint32_ti2dr; +}; #define I2CR_IEN (1 << 7) #define I2CR_IIEN (1 << 6) @@ -68,215 +78,362 @@ #endif #define I2C_MAX_TIMEOUT1 -#define I2C_MAX_RETRIES3 -static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144, -160, 192, 240, 288, 320, 384, 480, 576, 640, 768, 960, -1152, 1280, 1536, 1920, 2304, 2560, 3072, 3840}; +static u16 i2c_clk_div[50][2] = { + { 22, 0x20 }, { 24, 0x21 }, { 26, 0x22 }, { 28, 0x23 }, + { 30, 0x00 }, { 32, 0x24 }, { 36, 0x25 }, { 40, 0x26 }, + { 42, 0x03 }, { 44, 0x27 }, { 48, 0x28 }, { 52, 0x05 }, + { 56, 0x29 }, { 60, 0x06 }, { 64, 0x2A }, { 72, 0x2B }, + { 80, 0x2C }, { 88, 0x09 }, { 96, 0x2D }, { 104, 0x0A }, + { 112, 0x2E }, { 128, 0x2F }, { 144, 0x0C }, { 160, 0x30 }, + { 192, 0x31 }, { 224, 0x32 }, { 240, 0x0F }, { 256, 0x33 }, + { 288, 0x10 }, { 320, 0x34 }, { 384, 0x35 }, { 448, 0x36 }, + { 480, 0x13 }, { 512, 0x37 }, { 576, 0x14 }, { 640, 0x38 }, + { 768, 0x39 }, { 896, 0x3A }, { 960, 0x17 }, { 1024, 0x3B }, + { 1152, 0x18 }, { 1280, 0x3C }, { 1536, 0x3D }, { 1792, 0x3E }, + { 1920, 0x1B }, { 2048, 0x3F }, { 2304, 0x1C }, { 2560, 0x1D }, + { 3072, 0x1E }, { 3840, 0x1F } +}; + +static u8 clk_idx; -static inline void i2c_reset(void) -{ - writew(0, I2C_BASE + I2CR); /* Reset module */ - writew(0, I2C_BASE + I2SR); - writew(I2CR_IEN, I2C_BASE + I2CR); -} - -void i2c_init(int speed, int unused) +/* + * Calculate and set proper clock divider + */ +static void i2c_imx_set_clk(unsigned int rate) { - int freq; + struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; + unsigned int i2c_clk_rate; + unsigned int div; int i; #if defined(CONFIG_MX31) struct clock_control_regs *sc_regs = (struct clock_control_regs *)CCM_BASE; + /* start the required I2C clock */ writel(readl(&sc_regs->cgr0) | (3 << I2C_CLK_OFFSET), &sc_regs->cgr0); #endif - freq = mxc_get_clock(MXC_IPG_PERCLK); - for (i = 0; i < 0x1f; i++) - if (freq / div[i] <= speed) - break; + /* Divider value calculation */ + i2c_clk_rate = mxc_get_clock(MXC_IPG_PERCLK); + div = (i2c_clk_rate + rate - 1) / rate; + if (div < i2c_clk_div[0][0]) + i = 0; + else if (div > i2c_clk_div[ARRAY_SIZE(i2c_clk_div) - 1][0]) + i = ARRAY_SIZE(i2c_clk_div) - 1; + else + for (i = 0; i2c_clk_div[i][0] < div; i++) + ; + + /* Store divider value */ + clk_idx = i2c_clk_div[i][1]; + writeb(clk_idx, &i2c_regs->ifdr); +} - debug("%s: speed: %d\n", __func__, speed); +/* + * Reset I2C Controller + */ +void i2c_reset(void) +{ + struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; + + writeb(0, &i2c_regs->i2cr); /* Reset module */ + writeb(0, &i2c_regs->i2sr); +} - writew(i, I2C_BASE + IFDR); +/* + * Init I2C Bus + */ +void i2c_init(int speed, int unused) +{ + i2c_imx_set_clk(speed); i2c_reset(); } -static int wait_idle(void) +/* + * Wait for bus to be busy (or free if for_busy = 0) + * + * for_busy = 1: Wait for IBB to be asserted + * for_busy = 0: Wait for IBB to be de-asserted + */ +int i2c_imx_bus_busy(int for_busy) { + struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; + unsigned int temp; + int timeou
Re: [U-Boot] [PATCH V3+] I2C: mxc_i2c rework
On Thursday, September 15, 2011 04:26:17 AM Jason Hui wrote: > On Thu, Sep 15, 2011 at 10:07 AM, Marek Vasut wrote: > > On Thursday, September 15, 2011 03:43:42 AM Jason Hui wrote: > >> On Thu, Sep 15, 2011 at 3:39 AM, Marek Vasut wrote: > >> > On Friday, July 29, 2011 08:55:14 AM Jason Hui wrote: > >> >> Hi, Marek, > >> >> > >> >> On Thu, Jul 14, 2011 at 5:58 AM, Marek Vasut wrote: > >> >> > Rewrite the mxc_i2c driver. > >> >> > * This version is much closer to Linux implementation. > >> >> > * Fixes IPG_PERCLK being incorrectly used as clock source > >> >> > * Fixes behaviour of the driver on iMX51 > >> >> > * Clean up coding style a bit ;-) > >> >> > >> >> why you change i2c clock from IPG_PERCLK to IPG_CLK? > >> >> > >> >> [...] > >> > > >> > Ok, I investigated a bit deeper and I suspect the clock.c is the > >> > culprit. > >> > > >> > Apparently, the PERCLK doesn't run at the frequency the clock.c > >> > reports it runs on. Therefore, the i2c miscalculates the divider etc > >> > -- falling crap model (waterfall model). > >> > >> But apparently, the i2c function clock should be IPG_PERCLK not IPG > >> clock. And Linux also fix it already. > > > > Then there's bulls**t in your mx51 and mx53 datasheet or what ? > > Please refer to MCIMX51RM.PDF, page 305, > Table 7-41. PERCLK-dependent Module Clock Sources > PERCLK-dependent Module Clocks Associated CCGR Register > uart1_perclk > CCGR1 > uart2_perclk > uart3_perclk > i2c1 clocks > i2c2 clocks > epit1_highfreq > CCGR2 > epit2_highfreq > pwm1_highfreq > pwm2_highfreq > gpt_highfreq > owire clocks You see ... I'm starting to understand what is actually going wrong. The lowlevel_init.S is bloated with crap (why? why can't that be in cpu init C code ?) and there is this one part, where CBCDR is overwritten with a configurable value instead of hardcoded value. No documentation about that at all, but it's there ... and that's -- amongst other bugs -- my problem I assume. So I need to set this CONFIG_SYS_CLKTL_CBCDR to another magic value, now I get it. > > > besides, PERCLK > > is faster than IPGCLK on MX51 so it makes even less sense! > > I don't think PERCLK is always faster than IPG clock, it's configurable. > please refer to MCIMX51RM.PDF, page 307. Yea ... it's configurable via some undocumented macro in assembler code. Damn. Can you please comment on the other patches? Thanks > > >Can you please talk > > > > to the HW guys or whatever to clear this once and for all ? I smell noone > > really knows where the clock are sourced from and all this crap is just > > blind guessing. > > I have asked the IC module owner again. It confirms that I2C function > clock is ipg_perclk. > > Jason ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra2: Enable data cache
On Wednesday, September 14, 2011 11:13:40 Simon Glass wrote: > On Wed, Sep 14, 2011 at 6:10 AM, Aneesh V wrote: > >> not specific to your patch, but this seems kind of dumb to copy & paste > >> the same thing between all the arm sub arches/boards. why cant the > >> default enable_caches() look like this for arm: > >> void enable_caches(void) > >> { > >> #ifndef CONFIG_SYS_DCACHE_OFF > >> dcache_enable(); > >> #endif > >> #ifndef CONFIG_SYS_ICACHE_OFF > >> icache_enable(); > >> #endif > >> } > > > > That was how it was earlier. But then many boards were not cache ready > > and still didn't define CONFIG_SYS_DCACHE_OFF, so they were broken. So, > > the current situation is that the absence of CONFIG_SYS_DCACHE_OFF > > doesn't mean that the board is cache-ready. > > > > I like the suggestion made by Jason Liu, that of using > > CONFIG_SYS_DCACHE_ON instead. In the present situation ARM cpus that > > properly support cache handling seems to be in the minority, so > > CONFIG_SYS_DCACHE_ON may be more appropriate. But Wolfgang doesn't seem > > to like this. > > My concern with this is that the situation will never improve. At > least this way there will be an incentive to sort things out, since > one day the cache enable code will be in arch/arm/lib/board.c. I hope > it is soon, but it will need more driver support first. right ... this sounds like the sort of thing that takes much longer than it should. i'm not the arm maintainer, but it seems like it'd have been better to add CONFIG_SYS_{I,D}CACHE_OFF to all the arm board configs and leave it up to the maintainers to turn off. then there'd be no duplication in core code and no long term migration need. until that happens, CONFIG_SYS_{D,I}CACHE_ON sounds like a reasonable way to get things back under control. -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] [PATCH V3+] I2C: mxc_i2c rework
On Thu, Sep 15, 2011 at 10:07 AM, Marek Vasut wrote: > On Thursday, September 15, 2011 03:43:42 AM Jason Hui wrote: >> On Thu, Sep 15, 2011 at 3:39 AM, Marek Vasut wrote: >> > On Friday, July 29, 2011 08:55:14 AM Jason Hui wrote: >> >> Hi, Marek, >> >> >> >> On Thu, Jul 14, 2011 at 5:58 AM, Marek Vasut >> >> wrote: >> >> > Rewrite the mxc_i2c driver. >> >> > * This version is much closer to Linux implementation. >> >> > * Fixes IPG_PERCLK being incorrectly used as clock source >> >> > * Fixes behaviour of the driver on iMX51 >> >> > * Clean up coding style a bit ;-) >> >> >> >> why you change i2c clock from IPG_PERCLK to IPG_CLK? >> >> >> >> [...] >> > >> > Ok, I investigated a bit deeper and I suspect the clock.c is the culprit. >> > >> > Apparently, the PERCLK doesn't run at the frequency the clock.c reports >> > it runs on. Therefore, the i2c miscalculates the divider etc -- falling >> > crap model (waterfall model). >> >> But apparently, the i2c function clock should be IPG_PERCLK not IPG >> clock. And Linux also fix it already. > > Then there's bulls**t in your mx51 and mx53 datasheet or what ? Please refer to MCIMX51RM.PDF, page 305, Table 7-41. PERCLK-dependent Module Clock Sources PERCLK-dependent Module Clocks Associated CCGR Register uart1_perclk CCGR1 uart2_perclk uart3_perclk i2c1 clocks i2c2 clocks epit1_highfreq CCGR2 epit2_highfreq pwm1_highfreq pwm2_highfreq gpt_highfreq owire clocks > besides, PERCLK > is faster than IPGCLK on MX51 so it makes even less sense! I don't think PERCLK is always faster than IPG clock, it's configurable. please refer to MCIMX51RM.PDF, page 307. >Can you please talk > to the HW guys or whatever to clear this once and for all ? I smell noone > really > knows where the clock are sourced from and all this crap is just blind > guessing. I have asked the IC module owner again. It confirms that I2C function clock is ipg_perclk. Jason > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3+] I2C: mxc_i2c rework
On Thursday, September 15, 2011 03:43:42 AM Jason Hui wrote: > On Thu, Sep 15, 2011 at 3:39 AM, Marek Vasut wrote: > > On Friday, July 29, 2011 08:55:14 AM Jason Hui wrote: > >> Hi, Marek, > >> > >> On Thu, Jul 14, 2011 at 5:58 AM, Marek Vasut wrote: > >> > Rewrite the mxc_i2c driver. > >> > * This version is much closer to Linux implementation. > >> > * Fixes IPG_PERCLK being incorrectly used as clock source > >> > * Fixes behaviour of the driver on iMX51 > >> > * Clean up coding style a bit ;-) > >> > >> why you change i2c clock from IPG_PERCLK to IPG_CLK? > >> > >> [...] > > > > Ok, I investigated a bit deeper and I suspect the clock.c is the culprit. > > > > Apparently, the PERCLK doesn't run at the frequency the clock.c reports > > it runs on. Therefore, the i2c miscalculates the divider etc -- falling > > crap model (waterfall model). > > But apparently, the i2c function clock should be IPG_PERCLK not IPG > clock. And Linux also fix it already. Then there's bulls**t in your mx51 and mx53 datasheet or what ? besides, PERCLK is faster than IPGCLK on MX51 so it makes even less sense! Can you please talk to the HW guys or whatever to clear this once and for all ? I smell noone really knows where the clock are sourced from and all this crap is just blind guessing. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3+] I2C: mxc_i2c rework
On Thu, Sep 15, 2011 at 3:39 AM, Marek Vasut wrote: > On Friday, July 29, 2011 08:55:14 AM Jason Hui wrote: >> Hi, Marek, >> >> On Thu, Jul 14, 2011 at 5:58 AM, Marek Vasut wrote: >> > Rewrite the mxc_i2c driver. >> > * This version is much closer to Linux implementation. >> > * Fixes IPG_PERCLK being incorrectly used as clock source >> > * Fixes behaviour of the driver on iMX51 >> > * Clean up coding style a bit ;-) >> >> why you change i2c clock from IPG_PERCLK to IPG_CLK? >> >> [...] > > Ok, I investigated a bit deeper and I suspect the clock.c is the culprit. > > Apparently, the PERCLK doesn't run at the frequency the clock.c reports it > runs > on. Therefore, the i2c miscalculates the divider etc -- falling crap model > (waterfall model). But apparently, the i2c function clock should be IPG_PERCLK not IPG clock. And Linux also fix it already. commit 9d73242458d9a2fe26e2e240488063d414eacb1c Author: Lothar Waßmann Date: Mon Jul 4 15:52:17 2011 +0200 mach-mx5: fix the I2C clock parents The clock from which the I2C timing is derived is the ipg_perclk not ipg_clk. I2C bus frequency was lower by a factor of ~8 due to the clock divider calculation being based on 66.5MHz IPG clock while the bus actually uses 8MHz ipg_perclk. Kernel version: 3.0.0-rc2 branch 'imx-for-next' of git://git.pengutronix.de/git/imx/linux-2.6 Signed-off-by: Lothar Waßmann Signed-off-by: Sascha Hauer > > Anyway, Jason, can you look into that clock problem? I think there are more > than > just perclk miscalculated. OK, I will check that part. Jason > > Cheers > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] I2C: mxc_i2c rework
Rewrite the mxc_i2c driver. * This version is much closer to Linux implementation. * Fixes IPG_PERCLK being incorrectly used as clock source * Fixes behaviour of the driver on iMX51 * Clean up coding style a bit ;-) Signed-off-by: Marek Vasut --- drivers/i2c/mxc_i2c.c | 423 + 1 files changed, 290 insertions(+), 133 deletions(-) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index ebde3c5..bc0300d 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -1,7 +1,15 @@ /* - * i2c driver for Freescale mx31 + * i2c driver for Freescale i.MX series * * (c) 2007 Pengutronix, Sascha Hauer + * (c) 2011 Marek Vasut + * + * Based on i2c-imx.c from linux kernel: + * Copyright (C) 2005 Torsten Koschorrek + * Copyright (C) 2005 Matthias Blaschke + * Copyright (C) 2007 RightHand Technologies, Inc. + * Copyright (C) 2008 Darius Augulis + * * * See file CREDITS for list of people who contributed to this * project. @@ -30,11 +38,13 @@ #include #include -#define IADR 0x00 -#define IFDR 0x04 -#define I2CR 0x08 -#define I2SR 0x0c -#define I2DR 0x10 +struct mxc_i2c_regs { + uint32_tiadr; + uint32_tifdr; + uint32_ti2cr; + uint32_ti2sr; + uint32_ti2dr; +}; #define I2CR_IEN (1 << 7) #define I2CR_IIEN (1 << 6) @@ -68,215 +78,362 @@ #endif #define I2C_MAX_TIMEOUT1 -#define I2C_MAX_RETRIES3 -static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144, -160, 192, 240, 288, 320, 384, 480, 576, 640, 768, 960, -1152, 1280, 1536, 1920, 2304, 2560, 3072, 3840}; +static u16 i2c_clk_div[50][2] = { + { 22, 0x20 }, { 24, 0x21 }, { 26, 0x22 }, { 28, 0x23 }, + { 30, 0x00 }, { 32, 0x24 }, { 36, 0x25 }, { 40, 0x26 }, + { 42, 0x03 }, { 44, 0x27 }, { 48, 0x28 }, { 52, 0x05 }, + { 56, 0x29 }, { 60, 0x06 }, { 64, 0x2A }, { 72, 0x2B }, + { 80, 0x2C }, { 88, 0x09 }, { 96, 0x2D }, { 104, 0x0A }, + { 112, 0x2E }, { 128, 0x2F }, { 144, 0x0C }, { 160, 0x30 }, + { 192, 0x31 }, { 224, 0x32 }, { 240, 0x0F }, { 256, 0x33 }, + { 288, 0x10 }, { 320, 0x34 }, { 384, 0x35 }, { 448, 0x36 }, + { 480, 0x13 }, { 512, 0x37 }, { 576, 0x14 }, { 640, 0x38 }, + { 768, 0x39 }, { 896, 0x3A }, { 960, 0x17 }, { 1024, 0x3B }, + { 1152, 0x18 }, { 1280, 0x3C }, { 1536, 0x3D }, { 1792, 0x3E }, + { 1920, 0x1B }, { 2048, 0x3F }, { 2304, 0x1C }, { 2560, 0x1D }, + { 3072, 0x1E }, { 3840, 0x1F } +}; + +static u8 clk_idx; -static inline void i2c_reset(void) -{ - writew(0, I2C_BASE + I2CR); /* Reset module */ - writew(0, I2C_BASE + I2SR); - writew(I2CR_IEN, I2C_BASE + I2CR); -} - -void i2c_init(int speed, int unused) +/* + * Calculate and set proper clock divider + */ +static void i2c_imx_set_clk(unsigned int rate) { - int freq; + struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; + unsigned int i2c_clk_rate; + unsigned int div; int i; #if defined(CONFIG_MX31) struct clock_control_regs *sc_regs = (struct clock_control_regs *)CCM_BASE; + /* start the required I2C clock */ writel(readl(&sc_regs->cgr0) | (3 << I2C_CLK_OFFSET), &sc_regs->cgr0); #endif - freq = mxc_get_clock(MXC_IPG_PERCLK); - for (i = 0; i < 0x1f; i++) - if (freq / div[i] <= speed) - break; + /* Divider value calculation */ + i2c_clk_rate = mxc_get_clock(MXC_IPG_CLK); + div = (i2c_clk_rate + rate - 1) / rate; + if (div < i2c_clk_div[0][0]) + i = 0; + else if (div > i2c_clk_div[ARRAY_SIZE(i2c_clk_div) - 1][0]) + i = ARRAY_SIZE(i2c_clk_div) - 1; + else + for (i = 0; i2c_clk_div[i][0] < div; i++) + ; + + /* Store divider value */ + clk_idx = i2c_clk_div[i][1]; + writeb(clk_idx, &i2c_regs->ifdr); +} - debug("%s: speed: %d\n", __func__, speed); +/* + * Reset I2C Controller + */ +void i2c_reset(void) +{ + struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; + + writeb(0, &i2c_regs->i2cr); /* Reset module */ + writeb(0, &i2c_regs->i2sr); +} - writew(i, I2C_BASE + IFDR); +/* + * Init I2C Bus + */ +void i2c_init(int speed, int unused) +{ + i2c_imx_set_clk(speed); i2c_reset(); } -static int wait_idle(void) +/* + * Wait for bus to be busy (or free if for_busy = 0) + * + * for_busy = 1: Wait for IBB to be asserted + * for_busy = 0: Wait for IBB to be de-asserted + */ +int i2c_imx_bus_busy(int for_busy) { + struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; + unsigned int temp; + int timeout = I2C_MAX_TIMEOUT; - w
[U-Boot] [PATCH 3/4] MX5: Clean up the output of "clocks" command
The new output looks like this: > clocks PLL1800 MHz PLL2665 MHz PLL3216 MHz AHB 133000 kHz IPG 66500 kHz IPG PERCLK 665000 kHz Signed-off-by: Marek Vasut --- arch/arm/cpu/armv7/mx5/clock.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index a9fe81c..dd3615d 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -344,18 +344,20 @@ int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) u32 freq; freq = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_SYS_MX5_HCLK); - printf("pll1: %dMHz\n", freq / 100); + printf("PLL1 %8d MHz\n", freq / 100); freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_SYS_MX5_HCLK); - printf("pll2: %dMHz\n", freq / 100); + printf("PLL2 %8d MHz\n", freq / 100); freq = decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_SYS_MX5_HCLK); - printf("pll3: %dMHz\n", freq / 100); + printf("PLL3 %8d MHz\n", freq / 100); #ifdef CONFIG_MX53 freq = decode_pll(mxc_plls[PLL4_CLOCK], CONFIG_SYS_MX5_HCLK); - printf("pll4: %dMHz\n", freq / 100); + printf("PLL4 %8d MHz\n", freq / 100); #endif - printf("ahb clock : %dHz\n", mxc_get_clock(MXC_AHB_CLK)); - printf("ipg clock : %dHz\n", mxc_get_clock(MXC_IPG_CLK)); - printf("ipg per clock : %dHz\n", mxc_get_clock(MXC_IPG_PERCLK)); + + printf("\n"); + printf("AHB%8d kHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000); + printf("IPG%8d kHz\n", mxc_get_clock(MXC_IPG_CLK) / 1000); + printf("IPG PERCLK %8d kHz\n", mxc_get_clock(MXC_IPG_PERCLK) / 1000); return 0; } -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] MX5: Add AHB clock reporting and fix IPG clock reporting
Signed-off-by: Marek Vasut --- arch/arm/cpu/armv7/mx5/clock.c | 36 +++- 1 files changed, 27 insertions(+), 9 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 9f37f7f..a9fe81c 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -152,18 +152,35 @@ static u32 get_periph_clk(void) } /* + * Get the rate of ahb clock. + */ +static u32 get_ahb_clk(void) +{ + uint32_t freq, div, reg; + + freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_SYS_MX5_HCLK); + + reg = __raw_readl(&mxc_ccm->cbcdr); + div = ((reg & MXC_CCM_CBCDR_AHB_PODF_MASK) >> + MXC_CCM_CBCDR_AHB_PODF_OFFSET) + 1; + + return freq / div; +} + +/* * Get the rate of ipg clock. */ static u32 get_ipg_clk(void) { - u32 ahb_podf, ipg_podf; - - ahb_podf = __raw_readl(&mxc_ccm->cbcdr); - ipg_podf = (ahb_podf & MXC_CCM_CBCDR_IPG_PODF_MASK) >> - MXC_CCM_CBCDR_IPG_PODF_OFFSET; - ahb_podf = (ahb_podf & MXC_CCM_CBCDR_AHB_PODF_MASK) >> - MXC_CCM_CBCDR_AHB_PODF_OFFSET; - return get_periph_clk() / ((ahb_podf + 1) * (ipg_podf + 1)); + uint32_t freq, reg, div; + + freq = get_ahb_clk(); + + reg = __raw_readl(&mxc_ccm->cbcdr); + div = ((reg & MXC_CCM_CBCDR_IPG_PODF_MASK) >> + MXC_CCM_CBCDR_IPG_PODF_OFFSET) + 1; + + return freq / div; } /* @@ -290,7 +307,7 @@ unsigned int mxc_get_clock(enum mxc_clock clk) case MXC_ARM_CLK: return get_mcu_main_clk(); case MXC_AHB_CLK: - break; + return get_ahb_clk(); case MXC_IPG_CLK: return get_ipg_clk(); case MXC_IPG_PERCLK: @@ -336,6 +353,7 @@ int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) freq = decode_pll(mxc_plls[PLL4_CLOCK], CONFIG_SYS_MX5_HCLK); printf("pll4: %dMHz\n", freq / 100); #endif + printf("ahb clock : %dHz\n", mxc_get_clock(MXC_AHB_CLK)); printf("ipg clock : %dHz\n", mxc_get_clock(MXC_IPG_CLK)); printf("ipg per clock : %dHz\n", mxc_get_clock(MXC_IPG_PERCLK)); -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] MX5: Modify the PLL decoding algorithm
The PLL decoding algorithm didn't take into account many configuration bits. Adjust it according to Linux kernel. Also, add PLL4 for MX53. Signed-off-by: Marek Vasut --- arch/arm/cpu/armv7/mx5/clock.c | 77 ++ arch/arm/include/asm/arch-mx5/imx-regs.h |3 + 2 files changed, 70 insertions(+), 10 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 00610a0..9f37f7f 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -29,11 +29,13 @@ #include #include #include +#include enum pll_clocks { PLL1_CLOCK = 0, PLL2_CLOCK, PLL3_CLOCK, + PLL4_CLOCK, PLL_CLOCKS, }; @@ -41,25 +43,76 @@ struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = { [PLL1_CLOCK] = (struct mxc_pll_reg *)PLL1_BASE_ADDR, [PLL2_CLOCK] = (struct mxc_pll_reg *)PLL2_BASE_ADDR, [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR, +#ifdef CONFIG_MX53 + [PLL4_CLOCK] = (struct mxc_pll_reg *)PLL4_BASE_ADDR, +#endif }; +#defineMXC_DPLLC_CTL_HFSM (1 << 7) +#defineMXC_DPLLC_CTL_DPDCK0_2_EN (1 << 12) + +#defineMXC_DPLLC_OP_PDF_MASK 0xf +#defineMXC_DPLLC_OP_MFI_MASK (0xf << 4) +#defineMXC_DPLLC_OP_MFI_OFFSET 4 + +#defineMXC_DPLLC_MFD_MFD_MASK 0x7ff + +#defineMXC_DPLLC_MFN_MFN_MASK 0x7ff + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)MXC_CCM_BASE; /* - * Calculate the frequency of this pll. + * Calculate the frequency of PLLn. */ -static u32 decode_pll(struct mxc_pll_reg *pll, u32 infreq) +static uint32_t decode_pll(struct mxc_pll_reg *pll, uint32_t infreq) { - u32 mfi, mfn, mfd, pd; + uint32_t ctrl, op, mfd, mfn, mfi, pdf, ret; + uint64_t refclk, temp; + int32_t mfn_abs; + + ctrl = readl(&pll->ctrl); + + if (ctrl & MXC_DPLLC_CTL_HFSM) { + mfn = __raw_readl(&pll->hfs_mfn); + mfd = __raw_readl(&pll->hfs_mfd); + op = __raw_readl(&pll->hfs_op); + } else { + mfn = __raw_readl(&pll->mfn); + mfd = __raw_readl(&pll->mfd); + op = __raw_readl(&pll->op); + } - mfn = __raw_readl(&pll->mfn); - mfd = __raw_readl(&pll->mfd) + 1; - mfi = __raw_readl(&pll->op); - pd = (mfi & 0xF) + 1; - mfi = (mfi >> 4) & 0xF; - mfi = (mfi >= 5) ? mfi : 5; + mfd &= MXC_DPLLC_MFD_MFD_MASK; + mfn &= MXC_DPLLC_MFN_MFN_MASK; + pdf = op & MXC_DPLLC_OP_PDF_MASK; + mfi = (op & MXC_DPLLC_OP_MFI_MASK) >> MXC_DPLLC_OP_MFI_OFFSET; + + /* 21.2.3 */ + if (mfi < 5) + mfi = 5; + + /* Sign extend */ + if (mfn >= 0x0400) { + mfn |= 0xfc00; + mfn_abs = -mfn; + } else + mfn_abs = mfn; + + refclk = infreq * 2; + if (ctrl & MXC_DPLLC_CTL_DPDCK0_2_EN) + refclk *= 2; + + refclk /= pdf + 1; + temp = refclk * mfn_abs; + do_div(temp, mfd + 1); + ret = refclk * mfi; + + if ((int)mfn < 0) + ret -= temp; + else + ret += temp; - return ((4 * (infreq / 1000) * (mfi * mfd + mfn)) / (mfd * pd)) * 1000; + return ret; } /* @@ -279,6 +332,10 @@ int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("pll2: %dMHz\n", freq / 100); freq = decode_pll(mxc_plls[PLL3_CLOCK], CONFIG_SYS_MX5_HCLK); printf("pll3: %dMHz\n", freq / 100); +#ifdef CONFIG_MX53 + freq = decode_pll(mxc_plls[PLL4_CLOCK], CONFIG_SYS_MX5_HCLK); + printf("pll4: %dMHz\n", freq / 100); +#endif printf("ipg clock : %dHz\n", mxc_get_clock(MXC_IPG_CLK)); printf("ipg per clock : %dHz\n", mxc_get_clock(MXC_IPG_PERCLK)); diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h index a4e680b..8a0f9e6 100644 --- a/arch/arm/include/asm/arch-mx5/imx-regs.h +++ b/arch/arm/include/asm/arch-mx5/imx-regs.h @@ -100,6 +100,9 @@ #define PLL1_BASE_ADDR (AIPS2_BASE_ADDR + 0x0008) #define PLL2_BASE_ADDR (AIPS2_BASE_ADDR + 0x00084000) #define PLL3_BASE_ADDR (AIPS2_BASE_ADDR + 0x00088000) +#ifdef CONFIG_MX53 +#define PLL4_BASE_ADDR (AIPS2_BASE_ADDR + 0x0008c000) +#endif #define AHBMAX_BASE_ADDR (AIPS2_BASE_ADDR + 0x00094000) #define IIM_BASE_ADDR (AIPS2_BASE_ADDR + 0x00098000) #define CSU_BASE_ADDR (AIPS2_BASE_ADDR + 0x0009C000) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] Clock fix and MXC I2C rework series
First three patches in this series fix problems with clock decoding on MX5, the remaining patch reworks the MXC I2C driver. This is tested on: * MX51 EfikaSB * MX51 EfikaMX * MX53 QSB Marek Vasut (4): MX5: Modify the PLL decoding algorithm MX5: Add AHB clock reporting and fix IPG clock reporting MX5: Clean up the output of "clocks" command I2C: mxc_i2c rework arch/arm/cpu/armv7/mx5/clock.c | 125 +++-- arch/arm/include/asm/arch-mx5/imx-regs.h |3 + drivers/i2c/mxc_i2c.c| 423 -- 3 files changed, 394 insertions(+), 157 deletions(-) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/15 V2] iMX28: Add support for DENX M28EVK board
On Thursday, September 15, 2011 12:12:52 AM Mike Frysinger wrote: > 2011/9/14 Marek Vasut: > > On Wednesday, September 14, 2011 07:01:38 AM Mike Frysinger wrote: > >> On Wednesday, September 14, 2011 00:24:48 Marek Vasut wrote: > >> > On Wednesday, September 14, 2011 05:33:48 AM Mike Frysinger wrote: > >> > > On Tuesday, September 13, 2011 23:17:48 Marek Vasut wrote: > >> > > > On Wednesday, September 14, 2011 04:48:03 AM Mike Frysinger wrote: > >> > > > > On Tuesday, September 13, 2011 18:29:38 Marek Vasut wrote: > >> > > > > > --- /dev/null > >> > > > > > +++ b/board/denx/m28evk/Makefile > >> > > > > > > >> > > > > > +clean: > >> > > > > > + rm -f $(OBJS) > >> > > > > > + > >> > > > > > +distclean: clean > >> > > > > > + rm -f $(LIB) core *.bak .depend > >> > > > > > >> > > > > pretty sure these dont get used anywhere > >> > > > > >> > > > I suppose make clean would be the thing ? > >> > > > >> > > if you read the top level Makefile, you'll see that there is no > >> > > recursion for clean or distclean targets > >> > > >> > It makes sense, but then why does the rest of the boards still define > >> > it ? > >> > >> old cruft > >> > >> > If there was some major cleanup on this matter, this should have been > >> > removed from the board Makefiles too. > >> > >> i dont know the exact sequence of events, but this is the current state > >> of things. feel free to post a big cleanup patch :). > > > > Not until I get confirmation from someone involved it really is an old > > useless crap. > > lazy :P. Don't get me started ;-D > i'll send a patch then. Be sure to run it through makeall for all and every platform if necessary. > > (when i said "sequence of events", i meant change history which turned > this into unused cruft) Sure, I got your point. > -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/15 V2] iMX28: Add support for DENX M28EVK board
2011/9/14 Marek Vasut: > On Wednesday, September 14, 2011 07:01:38 AM Mike Frysinger wrote: >> On Wednesday, September 14, 2011 00:24:48 Marek Vasut wrote: >> > On Wednesday, September 14, 2011 05:33:48 AM Mike Frysinger wrote: >> > > On Tuesday, September 13, 2011 23:17:48 Marek Vasut wrote: >> > > > On Wednesday, September 14, 2011 04:48:03 AM Mike Frysinger wrote: >> > > > > On Tuesday, September 13, 2011 18:29:38 Marek Vasut wrote: >> > > > > > --- /dev/null >> > > > > > +++ b/board/denx/m28evk/Makefile >> > > > > > >> > > > > > +clean: >> > > > > > + rm -f $(OBJS) >> > > > > > + >> > > > > > +distclean: clean >> > > > > > + rm -f $(LIB) core *.bak .depend >> > > > > >> > > > > pretty sure these dont get used anywhere >> > > > >> > > > I suppose make clean would be the thing ? >> > > >> > > if you read the top level Makefile, you'll see that there is no >> > > recursion for clean or distclean targets >> > >> > It makes sense, but then why does the rest of the boards still define it >> > ? >> >> old cruft >> >> > If there was some major cleanup on this matter, this should have been >> > removed from the board Makefiles too. >> >> i dont know the exact sequence of events, but this is the current state of >> things. feel free to post a big cleanup patch :). > > Not until I get confirmation from someone involved it really is an old useless > crap. lazy :P. i'll send a patch then. (when i said "sequence of events", i meant change history which turned this into unused cruft) -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc460: read get_sys_info from CPR registers instead of STRP registers
< http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc460: read get_sys_info from CPR registers instead of STRP registers
< http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
On Wed, Sep 14, 2011 at 2:11 PM, Wolfgang Denk wrote: > Dear Grant Likely, > > In message <20110914164528.gm3...@ponder.secretlab.ca> you wrote: >> >> May I suggest an alternate approach? Rather than hard linking the dtb >> into the u-boot image, this would be so much more useful if the dtb >> can be concatenated to the u-boot binary so that it can be configured >> at install time. Otherwise, switching to .dtb doesn't seem to > > Actually the DTB address should _always_ be taken from an environment > variable, so we have full flexibility. That doesn't work so well when u-boot needs the dtb to initialize itself. However, once initialized, I completely agree that the dtb address should be in the env so that it can be changed as needed. g. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Simon, On Wed, Sep 14, 2011 at 01:24:31PM -0700, Simon Glass wrote: > On Wed, Sep 14, 2011 at 1:16 PM, Jason wrote: > > On Wed, Sep 14, 2011 at 01:05:58PM -0700, Simon Glass wrote: ... > >> Yes, ideally I would like to keep SOC-specific things out of it at > >> this stage, but I was asked for an example and had to choose > >> something! My hope is that we can have the base patch and then a > >> couple of architecture patches. > > > > Yes, I don't like putting fdt_decode_i2c() or fdt_decode_rtc() in > > common/fdt_decode.c ... The current implementation of fdt...i2c() is > > arch specific, and fdt...rtc() I know will only work for the simple > > integrated rtc with two registers. > > This is one of the things to resolve. I think we need an fdt_decode to > lighten the load of finding aliases, decoding addresses and the like, > but a bigger question is whether we want the various i2c drivers to > share decode logic. It will help make the drivers more similar, but > clearly means that they have to follow the lowest common denominator. > This is a bit like CONFIG_ works at present - and we are replacing the > CONFIG_ items. For i2c the configs might be CONFIG_SYS_I2C_SPEED and > the controller address (and maybe CONFIG_SYS_I2C_SLAVE). But we don't > deal with particular i2c config like pinmux settings etc. which are > not common across a lot of boards. So fdt_decode would deal with these > few common settings and leave specific drivers to do the rest. > > But if people are happy with the idea of fdt decode code bleeding more > into each driver, then fdt_decode just becomes a low-level helper > library, and does not have specific functions for decoding an i2c > node, a uart, etc. After working with it a little, this seems more natural. Clearly delineated. > That is perhaps more pure - my main concerns with > this are uptake (too hard to swtich a board over to fdt) and > consistency (everyone will use their own way of doing the same thing - > and we have enough of that in U-Boot already :-) If it becomes a problem, we can address it later. I much prefer a clean boundary to start with. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
On Wed, Sep 14, 2011 at 1:11 PM, Wolfgang Denk wrote: > Dear Grant Likely, > > In message <20110914164528.gm3...@ponder.secretlab.ca> you wrote: >> >> May I suggest an alternate approach? Rather than hard linking the dtb >> into the u-boot image, this would be so much more useful if the dtb >> can be concatenated to the u-boot binary so that it can be configured >> at install time. Otherwise, switching to .dtb doesn't seem to > > Actually the DTB address should _always_ be taken from an environment > variable, so we have full flexibility. Hi Wolfgang, That is not implemented in my RFC patch but is easy enough to do. The fdt is available very early (in board_init_f) so that it can handle the console UART. At that point we have access to the default environment only. Perhaps the behaviour you refer to should be called CONFIG_OF_ENVIRONMENT and be the default? If people want Grant's option then they can set CONFIG_OF_SEPARATE and it will be concatenated with U-Boot. One reason for CONFIG_OF_SEPARATE is that some SOCs are going to prefer the fdt to be loaded by the SOC boot ROM. For example, on Tegra, the boot ROM loads U-Boot into SDRAM. If the fdt is somewhere else in the flash, then U-Boot will need to load it after starting up since the boot ROM can't find it. But that means that it is not available very early. For example, if it is in SPI flash then the fdt is not available until after relocation, and so you can't use the serial console until then. Of course we could start with built-in default fdt and move to the loaded one later, but that's not very nice. It also ties into the build system - e.g. does the U-Boot makefile do the work for you, or do you need to take u-boot.bin and munge it yourself (or flash u-boot.bin and u-boot.dtb into separate places...) I have thought quite a bit about these issues in creating this RFC, and these are the sorts of things we need to get right for run-time config to work nicely. Regards, Simon > > > 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 > In the beginning there was nothing. > And the Lord said "Let There Be Light!" > And still there was nothing, but at least now you could see it. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] omap3+: Add OMAP support for cmd_gpio
On Wed, Sep 14, 2011 at 2:52 PM, Paulraj, Sandeep wrote: > > >> On Tue, Aug 16, 2011 at 5:17 PM, Joe Hershberger >> wrote: >> > Add a shim driver to drivers/gpio that maps the standard GPIO API to the >> OMAP GPIO API >> > Empty gpio.h is needed in the asm/arch dirs for omap3 and omap4 due to >> include in asm/gpio.h >> > >> > Signed-off-by: Joe Hershberger >> > Cc: Joe Hershberger >> > Cc: Sandeep Paulraj >> > --- >> > Changes for v2: >> > - Changed API to match common gpio API >> (http://patchwork.ozlabs.org/patch/109904/) >> > >> > arch/arm/include/asm/arch-omap3/gpio.h | 1 + >> > arch/arm/include/asm/arch-omap4/gpio.h | 1 + >> > drivers/gpio/Makefile | 1 + >> > drivers/gpio/omap_gpio.c | 64 >> >> > 4 files changed, 67 insertions(+), 0 deletions(-) >> > create mode 100644 arch/arm/include/asm/arch-omap3/gpio.h >> > create mode 100644 arch/arm/include/asm/arch-omap4/gpio.h >> > create mode 100644 drivers/gpio/omap_gpio.c >> >> Any word on this patch? > > > The OMAP GPIO driver was updated recently. > > http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=81bdc155c72ef9e093b388b90c58d8134d870976 > > http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=3b690ebbbf21303a3bac1f62d967c36cd8655ce0 > > http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=84c3b6312997de6f98114263159c8b9824f3d33d > > --Sandeep > Sounds good... I'll port my Panda Board support to use the common API. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Hi Jason, On Wed, Sep 14, 2011 at 1:16 PM, Jason wrote: > On Wed, Sep 14, 2011 at 01:05:58PM -0700, Simon Glass wrote: >> On Wed, Sep 14, 2011 at 12:50 PM, Jason wrote: >> > On Wed, Sep 14, 2011 at 10:45:59AM -0700, Simon Glass wrote: >> >> [snip] >> >> > 5.) run, then 'date' fails like so: >> >> > >> >> > find_alias_node: rtc0 >> >> > fdt_decode_next_alias failed. >> >> > Error decoding fdt for mvrtc. >> >> > ## Get date failed >> >> >> >> I don't actually see an alias in your fdt. And actually I left it out >> >> of mine, so that is understandable. For i2c I have: >> >> >> >> ... >> >> aliases { >> >> i2c0 = "/i2c@0x7000d000"; >> >> i2c1 = "/i2c@0x7000c000"; >> >> i2c2 = "/i2c@0x7000c400"; >> >> i2c3 = "/i2c@0x7000c500"; >> >> }; >> > >> > That worked! >> > >> > Marvell>> date >> > find_alias_node: rtc0 >> > Date: 2011-09-14 (Wednesday) Time: 14:04:54 >> > Marvell>> >> > >> >> Great! >> >> >> So I think you need to add a /alias node and try again. I can submit a >> >> new patch set with this and a couple of other things I want to change, >> >> but it would be good if you can get to the end first, in case you find >> >> other problems. >> > >> > I'll clean up what I have and post it RFC. >> >> OK good >> >> >> > I had the remove your fdt_decode_i2c() and clock.h include. The clock.h >> >> > include seems to be specific to the tegra2 and doesn't exist for >> >> > kirkwood. >> >> >> >> Yes that's right, it is just an example at this stage, and the idea of >> >> a periph_id is specific to Tegra at present. Patches 5 and 6 are just >> >> an example to show how to use it in code. >> > >> > Ok, I'll drop those from my branch to make a cleaner example. >> >> Yes, ideally I would like to keep SOC-specific things out of it at >> this stage, but I was asked for an example and had to choose >> something! My hope is that we can have the base patch and then a >> couple of architecture patches. > > Yes, I don't like putting fdt_decode_i2c() or fdt_decode_rtc() in > common/fdt_decode.c ... The current implementation of fdt...i2c() is > arch specific, and fdt...rtc() I know will only work for the simple > integrated rtc with two registers. This is one of the things to resolve. I think we need an fdt_decode to lighten the load of finding aliases, decoding addresses and the like, but a bigger question is whether we want the various i2c drivers to share decode logic. It will help make the drivers more similar, but clearly means that they have to follow the lowest common denominator. This is a bit like CONFIG_ works at present - and we are replacing the CONFIG_ items. For i2c the configs might be CONFIG_SYS_I2C_SPEED and the controller address (and maybe CONFIG_SYS_I2C_SLAVE). But we don't deal with particular i2c config like pinmux settings etc. which are not common across a lot of boards. So fdt_decode would deal with these few common settings and leave specific drivers to do the rest. But if people are happy with the idea of fdt decode code bleeding more into each driver, then fdt_decode just becomes a low-level helper library, and does not have specific functions for decoding an i2c node, a uart, etc. That is perhaps more pure - my main concerns with this are uptake (too hard to swtich a board over to fdt) and consistency (everyone will use their own way of doing the same thing - and we have enough of that in U-Boot already :-) Regards, Simon > > Let me rework it to the appropriate place and then I'll post. I'll also > remove the fdt...i2c(). > > thx, > > Jason. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
On Wed, Sep 14, 2011 at 01:05:58PM -0700, Simon Glass wrote: > On Wed, Sep 14, 2011 at 12:50 PM, Jason wrote: > > On Wed, Sep 14, 2011 at 10:45:59AM -0700, Simon Glass wrote: > > [snip] > >> > 5.) run, then 'date' fails like so: > >> > > >> > find_alias_node: rtc0 > >> > fdt_decode_next_alias failed. > >> > Error decoding fdt for mvrtc. > >> > ## Get date failed > >> > >> I don't actually see an alias in your fdt. And actually I left it out > >> of mine, so that is understandable. For i2c I have: > >> > >> ... > >> aliases { > >> i2c0 = "/i2c@0x7000d000"; > >> i2c1 = "/i2c@0x7000c000"; > >> i2c2 = "/i2c@0x7000c400"; > >> i2c3 = "/i2c@0x7000c500"; > >> }; > > > > That worked! > > > > Marvell>> date > > find_alias_node: rtc0 > > Date: 2011-09-14 (Wednesday) Time: 14:04:54 > > Marvell>> > > > > Great! > > >> So I think you need to add a /alias node and try again. I can submit a > >> new patch set with this and a couple of other things I want to change, > >> but it would be good if you can get to the end first, in case you find > >> other problems. > > > > I'll clean up what I have and post it RFC. > > OK good > > >> > I had the remove your fdt_decode_i2c() and clock.h include. The clock.h > >> > include seems to be specific to the tegra2 and doesn't exist for > >> > kirkwood. > >> > >> Yes that's right, it is just an example at this stage, and the idea of > >> a periph_id is specific to Tegra at present. Patches 5 and 6 are just > >> an example to show how to use it in code. > > > > Ok, I'll drop those from my branch to make a cleaner example. > > Yes, ideally I would like to keep SOC-specific things out of it at > this stage, but I was asked for an example and had to choose > something! My hope is that we can have the base patch and then a > couple of architecture patches. Yes, I don't like putting fdt_decode_i2c() or fdt_decode_rtc() in common/fdt_decode.c ... The current implementation of fdt...i2c() is arch specific, and fdt...rtc() I know will only work for the simple integrated rtc with two registers. Let me rework it to the appropriate place and then I'll post. I'll also remove the fdt...i2c(). thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fm-eth: Add ability for board code to disable a port
Dear Kumar Gala, In message <1316020387-6252-1-git-send-email-ga...@kernel.crashing.org> you wrote: > The SoC configuration may have more ports enabled than a given board > actually can utilize. Add a routinue that allows the board code to > disable a port that it knows isn't being used. I don't get it. If you know you are not using / able to use a specific port, then why do you enable it in the first place? First creating a mess and then needing extra code to clean it up seems well, let's say suboptimal to me. 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 Brontosaurus Principle: Organizations can grow faster than their brains can manage them in relation to their environment and to their own physiology: when this occurs, they are an endangered species. - Thomas K. Connellan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Dear Grant Likely, In message <20110914164528.gm3...@ponder.secretlab.ca> you wrote: > > May I suggest an alternate approach? Rather than hard linking the dtb > into the u-boot image, this would be so much more useful if the dtb > can be concatenated to the u-boot binary so that it can be configured > at install time. Otherwise, switching to .dtb doesn't seem to Actually the DTB address should _always_ be taken from an environment variable, so we have full flexibility. 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 In the beginning there was nothing. And the Lord said "Let There Be Light!" And still there was nothing, but at least now you could see it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] DMA drivers in U-Boot?
Dear Simon Schwarz, In message <4e70bf94.1030...@gmail.com> you wrote: > > I am working on integrating DMA into my SPL. As a matter of fact it is > already working fine. > > So, here are my questions: > - Is there an interest in having DMA drivers in U-Boot? (I only know of > one in /drivers) It depends. There are some devices which always use DMA, which cannot operated in any other way. Here the choice is simple :-) In all other cases, the question is about effort (code size, complexity) on one side, and win (reduction of boot time) on the other side. Eventually, two implementations might exist, and configuration optioons to select one. > (ATM the transfer of the Linux-image is more than three times faster > compared to the CPU copy) Numbers like these are usually driving arguments :-) 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, I'm not going to explain it. If you can't figure it out, you didn't want to know anyway... :-) - Larry Wall in <1991aug7.180856.2...@netlabs.com> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Hi Jason, On Wed, Sep 14, 2011 at 12:50 PM, Jason wrote: > Simon, > > On Wed, Sep 14, 2011 at 10:45:59AM -0700, Simon Glass wrote: [snip] >> > 5.) run, then 'date' fails like so: >> > >> > find_alias_node: rtc0 >> > fdt_decode_next_alias failed. >> > Error decoding fdt for mvrtc. >> > ## Get date failed >> >> I don't actually see an alias in your fdt. And actually I left it out >> of mine, so that is understandable. For i2c I have: >> >> ... >> aliases { >> i2c0 = "/i2c@0x7000d000"; >> i2c1 = "/i2c@0x7000c000"; >> i2c2 = "/i2c@0x7000c400"; >> i2c3 = "/i2c@0x7000c500"; >> }; > > That worked! > > Marvell>> date > find_alias_node: rtc0 > Date: 2011-09-14 (Wednesday) Time: 14:04:54 > Marvell>> > Great! >> So I think you need to add a /alias node and try again. I can submit a >> new patch set with this and a couple of other things I want to change, >> but it would be good if you can get to the end first, in case you find >> other problems. > > I'll clean up what I have and post it RFC. OK good >> > I had the remove your fdt_decode_i2c() and clock.h include. The clock.h >> > include seems to be specific to the tegra2 and doesn't exist for >> > kirkwood. >> >> Yes that's right, it is just an example at this stage, and the idea of >> a periph_id is specific to Tegra at present. Patches 5 and 6 are just >> an example to show how to use it in code. > > Ok, I'll drop those from my branch to make a cleaner example. Yes, ideally I would like to keep SOC-specific things out of it at this stage, but I was asked for an example and had to choose something! My hope is that we can have the base patch and then a couple of architecture patches. > > thx, > > Jason. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] omap3+: Add OMAP support for cmd_gpio
> On Tue, Aug 16, 2011 at 5:17 PM, Joe Hershberger > wrote: > > Add a shim driver to drivers/gpio that maps the standard GPIO API to the > OMAP GPIO API > > Empty gpio.h is needed in the asm/arch dirs for omap3 and omap4 due to > include in asm/gpio.h > > > > Signed-off-by: Joe Hershberger > > Cc: Joe Hershberger > > Cc: Sandeep Paulraj > > --- > > Changes for v2: > > - Changed API to match common gpio API > (http://patchwork.ozlabs.org/patch/109904/) > > > > arch/arm/include/asm/arch-omap3/gpio.h | 1 + > > arch/arm/include/asm/arch-omap4/gpio.h | 1 + > > drivers/gpio/Makefile | 1 + > > drivers/gpio/omap_gpio.c | 64 > > > 4 files changed, 67 insertions(+), 0 deletions(-) > > create mode 100644 arch/arm/include/asm/arch-omap3/gpio.h > > create mode 100644 arch/arm/include/asm/arch-omap4/gpio.h > > create mode 100644 drivers/gpio/omap_gpio.c > > Any word on this patch? The OMAP GPIO driver was updated recently. http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=81bdc155c72ef9e093b388b90c58d8134d870976 http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=3b690ebbbf21303a3bac1f62d967c36cd8655ce0 http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=84c3b6312997de6f98114263159c8b9824f3d33d --Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Simon, On Wed, Sep 14, 2011 at 10:45:59AM -0700, Simon Glass wrote: > On Wed, Sep 14, 2011 at 9:11 AM, Jason wrote: > > On Wed, Sep 14, 2011 at 08:47:25AM -0700, Simon Glass wrote: > >> On Wed, Sep 14, 2011 at 6:47 AM, Jason wrote: > >> > On Tue, Sep 13, 2011 at 02:06:56PM -0700, Simon Glass wrote: > >> >> On Tue, Sep 13, 2011 at 7:37 AM, Jason wrote: > >> >> > Added the remote, thanks. Once we figure out the mach-types thing, > >> >> > I'll > >> >> > try using the Marvell integrated RTC driver as a real-world example > >> >> > of a > >> >> > conversion to fdt. I'll probably have questions ;-) > >> >> > >> >> That sounds great. I've tried to make it fair straightforward - with > >> >> an option for building an fdt into U-Boot itself (i.e. don't define > >> >> CONFIG_OF_SEPARATE). This should allow you to use your current dev > >> >> flow. > >> > > >> > Okay, I have an initial version that compiles, but doesn't work. Which, > >> > surprisingly, is progress. ;-) I'll post the patch a little bit later > >> > after I make sure I'm not missing something dumb. > >> > >> A few hints: > >> > >> - define CONFIG_OF_EMBED to start with, since it will embed the fdt > >> inside U-Boot which is a good check that all is well. You can move to > >> the more useful CONFIG_OF_SEPARATE when you get that working > >> - there is a check in board.c that the fdt is accessible - if it is > >> dying early then it might be that (early board panic patch is still in > >> flight) > > > > Frustrating morning. Mainly due to the fact that I've been working with > > device trees all of two days. > > > > Here's what I did: > > 1.) applied your patches against v2011.09-rc1 (to get mvrtc.c) > > 2.) applied my dreamplug support patch > > 3.) modified drivers/rtc/mvrtc.c for OF support > > 4.) compile > > 5.) run, then 'date' fails like so: > > > > find_alias_node: rtc0 > > fdt_decode_next_alias failed. > > Error decoding fdt for mvrtc. > > ## Get date failed > > I don't actually see an alias in your fdt. And actually I left it out > of mine, so that is understandable. For i2c I have: > > ... > aliases { > i2c0 = "/i2c@0x7000d000"; > i2c1 = "/i2c@0x7000c000"; > i2c2 = "/i2c@0x7000c400"; > i2c3 = "/i2c@0x7000c500"; > }; That worked! Marvell>> date find_alias_node: rtc0 Date: 2011-09-14 (Wednesday)Time: 14:04:54 Marvell>> > So I think you need to add a /alias node and try again. I can submit a > new patch set with this and a couple of other things I want to change, > but it would be good if you can get to the end first, in case you find > other problems. I'll clean up what I have and post it RFC. > > > > Obviously, I've hacked it up abit to get more error reporting out. > > Here's my kirkwood-dreamplug.dts: > > > > # kirkwood-dreamplug.dts > > /dts-v1/; > > > > /include/ "kirkwood.dtsi" > > > > / { > > model = "Marvell Dreamplug"; > > compatible = "marvell,dreamplug", "marvell,kirkwood"; > > > > rtc@0xf1010300 { > > status = "ok"; > > }; > > }; > > # > > > > And the kirkwood.dtsi > > > > kirkwood.dtsi > > / { > > model = "Marvell Kirkwood"; > > compatible = "marvell,kirkwood"; > > #address-cells = <1>; > > #size-cells = <1>; > > > > cpus { > > #address-cells = <1>; > > #size-cells = <0>; > > cpu@0 { > > compatible = "arm,arm926ejs"; > > reg = <0>; > > }; > > }; > > > > rtc@0xf1010300 { > > compatible = "marvell,kirkwood-rtc"; > > reg = <0xf1010300 0x02>; > > status = "disabled"; > > }; > > }; > > ### > > > > I'd like to make sure my dts files are correct before I get to debugging > > code. ;-) > > > > A few notes: > > > > If I compile with '#define DEBUG' in my board config, it builds, but > > doesn't run, or at least, there's no output on the serial port. > > That's because you are getting output prior to relocation. Graeme has > a patch for that, and I also sent a patch for pre-console panic (which > I will update once his patch goes in). Okay, since I now have some success, I can build off of that. I'll just work without debug for now. > > I had the remove your fdt_decode_i2c() and clock.h include. The clock.h > > include seems to be specific to the tegra2 and doesn't exist for > > kirkwood. > > Yes that's right, it is just an example at this stage, and the idea of > a periph_id is specific to Tegra at present. Patches 5 and 6 are just > an example to show how to use it in code. Ok, I'll drop those from my branch to make a cleaner example. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3+] I2C: mxc_i2c rework
On Friday, July 29, 2011 08:55:14 AM Jason Hui wrote: > Hi, Marek, > > On Thu, Jul 14, 2011 at 5:58 AM, Marek Vasut wrote: > > Rewrite the mxc_i2c driver. > > * This version is much closer to Linux implementation. > > * Fixes IPG_PERCLK being incorrectly used as clock source > > * Fixes behaviour of the driver on iMX51 > > * Clean up coding style a bit ;-) > > why you change i2c clock from IPG_PERCLK to IPG_CLK? > > [...] Ok, I investigated a bit deeper and I suspect the clock.c is the culprit. Apparently, the PERCLK doesn't run at the frequency the clock.c reports it runs on. Therefore, the i2c miscalculates the divider etc -- falling crap model (waterfall model). Anyway, Jason, can you look into that clock problem? I think there are more than just perclk miscalculated. Cheers ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Hi Grant. On Wed, Sep 14, 2011 at 12:17 PM, Grant Likely wrote: > On Wed, Sep 14, 2011 at 12:03 PM, Simon Glass wrote: >> if the fdt is not in the U-Boot tree, where does it go? When will the >> kernel fdt be set up? That sounds very promising. > > Into a separate git tree. Possibly on devicetree.org, > git.secretlab.ca, or git.linaro.org. I don't really want it on linaro > or kernel.org though because I want to make it clear that it is > absolutely not intended to be Linux-specific. OK thanks. I think secretlab sounds most exciting :-) In U-Boot, people can currently do something like: git clone http://git.denx.de/u-boot.git . make secretboard_config make and get a working u-boot and u-boot.bin. Hopefully we can make just as easy with fdt. Regards, Simon > > g. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
On Wed, Sep 14, 2011 at 12:03 PM, Simon Glass wrote: > if the fdt is not in the U-Boot tree, where does it go? When will the > kernel fdt be set up? That sounds very promising. Into a separate git tree. Possibly on devicetree.org, git.secretlab.ca, or git.linaro.org. I don't really want it on linaro or kernel.org though because I want to make it clear that it is absolutely not intended to be Linux-specific. g. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/p3060: Add SoC related support for P3060 platform
From: Shengzhou Liu Add P3060 SoC specific information:cores setup, LIODN setup, etc The P3060 SoC combines six e500mc Power Architecture processor cores with high-performance datapath acceleration architecture(DPAA), CoreNet fabric infrastructure, as well as network and peripheral interfaces. Signed-off-by: Shengzhou Liu Signed-off-by: Kumar Gala --- arch/powerpc/cpu/mpc85xx/Makefile |3 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |9 ++ arch/powerpc/cpu/mpc85xx/p3060_ids.c | 113 arch/powerpc/cpu/mpc85xx/p3060_serdes.c | 138 + arch/powerpc/cpu/mpc8xxx/cpu.c|2 + arch/powerpc/include/asm/config_mpc85xx.h | 15 +++ arch/powerpc/include/asm/immap_85xx.h | 12 ++- arch/powerpc/include/asm/processor.h |2 + drivers/net/fm/Makefile |1 + drivers/net/fm/p3060.c| 109 +++ 10 files changed, 403 insertions(+), 1 deletions(-) create mode 100644 arch/powerpc/cpu/mpc85xx/p3060_ids.c create mode 100644 arch/powerpc/cpu/mpc85xx/p3060_serdes.c create mode 100644 drivers/net/fm/p3060.c diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile index d6ec611..baf27e6 100644 --- a/arch/powerpc/cpu/mpc85xx/Makefile +++ b/arch/powerpc/cpu/mpc85xx/Makefile @@ -67,6 +67,7 @@ COBJS-$(CONFIG_P2020) += ddr-gen3.o COBJS-$(CONFIG_PPC_P2040) += ddr-gen3.o COBJS-$(CONFIG_PPC_P2041) += ddr-gen3.o COBJS-$(CONFIG_PPC_P3041) += ddr-gen3.o +COBJS-$(CONFIG_PPC_P3060) += ddr-gen3.o COBJS-$(CONFIG_PPC_P4080) += ddr-gen3.o COBJS-$(CONFIG_PPC_P5020) += ddr-gen3.o @@ -81,6 +82,7 @@ COBJS-$(CONFIG_SYS_DPAA_QBMAN) += portals.o COBJS-$(CONFIG_PPC_P2040) += p2041_ids.o COBJS-$(CONFIG_PPC_P2041) += p2041_ids.o COBJS-$(CONFIG_PPC_P3041) += p3041_ids.o +COBJS-$(CONFIG_PPC_P3060) += p3060_ids.o COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o COBJS-$(CONFIG_PPC_P5020) += p5020_ids.o @@ -116,6 +118,7 @@ COBJS-$(CONFIG_P2020) += p2020_serdes.o COBJS-$(CONFIG_PPC_P2040) += p2041_serdes.o COBJS-$(CONFIG_PPC_P2041) += p2041_serdes.o COBJS-$(CONFIG_PPC_P3041) += p3041_serdes.o +COBJS-$(CONFIG_PPC_P3060) += p3060_serdes.o COBJS-$(CONFIG_PPC_P4080) += p4080_serdes.o COBJS-$(CONFIG_PPC_P5020) += p5020_serdes.o diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index 4307a4c..07e58ed 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -482,6 +482,13 @@ static void wait_for_rstdone(unsigned int bank) printf("SERDES: timeout resetting bank %u\n", bank + 1); } + +void __soc_serdes_init(void) +{ + /* Allow for SoC-specific initialization in _serdes.c */ +}; +void soc_serdes_init(void) __attribute__((weak, alias("__soc_serdes_init"))); + void fsl_serdes_init(void) { ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); @@ -570,6 +577,8 @@ void fsl_serdes_init(void) } } + soc_serdes_init(); + #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 /* * Bank two uses the clock from bank three, so if bank two is enabled, diff --git a/arch/powerpc/cpu/mpc85xx/p3060_ids.c b/arch/powerpc/cpu/mpc85xx/p3060_ids.c new file mode 100644 index 000..07703d4 --- /dev/null +++ b/arch/powerpc/cpu/mpc85xx/p3060_ids.c @@ -0,0 +1,113 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include + +#ifdef CONFIG_SYS_DPAA_QBMAN +struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = { + /* dqrr liodn, frame data liodn, liodn off, sdest */ + SET_QP_INFO( 1, 2, 1, 0), + SET_QP_INFO( 3, 4, 2, 1), + SET_QP_INFO( 5, 6, 3, 2), + SET_QP_INFO( 7, 8, 4, 3), + SET_QP_INFO( 9, 10, 5, 4), + SET_QP_INFO(11, 12, 6, 5), + SET_QP_INFO(13, 14, 7, 6), + SET_QP_INFO(15, 16, 8, 7), + SET_QP_INFO(17, 18, 9, 0), /* for now sdest to 0 */ + SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */ +}; +#endif + +struct liodn_id
Re: [U-Boot] [RFC PATCH v2 3/6] fdt: Add support for a separate device tree (CONFIG_OF_SEPARATE)
Hi Grant, On Wed, Sep 14, 2011 at 9:48 AM, Grant Likely wrote: > On Mon, Sep 12, 2011 at 03:04:24PM -0700, Simon Glass wrote: >> This adds support for an FDT to be build as a separate binary file called >> u-boot.dtb. This can be concatenated with the U-Boot binary to provide a >> device tree located at run-time by U-Boot. > > Hahaha, I should the entire thread of patches before commenting. I > strongly feel that this should be the only method and that > CONFIG_OF_EMBED should be dropped. :-) Please see my comments in the other thread. Regards, Simon > >> >> Signed-off-by: Simon Glass >> --- >> .gitignore | 1 + >> Makefile | 5 ++ >> README | 11 +++- >> doc/README.fdt-control | 168 >> >> 4 files changed, 183 insertions(+), 2 deletions(-) >> create mode 100644 doc/README.fdt-control >> >> diff --git a/.gitignore b/.gitignore >> index dbf545f..c4ebd34 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -34,6 +34,7 @@ >> /u-boot.dis >> /u-boot.lds >> /u-boot.ubl >> +/u-boot.dtb >> >> # >> # Generated files >> diff --git a/Makefile b/Makefile >> index 658a622..d73efa1 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -352,9 +352,14 @@ ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin >> ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin >> ALL-$(CONFIG_MMC_U_BOOT) += $(obj)mmc_spl/u-boot-mmc-spl.bin >> ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin >> +ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb >> >> all: $(ALL-y) >> >> +$(obj)u-boot.dtb: $(obj)u-boot >> + $(MAKE) -C dts binary >> + mv $(obj)dts/dt.dtb $@ >> + >> $(obj)u-boot.hex: $(obj)u-boot >> $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ >> >> diff --git a/README b/README >> index 5a2f060..0b8f338 100644 >> --- a/README >> +++ b/README >> @@ -803,8 +803,8 @@ The following options need to be configured: >> experimental and only available on a few boards. The device >> tree is available in the global data as gd->blob. >> >> - U-Boot needs to get its device tree from somewhere. At present >> - the only way is to embed it in the image with CONFIG_OF_EMBED. >> + U-Boot needs to get its device tree from somewhere. This can >> + be done using one of the two options below: >> >> CONFIG_OF_EMBED >> If this variable is defined, U-Boot will embed a device tree >> @@ -813,6 +813,13 @@ The following options need to be configured: >> is then picked up in board_init_f() and made available through >> the global data structure as gd->blob. >> >> + CONFIG_OF_SEPARATE >> + If this variable is defined, U-Boot will build a device tree >> + binary. It will be called u-boot.dtb. Architecture-specific >> + code will locate it at run-time. Generally this works by: >> + >> + cat u-boot.bin u-boot.dtb >image.bin >> + >> - Watchdog: >> CONFIG_WATCHDOG >> If this variable is defined, it enables watchdog >> diff --git a/doc/README.fdt-control b/doc/README.fdt-control >> new file mode 100644 >> index 000..dfc8f06 >> --- /dev/null >> +++ b/doc/README.fdt-control >> @@ -0,0 +1,168 @@ >> +# >> +# Copyright (c) 2011 The Chromium OS Authors. >> +# >> +# 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 Foundatio; 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 >> +# >> + >> +Device Tree Control in U-Boot >> += >> + >> +This feature provides for run-time configuration of U-Boot via a flat >> +device tree (fdt). U-Boot configuration has traditionally been done >> +using CONFIG options in the board config file. This feature aims to >> +make it possible for a single U-Boot binary to support multiple boards, >> +with the exact configuration of each board controlled by a flat device >> +tree (fdt). This is the approach recently taken by the ARM Linux kernel >> +and has been used by PowerPC for some time. >> + >> +The fdt is a convenient vehicle for implementing run-time configuration >> +for three reasons. Firstly it is easy to use, being a simple t
Re: [U-Boot] Regarding Start.S file
On Wednesday, September 14, 2011 07:48:12 PM Asmit Patel wrote: > Hi All, > I am new to u-boot and ARM. I am trying to understand uboot thtough start.S > file. > I have few questions about it. > 1) What is the deifference between ARM Supervisior and User mode. why uboot > is not running in user mode? SVC has the biggest privileges (can do everything, no restrictions). > 2) At the start of startup file I found below code. > > .globl _start > _start: b start_code > ldr pc, _undefined_instruction > ldr pc, _software_interrupt > ldr pc, _prefetch_abort > ldr pc, _data_abort > ldr pc, _not_used > ldr pc, _irq > ldr pc, _fiq > > _undefined_instruction: .word undefined_instruction > _software_interrupt: .word software_interrupt > _prefetch_abort: .word prefetch_abort > _data_abort: .word data_abort > _not_used: .word not_used > _irq: .word irq > _fiq: .word fiq > > .balignl 16,0xdeadbeef > > > What is this code will do? as i believe the instruction "b start_code" will > branch it to start_code then how does the other code below branch > instruction will work? Upon exception, the CPU jumps to the exception vector, this is the vectoring jumptable here. So ... if you get for example "irq exception", aka interrupt happens, the cpu jumps to fixed address 0x14. This here then jumps to the real handler. > > 3) where does exception vector table located during power on? on boot rom > or at any other place? Depends on the CPU and the initial memory mapping. If U-Boot is in NOR mapped to 0x0, it's the stuff above. It can be in bootrom, but that depends. > > > Thanks & Regards, > Asmit Patel" ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Regarding Start.S file
Hi Asmit, Le 14/09/2011 19:48, Asmit Patel a écrit : > Hi All, > I am new to u-boot and ARM. I am trying to understand uboot thtough start.S > file. > I have few questions about it. As the custodian for the ARM u-boot repository, I feel compelled to try and answer your questions. :) > 1) What is the deifference between ARM Supervisior and User mode. why uboot > is not running in user mode? As for the difference between ARM user and supervisor modes, you should go to the ARM Ltd. website and look up their documentation, especially the ISA Reference Manual for the specific ISA you're interested in. However, in a very broad and inexact way, user mode is for application code and has restrictions on some instructions, while supervisor mode is for OS code and has no restrictions -- which explains why U-Boot is in user mode. > 2) At the start of startup file I found below code. > > .globl _start > _start: b start_code > ldr pc, _undefined_instruction > ldr pc, _software_interrupt > ldr pc, _prefetch_abort > ldr pc, _data_abort > ldr pc, _not_used > ldr pc, _irq > ldr pc, _fiq > > _undefined_instruction: .word undefined_instruction > _software_interrupt: .word software_interrupt > _prefetch_abort: .word prefetch_abort > _data_abort: .word data_abort > _not_used: .word not_used > _irq: .word irq > _fiq: .word fiq > > .balignl 16,0xdeadbeef > > > What is this code will do? as i believe the instruction "b start_code" will > branch it to start_code then how does the other code below branch > instruction will work? That's where you should really go to the ARM Ltd. documentation, because this code is nothing U-Boot specific and purely derived from ARM architecture. > 3) where does exception vector table located during power on? on boot rom or > at any other place? Again, this is not an U-Boot related question; this time, it is a core or even SoC or board specific thing, as various platforms have various boot processes. > Thanks& Regards, > Asmit Patel" Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Hi Grant, On Wed, Sep 14, 2011 at 9:45 AM, Grant Likely wrote: > On Mon, Sep 12, 2011 at 03:04:23PM -0700, Simon Glass wrote: >> This new option allows U-Boot to embed a binary device tree into its image >> to allow run-time control of peripherals. This device tree is for U-Boot's >> own use and is not necessarily the same one as is passed to the kernel. >> >> The device tree compiler output should be placed in the $(obj) >> rooted tree. Since $(OBJCOPY) insists on adding the path to the >> generated symbol names, to ensure consistency it should be >> invoked from the directory where the .dtb file is located and >> given the input file name without the path. >> >> This commit contains my entry for the ugliest Makefile / shell interaction >> competition. >> >> Signed-off-by: Simon Glass > > May I suggest an alternate approach? Rather than hard linking the dtb > into the u-boot image, this would be so much more useful if the dtb > can be concatenated to the u-boot binary so that it can be configured > at install time. Otherwise, switching to .dtb doesn't seem to > actually buy much when it still requires a recompile of u-boot to > change the dtb configuration data. Thanks for your comments. Yes I agree. This is CONFIG_OF_SEPARATE - see the other patch in the set. > > The linker script would need to be modified to make sure the end of > the binary image is aligned, and that there is a label indicating the > beginning of the .dtb section. The init code will also need to read > the .dtb header to get the dtb length so that it can be relocated into > RAM with the rest of u-boot. The label is _end, and you can just: cat u-boot.bin some-fdt.dtb >u-boot.dtb.bin to make this work. The code in the patch is: #elif defined CONFIG_OF_SEPARATE /* FDT is at end of image */ gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE); #endif > > Targets could even be added as u-boot.%.bin so that a single build > could spit out several variants as needed, but still produce a bare > u-boot.bin binary that can have the .dtb appended manually. I did have this as part of the U-Boot Makefile in my testing. If people don't consider it too intrusive then I can certainly add this in. It is quite convenient, and just adds an extra target to the U-Boot Makefile. > > Using CONFIG_OF_EMBED may actually be harmful if it starts encouraging > developers to put .dts files into the u-boot tree. Especially when > right now the plan for the kernel is to actually move .dts file out of > the Linux tree and into a separate & neutral repository. It is a dev convenience, but very very useful in development. For example, when using a debugger it is easy to just load the u-boot ELF image and get everything there. We do need to make sure people don't use it in production as it defeats the purpose of run-time config to a large extent! if the fdt is not in the U-Boot tree, where does it go? When will the kernel fdt be set up? That sounds very promising. Regards. Simon > >> --- >> Makefile | 4 ++ >> README | 11 +- >> config.mk | 1 + >> dts/Makefile | 100 >> ++ >> include/common.h | 1 + >> 5 files changed, 115 insertions(+), 2 deletions(-) >> create mode 100644 dts/Makefile >> [snip] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Regarding Start.S file
Hi All, I am new to u-boot and ARM. I am trying to understand uboot thtough start.S file. I have few questions about it. 1) What is the deifference between ARM Supervisior and User mode. why uboot is not running in user mode? 2) At the start of startup file I found below code. .globl _start _start: b start_code ldr pc, _undefined_instruction ldr pc, _software_interrupt ldr pc, _prefetch_abort ldr pc, _data_abort ldr pc, _not_used ldr pc, _irq ldr pc, _fiq _undefined_instruction: .word undefined_instruction _software_interrupt: .word software_interrupt _prefetch_abort: .word prefetch_abort _data_abort: .word data_abort _not_used: .word not_used _irq: .word irq _fiq: .word fiq .balignl 16,0xdeadbeef What is this code will do? as i believe the instruction "b start_code" will branch it to start_code then how does the other code below branch instruction will work? 3) where does exception vector table located during power on? on boot rom or at any other place? Thanks & Regards, Asmit Patel" ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Hi Jason, On Wed, Sep 14, 2011 at 9:11 AM, Jason wrote: > Simon, > > On Wed, Sep 14, 2011 at 08:47:25AM -0700, Simon Glass wrote: >> On Wed, Sep 14, 2011 at 6:47 AM, Jason wrote: >> > On Tue, Sep 13, 2011 at 02:06:56PM -0700, Simon Glass wrote: >> >> On Tue, Sep 13, 2011 at 7:37 AM, Jason wrote: >> >> > Added the remote, thanks. Once we figure out the mach-types thing, I'll >> >> > try using the Marvell integrated RTC driver as a real-world example of a >> >> > conversion to fdt. I'll probably have questions ;-) >> >> >> >> That sounds great. I've tried to make it fair straightforward - with >> >> an option for building an fdt into U-Boot itself (i.e. don't define >> >> CONFIG_OF_SEPARATE). This should allow you to use your current dev >> >> flow. >> > >> > Okay, I have an initial version that compiles, but doesn't work. Which, >> > surprisingly, is progress. ;-) I'll post the patch a little bit later >> > after I make sure I'm not missing something dumb. >> >> A few hints: >> >> - define CONFIG_OF_EMBED to start with, since it will embed the fdt >> inside U-Boot which is a good check that all is well. You can move to >> the more useful CONFIG_OF_SEPARATE when you get that working >> - there is a check in board.c that the fdt is accessible - if it is >> dying early then it might be that (early board panic patch is still in >> flight) > > Frustrating morning. Mainly due to the fact that I've been working with > device trees all of two days. > > Here's what I did: > 1.) applied your patches against v2011.09-rc1 (to get mvrtc.c) > 2.) applied my dreamplug support patch > 3.) modified drivers/rtc/mvrtc.c for OF support > 4.) compile > 5.) run, then 'date' fails like so: > > find_alias_node: rtc0 > fdt_decode_next_alias failed. > Error decoding fdt for mvrtc. > ## Get date failed I don't actually see an alias in your fdt. And actually I left it out of mine, so that is understandable. For i2c I have: ... aliases { i2c0 = "/i2c@0x7000d000"; i2c1 = "/i2c@0x7000c000"; i2c2 = "/i2c@0x7000c400"; i2c3 = "/i2c@0x7000c500"; }; find_next_alias is explains this (omited from the patch sorry): /** * Find the next numbered alias for a peripheral. This is used to enumerate * all the peripherals of a certain type. * * Do the first call with *upto = 0. Assuming /aliases/0 exists then * this function will return a pointer to the node the alias points to, and * then update *upto to 1. Next time you call this function, the next node * will be returned. * * All nodes returned will match the compatible ID, as it is assumed that * all peripherals use the same driver. * * @param blob FDT blob to use * @param name Root name of alias to search for * @param idCompatible ID to look for * @return offset of next compatible node, or -FDT_ERR_NOTFOUND if no more */ So I think you need to add a /alias node and try again. I can submit a new patch set with this and a couple of other things I want to change, but it would be good if you can get to the end first, in case you find other problems. > > Obviously, I've hacked it up abit to get more error reporting out. > Here's my kirkwood-dreamplug.dts: > > # kirkwood-dreamplug.dts > /dts-v1/; > > /include/ "kirkwood.dtsi" > > / { > model = "Marvell Dreamplug"; > compatible = "marvell,dreamplug", "marvell,kirkwood"; > > rtc@0xf1010300 { > status = "ok"; > }; > }; > # > > And the kirkwood.dtsi > > kirkwood.dtsi > / { > model = "Marvell Kirkwood"; > compatible = "marvell,kirkwood"; > #address-cells = <1>; > #size-cells = <1>; > > cpus { > #address-cells = <1>; > #size-cells = <0>; > cpu@0 { > compatible = "arm,arm926ejs"; > reg = <0>; > }; > }; > > rtc@0xf1010300 { > compatible = "marvell,kirkwood-rtc"; > reg = <0xf1010300 0x02>; > status = "disabled"; > }; > }; > ### > > I'd like to make sure my dts files are correct before I get to debugging > code. ;-) > > A few notes: > > If I compile with '#define DEBUG' in my board config, it builds, but > doesn't run, or at least, there's no output on the serial port. That's because you are getting output prior to relocation. Graeme has a patch for that, and I also sent a patch for pre-console panic (which I will update once his patch goes in). > > I had the remove your fdt_decode_i2c() and clock.h include. The clock.h > include seems to be specific to the tegra2 and doesn't exist for > kirkwood. Yes that's right, it is just an example at this stage, and the idea of a periph_id is specific to Tegra at present. Patches 5 and 6 are just an example to show how to use it in code. Regards, Simon > > thx, > >
[U-Boot] [PATCH] powerpc/85xx: Refactor some defines out of corenet_ds.h
Move some SoC/board specific defines out of corenet_ds.h and into the corresponding P3041DS/P4080DS/P5020.h. We moved CONFIG_MMC, CONFIG_PCIE3, & CONFIG_FSL_NGPIXIS because the P3060 SoC/reference board does not have these devices and it will share the same board code. Signed-off-by: Kumar Gala --- include/configs/P3041DS.h|5 + include/configs/P4080DS.h|5 + include/configs/P5020DS.h|5 + include/configs/corenet_ds.h |9 + 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/include/configs/P3041DS.h b/include/configs/P3041DS.h index d9e8f51..e4d1fe5 100644 --- a/include/configs/P3041DS.h +++ b/include/configs/P3041DS.h @@ -28,7 +28,12 @@ #define CONFIG_PHYS_64BIT #define CONFIG_PPC_P3041 +#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */ + +#define CONFIG_MMC +#define CONFIG_NAND_FSL_ELBC #define CONFIG_FSL_SATA_V2 +#define CONFIG_PCIE3 #define CONFIG_PCIE4 #define CONFIG_ICS307_REFCLK_HZ2500 /* ICS307 ref clk freq */ diff --git a/include/configs/P4080DS.h b/include/configs/P4080DS.h index 49f7c53..4a2e475 100644 --- a/include/configs/P4080DS.h +++ b/include/configs/P4080DS.h @@ -27,6 +27,11 @@ #define CONFIG_PHYS_64BIT #define CONFIG_PPC_P4080 +#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */ + +#define CONFIG_MMC +#define CONFIG_PCIE3 + #define CONFIG_ICS307_REFCLK_HZ3000 /* ICS307 ref clk freq */ #include "corenet_ds.h" diff --git a/include/configs/P5020DS.h b/include/configs/P5020DS.h index 2c7beba..618d1a4 100644 --- a/include/configs/P5020DS.h +++ b/include/configs/P5020DS.h @@ -28,7 +28,12 @@ #define CONFIG_PHYS_64BIT #define CONFIG_PPC_P5020 +#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */ + +#define CONFIG_MMC +#define CONFIG_NAND_FSL_ELBC #define CONFIG_FSL_SATA_V2 +#define CONFIG_PCIE3 #define CONFIG_PCIE4 #define CONFIG_SYS_FSL_RAID_ENGINE diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index d5fc19b..4bbca88 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -56,7 +56,6 @@ #define CONFIG_PCI /* Enable PCI/PCIE */ #define CONFIG_PCIE1 /* PCIE controler 1 */ #define CONFIG_PCIE2 /* PCIE controler 2 */ -#define CONFIG_PCIE3 /* PCIE controler 3 */ #define CONFIG_FSL_PCI_INIT/* Use common FSL init code */ #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */ @@ -199,7 +198,6 @@ (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | BR_PS_16 | BR_V) #define CONFIG_SYS_OR1_PRELIM 0xf8000ff7 -#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */ #define PIXIS_BASE 0xffdf /* PIXIS registers */ #ifdef CONFIG_PHYS_64BIT #define PIXIS_BASE_PHYS0xfffdfull @@ -230,8 +228,6 @@ #endif /* Nand Flash */ -#if defined(CONFIG_P3041DS) || defined(CONFIG_P5020DS) -#define CONFIG_NAND_FSL_ELBC #ifdef CONFIG_NAND_FSL_ELBC #define CONFIG_SYS_NAND_BASE 0xffa0 #ifdef CONFIG_PHYS_64BIT @@ -272,11 +268,10 @@ #define CONFIG_SYS_BR2_PRELIM CONFIG_SYS_NAND_BR_PRELIM /* NAND Base Address */ #define CONFIG_SYS_OR2_PRELIM CONFIG_SYS_NAND_OR_PRELIM /* NAND Options */ #endif -#endif /* CONFIG_NAND_FSL_ELBC */ #else #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_FLASH_BR_PRELIM /* NOR Base Address */ #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_FLASH_OR_PRELIM /* NOR Options */ -#endif +#endif /* CONFIG_NAND_FSL_ELBC */ #define CONFIG_SYS_FLASH_EMPTY_INFO #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 @@ -587,8 +582,6 @@ #define CONFIG_CMD_EXT2 #define CONFIG_HAS_FSL_DR_USB -#define CONFIG_MMC - #ifdef CONFIG_MMC #define CONFIG_FSL_ESDHC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Regarding Start.S file
Hi All, I am new to u-boot and ARM. I am trying to understand uboot thtough start.S file. I have few questions about it. 1) What is the deifference between ARM Supervisior and User mode. why uboot is not running in user mode? 2) At the start of startup file I found below code. .globl _start _start: b start_code ldr pc, _undefined_instruction ldr pc, _software_interrupt ldr pc, _prefetch_abort ldr pc, _data_abort ldr pc, _not_used ldr pc, _irq ldr pc, _fiq _undefined_instruction: .word undefined_instruction _software_interrupt: .word software_interrupt _prefetch_abort: .word prefetch_abort _data_abort: .word data_abort _not_used: .word not_used _irq: .word irq _fiq: .word fiq .balignl 16,0xdeadbeef What is this code will do? as i believe the instruction "b start_code" will branch it to start_code then how does the other code below branch instruction will work? 3) where does exception vector table located during power on? on boot rom or at any other place? Thanks & Regards, Asmit Patel" ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fm-eth: Add ability for board code to disable a port
The SoC configuration may have more ports enabled than a given board actually can utilize. Add a routinue that allows the board code to disable a port that it knows isn't being used. fm_disable_port() needs to be called before cpu_eth_init(). Signed-off-by: Kumar Gala --- drivers/net/fm/fm.h|1 + drivers/net/fm/init.c |8 drivers/net/fm/p1023.c |6 ++ drivers/net/fm/p4080.c |6 ++ drivers/net/fm/p5020.c |6 ++ include/fm_eth.h |1 + 6 files changed, 28 insertions(+), 0 deletions(-) diff --git a/drivers/net/fm/fm.h b/drivers/net/fm/fm.h index be6714f..228df33 100644 --- a/drivers/net/fm/fm.h +++ b/drivers/net/fm/fm.h @@ -110,6 +110,7 @@ u32 fm_muram_base(int fm_idx); int fm_init_common(int index, struct ccsr_fman *reg); int fm_eth_initialize(struct ccsr_fman *reg, struct fm_eth_info *info); phy_interface_t fman_port_enet_if(enum fm_port port); +void fman_disable_port(enum fm_port port); struct fsl_enet_mac { void *base; /* MAC controller registers base address */ diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c index 5f05ab1..512d7dd 100644 --- a/drivers/net/fm/init.c +++ b/drivers/net/fm/init.c @@ -123,6 +123,14 @@ void fman_enet_init(void) return ; } +void fm_disable_port(enum fm_port port) +{ + int i = fm_port_to_index(port); + + fm_info[i].enabled = 0; + fman_disable_port(port); +} + void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus) { int i = fm_port_to_index(port); diff --git a/drivers/net/fm/p1023.c b/drivers/net/fm/p1023.c index c196e79..b17dc40 100644 --- a/drivers/net/fm/p1023.c +++ b/drivers/net/fm/p1023.c @@ -36,6 +36,12 @@ static int is_device_disabled(enum fm_port port) return port_to_devdisr[port] & devdisr; } +void fman_disable_port(enum fm_port port) +{ + ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + setbits_be32(&gur->devdisr, port_to_devdisr[port]); +} + phy_interface_t fman_port_enet_if(enum fm_port port) { ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); diff --git a/drivers/net/fm/p4080.c b/drivers/net/fm/p4080.c index 6761a2f..791caab 100644 --- a/drivers/net/fm/p4080.c +++ b/drivers/net/fm/p4080.c @@ -44,6 +44,12 @@ static int is_device_disabled(enum fm_port port) return port_to_devdisr[port] & devdisr2; } +void fman_disable_port(enum fm_port port) +{ + ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + setbits_be32(&gur->devdisr2, port_to_devdisr[port]); +} + phy_interface_t fman_port_enet_if(enum fm_port port) { ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); diff --git a/drivers/net/fm/p5020.c b/drivers/net/fm/p5020.c index 59638eb..69c27d2 100644 --- a/drivers/net/fm/p5020.c +++ b/drivers/net/fm/p5020.c @@ -40,6 +40,12 @@ static int is_device_disabled(enum fm_port port) return port_to_devdisr[port] & devdisr2; } +void fman_disable_port(enum fm_port port) +{ + ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + setbits_be32(&gur->devdisr2, port_to_devdisr[port]); +} + phy_interface_t fman_port_enet_if(enum fm_port port) { ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); diff --git a/include/fm_eth.h b/include/fm_eth.h index 2ca584a..c7c6882 100644 --- a/include/fm_eth.h +++ b/include/fm_eth.h @@ -110,5 +110,6 @@ void fdt_fixup_fman_ethernet(void *fdt); phy_interface_t fm_info_get_enet_if(enum fm_port port); void fm_info_set_phy_address(enum fm_port port, int address); void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus); +void fm_disable_port(enum fm_port port); #endif -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 3/6] fdt: Add support for a separate device tree (CONFIG_OF_SEPARATE)
On Mon, Sep 12, 2011 at 03:04:24PM -0700, Simon Glass wrote: > This adds support for an FDT to be build as a separate binary file called > u-boot.dtb. This can be concatenated with the U-Boot binary to provide a > device tree located at run-time by U-Boot. Hahaha, I should the entire thread of patches before commenting. I strongly feel that this should be the only method and that CONFIG_OF_EMBED should be dropped. > > Signed-off-by: Simon Glass > --- > .gitignore |1 + > Makefile |5 ++ > README | 11 +++- > doc/README.fdt-control | 168 > > 4 files changed, 183 insertions(+), 2 deletions(-) > create mode 100644 doc/README.fdt-control > > diff --git a/.gitignore b/.gitignore > index dbf545f..c4ebd34 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -34,6 +34,7 @@ > /u-boot.dis > /u-boot.lds > /u-boot.ubl > +/u-boot.dtb > > # > # Generated files > diff --git a/Makefile b/Makefile > index 658a622..d73efa1 100644 > --- a/Makefile > +++ b/Makefile > @@ -352,9 +352,14 @@ ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin > ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin > ALL-$(CONFIG_MMC_U_BOOT) += $(obj)mmc_spl/u-boot-mmc-spl.bin > ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin > +ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb > > all: $(ALL-y) > > +$(obj)u-boot.dtb:$(obj)u-boot > + $(MAKE) -C dts binary > + mv $(obj)dts/dt.dtb $@ > + > $(obj)u-boot.hex:$(obj)u-boot > $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ > > diff --git a/README b/README > index 5a2f060..0b8f338 100644 > --- a/README > +++ b/README > @@ -803,8 +803,8 @@ The following options need to be configured: > experimental and only available on a few boards. The device > tree is available in the global data as gd->blob. > > - U-Boot needs to get its device tree from somewhere. At present > - the only way is to embed it in the image with CONFIG_OF_EMBED. > + U-Boot needs to get its device tree from somewhere. This can > + be done using one of the two options below: > > CONFIG_OF_EMBED > If this variable is defined, U-Boot will embed a device tree > @@ -813,6 +813,13 @@ The following options need to be configured: > is then picked up in board_init_f() and made available through > the global data structure as gd->blob. > > + CONFIG_OF_SEPARATE > + If this variable is defined, U-Boot will build a device tree > + binary. It will be called u-boot.dtb. Architecture-specific > + code will locate it at run-time. Generally this works by: > + > + cat u-boot.bin u-boot.dtb >image.bin > + > - Watchdog: > CONFIG_WATCHDOG > If this variable is defined, it enables watchdog > diff --git a/doc/README.fdt-control b/doc/README.fdt-control > new file mode 100644 > index 000..dfc8f06 > --- /dev/null > +++ b/doc/README.fdt-control > @@ -0,0 +1,168 @@ > +# > +# Copyright (c) 2011 The Chromium OS Authors. > +# > +# 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 Foundatio; 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 > +# > + > +Device Tree Control in U-Boot > += > + > +This feature provides for run-time configuration of U-Boot via a flat > +device tree (fdt). U-Boot configuration has traditionally been done > +using CONFIG options in the board config file. This feature aims to > +make it possible for a single U-Boot binary to support multiple boards, > +with the exact configuration of each board controlled by a flat device > +tree (fdt). This is the approach recently taken by the ARM Linux kernel > +and has been used by PowerPC for some time. > + > +The fdt is a convenient vehicle for implementing run-time configuration > +for three reasons. Firstly it is easy to use, being a simple text file. > +It is extensible since it consists of nodes and properties in a nice > +hierarchical format. > + > +Finally, there is already excellent infrastructure for the fdt: a > +compiler checks the text file and converts it to a compact
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
On Mon, Sep 12, 2011 at 03:04:23PM -0700, Simon Glass wrote: > This new option allows U-Boot to embed a binary device tree into its image > to allow run-time control of peripherals. This device tree is for U-Boot's > own use and is not necessarily the same one as is passed to the kernel. > > The device tree compiler output should be placed in the $(obj) > rooted tree. Since $(OBJCOPY) insists on adding the path to the > generated symbol names, to ensure consistency it should be > invoked from the directory where the .dtb file is located and > given the input file name without the path. > > This commit contains my entry for the ugliest Makefile / shell interaction > competition. > > Signed-off-by: Simon Glass May I suggest an alternate approach? Rather than hard linking the dtb into the u-boot image, this would be so much more useful if the dtb can be concatenated to the u-boot binary so that it can be configured at install time. Otherwise, switching to .dtb doesn't seem to actually buy much when it still requires a recompile of u-boot to change the dtb configuration data. The linker script would need to be modified to make sure the end of the binary image is aligned, and that there is a label indicating the beginning of the .dtb section. The init code will also need to read the .dtb header to get the dtb length so that it can be relocated into RAM with the rest of u-boot. Targets could even be added as u-boot.%.bin so that a single build could spit out several variants as needed, but still produce a bare u-boot.bin binary that can have the .dtb appended manually. Using CONFIG_OF_EMBED may actually be harmful if it starts encouraging developers to put .dts files into the u-boot tree. Especially when right now the plan for the kernel is to actually move .dts file out of the Linux tree and into a separate & neutral repository. > --- > Makefile |4 ++ > README | 11 +- > config.mk|1 + > dts/Makefile | 100 > ++ > include/common.h |1 + > 5 files changed, 115 insertions(+), 2 deletions(-) > create mode 100644 dts/Makefile > > diff --git a/Makefile b/Makefile > index d5a1f0a..658a622 100644 > --- a/Makefile > +++ b/Makefile > @@ -224,6 +224,9 @@ endif > ifeq ($(CPU),ixp) > LIBS += arch/arm/cpu/ixp/npe/libnpe.o > endif > +ifeq ($(CONFIG_OF_EMBED),y) > +LIBS += dts/libdts.o > +endif > LIBS += arch/$(ARCH)/lib/lib$(ARCH).o > LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o > fs/jffs2/libjffs2.o \ > fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ > @@ -962,6 +965,7 @@ clobber: clean > @rm -f $(obj)u-boot.kwb > @rm -f $(obj)u-boot.imx > @rm -f $(obj)u-boot.ubl > + @rm -f $(obj)u-boot.dtb > @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} > @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c > @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm > diff --git a/README b/README > index 812805f..5a2f060 100644 > --- a/README > +++ b/README > @@ -803,8 +803,15 @@ The following options need to be configured: > experimental and only available on a few boards. The device > tree is available in the global data as gd->blob. > > - U-Boot needs to get its device tree from somewhere. This will > - be enabled in a future patch. > + U-Boot needs to get its device tree from somewhere. At present > + the only way is to embed it in the image with CONFIG_OF_EMBED. > + > + CONFIG_OF_EMBED > + If this variable is defined, U-Boot will embed a device tree > + binary in its image. This device tree file should be in the > + board directory and called -.dts. The binary file > + is then picked up in board_init_f() and made available through > + the global data structure as gd->blob. > > - Watchdog: > CONFIG_WATCHDOG > diff --git a/config.mk b/config.mk > index e2b440d..6e61eb6 100644 > --- a/config.mk > +++ b/config.mk > @@ -124,6 +124,7 @@ STRIP = $(CROSS_COMPILE)strip > OBJCOPY = $(CROSS_COMPILE)objcopy > OBJDUMP = $(CROSS_COMPILE)objdump > RANLIB = $(CROSS_COMPILE)RANLIB > +DTC = dtc > > # > > diff --git a/dts/Makefile b/dts/Makefile > new file mode 100644 > index 000..e70a16b > --- /dev/null > +++ b/dts/Makefile > @@ -0,0 +1,100 @@ > +# > +# Copyright (c) 2011 The Chromium OS Authors. > +# > +# 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 Foundatio; either version 2 of > +# the License, or (at your option) any later version. > +# > +# This program is distrib
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Simon, On Wed, Sep 14, 2011 at 08:47:25AM -0700, Simon Glass wrote: > On Wed, Sep 14, 2011 at 6:47 AM, Jason wrote: > > On Tue, Sep 13, 2011 at 02:06:56PM -0700, Simon Glass wrote: > >> On Tue, Sep 13, 2011 at 7:37 AM, Jason wrote: > >> > Added the remote, thanks. Once we figure out the mach-types thing, I'll > >> > try using the Marvell integrated RTC driver as a real-world example of a > >> > conversion to fdt. I'll probably have questions ;-) > >> > >> That sounds great. I've tried to make it fair straightforward - with > >> an option for building an fdt into U-Boot itself (i.e. don't define > >> CONFIG_OF_SEPARATE). This should allow you to use your current dev > >> flow. > > > > Okay, I have an initial version that compiles, but doesn't work. Which, > > surprisingly, is progress. ;-) I'll post the patch a little bit later > > after I make sure I'm not missing something dumb. > > A few hints: > > - define CONFIG_OF_EMBED to start with, since it will embed the fdt > inside U-Boot which is a good check that all is well. You can move to > the more useful CONFIG_OF_SEPARATE when you get that working > - there is a check in board.c that the fdt is accessible - if it is > dying early then it might be that (early board panic patch is still in > flight) Frustrating morning. Mainly due to the fact that I've been working with device trees all of two days. Here's what I did: 1.) applied your patches against v2011.09-rc1 (to get mvrtc.c) 2.) applied my dreamplug support patch 3.) modified drivers/rtc/mvrtc.c for OF support 4.) compile 5.) run, then 'date' fails like so: find_alias_node: rtc0 fdt_decode_next_alias failed. Error decoding fdt for mvrtc. ## Get date failed Obviously, I've hacked it up abit to get more error reporting out. Here's my kirkwood-dreamplug.dts: # kirkwood-dreamplug.dts /dts-v1/; /include/ "kirkwood.dtsi" / { model = "Marvell Dreamplug"; compatible = "marvell,dreamplug", "marvell,kirkwood"; rtc@0xf1010300 { status = "ok"; }; }; # And the kirkwood.dtsi kirkwood.dtsi / { model = "Marvell Kirkwood"; compatible = "marvell,kirkwood"; #address-cells = <1>; #size-cells = <1>; cpus { #address-cells = <1>; #size-cells = <0>; cpu@0 { compatible = "arm,arm926ejs"; reg = <0>; }; }; rtc@0xf1010300 { compatible = "marvell,kirkwood-rtc"; reg = <0xf1010300 0x02>; status = "disabled"; }; }; ### I'd like to make sure my dts files are correct before I get to debugging code. ;-) A few notes: If I compile with '#define DEBUG' in my board config, it builds, but doesn't run, or at least, there's no output on the serial port. I had the remove your fdt_decode_i2c() and clock.h include. The clock.h include seems to be specific to the tegra2 and doesn't exist for kirkwood. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Hi Jason, On Wed, Sep 14, 2011 at 6:47 AM, Jason wrote: > Simon, > > On Tue, Sep 13, 2011 at 02:06:56PM -0700, Simon Glass wrote: >> Hi Jason, >> >> On Tue, Sep 13, 2011 at 7:37 AM, Jason wrote: >> > On Mon, Sep 12, 2011 at 05:12:37PM -0700, Simon Glass wrote: >> >> On Mon, Sep 12, 2011 at 4:37 PM, Jason wrote: >> >> > Do you have a git tree up that I could base off of? git.chromium.org's >> >> > version of u-boot doesn't seem to have your code... >> >> >> >> You probably need to look at a branch: >> >> >> >> http://git.chromium.org/gitweb/?p=chromiumos/third_party/u-boot.git;a=shortlog;h=refs/heads/chromeos-v2011.06 >> >> >> >> This is based on U-Boot 2011.06. >> > >> > Added the remote, thanks. Once we figure out the mach-types thing, I'll >> > try using the Marvell integrated RTC driver as a real-world example of a >> > conversion to fdt. I'll probably have questions ;-) >> >> That sounds great. I've tried to make it fair straightforward - with >> an option for building an fdt into U-Boot itself (i.e. don't define >> CONFIG_OF_SEPARATE). This should allow you to use your current dev >> flow. > > Okay, I have an initial version that compiles, but doesn't work. Which, > surprisingly, is progress. ;-) I'll post the patch a little bit later > after I make sure I'm not missing something dumb. A few hints: - define CONFIG_OF_EMBED to start with, since it will embed the fdt inside U-Boot which is a good check that all is well. You can move to the more useful CONFIG_OF_SEPARATE when you get that working - there is a check in board.c that the fdt is accessible - if it is dying early then it might be that (early board panic patch is still in flight) > > I'll also post some comments to your patch series in a moment. OK good. Regards, Simon > > thx, > > Jason. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 03/15] FEC: Add support for iMX28 quirks
On Wed, Sep 14, 2011 at 08:11, Marek Vasut wrote: > On Wednesday, September 14, 2011 09:17:37 AM Stefano Babic wrote: >> On 09/12/2011 06:06 AM, Marek Vasut wrote: >> > --- a/drivers/net/fec_mxc.c >> > +++ b/drivers/net/fec_mxc.c >> > >> > +/* >> > + * The i.MX28 operates with packets in big endian. We need to swap them >> > before + * sending and after receiving. >> > + */ >> > +#ifdef CONFIG_MX28 >> > +#define CONFIG_FEC_MXC_SWAP_PACKET >> > +#endif >> >> Do we really need two defines ? If the MX28 has the oddity to swap >> packets and this must be always done for this SOC, we could protect the >> code only with CONFIG_MX28. I think in the code it is already clear that >> in case of MX28 the packets are swapped. > > Well if any other CPU with this problem pops up on the market, we should be > ready. makes sense -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] DMA drivers in U-Boot?
On Wed, Sep 14, 2011 at 10:52, Simon Schwarz wrote: > I am working on integrating DMA into my SPL. As a matter of fact it is > already working fine. > > So, here are my questions: > - Is there an interest in having DMA drivers in U-Boot? (I only know of > one in /drivers) > - Is there an API I should implement? > - Any other comments? > > (ATM the transfer of the Linux-image is more than three times faster > compared to the CPU copy) Blackfin provides a dma_memcpy() helper. what functionality do you need the API to provide exactly ? the Linux DMA API is quite large and convoluted (many times with good reason), but i'd like to keep it simple for us if possible. -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] omap3+: Add OMAP support for cmd_gpio
On Tue, Aug 16, 2011 at 5:17 PM, Joe Hershberger wrote: > Add a shim driver to drivers/gpio that maps the standard GPIO API to the OMAP > GPIO API > Empty gpio.h is needed in the asm/arch dirs for omap3 and omap4 due to > include in asm/gpio.h > > Signed-off-by: Joe Hershberger > Cc: Joe Hershberger > Cc: Sandeep Paulraj > --- > Changes for v2: > - Changed API to match common gpio API > (http://patchwork.ozlabs.org/patch/109904/) > > arch/arm/include/asm/arch-omap3/gpio.h | 1 + > arch/arm/include/asm/arch-omap4/gpio.h | 1 + > drivers/gpio/Makefile | 1 + > drivers/gpio/omap_gpio.c | 64 > > 4 files changed, 67 insertions(+), 0 deletions(-) > create mode 100644 arch/arm/include/asm/arch-omap3/gpio.h > create mode 100644 arch/arm/include/asm/arch-omap4/gpio.h > create mode 100644 drivers/gpio/omap_gpio.c Any word on this patch? Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra2: Enable data cache
Hi Aneesh, On Wed, Sep 14, 2011 at 6:10 AM, Aneesh V wrote: [snip] >> not specific to your patch, but this seems kind of dumb to copy & paste the >> same thing between all the arm sub arches/boards. why cant the default >> enable_caches() look like this for arm: >> void enable_caches(void) >> { >> #ifndef CONFIG_SYS_DCACHE_OFF >> dcache_enable(); >> #endif >> #ifndef CONFIG_SYS_ICACHE_OFF >> icache_enable(); >> #endif >> } > > That was how it was earlier. But then many boards were not cache ready > and still didn't define CONFIG_SYS_DCACHE_OFF, so they were broken. So, > the current situation is that the absence of CONFIG_SYS_DCACHE_OFF > doesn't mean that the board is cache-ready. > > I like the suggestion made by Jason Liu, that of using > CONFIG_SYS_DCACHE_ON instead. In the present situation ARM cpus that > properly support cache handling seems to be in the minority, so > CONFIG_SYS_DCACHE_ON may be more appropriate. But Wolfgang doesn't seem > to like this. My concern with this is that the situation will never improve. At least this way there will be an incentive to sort things out, since one day the cache enable code will be in arch/arm/lib/board.c. I hope it is soon, but it will need more driver support first. Regards, Simon > > best regards, > Aneesh > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] DMA drivers in U-Boot?
Hi List, I am working on integrating DMA into my SPL. As a matter of fact it is already working fine. So, here are my questions: - Is there an interest in having DMA drivers in U-Boot? (I only know of one in /drivers) - Is there an API I should implement? - Any other comments? (ATM the transfer of the Linux-image is more than three times faster compared to the CPU copy) Regards Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] da830: disable cache usage due to coherency issues
Tom, Thanks! I had a conversation with engineer who came up with new cache management framework. Looks like he has provided patch which fixes this Issue which got exposed because of his patches. I will test this patch Tomorrow and confirm. Most probably, we don't need this patch. Regards, Nag On Wed, Sep 14, 2011 at 19:35:47, Tom Rini wrote: > On Wed, Sep 14, 2011 at 4:07 AM, Nick Thompson wrote: > > On 14/09/11 06:54, Netagunte, Nagabhushana wrote: > >> Nick, > >> > >> I am seeing this issue on da830/da850/dm36x/dm644x. > > > > Strange that I have seen no issue with da830 (OMAP-L137 v1.0 & v1.1 - don't > > have any v2.0 yet) when tftp'ing the kernel. I do get very occasional > > errors, but have put this down to network packet loss. > > Note that when there is a problem, there's no network activity. I'd seen > this on a dm365evm, but don't have the board handy (nor did I note the exact > rev of the one I had at the time, sadly). > > -- > Tom > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] mmc: omap: enable high capacity
> > On Thu, Aug 25, 2011 at 7:46 AM, Balaji T K wrote: > > Enable high capacity to host capability. > > Fixes eMMC detection on boot from MMC/SD card. > > > > Signed-off-by: Balaji T K > > Signed-off-by: Aneesh V > > --- > > drivers/mmc/omap_hsmmc.c | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c > > index ef12ecd..6627905 100644 > > --- a/drivers/mmc/omap_hsmmc.c > > +++ b/drivers/mmc/omap_hsmmc.c > > @@ -461,7 +461,8 @@ int omap_mmc_init(int dev_index) > > return 1; > > } > > mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; > > - mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | > MMC_MODE_HS; > > + mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS > | > > + MMC_MODE_HC; > > > > mmc->f_min = 40; > > mmc->f_max = 5200; > > -- > > I tested a similar patch on a Tegra2 system, so: > > Acked-by: Simon Glass > If it is OK with Andy, I can apply this to u-boot-ti. --Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] da830: disable cache usage due to coherency issues
On Wed, Sep 14, 2011 at 4:07 AM, Nick Thompson wrote: > On 14/09/11 06:54, Netagunte, Nagabhushana wrote: >> Nick, >> >> I am seeing this issue on da830/da850/dm36x/dm644x. > > Strange that I have seen no issue with da830 (OMAP-L137 v1.0 & v1.1 - don't > have any v2.0 yet) when tftp'ing the kernel. I do get very occasional errors, > but have put this down to network packet loss. Note that when there is a problem, there's no network activity. I'd seen this on a dm365evm, but don't have the board handy (nor did I note the exact rev of the one I had at the time, sadly). -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 2/6] fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
Simon, On Tue, Sep 13, 2011 at 02:06:56PM -0700, Simon Glass wrote: > Hi Jason, > > On Tue, Sep 13, 2011 at 7:37 AM, Jason wrote: > > On Mon, Sep 12, 2011 at 05:12:37PM -0700, Simon Glass wrote: > >> On Mon, Sep 12, 2011 at 4:37 PM, Jason wrote: > >> > Do you have a git tree up that I could base off of? git.chromium.org's > >> > version of u-boot doesn't seem to have your code... > >> > >> You probably need to look at a branch: > >> > >> http://git.chromium.org/gitweb/?p=chromiumos/third_party/u-boot.git;a=shortlog;h=refs/heads/chromeos-v2011.06 > >> > >> This is based on U-Boot 2011.06. > > > > Added the remote, thanks. Once we figure out the mach-types thing, I'll > > try using the Marvell integrated RTC driver as a real-world example of a > > conversion to fdt. I'll probably have questions ;-) > > That sounds great. I've tried to make it fair straightforward - with > an option for building an fdt into U-Boot itself (i.e. don't define > CONFIG_OF_SEPARATE). This should allow you to use your current dev > flow. Okay, I have an initial version that compiles, but doesn't work. Which, surprisingly, is progress. ;-) I'll post the patch a little bit later after I make sure I'm not missing something dumb. I'll also post some comments to your patch series in a moment. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra2: Enable data cache
Hi Mike, On Friday 09 September 2011 05:55 AM, Mike Frysinger wrote: > On Thursday, September 08, 2011 18:20:16 Simon Glass wrote: >> --- a/board/nvidia/common/board.c >> +++ b/board/nvidia/common/board.c >> @@ -307,3 +307,11 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc) >> return 0; >> } >> #endif >> + >> +#ifndef CONFIG_SYS_DCACHE_OFF >> +void enable_caches(void) >> +{ >> +/* Enable D-cache. I-cache is already enabled in start.S */ >> +dcache_enable(); >> +} >> +#endif > > not specific to your patch, but this seems kind of dumb to copy & paste the > same thing between all the arm sub arches/boards. why cant the default > enable_caches() look like this for arm: > void enable_caches(void) > { > #ifndef CONFIG_SYS_DCACHE_OFF > dcache_enable(); > #endif > #ifndef CONFIG_SYS_ICACHE_OFF > icache_enable(); > #endif > } That was how it was earlier. But then many boards were not cache ready and still didn't define CONFIG_SYS_DCACHE_OFF, so they were broken. So, the current situation is that the absence of CONFIG_SYS_DCACHE_OFF doesn't mean that the board is cache-ready. I like the suggestion made by Jason Liu, that of using CONFIG_SYS_DCACHE_ON instead. In the present situation ARM cpus that properly support cache handling seems to be in the minority, so CONFIG_SYS_DCACHE_ON may be more appropriate. But Wolfgang doesn't seem to like this. best regards, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/6] ColdFire: Clean Makefile _config rules
Remove unused mkdir, and add missing ones. Signed-off-by: Stany MARCEL --- Makefile | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b09fb39..12bb41e 100644 --- a/Makefile +++ b/Makefile @@ -610,6 +610,8 @@ ucname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/') M52277EVB_config \ M52277EVB_spansion_config \ M52277EVB_stmicro_config : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m52277evb @case "$@" in \ M52277EVB_config) FLASH=SPANSION;; \ M52277EVB_spansion_config) FLASH=SPANSION;; \ @@ -629,6 +631,8 @@ M52277EVB_stmicro_config : unconfig M5235EVB_config \ M5235EVB_Flash16_config \ M5235EVB_Flash32_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m5235evb @case "$@" in \ M5235EVB_config)FLASH=16;; \ M5235EVB_Flash16_config)FLASH=16;; \ @@ -643,19 +647,19 @@ M5235EVB_Flash32_config: unconfig @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale EB+MCF-EV123_config : unconfig - @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @echo "CONFIG_SYS_TEXT_BASE = 0xFFE0"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS EB+MCF-EV123_internal_config : unconfig - @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @echo "CONFIG_SYS_TEXT_BASE = 0xF000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS M54451EVB_config \ M54451EVB_stmicro_config : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m54451evb @case "$@" in \ M54451EVB_config) FLASH=NOR;; \ M54451EVB_stmicro_config) FLASH=STMICRO;; \ @@ -679,6 +683,8 @@ M54455EVB_a66_config \ M54455EVB_i33_config \ M54455EVB_i66_config \ M54455EVB_stm33_config : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/m54455evb @case "$@" in \ M54455EVB_config) FLASH=ATMEL; FREQ=;; \ M54455EVB_atmel_config) FLASH=ATMEL; FREQ=;; \ -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/6] ColdFire: Add $(obj) before cpu lib to correct build
Missing $(obj) prevented the build of ColdFire boards in a directory than sources Signed-off-by: Stany MARCEL --- arch/m68k/cpu/mcf5227x/Makefile |2 +- arch/m68k/cpu/mcf523x/Makefile|2 +- arch/m68k/cpu/mcf532x/Makefile|2 +- arch/m68k/cpu/mcf5445x/Makefile |2 +- arch/m68k/cpu/mcf547x_8x/Makefile |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/m68k/cpu/mcf5227x/Makefile b/arch/m68k/cpu/mcf5227x/Makefile index eb36264..0490f0e 100644 --- a/arch/m68k/cpu/mcf5227x/Makefile +++ b/arch/m68k/cpu/mcf5227x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf523x/Makefile b/arch/m68k/cpu/mcf523x/Makefile index eb36264..0490f0e 100644 --- a/arch/m68k/cpu/mcf523x/Makefile +++ b/arch/m68k/cpu/mcf523x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf532x/Makefile b/arch/m68k/cpu/mcf532x/Makefile index 257d46d..eb043d9 100644 --- a/arch/m68k/cpu/mcf532x/Makefile +++ b/arch/m68k/cpu/mcf532x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = COBJS = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf5445x/Makefile b/arch/m68k/cpu/mcf5445x/Makefile index 047e35d..5b7ddd6 100644 --- a/arch/m68k/cpu/mcf5445x/Makefile +++ b/arch/m68k/cpu/mcf5445x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = start.o COBJS = cpu.o speed.o cpu_init.o interrupts.o pci.o diff --git a/arch/m68k/cpu/mcf547x_8x/Makefile b/arch/m68k/cpu/mcf547x_8x/Makefile index e41ce68..a415aab 100644 --- a/arch/m68k/cpu/mcf547x_8x/Makefile +++ b/arch/m68k/cpu/mcf547x_8x/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk # CFLAGS += -DET_DEBUG -LIB= lib$(CPU).o +LIB= $(obj)lib$(CPU).o START = COBJS = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/6] ColdFire: Fix compilation with CONFIG_SYS_DRAMSZ1 defined
A temp variable was used but not declared, with CONFIG_SYS_DRAMSZ1 defined. This variable is now declared in the functione when needed. Signed-off-by: Stany MARCEL --- board/freescale/m548xevb/m548xevb.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c index 4a2a5c7..fbc0888 100644 --- a/board/freescale/m548xevb/m548xevb.c +++ b/board/freescale/m548xevb/m548xevb.c @@ -43,6 +43,9 @@ phys_size_t initdram(int board_type) volatile siu_t *siu = (siu_t *) (MMAP_SIU); volatile sdram_t *sdram = (volatile sdram_t *)(MMAP_SDRAM); u32 dramsize, i; +#ifdef CONFIG_SYS_DRAMSZ1 + u32 temp; +#endif siu->drv = CONFIG_SYS_SDRAM_DRVSTRENGTH; -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/6] ColdFire: Merge differentiated linking files into a sigle one by board
The spa, stm, int, 32 and 16 linking files are identical so there is no need to differentiate them. A single lds file is now used, and _config rule are simplified. Signed-off-by: Stany MARCEL --- Makefile |9 -- board/freescale/m52277evb/u-boot.lds | 102 + board/freescale/m52277evb/u-boot.spa | 102 - board/freescale/m52277evb/u-boot.stm | 136 -- board/freescale/m5235evb/u-boot.16 | 99 board/freescale/m5235evb/u-boot.32 | 99 board/freescale/m5235evb/u-boot.lds | 99 board/freescale/m54451evb/u-boot.lds | 97 board/freescale/m54451evb/u-boot.spa | 97 board/freescale/m54451evb/u-boot.stm | 97 board/freescale/m54455evb/u-boot.atm | 97 board/freescale/m54455evb/u-boot.int | 97 board/freescale/m54455evb/u-boot.lds | 97 board/freescale/m54455evb/u-boot.stm | 136 -- 14 files changed, 395 insertions(+), 969 deletions(-) create mode 100644 board/freescale/m52277evb/u-boot.lds delete mode 100644 board/freescale/m52277evb/u-boot.spa delete mode 100644 board/freescale/m52277evb/u-boot.stm delete mode 100644 board/freescale/m5235evb/u-boot.16 delete mode 100644 board/freescale/m5235evb/u-boot.32 create mode 100644 board/freescale/m5235evb/u-boot.lds create mode 100644 board/freescale/m54451evb/u-boot.lds delete mode 100644 board/freescale/m54451evb/u-boot.spa delete mode 100644 board/freescale/m54451evb/u-boot.stm delete mode 100644 board/freescale/m54455evb/u-boot.atm delete mode 100644 board/freescale/m54455evb/u-boot.int create mode 100644 board/freescale/m54455evb/u-boot.lds delete mode 100644 board/freescale/m54455evb/u-boot.stm diff --git a/Makefile b/Makefile index e65ba12..b09fb39 100644 --- a/Makefile +++ b/Makefile @@ -618,13 +618,11 @@ M52277EVB_stmicro_config :unconfig if [ "$${FLASH}" = "SPANSION" ] ; then \ echo "#define CONFIG_SYS_SPANSION_BOOT" >> $(obj)include/config.h ; \ echo "CONFIG_SYS_TEXT_BASE = 0x" > $(obj)board/freescale/m52277evb/config.tmp ; \ - cp $(obj)board/freescale/m52277evb/u-boot.spa $(obj)board/freescale/m52277evb/u-boot.lds ; \ fi; \ if [ "$${FLASH}" = "STMICRO" ] ; then \ echo "#define CONFIG_CF_SBF">> $(obj)include/config.h ; \ echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ echo "CONFIG_SYS_TEXT_BASE = 0x43E0" > $(obj)board/freescale/m52277evb/config.tmp ; \ - cp $(obj)board/freescale/m52277evb/u-boot.stm $(obj)board/freescale/m52277evb/u-boot.lds ; \ fi @$(MKCONFIG) -n $@ -a M52277EVB m68k mcf5227x m52277evb freescale @@ -639,10 +637,8 @@ M5235EVB_Flash32_config: unconfig if [ "$${FLASH}" != "16" ] ; then \ echo "#define NORFLASH_PS32BIT 1" >> $(obj)include/config.h ; \ echo "CONFIG_SYS_TEXT_BASE = 0xFFC0" > $(obj)board/freescale/m5235evb/config.tmp ; \ - cp $(obj)board/freescale/m5235evb/u-boot.32 $(obj)board/freescale/m5235evb/u-boot.lds ; \ else \ echo "CONFIG_SYS_TEXT_BASE = 0xFFE0" > $(obj)board/freescale/m5235evb/config.tmp ; \ - cp $(obj)board/freescale/m5235evb/u-boot.16 $(obj)board/freescale/m5235evb/u-boot.lds ; \ fi @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale @@ -666,13 +662,11 @@ M54451EVB_stmicro_config :unconfig esac; \ if [ "$${FLASH}" = "NOR" ] ; then \ echo "CONFIG_SYS_TEXT_BASE = 0x" > $(obj)board/freescale/m54451evb/config.tmp ; \ - cp $(obj)board/freescale/m54451evb/u-boot.spa $(obj)board/freescale/m54451evb/u-boot.lds ; \ fi; \ if [ "$${FLASH}" = "STMICRO" ] ; then \ echo "#define CONFIG_CF_SBF">> $(obj)include/config.h ; \ echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ echo "CONFIG_SYS_TEXT_BASE = 0x47E0" > $(obj)board/freescale/m54451evb/config.tmp ; \ - cp $(obj)board/freescale/m54451evb/u-boot.stm $(obj)board/freescale/m54451evb/u-boot.lds ; \ fi; \ echo "#define CONFIG_SYS_INPUT_CLKSRC 2400" >> $(obj)include/config.h ; @$(MKCONFIG) -n $@ -a M54451EVB m68k mcf5445x m54451evb freescale @@ -698,18 +692,15 @@ M54455EVB_stm33_config : unconfig if [ "$${FLASH}" = "INTEL" ] ; then \ echo "#define CONFIG_SYS_INTEL_BOOT" >> $(obj)include/config.h ; \ echo "CONFIG_SYS_TEXT_BASE = 0x" > $(obj)board/freescale/m54455evb/config.tmp ; \ - cp $(obj)bo
[U-Boot] [PATCH 3/6] ColdFire: Move boards with simple _config rules to boards.cfg
Signed-off-by: Stany MARCEL --- MAKEALL|6 --- Makefile | 96 boards.cfg | 21 +- include/configs/M5329EVB.h |8 ++-- 4 files changed, 24 insertions(+), 107 deletions(-) diff --git a/MAKEALL b/MAKEALL index 4d18c11..939825c 100755 --- a/MAKEALL +++ b/MAKEALL @@ -438,18 +438,12 @@ LIST_microblaze="$(boards_by_arch microblaze)" # LIST_coldfire="$(boards_by_arch m68k) - astro_mcf5373l \ - cobra5272 \ EB+MCF-EV123\ EB+MCF-EV123_internal \ M52277EVB \ M5235EVB\ - M5329AFEE \ - M5373EVB\ M54451EVB \ M54455EVB \ - M5475AFE\ - M5485AFE\ " # diff --git a/Makefile b/Makefile index e9ba6a4..e65ba12 100644 --- a/Makefile +++ b/Makefile @@ -607,11 +607,6 @@ ucname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/') # ## Coldfire # - -astro_mcf5373l_config \ -astro_mcf5373l_RAM_config :unconfig - @$(MKCONFIG) -n $@ -t $@ astro_mcf5373l m68k mcf532x mcf5373l astro - M52277EVB_config \ M52277EVB_spansion_config \ M52277EVB_stmicro_config : unconfig @@ -651,9 +646,6 @@ M5235EVB_Flash32_config:unconfig fi @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale -cobra5272_config : unconfig - @$(MKCONFIG) $@ m68k mcf52x2 cobra5272 - EB+MCF-EV123_config : unconfig @mkdir -p $(obj)include @mkdir -p $(obj)board/BuS/EB+MCF-EV123 @@ -666,26 +658,6 @@ EB+MCF-EV123_internal_config : unconfig @echo "CONFIG_SYS_TEXT_BASE = 0xF000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS -M5329AFEE_config \ -M5329BFEE_config : unconfig - @case "$@" in \ - M5329AFEE_config) NAND=0;; \ - M5329BFEE_config) NAND=16;; \ - esac; \ - if [ "$${NAND}" != "0" ] ; then \ - echo "#define NANDFLASH_SIZE$${NAND}" > $(obj)include/config.h ; \ - fi - @$(MKCONFIG) -n $@ -a M5329EVB m68k mcf532x m5329evb freescale - -M5373EVB_config : unconfig - @case "$@" in \ - M5373EVB_config)NAND=16;; \ - esac; \ - if [ "$${NAND}" != "0" ] ; then \ - echo "#define NANDFLASH_SIZE$${NAND}" > $(obj)include/config.h ; \ - fi - @$(MKCONFIG) -a M5373EVB m68k mcf532x m5373evb freescale - M54451EVB_config \ M54451EVB_stmicro_config : unconfig @case "$@" in \ @@ -743,74 +715,6 @@ M54455EVB_stm33_config : unconfig $(XECHO) "... with $${FREQ}Hz input clock" @$(MKCONFIG) -n $@ -a M54455EVB m68k mcf5445x m54455evb freescale -M5475AFE_config \ -M5475BFE_config \ -M5475CFE_config \ -M5475DFE_config \ -M5475EFE_config \ -M5475FFE_config \ -M5475GFE_config : unconfig - @case "$@" in \ - M5475AFE_config)BOOT=2;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ - M5475BFE_config)BOOT=2;CODE=16;VID=0;USB=0;RAM=64;RAM1=0;; \ - M5475CFE_config)BOOT=2;CODE=16;VID=1;USB=1;RAM=64;RAM1=0;; \ - M5475DFE_config)BOOT=2;CODE=0;VID=0;USB=1;RAM=64;RAM1=0;; \ - M5475EFE_config)BOOT=2;CODE=0;VID=1;USB=1;RAM=64;RAM1=0;; \ - M5475FFE_config)BOOT=2;CODE=32;VID=1;USB=1;RAM=64;RAM1=64;; \ - M5475GFE_config)BOOT=4;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ - esac; \ - echo "#define CONFIG_SYS_BUSCLK 1" > $(obj)include/config.h ; \ - echo "#define CONFIG_SYS_BOOTSZ $${BOOT}" >> $(obj)include/config.h ; \ - echo "#define CONFIG_SYS_DRAMSZ $${RAM}" >> $(obj)include/config.h ; \ - if [ "$${RAM1}" != "0" ] ; then \ - echo "#define CONFIG_SYS_DRAMSZ1$${RAM1}" >> $(obj)include/config.h ; \ - fi; \ - if [ "$${CODE}" != "0" ] ; then \ - echo "#define CONFIG_SYS_NOR1SZ $${CODE}" >> $(obj)include/config.h ; \ - fi; \ - if [ "$${VID}" == "1" ] ; then \ - echo "#define CONFIG_SYS_VIDEO" >> $(obj)include/config.h ; \ - fi; \ - if [ "$${USB}" == "1" ] ; then \ - echo "#define CONFIG_SYS_USBCTRL" >> $(obj)include/config.h ; \ - fi - @$(MKCONFIG) -n $@ -a M5475EVB m68k mcf547x_8x m547xevb freescale - -M5485AFE_config \ -M5485BFE_config \ -M5485CFE_config \ -M5485DFE_config \ -M5485EFE_config \ -M5485FFE_config \ -M5485GFE_config \ -M5485HFE_config : unconfig - @case "$@" in \ -
[U-Boot] [PATCH 1/6] ColdFire: Cleanup lds files for multiple defined symbols
Lds files cleened to remove multiple defined section and modified to be compliant with --gc-sections added for ColdFire platform in a previous patch. Signed-off-by: Stany MARCEL --- board/BuS/EB+MCF-EV123/u-boot.lds| 73 ++- board/cobra5272/u-boot.lds | 69 ++ board/esd/tasreg/u-boot.lds | 69 +- board/freescale/m5235evb/u-boot.16 | 71 ++- board/freescale/m5235evb/u-boot.32 | 79 ++ board/freescale/m5249evb/u-boot.lds | 68 + board/freescale/m5253evbe/u-boot.lds | 67 +--- board/freescale/m5271evb/u-boot.lds | 66 +--- board/freescale/m5272c3/u-boot.lds | 67 +--- board/freescale/m5275evb/u-boot.lds | 68 ++--- board/freescale/m5282evb/u-boot.lds | 70 ++ board/idmr/u-boot.lds| 69 +- 12 files changed, 150 insertions(+), 686 deletions(-) diff --git a/board/BuS/EB+MCF-EV123/u-boot.lds b/board/BuS/EB+MCF-EV123/u-boot.lds index e0359e3..4ba1964 100644 --- a/board/BuS/EB+MCF-EV123/u-boot.lds +++ b/board/BuS/EB+MCF-EV123/u-boot.lds @@ -22,52 +22,14 @@ */ OUTPUT_ARCH(m68k) -/* Do we need any of these for elf? - __DYNAMIC = 0;*/ + SECTIONS { - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym: { *(.dynsym)} - .dynstr: { *(.dynstr)} - .rel.text : { *(.rel.text) } - .rela.text : { *(.rela.text) } - .rel.data : { *(.rel.data) } - .rela.data : { *(.rela.data) } - .rel.rodata: { *(.rel.rodata)} - .rela.rodata : { *(.rela.rodata) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors: { *(.rela.ctors)} - .rel.dtors : { *(.rel.dtors) } - .rela.dtors: { *(.rela.dtors)} - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } - .plt : { *(.plt) } .text : { -/* WARNING - the following is hand-optimized to fit within */ -/* the sector layout of our flash chips! XXX FIXME XXX */ - -arch/m68k/cpu/mcf52x2/start.o (.text) -common/dlmalloc.o (.text) -lib/string.o (.text) -lib/vsprintf.o (.text) -lib/crc32.o(.text) -lib/zlib.o (.text) +arch/m68k/cpu/mcf52x2/start.o (.text*) -/*. = env_offset; */ -common/env_embedded.o(.text) - -*(.text) -*(.fixup) -*(.got1) +*(.text*) } _etext = .; PROVIDE (etext = .); @@ -75,43 +37,39 @@ SECTIONS { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - .fini : { *(.fini)} =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } /* Read-write section, merged into data segment: */ . = (. + 0x00FF) & 0xFF00; _erotext = .; PROVIDE (erotext = .); -.reloc : + + .reloc : { __got_start = .; -*(.got) +KEEP(*(.got)) __got_end = .; _GOT2_TABLE_ = .; -*(.got2) +KEEP(*(.got2)) _FIXUP_TABLE_ = .; -*(.fixup) +KEEP(*(.fixup)) } __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; __fixup_entries = (. - _FIXUP_TABLE_)>>2; .data: { -*(.data) -*(.data1) -*(.sdata) -*(.sdata2) -*(.dynamic) -CONSTRUCTORS +*(.data*) +*(.sdata*) } _edata = .; PROVIDE (edata = .); + . = .; __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) } __u_boot_cmd_end = .; + . = .; __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; @@ -124,12 +82,11 @@ SECTIONS __init_end = .; __bss_start = .; - .bss (NOLOAD) : + .bss (NOLOAD) : { _sbss = .; - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.bss*) + *(.sbss*) *(COMMON) . = ALIGN(4); _ebss = .; diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index da14807..6c2dfe8 100644 --- a/board/cobra5272/u-boot.lds +++ b/board/cobra5272/u-boot.lds @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000 + * (C) Copyright 2000-2003 * Wolfgang Denk, DENX Software Engineering, w...@denx.de. * * See file CREDITS for list of people who contributed to this @@ -22,51 +22,17 @@ */ OUTPUT_ARCH(m68k) -/* Do we need any of these for elf? - __DYNAMIC = 0;*/ + SECTIONS { - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash
Re: [U-Boot] [PATCH 03/15] FEC: Add support for iMX28 quirks
On Wednesday, September 14, 2011 09:17:37 AM Stefano Babic wrote: > On 09/12/2011 06:06 AM, Marek Vasut wrote: > > Signed-off-by: Marek Vasut > > Cc: Ben Warren > > Cc: Stefano Babic > > Cc: Wolfgang Denk > > Cc: Detlev Zundel > > --- > > Hi Marek, > > only a small question: > > drivers/net/fec_mxc.c | 44 > > ++-- 1 files changed, 42 > > insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c > > index cfe2176..f50433dd 100644 > > --- a/drivers/net/fec_mxc.c > > +++ b/drivers/net/fec_mxc.c > > @@ -42,6 +42,14 @@ DECLARE_GLOBAL_DATA_PTR; > > > > #defineCONFIG_FEC_XCV_TYPE MII100 > > #endif > > > > +/* > > + * The i.MX28 operates with packets in big endian. We need to swap them > > before + * sending and after receiving. > > + */ > > +#ifdef CONFIG_MX28 > > +#defineCONFIG_FEC_MXC_SWAP_PACKET > > +#endif > > + > > Do we really need two defines ? If the MX28 has the oddity to swap > packets and this must be always done for this SOC, we could protect the > code only with CONFIG_MX28. I think in the code it is already clear that > in case of MX28 the packets are swapped. Well if any other CPU with this problem pops up on the market, we should be ready. > > Best regards, > Stefano Babic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/9] powerpc/mpc85xxcds: Fix PCI speed
On Tue, Sep 13, 2011 at 03:18:59PM -0500, Timur Tabi wrote: > Scott Wood wrote: > > > So you'll set the speed to if the actual speed is 6600? > > I think so. > > > Even if it's 3300, why force it to ? > > That's a good question. Since the patch doesn't explain why it's making the > change, there's no way for anyone to know. That makes it very difficult for > people to review the patch, but I'm sure that Chenhui already knows that. > > -- > Timur Tabi > Linux kernel developer at Freescale OK. I'll rewrite the description in the patch. -chenhui ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] MX25: tx25: Pass NAND_U_BOOT option
On Wed, Sep 14, 2011 at 4:45 AM, Stefano Babic wrote: ... > I was too fast...I reread the whole thread > (http://patchwork.ozlabs.org/patch/112080/) > CONFIG_NAND_U_BOOT is defined in tx25.h, and there is no need to define > it again. I think the actual patch is ok. Have you seen any problem ? Ok, thanks for the clarification. Your original patch looks good then. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] da830: disable cache usage due to coherency issues
On 14/09/11 06:54, Netagunte, Nagabhushana wrote: > Nick, > > I am seeing this issue on da830/da850/dm36x/dm644x. Strange that I have seen no issue with da830 (OMAP-L137 v1.0 & v1.1 - don't have any v2.0 yet) when tftp'ing the kernel. I do get very occasional errors, but have put this down to network packet loss. The v1.0 and v1.1 parts do have a d-cache errata, so we only get to use the d-cache in write through mode. This would mean that TCP packet data writes by the processor would never have a coherency problem. Reads could still have an issue, but I think the explanation provided so far referred to TCP packet sending...? This vintage of da830 will always have to use write trough mode, so there should be no issue...? > I agree that u-boot will be faster with cache enabled. And also, TI wants it > to be enabled soon. Since so many patches are lined u, we don't up-streaming > them to get hampered because of this issue. So, we are trying to push this > Patch. We are committed come up with appropriate patch to fix the EMAC and > coherency issue. > > Meanwhile, we are trying to gather info about earlier patch/changes which > disabled cache so that community understands the known issue. Boot time is critical to us. I can't ship without cache enabled. I can use my own _config.h of course to work around it I think, but I don't understand why you think there is an issue to fix on da830 yet. With a working d-cache I can imagine such a problem though. > Also, one more engineer observed the issue with EMAC, I will send his mail to > you. > > Regards, > Nag > On Wed, Aug 31, 2011 at 15:09:35, Nick Thompson wrote: >> On 31/08/11 06:40, Netagunte, Nagabhushana wrote: >>> Mike, >>> >>> We will address cache coherency issues soon after these patches. >>> Earlier also, chache was disabled. Only due to new cache management >>> Framework which was added recently, it is explicitly needed to be indicated >>> to turn off cache. >>> >>> Since fixing the cache coherency issues with EMAC will take some time, I >>> want this patch to go in mainline so that issue doesn't crop up for People >>> who use u-boot. >>> >>> Regards, >>> Nag >>> >> Which device(s) does this occur on? I have a lot of OMAP-L137 (EVM and >> custom) boards with cache enabled and no problems tftp'ing the kernel. >> >> On the other hand tftp and kernel CRC checking are much faster with cache >> enabled. >> >> Nick. >> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/9] powerpc/mpc85xxcds: Fix PCI speed
On Tue, Sep 13, 2011 at 10:14:44PM +0200, Wolfgang Denk wrote: > Dear Zhao Chenhui, > > In message <1315898131-27710-2-git-send-email-chenhui.z...@freescale.com> you > wrote: > ... > > printf("PCI1: %d bit, %s MHz, %s\n", > > (pci1_32) ? 32 : 64, > > - (pci1_speed == 3300) ? "33" : > > - (pci1_speed == 6600) ? "66" : "unknown", > > + (pci1_speed == ) ? "33" : > > + (pci1_speed == ) ? "66" : "unknown", > > pci1_clk_sel ? "sync" : "async"); > > Why cannot you simply write: > > ... > char buf[32]; > ... > printf("PCI1: %d bit, %s MHz, %ssync\n", > (pci1_32) ? 32 : 64, > strmhz(buf, pci1_speed), > pci1_clk_sel ? "" : "a"); > > ? > > > Best regards, > > Wolfgang Denk > Yes. I'll repost it. -chenhui > -- > 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 only time the world beats a path to your door is when you are in > the bathroom. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] coldfire: Fix compilation for most coldfire boards
> >> In message >> 005.039d.mgd.msft.net> you wrote: > >>> > From: Stany MARCEL [mailto:stany.mar...@novasys-ingenierie.com] > Sent: Monday, September 05, 2011 9:29 PM > To: u-boot@lists.denx.de > Cc: Jin Zhengxiong-R64188; Jin Zhengxiong-R64188; Stany MARCEL > Subject: [PATCH 1/2] coldfire: Fix compilation for most coldfire > boards > > Many different patches to fix compilation of coldfire boards. > Compilation could now be done in a different directory from the > sources one. Simple board config switched from Makefile to > boards.cfg EP2500 broken board removed from boards.cfg. Link files > corrected to remove zlib.o and multiple defined symbols. > > Signed-off-by: Stany MARCEL > --- > MAKEALL |6 -- > Makefile | 124 > + > - > >> > arch/m68k/cpu/mcf5227x/Makefile |2 +- > arch/m68k/cpu/mcf523x/Makefile |2 +- > arch/m68k/cpu/mcf532x/Makefile |2 +- > arch/m68k/cpu/mcf5445x/Makefile |2 +- > arch/m68k/cpu/mcf547x_8x/Makefile|2 +- > board/BuS/EB+MCF-EV123/u-boot.lds|8 -- > board/cobra5272/u-boot.lds |7 -- > board/esd/tasreg/u-boot.lds |7 -- > board/freescale/m52277evb/.gitignore |1 + > board/freescale/m5235evb/.gitignore |1 + > board/freescale/m5235evb/u-boot.16 |8 -- > board/freescale/m5235evb/u-boot.32 | 16 - > board/freescale/m5249evb/u-boot.lds |7 -- > board/freescale/m5253evbe/u-boot.lds |7 -- > board/freescale/m5272c3/u-boot.lds |7 -- > board/freescale/m5275evb/u-boot.lds |6 -- > board/freescale/m54451evb/.gitignore |1 + > board/freescale/m54455evb/.gitignore |1 + > board/idmr/u-boot.lds|7 -- > boards.cfg | 21 ++- > include/configs/M5329EVB.h |8 +- > 23 files changed, 50 insertions(+), 203 deletions(-) create mode > 100644 board/freescale/m52277evb/.gitignore > create mode 100644 board/freescale/m5235evb/.gitignore > create mode 100644 board/freescale/m54451evb/.gitignore > create mode 100644 board/freescale/m54455evb/.gitignore > > >>> [Jin Zhengxiong-R64188] > >>> Please remove the unused git information from the patch. Thanks. > >> > >> I agree with your other comments, but what sort of "unused git > >> information" are you referring to here? > >> > >> There is no "unused git information" in this patch. It is a proper > >> patch generated by git-format-patch and submitted using git-send-email. > >> > >> There is nothing that should be changed in the format. > >> > > [Jin Zhengxiong-R64188] > > Ok, Thanks a lot, I had thought that the .gitignore which ignore the lds > files are empty files. > > > > Best Regards, > > Jason > > > > > Hello, > > Sorry for my late reply, I was working on another subject. > > My work is now separated in different patches and I also made some additional > improvements. > > What is the best way to submit this new work ? I don't know if it must be a > version two of the previous patch or a new set of patches. > [Jin Zhengxiong-R64188] My personal suggestion is to send a new set of patches, Thanks. > Here is the new list of patches' subjects: > * ColdFire: Cleanup lds files for multiple defined symbols > * ColdFire: Add $(obj) before cpu lib to correct build > * ColdFire: Move boards with simple _config rules to boards.cfg > * ColdFire: Merge differentiated linking files into a sigle one by board > * ColdFire: Clean Makefile _config rules > * ColdFire: Fix compilation with CONFIG_SYS_DRAMSZ1 defined > [Jin Zhengxiong-R64188] I cannot see the details of your patches, So I don't know whether it's good idea to split the _config cleanup to two patches, and split the lds clean up to two patches. BTW. Could you please try to use CONFIG_SYS_LDSCRIPT to avoid copying the lds file? Thanks. > For Information, for ColdFire I can only test with a M5485EVB. For other > ColdFire boards I can only verify that the build is performed correctly. [Jin Zhengxiong-R64188] OK, Thanks. BTW. Please try to compose your email with plaintext, Thanks. Jason ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] i82559#0: Tx error buffer not ready
Hi, I port u-boot on my board with a i82559ER on PCI board. I have the command-line-menu and Can start commands. I get this error => ping "10.110.248.240" Trying i82559#0 i82559#0: Tx error buffer not ready FAIL ping failed; host "10.110.248.240" is not alive => If i start ping-cmd. CPU: SH7785 U-boot-version: 2011.03 Gcc-version: 4.1.2 Thank you for any hints S.Altunbas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] coldfire: Fix compilation for most coldfire boards
On 09/09/2011 10:18 AM, Jin Zhengxiong-R64188 wrote: > > >> -Original Message- >> From: Wolfgang Denk [mailto:w...@denx.de] >> Sent: Friday, September 09, 2011 3:26 PM >> To: Jin Zhengxiong-R64188 >> Cc: Stany MARCEL; u-boot@lists.denx.de >> Subject: Re: [U-Boot] [PATCH 1/2] coldfire: Fix compilation for most coldfire >> boards >> >> Dear Jin Zhengxiong-R64188, >> >> In message > 005.039d.mgd.msft.net> you wrote: >>> From: Stany MARCEL [mailto:stany.mar...@novasys-ingenierie.com] Sent: Monday, September 05, 2011 9:29 PM To: u-boot@lists.denx.de Cc: Jin Zhengxiong-R64188; Jin Zhengxiong-R64188; Stany MARCEL Subject: [PATCH 1/2] coldfire: Fix compilation for most coldfire boards Many different patches to fix compilation of coldfire boards. Compilation could now be done in a different directory from the sources one. Simple board config switched from Makefile to boards.cfg EP2500 broken board removed from boards.cfg. Link files corrected to remove zlib.o and multiple defined symbols. Signed-off-by: Stany MARCEL --- MAKEALL |6 -- Makefile | 124 +- >> arch/m68k/cpu/mcf5227x/Makefile |2 +- arch/m68k/cpu/mcf523x/Makefile |2 +- arch/m68k/cpu/mcf532x/Makefile |2 +- arch/m68k/cpu/mcf5445x/Makefile |2 +- arch/m68k/cpu/mcf547x_8x/Makefile|2 +- board/BuS/EB+MCF-EV123/u-boot.lds|8 -- board/cobra5272/u-boot.lds |7 -- board/esd/tasreg/u-boot.lds |7 -- board/freescale/m52277evb/.gitignore |1 + board/freescale/m5235evb/.gitignore |1 + board/freescale/m5235evb/u-boot.16 |8 -- board/freescale/m5235evb/u-boot.32 | 16 - board/freescale/m5249evb/u-boot.lds |7 -- board/freescale/m5253evbe/u-boot.lds |7 -- board/freescale/m5272c3/u-boot.lds |7 -- board/freescale/m5275evb/u-boot.lds |6 -- board/freescale/m54451evb/.gitignore |1 + board/freescale/m54455evb/.gitignore |1 + board/idmr/u-boot.lds|7 -- boards.cfg | 21 ++- include/configs/M5329EVB.h |8 +- 23 files changed, 50 insertions(+), 203 deletions(-) create mode 100644 board/freescale/m52277evb/.gitignore create mode 100644 board/freescale/m5235evb/.gitignore create mode 100644 board/freescale/m54451evb/.gitignore create mode 100644 board/freescale/m54455evb/.gitignore >>> [Jin Zhengxiong-R64188] >>> Please remove the unused git information from the patch. Thanks. >> >> I agree with your other comments, but what sort of "unused git information" >> are >> you referring to here? >> >> There is no "unused git information" in this patch. It is a proper patch >> generated by git-format-patch and submitted using git-send-email. >> >> There is nothing that should be changed in the format. >> > [Jin Zhengxiong-R64188] > Ok, Thanks a lot, I had thought that the .gitignore which ignore the lds > files are empty files. > > Best Regards, > Jason > > Hello, Sorry for my late reply, I was working on another subject. My work is now separated in different patches and I also made some additional improvements. What is the best way to submit this new work ? I don't know if it must be a version two of the previous patch or a new set of patches. Here is the new list of patches' subjects: * ColdFire: Cleanup lds files for multiple defined symbols * ColdFire: Add $(obj) before cpu lib to correct build * ColdFire: Move boards with simple _config rules to boards.cfg * ColdFire: Merge differentiated linking files into a sigle one by board * ColdFire: Clean Makefile _config rules * ColdFire: Fix compilation with CONFIG_SYS_DRAMSZ1 defined For Information, for ColdFire I can only test with a M5485EVB. For other ColdFire boards I can only verify that the build is performed correctly. Best Regards, Stany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot