Re: [U-Boot] last reboot information for u-boot
Hi, On Fri, Mar 25, 2011 at 08:21:46, sywang wrote: > > > I have a question about how to save last warm-reboot information. > > > I am trying to find a method to save last warm-reboot reason. If I want to > save the information by DRAM memory, how to do this? > AFAIK, there isn't any direct support to this in u-boot. However, this can be achieved in 2 ways. 1. Many Hardware / SOC / Processor has inbuilt registers to detect reason for last reset (HW, WatchDog, SW, or Cold reset). If your platform has any of these, use them 2. while resetting save required info to flash by custom code and read it back upon reset. Hope this helps. Regards, Gururaja ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Changing USB speed from slow to fast
Hi, I am working on ARM at91sam9g20ek. I am copying my Kernel image and rootfilesystem (jffs2) from USB to nand memory in UBOOT. Currently copying files from USB to RAM takes more time and I figured out from the code that USB Speed is low (1.5Mb/s). How can I change it to Fast speed in Uboot? Thanks for help. Regards, Nikhilesh Dwivedi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] last reboot information for u-boot
I have a question about how to save last warm-reboot information. I am trying to find a method to save last warm-reboot reason. If I want to save the information by DRAM memory, how to do this? Thanks! Shuyou ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] OpenRD-{Client,Ultimate}
What is the status of the OpenRD-Ultimate support discussed last summer? Is there no way to detect the board type and use a single U-Boot image for all three variants? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-samsung/master
Dear Albert ARIBAUD, 2011-03-24 오후 10:57, Albert ARIBAUD 쓴 글: > Le 24/03/2011 07:58, Minkyu Kang a écrit : >> Dear Albert Aribaud, >> >> The following changes since commit 966a35d45b90fdcd694dec89b32e5b67771cfd64: >> >>Merge branch 'master' of git://git.denx.de/u-boot-arm (2011-02-16 >> 08:54:52 +0900) >> >> are available in the git repository at: >> >>git://git.denx.de/u-boot-samsung master > > This does not seem to have been rebased to u-boot or u-boot-arm. Can you > check? > Two files are both modified. board/samsung/smdk6400/u-boot-nand.lds nand_spl/board/samsung/smdk6400/u-boot.lds modified by commit id 79f062e749d9277f89686c3948520dd8d0aab501 on u-boot-arm, commit id 9fc36d1b4492f792617f3947bdf8cea74f236139 and 4b7100ec4c1cedd968d3acab58de5f209b7c8bf7, 9e88e50216279f95d7a974ac0b60907fbee1a2d4 on u-boot-samsung. Hm, how we can solve it? If possible, could you please merge it manually? Thanks Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] Don't grab memory for LCD if FB address is defined
If FB address is defined specific address then don't grab memory for LCD Signed-off-by: Minkyu Kang Cc: Albert Aribaud Cc: Wolfgang Denk Cc: Stefan Roese Cc: Kim Phillips Cc: Andy Fleming Cc: Kumar Gala --- v3 fix whitespace errors v2 add document arch/arm/lib/board.c |4 arch/m68k/lib/board.c|4 arch/powerpc/lib/board.c |4 doc/README.fb_addr | 17 + 4 files changed, 29 insertions(+), 0 deletions(-) create mode 100644 doc/README.fb_addr diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index c620d2c..5a4d2bd 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -356,9 +356,13 @@ void board_init_f (ulong bootflag) #endif /* CONFIG_VFD */ #ifdef CONFIG_LCD +#ifdef CONFIG_FB_ADDR + gd->fb_base = CONFIG_FB_ADDR; +#else /* reserve memory for LCD display (always full pages) */ addr = lcd_setmem (addr); gd->fb_base = addr; +#endif /* CONFIG_FB_ADDR */ #endif /* CONFIG_LCD */ /* diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 7867ba5..a6cd9b8 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -277,9 +277,13 @@ board_init_f (ulong bootflag) debug ("Top of RAM usable for U-Boot at: %08lx\n", addr); #ifdef CONFIG_LCD +#ifdef CONFIG_FB_ADDR + gd->fb_base = CONFIG_FB_ADDR; +#else /* reserve memory for LCD display (always full pages) */ addr = lcd_setmem (addr); gd->fb_base = addr; +#endif /* CONFIG_FB_ADDR */ #endif /* CONFIG_LCD */ /* diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index b88cf6b..09c20e9 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -453,9 +453,13 @@ void board_init_f (ulong bootflag) debug ("Top of RAM usable for U-Boot at: %08lx\n", addr); #ifdef CONFIG_LCD +#ifdef CONFIG_FB_ADDR + gd->fb_base = CONFIG_FB_ADDR; +#else /* reserve memory for LCD display (always full pages) */ addr = lcd_setmem (addr); gd->fb_base = addr; +#endif /* CONFIG_FB_ADDR */ #endif /* CONFIG_LCD */ #if defined(CONFIG_VIDEO) && defined(CONFIG_8xx) diff --git a/doc/README.fb_addr b/doc/README.fb_addr new file mode 100644 index 000..ea8bca6 --- /dev/null +++ b/doc/README.fb_addr @@ -0,0 +1,17 @@ +Define CONFIG_FB_ADDR if you want to use specific address for frame buffer. +Then system will reserve the frame buffer address to defined address instead of +lcd_setmem (this function grab the memory for frame buffer by panel's size). + +Please see below code (in board_init_f function from arch/arm/lib/board.c) + +#ifdef CONFIG_FB_ADDR + gd->fb_base = CONFIG_FB_ADDR; +#else + /* reserve memory for LCD display (always full pages) */ + addr = lcd_setmem (addr); + gd->fb_base = addr; +#endif /* CONFIG_FB_ADDR */ + +If you want this config option then please define it at your board config file + +#define CONFIG_FB_ADDR 0x -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/ppc4xx: add ENTRY() to linker script
dear wolfgang, On Fri, 25 Mar 2011, Wolfgang Denk wrote: > > Add ENTRY() command to the linker script so that entry point is > > correctly marked in the final ELF file. > > Which exact problem are you trying to fix? i'm sorry, i probably should have been more verbose in the changelog. when cross-compiling u-boot for the avnet virtex-4 minimodule (make fx12mm_config; make, with SYS_TEXT_BASE=0x0200) i end up with a u-boot.lds linker script that has no ENTRY() command. this will result in an incorrect ELF file: the entry point in the ELF header points to the first byte of the first loadable segment (which is ~the version string at 0x0204: "U-Boot 2011..") instead of the first instruction to be executed at _start (at 0x02002100 in this case). powerpc-405-linux-gnu-readelf -e u-boot: ELF Header: Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, big endian Version: 1 (current) OS/ABI:UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC Version: 0x1 Entry point address: 0x200 .. powerpc-405-linux-gnu-objdump -d u-boot: Disassembly of section .text: 0200 : 200: 27 05 19 56 dozir24,r5,6486 0204 : 204: 55 2d 42 6f rlwinm. r13,r9,8,9,23 208: 6f 74 20 32 xoris r20,r27,8242 20c: 30 31 31 2e addic r1,r17,12590 210: 30 33 2d 72 addic r1,r19,11634 ... 02002100 <_start>: 2002100: 38 80 00 00 li r4,0 2002104: 7c 99 eb a6 mtpmc1 r4 2002108: 7c 9a eb a6 mtdcwr r4 200210c: 7c 94 f3 a6 mtesr r4 2002110: 7c 9a f3 a6 mttcr r4 ... anything trying to load and run this ELF file (eg xilinx's XMD debugger, or a bootloader stored in the FPGA fabric) will fail to do so because the processor will jump to 0x0200 and try to execute the version string. best regards, -- mazsi strawberry fields forever! ma...@imrek.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Network Code Custodian ?
Dear Gray Remlin, In message <4d8bc6d1.7060...@gmail.com> you wrote: > Who is the custodian for the network code ? We don't have one at the moment, so I try to cover that. Why are you asking - do you want to volunteer? 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 IMPORTANT NOTICE TO PURCHASERS: The Entire Physical Universe, Inclu- ding This Product, May One Day Collapse Back into an Infinitesimally Small Space. Should Another Universe Subsequently Re-emerge, the Existence of This Product in That Universe Cannot Be Guaranteed. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/ppc4xx: add ENTRY() to linker script
Dear jozsef imrek, In message <1301002747-8943-1-git-send-email-ma...@imrek.org> you wrote: > Add ENTRY() command to the linker script so that entry point is > correctly marked in the final ELF file. Which exact problem are you trying to fix? 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 Honest error is to be pitied, not ridiculed. -- Philip Earl of Chesterfield ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Network Code Custodian ?
Who is the custodian for the network code ? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/ppc4xx: add ENTRY() to linker script
Add ENTRY() command to the linker script so that entry point is correctly marked in the final ELF file. Signed-off-by: jozsef imrek --- arch/powerpc/cpu/ppc4xx/u-boot.lds |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/cpu/ppc4xx/u-boot.lds b/arch/powerpc/cpu/ppc4xx/u-boot.lds index 656f59a..b82e1e8 100644 --- a/arch/powerpc/cpu/ppc4xx/u-boot.lds +++ b/arch/powerpc/cpu/ppc4xx/u-boot.lds @@ -38,6 +38,8 @@ PHDRS bss PT_LOAD; } +ENTRY(_start) + SECTIONS { /* Read-only sections, merged into text segment: */ -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-mpc85xx.git
On Mar 24, 2011, at 3:18 PM, Wolfgang Denk wrote: > Dear Kumar Gala, > > In message you > wrote: >> [ a few fixes for v2011.03 related to DDR settings on MPC8572DS ] >> >> The following changes since commit 62043ed02a2acffa801e3574e249de07d30336a2: >> Wolfgang Denk (1): >>Merge branch 'master' of git://git.denx.de/u-boot-ubi >> >> are available in the git repository at: >> >> git://git.denx.de/u-boot-mpc85xx.git master >> >> York Sun (4): >> powerpc/mpc8xxx: fix recognition of DIMMs with ECC and Address Parity >> powerpc/mpc8572ds: revise board specific timing for dual-rank DIMMs >> powerpc/mpc8xxx: disable rcw_en bit for non-DDR3 >> powerpc/mpc8xxx: fix workaround for errata DDR111 and DDR134 >> >> arch/powerpc/cpu/mpc85xx/ddr-gen3.c| 41 +++ >> arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c |2 + >> .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|3 +- >> arch/powerpc/include/asm/fsl_ddr_dimm_params.h |4 + >> board/freescale/mpc8572ds/ddr.c| 110 >> ++-- >> 5 files changed, 127 insertions(+), 33 deletions(-) > > Um... this additionally gets me > > powerpc/85xx: Fix PCI memory map setup on P1_P2_RDB > > but ok... > > Applied, thanks. Thanks, hadn't sent an updated pull w/that. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-mpc85xx.git
Dear Kumar Gala, In message you wrote: > [ a few fixes for v2011.03 related to DDR settings on MPC8572DS ] > > The following changes since commit 62043ed02a2acffa801e3574e249de07d30336a2: > Wolfgang Denk (1): > Merge branch 'master' of git://git.denx.de/u-boot-ubi > > are available in the git repository at: > > git://git.denx.de/u-boot-mpc85xx.git master > > York Sun (4): > powerpc/mpc8xxx: fix recognition of DIMMs with ECC and Address Parity > powerpc/mpc8572ds: revise board specific timing for dual-rank DIMMs > powerpc/mpc8xxx: disable rcw_en bit for non-DDR3 > powerpc/mpc8xxx: fix workaround for errata DDR111 and DDR134 > > arch/powerpc/cpu/mpc85xx/ddr-gen3.c| 41 +++ > arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c |2 + > .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|3 +- > arch/powerpc/include/asm/fsl_ddr_dimm_params.h |4 + > board/freescale/mpc8572ds/ddr.c| 110 > ++-- > 5 files changed, 127 insertions(+), 33 deletions(-) Um... this additionally gets me powerpc/85xx: Fix PCI memory map setup on P1_P2_RDB but ok... Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Our universe is a fragile house of atoms, held together by the mortar of cause-and-effect. One magician would be two too many. - Terry Pratchett, _The Dark Side of the Sun_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Remove unnecessary reset request in usb_stor_get_info
Dear Erik Hansen, In message <1300972692-26627-1-git-send-email-e...@makarta.com> you wrote: ... > Reply-to: qeha@ws038732.localdomain Please make sure to fix your broken mailer setup!!! NEVER add such crap to any messages that leave your systems. 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 Gewöhnlich glaubt der Mensch, wenn er nur Worte hört, es müsse sich dabei doch auch was denken lassen. -- Goethe, Faust I ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Remove unnecessary reset request in usb_stor_get_info
Dear Erik Hansen, In message <1300972692-26627-1-git-send-email-e...@makarta.com> you wrote: > The reset request in usb_stor_get_info is causing issues with some usb > sticks. Some of these sticks vendor_id/product_id have been hardcoded to > not reset but better is to remove the reset altogether. It is not needed. > --- > common/usb_storage.c | 25 - > 1 files changed, 0 insertions(+), 25 deletions(-) Please do NOT post multiple versions of patches without explicitly marking these as new versions and not without adding a list of changes. Make sure to read http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de It is not best to swap horses while crossing the river. - Abraham Lincoln ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] omap3_beagle: Switch default console from ttyS2 to ttyO2
On 02.03.2011 00:13, Jason Kridner wrote: > On Fri, Feb 18, 2011 at 3:37 AM, Alexander Holler > wrote: >> Linux kernels>= 2.6.36 are using ttyOn instead ttySn for the >> serials on OMAPs. >> >> Signed-off-by: Alexander Holler > > Ack. Acked-by: Dirk Behme >> --- >> include/configs/omap3_beagle.h |2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h >> index 5cfa4cb..e442e5b 100644 >> --- a/include/configs/omap3_beagle.h >> +++ b/include/configs/omap3_beagle.h >> @@ -189,7 +189,7 @@ >> #define CONFIG_EXTRA_ENV_SETTINGS \ >> "loadaddr=0x8200\0" \ >> "usbtty=cdc_acm\0" \ >> - "console=ttyS2,115200n8\0" \ >> + "console=ttyO2,115200n8\0" \ >> "mpurate=500\0" \ >> "vram=12M\0" \ >> "dvimode=1024x768MR-16@60\0" \ >> -- >> 1.7.3.4 >> >> ___ >> U-Boot mailing list >> U-Boot@lists.denx.de >> http://lists.denx.de/mailman/listinfo/u-boot >> > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: Tegra2: Change mach-type to MACH_TYPE_SEABOARD due to mach-types.h update
Dear Albert ARIBAUD, In message <4d8b54b8.6020...@free.fr> you wrote: > > > Is the current patch OK as is? It's a simple one-line change. > > I guess so. As soon as I get confirmation from Wolfgang that board > patches can go through any tree, I'll apply it as a bugfix to master. If you consider it OK, then it's fine with me, too. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The optimum committee has no members. - Norman Augustine ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [beagleboard] Re: [PATCH] omap3_beagle: Switch default console from ttyS2 to ttyO2
Dear Albert ARIBAUD, In message <4d8b40be.9070...@free.fr> you wrote: > > Wolfgang, which tree is this patch supposed to go through? Mine because > the board is ARM? yours because it is a board, not arch, patch? Or > whichever? Formally it would need Dirk's ACK and then go though the TI tree and then yours. Alternatively, Sandeep's ACK would be needed, too. 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 Documentation is the castor oil of programming. Managers know it must be good because the programmers hate it so much. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2] ColdFire: Queued SPI driver
This patch adds a driver for Freescale Colfire Queued SPI bus. Coded to work with 8 bits per transfer to use with SPI flash. CPOL, CPHA, and CS_ACTIVE_HIGH can be configured. Tested with MCF5270 which have 4 chip selects. Activate by #define CONFIG_CF_QSPI in board config. Signed-off-by: Richard Retanubun --- V2: Cleaned up based on feedback - Scrubbed using checkpatch, only warnings about volatile remains. - Removed Motorola from file header. - Moved cfspi_cs_activate and cfspi_cs_deactivate into driver. Comments on unification with DSPI: I don't think this is a good idea since the register set is very different, plus the DSPI is using the older u-boot SPI API, with spi_claim_bus() and spi_release_bus(). Even if we do it just for the sake of having one file, it will be a "two-headed" file with an #ifdef splitting it in half and having nothing to do with each other. A separate patch can be submitted to rename cf_spi.c to cf_dspi.c to make it clearer and remove any mention of COLDFIRE_QSPI from inside the file. arch/m68k/cpu/mcf52x2/cpu_init.c | 15 ++- arch/m68k/include/asm/coldfire/qspi.h |2 +- arch/m68k/include/asm/m5271.h | 26 +++ drivers/spi/Makefile |1 + drivers/spi/cf_qspi.c | 373 + 5 files changed, 415 insertions(+), 2 deletions(-) create mode 100644 drivers/spi/cf_qspi.c diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c index 170bbfc..c2a0ffb 100644 --- a/arch/m68k/cpu/mcf52x2/cpu_init.c +++ b/arch/m68k/cpu/mcf52x2/cpu_init.c @@ -332,7 +332,20 @@ int fecpin_setclear(struct eth_device *dev, int setclear) return 0; } #endif /* CONFIG_CMD_NET */ -#endif + +#if defined(CONFIG_CF_QSPI) + +/* Configure PIOs for SIN, SOUT, and SCK */ +void cfspi_port_conf(void) +{ + mbar_writeByte(MCF_GPIO_PAR_QSPI, + MCF_GPIO_PAR_QSPI_SIN_SIN | + MCF_GPIO_PAR_QSPI_SOUT_SOUT | + MCF_GPIO_PAR_QSPI_SCK_SCK); +} +#endif /* CONFIG_CF_QSPI */ + +#endif /* CONFIG_M5271 */ #if defined(CONFIG_M5272) /* diff --git a/arch/m68k/include/asm/coldfire/qspi.h b/arch/m68k/include/asm/coldfire/qspi.h index 8bcd2e4..9fd98f6 100644 --- a/arch/m68k/include/asm/coldfire/qspi.h +++ b/arch/m68k/include/asm/coldfire/qspi.h @@ -98,7 +98,7 @@ typedef struct qspi_ctrl { #define QSPI_QAR_RECV (0x0010) #define QSPI_QAR_CMD (0x0020) -/* DR */ +/* DR with RAM command word definitions */ #define QSPI_QDR_CONT (0x8000) #define QSPI_QDR_BITSE (0x4000) #define QSPI_QDR_DT(0x2000) diff --git a/arch/m68k/include/asm/m5271.h b/arch/m68k/include/asm/m5271.h index d25261b..b2bc051 100644 --- a/arch/m68k/include/asm/m5271.h +++ b/arch/m68k/include/asm/m5271.h @@ -171,6 +171,32 @@ #define MCF_GPIO_PAR_UART_U1RXD_UART1 0x0C00 #define MCF_GPIO_PAR_UART_U1TXD_UART1 0x0300 +/* Bit definitions and macros for PAR_QSPI */ +#define MCF_GPIO_PAR_QSPI_PCS1_UNMASK 0x3F +#define MCF_GPIO_PAR_QSPI_PCS1_PCS10xC0 +#define MCF_GPIO_PAR_QSPI_PCS1_SDRAM_SCKE 0x80 +#define MCF_GPIO_PAR_QSPI_PCS1_GPIO0x00 +#define MCF_GPIO_PAR_QSPI_PCS0_UNMASK 0xDF +#define MCF_GPIO_PAR_QSPI_PCS0_PCS00x20 +#define MCF_GPIO_PAR_QSPI_PCS0_GPIO0x00 +#define MCF_GPIO_PAR_QSPI_SIN_UNMASK 0xE7 +#define MCF_GPIO_PAR_QSPI_SIN_SIN 0x18 +#define MCF_GPIO_PAR_QSPI_SIN_I2C_SDA 0x10 +#define MCF_GPIO_PAR_QSPI_SIN_GPIO 0x00 +#define MCF_GPIO_PAR_QSPI_SOUT_UNMASK 0xFB +#define MCF_GPIO_PAR_QSPI_SOUT_SOUT0x04 +#define MCF_GPIO_PAR_QSPI_SOUT_GPIO0x00 +#define MCF_GPIO_PAR_QSPI_SCK_UNMASK 0xFC +#define MCF_GPIO_PAR_QSPI_SCK_SCK 0x03 +#define MCF_GPIO_PAR_QSPI_SCK_I2C_SCL 0x02 +#define MCF_GPIO_PAR_QSPI_SCK_GPIO 0x00 + +/* Bit definitions and macros for PAR_TIMER for QSPI */ +#define MCF_GPIO_PAR_TIMER_T3IN_UNMASK 0x3FFF +#define MCF_GPIO_PAR_TIMER_T3IN_QSPI_PCS2 0x4000 +#define MCF_GPIO_PAR_TIMER_T3OUT_UNMASK0xFF3F +#define MCF_GPIO_PAR_TIMER_T3OUT_QSPI_PCS3 0x0040 + #define MCF_GPIO_PAR_SDRAM_PAR_CSSDCS(x) (((x)&0x03)<<6) #define MCF_SDRAMC_DCR 0x40 diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index e5987e6..157e146 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -30,6 +30,7 @@ COBJS-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o COBJS-$(CONFIG_BFIN_SPI) += bfin_spi.o COBJS-$(CONFIG_CF_SPI) += cf_spi.o +COBJS-$(CONFIG_CF_QSPI) += cf_qspi.o COBJS-$(CONFIG_DAVINCI_SPI) += davinci_spi.o COBJS-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o COBJS-$(CONFIG_MPC52XX_SPI) += m
Re: [U-Boot] CFI flash broken for 8-bit bus
On 2011/03/24 5:07 AM, Aaron Williams wrote: > I have it working on our 8-bit boards properly now, though I've only done > some > limited testing. > > I basically put in the correct addresses into cfi_flash.h and updated various > addresses for 8-bit support. The problem was that the CFI code was written > using the 16-bit addresses which don't work for an 8-bit bus. > > I added a mask which is used to calculate the correct address for 16 and 32- > bit busses. I have only been able to test with 8-bit and 16-bit Spansion > devices though. > > -Aaron Hi Aaron, I'm happy to test it, when you post the patch. Regards, Rogan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Fix typo in #error: IS_IN_NOWHERE vs. IS_NOWHERE
Signed-off-by: Loïc Minier --- common/cmd_nvedit.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index fb69c24..c9ee3ed 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -65,7 +65,7 @@ DECLARE_GLOBAL_DATA_PTR; !defined(CONFIG_ENV_IS_IN_SPI_FLASH) && \ !defined(CONFIG_ENV_IS_NOWHERE) # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\ -SPI_FLASH|MG_DISK|NVRAM|MMC|NOWHERE} +SPI_FLASH|MG_DISK|NVRAM|MMC} or CONFIG_ENV_IS_NOWHERE #endif #define XMK_STR(x) #x -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 05/13] nds32/ag101: dev offset header of SoC ag101
Hi Wolfgang, >> This e-mail (and its attachments) may contain confidential and legally >> privileged information or information protected from disclosure. If you >> are not the intended recipient, you are hereby notified that any >> disclosure, copying, distribution, or use of the information contained >> herein is strictly prohibited. In this case, please immediately notify the >> sender by return e-mail, delete the message (and any accompanying >> documents) and destroy all printed hard copies. Thank you for your >> cooperation. >> >> Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. lol. Oh my god. I don't know my boss and the company's IT department added this kind of statement. What the ! It has never appeared in the e-mail before. I'll try to negociate with my boss and the IT department. Thanks for your indication. > OK, all patches ignored. Get rid of this crap! > > Best regards, > > Wolfgang Denk -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: Tegra2: Change mach-type to MACH_TYPE_SEABOARD due to mach-types.h update
Albert, On Thu, Mar 24, 2011 at 7:27 AM, Albert ARIBAUD wrote: > Le 22/03/2011 20:27, Tom Warren a écrit : >> >> Albert, >> >> On Wed, Feb 23, 2011 at 1:45 PM, Albert ARIBAUD >> wrote: >>> >>> Le 23/02/2011 21:03, Tom Warren a écrit : OK, I'm an idiot. I see now that I needed to add -n to format-patch to add the numbering to the [PATCH] header. Sorry for the noise - resending now with the corrected patchset. Tom >>> >>> Actually, for a single patch, you don't need to generate numbers, nor a >>> cover letter (the 0/N message). >> >> Is the current patch OK as is? It's a simple one-line change. > > I guess so. As soon as I get confirmation from Wolfgang that board patches > can go through any tree, I'll apply it as a bugfix to master. Great. Thanks! Also, I saw your 'patches pending before release?' message. Have my Tegra 'A9 CPU' patches been applied to arm master? I'm still a little confused about the timing of the merge window vs. the release, and I'm not sure if the full set of Tegra patches will be in the next release. Thanks, Tom > >> Thanks, >> Tom > > Amicalement, > -- > Albert. > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/85xx: Fix PCI memory map setup on P1_P2_RDB
From: Prabhakar Kushwaha Update the PCIe address map to match standard FSL memory map. Additionally, fix the TLBs so the cover the PCIe address space properly so cards plugged in like an e1000 work correctly. Signed-off-by: Prabhakar Kushwaha Signed-off-by: Kumar Gala --- board/freescale/p1_p2_rdb/tlb.c |4 ++-- include/configs/P1_P2_RDB.h | 24 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/board/freescale/p1_p2_rdb/tlb.c b/board/freescale/p1_p2_rdb/tlb.c index b85c268..a46b1b5 100644 --- a/board/freescale/p1_p2_rdb/tlb.c +++ b/board/freescale/p1_p2_rdb/tlb.c @@ -60,12 +60,12 @@ struct fsl_e_tlb_entry tlb_table[] = { #if defined(CONFIG_PCI) /* *I*G* - PCI */ - SET_TLB_ENTRY(1, CONFIG_SYS_PCIE2_MEM_VIRT, CONFIG_SYS_PCIE2_MEM_PHYS, + SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 3, BOOKE_PAGESZ_1G, 1), /* *I*G* - PCI I/O */ - SET_TLB_ENTRY(1, CONFIG_SYS_PCIE2_IO_VIRT, CONFIG_SYS_PCIE2_IO_PHYS, + SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_IO_VIRT, CONFIG_SYS_PCIE1_IO_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 4, BOOKE_PAGESZ_256K, 1), diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h index 982cdd5..95b85e3 100644 --- a/include/configs/P1_P2_RDB.h +++ b/include/configs/P1_P2_RDB.h @@ -177,8 +177,8 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); * Memory map * * 0x_ 0x3fff_ DDR 1G cacheablen - * 0xa000_ 0xbfff_ PCI Express Mem 1G non-cacheable - * 0xffc2_ 0xffc5_ PCI IO range256K non-cacheable + * 0x8000_ 0xbfff_PCI Express Mem 1G non-cacheable + * 0xffc0_ 0xffc3_PCI IO range256k non-cacheable * * Localbus cacheable (TBD) * 0x_ 0x_ SRAMYZ M Cacheable @@ -368,27 +368,27 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); * Memory space is mapped 1-1, but I/O space must start from 0. */ -/* controller 2, Slot 2, tgtid 2, Base address 9000 */ #if defined(CONFIG_PCI) +/* controller 2, Slot 2, tgtid 2, Base address 9000 */ #define CONFIG_SYS_PCIE2_NAME "Slot 1" #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa000 #define CONFIG_SYS_PCIE2_MEM_BUS 0xa000 #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa000 #define CONFIG_SYS_PCIE2_MEM_SIZE 0x2000 /* 512M */ -#define CONFIG_SYS_PCIE2_IO_VIRT 0xffc2 -#define CONFIG_SYS_PCIE2_IO_BUS0x -#define CONFIG_SYS_PCIE2_IO_PHYS 0xffc2 +#define CONFIG_SYS_PCIE2_IO_VIRT 0xffc1 +#define CONFIG_SYS_PCIE2_IO_BUS0x +#define CONFIG_SYS_PCIE2_IO_PHYS 0xffc1 #define CONFIG_SYS_PCIE2_IO_SIZE 0x0001 /* 64k */ /* controller 1, Slot 1, tgtid 1, Base address a000 */ #define CONFIG_SYS_PCIE1_NAME "Slot 2" -#define CONFIG_SYS_PCIE1_MEM_VIRT 0xc000 -#define CONFIG_SYS_PCIE1_MEM_BUS 0xc000 -#define CONFIG_SYS_PCIE1_MEM_PHYS 0xc000 +#define CONFIG_SYS_PCIE1_MEM_VIRT 0x8000 +#define CONFIG_SYS_PCIE1_MEM_BUS 0x8000 +#define CONFIG_SYS_PCIE1_MEM_PHYS 0x8000 #define CONFIG_SYS_PCIE1_MEM_SIZE 0x2000 /* 512M */ -#define CONFIG_SYS_PCIE1_IO_VIRT 0xffc3 -#define CONFIG_SYS_PCIE1_IO_BUS0x -#define CONFIG_SYS_PCIE1_IO_PHYS 0xffc3 +#define CONFIG_SYS_PCIE1_IO_VIRT 0xffc0 +#define CONFIG_SYS_PCIE1_IO_BUS0x +#define CONFIG_SYS_PCIE1_IO_PHYS 0xffc0 #define CONFIG_SYS_PCIE1_IO_SIZE 0x0001 /* 64k */ #define CONFIG_PCI_PNP /* do pci plug-and-play */ -- 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 1/2] armv7: enable Thumb build for armv7
Le 17/03/2011 08:30, Aneesh V a écrit : > Albert, > > On Wednesday 16 March 2011 10:55 PM, Albert ARIBAUD wrote: >> Le 16/03/2011 09:39, Aneesh V a écrit : > [snip ..] >> >> Some toolchains in current use (notably the one provided with ELDK 4.2, >> and possibly others) do not support -march=armv7[-a]. Do we really need >> armv7 instructions? > > 'cc-option' will make sure that build won't break for old compilers. We > can do something like this: > > PLATFORM_CPPFLAGS += $(call cc-option,-march=armv7-a, -march=armv5) > > We are not planning to use armv7-a instructions in the code. In fact, > recently I removed even an armv5 instruction from armv7 generic code in > the interest of not breaking Tegra2. > > However, keeping -march=armv7-a (armv6 and above) helps in having > Thumb2, which I believe is a good compromise between code density and > performance. > > So, OMAP4 U-Boot when built with ELDK will give you Thumb1 code where > as when it is built with newer compilers it will give you Thumb2 code. > As long we don't use non-compliant assembly instructions, both should > build and work fine. > > br, > Aneesh Understood. As for the question about config options (assuming I got it right) I'd rather have the SoC define which -march it wants, and only have a CONFIG for saying if we want thumb or not. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Don't grab memory for LCD if FB address is defined
Hi Minkyu Kang, Le 15/03/2011 09:35, Minkyu Kang a écrit : > f FB address is defined specific address then don't grab memory for LCD > > Signed-off-by: Minkyu Kang > Cc: Albert Aribaud > Cc: Wolfgang Denk > Cc: Stefan Roese > Cc: Kim Phillips > Cc: Andy Fleming > Cc: Kumar Gala > --- > v2 > add document > > arch/arm/lib/board.c |4 > arch/m68k/lib/board.c|4 > arch/powerpc/lib/board.c |4 > doc/README.fb_addr | 17 + > 4 files changed, 29 insertions(+), 0 deletions(-) > create mode 100644 doc/README.fb_addr > > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c > index c620d2c..5a4d2bd 100644 > --- a/arch/arm/lib/board.c > +++ b/arch/arm/lib/board.c > @@ -356,9 +356,13 @@ void board_init_f (ulong bootflag) > #endif /* CONFIG_VFD */ > > #ifdef CONFIG_LCD > +#ifdef CONFIG_FB_ADDR > + gd->fb_base = CONFIG_FB_ADDR; > +#else > /* reserve memory for LCD display (always full pages) */ > addr = lcd_setmem (addr); > gd->fb_base = addr; > +#endif /* CONFIG_FB_ADDR */ > #endif /* CONFIG_LCD */ > > /* > diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c > index 7867ba5..a6cd9b8 100644 > --- a/arch/m68k/lib/board.c > +++ b/arch/m68k/lib/board.c > @@ -277,9 +277,13 @@ board_init_f (ulong bootflag) > debug ("Top of RAM usable for U-Boot at: %08lx\n", addr); > > #ifdef CONFIG_LCD > +#ifdef CONFIG_FB_ADDR > + gd->fb_base = CONFIG_FB_ADDR; > +#else > /* reserve memory for LCD display (always full pages) */ > addr = lcd_setmem (addr); > gd->fb_base = addr; > +#endif /* CONFIG_FB_ADDR */ > #endif /* CONFIG_LCD */ > > /* > diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c > index b88cf6b..09c20e9 100644 > --- a/arch/powerpc/lib/board.c > +++ b/arch/powerpc/lib/board.c > @@ -453,9 +453,13 @@ void board_init_f (ulong bootflag) > debug ("Top of RAM usable for U-Boot at: %08lx\n", addr); > > #ifdef CONFIG_LCD > +#ifdef CONFIG_FB_ADDR > + gd->fb_base = CONFIG_FB_ADDR; > +#else > /* reserve memory for LCD display (always full pages) */ > addr = lcd_setmem (addr); > gd->fb_base = addr; > +#endif /* CONFIG_FB_ADDR */ > #endif /* CONFIG_LCD */ > > #if defined(CONFIG_VIDEO)&& defined(CONFIG_8xx) > diff --git a/doc/README.fb_addr b/doc/README.fb_addr > new file mode 100644 > index 000..ea8bca6 > --- /dev/null > +++ b/doc/README.fb_addr > @@ -0,0 +1,17 @@ > +Define CONFIG_FB_ADDR if you want to use specific address for frame buffer. > +Then system will reserve the frame buffer address to defined address instead > of > +lcd_setmem (this function grab the memory for frame buffer by panel's size). > + > +Please see below code (in board_init_f function from arch/arm/lib/board.c) > + > +#ifdef CONFIG_FB_ADDR > + gd->fb_base = CONFIG_FB_ADDR; > +#else > + /* reserve memory for LCD display (always full pages) */ > + addr = lcd_setmem (addr); > + gd->fb_base = addr; > +#endif /* CONFIG_FB_ADDR */ > + > +If you want this config option then please define it at your board config > file > + > +#define CONFIG_FB_ADDR 0x Patch does not apply cleanly through git am due to whitespace errors (space before tabs). Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3] arm: Use optimized memcpy and memset from linux
Le 11/03/2011 08:36, Matthias Weisser a écrit : > Using optimized versions of memset and memcpy from linux brings a quite > noticeable speed (x2 or better) improvement for these two functions. > > Here are some numbers for test done with jadecpu > > | HEAD(1)| HEAD(1)| HEAD(2)| HEAD(2)| > || +patch || +patch | > ---+++++ > Reset to prompt| 438ms | 330ms | 228ms | 120ms | > ||||| > TFTP a 3MB img | 4782ms | 3428ms | 3245ms | 2820ms | > ||||| > FATLOAD USB a 3MB img* | 8515ms | 8510ms | -- | -- | > ||||| > BOOTM LZO img in RAM | 3473ms | 3168ms | 592ms | 592ms | > where CRC is | 615ms | 615ms | 54ms | 54ms | > uncompress| 2460ms | 2462ms | 450ms | 451ms | > final boot_elf| 376ms | 68ms | 65ms | 65ms | > ||||| > BOOTM LZO img in FLASH | 3207ms | 2902ms | 1050ms | 1050ms | > where CRC is | 600ms | 600ms | 135ms | 135ms | > uncompress| 2209ms | 2211ms | 828ms | 828ms | > ||||| > Copy 1.4MB from NOR to RAM | 134ms | 72ms | 120ms | 70ms | > > (1) No dcache > (2) dcache enabled in board_init > *Does not work when dcache is on > > Size impact: > > C version: > textdata bss dec hex filename > 202862 18912 266456 488230 77326 u-boot > > ASM version: > textdata bss dec hex filename > 203798 18912 266288 488998 77626 u-boot > 222712 u-boot.bin > > Signed-off-by: Matthias Weisser > --- Applied to u-boot-arm/master, thanks. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: Tegra2: Change mach-type to MACH_TYPE_SEABOARD due to mach-types.h update
Le 22/03/2011 20:27, Tom Warren a écrit : > Albert, > > On Wed, Feb 23, 2011 at 1:45 PM, Albert ARIBAUD > wrote: >> Le 23/02/2011 21:03, Tom Warren a écrit : >>> >>> OK, I'm an idiot. I see now that I needed to add -n to format-patch to >>> add the numbering to the [PATCH] header. >>> >>> Sorry for the noise - resending now with the corrected patchset. >>> >>> Tom >> >> Actually, for a single patch, you don't need to generate numbers, nor a >> cover letter (the 0/N message). > Is the current patch OK as is? It's a simple one-line change. I guess so. As soon as I get confirmation from Wolfgang that board patches can go through any tree, I'll apply it as a bugfix to master. > Thanks, > Tom Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Remove unnecessary reset in usb_stor_get_info
The reset request in usb_stor_get_info is causing issues with some usb sticks. Some of these sticks vendor_id/product_id have been hardcoded to not reset but better is to remove the reset altogether. It is not needed. Signed-off-by: Erik Hansen --- common/usb_storage.c | 25 - 1 files changed, 0 insertions(+), 25 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index 1e6cd6a..6963e6d 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1346,31 +1346,6 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, unsigned long *capacity, *blksz; ccb *pccb = &usb_ccb; - /* for some reasons a couple of devices would not survive this reset */ - if ( - /* Sony USM256E */ - (dev->descriptor.idVendor == 0x054c && -dev->descriptor.idProduct == 0x019e) - || - /* USB007 Mini-USB2 Flash Drive */ - (dev->descriptor.idVendor == 0x066f && -dev->descriptor.idProduct == 0x2010) - || - /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ - (dev->descriptor.idVendor == 0x0781 && -dev->descriptor.idProduct == 0x5151) - || - /* -* SanDisk Corporation U3 Cruzer Micro 1/4GB -* Flash Drive 16244373FFB4 -*/ - (dev->descriptor.idVendor == 0x0781 && -dev->descriptor.idProduct == 0x5406) - ) - USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); - else - ss->transport_reset(ss); - pccb->pdata = usb_stor_buf; dev_desc->target = dev->devnum; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Any ARM repository pull requests or patches pending before release?
Hi Albert, On Wed, Mar 23, 2011 at 5:41 PM, Albert ARIBAUD wrote: > Hi all, > > I am preparing for a last pull request for ARM before the upcoming > release, since I have at least two fixes at the tip of my current master > branch which need pulling. I will send the pull request no later than > sunday (earlier if Wolfgang -- Cc:ed -- requires it before). > > So, if there are any other ARM repositories (custodians Cc:ed) which > need to send out a pull request, please do it soon, so that I can catch > it and rebase my own patch list before sending my own pull request. > > Also, if any bugfix patch, or any non-bugfix patch first sent before the > merge window was closed, is still not applied and should, please let me > know -- make sure it applies cleanly on top of the current > u-boot-arm/master branch; if not, please rebase and repost. The ea20 fixes were submitted before merge window close, were acked and not applied: http://patchwork.ozlabs.org/patch/78425/ -- "[U-Boot,1/2] ea20: fixlibea20.o not found" and http://patchwork.ozlabs.org/patch/78426/ -- "[U-Boot,2/2] ea20: fixundefined PHY_* errors" I verified that they apply cleanly to u-boot-arm/master using: $curl http://patchwork.ozlabs.org/patch/78425/raw/ | patch -p1 % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 2970 2970 0 1078 0 --:--:-- --:--:-- --:--:-- 1087 patching file board/davinci/ea20/Makefile $curl http://patchwork.ozlabs.org/patch/78426/raw/ | patch -p1 % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 10330 10330 0 1692 0 --:--:-- --:--:-- --:--:-- 1699 patching file drivers/net/davinci_emac.c Best Regards, Ben Gardiner --- Nanometrics Inc. http://www.nanometrics.ca ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] omap3_beagle: Switch default console from ttyS2 to ttyO2
Am 24.03.2011 14:01, schrieb Albert ARIBAUD: > Cc:ing Dirk as the omap3_beagle maintainer, and Wolfgang for advice. ... > Apart from Thomas' question, there seems to be no Nak for this patch -- > I've taken the liberty to Cc: the board maintainer just in case -- so we > might as well apply it. > > Wolfgang, which tree is this patch supposed to go through? Mine because > the board is ARM? yours because it is a board, not arch, patch? Or > whichever? Oh, sorry, haven't seen that Dirk is the maintainer, I've only added the TI-maintainer to cc, which might be wrong. Regards, Alexander Holler ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-samsung/master
Le 24/03/2011 07:58, Minkyu Kang a écrit : > Dear Albert Aribaud, > > The following changes since commit 966a35d45b90fdcd694dec89b32e5b67771cfd64: > >Merge branch 'master' of git://git.denx.de/u-boot-arm (2011-02-16 08:54:52 > +0900) > > are available in the git repository at: > >git://git.denx.de/u-boot-samsung master This does not seem to have been rebased to u-boot or u-boot-arm. Can you check? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 12/13] nds32/ag101/adp-ag101: add board adp-ag101 support
Dear "Macpaul Lin", In message <1300969687-2428-12-git-send-email-macp...@andestech.com> you wrote: > Add adp-ag101.c board config and related settings. > > Signed-off-by: Macpaul Lin > --- > MAINTAINERS | 11 + > MAKEALL |6 +++ > board/AndesTech/adp-ag101/Makefile| 51 + > board/AndesTech/adp-ag101/adp-ag101.c | 81 > + > board/AndesTech/adp-ag101/config.mk | 27 +++ > 5 files changed, 176 insertions(+), 0 deletions(-) > create mode 100644 board/AndesTech/adp-ag101/Makefile > create mode 100644 board/AndesTech/adp-ag101/adp-ag101.c > create mode 100644 board/AndesTech/adp-ag101/config.mk ... > diff --git a/board/AndesTech/adp-ag101/config.mk > b/board/AndesTech/adp-ag101/config.mk > new file mode 100644 > index 000..2cee594 > --- /dev/null > +++ b/board/AndesTech/adp-ag101/config.mk ... > +PLATFORM_RELFLAGS += -gdwarf-2 This should go into a generic config.mk file, it is not board specific. > +CONFIG_SYS_TEXT_BASE = 0x0320 > +LDSCRIPT := $(SRCTREE)/arch/$(ARCH)/cpu/$(CPU)/u-boot.lds These should go into your board config file instead. > +EXTERN_LIB += $(shell $(CC) -print-file-name=include)/../static/el/libgcc.a Why would that be needed? Please fix so that you can get rid of board specific config.mk files. 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 Disc space - the final frontier! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 05/13] nds32/ag101: dev offset header of SoC ag101
Dear "Macpaul Lin", In message <1300969687-2428-5-git-send-email-macp...@andestech.com> you wrote: > Add header file of device offset support for SoC ag101. > > SoC ag101 is the first chip using NDS32 N1213 cpu core. > > Note: >Ag101 is actually use ftsdmc021 instead of ftsdmc020 >as dram controller, which is probably wrong in the datasheet. > ... > CONFIDENTIALITY NOTICE: > > This e-mail (and its attachments) may contain confidential and legally > privileged information or information protected from disclosure. If you > are not the intended recipient, you are hereby notified that any > disclosure, copying, distribution, or use of the information contained > herein is strictly prohibited. In this case, please immediately notify the > sender by return e-mail, delete the message (and any accompanying > documents) and destroy all printed hard copies. Thank you for your > cooperation. > > Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. OK, all patches ignored. Get rid of this crap! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de This is now. Later is later. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 03/13] nds32: config.mk of NDS32 architecture
Dear "Macpaul Lin", In message <1300969687-2428-3-git-send-email-macp...@andestech.com> you wrote: > Add config.mk for supporting NDS32 architecture. > > Signed-off-by: Macpaul Lin > --- > arch/nds32/config.mk | 34 ++ > 1 files changed, 34 insertions(+), 0 deletions(-) > create mode 100644 arch/nds32/config.mk And please don;t add single files like here. Squash all related patches into a single commit. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de This is an unauthorized cybernetic announcement. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 01/13] nds32: add header files support for nds32
Dear "Macpaul Lin", In message <1300969687-2428-1-git-send-email-macp...@andestech.com> you wrote: > Add generic header files support for nds32 architecture. > Cache, ptregs, data type and other definitions are included. > > Signed-off-by: Macpaul Lin It appears you did not bother to run your patches through checkpatch. I see this: [PATCH v6 01/13] nds32: add header files support for nds32 total: 304 errors, 135 warnings, 1320 lines checked [PATCH v6 02/13] nds32: add NDS32 support into common header file OK, 10 lines checked [PATCH v6 03/13] nds32: config.mk of NDS32 architecture OK, 34 lines checked [PATCH v6 04/13] nds32/core N1213: NDS32 N12 core family N1213 total: 5 errors, 42 warnings, 569 lines checked [PATCH v6 05/13] nds32/ag101: dev offset header of SoC ag101 total: 13 errors, 9 warnings, 88 lines checked [PATCH v6 06/13] nds32/ag101: lowlevel_init.S of ag101 OK, 160 lines checked [PATCH v6 07/13] nds32/ag101: cpu and init funcs of SoC ag101 total: 20 errors, 28 warnings, 520 lines checked [PATCH v6 08/13] nds32/lib: add generic funcs in NDS32 lib total: 29 errors, 60 warnings, 775 lines checked [PATCH v6 09/13] nds32: standalone support total: 4 errors, 1 warnings, 114 lines checked [PATCH v6 10/13] nds32: common bdinfo, bootm, image support total: 3 errors, 8 warnings, 74 lines checked [PATCH v6 11/13] nds32/ag101/adp-ag101: add config adp-ag101.h total: 6 errors, 17 warnings, 382 lines checked [PATCH v6 12/13] nds32/ag101/adp-ag101: add board adp-ag101 support total: 1 errors, 0 warnings, 187 lines checked [PATCH v6 13/13] nds32/ag101/adp-ag101: add board adp-ag101 into boards.cfg total: 1 errors, 0 warnings, 13 lines checked OK, there are a few false positives, but there is also a ton of valid complaints. ... > +static inline void __set_bit(int nr, volatile void *addr) > +{ > + ((unsigned char *) addr)[nr >> 3] |= (1U << (nr & 7)); > +} > + > +extern void clear_bit(int nr, volatile void * addr); > + > +static inline void __clear_bit(int nr, volatile void *addr) > +{ > + ((unsigned char *) addr)[nr >> 3] &= ~(1U << (nr & 7)); > +} For example, all these macros must use I/O accessors instead of volatile pointer accesses. This needs some cleanup. [Review stops here. Please fix the checkpatch issues first.] 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 If there was anything that depressed him more than his own cynicism, it was that quite often it still wasn't as cynical as real life. - Terry Pratchett, _Guards! Guards!_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ftsmc020: enhance for features and asm support.
Dear "Macpaul Lin", In message <1300965924-20508-1-git-send-email-macp...@andestech.com> you wrote: > 1. Enhance ftsmc020 according to datasheets. > 2. Add assembly register offsets for support lowlevel_init.S. NAK. Such register offsets should be automatically generated from the respective C structs using make-asm-offsets; see the generic-asm-offsets.h / asm-offsets.s build rules in the top level Makefile. 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 Violence in reality is quite different from theory. -- Spock, "The Cloud Minders", stardate 5818.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Remove unnecessary reset request in usb_stor_get_info
The reset request in usb_stor_get_info is causing issues with some usb sticks. Some of these sticks vendor_id/product_id have been hardcoded to not reset but better is to remove the reset altogether. It is not needed. --- common/usb_storage.c | 25 - 1 files changed, 0 insertions(+), 25 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index 1e6cd6a..6963e6d 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1346,31 +1346,6 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, unsigned long *capacity, *blksz; ccb *pccb = &usb_ccb; - /* for some reasons a couple of devices would not survive this reset */ - if ( - /* Sony USM256E */ - (dev->descriptor.idVendor == 0x054c && -dev->descriptor.idProduct == 0x019e) - || - /* USB007 Mini-USB2 Flash Drive */ - (dev->descriptor.idVendor == 0x066f && -dev->descriptor.idProduct == 0x2010) - || - /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ - (dev->descriptor.idVendor == 0x0781 && -dev->descriptor.idProduct == 0x5151) - || - /* -* SanDisk Corporation U3 Cruzer Micro 1/4GB -* Flash Drive 16244373FFB4 -*/ - (dev->descriptor.idVendor == 0x0781 && -dev->descriptor.idProduct == 0x5406) - ) - USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); - else - ss->transport_reset(ss); - pccb->pdata = usb_stor_buf; dev_desc->target = dev->devnum; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [beagleboard] Re: [PATCH] omap3_beagle: Switch default console from ttyS2 to ttyO2
Cc:ing Dirk as the omap3_beagle maintainer, and Wolfgang for advice. Le 02/03/2011 12:00, Alexander Holler a écrit : > Hello, > > Am 02.03.2011 11:50, schrieb Thomas Weber: >> Hello Alexander, >> Am 02.03.2011 00:13, schrieb Jason Kridner: >>> On Fri, Feb 18, 2011 at 3:37 AM, Alexander Holler >>> wrote: Linux kernels>= 2.6.36 are using ttyOn instead ttySn for the serials on OMAPs. > > > >> can you please do this for all omap3 boards? >> Or we have in the end 10 patches for the same problem. > > Sorry, no. I don't know which boards are using which kernel versions and > there are many boards around with and SDK which are using older kernels. > I think the time of the change should be decided by every board-maintainer. > > Regards, > > Alexander Apart from Thomas' question, there seems to be no Nak for this patch -- I've taken the liberty to Cc: the board maintainer just in case -- so we might as well apply it. Wolfgang, which tree is this patch supposed to go through? Mine because the board is ARM? yours because it is a board, not arch, patch? Or whichever? If mine is ok then I'll apply it to next as in any cas it is not a bugfix. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 13/13] nds32/ag101/adp-ag101: add board adp-ag101 into boards.cfg
Add board adp-ag101 into boards.cfg Signed-off-by: Macpaul Lin --- boards.cfg |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/boards.cfg b/boards.cfg index 45c3102..75e3157 100644 --- a/boards.cfg +++ b/boards.cfg @@ -243,6 +243,7 @@ vct_platinumavc mipsmips vct microna vct_platinumavc_smallmipsmipsvct micronas - vct:VCT_PLATINUMAVC,VCT_SMALL_IMAGE vct_platinumavc_onenand mipsmipsvct micronas - vct:VCT_PLATINUMAVC,VCT_ONENAND vct_platinumavc_onenand_small mips mipsvct micronas - vct:VCT_PLATINUMAVC,VCT_ONENAND,VCT_SMALL_IMAGE +adp-ag101 nds32 n1213 adp-ag101 AndesTech ag101 PCI5441 nios2 nios2 pci5441 psyent PK1C20 nios2 nios2 pk1c20 psyent EVB64260 powerpc 74xx_7xx - - EVB64260 -- 1.7.3.5 CONFIDENTIALITY NOTICE: This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation. Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 11/13] nds32/ag101/adp-ag101: add config adp-ag101.h
Add evaluation board "adp-ag101" aconfiguration file adp-ag101.h. Signed-off-by: Macpaul Lin --- Changes for v1-v4: - code clean up Changes for v5-v6: - Refine the definitions and parameters about CLK, AHB controller, SDRAM controller, Static memory controllers. - Add APB_CLK, AHB_CLK, SYS_CLK definitions for backward compatible. - ftahbc010: - Update include path of ftahbc010. - ftsdmc021: - Update include path of ftsdmc021. - ftsmc020: - Update include path of ftsmc020. - ftwdt010: - Fix WDT define and update include path. - Fix ftwdt010 for hardware reset. - ftpmu010: - Remove duplicate PMU definitions. - Add related configurations. - Fix MAX malloc len and fix saveenv. - clean up. include/configs/adp-ag101.h | 377 +++ 1 files changed, 377 insertions(+), 0 deletions(-) create mode 100644 include/configs/adp-ag101.h diff --git a/include/configs/adp-ag101.h b/include/configs/adp-ag101.h new file mode 100644 index 000..ec92233 --- /dev/null +++ b/include/configs/adp-ag101.h @@ -0,0 +1,377 @@ +/* + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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. + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +/* + * CPU and Board Configuration Options + */ +#define CONFIG_ADP_AG101 + +#define CONFIG_USE_INTERRUPT + +#define CONFIG_SKIP_LOWLEVEL_INIT + +/* + * Timer + */ + +/* + * ag101: CONFIG_SYS_HZ: APB_CLK (ag101 original timer clock frequency) + * + * According to the discussion in u-boot mailing list before, + * CONFIG_SYS_HZ at 1000 is mandatory. + */ + +/* + * APB_CLK, AHB_CLK, SYS_CLK are from an old configuration + * in the earlist nds32 bootloader. + * + * CONFIG_SYS_HZ = APB_CLK = SYS_CLK = CONFIG_SYS_CLK_FREQ /2 + * + * Since the power management (PWM) Timer 4 uses a counter of + * 15625 for 10 ms, so we need it to wrap 100 times + * (total 1562500) to get 1 sec. + * + * #define CONFIG_HZ 1562500 + * 1562500*25=3906250 + */ +#define SYS_CLKCONFIG_SYS_CLK_FREQ +#define AHB_CLKSYS_CLK +#define APB_CLK(SYS_CLK / 2) + +#define CONFIG_SYS_HZ 1000 +#define VERSION_CLOCK CONFIG_SYS_CLK_FREQ + +/* + * System Clock + * Suggested frequency lists: + * 1600 -> 16.00 MHz + * 18432000 -> 18.432000 MHz + * 22118400 -> 22.118400 MHz + * 8300 -> 83.00 MHz + * 3300 -> 33.00 MHz + * 36864000 -> 36.864000 MHz + * 4800 -> 48.00 MHz CONFIG_ADP_AG101 + * 39062500 -> 39.062500 MHz CONFIG_ADP_AG101P + */ +#ifdef CONFIG_ADP_AG101 +#define CONFIG_SYS_CLK_FREQ 4800 +#endif + +/* + * Use Externel CLOCK or PCLK + */ +#undef CONFIG_FTRTC010_EXTCLK + +#ifndef CONFIG_FTRTC010_EXTCLK +#define CONFIG_FTRTC010_PCLK +#endif + +#ifdef CONFIG_FTRTC010_EXTCLK +#define TIMER_CLOCK32768 /* CONFIG_FTRTC010_EXTCLK */ +#else +#define TIMER_CLOCKCONFIG_SYS_HZ /* CONFIG_FTRTC010_PCLK */ +#endif + +#define TIMER_LOAD_VAL 0x + +/* + * Real Time Clock + */ +#define CONFIG_RTC_FTRTC010 + +/* + * Real Time Clock Divider + * RTC_DIV_COUNT (OSC_CLK/OSC_5MHZ) + */ +#ifdef CONFIG_ADP_AG101 +#define OSC_5MHZ (5*100) +#define OSC_CLK(2*OSC_5MHZ) +#define RTC_DIV_COUNT (OSC_CLK/OSC_5MHZ) +#endif + +/* + * Serial console configuration + */ + +/* FTUART is a high speed NS 16C550A compatible UART */ +#define CONFIG_BAUDRATE38400 +#define CONFIG_CONS_INDEX 1 +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_COM1CONFIG_FTUART010_02_BASE /* 0x9960 */ +#define CONFIG_SYS_NS16550_REG_SIZE-4 + +#ifdef CONFIG_ADP_AG101 +#define CONFIG_SYS_NS16550_CLK (4608 * 20) / 25 /* AG101 */ +#endif + +/* valid baudrates */ +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } + +/* + * Ethernet + */ +#define CONFIG_NET_MULTI +#define CONFIG_FTMAC100 + +
[U-Boot] [PATCH v6 12/13] nds32/ag101/adp-ag101: add board adp-ag101 support
Add adp-ag101.c board config and related settings. Signed-off-by: Macpaul Lin --- MAINTAINERS | 11 + MAKEALL |6 +++ board/AndesTech/adp-ag101/Makefile| 51 + board/AndesTech/adp-ag101/adp-ag101.c | 81 + board/AndesTech/adp-ag101/config.mk | 27 +++ 5 files changed, 176 insertions(+), 0 deletions(-) create mode 100644 board/AndesTech/adp-ag101/Makefile create mode 100644 board/AndesTech/adp-ag101/adp-ag101.c create mode 100644 board/AndesTech/adp-ag101/config.mk diff --git a/MAINTAINERS b/MAINTAINERS index 4756f14..982e846 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1114,5 +1114,16 @@ Anton Shurpin BF561-ACVILON BF561 # +# NDS32 Systems: # +# # +# Maintainer Name, Email Address # +# Board CPU # +# + +Macpaul Lin + + ADP-AG101 N1213 (AG101 SoC) + +# # End of MAINTAINERS list # # diff --git a/MAKEALL b/MAKEALL index a732e6a..a6e0068 100755 --- a/MAKEALL +++ b/MAKEALL @@ -612,6 +612,12 @@ LIST_sh="$(boards_by_arch sh)" LIST_sparc="$(boards_by_arch sparc)" +# +## NDS32 Systems +# + +LIST_nds32="$(boards_by_arch nds32)" + #--- build_target() { diff --git a/board/AndesTech/adp-ag101/Makefile b/board/AndesTech/adp-ag101/Makefile new file mode 100644 index 000..9fd2604 --- /dev/null +++ b/board/AndesTech/adp-ag101/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation +# Macpaul Lin, Andes Technology Corporation +# +# 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 := adp-ag101.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/AndesTech/adp-ag101/adp-ag101.c b/board/AndesTech/adp-ag101/adp-ag101.c new file mode 100644 index 000..b31b785 --- /dev/null +++ b/board/AndesTech/adp-ag101/adp-ag101.c @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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 +#includ
[U-Boot] [PATCH v6 10/13] nds32: common bdinfo, bootm, image support
Add support of NDS32 to common commands bdinfo, bootm, and image format. Signed-off-by: Macpaul Lin --- common/cmd_bdinfo.c | 26 ++ common/cmd_bootm.c |2 ++ common/image.c |1 + include/image.h |5 + 4 files changed, 34 insertions(+), 0 deletions(-) diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index bba7374..ce20df5 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -411,6 +411,32 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#elif defined(CONFIG_NDS32) + +int do_bdinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + bd_t *bd = gd->bd; + + print_num ("arch_number", bd->bi_arch_number); + print_num ("env_t", (ulong)bd->bi_env); + print_num ("boot_params", (ulong)bd->bi_boot_params); + + for (i=0; i start", bd->bi_dram[i].start); + print_num("-> size",bd->bi_dram[i].size); + } + +#if defined(CONFIG_CMD_NET) + print_eth(0); + printf ("ip_addr = %pI4\n", &bd->bi_ip_addr); +#endif + printf ("baudrate= %d bps\n", bd->bi_baudrate); + + return 0; +} + #else #error "a case for this architecture does not exist!" #endif diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 18019d6..59fbc45 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -187,6 +187,8 @@ void arch_preboot_os(void) __attribute__((weak, alias("__arch_preboot_os"))); #define IH_INITRD_ARCH IH_ARCH_SH #elif defined(__sparc__) #define IH_INITRD_ARCH IH_ARCH_SPARC +#elif defined(__nds32__) + #define IH_INITRD_ARCH IH_ARCH_NDS32 #else # error Unknown CPU type #endif diff --git a/common/image.c b/common/image.c index f63a2ff..afe5957 100644 --- a/common/image.c +++ b/common/image.c @@ -93,6 +93,7 @@ static const table_entry_t uimage_arch[] = { { IH_ARCH_SPARC64,"sparc64", "SPARC 64 Bit", }, { IH_ARCH_BLACKFIN, "blackfin", "Blackfin", }, { IH_ARCH_AVR32, "avr32","AVR32",}, + { IH_ARCH_NDS32, "nds32","NDS32",}, { -1, "", "", }, }; diff --git a/include/image.h b/include/image.h index 005e0d2..1c99521 100644 --- a/include/image.h +++ b/include/image.h @@ -106,6 +106,7 @@ #define IH_ARCH_BLACKFIN 16 /* Blackfin */ #define IH_ARCH_AVR32 17 /* AVR32*/ #define IH_ARCH_ST200 18 /* STMicroelectronics ST200 */ +#define IH_ARCH_NDS32 19 /* ANDES Technology - NDS32 */ /* * Image Types @@ -504,6 +505,8 @@ static inline int image_check_target_arch (const image_header_t *hdr) if (!image_check_arch (hdr, IH_ARCH_SH)) #elif defined(__sparc__) if (!image_check_arch (hdr, IH_ARCH_SPARC)) +#elif defined(__nds32__) + if (!image_check_arch (hdr, IH_ARCH_NDS32)) #else # error Unknown CPU type #endif @@ -656,6 +659,8 @@ static inline int fit_image_check_target_arch (const void *fdt, int node) if (!fit_image_check_arch (fdt, node, IH_ARCH_SH)) #elif defined(__sparc__) if (!fit_image_check_arch (fdt, node, IH_ARCH_SPARC)) +#elif defined(__nds32__) + if (!fit_image_check_arch (fdt, node, IH_ARCH_NDS32)) #else # error Unknown CPU type #endif -- 1.7.3.5 CONFIDENTIALITY NOTICE: This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation. Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 09/13] nds32: standalone support
Add standalone program related support for nds32 architecture. Signed-off-by: Macpaul Lin --- examples/standalone/nds32.lds | 64 + examples/standalone/stubs.c | 17 +- examples/standalone/x86-testapp.c | 12 +++ 3 files changed, 92 insertions(+), 1 deletions(-) create mode 100644 examples/standalone/nds32.lds diff --git a/examples/standalone/nds32.lds b/examples/standalone/nds32.lds new file mode 100644 index 000..c2ac107 --- /dev/null +++ b/examples/standalone/nds32.lds @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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 + */ + +OUTPUT_FORMAT("elf32-nds32", "elf32-nds32", "elf32-nds32") +OUTPUT_ARCH(nds32) +ENTRY(_start) +SECTIONS +{ + . = 0x; + + . = ALIGN(4); + .text : + { + *(.text) + } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + + .got : { + __got_start = .; + *(.got) + __got_end = .; + } + + . = ALIGN(4); + __bss_start = .; + .bss : { *(.bss) } + __bss_end = .; + + . = ALIGN(4); + .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } + + _end = .; + + . = 0x0200; + .u_boot_ohci_data_st : { *(.u_boot_ohci_data_st) } +} diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c index 2d2e709..a763d0d 100644 --- a/examples/standalone/stubs.c +++ b/examples/standalone/stubs.c @@ -167,8 +167,23 @@ gd_t *global_data; " jmp %%g1\n" \ " nop\n" \ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "g1" ); - +#elif defined(CONFIG_NDS32) +/* + * r16 holds the pointer to the global_data. gp is call clobbered. + * not support reduced register (16 GPR). + */ +#define EXPORT_FUNC(x) \ + asm volatile ( \ +" .globl " #x "\n"\ +#x ":\n" \ +" lwi $r16, [$gp + (%0)]\n" \ +" lwi $r16, [$r16 + (%1)]\n" \ +" jr $r16\n" \ + : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "$r16" ); #else +/*"addi$sp, $sp, -24\n"\ +" br $r16\n" \*/ + #error stubs definition missing for this architecture #endif diff --git a/examples/standalone/x86-testapp.c b/examples/standalone/x86-testapp.c index e8603d9..9f80a5d 100644 --- a/examples/standalone/x86-testapp.c +++ b/examples/standalone/x86-testapp.c @@ -52,6 +52,16 @@ asm volatile ( \ " lw $25, %1($25)\n" \ " jr $25\n" \ : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "t9"); +#elif defined(__nds32__) +#define EXPORT_FUNC(x) \ +asm volatile ( \ +" .globl mon_" #x "\n"\ +"mon_" #x ":\n"\ +" lwi $r16, [$gp + (%0)]\n" \ +" lwi $r16, [$r16 + (%1)]\n" \ +" jr $r16\n" \ + : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "$r16"); + #else #error [No stub code for this arch] #endif @@ -72,6 +82,8 @@ int main(void) register volatile xxx_t *pq asm("r8"); #elif defined(__mips__) register volatile xxx_t *pq asm("k0"); +#elif defined(__nds32__) + register volatile xxx_t *pq asm("$r16"); #endif char buf[32]; -- 1.7.3.5 CONFIDENTIALITY NOTICE: This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of
[U-Boot] [PATCH v6 08/13] nds32/lib: add generic funcs in NDS32 lib
Add Makefile, board.c, interrupts.c and bootm.c functions to nds32 architecture. Signed-off-by: Macpaul Lin --- Changes for v1-v4: - code clean up and formatting style. Changes for v5-v6 - board.c - Do some clean up and add code - Remove display banner which hasn't support. - Add ftpmu010 related power management unit code. - Remove useless LED related code. - Move SDRAM init to board sepecific files. (ex. adp-ag101.c) - Remove CONFIG_SOFT_I2C which hasn't been support. - Remove CONFIG_FSL_ESDHC which hasn't been support. - cleanup. arch/nds32/lib/Makefile | 52 +++ arch/nds32/lib/board.c | 351 +++ arch/nds32/lib/bootm.c | 239 + arch/nds32/lib/interrupts.c | 126 4 files changed, 768 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/lib/Makefile create mode 100644 arch/nds32/lib/board.c create mode 100644 arch/nds32/lib/bootm.c create mode 100644 arch/nds32/lib/interrupts.c diff --git a/arch/nds32/lib/Makefile b/arch/nds32/lib/Makefile new file mode 100644 index 000..eca4324 --- /dev/null +++ b/arch/nds32/lib/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation +# Macpaul Lin, Andes Technology Corporation +# +# 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$(ARCH).o + +OBJS := board.o bootm.o interrupts.o + +all: $(LIB) + +$(LIB):$(OBJS) $(SOBJS) + $(AR) crv $@ $^ + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/nds32/lib/board.c b/arch/nds32/lib/board.c new file mode 100644 index 000..8776b04 --- /dev/null +++ b/arch/nds32/lib/board.c @@ -0,0 +1,351 @@ +/* + * (C) Copyright 2002-2006 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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 +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +extern ulong __bss_end; +ulong monitor_flash_len; + +#ifndef CONFIG_IDENT_STRING +#define CONFIG_IDENT_STRING "" +#endif + +const char version_string[] = + U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING; + +/* + * Init Utilities + */ + +#if !defined(CONFIG_BAUDRATE) +#define CONFIG_BAUDRATE 38400 +#endif +static int init_baudrate (void) +{ + char tmp[64]; /* long enough for environment variables */ + int i = getenv_f("baudrate", tmp, sizeof (tmp)); + + gd->bd->bi_baudrate = gd->baudrate = (i > 0) + ? (int) simple_strtoul (tmp, NULL, 10) + : CONFIG_BAUDRATE; + + return(0); +} + +/* + * WARNING: this code looks "cleaner" than the PowerPC version, but + * has the disadvantage that you either get nothing, or everything. + * On PowerPC, you
[U-Boot] [PATCH v6 07/13] nds32/ag101: cpu and init funcs of SoC ag101
Add main function of SoC ag101 based on NDS32 n1213 core. cpu.c According to the bootstrap procedure in n1213 Core, to turn off watchdog timer is suggested after the cpu is in superuser mdoe. 1. bootstrap 1.1 reset - start of Andesboot 1.2 to superuser mode - as is when reset 1.3 Turn off watchdog timer If you take look into the start.S in n1213, you will find that system will turn off watchdog after start.S has been retunred from lowlevel_init. Since the watchdog device is depends on the SoC is choosed. It should be belonged to the SoC (ag101) folder. watchdog.S: If you've ran another bootloader before u-boot was started the watchdog might have been enabled already. Signed-off-by: Macpaul Lin --- Changes for v5-v6: - Split watchdog.S from lowlevel_init.S. - Fix hardware reset by using watchdog reset in do_reset() in cpu.c. arch/nds32/cpu/n1213/ag101/Makefile | 58 + arch/nds32/cpu/n1213/ag101/cpu.c | 206 + arch/nds32/cpu/n1213/ag101/timer.c| 204 arch/nds32/cpu/n1213/ag101/watchdog.S | 48 4 files changed, 516 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/cpu/n1213/ag101/Makefile create mode 100644 arch/nds32/cpu/n1213/ag101/cpu.c create mode 100644 arch/nds32/cpu/n1213/ag101/timer.c create mode 100644 arch/nds32/cpu/n1213/ag101/watchdog.S diff --git a/arch/nds32/cpu/n1213/ag101/Makefile b/arch/nds32/cpu/n1213/ag101/Makefile new file mode 100644 index 000..e96b1e4 --- /dev/null +++ b/arch/nds32/cpu/n1213/ag101/Makefile @@ -0,0 +1,58 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor +# Written-by: Prafulla Wadaskar +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation +# Macpaul Lin, Andes Technology Corporation +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(SOC).o + +COBJS-y:= cpu.o timer.o + +ifndef CONFIG_SKIP_LOWLEVEL_INIT +SOBJS := lowlevel_init.o +endif + +ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG +SOBJS += watchdog.o +endif + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) + +all: $(obj).depend $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c new file mode 100644 index 000..5888619 --- /dev/null +++ b/arch/nds32/cpu/n1213/ag101/cpu.c @@ -0,0 +1,206 @@ +/* + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Marius Groeger + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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 + */ + +/* CPU specific code */ +#include +#include +#include +#include + +#include + +/* setup up stack if necessary */ +/* it makes no sense to use the caches if the MMU also isn't used */ +void cpu_init(void) +{ + _andesboot_real_end = _andesboot_end + CONFIG_STACKSIZE; +} + +/* + * cleanup_before_linux() is called just before we call linux + * it prepare
[U-Boot] [PATCH v6 06/13] nds32/ag101: lowlevel_init.S of ag101
lowlevel_init.S is a peripheral initial procedure of ag101. It configures onboard dram, clock, and power settings. It also prepars the dram environment before moving u-boot from rom and flash into dram. Signed-off-by: Macpaul Lin --- ChangeLog from v1-v4: - Code clean up and formatting style. ChangeLog from v5-v6 - Change hard code value into MARCO definitions. - ftsmc010 - Fix FTSMC020_TPR_AT2 from 1 to 3 (0xff3ff) - ftsdmc021 - Fix hardcoded address of CR1, CR2, TR1, TR2, BANK0 registers. - Fix the default configuration value of FTSDMC and FTSMC controller. - Remove some ftpmu010 and flash probe code to C functions. This version of lowlevel_init.S also replace hardcode value by MARCO defines from the GPL version andesboot for better code quality. arch/nds32/cpu/n1213/ag101/lowlevel_init.S | 160 1 files changed, 160 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/cpu/n1213/ag101/lowlevel_init.S diff --git a/arch/nds32/cpu/n1213/ag101/lowlevel_init.S b/arch/nds32/cpu/n1213/ag101/lowlevel_init.S new file mode 100644 index 000..19d28d3 --- /dev/null +++ b/arch/nds32/cpu/n1213/ag101/lowlevel_init.S @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +.text + +#include +#include + +#ifndef CONFIG_SKIP_LOWLEVEL_INIT +.globl lowlevel_init +lowlevel_init: + move$r10, $lp + jal mem_init + jal remap + + ret $r10 + +mem_init: + move$r11, $lp + + /* +* mem_init: +* There are 2 bank connected to FTSMC020 on AG101 +* BANK0: FLASH/ROM (SW5, J16), BANK1: OnBoard SDRAM. +* we need to set onboard SDRAM before remap and relocation. +*/ + li $r0, (CONFIG_FTSMC020_BASE + FTSMC020_CONFIG0) + li $r1, (FTSMC020_BANK1_SDRAM_CONFIG) ! 0x1052 + swi $r1, [$r0] + li $r1, (FTSMC020_BANK1_SDRAM_TIMING) ! 0x00151151 + swi $r1, [$r0+0x4] + + /* +* config AHB Controller +*/ + li $r0, (CONFIG_FTAHBC020S_BASE + FTAHBC020S_SLAVE_BSR_6) + li $r1, (CONFIG_SYS_FTAHBC020S_SLAVE_BSR_6) + swi $r1, [$r0] + + /* +* config PMU +*/ + li $r0, (CONFIG_FTPMU010_BASE + FTPMU010_PDLLCR0) + lwi $r1, [$r0] + ! ftpmu010_dlldis_disable, must do it in lowleve_init + li $r2, FTPMU010_PDLLCR0_DLLDIS! 0x0001 + or $r1, $r1, $r2 + swi $r1, [$r0] + + /* +* config SDRAM controller +*/ + li $r0, (CONFIG_FTSDMC021_BASE) + li $r1, (CONFIG_SYS_FTSDMC021_TP1) ! 0x00011312 + swi $r1, [$r0] ! FTSDMC021_OFFSET_TP1 + li $r1, (CONFIG_SYS_FTSDMC021_TP2) ! 0x00480180 + swi $r1, [$r0+0x4] ! FTSDMC021_OFFSET_TP2 + li $r1, (CONFIG_SYS_FTSDMC021_CR1) ! 0x2326 + swi $r1, [$r0+0x8] ! FTSDMC021_OFFSET_CR1 + li $r1, (FTSDMC021_CR2_IPREC) ! 0x0010 + swi $r1, [$r0+0xC] ! FTSDMC021_OFFSET_CR2 +1: + lwi $r1, [$r0+0xC] ! FTSDMC021_OFFSET_CR2 + andi$r1, $r1, (CONFIG_SYS_FTSDMC021_CR2)! 0x1C + bnez$r1, 1b + + li $r1, (FTSDMC021_CR2_ISMR) ! 0x0004 + swi $r1, [$r0+0xC] ! FTSDMC021_OFFSET_CR2 +2: + lwi $r1, [$r0+0xC] ! FTSDMC021_OFFSET_CR2 + bnez$r1, 2b + + li $r1, (FTSDMC021_CR2_IREF) ! 0x0008 + swi $r1, [$r0+0xC] ! FTSDMC021_OFFSET_CR2 +3: + lwi $r1, [$r0+0xC] ! FTSDMC021_OFFSET_CR2 + bnez$r1, 3b + + move$lp, $r11 + ret + +remap: + move$r11, $lp +#ifdef __NDS32_N1213_43U1H__ /* AG101 */ + bal 2f +relo_base: + move$r0, $lp +#else +relo_base: + mfusr $r0, $pc +#endif + + /
[U-Boot] [PATCH v6 05/13] nds32/ag101: dev offset header of SoC ag101
Add header file of device offset support for SoC ag101. SoC ag101 is the first chip using NDS32 N1213 cpu core. Note: Ag101 is actually use ftsdmc021 instead of ftsdmc020 as dram controller, which is probably wrong in the datasheet. Signed-off-by: Macpaul Lin --- arch/nds32/include/asm/arch-ag101/ag101.h | 76 + 1 files changed, 76 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/arch-ag101/ag101.h diff --git a/arch/nds32/include/asm/arch-ag101/ag101.h b/arch/nds32/include/asm/arch-ag101/ag101.h new file mode 100644 index 000..a1d2d0a --- /dev/null +++ b/arch/nds32/include/asm/arch-ag101/ag101.h @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2011 Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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. + */ + +#ifndef __AG101_H +#define __AG101_H + +/ + * Copyright AndesTech Corp 2005-2011. All rights reserved. * + *--* + * Name: ag101.h * + * Description: ADP_AG101 SoC specfic define * + * Author: Nobuhiro Lin* + * Update: Macpaul Lin * + / + +/* Hardware register bases */ +#define CONFIG_FTAHBC020S_BASE 0x9010 /* AHB Controller */ +#define CONFIG_FTSMC020_BASE 0x9020 /* Static Memory Controller (SRAM) */ +#define CONFIG_FTSDMC021_BASE 0x9030 /* FTSDMC020/021 SDRAM Controller */ +#define CONFIG_FTDMAC020_BASE 0x9040 /* DMA Controller */ +#define CONFIG_FTAPBBRG020S_01_BASE0x9050 /* AHB-to-APB Bridge */ +#define CONFIG_FTLCDC100_BASE 0x9060 /* LCD Controller */ +#define CONFIG_RESERVED_01_BASE0x9070 /* Reserved */ +#define CONFIG_RESERVED_02_BASE0x9080 /* Reserved */ +#define CONFIG_FTMAC100_BASE 0x9090 /* Ethernet */ +#define CONFIG_EXT_USB_HOST_BASE 0x90A0 /* External USB host */ +#define CONFIG_USB_DEV_BASE0x90B0 /* USB Device */ +#define CONFIG_EXT_AHBPCIBRG_BASE 0x90C0 /* External AHB-to-PCI Bridge (FTPCI100 not exist in ag101) */ +#define CONFIG_RESERVED_03_BASE0x90D0 /* Reserved */ +#define CONFIG_EXT_AHBAPBBRG_BASE 0x90E0 /* External AHB-to-APB Bridger (FTAPBBRG020S_02) */ +#define CONFIG_EXT_AHBSLAVE01_BASE 0x90F0 /* External AHB slave1 (LCD) */ + +#define CONFIG_EXT_AHBSLAVE02_BASE 0x9200 /* External AHB slave2 (FUSBH200) */ + +/* DEBUG LED */ +#define CONFIG_DEBUG_LED 0x902C /* Debug LED */ + +/* APB Device definitions */ +#define CONFIG_FTPMU010_BASE 0x9810 /* Power Management Unit */ +#define CONFIG_FTUART010_01_BASE 0x9830 /* BT UART 2/IrDA (UART 01 in Linux) */ +#define CONFIG_FTTMR010_BASE 0x9840 /* Counter/Timers */ +#define CONFIG_FTWDT010_BASE 0x9850 /* Watchdog Timer */ +#define CONFIG_FTRTC010_BASE 0x9860 /* Real Time Clock */ +#define CONFIG_FTGPIO010_BASE 0x9870 /* GPIO */ +#define CONFIG_FTINTC010_BASE 0x9880 /* Interrupt Controller */ +#define CONFIG_FTIIC010_BASE 0x98A0 /* I2C */ +#define CONFIG_RESERVED_04_BASE0x98C0 /* Reserved */ +#define CONFIG_FTCFC010_BASE 0x98D0 /* Compat Flash Controller */ +#define CONFIG_FTSDC010_BASE 0x98E0 /* SD Controller */ + +#define CONFIG_FTSSP010_02_BASE0x9940 /* Synchronous Serial Port Controller (SSP) I2S/AC97 */ +#define CONFIG_FTUART010_02_BASE 0x9960 /* ST UART ? SSP 02 (UART 02 in Linux) */ + +/* The following address was not defined in Linux */ +#define CONFIG_FTUART010_03_BASE 0x9820 /* FF UART 3 */ +#define CONFIG_FTSSP010_01_BASE0x98B0 /* Synchronous Serial Port Controller (SSP) 01 */ +#define CONFIG_IRD
[U-Boot] [PATCH v6 04/13] nds32/core N1213: NDS32 N12 core family N1213
Add N1213 cpu core (N12 Core family) support for NDS32 arch. This patch includes start.S for the initialize procedure of N1213. NDS32 Core N1213 has the following hardware features. Core: - 16-/32-bit mixable instruction format - 32 general-purpose 32-bit registers - 8-stage pipeline - Dynamic branch prediction - 32/64/128/256 BTB - Return address stack (RAS) - Vector interrupts for internal/external - 3 HW-level nested interruptions - User and super-user mode support - Memory-mapped I/O - Address space up to 4GB Memory Management Unit: - TLB - Optional hardware page table walker - Two groups of page size support Memory Subsystem: - I & D cache - I & D local memory (LM) Bus Interface: - Synchronous/Asynchronous AHB bus: 0, 1 or 2 ports Start procedure: start.S will start up the N1213 CPU core at first, then jump to SoC dependent "lowlevel_init.S" and "watchdog.S" to configure peripheral devices. Signed-off-by: Macpaul Lin --- arch/nds32/cpu/n1213/Makefile | 50 + arch/nds32/cpu/n1213/start.S| 447 +++ arch/nds32/cpu/n1213/u-boot.lds | 68 ++ 3 files changed, 565 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/cpu/n1213/Makefile create mode 100644 arch/nds32/cpu/n1213/start.S create mode 100644 arch/nds32/cpu/n1213/u-boot.lds diff --git a/arch/nds32/cpu/n1213/Makefile b/arch/nds32/cpu/n1213/Makefile new file mode 100644 index 000..111d14f --- /dev/null +++ b/arch/nds32/cpu/n1213/Makefile @@ -0,0 +1,50 @@ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2011 Andes Technology Corporation +# Shawn Lin, Andes Technology Corporation +# Macpaul Lin, Andes Technology Corporation +# +# 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$(CPU).o + +START = start.o + +SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +START := $(addprefix $(obj),$(START)) + +all: $(obj).depend $(START) $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S new file mode 100644 index 000..aae66f7 --- /dev/null +++ b/arch/nds32/cpu/n1213/start.S @@ -0,0 +1,447 @@ +/* + * Andesboot - Startup Code for Whitiger core + * + * Copyright (C) 2006 Andes Technology Corporation + * Copyright (C) 2006 Shawn Lin + * Copyright (C) 2011 Macpaul + * + * 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 + +/* + * Jump vector table for EVIC mode + */ +#define ENA_DCAC 2UL +#define DIS_DCAC ~ENA_DCAC +#define ICAC_MEM_KBF_ISET (0x07) ! I Cache sets per way +#define ICAC_MEM_KBF_IWAY (0x07<<3) ! I cache ways +#define ICAC_MEM_KBF_ISZ (0x07<<6) ! I cache line size +#define DCAC_MEM_KBF_DSET (0x07) ! D Cache sets per way +#define DCAC_MEM_KBF_DWAY (0x07<<3) ! D cache ways +#define DCAC_MEM_KBF_DSZ (0x07<<6) ! D cache line size + +#define PSW$ir0 +#define EIT_INTR_PSW
[U-Boot] [PATCH v6 01/13] nds32: add header files support for nds32
Add generic header files support for nds32 architecture. Cache, ptregs, data type and other definitions are included. Signed-off-by: Macpaul Lin --- Changes for v1-v4: - Code cleanup and style formatting. Changes for v5-v6: - This patch also updated the following changes against the change after master tree (v2010.12-rc1). - fix upper case definitions in cache.h - Support GD_FLG_ENV_READY and env_buf vars in nds32 global_data.h. - Add readsb, writesb functions into io.h. arch/nds32/include/asm/bitops.h | 150 arch/nds32/include/asm/byteorder.h| 36 +++ arch/nds32/include/asm/cache.h| 51 arch/nds32/include/asm/config.h | 26 ++ arch/nds32/include/asm/global_data.h | 82 +++ arch/nds32/include/asm/io.h | 409 + arch/nds32/include/asm/mach-types.h | 29 +++ arch/nds32/include/asm/memory.h | 19 ++ arch/nds32/include/asm/posix_types.h | 84 +++ arch/nds32/include/asm/processor.h| 25 ++ arch/nds32/include/asm/ptrace.h | 22 ++ arch/nds32/include/asm/ptregs.h | 82 +++ arch/nds32/include/asm/string.h | 57 + arch/nds32/include/asm/types.h| 67 ++ arch/nds32/include/asm/u-boot-nds32.h | 50 arch/nds32/include/asm/u-boot.h | 69 ++ arch/nds32/include/asm/unaligned.h| 31 +++ 17 files changed, 1289 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/bitops.h create mode 100644 arch/nds32/include/asm/byteorder.h create mode 100644 arch/nds32/include/asm/cache.h create mode 100644 arch/nds32/include/asm/config.h create mode 100644 arch/nds32/include/asm/global_data.h create mode 100644 arch/nds32/include/asm/io.h create mode 100644 arch/nds32/include/asm/mach-types.h create mode 100644 arch/nds32/include/asm/memory.h create mode 100644 arch/nds32/include/asm/posix_types.h create mode 100644 arch/nds32/include/asm/processor.h create mode 100644 arch/nds32/include/asm/ptrace.h create mode 100644 arch/nds32/include/asm/ptregs.h create mode 100644 arch/nds32/include/asm/string.h create mode 100644 arch/nds32/include/asm/types.h create mode 100644 arch/nds32/include/asm/u-boot-nds32.h create mode 100644 arch/nds32/include/asm/u-boot.h create mode 100644 arch/nds32/include/asm/unaligned.h diff --git a/arch/nds32/include/asm/bitops.h b/arch/nds32/include/asm/bitops.h new file mode 100644 index 000..2e38f52 --- /dev/null +++ b/arch/nds32/include/asm/bitops.h @@ -0,0 +1,150 @@ +/* + * Copyright 1995, Russell King. + * Various bits and pieces copyrights include: + * Linus Torvalds (test_bit). + * + * Copyright (C) 2011 Andes Technology Corporation + * Shawn Lin, Andes Technology Corporation + * + * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). + * + * Please note that the code in this file should never be included + * from user space. Many of these are not implemented in assembler + * since they would be too costly. Also, they require priviledged + * instructions (which are not available from user mode) to ensure + * that they are atomic. + */ + +#ifndef __ASM_NDS_BITOPS_H +#define __ASM_NDS_BITOPS_H + +#ifdef __KERNEL__ + +#define smp_mb__before_clear_bit() do { } while (0) +#define smp_mb__after_clear_bit() do { } while (0) + +/* + * Function prototypes to keep gcc -Wall happy. + */ +extern void set_bit(int nr, volatile void * addr); + +static inline void __set_bit(int nr, volatile void *addr) +{ + ((unsigned char *) addr)[nr >> 3] |= (1U << (nr & 7)); +} + +extern void clear_bit(int nr, volatile void * addr); + +static inline void __clear_bit(int nr, volatile void *addr) +{ + ((unsigned char *) addr)[nr >> 3] &= ~(1U << (nr & 7)); +} + +extern void change_bit(int nr, volatile void * addr); + +static inline void __change_bit(int nr, volatile void *addr) +{ + ((unsigned char *) addr)[nr >> 3] ^= (1U << (nr & 7)); +} + +extern int test_and_set_bit(int nr, volatile void * addr); + +static inline int __test_and_set_bit(int nr, volatile void *addr) +{ + unsigned int mask = 1 << (nr & 7); + unsigned int oldval; + + oldval = ((unsigned char *) addr)[nr >> 3]; + ((unsigned char *) addr)[nr >> 3] = oldval | mask; + return oldval & mask; +} + +extern int test_and_clear_bit(int nr, volatile void * addr); + +static inline int __test_and_clear_bit(int nr, volatile void *addr) +{ + unsigned int mask = 1 << (nr & 7); + unsigned int oldval; + + oldval = ((unsigned char *) addr)[nr >> 3]; + ((unsigned char *) addr)[nr >> 3] = oldval & ~mask; + return oldval & mask; +} + +extern int test_and_change_bit(int nr, volatile void * addr); + +static inline int __test_and_change_bit(int nr, volatile void *addr) +{ + unsigned int mask = 1 << (nr & 7); + unsigned int oldval; + + oldval = ((unsigned char *) addr)[nr >> 3]; + ((unsigned char *) addr)[nr >> 3] = oldval ^
[U-Boot] [PATCH v6 03/13] nds32: config.mk of NDS32 architecture
Add config.mk for supporting NDS32 architecture. Signed-off-by: Macpaul Lin --- arch/nds32/config.mk | 34 ++ 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/config.mk diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk new file mode 100644 index 000..7fb6be5 --- /dev/null +++ b/arch/nds32/config.mk @@ -0,0 +1,34 @@ +# +# (C) Copyright 2000-2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2011 +# Shawn Lin, Andes Technology Corporation +# Macpaul Lin, Andes Technology Corporation +# +# 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 + +CROSS_COMPILE ?= nds32le-linux- + +STANDALONE_LOAD_ADDR = 0x30 -T nds32.lds + +PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common +PLATFORM_CPPFLAGS += -DCONFIG_NDS32 -D__nds32__ -G0 -ffixed-8 + +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds -- 1.7.3.5 CONFIDENTIALITY NOTICE: This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation. Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 02/13] nds32: add NDS32 support into common header file
Add NDS32 support into common header file. Signed-off-by: Macpaul Lin --- include/common.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/common.h b/include/common.h index d8c912d..31434aa 100644 --- a/include/common.h +++ b/include/common.h @@ -273,6 +273,10 @@ intsetenv (char *, char *); #ifdef CONFIG_I386 /* x86 version to be fixed! */ # include #endif /* CONFIG_I386 */ +#ifdef CONFIG_NDS32 +# include +# include /* NDS32 version to be fixed! */ +#endif /* CONFIG_NDS32 */ #ifdef CONFIG_AUTO_COMPLETE int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); -- 1.7.3.5 CONFIDENTIALITY NOTICE: This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation. Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ftsmc020: enhance for features and asm support.
1. Enhance ftsmc020 according to datasheets. 2. Add assembly register offsets for support lowlevel_init.S. Signed-off-by: Macpaul Lin --- Note: This patch should be applied after patch "[U-Boot,v2,4/4] ftsmc020: move ftsmc020 static mem controller to driver/mtd" (/patch/87862/) is applied. include/faraday/ftsmc020.h | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/include/faraday/ftsmc020.h b/include/faraday/ftsmc020.h index 95d9500..a980c1c 100644 --- a/include/faraday/ftsmc020.h +++ b/include/faraday/ftsmc020.h @@ -46,6 +46,10 @@ void ftsmc020_init(void); #define FTSMC020_BANK_WPROT(1 << 11) +#define FTSMC020_BANK_TYPE1(1 << 10) +#define FTSMC020_BANK_TYPE2(1 << 9) +#define FTSMC020_BANK_TYPE3(1 << 8) + #define FTSMC020_BANK_SIZE_32K (0xb << 4) #define FTSMC020_BANK_SIZE_64K (0xc << 4) #define FTSMC020_BANK_SIZE_128K(0xd << 4) @@ -57,6 +61,7 @@ void ftsmc020_init(void); #define FTSMC020_BANK_SIZE_8M (0x3 << 4) #define FTSMC020_BANK_SIZE_16M (0x4 << 4) #define FTSMC020_BANK_SIZE_32M (0x5 << 4) +#define FTSMC020_BANK_SIZE_64M (0x6 << 4) #define FTSMC020_BANK_MBW_8(0x0 << 0) #define FTSMC020_BANK_MBW_16 (0x1 << 0) @@ -76,4 +81,27 @@ void ftsmc020_init(void); #define FTSMC020_TPR_AHT(x)(((x) & 0x3) << 4) #define FTSMC020_TPR_TRNA(x) (((x) & 0xf) << 0) +/* + * CONFIG and TIME Registers Offsets in ASSEMBLY + */ +#ifdef __ASSEMBLY__ +#define FTSMC020_CONFIG0 0x00 +#define FTSMC020_TIME0 0x04 +#define FTSMC020_CONFIG1 0x08 +#define FTSMC020_TIME1 0x0C +#define FTSMC020_CONFIG2 0x10 +#define FTSMC020_TIME2 0x14 +#define FTSMC020_CONFIG3 0x18 +#define FTSMC020_TIME3 0x1C +#define FTSMC020_CONFIG4 0x20 +#define FTSMC020_TIME4 0x24 +#define FTSMC020_CONFIG5 0x28 +#define FTSMC020_TIME5 0x2C +#define FTSMC020_CONFIG6 0x30 +#define FTSMC020_TIME6 0x34 +#define FTSMC020_CONFIG7 0x38 +#define FTSMC020_TIME7 0x3C +#define FTSMC020_SHADOW0x40 +#endif /* __ASSEMBLY__ */ + #endif /* __FTSMC020_H */ -- 1.7.3.5 CONFIDENTIALITY NOTICE: This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation. Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6] ftwdt010_wdt: support faraday ftwdt010 watchdog
Faraday ftwdt010 watchdog is an architecture independant watchdog. It is usaually used in SoC chip design. Signed-off-by: Macpaul Lin --- Changes for v2: - Fix the wrong title of ftwdt010_wdt patch. Changes for v3: - Patch v2 was encoded in utf-8. Fixed to ASCII. Changes for v4: - Replace the copyright statement "origin: Linux kernel" because the Linux - driver haven't commit into kernel yet. Changes for v5: - Put header file of this driver into "faraday/ftwdt010_wdt.h". - Add function declaration. Changes for v6: - Fix declaration of function ftwdt010_wdt_settimeout(). drivers/watchdog/Makefile |1 + drivers/watchdog/ftwdt010_wdt.c | 104 ++ include/faraday/ftwdt010_wdt.h | 106 +++ 3 files changed, 211 insertions(+), 0 deletions(-) create mode 100644 drivers/watchdog/ftwdt010_wdt.c create mode 100644 include/faraday/ftwdt010_wdt.h diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 6ab4d52..5579bf2 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libwatchdog.o COBJS-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o +COBJS-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/watchdog/ftwdt010_wdt.c b/drivers/watchdog/ftwdt010_wdt.c new file mode 100644 index 000..3c88ce6 --- /dev/null +++ b/drivers/watchdog/ftwdt010_wdt.c @@ -0,0 +1,104 @@ +/* + * Watchdog driver for the FTWDT010 Watch Dog Driver + * + * (c) Copyright 2004 Faraday Technology Corp. (www.faraday-tech.com) + * Based on sa1100_wdt.c by Oleg Drokin + * Based on SoftDog driver by Alan Cox + * + * Copyright (C) 2011 Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * 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. + * + * 27/11/2004 Initial release, Faraday. + * 12/01/2011 Port to u-boot, Macpaul Lin. + */ + +#include +#include +#include +#include + +/* + * Set the watchdog time interval. + * Counter is 32 bit. + */ +int ftwdt010_wdt_settimeout(unsigned int timeout) +{ + unsigned int reg; + + struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE; + + debug("Activating WDT..\n"); + + /* Check if disabled */ + if (readl(&wd->wdcr) & ~FTWDT010_WDCR_ENABLE) { + printf("sorry, watchdog is disabled\n"); + return -1; + } + + /* +* In a 66MHz system, +* if you set WDLOAD as 0x03EF1480 (6600) +* the reset timer is 1 second. +*/ + reg = FTWDT010_WDLOAD(timeout * FTWDT010_TIMEOUT_FACTOR); + + writel(reg, &wd->wdload); + + return 0; +} + +void ftwdt010_wdt_reset(void) +{ + struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE; + + /* clear control register */ + writel(0, &wd->wdcr); + + /* Write Magic number */ + writel(FTWDT010_WDRESTART_MAGIC, &wd->wdrestart); + + /* Enable WDT */ + writel((FTWDT010_WDCR_RST | FTWDT010_WDCR_ENABLE), &wd->wdcr); +} + +void ftwdt010_wdt_disable(void) +{ + struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE; + + debug("Deactivating WDT..\n"); + + /* +* It was defined with CONFIG_WATCHDOG_NOWAYOUT in Linux +* +* Shut off the timer. +* Lock it in if it's a module and we defined ...NOWAYOUT +*/ + writel(0, &wd->wdcr); +} + +#if defined(CONFIG_HW_WATCHDOG) +void hw_watchdog_reset() +{ + ftwdt010_wdt_reset(); +} + +void hw_watchdog_init(void) +{ + /* set timer in ms */ + ftwdt010_wdt_settimeout(CONFIG_FTWDT010_HW_TIMEOUT * 1000); +} +#endif diff --git a/include/faraday/ftwdt010_wdt.h b/include/faraday/ftwdt010_wdt.h new file mode 100644 index 000..abe2a9c --- /dev/null +++ b/include/faraday/ftwdt010_wdt.h @@ -0,0 +1,106 @@ +/* + * Watchdog driver for the FTWDT010 Watch Dog Driver + * + * (c) Copyright 2004 Faraday Technology Corp. (www.faraday-tech.com) + * Based on sa1100_wdt.c by Oleg Drokin + * Based on SoftDog driver by Alan Cox + * + * Copyright (C) 2011 Andes Technology Corporation + * Macpaul Lin, Andes Technology Corporation + * + * This program is free software;
[U-Boot] [PATCH] fat32 root directory handling
Fat directory handling didn't check reaching the end of the root directory. It relied on a stop condition based on a directory entry with a name starting with a '\0' character. This check in itself is wrong ('\0' indicates free entry, not end_of_directory) but outside the scope of this fix. For FAT32, the end of the rootdir is reached when the end of the cluster chain is reached. The code didn't check this condition and started to read an incorrect cluster. This caused a subsequent read request of a sector outside the range of the usb stick in use. On its turn, the usb stick protested with a stall handshake. Both FAT32 and non-FAT32 (FAT16/FAT12) end or rootdir checks have been put in. Signed-off-by: Erik Hansen --- fs/fat/fat.c | 38 -- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index a75e4f2..2a3414f 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -31,6 +31,7 @@ #include #include + /* * Convert a string to lowercase. */ @@ -209,7 +210,7 @@ static __u32 get_fatent (fsdata *mydata, __u32 entry) /* Read a new block of FAT entries into the cache. */ if (bufnum != mydata->fatbufnum) { - int getsize = FATBUFSIZE / FS_BLOCK_SIZE; + __u32 getsize = FATBUFSIZE / FS_BLOCK_SIZE; __u8 *bufptr = mydata->fatbuf; __u32 fatlength = mydata->fatlength; __u32 startblock = bufnum * FATBUFBLOCKS; @@ -279,7 +280,7 @@ static int get_cluster (fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size) { - int idx = 0; + __u32 idx = 0; __u32 startsect; if (clustnum > 0) { @@ -767,12 +768,13 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, dir_entry *dentptr; __u16 prevcksum = 0x; char *subname = ""; - int cursect; + __u32 cursect; int idx, isdir = 0; int files = 0, dirs = 0; long ret = 0; int firsttime; - int root_cluster; + __u32 root_cluster; + int rootdir_size = 0; int j; if (read_bootsectandvi(&bs, &volinfo, &mydata->fatsize)) { @@ -798,8 +800,6 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, mydata->data_begin = mydata->rootdir_sect - (mydata->clust_size * 2); } else { - int rootdir_size; - rootdir_size = ((bs.dir_entries[1] * (int)256 + bs.dir_entries[0]) * sizeof(dir_entry)) / @@ -1006,20 +1006,18 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, * root directory clusters when a cluster has been * completely processed. */ - if ((mydata->fatsize == 32) && (++j == mydata->clust_size)) { - int nxtsect; - int nxt_clust; + ++j; + int fat32_end = 0; + if ((mydata->fatsize == 32) && (j == mydata->clust_size)) { + int nxtsect = 0; + int nxt_clust = 0; nxt_clust = get_fatent(mydata, root_cluster); + fat32_end = CHECK_CLUST(nxt_clust, 32); nxtsect = mydata->data_begin + (nxt_clust * mydata->clust_size); - debug("END LOOP: sect=%d, root_clust=%d, " - "n_sect=%d, n_clust=%d\n", - cursect, root_cluster, - nxtsect, nxt_clust); - root_cluster = nxt_clust; cursect = nxtsect; @@ -1027,6 +1025,18 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, } else { cursect++; } + + /* If end of rootdir reached */ + if ((mydata->fatsize == 32 && fat32_end) || + (mydata->fatsize != 32 && j == rootdir_size)) { + if (dols == LS_ROOT) { + printf("\n%d file(s), %d dir(s)\n\n", + files, dirs); + return 0; + } else { + return -1; + } + } } rootdir_done: -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (no subject)
>From 0348473bedecd7c15f9eb6fd1e9fbe264307fcdf Mon Sep 17 00:00:00 2001 From: Erik Hansen Date: Thu, 17 Mar 2011 14:42:27 +0100 Subject: [PATCH] fat32 root directory handling Fat directory handling didn't check reaching the end of the root directory. It relied on a stop condition based on a directory entry with a name starting with a '\0' character. This check in itself is wrong ('\0' indicates free entry, not end_of_directory) but outside the scope of this fix. For FAT32, the end of the rootdir is reached when the end of the cluster chain is reached. The code didn't check this condition and started to read an incorrect cluster. This caused a subsequent read request of a sector outside the range of the usb stick in use. On its turn, the usb stick protested with a stall handshake. Both FAT32 and non-FAT32 (FAT16/FAT12) end or rootdir checks have been put in. Signed-off-by: Erik Hansen --- fs/fat/fat.c | 38 -- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index a75e4f2..2a3414f 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -31,6 +31,7 @@ #include #include + /* * Convert a string to lowercase. */ @@ -209,7 +210,7 @@ static __u32 get_fatent (fsdata *mydata, __u32 entry) /* Read a new block of FAT entries into the cache. */ if (bufnum != mydata->fatbufnum) { - int getsize = FATBUFSIZE / FS_BLOCK_SIZE; + __u32 getsize = FATBUFSIZE / FS_BLOCK_SIZE; __u8 *bufptr = mydata->fatbuf; __u32 fatlength = mydata->fatlength; __u32 startblock = bufnum * FATBUFBLOCKS; @@ -279,7 +280,7 @@ static int get_cluster (fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size) { - int idx = 0; + __u32 idx = 0; __u32 startsect; if (clustnum > 0) { @@ -767,12 +768,13 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, dir_entry *dentptr; __u16 prevcksum = 0x; char *subname = ""; - int cursect; + __u32 cursect; int idx, isdir = 0; int files = 0, dirs = 0; long ret = 0; int firsttime; - int root_cluster; + __u32 root_cluster; + int rootdir_size = 0; int j; if (read_bootsectandvi(&bs, &volinfo, &mydata->fatsize)) { @@ -798,8 +800,6 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, mydata->data_begin = mydata->rootdir_sect - (mydata->clust_size * 2); } else { - int rootdir_size; - rootdir_size = ((bs.dir_entries[1] * (int)256 + bs.dir_entries[0]) * sizeof(dir_entry)) / @@ -1006,20 +1006,18 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, * root directory clusters when a cluster has been * completely processed. */ - if ((mydata->fatsize == 32) && (++j == mydata->clust_size)) { - int nxtsect; - int nxt_clust; + ++j; + int fat32_end = 0; + if ((mydata->fatsize == 32) && (j == mydata->clust_size)) { + int nxtsect = 0; + int nxt_clust = 0; nxt_clust = get_fatent(mydata, root_cluster); + fat32_end = CHECK_CLUST(nxt_clust, 32); nxtsect = mydata->data_begin + (nxt_clust * mydata->clust_size); - debug("END LOOP: sect=%d, root_clust=%d, " - "n_sect=%d, n_clust=%d\n", - cursect, root_cluster, - nxtsect, nxt_clust); - root_cluster = nxt_clust; cursect = nxtsect; @@ -1027,6 +1025,18 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, } else { cursect++; } + + /* If end of rootdir reached */ + if ((mydata->fatsize == 32 && fat32_end) || + (mydata->fatsize != 32 && j == rootdir_size)) { + if (dols == LS_ROOT) { + printf("\n%d file(s), %d dir(s)\n\n", + files, dirs); + return 0; + } else { + return -1; + } + } } rootdir_done: -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot.lds issue
Dear "Chander M. Kashyap", please submit patches ONLY inline, not as attachments! In message you wrote: > > Hi. I am getting data abort while using original u-boot.lds file. > If i allign bss to 4 bytes rather than using " .bss __rel_dyn_start > (OVERLAY) : {". > With existing code i am getting odd address leading to data abort. > PFA the patch. > > Is this a right approach to fix the data abort? No, this is not correct. You should keep the OVERLAY part. > @@ -66,7 +66,8 @@ SECTIONS > *(.dynsym) > } > > - .bss __rel_dyn_start (OVERLAY) : { > + . = ALIGN(4); > + .bss : { Try instead: . = ALIGN(4); .bss __rel_dyn_start (OVERLAY) : { Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de How come everyone's going so slow if it's called rush hour? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] uboot.lds issue
Hi. I am getting data abort while using original u-boot.lds file. If i allign bss to 4 bytes rather than using " .bss __rel_dyn_start (OVERLAY) : {". With existing code i am getting odd address leading to data abort. PFA the patch. Is this a right approach to fix the data abort? regards, Chander arch/arm/cpu/armv7/u-boot.lds |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds index 5725c30..2a1888e 100644 --- a/arch/arm/cpu/armv7/u-boot.lds +++ b/arch/arm/cpu/armv7/u-boot.lds @@ -66,7 +66,8 @@ SECTIONS *(.dynsym) } - .bss __rel_dyn_start (OVERLAY) : { + . = ALIGN(4); + .bss : { __bss_start = .; *(.bss) . = ALIGN(4); -- -- thanks and regards, Chander M. Kashyap Contact Number: +919740798700 --- TENSION LENE KA NAHI, DENE KE- 0001-ARMV7-u-boot.lds-bss-address-align-to-4-bytes.patch Description: Binary data ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot