Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Marek Vasut, Would you please explain, why do you want to initialize the sdram has been in C code. If for provide this feature should be written assembly code. And it would sometimes even harder than the initialization code sdram? 2012/4/21 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/21 Vasily Khoruzhick anars...@gmail.com 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. And how will you use the internal SRAM when you boot from NAND, if the SoC writes in the SDRAM read data from NAND, and your data will be overwritten. Why? You'll load SPL into SRAM, then in SPL you'll copy the rest of uboot from NAND to - then already inited - SDRAM and execute it. We even have ready-to-use NAND SPL. Regards Vasily Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, Dear Marek Vasut, Would you please explain, why do you want to initialize the sdram has been in C code. Ok, no problem: - You'll be able to call get_ram_size() to scan for ram size as any other board - SDRAM driver will fit properly into the driver model once it's in place (WIP, wanna volunteer for review process?) - It's much cleaner If for provide this feature should be written assembly code. And it would sometimes even harder than the initialization code sdram? What do you mean? Ah yes, just a remark, please don't top-post. Notice how other people don't do it -- I know gmail does it out-of-the-box, but that doesn't mean it's correct. 2012/4/21 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/21 Vasily Khoruzhick anars...@gmail.com 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. And how will you use the internal SRAM when you boot from NAND, if the SoC writes in the SDRAM read data from NAND, and your data will be overwritten. Why? You'll load SPL into SRAM, then in SPL you'll copy the rest of uboot from NAND to - then already inited - SDRAM and execute it. We even have ready-to-use NAND SPL. Regards Vasily Best regards, Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/23 Marek Vasut ma...@denx.de Dear Ilya Averyanov, Dear Marek Vasut, Would you please explain, why do you want to initialize the sdram has been in C code. Ok, no problem: - You'll be able to call get_ram_size() to scan for ram size as any other board - SDRAM driver will fit properly into the driver model once it's in place (WIP, wanna volunteer for review process?) - It's much cleaner If for provide this feature should be written assembly code. And it would sometimes even harder than the initialization code sdram? What do you mean? If we use 4kb of SRAM (steppingstone), then at least need to edit u-boot/arch/arm/cpu/arm920t/start.S, to add a test from there was a boot (NAND or NOR). Edit the address stack. etc ... Use the MMU cache for the stack, even a little better, but it is more difficult. Ah yes, just a remark, please don't top-post. Notice how other people don't do it -- I know gmail does it out-of-the-box, but that doesn't mean it's correct. Ok. 2012/4/21 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/21 Vasily Khoruzhick anars...@gmail.com 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. And how will you use the internal SRAM when you boot from NAND, if the SoC writes in the SDRAM read data from NAND, and your data will be overwritten. Why? You'll load SPL into SRAM, then in SPL you'll copy the rest of uboot from NAND to - then already inited - SDRAM and execute it. We even have ready-to-use NAND SPL. Regards Vasily Best regards, Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/23 Marek Vasut ma...@denx.de Dear Ilya Averyanov, Dear Marek Vasut, Would you please explain, why do you want to initialize the sdram has been in C code. Ok, no problem: - You'll be able to call get_ram_size() to scan for ram size as any other board - SDRAM driver will fit properly into the driver model once it's in place (WIP, wanna volunteer for review process?) - It's much cleaner If for provide this feature should be written assembly code. And it would sometimes even harder than the initialization code sdram? What do you mean? If we use 4kb of SRAM (steppingstone), then at least need to edit u-boot/arch/arm/cpu/arm920t/start.S, to add a test from there was a boot (NAND or NOR). Edit the address stack. etc ... Use the MMU cache for the stack, even a little better, but it is more difficult. Just check where you have SRAM and adjust SP accordingly, it's easy :-) Ah yes, just a remark, please don't top-post. Notice how other people don't do it -- I know gmail does it out-of-the-box, but that doesn't mean it's correct. Ok. 2012/4/21 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/21 Vasily Khoruzhick anars...@gmail.com 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. And how will you use the internal SRAM when you boot from NAND, if the SoC writes in the SDRAM read data from NAND, and your data will be overwritten. Why? You'll load SPL into SRAM, then in SPL you'll copy the rest of uboot from NAND to - then already inited - SDRAM and execute it. We even have ready-to-use NAND SPL. Regards Vasily Best regards, Marek Vasut Best regards, Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, In message CABi8O6aBPyYFPbzJETJFyx4fL4y1EHYpWJx8Ew4Ki-AHpLA=m...@mail.gmail.com you wrote: Why do you insist on sdram initialization code in C? If you simply do as done in the other boards on this architecture? We want to simplify code by usiing the same approach everywhere. And this means that we first set up a system that can run C code, and then use this to insitialize the RAM. This includes using get_ram_size() to auto-detect (and verify) the actual RAM size. And get_ram_size() is a C function as well. The other boards are still old-style and should not be used as examples. 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 many QA engineers does it take to screw in a lightbulb? 3: 1 to screw it in and 2 to say I told you so when it doesn't work. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Vasily Khoruzhick, In message CA+E=qVdyJB3R8vwwFmZsU-0Yh1ah+ZyherrHnN3jx=xTY=t...@mail.gmail.com you wrote: Btw, using cache for stack looks like awful hack to me. No, why? Cache is pretty fast RAM, so why not use it as such? Hey, there are people who boot the whole Linux system (kernel + RAM disk) in cache (actully already on the die, before the chip even has seen a casing, far from thinking about a board... 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 One planet is all you get. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Vasily Khoruzhick, In message CA+E=qvexe0wutn4nb6k-zah7uqvf4j0umd33+gxkqb3ypvt...@mail.gmail.com you wrote: Doing SDRAM init very early (even in assembly code) is obvious and simple. Just few simple writes into RAM controller registers. This is a misconception. Experience on this very mailing list has shown that an extremely high number of issues is cause by incomplete and/or incorrect memory initialization. This is why U-Boot (be design!) makes sure we have a full C environment when doing this taks, where we can use printf() and friends for useful output etc. It's not as simple as previous solution, isn't it? And looks No, it's not so simple, but far more convenient. And over time, much more time-saving. overengineered to me. I prefer to keep such low-level things simple. We respect your personal preferences. But in this case we ask you to stick with the U-Boot design andimplement as requested. 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 1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/21 Marek Vasut ma...@denx.de: I agree with Vasily Khoruzhick, it looks like a hack Please, bother to read the CPU manual and also the ARM Architecture reference manual before you start with such a wild accusations. Let me explain my point of view. Doing SDRAM init very early (even in assembly code) is obvious and simple. Just few simple writes into RAM controller registers. But to use cache as RAM you need to program and enable MMU (again assembly, right?). And then one needs to program SDRAM controller (ok, this part is in C code, but I don't see any advantage). It's not as simple as previous solution, isn't it? And looks overengineered to me. I prefer to keep such low-level things simple. Regards Vasily ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. Regards Vasily ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Vasily Khoruzhick, 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. Now you claim that you can use SRAM for stack in all possible cases damnit. So there is not even a need for locking cache lines. So use the SRAM and be done with it. Regards Vasily Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/21 Vasily Khoruzhick anars...@gmail.com 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. And how will you use the internal SRAM when you boot from NAND, if the SoC writes in the SDRAM read data from NAND, and your data will be overwritten. Regards Vasily ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/21 Vasily Khoruzhick anars...@gmail.com 2012/4/21 Ilya Averyanov averyanovin+ub...@gmail.com: No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. For NAND boot it's mapped at 0x0 For NOR boot it's mapped at 0x4000 NAND controller uses it for booting purpose, but anyway for SPL we should fit code into 4k (hardware limitation), so I think using assembly here for SDRAM init is OK. And how will you use the internal SRAM when you boot from NAND, if the SoC writes in the SDRAM read data from NAND, and your data will be overwritten. Why? You'll load SPL into SRAM, then in SPL you'll copy the rest of uboot from NAND to - then already inited - SDRAM and execute it. We even have ready-to-use NAND SPL. Regards Vasily Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Marek Vasut ma...@denx.de Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:45:21PM +0200, Marek Vasut wrote: Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg | 1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ 2) NAND controller must be initialized before C code run. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut mmm... Because we need a stack. The stack is in RAM. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Ilya Averyanov averyanovin+ub...@gmail.com 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut mmm... Because we need a stack. The stack is in RAM. 2) NAND controller must be initialized before C code run. Sorry made a mistake. SDRAM! Not NAND! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut mmm... Because we need a stack. The stack is in RAM. mmm... You can lock cache entries to create space for stack in cache. That's how it's done on PXA, check it. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/20 Ilya Averyanov averyanovin+ub...@gmail.com 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut mmm... Because we need a stack. The stack is in RAM. 2) NAND controller must be initialized before C code run. Sorry made a mistake. SDRAM! Not NAND! Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Ilya Averyanov averyanovin+ub...@gmail.com 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut mmm... Because we need a stack. The stack is in RAM. 2) NAND controller must be initialized before C code run. Sorry made a mistake. SDRAM! Not NAND! Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) Best regards, Marek Vasut Why do you insist on sdram initialization code in C? If you simply do as done in the other boards on this architecture? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Ilya Averyanov averyanovin+ub...@gmail.com 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Ilya Averyanov, [...] .word 0x32 +.word 0x30 +.word 0x30 What this undocumented stuff? SoC specific, I pasted it from smdk2410, it's for initialize the DRAM. Can't you init DRAM in some more fitting place? Also document this? I don't know, this part is a bit difficult for me, but I'm going to try to document it with the help of the SoC documentation. For the place, should I move it to mini2440.c in arch_cpu_init() or board_early_init_f() ? I don't really know the difference. dram_init() maybe ? You propose to initialize the SDRAM controller in dram_init ()? Well yes, ain't it more fitting ? Best regards, Marek Vasut No. We have to two reasons why this is not the case. 1) Open u-boot/arch/arm/cpu/arm920t/start.S:328 cpu_init_crit .. line 346 /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will * find a lowlevel_init.S in your board directory. */ Well don't setup run in lowlevel_init.S then ? 2) NAND controller must be initialized before C code run. Why? Best regards, Marek Vasut mmm... Because we need a stack. The stack is in RAM. 2) NAND controller must be initialized before C code run. Sorry made a mistake. SDRAM! Not NAND! Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) Best regards, Marek Vasut Why do you insist on sdram initialization code in C? That's how the init sequence was designed. If you simply do as done in the other boards on this architecture? Other boards on arm architecture do init DRAM in proper place. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Marek Vasut ma...@denx.de: Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) s3c24xx has 4kb of SRAM (steppingstone), you can use it for stack Btw, using cache for stack looks like awful hack to me. Regards Vasily ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Vasily Khoruzhick, 2012/4/20 Marek Vasut ma...@denx.de: Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) s3c24xx has 4kb of SRAM (steppingstone), you can use it for stack Oh, I didn't know that ... so there's no longer any problem. Btw, using cache for stack looks like awful hack to me. It's fairy normal. Regards Vasily Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/21 Marek Vasut ma...@denx.de Dear Vasily Khoruzhick, 2012/4/20 Marek Vasut ma...@denx.de: Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) s3c24xx has 4kb of SRAM (steppingstone), you can use it for stack Oh, I didn't know that ... so there's no longer any problem. No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. Btw, using cache for stack looks like awful hack to me. It's fairy normal. I agree with Vasily Khoruzhick, it looks like a hack Regards Vasily Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/21 Marek Vasut ma...@denx.de Dear Vasily Khoruzhick, 2012/4/20 Marek Vasut ma...@denx.de: Which doesn't matter, either way you need stack ... and you can have the stack in cache ;-) s3c24xx has 4kb of SRAM (steppingstone), you can use it for stack Oh, I didn't know that ... so there's no longer any problem. No have problem. Available only if you boot from NOR flash. If you boot from the NAND 4kb of SRAM (steppingstone) not available. So you'll have to lock cache lines then. If you dig in the ML archive, you'll find a lot of discussion on this memory matter, esp. /wrt relocation support. Btw, using cache for stack looks like awful hack to me. It's fairy normal. I agree with Vasily Khoruzhick, it looks like a hack Please, bother to read the CPU manual and also the ARM Architecture reference manual before you start with such a wild accusations. Regards Vasily Best regards, Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
--- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mini2440.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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 config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0 relative the current location so that it */ + /* reads SMRDATA out of FLASH rather than memory ! */ + ldr r0, =SMRDATA + ldr r1, _TEXT_BASE + sub r0, r0, r1 + ldr r1, =BWSCON /* Bus Width Status Controller */ + add r2, r0, #13*4 +0: + ldr r3, [r0], #4 + str r3, [r1], #4 + cmp r2, r0 + bne 0b + + /* everything is fine now */
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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 config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0 relative the current location so that it */ + /* reads SMRDATA out of FLASH rather than memory ! */ + ldr r0, =SMRDATA + ldr r1, _TEXT_BASE + sub r0, r0, r1 + ldr r1, =BWSCON /* Bus Width Status Controller */ + add r2, r0, #13*4 +0: + ldr r3,
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mini2440.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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 config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0 relative the current location so that it */ + /* reads SMRDATA out of FLASH rather than memory ! */ + ldr r0, =SMRDATA +
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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 config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
On Thu, Apr 19, 2012 at 10:45:21PM +0200, Marek Vasut wrote: Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mini2440.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
2012/4/20 Marek Vasut ma...@denx.de Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw ( j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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 config.h +#include version.h +#include mini2440.h
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Gabriel, Can you please trim the subject by removing the 'Documentation about ...' bit. This information belongs in the source code files or, better yet, in doc/README.MINI2440 Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:45:21PM +0200, Marek Vasut wrote: Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg | 1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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 +
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg | 1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw ( j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Hi Marek, On Fri, Apr 20, 2012 at 8:23 AM, Marek Vasut ma...@denx.de wrote: Dear Ilya Averyanov, 2012/4/20 Marek Vasut ma...@denx.de Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- + /* some delay between MPLL and UPLL */ + pll_delay(50); You use udelay() below, do you need pll_delay() at all? Yes, because initialisation of PLL is done before timer_init(), so we can't use udelay(). Maybe fix the timer driver? How fix timer driver if arch_cpu_init(void) call befor timer_init in \arch\arm\lib\board.c:227 init_fnc_t *init_sequence[] = { Where did you get such a weird path? \arch\arm... ? btw you can always check some bit, if the timer is enabled, behave one way, otherwise, behave other way. There is plenty of room in gd-flags - Pick a bit in the high-order 16-bits It will be clear at startup and when you initialise the timer, you can set the bit. udelay() can do a simple test on the bit and call the appropriate function Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot