arm, davinci: add support for the am1808 based enbw_cmc board
Subsystems (2)
cover 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/
Signature · 1 line
1.7.6
PATCH 1/8 arm, davinci: add SYSCFG1 base and register struct
--- arch/arm/include/asm/arch-davinci/hardware.h | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-davinci/hardware.h +16 -0
@@ -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 0x01e20000#define DAVINCI_MDIO_CNTRL_REGS_BASE 0x01e24000 +#define DAVINCI_SYSCFG1_BASE 0x01e2c000#define DAVINCI_MMC_SD0_BASE 0x01c40000#define DAVINCI_MMC_SD1_BASE 0x01e1b000#define DAVINCI_TIMER2_BASE 0x01f0c000
@@ -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_BIT 4 +/* Interrupt controller */ struct davinci_aintc_regs {dv_reg revid;
Signature · 1 line
1.7.6
PATCH 2/8 arm, davinci: add some missing defines in hardware.h
In reply to Heiko Schocher--- arch/arm/include/asm/arch-davinci/hardware.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-davinci/hardware.h +11 -0
@@ -322,6 +322,11 @@ void davinci_errata_workarounds(void);#else /* CONFIG_SOC_DA8XX */ +#define PSC_ENABLE 0x3 +#define PSC_DISABLE 0x2 +#define PSC_SYNCRESET 0x1 +#define PSC_SWRSTDISABLE 0x0 +#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_BIT 4 +#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;
Signature · 1 line
1.7.6
PATCH 3/8 arm, davinci, am1808, gpio: add missing defines for bank 8
In reply to Heiko Schocher--- arch/arm/include/asm/arch-davinci/gpio.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-davinci/gpio.h +2 -0
@@ -35,6 +35,7 @@#define DAVINCI_GPIO_BANK23 0x01E26038#define DAVINCI_GPIO_BANK45 0x01E26060#define DAVINCI_GPIO_BANK67 0x01E26088 +#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
Signature · 1 line
1.7.6
PATCH 4/8 arm, davinci: add ddr2 definition
In reply to Heiko Schocher--- 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
arch/arm/include/asm/arch-davinci/ddr2_defs.h new file +96 -0
@@ -0,0 +1,96 @@ +/* +* Copyright (C) 2011 +* Heiko Schocher, DENX Software Engineering, hs at 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 int sdrstat;/* 0x04 */ +unsigned int sdbcr;/* 0x08 */ +unsigned int sdrcr;/* 0x0C */ +unsigned int sdtimr;/* 0x10 */ +unsigned int sdtimr2;/* 0x14 */ +unsigned char rsvd1[4 ];/* 0x18 */ +unsigned int sdbcr2;/* 0x1C */ +unsigned int pbbpr;/* 0x20 */ +unsigned char rsvd2[156 ];/* 0x24 */ +unsigned int irr;/* 0xC0 */ +unsigned int imr;/* 0xC4 */ +unsigned int imsr;/* 0xC8 */ +unsigned int imcr;/* 0xCC */ +unsigned char rsvd3[20 ];/* 0xD0 */ +unsigned int ddrphycr;/* 0xE4 */ +unsigned int ddrphycr2;/* 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_SHIFT 0 + +#define DV_DDR_SDTMR1_RFC_SHIFT 25 +#define DV_DDR_SDTMR1_RP_SHIFT 22 +#define DV_DDR_SDTMR1_RCD_SHIFT 19 +#define DV_DDR_SDTMR1_WR_SHIFT 16 +#define DV_DDR_SDTMR1_RAS_SHIFT 11 +#define DV_DDR_SDTMR1_RC_SHIFT 6 +#define DV_DDR_SDTMR1_RRD_SHIFT 3 +#define DV_DDR_SDTMR1_WTR_SHIFT 0 + +#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_SHIFT 5 +#define DV_DDR_SDTMR2_CKE_SHIFT 0 + +#define DV_DDR_SDCR_DDR2TERM1_SHIFT 27 +#define DV_DDR_SDCR_IBANK_POS_SHIFT 26 +#define DV_DDR_SDCR_MSDRAMEN_SHIFT 25 +#define DV_DDR_SDCR_DDRDRIVE1_SHIFT 24 +#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_SHIFT 18 +#define DV_DDR_SDCR_DDREN_SHIFT 17 +#define DV_DDR_SDCR_SDRAMEN_SHIFT 16 +#define DV_DDR_SDCR_TIMUNLOCK_SHIFT 15 +#define DV_DDR_SDCR_BUS_WIDTH_SHIFT 14 +#define DV_DDR_SDCR_CL_SHIFT 9 +#define DV_DDR_SDCR_IBANK_SHIFT 4 +#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_ */
Signature · 1 line
1.7.6
PATCH 5/8 arm, davinci: add NOR Boot Configuration Word
In reply to Heiko Schocherto add the "NOR Boot Configuration Word" on AM18xx based boards, define CONFIG_SYS_DV_NOR_BOOT_CFG.
--- arch/arm/cpu/arm926ejs/start.S | 9 +++++++++ doc/README.davinci | 9 +++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/cpu/arm926ejs/start.S +9 -0
@@ -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
doc/README.davinci +9 -0
@@ -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
Signature · 1 line
1.7.6
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
In reply to Heiko Schocher--- 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
arch/arm/cpu/arm926ejs/davinci/Makefile +1 -0
@@ -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
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +428 -0
428 lines not on this page · raw message
arch/arm/include/asm/arch-davinci/am1808_lowlevel.h new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.6
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Heiko,
I am looking forward to see these patches in mainline u-boot. My custom board also directly boots from NOR, so I think there is a lot I can re-use for my board.
I have one question, please see below:
Quoted 10 lines · Heiko Schocher
Signed-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>---
?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 100644arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c?create mode 100644arch/arm/include/asm/arch-davinci/am1808_lowlevel.h
[...]
Quoted 5 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +0
-0
[...]
Quoted 26 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +26
-0+void am1808_lpc_transition (unsigned char pscnum,unsigned char module, + ? ? ? ? ? ? ? unsigned char domain, unsigned char state) +{ + ? ? ? struct davinci_psc_regs *reg; + ? ? ? dv_reg_p mdstat, mdctl; + + ? ? ? if (pscnum == 0) { + ? ? ? ? ? ? ? reg = davinci_psc0_regs; + ? ? ? ? ? ? ? mdstat = ®->psc0.mdstat[module]; + ? ? ? ? ? ? ? mdctl = ®->psc0.mdctl[module]; + ? ? ? } else { + ? ? ? ? ? ? ? reg = davinci_psc1_regs; + ? ? ? ? ? ? ? mdstat = ®->psc1.mdstat[module]; + ? ? ? ? ? ? ? mdctl = ®->psc1.mdctl[module]; + ? ? ? } + + ? ? ? /* Wait for any outstanding transition to complete */ + ? ? ? while ((readl(®->ptstat) & (0x00000001 << domain))) + ? ? ? ? ? ? ? ; + + ? ? ? /* If we are already in that state, just return */ + ? ? ? if ((readl(mdstat) & 0x1F) == state) + ? ? ? ? ? ? ? return; + + ? ? ? /* Perform transition */ + ? ? ? writel((readl(mdctl) & 0xFFFFFFE0) | state, mdctl);
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c
Quoted 10 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +10
-0+ ? ? ? setbits_le32(®->ptcmd, (0x00000001 << domain)); + + ? ? ? /* Wait for transition to complete */ + ? ? ? while (readl(®->ptstat) & (0x00000001 << domain)) + ? ? ? ? ? ? ? ; + + ? ? ? /* Wait and verify the state */ + ? ? ? while ((readl(mdstat) & 0x1F) != state) + ? ? ? ? ? ? ? ; +}
There is some similar code in arch/arm/cpu/arm926ejs/davinci/psc.c. Is there any reason why you don't use this code or adapt it for your needs?
Regards, Christian
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Hello Christian,
Quoted 4 lines · Christian Riesch
Heiko,
I am looking forward to see these patches in mainline u-boot. My custom board also directly boots from NOR, so I think there is a lot I can re-use for my board.
Thats the goal ;-)
Quoted 1 line
I have one question, please see below:
[...]
Quoted 3 lines
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +3
-0+void am1808_lpc_transition (unsigned char pscnum,unsigned char module, +unsigned char domain,unsigned char state) +{
[...]
Quoted 4 lines
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +4
-0+/* Wait for transition to complete */ +while (readl (®->ptstat) & (0x00000001 << domain)) + ; +
Quoted 8 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c line 191
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +4
-0+/* Wait and verify the state */ +while ((readl (mdstat) &0x1F ) != state) + ; +}There is some similar code in
arch/arm/cpu/arm926ejs/davinci/psc.c. Is there any reason why you don't use this code or adapt it for your needs?
No, there is no reason, just missed it! I try the functions in arch/arm/cpu/arm926ejs/davinci/psc.c and if they work, I remove the am1808_lpc_transition function.
Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Hello Heiko,
Thank you for your reply. I have just noticed that the patches have already been pulled into arm/next so I guess I am quite late with my comments. I'd like to apologize for this; apparently I need another email filter that also filters for messages containing "am1808" and not only "da850" ;-)
Which brings me to my next point: AFAIK Texas Instruments's AM18xx SoCs, their OMAP-L138, and their DA850 based devices basically differ only in the DSP/PRU part of the device. If you are (like in u-boot) only interested in the ARM part of chip, they are basically the same device. For some reason the Linux kernel and u-boot support for all these devices is labelled da850... Although I have no hardware to test it, I guess that your DDR memory controller initialization code could be used for the OMAP-L138 and the corresponding Davinci device as well. So since all code in u-boot for the entire device family is labelled da850... I guess your DDR initialization functions should get this prefix as well for consistency. Any comments from the maintainers/TI employees who know these devices better than I do?
Quoted 29 lines · Heiko Schocher
Hello Christian,
Quoted 4 lines · Christian Riesch
Heiko,
I am looking forward to see these patches in mainline u-boot. My custom board also directly boots from NOR, so I think there is a lot I can re-use for my board.Thats the goal ;-)
Quoted 1 line
I have one question, please see below:
[...]
Quoted 3 lines
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c new file +3
-0+void am1808_lpc_transition (unsigned char pscnum,unsigned char module, + ? ? ? ? ? ? ? unsigned char domain, unsigned char state) +{[...]
Quoted 4 lines
Quoted 4 lines
+ ? ? ? /* Wait for transition to complete */
+ ? ? ? while (readl(®->ptstat)& (0x00000001<< domain))
+ ? ? ? ? ? ? ? ;
+Quoted 8 lines
Quoted 4 lines
+ ? ? ? /* Wait and verify the state */
+ ? ? ? while ((readl(mdstat) &0x1F) != state)
+ ? ? ? ? ? ? ? ;
+}There is some similar code in
arch/arm/cpu/arm926ejs/davinci/psc.c. Is there any reason why you don't use this code or adapt it for your needs?
Quoted 3 lines
No, there is no reason, just missed it! I try the functions in
arch/arm/cpu/arm926ejs/davinci/psc.cand if they work, I remove theam1808_lpc_transitionfunction.
Ok. Actually you do LPSC transitions twice in your board configuration, first in the low level initialization in arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c (using your own function) and then again in your board initialization in board/enbw/enbw_cmc/enbw_cmc.c (using the code in arch/arm/cpu/arm926ejs/davinci/psc.c). I assume you ran into the same problem as I did with the da850evm board. The UART is used before it is turned on in the board_init() function. A few weeks ago I submitted a patch [1][2] for this issue but did not get any comments on it. Would you mind having a look at it so we could find a common solution for both your configuration and the da850evm?
Regards, Christian
[1] http://lists.denx.de/pipermail/u-boot/2011-September/100352.html
[2] http://patchwork.ozlabs.org/patch/113335/
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Hello Christian,
Quoted 4 lines · Christian Riesch
Hello Heiko,
Thank you for your reply. I have just noticed that the patches have already been pulled into arm/next so I guess I am quite late with my comments. I'd like to apologize for this; apparently I need another
No problem. Thanks for your reply!
Quoted 2 lines
email filter that also filters for messages containing "am1808" and not only "da850" ;-)
;-)
Quoted 4 lines
Which brings me to my next point: AFAIK Texas Instruments's AM18xx SoCs, their OMAP-L138, and their DA850 based devices basically differ only in the DSP/PRU part of the device. If you are (like in u-boot) only interested in the ARM part of chip, they are basically the same
Quoted 8 lines
device. For some reason the Linux kernel and u-boot support for all these devices is labelled da850... Although I have no hardware to test it, I guess that your DDR memory controller initialization code could be used for the OMAP-L138 and the corresponding Davinci device as well. So since all code in u-boot for the entire device family is labelled da850... I guess your DDR initialization functions should get this prefix as well for consistency. Any comments from the maintainers/TI employees who know these devices better than I do?
Yes of course, such a rename should be done, if somebody has tested it!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Hello Heiko,
Quoted 13 lines
Quoted 4 lines
Which brings me to my next point: AFAIK Texas Instruments's AM18xx SoCs, their OMAP-L138, and their DA850 based devices basically differ only in the DSP/PRU part of the device. If you are (like in u-boot) only interested in the ARM part of chip, they are basically the same
Quoted 8 lines
device. For some reason the Linux kernel and u-boot support for all these devices is labelled da850... Although I have no hardware to test it, I guess that your DDR memory controller initialization code could be used for the OMAP-L138 and the corresponding Davinci device as well. So since all code in u-boot for the entire device family is labelled da850... I guess your DDR initialization functions should get this prefix as well for consistency. Any comments from the maintainers/TI employees who know these devices better than I do?
Quoted 1 line
Yes of course, such a rename should be done, if somebody has tested it!
I just wonder what is worse, having code in there that is labelled da850 but not tested on all devices of the family, or having it renamed every time someone finds out that it also runs on other devices. TI uses a common PLL initialization code in its User Boot Loader (UBL) for OMAP-L138, DA850, AM180x, so it should be pretty save to rename it right now.
Did you also read the rest of my last email, the PSC part?
Regards, Christian
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Hello Christian,
Quoted 14 lines · Christian Riesch
Hello Heiko,
Quoted 12 lines
Quoted 12 lines
Which brings me to my next point: AFAIK Texas Instruments's AM18xx SoCs, their OMAP-L138, and their DA850 based devices basically differ only in the DSP/PRU part of the device. If you are (like in u-boot) only interested in the ARM part of chip, they are basically the same device. For some reason the Linux kernel and u-boot support for all these devices is labelled da850... Although I have no hardware to test it, I guess that your DDR memory controller initialization code could be used for the OMAP-L138 and the corresponding Davinci device as well. So since all code in u-boot for the entire device family is labelled da850... I guess your DDR initialization functions should get this prefix as well for consistency. Any comments from the maintainers/TI employees who know these devices better than I do?
Quoted 8 lines
Quoted 1 line
Yes of course, such a rename should be done, if somebody has tested it!
I just wonder what is worse, having code in there that is labelled da850 but not tested on all devices of the family, or having it renamed every time someone finds out that it also runs on other devices. TI uses a common PLL initialization code in its User Boot Loader (UBL) for OMAP-L138, DA850, AM180x, so it should be pretty save to rename it right now.
Feel free to sent a patch ;-)
Quoted 1 line
Did you also read the rest of my last email, the PSC part?
Yep, and I sent a response here:
http://lists.denx.de/pipermail/u-boot/2011-September/102340.html
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Heiko,
Quoted 5 lines · Heiko Schocher
Quoted 1 line
Did you also read the rest of my last email, the PSC part?
Yep, and I sent a response here:
http://lists.denx.de/pipermail/u-boot/2011-September/102340.html
No, I meant the last part of the email I sent this morning,
http://lists.denx.de/pipermail/u-boot/2011-September/102481.html
Regards, Christian
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
In reply to Christian RieschHello Christian,
Sorry didn't realized that there was more at the end of your EMail!
Quoted 6 lines · Christian Riesch
Hello Heiko,
Thank you for your reply. I have just noticed that the patches have already been pulled into arm/next so I guess I am quite late with my comments. I'd like to apologize for this; apparently I need another email filter that also filters for messages containing "am1808" and not only "da850" ;-)
[...]
Quoted 8 lines
Ok. Actually you do LPSC transitions twice in your board configuration, first in the low level initialization in
arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c(using your own function) and then again in your board initialization inboard/enbw/enbw_cmc/enbw_cmc.c(using the code inarch/arm/cpu/arm926ejs/davinci/psc.c). I assume you ran into the same problem as I did with the da850evm board. The UART is used before it is turned on in theboard_init()function. A few weeks ago I submitted
a) you are right, I enable the PSC for the UART twice, what is not optimal! I remove this in my board code. Thanks for detecting this!
b) I enable the PSC for the UART in arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c arch_cpu_init(), so the UART is enabled on my board before calling board_early_init_f() as in your patch [1]. So I am save on this site.
c) If using the "Legacy NOR Boot" Method with u-boot spl Framework, (not tested this with the new Framework, only with the old), we are also on the save side here, as the SPL code enables the PSC for the UART in arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c board_init_f(), same as for the "direct NOR boot" method I used on the enbw_cmc board.
Quoted 6 lines
a patch [1][2] for this issue but did not get any comments on it. Would you mind having a look at it so we could find a common solution for both your configuration and the da850evm?
[1] http://lists.denx.de/pipermail/u-boot/2011-September/100352.html
[2] http://patchwork.ozlabs.org/patch/113335/
I think there are two points:
a) move this init to board_early_init_f() as you did it
b) remove the UART enable, as it is done in UBL or U-Boot code (SPL or in arch_cpu_init())
But this should be decided from the board maintainer added Sudhakar Rajashekhara to CC, as it affects the da850 board ...
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
In reply to Heiko SchocherHeiko,
Quoted 18 lines · Heiko Schocher
Signed-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>---
?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 100644arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c?create mode 100644arch/arm/include/asm/arch-davinci/am1808_lowlevel.harch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -28,6 +28,7 @@ include $(TOPDIR)/config.mk?LIB ? ?= $(obj)lib$(SOC).o
Quoted 2 lines
?COBJS-y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+= cpu.o timer.o psc.o +COBJS-$(CONFIG_AM18018_LOWLEVEL) ? ? ? += am1808_lowlevel.o
AM18018 - is this intended or just a typo?
Thanks, Christian
PATCH 6/8 arm, davinci, am1808: add lowlevel functions for booting from NOR
Hello Christian,
Quoted 21 lines · Christian Riesch
Heiko,
Quoted 18 lines · Heiko Schocher
Signed-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>--- 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.harch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -28,6 +28,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/Makefile include $(TOPDIR)/config.mk · line 31
Quoted 2 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +1
-0COBJS-y += cpu.o timer.o psc.o +COBJS-$(CONFIG_AM18018_LOWLEVEL) += am1808_lowlevel.oAM18018 - is this intended or just a typo?
Just a typo, thanks for detecting!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 7/8 arm, davinci, da8xx: add cpuinfo
In reply to Heiko Schocher--- arch/arm/cpu/arm926ejs/davinci/cpu.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
arch/arm/cpu/arm926ejs/davinci/cpu.c +14 -2
@@ -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 ) /1000000 ); +printf ("\nDDR: %d MHz\n" , +/* DDR PHY uses an x2 input clock */ +clk_get (0x10001 ) /1000000 ); +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 ) *1000000 ; }#endif -#endif +#endif /* CONFIG_DISPLAY_CPUINFO */ +#endif /* !CONFIG_SOC_DA8XX */ /* * Initializes on-chip ethernet controllers.
Signature · 1 line
1.7.6
PATCH 8/8 arm, davinci: add support for am1808 based enbw_cmc board
In reply to Heiko Schocher- booting from NOR Flash with direct boot method
- POST support
- LOGBUF support
--- 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
board/enbw/enbw_cmc/Makefile new file +51 -0
@@ -0,0 +1,51 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn <[email protected]> +# +# 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 + +#########################################################################
board/enbw/enbw_cmc/enbw_cmc.c new file +574 -0
574 lines not on this page · raw message
boards.cfg +1 -0
@@ -128,6 +128,7 @@ davinci_dvevm arm arm926ejs dvevm davinci davinci_schmoogie arm arm926ejs schmoogie davinci davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci +enbw_cmc arm arm926ejs enbw_cmc enbw davinci km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood mgcoge3un arm arm926ejs km_arm keymile kirkwood
include/configs/enbw_cmc.h new file +440 -0
440 lines not on this page · raw message
Signature · 1 line
1.7.6
PATCH 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hi Heiko,
Quoted 8 lines · Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>---
[...]
Quoted 5 lines
board/enbw/enbw_cmc/enbw_cmc.c new file +0
-0
[...]
board/enbw/enbw_cmc/enbw_cmc.c line 141
Quoted 9 lines
board/enbw/enbw_cmc/enbw_cmc.c new file +9
-0+ +int board_init (void ) +{ +#ifndef CONFIG_USE_IRQ +irq_init (); +#endif + +/* arch number of the board */ + gd->bd->bi_arch_number =3585 ;
There is a new standard option for assigning the machid.
Now, this should be done in the board config file and the above two lines removed. Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file).
[...]
Quoted 5 lines
include/configs/enbw_cmc.h new file +0
-0
[...]
include/configs/enbw_cmc.h line 34
Quoted 5 lines
include/configs/enbw_cmc.h new file +5
-0+/* +* Board +*/ +#define CONFIG_DRIVER_TI_EMAC +#define CONFIG_USE_NAND
Consider adding here:
#define MACH_TYPE_ENBW_CMC 3585
#define CONFIG_MACH_TYPE MACH_TYPE_ENBW_CMC
[...]
Signature · 2 lines
Regards, Igor.
PATCH 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hello Igor,
Quoted 22 lines · Igor Grinberg
Hi Heiko,
Quoted 8 lines · Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>---
[...]
Quoted 5 lines
board/enbw/enbw_cmc/enbw_cmc.c new file +0
-0[...]
Quoted 13 lines
board/enbw/enbw_cmc/enbw_cmc.c line 141
Quoted 9 lines
board/enbw/enbw_cmc/enbw_cmc.c new file +9
-0+ +int board_init (void ) +{ +#ifndef CONFIG_USE_IRQ +irq_init (); +#endif + +/* arch number of the board */ + gd->bd->bi_arch_number =3585 ;There is a new standard option for assigning the machid.
Now, this should be done in the board config file and the above two lines removed. Please, see theCONFIG_MACH_TYPEin the U-Boot documentation (README file).
Ah, thanks!
Quoted 10 lines
[...]
Quoted 5 lines
include/configs/enbw_cmc.h new file +0
-0[...]
Quoted 9 lines
include/configs/enbw_cmc.h line 34
Quoted 5 lines
include/configs/enbw_cmc.h new file +5
-0+/* +* Board +*/ +#define CONFIG_DRIVER_TI_EMAC +#define CONFIG_USE_NAND Consider adding here:
#defineMACH_TYPE_ENBW_CMC3585
#defineCONFIG_MACH_TYPEMACH_TYPE_ENBW_CMC
Yep! Change this for v2, thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
In reply to Heiko Schocher- booting from NOR Flash with direct boot method
- POST support
- LOGBUF support
---
- changes for v2
- use CONFIG_MACH_TYPE instead setting the MACH_TYPE in board specific code, as Igor Grinberg suggested.
- add logversion=2 to default Environment
board/enbw/enbw_cmc/Makefile | 51 ++++ board/enbw/enbw_cmc/enbw_cmc.c | 570 ++++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/enbw_cmc.h | 443 +++++++++++++++++++++++++++++++ 4 files changed, 1065 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
board/enbw/enbw_cmc/Makefile new file +51 -0
@@ -0,0 +1,51 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn <[email protected]> +# +# 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 + +#########################################################################
board/enbw/enbw_cmc/enbw_cmc.c new file +570 -0
570 lines not on this page · raw message
boards.cfg +1 -0
@@ -128,6 +128,7 @@ davinci_dvevm arm arm926ejs dvevm davinci davinci_schmoogie arm arm926ejs schmoogie davinci davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci +enbw_cmc arm arm926ejs enbw_cmc enbw davinci km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood mgcoge3un arm arm926ejs km_arm keymile kirkwood
include/configs/enbw_cmc.h new file +443 -0
443 lines not on this page · raw message
Signature · 1 line
1.7.6
Paulraj
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Quoted 17 lines
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>Cc Igor Grinberg <[email protected]>---
- changes for v2
- useCONFIG_MACH_TYPEinstead setting theMACH_TYPEin board specific code, as Igor Grinberg suggested.
- add logversion=2 to default Environment
Quoted 10 lines
board/enbw/enbw_cmc/Makefile | 51 ++++ board/enbw/enbw_cmc/enbw_cmc.c | 570 ++++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/enbw_cmc.h | 443 +++++++++++++++++++++++++++++++ 4 files changed, 1065 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
Heiko,
I applied all your patches and MAKEALL returned a failure for only the enbw_cmc board.
Can you please take a look?
Because of this I have not applied this to u-boot-ti.
Regards,
Sandeep
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hello Paulraj,
Quoted 26 lines · Sandeep
Quoted 15 lines
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>Cc Igor Grinberg <[email protected]>---
- changes for v2
- useCONFIG_MACH_TYPEinstead setting theMACH_TYPEin board specific code, as Igor Grinberg suggested.
- add logversion=2 to default EnvironmentQuoted 10 lines
board/enbw/enbw_cmc/Makefile | 51 ++++ board/enbw/enbw_cmc/enbw_cmc.c | 570 ++++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/enbw_cmc.h | 443 +++++++++++++++++++++++++++++++ 4 files changed, 1065 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
Quoted 7 lines
Heiko,
I applied all your patches and MAKEALL returned a failure for only the
enbw_cmcboard.Can you please take a look?
Because of this I have not applied this to u-boot-ti.
Hmm.. just did a rebase to TOT and I see with all my patches:
[hs at pollux u-boot]$ ./MAKEALL enbw_cmc
Configuring for enbw_cmc board...
text data bss dec hex filename
407034 8576 257656 673266 a45f2 ./u-boot
--------------------- SUMMARY ---------------------------- Boards compiled: 1
----------------------------------------------------------
[hs at pollux u-boot]$
Did you apllied all patches, as stated here?:
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/108514
How looks your compile error?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Paulraj
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Quoted 9 lines
Did you apllied all patches, as stated here?:
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/108514
How looks your compile error?
ah, i did not see the entire list of dependencies.
I did not apply all the patches as some of them should not be applied by me.
i have sent Albert a pull request without this patch for the time being.
Hope by the next pull request, all the dependencies would have made it to mainline.
Regards,
Sandeep
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hello Paulraj,
Quoted 8 lines · Sandeep
Quoted 5 lines
Did you apllied all patches, as stated here?:
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/108514
How looks your compile error?
ah, i did not see the entire list of dependencies.
I did not apply all the patches as some of them should not be applied by me.
Ok!
Quoted 3 lines
i have sent Albert a pull request without this patch for the time being.
Hope by the next pull request, all the dependencies would have made it to mainline.
Hmm.. maybe you can post your compileerror, so I can see which patch is missing?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
In reply to PaulrajHi all,
Quoted 8 lines · Sandeep
Quoted 8 lines
Did you apllied all patches, as stated here?:
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/108514
Quoted 8 lines
Quoted 1 line
How looks your compile error?
ah, i did not see the entire list of dependencies.
I did not apply all the patches as some of them should not be applied by me.i have sent Albert a pull request without this patch for the time being.
Hope by the next pull request, all the dependencies would have made it to mainline.
Note that at least some of the dependencies are in /next branches, so they won't appear in u-boot[-arm]/master until the upcoming merge window opens.
Quoted 2 lines
Regards,
Sandeep
Amicalement,
Signature · 1 line
Albert.
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
In reply to Heiko SchocherHello Heiko,
Quoted 22 lines · Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>Cc Igor Grinberg <[email protected]>---
- changes for v2
?- useCONFIG_MACH_TYPEinstead setting theMACH_TYPEin ? ?board specific code, as Igor Grinberg suggested. ?- add logversion=2 to default Environment?board/enbw/enbw_cmc/Makefile ? | ? 51 ++++ ?board/enbw/enbw_cmc/enbw_cmc.c | ?570 ++++++++++++++++++++++++++++++++++++++++ ?boards.cfg ? ? ? ? ? ? ? ? ? ? | ? ?1 + ?include/configs/enbw_cmc.h ? ? | ?443 +++++++++++++++++++++++++++++++?4 files changed, 1065 insertions(+), 0 deletions(-) ?create mode 100644 board/enbw/enbw_cmc/Makefile ?create mode 100644
board/enbw/enbw_cmc/enbw_cmc.c?create mode 100644include/configs/enbw_cmc.h
[...]
Quoted 5 lines
include/configs/enbw_cmc.h new file +0
-0
[...]
Quoted 1 line
+#define
CONFIG_SYS_AM1808_PLL0_PLLM? ?37 ? ? ?/* PLL0 -> 456 MHz */
With a 24 MHz input frequency this would result in a PLL0 frequency of 24MHz / PREDIV * (CONFIG_SYS_AM1808_PLL0_PLLM + 1), so I guess you assume a PREDIV of 2 here (PREDIV register value 0x00008001). However, the AM1808 datasheet and the reference guide (section 7.3.10) state that the default PREDIV is 1 (register value 0x00008000) and I don't see how you set the PREDIV to 2. Am I missing something here?
Regards, Christian
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hello Christian,
Quoted 36 lines · Christian Riesch
Hello Heiko,
Quoted 22 lines · Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>Cc Igor Grinberg <[email protected]>---
- changes for v2
- useCONFIG_MACH_TYPEinstead setting theMACH_TYPEin board specific code, as Igor Grinberg suggested.
- add logversion=2 to default Environmentboard/enbw/enbw_cmc/Makefile | 51 ++++ board/enbw/enbw_cmc/enbw_cmc.c | 570 ++++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/enbw_cmc.h | 443 +++++++++++++++++++++++++++++++ 4 files changed, 1065 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[...]
Quoted 5 lines
include/configs/enbw_cmc.h new file +0
-0[...]
Quoted 5 lines
Quoted 1 line
+#define
CONFIG_SYS_AM1808_PLL0_PLLM37 /* PLL0 -> 456 MHz */With a 24 MHz input frequency this would result in a PLL0 frequency of 24MHz / PREDIV * (
CONFIG_SYS_AM1808_PLL0_PLLM+ 1), so I guess you assume a PREDIV of 2 here (PREDIV register value0x00008001). However,
No. The comment is wrong! I fix the comment from PLL0 to PLLC0 in the next patch version, thanks!
Quoted 3 lines
the AM1808 datasheet and the reference guide (section 7.3.10) state that the default PREDIV is 1 (register value
0x00008000) and I don't see how you set the PREDIV to 2. Am I missing something here?
For calculating the resulting frequencies for the used Sysclocks don;t forget the POSTDIV value
#define CONFIG_SYS_AM1808_PLL0_POSTDIV 1
So the correct calculation is:
(24MHz / PREDIV * (CONFIG_SYS_AM1808_PLL0_PLLM + 1)) / POSTDIV
(And with that, I get 456 MHz ;-)
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hello Heiko,
thanks for your reply.
Quoted 35 lines · Heiko Schocher
Quoted 34 lines · Christian Riesch
Quoted 22 lines · Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>Cc Igor Grinberg <[email protected]>---
- changes for v2
?- useCONFIG_MACH_TYPEinstead setting theMACH_TYPEin ? ?board specific code, as Igor Grinberg suggested. ?- add logversion=2 to default Environment?board/enbw/enbw_cmc/Makefile ? | ? 51 ++++ ?board/enbw/enbw_cmc/enbw_cmc.c | ?570 ++++++++++++++++++++++++++++++++++++++++ ?boards.cfg ? ? ? ? ? ? ? ? ? ? | ? ?1 + ?include/configs/enbw_cmc.h ? ? | ?443 +++++++++++++++++++++++++++++++?4 files changed, 1065 insertions(+), 0 deletions(-) ?create mode 100644 board/enbw/enbw_cmc/Makefile ?create mode 100644
board/enbw/enbw_cmc/enbw_cmc.c?create mode 100644include/configs/enbw_cmc.h[...]
Quoted 5 lines
include/configs/enbw_cmc.h new file +0
-0[...]
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
+#define
CONFIG_SYS_AM1808_PLL0_PLLM? ?37 ? ? ?/* PLL0 -> 456 MHz */With a 24 MHz input frequency this would result in a PLL0 frequency of 24MHz / PREDIV * (
CONFIG_SYS_AM1808_PLL0_PLLM+ 1), so I guess you assume a PREDIV of 2 here (PREDIV register value0x00008001). However,No. The comment is wrong! I fix the comment from PLL0 to PLLC0 in the next patch version, thanks!
Ok.
Quoted 7 lines
Quoted 3 lines
the AM1808 datasheet and the reference guide (section 7.3.10) state that the default PREDIV is 1 (register value
0x00008000) and I don't see how you set the PREDIV to 2. Am I missing something here?For calculating the resulting frequencies for the used Sysclocks don;t forget the POSTDIV value
Quoted 7 lines
#define
CONFIG_SYS_AM1808_PLL0_POSTDIV?1So the correct calculation is:
(24MHz / PREDIV * (
CONFIG_SYS_AM1808_PLL0_PLLM+ 1)) / POSTDIV(And with that, I get 456 MHz ;-)
But then you would be running PLL0 with 24MHz * (CONFIG_SYS_AM1808_PLL0_PLLM + 1) = 912 MHz !? That would be out of specs since the PLL output frequency must be between 300 and 600 MHz according to the datasheet.
However, you can't set the PLLM to 37 anyway, since it's only a 5 bit field, (37 & 0x1f) results in 5, so you only multiply the frequency by 6 in the PLL, resulting in 144MHz PLL frequency.
Regards, Christian
PATCH v2 8/8 arm, davinci: add support for am1808 based enbw_cmc board
Hello Christian,
Quoted 19 lines · Christian Riesch
Hello Heiko,
thanks for your reply.Quoted 15 lines · Heiko Schocher
Quoted 14 lines · Christian Riesch
Quoted 13 lines · Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF supportSigned-off-by Heiko Schocher <[email protected]>Cc Paulraj Sandeep <[email protected]>Cc Albert ARIBAUD <[email protected]>Cc Igor Grinberg <[email protected]>---
- changes for v2
- useCONFIG_MACH_TYPEinstead setting theMACH_TYPEin board specific code, as Igor Grinberg suggested.
- add logversion=2 to default Environment
[...]
Quoted 4 lines
Quoted 4 lines
#define
CONFIG_SYS_AM1808_PLL0_POSTDIV1So the correct calculation is:
Quoted 8 lines
Quoted 3 lines
(24MHz / PREDIV * (
CONFIG_SYS_AM1808_PLL0_PLLM+ 1)) / POSTDIV(And with that, I get 456 MHz ;-)
But then you would be running PLL0 with 24MHz * (
CONFIG_SYS_AM1808_PLL0_PLLM+ 1) = 912 MHz !? That would be out of specs since the PLL output frequency must be between 300 and 600 MHz according to the datasheet.
Yep, you are right! Fixed
CONFIG_SYS_AM1808_PLL0_PLLM to 18CONFIG_SYS_AM1808_PLL0_POSTDIV to 0
Thanks!
Quoted 3 lines
However, you can't set the PLLM to 37 anyway, since it's only a 5 bit field, (37 &
0x1f) results in 5, so you only multiply the frequency by 6 in the PLL, resulting in 144MHz PLL frequency.
Hmm... you are right here also, but I see:
=> md 1c1110001c11100: 00000049 00000014 00020000 00000000 I...............01c11110: 00000025 00008000 00008000 00008001 %...............
^
Pllmstrange ...
Thanks for this review!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany