[U-Boot] Need Your Help
Marek Vasut
marek.vasut at gmail.com
Fri Jul 9 15:29:03 CEST 2010
Dne Pá 9. července 2010 13:54:28 StephenPaulraj Chinnadurai-ERS,HCLTech
napsal(a):
> Hello Marek,
>
> I am using a hardware which has PXA270 controller, I named it as
> hcl_pxa270. This board (hcl_pxa270) is very much similar to mainstone-II
> board which has PXA270 controller.
>
> I am porting the u-boot for the hcl_pxa270 board.
>
> I have take open-pxa from the following git
> (http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-pxa.git;a=shortlog;
> h=refs/heads/devel): u-boot-pxa.git -> heads -> devel
>
> I have modified the following files:
>
> File Name
>
> Directory \u-boot-pxa\
>
> Changes in the file
>
> See Line Numbers
>
> hcl_pxa270.h
>
> include\configs
>
> Change gpio & memory related configuration values:
>
> /*
> * GPIO settings
> */
> #define CONFIG_SYS_GPSR0_VAL 0x00001000
> #define CONFIG_SYS_GPSR1_VAL 0x000F0200
> #define CONFIG_SYS_GPSR2_VAL 0x10010000
> #define CONFIG_SYS_GPSR3_VAL 0x0003E000
>
> #define CONFIG_SYS_GPCR0_VAL 0x0BC12008
> #define CONFIG_SYS_GPCR1_VAL 0xFCC0ADB5
> #define CONFIG_SYS_GPCR2_VAL 0x60DE3FFF
> #define CONFIG_SYS_GPCR3_VAL 0x00600144
>
> #define CONFIG_SYS_GPDR0_VAL 0x0BC13008
> #define CONFIG_SYS_GPDR1_VAL 0xFCCFAAB5
> #define CONFIG_SYS_GPDR2_VAL 0x70DF3FFF
> #define CONFIG_SYS_GPDR3_VAL 0x006BF144
>
> #define CONFIG_SYS_GAFR0_L_VAL 0x04900000
> #define CONFIG_SYS_GAFR0_U_VAL 0x051AB013
> #define CONFIG_SYS_GAFR1_L_VAL 0x6913599A
> #define CONFIG_SYS_GAFR1_U_VAL 0xAAA5A8AA
> #define CONFIG_SYS_GAFR2_L_VAL 0x0AAAAAAA
> #define CONFIG_SYS_GAFR2_U_VAL 0x1504A176
> #define CONFIG_SYS_GAFR3_L_VAL 0x54001313
> #define CONFIG_SYS_GAFR3_U_VAL 0x00001409
>
> #define CONFIG_SYS_PSSR_VAL 0x30
>
> /*
> * Clock settings
> */
> #define CONFIG_SYS_CKEN 0x00400200
> #define CONFIG_SYS_CCCR 0x02000290
>
> /*
> * Memory settings
> */
> #define CONFIG_SYS_MSC0_VAL 0x23F2B8F2
> #define CONFIG_SYS_MSC1_VAL 0x0000CCD1
> #define CONFIG_SYS_MSC2_VAL 0x0000B884
> #define CONFIG_SYS_MDCNFG_VAL 0x81000AD1
> #define CONFIG_SYS_MDREFR_VAL 0x2093A01E
> #define CONFIG_SYS_MDMRS_VAL 0x00000000
> #define CONFIG_SYS_FLYCNFG_VAL 0x00010001
> #define CONFIG_SYS_SXCNFG_VAL 0x40044004
>
> /*
> * PCMCIA and CF Interfaces
> */
> #define CONFIG_SYS_MECR_VAL 0x00000001
> #define CONFIG_SYS_MCMEM0_VAL 0x00014307
> #define CONFIG_SYS_MCMEM1_VAL 0x00014307
> #define CONFIG_SYS_MCATT0_VAL 0x0001c787
> #define CONFIG_SYS_MCATT1_VAL 0x0001c787
> #define CONFIG_SYS_MCIO0_VAL 0x0001430f
> #define CONFIG_SYS_MCIO1_VAL 0x0001430f
>
> 288 to 341
>
> macro.h
>
> arch/arm/include/asm/arch-pxa/macro.h
>
> Added few macros to send the register values through FFUART):
>
> .macro istbe
> 990:
> ldr r2, =FFLSR
> and r2, r2, #0x40
> beq 990b
> .endm
>
> .macro initFFUART
> ldr r2, =FFUART
> mov r3, #0x0
> str r3, [r2, #0x0c]
> str r3, [r2, #0x04]
>
> mov r3, #0x80
> str r3, [r2, #0x0c]
> mov r3, #0x18
> str r3, [r2]
> mov r3, #0x0
> str r3, [r2, #0x04]
>
> mov r3, #0x0
> str r3, [r2, #0x0c]
> mov r3, #0x03
> str r3, [r2, #0x0c]
>
> mov r3, #0x7
> str r3, [r2, #0x08]
> mov r3, #0x0
> str r3, [r2, #0x04]
>
> mov r3, #0x3
> str r3, [r2, #0x10]
>
> ldr r3, [r2, #0x04]
> orr r3, r3, #0x40
> str r3, [r3, #0x04]
> .endm
>
> .macro printreg
> ldr r8, =FFUART
> and r2, #28
> 991:
> mov r3, r1, lsr r2
> and r3,r3, #ox0f
> cmp r3, #0x0000000a
> addlt r4, r3, #0x30
> addge r4, r3, #0x37
> istbe
> strb r4, [r8]
>
> subs r2, r2, #4
> bne 991b
>
> mov r3, r1
> and r3, r3, #0x0f
> cmp r3, #0x0000000a
> addlt r4, r3, #0x30
> addge r4, r3, #0x37
> istbe
> strb r4, [r8]
>
> mov r4, #0x0a
> istbe
> strb r4, [r8]
> .endm
>
>
> 324 to 388
>
> start.S
>
> arch\arm\cpu\pxa
>
You don't need this crap, at all. U-Boot already contains UART init functions,
take zipit2 board as a reference.
You need to check:
1) Are clock enabled to FFUART (in CKEN, in include/configs/yourboard.h)
2) Is your MFP config correct for FFUART (in GAFR_*, in
include/configs/yourboard.h)
3) In include/configs/yourboard.h you need this:
/*
* Serial Console Configuration -- FFUART
*/
#define CONFIG_PXA_SERIAL
#define CONFIG_FFUART 1
#define CONFIG_BAUDRATE 115200
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
4) In boards/yourboard/yourboard.c, you need:
int board_late_init(void)
{
setenv("stdout", "serial");
setenv("stderr", "serial");
return 0;
}
struct serial_device *default_serial_console (void)
{
return &serial_ffuart_device;
}
5) Check if you DO NOT have this line in include/configs/yourboard.h:
#CONFIG_LCD
That'd reroute the console output to LCD which you likely don't have or have it
misconfigured, though even then you'd get some output on the serial.
Anyway, do it as outlined in 1)-4).
Also please keep u-boot mainline list CCed.
Cheers!
>
> Called the initFFUART & printreg macros after the cpu_init_crit function
> call.
>
> initFFUART macro will initialize the FFUART.
>
> printreg macro will send the value stored in the r1 register through
> FFUART.
>
> 139-140
>
>
> I compiled the u-boot using the arm-marvell-linux-gnueabi tool chain.
>
> I download the u-boot.bin into the NOR flash using JFlashMM.
>
> After downloading the u-boot.bin into the NOR flash I reset the hardware,
> but I am not getting any output through FFUART.
>
> I don't know the mistake that I committed in the source.
>
> I have attached the modified code for your reference.
>
> I need your help to make the FFUART to work in the hcl_pxa270 board.
>
> Thanks and Regards
> Stephen Paulraj C
>
> HCL Technologies Ltd.
> D-12, Sidco Industrial Estate,
> Ambattur, Chennai -58
> Tel: +91 44 42004800 Extn: 2319
> Mob:+91 9962583934
> www.hcl.in<file:///C:\Documents%20and%20Settings\stephenpaulrajc\Applicatio
> n%20Data\Microsoft\Signatures\www.hcl.in>
> [cid:image001.jpg at 01CB1F8B.95654BB0]
>
>
> DISCLAIMER:
> ---------------------------------------------------------------------------
> --------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. It shall not attach any
> liability on the originator or HCL or its affiliates. Any views or
> opinions presented in this email are solely those of the author and may
> not necessarily reflect the opinions of HCL or its affiliates. Any form of
> reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior
> written consent of the author of this e-mail is strictly prohibited. If
> you have received this email in error please delete it and notify the
> sender immediately. Before opening any mail and attachments please check
> them for viruses and defect.
>
> ---------------------------------------------------------------------------
> --------------------------------------------
More information about the U-Boot
mailing list